/* ==========================================================================
   Zebra Foundation — Header (Academics-style)
   Light grey top bar + white sticky header, green accent (#51BE78), Mulish font.
   Self-contained; overrides legacy `header` rules from g.css / premium.css.
   ========================================================================== */

:root {
    --zh-green: #51BE78;
    --zh-green-dark: #3FA865;
    --zh-ink: #212529;
    --zh-muted: #6C757D;
    --zh-topbar-bg: #F8F9FA;
    --zh-wrap: 1272px;            /* matches the site's .container content width */
    --zh-main-h: 96px;
    --zh-main-h-stuck: 72px;
}

html { scroll-padding-top: calc(var(--zh-main-h-stuck) + 16px); }

.zf-wrap {
    width: min(100% - 48px, var(--zh-wrap));
    margin: 0 auto;
}

/* ---------- Top bar ---------- */
.zf-topbar {
    position: relative;
    z-index: 1001;
    background: var(--zh-topbar-bg);
    border-bottom: 1px solid #EEF0F2;
    font-family: 'Mulish', 'Muli', sans-serif;
    font-size: 0.875rem;
}

.zf-topbar__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 54px;
}

.zf-topbar__info {
    display: flex;
    align-items: center;
    gap: 28px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.zf-topbar__info a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    color: var(--zh-green);
    text-decoration: none;
    transition: color .2s ease;
}

.zf-topbar__info a:hover { color: var(--zh-green-dark); }
.zf-topbar__info i { font-size: 0.8rem; }

.zf-topbar__actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.zf-topbar__login {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    color: var(--zh-green);
    text-decoration: none;
    transition: color .2s ease;
}

.zf-topbar__login:hover { color: var(--zh-green-dark); }
.zf-topbar__login i { font-size: 0.75rem; }

.zf-topbar__cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 42px;
    padding: 0 24px;
    background: var(--zh-green);
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: background-color .2s ease;
}

.zf-topbar__cta:hover { background: var(--zh-green-dark); color: #fff; }

/* ---------- Main header (reset legacy `header` rules) ---------- */
header.zf-hdr {
    position: relative;
    top: auto;
    left: auto;
    width: 100%;
    z-index: 1000;
    padding: 0;
    background: #fff;
    color: var(--zh-ink);
    border: 0;
    box-shadow: none;
    -webkit-backdrop-filter: none;
            backdrop-filter: none;
    transition: none;
    font-family: 'Mulish', 'Muli', sans-serif;
}

.zf-hdr__zone { height: var(--zh-main-h); }    /* keeps space when header becomes fixed */

.zf-hdr__main {
    position: relative;
    width: 100%;
    background: #fff;
    transition: box-shadow .3s ease;
}

.zf-hdr__inner {
    display: flex;
    align-items: center;
    gap: 40px;
    height: var(--zh-main-h);
    transition: height .3s ease;
}

.zf-hdr__logo {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
}

.zf-hdr__logo img {
    display: block;
    height: 68px;                 /* trimmed logo: no built-in side padding */
    width: auto;
    transition: height .3s ease;
}

.zf-hdr__nav { margin-right: auto; }

.zf-hdr__menu {
    display: flex;
    align-items: center;
    gap: 36px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.zf-hdr__menu a {
    display: block;
    padding: 8px 0;
    color: var(--zh-ink);
    font-size: 1.0625rem;
    font-weight: 400;
    text-decoration: none;
    transition: color .2s ease;
}

.zf-hdr__menu a:hover,
.zf-hdr__menu a[aria-current="page"] { color: var(--zh-green); }

.zf-hdr__social { display: flex; gap: 4px; }

.zf-hdr__social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--zh-green);
    color: #fff;
    font-size: 0.95rem;
    text-decoration: none;
    transition: background-color .2s ease, transform .2s ease;
}

.zf-hdr__social a:hover { background: var(--zh-green-dark); color: #fff; transform: translateY(-2px); }

.zf-hdr__toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    margin-left: auto;
    border: 0;
    background: var(--zh-green);
    color: #fff;
    cursor: pointer;
}

.zf-hdr__toggle-icon {
    position: relative;
    width: 20px;
    height: 14px;
}

.zf-hdr__toggle-icon span {
    position: absolute;
    left: 0;
    width: 100%;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
    transition: transform .3s ease, opacity .2s ease, top .3s ease;
}

.zf-hdr__toggle-icon span:nth-child(1) { top: 0; }
.zf-hdr__toggle-icon span:nth-child(2) { top: 6px; }
.zf-hdr__toggle-icon span:nth-child(3) { top: 12px; }

.zf-hdr.is-open .zf-hdr__toggle-icon span:nth-child(1) { top: 6px; transform: rotate(45deg); }
.zf-hdr.is-open .zf-hdr__toggle-icon span:nth-child(2) { opacity: 0; }
.zf-hdr.is-open .zf-hdr__toggle-icon span:nth-child(3) { top: 6px; transform: rotate(-45deg); }

/* Sticky state once the top bar scrolls away */
.zf-hdr.is-stuck .zf-hdr__main {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    box-shadow: 4px 0 20px -5px rgba(0, 0, 0, 0.2);
    animation: zh-drop .35s ease;
}

.zf-hdr.is-stuck .zf-hdr__inner { height: var(--zh-main-h-stuck); }
.zf-hdr.is-stuck .zf-hdr__logo img { height: 54px; }

@keyframes zh-drop {
    from { transform: translateY(-100%); }
    to   { transform: translateY(0); }
}

.zf-topbar a:focus-visible,
.zf-hdr a:focus-visible,
.zf-hdr button:focus-visible {
    outline: 3px solid rgba(81, 190, 120, 0.45);
    outline-offset: 2px;
}

/* Hero starts below the header (no overlap) */
.hero-slide .hero_container { padding-top: 0; }

/* ---------- Responsive ---------- */
@media (max-width: 1199px) {
    .zf-hdr__menu { gap: 24px; }
    .zf-hdr__inner { gap: 28px; }
}

@media (max-width: 991px) and (min-width: 768px) {
    .zf-topbar__info li:first-child { display: none; }   /* "Have a question?" — keep phone + email on one line */
    .zf-topbar__info { gap: 20px; }
}

@media (max-width: 991px) {
    .zf-hdr__social { display: none; }
    .zf-hdr__toggle { display: inline-flex; }

    .zf-hdr__nav { margin: 0; }

    .zf-hdr__menu {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        max-height: 0;
        overflow: hidden;
        padding: 0 24px;
        background: #fff;
        border-top: 1px solid #EEF0F2;
        box-shadow: 0 18px 30px -16px rgba(0, 0, 0, 0.25);
        visibility: hidden;
        transition: max-height .4s ease, padding .4s ease, visibility 0s linear .4s;
    }

    .zf-hdr.is-open .zf-hdr__menu {
        max-height: 80vh;
        overflow-y: auto;
        padding: 8px 24px 16px;
        visibility: visible;
        transition: max-height .4s ease, padding .4s ease, visibility 0s;
    }

    .zf-hdr__menu li { border-bottom: 1px solid #F1F3F5; }
    .zf-hdr__menu li:last-child { border-bottom: 0; }
    .zf-hdr__menu a { padding: 14px 4px; font-size: 1rem; }
    .zf-hdr__menu a[aria-current="page"] { font-weight: 600; }
}

@media (max-width: 767px) {
    :root { --zh-main-h: 76px; --zh-main-h-stuck: 64px; }
    .zf-wrap { width: min(100% - 32px, var(--zh-wrap)); }
    .zf-topbar__inner { min-height: 48px; }
    .zf-topbar__info { gap: 6px; }
    .zf-topbar__info .zf-topbar__label { display: none; }   /* icon-only on phones */
    .zf-topbar__info a {
        justify-content: center;
        width: 34px;
        height: 34px;
        border-radius: 50%;
        background: rgba(81, 190, 120, 0.12);
    }
    .zf-topbar__info i { font-size: 0.85rem; }
    .zf-topbar__actions { gap: 14px; }
    .zf-topbar__cta { height: 36px; padding: 0 14px; font-size: 0.875rem; }
    .zf-hdr__logo img { height: 54px; }
    .zf-hdr.is-stuck .zf-hdr__logo img { height: 46px; }
    .zf-hdr__menu { padding: 0 16px; }
    .zf-hdr.is-open .zf-hdr__menu { padding: 8px 16px 16px; }
}

@media (max-width: 380px) {
    .zf-topbar__login span { display: none; }
    .zf-topbar__cta i { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    .zf-hdr.is-stuck .zf-hdr__main { animation: none; }
    .zf-hdr__menu, .zf-hdr__toggle-icon span, .zf-hdr__inner, .zf-hdr__logo img { transition: none; }
}

/* ---------- Pages built for the old fixed header: remove the reserved space ---------- */
.breadcrumb-section { margin-top: 0; }
.legal-hero { padding-top: 64px; }
.legal-toc {
    top: calc(var(--zh-main-h-stuck) + 24px);
    max-height: calc(100vh - var(--zh-main-h-stuck) - 48px);
}
.legal-card { scroll-margin-top: calc(var(--zh-main-h-stuck) + 20px); }

@media (max-width: 960px) {
    .legal-hero { padding-top: 40px; }
}