/* ============================================================
 * 2.4.27 — Final homepage lead fixes
 * - Use a lighter admin screenshot instead of the older heavy cover.
 * - Show the complete top-story title and excerpt on the image.
 * - Restore the mobile reading order of headlines 1→5.
 * ============================================================ */
.home .af-home-lead-card--hero {
    min-height: 380px;
}

.home .af-home-lead-card--hero .af-home-lead-shade {
    background: linear-gradient(180deg, rgba(var(--bz-black-rgb), 0.08) 10%, rgba(var(--bz-black-rgb), 0.92) 100%);
}

.home .af-home-lead-card--hero .af-home-lead-content {
    padding: 96px 20px 18px;
}

.home .af-home-lead-card--hero h2 {
    max-width: 100%;
    font-size: clamp(1.28rem, 2vw, 1.95rem);
    line-height: 1.7;
}

.home .af-home-lead-card--hero h2 a {
    display: block;
    overflow: visible;
    white-space: normal;
    word-break: break-word;
    -webkit-line-clamp: unset;
}

.home .af-home-lead-card--hero p,
.home .af-home-lead-card--hero:hover p,
.home .af-home-lead-card--hero:focus-within p {
    display: block !important;
    max-width: 100%;
    max-height: none;
    margin-top: 10px;
    overflow: visible;
    color: rgba(var(--bz-white-rgb), 0.96);
    font-size: .92rem;
    line-height: 1.9;
    opacity: 1;
    transform: none;
    -webkit-line-clamp: unset;
}

@media (max-width: 899.98px) {
    .home .af-home-lead-group {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    .home .af-home-lead-center,
    .home .af-home-lead-side,
    .home .af-home-lead-bottom {
        display: contents;
    }

    .home .af-home-lead-card--hero {
        order: 1;
        min-height: clamp(300px, 72vw, 420px);
    }

    .home .af-home-lead-side .af-home-lead-card--side:nth-of-type(1) {
        order: 2;
    }

    .home .af-home-lead-side .af-home-lead-card--side:nth-of-type(2) {
        order: 3;
    }

    .home .af-home-lead-bottom .af-home-lead-card--bottom:nth-of-type(1) {
        order: 4;
    }

    .home .af-home-lead-bottom .af-home-lead-card--bottom:nth-of-type(2) {
        order: 5;
    }

    .home .af-home-lead-card--hero .af-home-lead-content {
        padding: 88px 16px 16px;
    }

    .home .af-home-lead-card--hero h2 {
        font-size: clamp(1.15rem, 4.5vw, 1.55rem);
        line-height: 1.72;
    }

    .home .af-home-lead-card--hero p,
    .home .af-home-lead-card--hero:hover p,
    .home .af-home-lead-card--hero:focus-within p {
        font-size: .86rem;
        line-height: 1.85;
    }
}

@media (max-width: 575.98px) {
    .home .af-home-lead-card--hero {
        min-height: clamp(300px, 82vw, 360px);
    }

    .home .af-home-lead-card--hero .af-home-lead-content {
        padding: 80px 14px 14px;
    }

    .home .af-home-lead-card--hero p,
    .home .af-home-lead-card--hero:hover p,
    .home .af-home-lead-card--hero:focus-within p {
        font-size: .82rem;
        line-height: 1.8;
    }
}

/* ============================================================
 * 2.4.28 — Homepage category badge normalization
 * Standardizes the category labels shown on top of images across
 * desktop, tablet and mobile with calmer proportions.
 * ============================================================ */
.home {
    --bz-home-badge-font-size: .68rem;
    --bz-home-badge-line-height: 1.25;
    --bz-home-badge-padding-y: 2px;
    --bz-home-badge-padding-x: 8px;
    --bz-home-badge-radius: 4px;
    --bz-home-badge-offset: 8px;
}

.home .af-home-lead-category {
    top: var(--bz-home-badge-offset);
    right: var(--bz-home-badge-offset);
    max-width: calc(100% - (var(--bz-home-badge-offset) * 2));
}

.home .af-home-lead-category > a,
.home .af-home-lead-category > a > span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: auto;
    padding: var(--bz-home-badge-padding-y) var(--bz-home-badge-padding-x);
    border-radius: var(--bz-home-badge-radius);
    font-size: var(--bz-home-badge-font-size);
    font-weight: 700;
    line-height: var(--bz-home-badge-line-height);
    white-space: nowrap;
}

.home .af-home-lead-category > a > span {
    box-shadow: 0 1px 4px rgba(var(--bz-black-rgb), .18);
}

.home .af-home-lead-card--side .af-home-lead-category,
.home .af-home-lead-card--bottom .af-home-lead-category {
    top: 7px;
    right: 7px;
}

@media (max-width: 899.98px) {
    .home {
        --bz-home-badge-font-size: .64rem;
        --bz-home-badge-padding-y: 2px;
        --bz-home-badge-padding-x: 7px;
        --bz-home-badge-radius: 4px;
        --bz-home-badge-offset: 7px;
    }
}

@media (max-width: 575.98px) {
    .home {
        --bz-home-badge-font-size: .61rem;
        --bz-home-badge-padding-y: 2px;
        --bz-home-badge-padding-x: 6px;
        --bz-home-badge-radius: 4px;
        --bz-home-badge-offset: 6px;
    }
}

/* ============================================================
 * 2.4.29 — Restore stable mobile order and hero behavior
 * - Reverts the custom 1→5 mobile reordering back to the previous flow.
 * - Keeps the full long title visible on the hero image.
 * - Restores the old hover/focus excerpt reveal.
 * - Prevents overflow/scrollbars beside the hero image.
 * ============================================================ */
.home .af-home-lead-card--hero,
.home .af-home-lead-card--hero .af-home-lead-media,
.home .af-home-lead-card--hero .af-home-lead-media > a,
.home .af-home-lead-card--hero .af-home-lead-media picture {
    overflow: hidden;
}

.home .af-home-lead-card--hero {
    min-height: 410px;
}

.home .af-home-lead-card--hero .af-home-lead-content {
    padding: 92px 20px 18px;
    overflow-x: clip;
}

.home .af-home-lead-card--hero h2 {
    max-width: 100%;
    font-size: clamp(1.24rem, 2vw, 1.95rem);
    line-height: 1.72;
}

.home .af-home-lead-card--hero h2 a {
    display: block;
    overflow: visible;
    white-space: normal;
    word-break: break-word;
    overflow-wrap: anywhere;
    -webkit-box-orient: initial;
    -webkit-line-clamp: unset;
}

.home .af-home-lead-card--hero p {
    display: -webkit-box;
    max-width: 100%;
    max-height: 0;
    margin: 0;
    overflow: hidden;
    color: rgba(var(--bz-white-rgb), 0.95);
    font-size: .9rem;
    line-height: 1.85;
    opacity: 0;
    transform: translateY(8px);
    transition: max-height .32s ease, margin .32s ease, opacity .24s ease, transform .32s ease;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

@media (hover: hover) and (pointer: fine) {
    .home .af-home-lead-card--hero:hover p {
        max-height: 4.2em;
        margin-top: 8px;
        opacity: 1;
        transform: translateY(0);
    }
}

.home .af-home-lead-card--hero:focus-within p {
    max-height: 4.2em;
    margin-top: 8px;
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 899.98px) {
    .home .af-home-lead-group {
        display: block;
    }

    .home .af-home-lead-center {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    .home .af-home-lead-bottom {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 9px;
    }

    .home .af-home-lead-side {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-template-rows: auto;
        gap: 9px;
        margin-top: 11px;
    }

    .home .af-home-lead-card--hero {
        min-height: clamp(300px, 72vw, 420px);
    }

    .home .af-home-lead-card--hero .af-home-lead-content {
        padding: 86px 16px 16px;
    }

    .home .af-home-lead-card--hero h2 {
        font-size: clamp(1.14rem, 4.5vw, 1.52rem);
        line-height: 1.74;
    }

    .home .af-home-lead-card--hero p {
        font-size: .86rem;
        line-height: 1.82;
    }
}

@media (max-width: 575.98px) {
    .home .af-home-lead-card--hero {
        min-height: clamp(290px, 82vw, 360px);
    }

    .home .af-home-lead-card--hero .af-home-lead-content {
        padding: 78px 14px 14px;
    }

    .home .af-home-lead-bottom,
    .home .af-home-lead-side {
        grid-template-columns: minmax(0, 1fr) !important;
    }

    .home .af-home-lead-card--hero p {
        font-size: .82rem;
        line-height: 1.78;
    }
}

/* ============================================================
 * 2.4.30 — Mobile top-headline order aligned to desktop reference
 * Mobile order now follows the visual hierarchy shown in the approved layout:
 * 1) hero, 2) side top, 3) side bottom, 4) lower right, 5) lower left.
 * ============================================================ */
@media (max-width: 899.98px) {
    .home .af-home-lead-group {
        display: flex;
        flex-direction: column;
        gap: 11px;
    }

    .home .af-home-lead-center,
    .home .af-home-lead-side {
        display: contents;
    }

    .home .af-home-lead-card--hero {
        order: 1;
    }

    .home .af-home-lead-side .af-home-lead-card--side:nth-of-type(1) {
        order: 2;
    }

    .home .af-home-lead-side .af-home-lead-card--side:nth-of-type(2) {
        order: 3;
    }

    .home .af-home-lead-bottom {
        order: 4;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 9px;
        min-width: 0;
    }

    .home .af-home-lead-bottom .af-home-lead-card--bottom:nth-of-type(1) {
        order: 4;
    }

    .home .af-home-lead-bottom .af-home-lead-card--bottom:nth-of-type(2) {
        order: 5;
    }
}

@media (max-width: 575.98px) {
    .home .af-home-lead-bottom {
        grid-template-columns: minmax(0, 1fr) !important;
    }
}

/* ============================================================
 * 2.4.31 — Desktop hero: no scrollbar, full title, hover excerpt
 * Simple desktop-only fix for the lead story.
 * ============================================================ */
@media (min-width: 900px) {
    .home .af-home-lead-card--hero,
    .home .af-home-lead-card--hero .af-home-lead-media,
    .home .af-home-lead-card--hero .af-home-lead-media > a,
    .home .af-home-lead-card--hero .af-home-lead-media picture {
        overflow: hidden;
    }

    .home .af-home-lead-card--hero {
        min-height: 410px;
    }

    .home .af-home-lead-card--hero .af-home-lead-content {
        right: 0;
        left: 0;
        bottom: 0;
        padding: 110px 20px 18px;
        overflow: hidden;
        transform: translateY(0);
        transition: transform .3s ease;
    }

    .home .af-home-lead-card--hero h2 {
        max-width: 100%;
        font-size: clamp(1.28rem, 2vw, 1.95rem);
        line-height: 1.72;
    }

    .home .af-home-lead-card--hero h2 a {
        display: block;
        overflow: visible;
        white-space: normal;
        word-break: break-word;
        overflow-wrap: anywhere;
        -webkit-line-clamp: unset;
    }

    .home .af-home-lead-card--hero p {
        display: -webkit-box;
        max-width: 100%;
        max-height: 0;
        margin: 0;
        overflow: hidden;
        color: rgba(var(--bz-white-rgb), 0.96);
        font-size: .9rem;
        line-height: 1.9;
        opacity: 0;
        transform: translateY(8px);
        transition: max-height .3s ease, margin .3s ease, opacity .24s ease, transform .3s ease;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
    }

    .home .af-home-lead-card--hero:hover .af-home-lead-content,
    .home .af-home-lead-card--hero:focus-within .af-home-lead-content {
        transform: translateY(-34px);
    }

    .home .af-home-lead-card--hero:hover p,
    .home .af-home-lead-card--hero:focus-within p {
        max-height: 4.2em;
        margin-top: 8px;
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================================
 * 2.4.32 — Hero without scroll; safe hover excerpt behavior
 * - Never use scrolling inside the lead image/title area.
 * - Always show the full hero title.
 * - Show the excerpt on hover/focus only when it is short enough;
 *   long excerpts are hidden entirely to protect layout.
 * ============================================================ */
.home .af-home-lead-card--hero,
.home .af-home-lead-card--hero .af-home-lead-media,
.home .af-home-lead-card--hero .af-home-lead-media > a,
.home .af-home-lead-card--hero .af-home-lead-media picture,
.home .af-home-lead-card--hero .af-home-lead-content {
    overflow: hidden;
}

.home .af-home-lead-card--hero h2 {
    max-width: 100%;
}

.home .af-home-lead-card--hero h2 a {
    display: block;
    overflow: visible;
    white-space: normal;
    word-break: break-word;
    overflow-wrap: anywhere;
    -webkit-line-clamp: unset;
}

.home .af-home-lead-card--hero .af-home-lead-content {
    transform: translateY(0);
    transition: transform .3s ease;
}

.home .af-home-lead-card--hero .af-home-lead-content p {
    display: none;
    max-width: 100%;
    margin: 0;
    overflow: hidden;
    color: rgba(var(--bz-white-rgb), 0.96);
    font-size: .9rem;
    line-height: 1.88;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity .24s ease, transform .3s ease, margin .3s ease;
}

.home .af-home-lead-card--hero.bz-hero-excerpt-enabled .af-home-lead-content p {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

@media (hover: hover) and (pointer: fine) {
    .home .af-home-lead-card--hero.bz-hero-excerpt-enabled:hover .af-home-lead-content {
        transform: translateY(-34px);
    }

    .home .af-home-lead-card--hero.bz-hero-excerpt-enabled:hover .af-home-lead-content p {
        margin-top: 8px;
        opacity: 1;
        transform: translateY(0);
    }
}

.home .af-home-lead-card--hero.bz-hero-excerpt-enabled:focus-within .af-home-lead-content {
    transform: translateY(-34px);
}

.home .af-home-lead-card--hero.bz-hero-excerpt-enabled:focus-within .af-home-lead-content p {
    margin-top: 8px;
    opacity: 1;
    transform: translateY(0);
}

.home .af-home-lead-card--hero.bz-hero-excerpt-disabled .af-home-lead-content,
.home .af-home-lead-card--hero.bz-hero-excerpt-disabled:hover .af-home-lead-content,
.home .af-home-lead-card--hero.bz-hero-excerpt-disabled:focus-within .af-home-lead-content {
    transform: none;
}

.home .af-home-lead-card--hero.bz-hero-excerpt-disabled .af-home-lead-content p {
    display: none !important;
}

/* ============================================================
 * 2.4.34 — Mobile header/top stability guard
 * Loaded after the generated public bundle so later source-file ordering
 * cannot override the approved mobile geometry.
 * ============================================================ */
@media (max-width: 899.98px) {
    html,
    body {
        max-width: 100%;
        overflow-x: hidden;
    }

    nav.af-header,
    body.home nav.af-header {
        box-sizing: border-box !important;
        width: 100% !important;
        min-height: 66px !important;
        margin: 0 0 10px !important;
        padding: 8px 10px !important;
        background: var(--bz-white) !important;
        border-bottom: 1px solid var(--bz-brand-100) !important;
        box-shadow: 0 3px 12px rgba(var(--bz-brand-rgb), .08) !important;
        overflow: visible !important;
    }

    nav.af-header > .container-fluid,
    body.home nav.af-header > .container-fluid {
        display: flex !important;
        align-items: center !important;
        flex-wrap: wrap !important;
        gap: 7px !important;
        width: 100% !important;
        min-width: 0 !important;
        margin: 0 !important;
        padding-inline: 2px !important;
    }

    nav.af-header .af-mobile-flex,
    body.home nav.af-header .af-mobile-flex {
        display: inline-flex !important;
        align-items: center !important;
        flex: 1 1 auto !important;
        min-width: 0 !important;
        min-height: 50px !important;
        margin: 0 !important;
    }

    nav.af-header .af-baztab-logo,
    nav.af-header .navbar .af-baztab-logo,
    body.home nav.af-header .af-baztab-logo,
    body.home nav.af-header .navbar .af-baztab-logo {
        display: block !important;
        width: auto !important;
        height: auto !important;
        max-width: min(174px, 48vw) !important;
        max-height: 50px !important;
        margin: 0 !important;
        object-fit: contain !important;
    }

    nav.af-header .show-btn-mobile,
    nav.af-header .navbar-toggler {
        position: static !important;
        flex: 0 0 42px !important;
        width: 42px !important;
        height: 42px !important;
        margin: 0 !important;
    }

    nav.af-header .navbar-collapse {
        flex-basis: 100% !important;
        width: 100% !important;
        min-width: 0 !important;
    }

    .home .af-home-top,
    .home .af-home-top-layout,
    .home .af-home-lead-group,
    .home .af-home-lead-center,
    .home .af-home-lead-side,
    .home .af-home-lead-bottom {
        min-width: 0 !important;
        max-width: 100% !important;
    }
}
