/* ─────────── IMPACT STRIP (Homepage numbers band) ─────────── */
.impact-strip {
    margin: 24px auto;
    max-width: 1100px;
    padding: 18px;
    background: #ffffff;
    border: 1px solid #e3ecfb;
    border-radius: 14px;
    box-shadow: 0 6px 18px rgba(0, 84, 166, .08);
}

.impact-inner {
    display: grid;
    grid-template-columns: 0.95fr 1.05fr;
    gap: 16px;
    align-items: center;
}

@media (max-width: 900px) {
    .impact-inner {
        grid-template-columns: 1fr;
    }
}

.impact-headline {
    margin: 0 0 6px;
    font-size: clamp(1.25rem, 2.2vw, 1.6rem);
    font-weight: 800;
    color: #0b4aa2;
}

.impact-sub {
    margin: 0 0 10px;
    color: #223050;
    line-height: 1.5;
    max-width: 52ch;
}

.impact-ctas {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.impact-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 14px;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 800;
    border: 1px solid #cfe0ff;
    color: #0b4aa2;
    background: #f6fbff;
}

.impact-cta--primary {
    background: #0056b3;
    color: #fff;
    border-color: #0056b3;
}

.impact-cta--primary:hover {
    filter: brightness(1.05);
}

.impact-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(200px, 1fr));
    gap: 12px;
}

@media (max-width: 600px) {
    .impact-grid {
        grid-template-columns: 1fr;
    }
}

.impact-card {
    background: #fff;
    border: 1px solid #e3ecfb;
    border-radius: 12px;
    padding: 14px;
    box-shadow: 0 4px 12px rgba(0, 84, 166, .06);
    display: grid;
    gap: 6px;
    grid-template-rows: auto 1fr;
    justify-items: start;
    isolation: isolate;
    /* prevent numbers from spilling outside the card */
    overflow: hidden;
}

.metric-label {
    color: #223050;
    font-size: .95rem;
    line-height: 1.35;
}

.metric-value {
    font-weight: 900;
    font-size: clamp(1.2rem, 2vw, 1.6rem);
    color: #0b4aa2;
    letter-spacing: 0;
    /* tighten */
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum" 1, "lnum" 1;
    white-space: nowrap;
    display: inline-flex;
    align-items: baseline;
    justify-content: flex-start;
    gap: 0;
    /* we’ll control micro-spacing on subspans */
    text-align: left;
    max-width: 100%;
}

/* NEW: lock number span width & keep it on its own layer */
.metric-value span[data-target] {
    display: inline-block;
    /* remove fixed width so short numbers don’t create large gaps */
    min-width: 0;
    text-align: left;
    backface-visibility: hidden;
    transform: translateZ(0);
}

/* tighten micro-spacing just a touch to keep ranges compact */
.metric-value .unit {
    margin-left: 2px;
    white-space: nowrap;
    font-weight: 800;
}

.metric-value .sep {
    margin: 0 2px;
    color: #64748b;
    font-weight: 700;
}

/* micro-spans for precise spacing */
.metric-value .prefix {
    display: inline-block;
    margin-right: 2px;
}

.metric-value .num {
    display: inline-block;
}

.metric-value .unit {
    display: inline-block;
    margin-left: 2px;
    white-space: nowrap;
    font-weight: 800;
}

.metric-value .sep {
    display: inline-block;
    margin: 0 4px;
    color: #64748b;
    font-weight: 700;
}


.metric-muted {
    color: #64748b;
    font-weight: 700;
}

.impact-sources {
    margin-top: 6px;
    background: #f8fbff;
    border: 1px dashed #cfe0ff;
    border-radius: 10px;
    padding: 8px 12px;
}

.impact-sources summary {
    cursor: pointer;
    font-weight: 800;
    color: #0b4aa2;
}

.impact-sources a {
    color: #0b4aa2;
    text-decoration: underline;
}

@media (prefers-reduced-motion: reduce) {
    .metric-value {
        transition: none !important;
    }
}



/* ───────── Learn Hub (gallery + subscribe panel) ───────── */
.learn-hub {
    max-width: 1100px;
    margin: 24px auto;
    display: grid;
    grid-template-columns: 1.4fr 0.9fr;
    gap: 16px;
    align-items: stretch;
}

@media (max-width: 980px) {
    .learn-hub {
        grid-template-columns: 1fr;
    }
}

/* Left: edge-to-edge gallery (organized grid, fixed aspect) */
.learn-gallery {
    /* Slightly taller cards so the left matches the right panel’s height visually */
    --card-aspect: 16/9;

    display: grid;
    /* Keep 3 columns on desktop to make each card bigger (remove duplicate 4-col rule) */
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;

    /* Match / slightly exceed the right panel’s min-height (400px) */
    min-height: 420px;
    align-content: start;

    /* Whole-section hover zoom (triggered when hovering the parent section) */
    transition: transform .22s ease, filter .22s ease;
    transform-origin: left center;
    will-change: transform;
}

/* When the user hovers anywhere over the Learn Hub section,
   zoom the ENTIRE left gallery subtly. Per-card hover stays intact. */
.learn-hub:hover .learn-gallery {
    transform: scale(1.015);
}


.learn-card {
    position: relative;
    display: block;
    text-decoration: none;
    color: inherit;
    border-radius: 14px;
    overflow: hidden;
    background: #eef3ff;
    box-shadow: 0 6px 18px rgba(0, 84, 166, .08);
    transition: transform .18s ease, box-shadow .22s ease, filter .22s ease;
}

/* Uniform height via aspect ratio so the gallery never grows too tall */
.learn-card {
    aspect-ratio: var(--card-aspect, 16/10);
}


/* Base: warning-free, two-line clamp fallback (no experimental props) */
.learn-overlay .learn-title {
    overflow: hidden;
    display: block;            /* avoid vendor warnings */
    line-height: 1.25;         /* set line height so we can cap height cleanly */
    max-height: calc(1.25em * 2); /* ≈ two lines without using line-clamp */
}

/* OPTIONAL: If you want slightly crisper truncation on WebKit, you can re-enable this.
   If your linter still warns on vendor props, omit this entire block. */
/*
@supports (-webkit-line-clamp: 2) {
    .learn-overlay .learn-title {
        display: -webkit-box;
        -webkit-box-orient: vertical;
        max-height: none;
        -webkit-line-clamp: 2;
    }
}
*/

/* Responsive columns: 3 on desktop, 2 on tablets, 1 on narrow phones */
@media (max-width: 980px) {
    .learn-gallery {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }
}

@media (max-width: 520px) {
    .learn-gallery {
        grid-template-columns: 1fr;
        gap: 8px;
    }
}


.learn-thumb {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    filter: saturate(1.02) contrast(1.02);
    transition: transform .25s ease, filter .25s ease;
}

.learn-overlay {
    position: absolute;
    inset: auto 0 0 0;
    padding: 10px 12px;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(5, 20, 45, .55) 52%, rgba(5, 20, 45, .82) 100%);
    color: #fff;
}

.learn-chip {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 999px;
    font-weight: 700;
    font-size: .78rem;
    background: rgba(255, 255, 255, .14);
    border: 1px solid rgba(255, 255, 255, .3);
    color: #fff;
    text-decoration: none;
    margin-bottom: 6px;
}

.learn-title {
    margin: 4px 0 2px;
    font-weight: 800;
    font-size: 1.02rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, .35);
}

.learn-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(0, 84, 166, .16);
}

.learn-card:hover .learn-thumb {
    filter: saturate(1.06) contrast(1.06);
}

/* Right: white container matching gallery height */
.learn-subscribe {
    background: #fff;
    border: 1px solid #e3ecfb;
    border-radius: 14px;
    box-shadow: 0 6px 18px rgba(0, 84, 166, .08);
    padding: 20px;
    /* was 16px */
    display: grid;
    grid-template-rows: auto auto 1fr;
    row-gap: 14px;
    /* slightly more breathing room */
    min-height: 400px;
    /* give the content room to breathe */
}


.learn-head {
    display: grid;
    row-gap: 10px;
    /* was 8px */
}

/* Scope the blue title to the right panel only so card overlay titles stay white */
.learn-subscribe .learn-title {
    margin: 0;
    color: #0b4aa2;
    font-weight: 800;
    font-size: clamp(1.2rem, 2.0vw, 1.45rem);
    /* slightly larger */
    letter-spacing: .005em;
}

.learn-blurb {
    margin: 0;
    color: #223050;
    line-height: 1.65;
    /* a bit taller for comfort */
}

.learn-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.learn-tags .learn-chip {
    background: #f6fbff;
    border-color: #cfe0ff;
    color: #0b4aa2;
}

.learn-cta {
    margin-top: 4px;
}

.learn-input-wrap {
    display: grid;
    grid-template-columns: 1fr; /* input on its own row, full width */
    gap: 10px;
}


.learn-input {
    width: 100%;
    height: 48px;
    /* was 44px */
    border: 1px solid #e5e7eb;
    background: #fff;
    border-radius: 999px;
    padding: 12px 16px;
    /* slightly roomier */
    font-size: 1rem;
    /* a touch larger */
    color: #0f172a;
    outline: none;
}

.learn-input:focus {
    border-color: #cfe0ff;
    box-shadow: 0 0 0 3px rgba(0, 86, 179, .12);
}

.learn-button {
    height: 48px;
    /* was 44px */
    padding: 0 18px;
    border-radius: 999px;
    border: 1px solid #0056b3;
    background: #0056b3;
    color: #fff;
    font-weight: 800;
    letter-spacing: .02em;
    cursor: pointer;
}

.learn-button:hover {
    filter: brightness(1.05);
}

.learn-actions {
    margin-top: 12px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}


.learn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 14px;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 800;
    border: 1px solid #cfe0ff;
    color: #0b4aa2;
    background: #f6fbff;
}

.learn-secondary:hover {
    filter: brightness(1.03);
}

/* Subtle, modern hover and focus effects for both buttons */
.learn-button,
.learn-secondary {
    transition: transform .18s ease, box-shadow .22s ease, filter .22s ease;
}

.learn-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(0, 86, 179, .18);
}

.learn-secondary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(0, 84, 166, .12);
}
