/* ==========================================================
   CDS Journey — Homepage Hero (Phase 2)
   Namespace: .rd-hero*
   Background: redesign/images/hero-banner.png
   Breakpoints: <768 mobile | 768–1199 tablet | >=1200 desktop
   Palette: Navy / Olive / Gold — no lavender
   ========================================================== */

.rd-hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    display: flex;
    align-items: stretch;
    min-height: 0;
    background: var(--rd-surface-default, #F8F9FB);
}

.rd-hero__media {
    position: absolute;
    inset: 0;
    z-index: 0;
    background-color: var(--rd-surface-default, #F8F9FB);
    background-image: url("../../images/hero-banner.png");
    background-repeat: no-repeat;
    background-size: cover;
    background-position: 78% 28%;
}

.rd-hero__scrim {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background: linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.94) 0%,
        rgba(255, 255, 255, 0.88) 40%,
        rgba(255, 255, 255, 0.72) 70%,
        rgba(255, 255, 255, 0.55) 100%
    );
}

.rd-hero__inner {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 28px;
    width: 100%;
    padding-block: 40px 36px;
    box-sizing: border-box;
}

.rd-hero__content {
    max-width: 40rem;
}

.rd-hero__eyebrow {
    position: relative;
    display: inline-block;
    margin: 0 0 14px;
    padding-bottom: 10px;
    font-family: var(--rd-font-mono, "IBM Plex Mono", ui-monospace, monospace);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--rd-color-olive, #4B5320);
}

.rd-hero__eyebrow::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 36px;
    height: 2px;
    background: var(--rd-color-gold, #D4AF37);
}

.rd-hero__heading {
    margin: 0;
    max-width: 22rem;
    font-family: var(--rd-font-display, "Fraunces", Georgia, serif);
    font-size: clamp(36px, 9vw, 42px);
    font-weight: 600;
    line-height: 1.06;
    letter-spacing: -0.02em;
    color: var(--rd-color-navy, #1A2B4C);
    text-wrap: balance;
}

.rd-hero__heading em {
    font-style: italic;
    font-weight: 600;
    color: var(--rd-color-olive, #4B5320);
}

.rd-hero__body {
    margin: 16px 0 0;
    max-width: 36rem;
    font-family: var(--rd-font-body, "Inter", Arial, sans-serif);
    font-size: 15px;
    font-weight: 400;
    line-height: 1.6;
    color: var(--rd-color-slate, #343A40);
}

.rd-hero__actions {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    margin-top: 24px;
}

.rd-hero__cta-primary {
    width: 100%;
    min-height: 52px;
    padding: 0 28px;
    border-radius: var(--rd-radius-btn, 11px);
    font-size: 15px;
}

.rd-hero__cta-primary:focus-visible {
    outline-color: var(--rd-color-gold, #D4AF37);
}

/* Mobile: secondary as text-style under primary */
.rd-hero__cta-secondary.rd-cta--secondary {
    width: auto;
    align-self: flex-start;
    min-height: 44px;
    padding: 0 4px;
    border: none;
    border-radius: 0;
    background: transparent;
    color: var(--rd-color-navy, #1A2B4C);
    box-shadow: none;
}

.rd-hero__cta-secondary.rd-cta--secondary:link,
.rd-hero__cta-secondary.rd-cta--secondary:visited {
    color: var(--rd-color-navy, #1A2B4C);
    background: transparent;
}

.rd-hero__cta-secondary.rd-cta--secondary:hover {
    background: transparent;
    color: var(--rd-color-olive, #4B5320);
    border: none;
}

.rd-hero__cta-secondary.rd-cta--secondary:focus-visible {
    outline: 2px solid var(--rd-color-gold, #D4AF37);
    outline-offset: 3px;
    border-radius: 4px;
}

.rd-hero__micro {
    margin: 18px 0 0;
    font-family: var(--rd-font-mono, "IBM Plex Mono", ui-monospace, monospace);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--rd-text-secondary, #6C757D);
}

/* ---- Exam destination cards ---- */
.rd-hero__exams {
    width: 100%;
}

.rd-hero__exams-label {
    margin: 0 0 14px;
    font-family: var(--rd-font-mono, "IBM Plex Mono", ui-monospace, monospace);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--rd-color-navy, #1A2B4C);
}

.rd-hero__exams-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.rd-hero__exam-card {
    display: grid;
    grid-template-columns: auto 1fr auto;
    grid-template-areas: "crest main arrow";
    align-items: center;
    gap: 10px;
    min-height: 108px;
    padding: 14px 12px;
    border: 1px solid var(--rd-border-subtle, #DDE2E6);
    border-radius: var(--rd-radius-lg, 16px);
    background: var(--rd-color-white, #FFFFFF);
    box-shadow: var(--rd-shadow-subtle, 0 4px 16px rgba(26, 43, 76, 0.06));
    text-decoration: none;
    color: inherit;
    transition:
        border-color 180ms ease,
        box-shadow 180ms ease,
        transform 180ms ease;
}

.rd-hero__exam-card:link,
.rd-hero__exam-card:visited {
    color: inherit;
}

.rd-hero__exam-crest {
    grid-area: crest;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 17px;
    line-height: 1;
    flex-shrink: 0;
}

.rd-hero__exam-card--cds .rd-hero__exam-crest {
    background: rgba(26, 43, 76, 0.08);
    color: var(--rd-color-navy, #1A2B4C);
}

.rd-hero__exam-card--nda .rd-hero__exam-crest {
    background: var(--rd-surface-olive-soft, #EEF1EA);
    color: var(--rd-color-olive, #4B5320);
}

.rd-hero__exam-card--afcat .rd-hero__exam-crest {
    background: var(--rd-surface-gold-soft, #F5F0DF);
    color: var(--rd-color-gold, #D4AF37);
}

.rd-hero__exam-card--capf .rd-hero__exam-crest {
    background: rgba(26, 43, 76, 0.06);
    color: var(--rd-color-olive, #4B5320);
}

.rd-hero__exam-main {
    grid-area: main;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.rd-hero__exam-code {
    font-family: var(--rd-font-body, "Inter", Arial, sans-serif);
    font-size: 18px;
    font-weight: 700;
    line-height: 1.15;
    color: var(--rd-color-navy, #1A2B4C);
}

.rd-hero__exam-name {
    font-family: var(--rd-font-body, "Inter", Arial, sans-serif);
    font-size: 11px;
    font-weight: 500;
    line-height: 1.3;
    color: var(--rd-text-secondary, #6C757D);
}

.rd-hero__exam-desc {
    margin-top: 4px;
    font-family: var(--rd-font-body, "Inter", Arial, sans-serif);
    font-size: 12px;
    font-weight: 400;
    line-height: 1.35;
    color: var(--rd-color-slate, #343A40);
}

.rd-hero__exam-arrow {
    grid-area: arrow;
    font-size: 16px;
    font-weight: 600;
    line-height: 1;
    color: var(--rd-color-navy, #1A2B4C);
    transition: transform 180ms ease, color 180ms ease;
}

.rd-hero__exam-card:hover {
    border-color: rgba(75, 83, 32, 0.4);
    box-shadow: var(--rd-shadow-medium, 0 8px 28px rgba(26, 43, 76, 0.08));
    transform: translateY(-2px);
    outline: none;
}

.rd-hero__exam-card:hover .rd-hero__exam-arrow {
    color: var(--rd-color-olive, #4B5320);
    transform: translateX(3px);
}

.rd-hero__exam-card:active {
    transform: translateY(0);
}

.rd-hero__exam-card:focus {
    outline: none;
}

.rd-hero__exam-card:focus-visible {
    outline: 2px solid var(--rd-color-gold, #D4AF37);
    outline-offset: 2px;
}

/* Narrow phones: keep 2×2 if possible; tighten type */
@media (max-width: 379px) {
    .rd-hero__exams-grid {
        grid-template-columns: 1fr;
    }

    .rd-hero__exam-card {
        min-height: 88px;
    }
}

/* ==========================================================
   Tablet 768–1199
   ========================================================== */
@media (min-width: 768px) {
    .rd-hero__media {
        background-position: 70% center;
    }

    .rd-hero__scrim {
        background: linear-gradient(
            90deg,
            rgba(255, 255, 255, 0.94) 0%,
            rgba(255, 255, 255, 0.86) 32%,
            rgba(255, 255, 255, 0.4) 58%,
            rgba(255, 255, 255, 0.1) 78%,
            rgba(255, 255, 255, 0) 100%
        );
    }

    .rd-hero__inner {
        padding-block: 48px 44px;
        gap: 32px;
    }

    .rd-hero__eyebrow {
        font-size: 12px;
    }

    .rd-hero__heading {
        max-width: 28rem;
        font-size: clamp(44px, 5.5vw, 52px);
        line-height: 1.04;
    }

    .rd-hero__body {
        font-size: 16px;
        max-width: 34rem;
    }

    .rd-hero__actions {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        gap: 14px;
    }

    .rd-hero__cta-primary {
        width: auto;
        min-width: 200px;
    }

    .rd-hero__cta-secondary.rd-cta--secondary {
        min-height: 52px;
        padding: 0 24px;
        border: 1px solid var(--rd-color-navy, #1A2B4C);
        border-radius: var(--rd-radius-btn, 11px);
        background: transparent;
        color: var(--rd-color-navy, #1A2B4C);
    }

    .rd-hero__cta-secondary.rd-cta--secondary:hover {
        background: rgba(26, 43, 76, 0.05);
        border-color: var(--rd-color-navy, #1A2B4C);
        color: var(--rd-color-navy, #1A2B4C);
    }

    .rd-hero__exam-code {
        font-size: 20px;
    }

    .rd-hero__exam-name {
        font-size: 12px;
    }

    .rd-hero__exam-desc {
        font-size: 13px;
    }

    .rd-hero__exam-card {
        min-height: 118px;
        padding: 16px 14px;
    }
}

@media (min-width: 900px) and (max-width: 1199px) {
    .rd-hero {
        min-height: 520px;
    }

    .rd-hero__inner {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 40px;
        padding-block: 40px;
    }

    .rd-hero__content {
        flex: 1 1 0;
        max-width: 28rem;
    }

    .rd-hero__exams {
        flex: 0 1 440px;
        max-width: 460px;
    }

    .rd-hero__exams-label {
        display: none;
    }
}

/* ==========================================================
   Desktop ≥1200
   ========================================================== */
@media (min-width: 1200px) {
    .rd-hero {
        min-height: 560px;
        height: auto;
        max-height: none;
    }

    .rd-hero__media {
        background-position: 68% center;
    }

    .rd-hero__scrim {
        background: linear-gradient(
            90deg,
            rgba(255, 255, 255, 0.92) 0%,
            rgba(255, 255, 255, 0.82) 28%,
            rgba(255, 255, 255, 0.4) 52%,
            rgba(255, 255, 255, 0.1) 72%,
            rgba(255, 255, 255, 0) 100%
        );
    }

    .rd-hero__inner {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 56px;
        padding-block: 56px;
        min-height: 560px;
    }

    .rd-hero__content {
        flex: 1 1 0;
        max-width: 640px;
    }

    .rd-hero__heading {
        max-width: 680px;
        font-size: 64px;
        line-height: 1.02;
    }

    .rd-hero__body {
        margin-top: 18px;
        max-width: 620px;
        font-size: 17px;
        line-height: 1.6;
        color: var(--rd-text-secondary, #6C757D);
    }

    .rd-hero__cta-primary {
        min-height: 54px;
        padding: 0 30px;
        font-size: 16px;
    }

    .rd-hero__cta-secondary.rd-cta--secondary {
        min-height: 54px;
        padding: 0 26px;
        font-size: 16px;
    }

    .rd-hero__micro {
        font-size: 12px;
    }

    .rd-hero__exams {
        flex: 0 0 520px;
        width: 520px;
        max-width: 520px;
    }

    .rd-hero__exams-label {
        display: none;
    }

    .rd-hero__exams-grid {
        gap: 14px;
    }

    .rd-hero__exam-card {
        min-height: 128px;
        padding: 18px 16px;
        border-radius: 16px;
    }

    .rd-hero__exam-crest {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }

    .rd-hero__exam-code {
        font-size: 22px;
    }

    .rd-hero__exam-name {
        font-size: 13px;
    }

    .rd-hero__exam-desc {
        font-size: 13px;
        margin-top: 6px;
    }
}

@media (min-width: 1440px) {
    .rd-hero__inner {
        gap: 64px;
        min-height: 580px;
    }

    .rd-hero__heading {
        font-size: 70px;
    }

    .rd-hero__body {
        font-size: 18px;
    }

    .rd-hero__exams {
        flex-basis: 540px;
        width: 540px;
        max-width: 540px;
    }
}

@media (min-width: 1600px) {
    .rd-hero__heading {
        font-size: 72px;
    }
}
