/* Final cross-page layout fixes — loaded last to prevent stale/older rules winning. */
.category-page {
    overflow: hidden;
}

.category-heading {
    margin-top: 0;
}

.category-lead {
    align-items: stretch;
}

.category-lead > * {
    min-width: 0;
}

.economic-indicators,
.market-widget,
.sports-scores,
.category-side {
    height: 100%;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: #fff;
}

.economic-indicators > h2,
.market-widget > h2,
.sports-scores-title {
    margin: 0;
    padding: 14px;
    background: var(--navy);
    color: #fff;
}

.economic-indicators article,
.market-rows article {
    border-bottom: 1px solid var(--line);
}

.category-hero {
    overflow: hidden;
}

.category-footer {
    position: relative;
    clear: both;
    width: 100%;
    margin-top: 0;
}

.category-footer .site-logo-footer,
.footer-logo .site-logo-footer {
    box-shadow: 0 8px 24px rgba(0, 0, 0, .16);
}

/* Subcategory concept: featured story first, latest list second, five cards per row. */
.subcategory-top-featured {
    grid-template-columns: minmax(0, 1fr) 310px;
    grid-template-areas: "feature latest";
    align-items: stretch;
}

.subcategory-top-featured .subcategory-feature {
    grid-area: feature;
}

.subcategory-top-featured .subcategory-latest {
    grid-area: latest;
    display: block;
}

.subcategory-grid-five {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 14px;
}

.subcategory-grid-five > a {
    position: relative;
    height: 255px;
    overflow: hidden;
    border: 0;
    border-radius: 9px;
    background: var(--navy);
    box-shadow: 0 7px 20px rgba(6, 27, 43, .12);
}

.subcategory-grid-five > a::after {
    position: absolute;
    z-index: 1;
    inset: 0;
    background: linear-gradient(180deg, rgba(4, 20, 32, .02) 20%, rgba(4, 20, 32, .35) 53%, rgba(4, 20, 32, .98) 100%);
    content: '';
}

.subcategory-grid-five img {
    width: 100%;
    height: 100%;
    transition: transform .35s ease;
}

.subcategory-grid-five > a:hover img {
    transform: scale(1.05);
}

.subcategory-grid-five > a > div {
    position: absolute;
    z-index: 2;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 16px;
    color: #fff;
}

.subcategory-grid-five span {
    position: absolute;
    top: 13px;
    inset-inline-start: 13px;
    width: max-content;
    padding: 6px 12px;
    border-radius: 18px;
    background: var(--red);
    color: #fff;
    box-shadow: 0 5px 14px rgba(228, 19, 43, .28);
    font-size: .68rem;
    line-height: 1;
}

.subcategory-grid-five h3 {
    margin: 0 0 8px;
    color: #fff;
    font-size: .82rem;
    line-height: 1.65;
}

.subcategory-grid-five p {
    display: none;
}

.subcategory-grid-five small {
    color: #d7e0e6;
}

/* Apply the selected full-photo card style to the Latest News section. */
.latest-news-concept .latest-news-layout {
    height: 535px;
    align-items: stretch;
}

.latest-news-concept .latest-news-cards {
    height: 100%;
    grid-template-rows: repeat(2, minmax(0, 1fr));
}

.latest-news-concept .latest-lead,
.latest-news-concept .latest-news-cards > a,
.latest-news-concept .latest-news-row > a {
    position: relative;
    overflow: hidden;
    border: 0;
    border-radius: 9px;
    background: var(--navy);
    box-shadow: 0 7px 20px rgba(6, 27, 43, .12);
}

.latest-news-concept .latest-lead::after,
.latest-news-concept .latest-news-cards > a::after,
.latest-news-concept .latest-news-row > a::after {
    position: absolute;
    z-index: 1;
    inset: 0;
    background: linear-gradient(180deg, rgba(4, 20, 32, .02) 22%, rgba(4, 20, 32, .35) 54%, rgba(4, 20, 32, .98) 100%);
    content: '';
}

.latest-news-concept .latest-lead {
    height: 100%;
    min-height: 0;
}

.latest-news-concept .latest-news-cards > a {
    height: 100%;
    min-height: 0;
}

.latest-news-concept .latest-news-row > a {
    height: 255px;
    padding: 0;
}

.latest-news-concept .latest-lead > img,
.latest-news-concept .latest-news-cards img,
.latest-news-concept .latest-news-row img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border-radius: 0;
    object-fit: cover;
    transition: transform .35s ease;
}

.latest-news-concept .latest-lead:hover > img,
.latest-news-concept .latest-news-cards > a:hover img,
.latest-news-concept .latest-news-row > a:hover img {
    transform: scale(1.045);
}

.latest-news-concept .latest-lead > div,
.latest-news-concept .latest-news-cards > a > div,
.latest-news-concept .latest-news-row > a > div {
    position: absolute;
    z-index: 2;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 17px;
    color: #fff;
}

.latest-news-concept .latest-lead .badge,
.latest-news-concept .latest-news-cards span,
.latest-news-concept .latest-news-row span {
    position: absolute;
    top: 14px;
    inset-inline-start: 14px;
    width: max-content;
    padding: 6px 12px;
    border-radius: 18px;
    background: var(--red);
    color: #fff;
    box-shadow: 0 5px 14px rgba(228, 19, 43, .28);
    font-size: .68rem;
    font-weight: 800;
    line-height: 1;
}

.latest-news-concept .latest-lead h3,
.latest-news-concept .latest-news-cards h3,
.latest-news-concept .latest-news-row h3 {
    min-height: 0;
    margin: 0 0 8px;
    color: #fff;
    line-height: 1.6;
}

.latest-news-concept .latest-lead p {
    margin: 0 0 10px;
    color: #dce4e9;
}

.latest-news-concept .latest-lead small,
.latest-news-concept .latest-news-cards small,
.latest-news-concept .latest-news-row small {
    color: #d7e0e6;
}

@media (min-width: 1101px) {
    .category-lead {
        grid-template-columns: 280px minmax(0, 1fr) 280px;
    }
}

@media (max-width: 1100px) {
    .category-lead,
    .sports-lead,
    .economy-lead {
        grid-template-columns: 230px minmax(0, 1fr);
    }

    .subcategory-top-featured {
        grid-template-columns: minmax(0, 1fr) 270px;
    }

    .subcategory-grid-five {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .container {
        width: calc(100% - 24px);
    }

    .brand-row {
        min-height: 112px;
        height: auto;
    }

    .site-logo-header {
        width: 168px;
        height: 78px;
    }

    .ticker {
        margin-top: 8px;
    }

    .category-page {
        padding-bottom: 24px;
    }

    .category-heading {
        min-height: 105px;
        margin-bottom: 12px;
        padding: 20px;
    }

    .category-heading h1 {
        font-size: 1.75rem;
    }

    .category-heading p {
        font-size: .8rem;
    }

    .category-lead,
    .sports-lead,
    .economy-lead {
        display: flex;
        flex-direction: column;
        gap: 12px;
    }

    .category-hero {
        order: 1;
        width: 100%;
        min-height: 420px;
    }

    .category-hero h2 {
        font-size: 1.45rem;
    }

    .sports-scores,
    .economic-indicators,
    .market-widget {
        order: 2;
        width: 100%;
        height: auto;
    }

    .sports-lead .most-read-side,
    .economy-lead .economic-indicators {
        display: block;
    }

    .sports-match-list,
    .economic-indicators > div,
    .market-rows {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
    }

    .sports-match,
    .economic-indicators article,
    .market-rows article {
        min-width: 82vw;
        scroll-snap-align: start;
    }

    .subcategory-strip {
        margin: 12px 0 22px;
    }

    .latest-news-layout {
        display: block;
    }

    .latest-news-concept .latest-news-layout,
    .latest-news-concept .latest-news-cards {
        height: auto;
    }

    .latest-lead {
        margin-bottom: 12px;
    }

    .latest-news-concept .latest-lead {
        height: 410px;
        min-height: 410px;
    }

    .latest-news-concept .latest-news-cards > a,
    .latest-news-concept .latest-news-row > a {
        height: 280px;
        min-height: 280px;
    }

    .subcategory-top-featured {
        display: flex;
        flex-direction: column;
    }

    .subcategory-top-featured .subcategory-feature {
        order: 1;
        min-height: 390px;
    }

    .subcategory-top-featured .subcategory-latest {
        order: 2;
        display: block;
    }

    .subcategory-grid-five {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        overflow: visible;
    }

    .subcategory-grid-five > a {
        min-width: 0;
    }

    .subcategory-grid-five img {
        height: 100%;
    }

    .category-footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 26px 18px;
        padding: 34px 0;
    }

    .category-footer-grid > div:first-child {
        grid-column: 1 / -1;
    }

    .category-footer .site-logo-footer {
        width: 160px;
    }
}

@media (max-width: 420px) {
    .utility-inner {
        font-size: .65rem;
    }

    .site-logo-header {
        width: 148px;
    }

    .category-hero {
        min-height: 370px;
    }

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

    .category-footer-grid > div:first-child {
        grid-column: auto;
    }

    .subcategory-grid-five {
        grid-template-columns: 1fr;
    }

    .subcategory-grid-five img {
        height: 100%;
    }

    .subcategory-grid-five > a {
        height: 300px;
    }
}
