/* EFTC v2 visual refresh — scoped to /eftc/preview/. @package EFTC_Resource_Hub_Child */

/* Reduced-motion guard: neutralize v2 motion and any legacy .eftc-fade-in within .eftc-v2. */
@media (prefers-reduced-motion: reduce) {
    .eftc-v2 *,
    .eftc-v2 .eftc-fade-in {
        animation: none !important;
        transition: none !important;
        transform: none !important;
        opacity: 1 !important;
    }
}

/* ── A3 Hero (Variant A): full-bleed photo + diagonal wash + editorial copy ── */
.eftc-v2-hero {
    position: relative;
    min-height: clamp(320px, 42vw, 460px);
    display: flex;
    align-items: center;
    overflow: hidden;
}
.eftc-v2-hero__img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 28%;
}
.eftc-v2-hero__wash {
    position: absolute;
    inset: 0;
    background: var(--eftc-hero-wash);
}
.eftc-v2-hero__inner {
    position: relative;
    z-index: 2;
    max-width: 60%;
    color: #fff;
    padding-top: clamp(2.5rem, 5vw, 4.5rem);
    padding-bottom: clamp(2.5rem, 5vw, 4.5rem);
}
.eftc-v2-eyebrow {
    margin: 0 0 0.6rem;
    color: var(--eftc-gold);
    font-weight: 700;
    font-size: 0.8rem;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}
.eftc-v2-hero__title {
    margin: 0 0 0.85rem;
    font-family: 'Gilroy', sans-serif;
    font-weight: 700;
    line-height: 1.05;
    font-size: clamp(2rem, 4vw, 3.25rem);
    color: #fff;
}
/* Divi sets h1 color to navy at high specificity; the v2 hero title must beat it
   (mirrors the live ".eftc-hero h1" override in eftc-frontend.css). Without this
   the white title falls back to Divi navy and vanishes on the dark hero wash. */
.eftc-v2-hero .eftc-v2-hero__title,
.eftc-v2-hero h1 {
    color: #fff;
}
.eftc-v2-hero__sub {
    margin: 0 0 1.6rem;
    font-size: 1.1rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.92);
}
.eftc-v2-hero__link {
    display: inline-block;
    margin-left: 1rem;
    color: #fff;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color var(--eftc-transition-fast, 150ms ease);
}
.eftc-v2-hero__link:hover,
.eftc-v2-hero__link:focus {
    color: var(--eftc-gold);
}
/* Keep the hero link readable now that the global link default is navy:
   raise above the global .eftc-page a:not(.eftc-btn) (0,2,1). */
.eftc-page a.eftc-v2-hero__link:not(.eftc-btn) {
    color: #fff;
}
.eftc-page a.eftc-v2-hero__link:not(.eftc-btn):hover,
.eftc-page a.eftc-v2-hero__link:not(.eftc-btn):focus {
    color: var(--eftc-gold);
}

@media (max-width: 680px) {
    .eftc-v2-hero__inner {
        max-width: 100%;
        padding-top: 2rem;
        padding-bottom: 2rem;
    }
    .eftc-v2-hero__link {
        display: block;
        margin-left: 0;
        margin-top: 0.9rem;
    }
}

/* "Start here" navy-bar icon cards */
.eftc-v2-kicker {
    margin: 0 0 1.1rem;
    color: var(--eftc-navy);
    font-family: 'Gilroy', sans-serif;
    font-weight: 700;
    font-size: clamp(1.3rem, 2.4vw, 1.8rem);
}
.eftc-v2-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
}
.eftc-v2-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 13px;
    overflow: hidden;
    text-decoration: none;
    box-shadow: 0 3px 10px rgba(29, 55, 105, 0.12);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.eftc-v2-card:hover,
.eftc-v2-card:focus-visible {
    transform: translateY(-4px);
    box-shadow: 0 10px 24px rgba(29, 55, 105, 0.22);
}
/* The card is an <a>; the base sheet's ".eftc-page a:not(.eftc-btn):hover" rule
   (specificity 0,3,1) underlines link text on hover, and that underline propagates
   to every line in the card. A descendant cannot cancel a propagated underline, so
   override it at the <a> with matching specificity (this sheet loads after
   eftc-frontend.css). Result: only the gold ::after line is the hover cue. */
.eftc-page a.eftc-v2-card:hover,
.eftc-page a.eftc-v2-card:focus {
    text-decoration: none;
}
/* Navy header bar: roughly 1/3 to 2/5 of the card via a fixed min-height. */
.eftc-v2-card__bar {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 120px;
    padding: 18px 18px 16px;
    background: var(--eftc-navy, #1D3769);
}
.eftc-v2-card__icon {
    width: 78px;
    height: 78px;
    flex: 0 0 auto;
}
/* Optional small accent icon, offset top-right in the bar. */
.eftc-v2-card__accent {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 22px;
    height: 22px;
    opacity: 0.85;
}
.eftc-v2-card__body {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    padding: 18px 18px 20px;
    text-align: center;
}
.eftc-v2-card__title {
    position: relative;
    padding-bottom: 8px;
    color: var(--eftc-navy, #1D3769);
    font-family: 'Gilroy', sans-serif;
    font-weight: 700;
    font-size: 1.12rem;
    line-height: 1.2;
}
/* Gold underline accent (same motif as the old tile b::after). */
.eftc-v2-card__title::after {
    content: "";
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: 0;
    width: 34px;
    height: 3px;
    background: var(--eftc-gold, #D8A83B);
    transition: width 0.22s ease;
}
.eftc-v2-card:hover .eftc-v2-card__title::after,
.eftc-v2-card:focus-visible .eftc-v2-card__title::after {
    width: 100%;
}
.eftc-v2-card__copy {
    color: var(--eftc-charcoal, #262323);
    font-size: 0.9rem;
    line-height: 1.4;
}
.eftc-v2-card__cta {
    display: inline-flex;
    align-self: center;
    align-items: center;
    gap: 0.35rem;
    margin-top: 0.2rem;
    color: var(--eftc-navy, #1D3769);
    font-weight: 600;
    font-size: 0.92rem;
}
.eftc-v2-card__arrow {
    width: 16px;
    height: 16px;
    transition: transform 0.18s ease;
}
.eftc-v2-card:hover .eftc-v2-card__arrow,
.eftc-v2-card:focus-visible .eftc-v2-card__arrow {
    transform: translateX(3px);
}
@media (max-width: 768px) {
    .eftc-v2-cards { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
    .eftc-v2-cards { grid-template-columns: 1fr; }
}

/* ── A5 Impact band (navy, gold numerals) ── */
.eftc-v2-impact {
    background: var(--eftc-navy-dark, #152B50);
    padding: clamp(2.5rem, 5vw, 4rem) 0;
    color: #fff;
}
.eftc-v2-impact__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: clamp(1.5rem, 3vw, 2.5rem);
}
.eftc-v2-impact__stat {
    text-align: center;
}
.eftc-v2-impact__num {
    display: block;
    font-family: 'Gilroy', sans-serif;
    font-weight: 700;
    line-height: 1.05;
    font-size: clamp(1.6rem, 3vw, 2.4rem);
    color: var(--eftc-gold);
}
.eftc-v2-impact__lab {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.92rem;
    line-height: 1.4;
    color: rgba(255, 255, 255, 0.88);
}
@media (max-width: 768px) {
    .eftc-v2-impact__grid { grid-template-columns: repeat(2, 1fr); }
}

/* ── A6 "Who it's for" two doors ── */
.eftc-v2-doors {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(1rem, 2.5vw, 1.75rem);
}
.eftc-v2-door {
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 4px 14px rgba(29, 55, 105, 0.12);
}
.eftc-v2-door__head {
    padding: 1.4rem 1.6rem;
    color: #fff;
}
.eftc-v2-door--schools .eftc-v2-door__head {
    background: var(--eftc-navy, #1D3769);
}
.eftc-v2-door--donors .eftc-v2-door__head {
    background: linear-gradient(120deg, #234C8A 0%, #3a6bb0 100%);
}
.eftc-v2-door__head h3 {
    margin: 0;
    font-family: 'Gilroy', sans-serif;
    font-weight: 700;
    font-size: 1.35rem;
    color: #fff;
}
.eftc-v2-door__body {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 1.4rem 1.6rem 1.6rem;
}
.eftc-v2-door__list {
    flex: 1;
    margin: 0 0 1.4rem;
    padding: 0;
    list-style: none;
}
.eftc-v2-door__list li {
    position: relative;
    margin-bottom: 0.7rem;
    padding-left: 1.5rem;
    line-height: 1.45;
    color: var(--eftc-charcoal, #2b2f36);
}
.eftc-v2-door__list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.55em;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--eftc-gold);
}
.eftc-v2-go {
    align-self: flex-start;
    font-weight: 700;
    color: var(--eftc-navy, #1D3769);
    text-decoration: none;
}
.eftc-v2-go::after {
    content: " \2192";
    display: inline-block;
    transition: transform 0.18s ease;
}
.eftc-v2-go:hover::after,
.eftc-v2-go:focus-visible::after {
    transform: translateX(3px);
}
.eftc-v2-door--donors .eftc-v2-go {
    color: #3a6bb0;
}
/* Two stacked door CTAs (e.g. families "Check eligibility" + the donor calculator)
   need a little breathing room between them. */
.eftc-v2-go + .eftc-v2-go {
    margin-top: 0.55rem;
}
@media (max-width: 680px) {
    .eftc-v2-doors { grid-template-columns: 1fr; }
}

/* ── A7 closing connect band (reused newsletter form on navy) ── */
.eftc-v2-connect__lead {
    max-width: 580px;
    margin: 0 auto 1.5rem;
    color: rgba(255, 255, 255, 0.85);
}
#eftc-v2-connect .eftc-form-label {
    color: #fff;
}

/* ── A8 Map + docked state-updates panel ── */
.eftc-v2-map-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: clamp(1rem, 2.5vw, 2rem);
    align-items: start;
}
.eftc-v2-map-main { min-width: 0; }
#eftc-map-container { width: 100%; }
#eftc-map-container svg { width: 100%; height: auto; display: block; }
.eftc-map-state { cursor: pointer; transition: fill 0.15s ease; outline: none; }
.eftc-map-state:focus-visible { outline: 3px solid var(--eftc-gold); outline-offset: 1px; }
.eftc-v2-map-select { margin-top: 1.1rem; max-width: 360px; }
.eftc-v2-map-select .eftc-form-label { display: block; margin-bottom: 0.3rem; font-weight: 600; }
.eftc-v2-map-legend.eftc-map-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem 1.2rem;
    margin-top: 1rem;
}

.eftc-v2-panel {
    position: relative;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 6px 22px rgba(29, 55, 105, 0.14);
    padding: 1.5rem 1.5rem 1.6rem;
    min-height: 220px;
}
.eftc-v2-panel.open .eftc-v2-panel__body {
    animation: eftc-v2-panel-in 0.3s ease;
}
.eftc-v2-panel__close {
    position: absolute;
    top: 0.5rem;
    right: 0.7rem;
    border: 0;
    background: transparent;
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
    color: var(--eftc-charcoal, #2b2f36);
}
.eftc-v2-panel__placeholder {
    margin: 0;
    color: #6b7280;
    font-size: 0.95rem;
}
.eftc-v2-panel__name {
    margin: 0 1.5rem 0.5rem 0;
    font-family: 'Gilroy', sans-serif;
    font-weight: 700;
    font-size: 1.4rem;
    color: var(--eftc-navy, #1D3769);
}
.eftc-v2-panel__badge {
    display: inline-block;
    margin-bottom: 1rem;
    padding: 0.2rem 0.75rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 700;
    color: #fff;
}
.eftc-v2-panel__gov {
    margin: 0 0 1rem;
    color: var(--eftc-charcoal, #2b2f36);
}
.eftc-v2-panel__reel { margin: 0 0 1.2rem; }
.eftc-v2-panel__update {
    position: relative;
    padding: 0.7rem 0 0.7rem 1.1rem;
    border-left: 2px solid #E3E8F0;
    opacity: 0;
    transform: translateY(6px);
    animation: eftc-v2-reel-in 0.4s ease forwards;
}
.eftc-v2-panel__update p { margin: 0; line-height: 1.45; }
.eftc-v2-panel__update--latest::before {
    content: "";
    position: absolute;
    left: -5px;
    top: 1rem;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--eftc-gold);
    box-shadow: 0 0 0 0 rgba(216, 168, 59, 0.6);
    animation: eftc-v2-pulse 1.8s ease-out infinite;
}
.eftc-v2-panel__update-date {
    display: block;
    margin-bottom: 0.2rem;
    font-size: 0.78rem;
    color: #6b7280;
}
.eftc-v2-panel__update-src {
    display: inline-block;
    margin-top: 0.35rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--eftc-navy, #1D3769);
}
.eftc-v2-panel__view {
    font-weight: 700;
    color: var(--eftc-navy, #1D3769);
    text-decoration: none;
}
.eftc-v2-panel__view:hover { color: var(--eftc-gold-hover, #E0B84D); }

@keyframes eftc-v2-panel-in {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes eftc-v2-reel-in {
    to { opacity: 1; transform: translateY(0); }
}
@keyframes eftc-v2-pulse {
    70% { box-shadow: 0 0 0 8px rgba(216, 168, 59, 0); }
    100% { box-shadow: 0 0 0 0 rgba(216, 168, 59, 0); }
}
@media (max-width: 900px) {
    .eftc-v2-map-layout { grid-template-columns: 1fr; }
}
