/* =========================================================
   AVTOSTAR EDITORIAL LAYOUT 1.0.0
   Category 1+3 showcase, 50/50 brands/latest stream,
   full-width all-publications chronology.
   ========================================================= */

/* Category showcase: one lead + three supporting stories */

.ast-category-page--editorial .ast-category-header--editorial {
    max-width: 900px;
}

.ast-category-showcase {
    display: grid;
    grid-template-columns: minmax(0, 1.38fr) minmax(300px, .92fr);
    gap: 24px;
    margin: 0 0 42px;
    padding: 0 0 38px;
    border-bottom: 1px solid var(--ast-line, #e5e7eb);
}

.ast-category-showcase__lead {
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--ast-line, #e5e7eb);
    border-radius: 12px;
    background: #fff;
}

.ast-category-showcase__lead-media {
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #f3f4f6;
}

.ast-category-showcase__lead-image {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.ast-category-showcase__lead-content {
    padding: 22px 24px 24px;
}

.ast-category-showcase__lead-content h2 {
    margin: 7px 0 10px;
    font-size: clamp(25px, 3vw, 36px);
    line-height: 1.08;
}

.ast-category-showcase__lead-content h2 a,
.ast-category-showcase__side-content h3 a {
    color: inherit;
    text-decoration: none;
}

.ast-category-showcase__lead-content h2 a:hover,
.ast-category-showcase__side-content h3 a:hover {
    color: var(--ast-accent, #d71920);
}

.ast-category-showcase__lead-content p {
    margin: 0 0 13px;
    color: #5b6168;
    font-size: 16px;
    line-height: 1.55;
}

.ast-category-showcase__lead-content time,
.ast-category-showcase__side-content time {
    color: #7a8086;
    font-size: 13px;
}

.ast-category-showcase__side {
    display: grid;
    grid-template-rows: repeat(3, minmax(0, 1fr));
    gap: 14px;
    min-width: 0;
}

.ast-category-showcase__side-item {
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(130px, 42%) 1fr;
    gap: 15px;
    align-items: stretch;
    overflow: hidden;
    border: 1px solid var(--ast-line, #e5e7eb);
    border-radius: 10px;
    background: #fff;
}

.ast-category-showcase__side-media {
    min-height: 130px;
    display: block;
    overflow: hidden;
    background: #f3f4f6;
}

.ast-category-showcase__side-image {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.ast-category-showcase__side-content {
    min-width: 0;
    padding: 14px 14px 13px 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.ast-category-showcase__side-content h3 {
    margin: 0 0 10px;
    font-size: 18px;
    line-height: 1.2;
}

.ast-category-showcase__placeholder {
    width: 100%;
    height: 100%;
    min-height: 180px;
    display: grid;
    place-items: center;
    color: #222;
    font-weight: 900;
    letter-spacing: .04em;
}

.ast-category-showcase__placeholder span {
    color: var(--ast-accent, #d71920);
}

.ast-category-showcase__placeholder--small {
    min-height: 130px;
    font-size: 12px;
}

.ast-category-feed {
    padding-bottom: 48px;
}

.ast-category-feed__heading {
    margin: 0 0 20px;
}

.ast-category-feed__heading h2 {
    margin: 4px 0 0;
    font-size: 28px;
}

.ast-category-grid--editorial {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}


/* Home: 50/50 brands + latest-publications stream */

.ast-brand-latest-section {
    padding: 42px 0;
    background: #fff;
    border-top: 1px solid var(--ast-line, #e5e7eb);
    border-bottom: 1px solid var(--ast-line, #e5e7eb);
}

.ast-brand-latest-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 42px;
    align-items: stretch;
}

.ast-brand-latest-panel {
    min-width: 0;
}

.ast-brand-latest-panel--latest {
    padding-left: 38px;
    border-left: 1px solid var(--ast-line, #e5e7eb);
}

.ast-brand-latest-heading {
    min-height: 64px;
    margin: 0 0 18px;
}

.ast-brand-latest-heading h2 {
    margin: 4px 0 0;
    font-size: 28px;
    line-height: 1.1;
}

.ast-brand-mini-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.ast-brand-mini {
    --ast-brand-color: #d71920;
    min-width: 0;
    min-height: 98px;
    padding: 12px 8px 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 7px;
    border: 1px solid var(--ast-line, #e5e7eb);
    border-top: 2px solid var(--ast-brand-color);
    border-radius: 9px;
    background: #fff;
    color: inherit;
    text-align: center;
    text-decoration: none;
    transition: transform .18s ease, box-shadow .18s ease;
}

.ast-brand-mini:hover {
    transform: translateY(-2px);
    box-shadow: 0 7px 20px rgb(0 0 0 / 7%);
}

.ast-brand-mini__logo {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
}

.ast-brand-mini__logo img {
    max-width: 42px;
    max-height: 42px;
    width: auto;
    height: auto;
    display: block;
}

.ast-brand-mini__name {
    max-width: 100%;
    overflow: hidden;
    color: #30343a;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.15;
    text-overflow: ellipsis;
}

.ast-brand-latest-more {
    display: inline-block;
    margin-top: 18px;
    color: #555b61;
    font-size: 14px;
    font-weight: 800;
    text-decoration: none;
}

.ast-brand-latest-more:hover {
    color: var(--ast-accent, #d71920);
}

.ast-latest-stream {
    border-top: 1px solid var(--ast-line, #e5e7eb);
}

.ast-latest-stream__item {
    display: grid;
    grid-template-columns: 50px minmax(0, 1fr);
    gap: 12px;
    align-items: start;
    padding: 12px 0;
    border-bottom: 1px solid var(--ast-line, #e5e7eb);
}

.ast-latest-stream__time {
    padding-top: 2px;
    color: var(--ast-accent, #d71920);
    font-size: 13px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}

.ast-latest-stream__title {
    margin: 0;
    font-size: 16px;
    line-height: 1.28;
}

.ast-latest-stream__title a {
    color: #202327;
    text-decoration: none;
}

.ast-latest-stream__title a:hover {
    color: var(--ast-accent, #d71920);
}

.ast-brand-latest-empty {
    color: #6b7177;
}


/* Full-width chronological archive */

.ast-all-publications {
    padding-bottom: 64px;
}

.ast-all-publications__header {
    max-width: 920px;
    padding: 46px 0 28px;
}

.ast-all-publications__header h1 {
    margin: 5px 0 10px;
    font-size: clamp(34px, 5vw, 56px);
    line-height: 1;
}

.ast-all-publications__header p {
    margin: 0;
    max-width: 760px;
    color: #60666c;
    font-size: 17px;
    line-height: 1.5;
}

.ast-all-publications__stream {
    border-top: 2px solid #202327;
}

.ast-all-publications__day {
    margin: 0;
    padding: 25px 0 12px;
    border-bottom: 1px solid var(--ast-line, #e5e7eb);
    font-size: 18px;
    line-height: 1.2;
}

.ast-all-publications__item {
    display: grid;
    grid-template-columns: 82px minmax(0, 1fr);
    gap: 22px;
    align-items: start;
    padding: 20px 0 21px;
    border-bottom: 1px solid var(--ast-line, #e5e7eb);
}

.ast-all-publications__time {
    padding-top: 4px;
    color: var(--ast-accent, #d71920);
    font-size: 16px;
    font-weight: 900;
    font-variant-numeric: tabular-nums;
}

.ast-all-publications__content h3 {
    margin: 0;
    max-width: 1120px;
    font-size: clamp(20px, 2.4vw, 27px);
    line-height: 1.18;
}

.ast-all-publications__content h3 a {
    color: #202327;
    text-decoration: none;
}

.ast-all-publications__content h3 a:hover {
    color: var(--ast-accent, #d71920);
}

.ast-all-publications__category {
    display: inline-block;
    margin-top: 8px;
    color: #72787e;
    font-size: 12px;
    font-weight: 800;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: .045em;
}

.ast-all-publications__category:hover {
    color: var(--ast-accent, #d71920);
}

.ast-all-publications__pagination {
    margin-top: 34px;
}

.ast-all-publications__pagination .page-numbers,
.ast-category-pagination .page-numbers {
    list-style: none;
    margin: 0;
    padding: 0;
}

.ast-all-publications__pagination ul.page-numbers,
.ast-category-pagination ul.page-numbers {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.ast-all-publications__pagination li,
.ast-category-pagination li {
    margin: 0;
}

.ast-all-publications__pagination a.page-numbers,
.ast-all-publications__pagination span.page-numbers,
.ast-category-pagination a.page-numbers,
.ast-category-pagination span.page-numbers {
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    display: inline-grid;
    place-items: center;
    border: 1px solid var(--ast-line, #e5e7eb);
    border-radius: 7px;
    background: #fff;
    color: #30343a;
    font-size: 14px;
    font-weight: 800;
    text-decoration: none;
}

.ast-all-publications__pagination .current,
.ast-category-pagination .current {
    border-color: #202327;
    background: #202327;
    color: #fff;
}


@media (max-width: 1050px) {
    .ast-category-showcase {
        grid-template-columns: minmax(0, 1.18fr) minmax(290px, .82fr);
    }

    .ast-brand-mini-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .ast-category-grid--editorial {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}


@media (max-width: 820px) {
    .ast-category-showcase,
    .ast-brand-latest-grid {
        grid-template-columns: 1fr;
    }

    .ast-category-showcase__side {
        grid-template-rows: none;
    }

    .ast-brand-latest-panel--latest {
        padding-top: 30px;
        padding-left: 0;
        border-top: 1px solid var(--ast-line, #e5e7eb);
        border-left: 0;
    }

    .ast-brand-mini-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}


@media (max-width: 620px) {
    .ast-category-showcase {
        gap: 14px;
    }

    .ast-category-showcase__lead-content {
        padding: 17px 18px 19px;
    }

    .ast-category-showcase__lead-content h2 {
        font-size: 27px;
    }

    .ast-category-showcase__lead-content p {
        display: none;
    }

    .ast-category-showcase__side-item {
        grid-template-columns: 40% minmax(0, 1fr);
    }

    .ast-category-showcase__side-content h3 {
        font-size: 16px;
    }

    .ast-brand-mini-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .ast-category-grid--editorial {
        grid-template-columns: 1fr;
    }

    .ast-all-publications__item {
        grid-template-columns: 55px minmax(0, 1fr);
        gap: 12px;
        padding: 17px 0;
    }

    .ast-all-publications__time {
        font-size: 14px;
    }

    .ast-all-publications__content h3 {
        font-size: 20px;
    }
}


@media (max-width: 430px) {
    .ast-brand-mini-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}


@media (prefers-reduced-motion: reduce) {
    .ast-brand-mini {
        transition: none;
    }

    .ast-brand-mini:hover {
        transform: none;
    }
}


/* =========================================================
   AVTOSTAR VISUAL BALANCE 1.0.3
   Align the 50/50 Brands + Latest section vertically.
   ========================================================= */

.ast-brand-latest-panel {
    display: flex;
    flex-direction: column;
}

.ast-brand-latest-more {
    margin-top: auto;
    padding-top: 18px;
}

.ast-brand-latest-more--all {
    margin-top: auto;
}
