/* === CATEGORY HERO === */
.ukr-category-hero {
    background: linear-gradient(135deg, #0057B7 0%, #003d82 100%);
    color: #ffffff;
    padding: 50px 20px 40px;
    text-align: center;
    margin: -20px -20px 30px;
    width: calc(100% + 40px);
}
.ukr-category-hero__inner {
    max-width: 800px;
    margin: 0 auto;
}
.ukr-category-hero__flag {
    font-size: 64px;
    display: block;
    margin-bottom: 12px;
}
.ukr-category-hero__title {
    font-size: 36px;
    font-weight: 700;
    margin: 0 0 8px;
    color: #ffffff;
}
.ukr-category-hero__count {
    font-size: 16px;
    color: rgba(255,255,255,0.7);
    margin: 0 0 12px;
}
.ukr-category-hero__desc {
    font-size: 16px;
    line-height: 1.6;
    color: rgba(255,255,255,0.9);
    max-width: 600px;
    margin: 0 auto;
}

/* Subcategory tags */
.ukr-subcats {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 24px;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 20px;
}
.ukr-subcat-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255,255,255,0.15);
    color: #ffffff !important;
    padding: 8px 16px;
    border-radius: 24px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none !important;
    transition: all 0.2s ease;
    border: 1px solid rgba(255,255,255,0.2);
}
.ukr-subcat-tag:hover {
    background: rgba(255,255,255,0.25);
    transform: translateY(-2px);
    border-color: rgba(255,255,255,0.4);
}
.ukr-subcat-tag__icon {
    font-size: 16px;
}
.ukr-subcat-tag__count {
    background: rgba(255,255,255,0.2);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
}

/* Hide default archive header */
.category .ast-archive-description,
.category .page-header {
    display: none !important;
}

/* Fix Astra grid — proper column widths */
.category #primary.ast-grid-3.ast-blog-layout-4-grid {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 24px !important;
    max-width: 1200px !important;
    margin: 0 auto !important;
    padding: 20px !important;
}
.category #primary.ast-grid-3 > .ukr-category-hero {
    width: 100% !important;
    flex-basis: 100% !important;
}
.category #primary.ast-grid-3 > .ast-pagination {
    width: 100% !important;
    flex-basis: 100% !important;
}
.category #primary.ast-grid-3 > .ast-article-post {
    width: calc(33.333% - 16px) !important;
    max-width: calc(33.333% - 16px) !important;
    flex: 0 0 calc(33.333% - 16px) !important;
    margin: 0 !important;
}
@media (max-width: 768px) {
    .category #primary.ast-grid-3 > .ast-article-post {
        width: 100% !important;
        max-width: 100% !important;
        flex: 0 0 100% !important;
    }
}
@media (min-width: 769px) and (max-width: 1024px) {
    .category #primary.ast-grid-3 > .ast-article-post {
        width: calc(50% - 12px) !important;
        max-width: calc(50% - 12px) !important;
        flex: 0 0 calc(50% - 12px) !important;
    }
}

/* Category page — no sidebar, full width */
.category .ast-container {
    max-width: 1240px !important;
}
.category .ast-col-md-12,
.category .ast-col-md-8,
.category .site-content > .ast-container > .ast-row > .ast-col-md-8 {
    width: 100% !important;
    max-width: 100% !important;
}
.category .site-content .widget-area {
    display: none !important;
}

/* Post cards in category */
.category .ast-article-post {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    transition: transform 0.2s, box-shadow 0.2s;
}
.category .ast-article-post:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
}
.category .ast-article-post .post-thumb-img-content img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

/* Card content padding */
.category .ast-article-post .entry-content,
.category .ast-article-post .ast-blog-single-element {
    padding: 0 16px;
}
.category .ast-article-post .entry-header {
    padding: 16px 16px 0;
}

/* Card title */
.category .ast-article-post .entry-title {
    font-family: 'Georgia', serif;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.35;
    color: #1a1a2e;
    margin: 0 0 8px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.category .ast-article-post .entry-title a {
    color: inherit;
    text-decoration: none;
}

/* Hide author "marat", show only date */
body.category .posted-by,
body.category .byline,
body.category span.posted-by.vcard.author {
    display: none !important;
}
body.category .entry-meta {
    font-size: 0;
    color: #999;
    font-family: 'Helvetica Neue', sans-serif;
    padding: 0 16px 12px;
}
body.category .entry-meta .published,
body.category .entry-meta time,
body.category .entry-meta .ast-date-meta {
    font-size: 12px;
}

/* Category badges on cards — max 2 visible */
.category .ast-article-post .ast-blog-single-element.ast-taxonomy-container {
    padding: 12px 16px 4px;
    max-height: 36px;
    overflow: hidden;
}
.category .ast-article-post .ast-blog-single-element.ast-taxonomy-container a {
    display: inline-block;
    background: #0057B7;
    color: #fff !important;
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    text-decoration: none;
    letter-spacing: 0.3px;
    font-family: 'Helvetica Neue', sans-serif;
}

/* Excerpt styling */
.category .ast-article-post .ast-excerpt-container {
    padding: 0 16px 16px;
    font-size: 13px;
    line-height: 1.55;
    color: #666;
    font-family: 'Helvetica Neue', sans-serif;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Read more link */
.category .ast-article-post .read-more a,
.category .ast-article-post .ast-read-more-container a {
    display: inline-block;
    color: #0057B7;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    font-family: 'Helvetica Neue', sans-serif;
    padding: 0 16px 16px;
}
.category .ast-article-post .read-more a:hover,
.category .ast-article-post .ast-read-more-container a:hover {
    color: #004a99;
    text-decoration: underline;
}

/* Pagination styling */
.ast-pagination,
.pagination {
    text-align: center;
    margin: 40px 0 20px;
    grid-column: 1 / -1;
}
.ast-pagination .page-numbers,
.pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    margin: 0 4px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.2s;
    background: #f5f5f5;
    color: #1a1a1a;
}
.ast-pagination .page-numbers.current,
.pagination .page-numbers.current {
    background: #0057B7;
    color: #fff;
}
.ast-pagination .page-numbers:hover,
.pagination .page-numbers:hover {
    background: #0057B7;
    color: #fff;
}

/* Hide legacy mu-plugin filter form until CPT listing is populated */
.ukr-filters-wrap {
    display: none !important;
}

/* ===== Cross-filter (country × topic) ===== */
.ukr-filter {
    max-width: 1100px;
    margin: 24px auto 0;
    padding: 0 16px;
}
.ukr-filter__label {
    font-size: 13px;
    color: #555;
    font-family: 'Helvetica Neue', sans-serif;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    font-weight: 600;
}
.ukr-filter__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.ukr-filter__tag {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: #fff;
    border: 1.5px solid #e8e4dc;
    border-radius: 999px;
    padding: 9px 16px;
    font-size: 13.5px;
    font-weight: 500;
    color: #1a1a2e !important;
    text-decoration: none !important;
    font-family: 'Helvetica Neue', sans-serif;
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease, background .15s ease, color .15s ease;
    line-height: 1.1;
    min-height: 36px;
}
.ukr-filter__tag:hover {
    border-color: #0057B7;
    color: #0057B7 !important;
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(0,87,183,.12);
}
.ukr-filter__tag.is-active {
    background: #0057B7;
    border-color: #0057B7;
    color: #fff !important;
    font-weight: 600;
    box-shadow: 0 4px 14px rgba(0,87,183,.30);
}
.ukr-filter__tag.is-active::before {
    content: '✓';
    display: inline-block;
    font-size: 12px;
    margin-right: 2px;
    color: #FFD700;
    font-weight: 700;
}
.ukr-filter__tag.is-active .ukr-filter__cnt {
    background: rgba(255,255,255,0.22);
    color: #fff;
}
.ukr-filter__tag.is-empty {
    opacity: 0.55;
    border-style: dashed;
    cursor: pointer;
    color: #777 !important;
}
.ukr-filter__tag.is-empty:hover {
    opacity: 1;
    border-color: #FFD700;
    color: #1a1a2e !important;
    background: #fffdf3;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(255,215,0,0.25);
}
.ukr-filter__ico { font-size: 14px; }
.ukr-filter__cnt {
    display: inline-block;
    background: #f0ede5;
    color: #666;
    font-size: 11px;
    padding: 1px 7px;
    border-radius: 10px;
    margin-left: 2px;
    font-weight: 600;
}

/* === BONUS: "Скоро з'явиться" landing === */
body.ukr-soon .no-results,
body.ukr-soon .ast-pagination,
body.ukr-soon .search-no-results,
body.ukr-soon .ast-search-form,
body.ukr-soon .page-header { display: none !important; }

.ukr-soon-landing {
    max-width: 900px;
    margin: 0 auto;
    padding: 16px 16px 56px;
}
.ukr-soon-hero {
    background: linear-gradient(135deg, #fffdf3 0%, #fff8e0 100%);
    border: 2px dashed #FFD700;
    border-radius: 16px;
    padding: 48px 32px;
    text-align: center;
    margin-bottom: 32px;
}
.ukr-soon-icons {
    font-size: 56px;
    line-height: 1;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}
.ukr-soon-flag { font-size: 48px; }
.ukr-soon-title {
    font-family: 'Georgia', serif;
    font-size: 30px;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0 0 12px;
    line-height: 1.25;
}
.ukr-soon-sub {
    font-family: 'Helvetica Neue', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: #555;
    max-width: 560px;
    margin: 0 auto 28px;
}
.ukr-soon-cta {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}
.ukr-soon-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 13px 22px;
    border-radius: 999px;
    font-family: 'Helvetica Neue', sans-serif;
    font-weight: 600;
    font-size: 15px;
    text-decoration: none !important;
    transition: transform .15s, box-shadow .15s;
    min-height: 44px;
}
.ukr-soon-btn--primary {
    background: #0057B7;
    color: #fff !important;
    box-shadow: 0 4px 12px rgba(0,87,183,0.25);
}
.ukr-soon-btn--primary:hover {
    background: #003d82;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(0,87,183,0.35);
}
.ukr-soon-btn--ghost {
    background: transparent;
    color: #1a1a2e !important;
    border: 1px solid #1a1a2e;
}
.ukr-soon-btn--ghost:hover {
    background: #1a1a2e;
    color: #fff !important;
}
.ukr-soon-cross {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}
.ukr-soon-col {
    background: #fff;
    border: 1px solid #e8e4dc;
    border-radius: 12px;
    padding: 20px 22px;
}
.ukr-soon-col-title {
    font-family: 'Helvetica Neue', sans-serif;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: #555;
    margin: 0 0 14px;
}
.ukr-soon-col-ico { margin-right: 6px; }
.ukr-soon-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.ukr-soon-list li {
    border-top: 1px solid #f0ede5;
    padding: 10px 0;
}
.ukr-soon-list li:first-child { border-top: none; padding-top: 0; }
.ukr-soon-list a {
    font-family: 'Georgia', serif;
    font-size: 15px;
    line-height: 1.4;
    color: #1a1a2e !important;
    text-decoration: none;
    display: block;
}
.ukr-soon-list a:hover { color: #0057B7 !important; }

@media (max-width: 700px) {
    .ukr-soon-hero { padding: 32px 18px; }
    .ukr-soon-title { font-size: 24px; }
    .ukr-soon-sub { font-size: 15px; }
    .ukr-soon-cta { flex-direction: column; align-items: stretch; }
    .ukr-soon-btn { width: 100%; justify-content: center; }
    .ukr-soon-cross { grid-template-columns: 1fr; gap: 16px; }
}

/* Mobile hero */
@media (max-width: 768px) {
    .ukr-category-hero {
        padding: 30px 16px;
    }
    .ukr-category-hero__flag {
        font-size: 48px;
    }
    .ukr-category-hero__title {
        font-size: 26px;
    }
    .ukr-subcats {
        gap: 8px;
    }
    .ukr-subcat-tag {
        padding: 6px 12px;
        font-size: 13px;
    }
    .ukr-filter__tag {
        padding: 6px 12px;
        font-size: 12px;
    }
    .ukr-filter__label {
        font-size: 12px;
    }
}
