/* Site header: diagonal-split gold bar (Views/Shared/_Layout.cshtml, Views/Shared/Menu.cshtml) */

.fs-header {
    --fs-gold: #FFB700; /* exact logo background color */
    --fs-navy: #1A1F4E;
    --fs-navy2: #2A3175;
    --fs-tint: #FFF5D6;
    --fs-line: #E6E7F0;
    --fs-bar-h: 104px;
    position: -webkit-sticky;
    position: sticky;
    top: 0;
    z-index: 9990;
    font-family: 'Figtree', system-ui, -apple-system, 'Segoe UI', sans-serif;
    color: var(--fs-navy);
}
.fs-header *, .fs-header *:before, .fs-header *:after { box-sizing: border-box; }
.fs-header ul { list-style: none; margin: 0; padding: 0; }
.fs-header a { color: inherit; text-decoration: none !important; }
.fs-header button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; text-align: left; }
.fs-header svg { display: block; flex: none; }
.fs-header a:focus-visible,
.fs-header button:focus-visible {
    outline: 2px solid var(--fs-navy);
    outline-offset: 2px;
    border-radius: 4px;
}
.fs-chev { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s; }
.fs-ic { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- bar ---------- */
.fs-bar {
    display: flex;
    height: var(--fs-bar-h);
    background: var(--fs-gold);
    transition: box-shadow .2s;
}
.fs-header.is-scrolled .fs-bar { box-shadow: 0 6px 24px rgba(26, 31, 78, .18); }

/* gold logo block */
.fs-gb {
    position: relative;
    flex: 0 0 auto;
    min-width: 300px;
    display: flex;
    align-items: center;
    padding: 0 64px 0 40px;
    background: var(--fs-gold);
    clip-path: polygon(0 0, 100% 0, calc(100% - 48px) 100%, 0 100%);
}
.fs-brand { display: flex; align-items: center; gap: 14px; }
.fs-logo { display: block; height: calc(var(--fs-bar-h) - 20px); width: auto; } /* 10px above and below */

.fs-right {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    padding: 0 44px 0 28px;
}

/* utility row */
.fs-r1 {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 22px;
    font-size: 13px;
    font-weight: 600;
    color: rgba(26, 31, 78, .72);
}
.fs-r1 a:hover, .fs-r1 .fs-lk:hover { color: var(--fs-navy); }
.fs-lk { display: flex; align-items: center; gap: 6px; font-weight: 600; white-space: nowrap; }

.fs-dd { position: relative; }
.fs-panel {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    min-width: 220px;
    padding: 8px;
    background: #fff;
    color: var(--fs-navy);
    border-radius: 12px;
    box-shadow: 0 18px 40px -12px rgba(26, 31, 78, .35), 0 0 0 1px rgba(26, 31, 78, .06);
    z-index: 30;
}
.fs-dd:hover > .fs-panel, .fs-dd.is-open > .fs-panel, .fs-dd:focus-within > .fs-panel { display: block; }
.fs-dd:hover > .fs-lk .fs-chev, .fs-dd.is-open > .fs-lk .fs-chev { transform: rotate(180deg); }
.fs-panel a { display: block; padding: 9px 12px; border-radius: 7px; font-size: 14.5px; font-weight: 500; white-space: nowrap; color: var(--fs-navy) !important; }
.fs-panel a:hover { background: var(--fs-tint); }

/* Google Translate, in the utility row */
.fs-r1 #googleContainer {
    position: static;
    float: none;
    margin: 0;
    height: 24px;
    max-height: 24px;
    width: 140px;
    max-width: 140px;
}
.fs-r1 #google_translate_element { position: static; }
.fs-r1 #googleContainer select { color: inherit; font-family: inherit; font-weight: 600; font-size: 13px; }

/* main row */
.fs-r2 { display: flex; justify-content: flex-end; align-items: center; gap: 30px; }

.fs-apply {
    flex: none;
    padding: 12px 24px;
    border: 2px solid var(--fs-navy);
    border-radius: 4px;
    background: var(--fs-navy);
    color: #fff !important;
    font-weight: 800;
    font-size: 14px;
    letter-spacing: .06em;
    text-transform: uppercase;
    white-space: nowrap;
    box-shadow: 0 6px 16px -4px rgba(26, 31, 78, .45);
    transition: background .18s, color .18s, transform .18s, box-shadow .18s;
}
.fs-apply:hover { background: #fff; color: var(--fs-navy) !important; transform: translateY(-1px); box-shadow: 0 10px 22px -6px rgba(26, 31, 78, .5); }

/* menu links (shared) */
.fs-link-row { display: flex; align-items: center; }
.fs-link { display: flex; align-items: center; font-weight: 600; }
.fs-toggle { display: flex; align-items: center; justify-content: center; }
.fs-sub a { display: block; }

.fs-burger, .fs-apply-bar { display: none; }

/* ---------- desktop ---------- */
@media (min-width: 1200px) {
    .fs-menu { display: flex; gap: 28px; }
    .fs-menu > li { position: relative; }
    .fs-menu > li > .fs-link-row { gap: 6px; padding: 4px 0; }
    .fs-menu > li > .fs-link-row > .fs-link { font-size: 15px; white-space: nowrap; }
    .fs-menu > li > .fs-link-row:hover { color: var(--fs-navy2); }
    .fs-menu > li:hover > .fs-link-row .fs-chev,
    .fs-menu > li.is-open > .fs-link-row .fs-chev { transform: rotate(180deg); }

    .fs-sub {
        display: none;
        position: absolute;
        top: 100%;
        right: 0;
        min-width: 220px;
        max-width: 320px;
        padding: 8px;
        background: #fff;
        color: var(--fs-navy);
        border-radius: 12px;
        box-shadow: 0 18px 40px -12px rgba(26, 31, 78, .35), 0 0 0 1px rgba(26, 31, 78, .06);
        z-index: 30;
    }
    .fs-menu > li:hover > .fs-sub,
    .fs-menu > li:focus-within > .fs-sub,
    .fs-menu > li.is-open > .fs-sub,
    .fs-sub > li:hover > .fs-sub,
    .fs-sub > li:focus-within > .fs-sub,
    .fs-sub > li.is-open > .fs-sub { display: block; }
    .fs-sub > li { position: relative; }
    .fs-sub .fs-link-row { justify-content: space-between; border-radius: 7px; }
    .fs-sub a { flex: 1; padding: 9px 12px; font-size: 14.5px; font-weight: 500; line-height: 1.35; }
    .fs-sub > li:hover > .fs-link-row { background: var(--fs-tint); }
    /* third-level items are bare links (no .fs-link-row) */
    .fs-sub > li > a { border-radius: 7px; }
    .fs-sub > li > a:hover, .fs-sub > li > a:focus-visible { background: var(--fs-tint); }
    .fs-sub .fs-toggle { padding: 0 10px; }
    .fs-sub .fs-toggle .fs-chev { transform: rotate(90deg); }

    /* third level flies out to the left (menus are right-aligned) */
    .fs-sub .fs-sub { top: -8px; right: 100%; margin-right: 6px; }
}

/* narrower desktops: campus menus can have 7 items next to a campus name */
@media (min-width: 1200px) and (max-width: 1399.98px) {
    .fs-gb { padding-left: 24px; }
    .fs-right { padding: 0 24px 0 16px; }
    .fs-r2 { gap: 20px; }
    .fs-menu { gap: 18px; }
    .fs-menu > li > .fs-link-row > .fs-link { font-size: 14px; }
    .fs-apply { padding: 9px 14px; }
}

/* ---------- tablet and phone ---------- */
@media (max-width: 1199.98px) {
    .fs-header { --fs-bar-h: 70px; }
    .fs-bar { align-items: center; }
    .fs-gb { height: 70px; min-width: 0; max-width: 66%; padding-left: 16px; clip-path: polygon(0 0, 100% 0, calc(100% - 32px) 100%, 0 100%); padding-right: 48px; }
    .fs-brand { gap: 10px; min-width: 0; }

    .fs-burger {
        display: grid;
        place-items: center;
        width: 44px;
        height: 44px;
        margin: 0 8px 0 4px;
        color: var(--fs-navy);
    }
    .fs-apply-bar {
        display: inline-flex;
        align-items: center;
        flex: none;
        margin-left: auto;
        padding: 9px 14px;
        border-radius: 4px;
        background: var(--fs-navy);
        color: #fff !important;
        font-weight: 800;
        font-size: 12.5px;
        letter-spacing: .06em;
        text-transform: uppercase;
        white-space: nowrap;
        box-shadow: 0 6px 16px -4px rgba(26, 31, 78, .45);
    }
    .fs-apply-bar:hover { background: #fff; color: var(--fs-navy) !important; }
    .fs-burger .fs-i-close { display: none; }
    .fs-nav-open .fs-burger .fs-i-menu { display: none; }
    .fs-nav-open .fs-burger .fs-i-close { display: block; }

    /* the right column becomes the navy drop panel */
    .fs-right {
        display: none;
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        bottom: 0;
        justify-content: flex-start;
        gap: 0;
        padding: 0;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        background: var(--fs-navy);
        color: #fff;
        border-top: 4px solid var(--fs-gold);
        z-index: 41;
    }
    .fs-nav-open .fs-right { display: flex; }
    .fs-r2 { order: 1; flex-direction: column; align-items: stretch; gap: 0; }
    .fs-r1 { order: 2; flex-wrap: wrap; justify-content: center; padding: 20px 20px 24px; color: #BFC4E6; font-size: 14px; }
    .fs-r1 a:hover, .fs-r1 .fs-lk:hover { color: #fff; }
    /* Schools list opens below the row at the menu's full width (centered on the button it ran off the screen) */
    .fs-r1 { position: relative; }
    .fs-r1 .fs-dd { position: static; }
    .fs-r1 .fs-panel { top: calc(100% - 16px); left: 20px; right: 20px; min-width: 0; }
    .fs-r1 .fs-panel a { white-space: normal; }
    .fs-r1 #googleContainer select { color: #BFC4E6; }
    .fs-r1 #googleContainer select option { color: var(--fs-navy); }

    .fs-menu > li { border-bottom: 1px solid rgba(253, 183, 0, .25); }
    .fs-link-row { justify-content: space-between; }
    .fs-link { flex: 1; min-height: 52px; padding: 0 20px; font-weight: 700; font-size: 17px; color: #fff; }
    .fs-toggle { flex: none; width: 56px; min-height: 52px; color: var(--fs-gold); }
    li.is-open > .fs-link-row > .fs-toggle .fs-chev { transform: rotate(180deg); }

    .fs-sub { display: none; padding: 0 20px 12px; }
    li.is-open > .fs-sub { display: block; }
    .fs-sub a { flex: 1; padding: 9px 12px; font-size: 15px; border-radius: 8px; color: #D6D9F0; }
    .fs-sub a:hover { color: #fff; }
    .fs-sub .fs-toggle { min-height: 40px; }
    .fs-sub .fs-sub { padding: 0 0 6px 14px; }
    .fs-sub .fs-sub a { font-size: 14px; }

    /* the bar's own Apply Now (.fs-apply-bar) is always visible here */
    .fs-apply { display: none; }

    html.fs-nav-open, html.fs-nav-open body { overflow: hidden; }
    /* floating buttons (app badges, yearbook) would cover the open menu */
    html.fs-nav-open .fs-floating { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    .fs-header * { transition: none !important; }
}

/* ---------- quick links dock (Views/Shared/Menu.cshtml) ---------- */
.fs-header .fs-dock {
    position: fixed;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 999;
}
.fs-header .fs-dock-toggle { display: none; }
.fs-header .fs-dock-list { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.fs-header .fs-dock-list > li { position: relative; }
/* compact icon tabs; the label slides out on hover/focus */
.fs-header .fs-dock-tab {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 0;
    height: 44px;
    padding: 0 13px 0 14px;
    border-radius: 10px 0 0 10px;
    background: var(--fs-navy) !important;
    color: #fff !important;
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
    box-shadow: 0 4px 14px rgba(26, 31, 78, .22);
    transition: background-color .2s, gap .25s;
}
.fs-header .fs-dock-tab i { width: 18px; font-size: 17px; text-align: center; }
.fs-header .fs-dock-tab span {
    max-width: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-width .25s ease, opacity .2s;
}
.fs-header a.fs-dock-tab:hover,
.fs-header a.fs-dock-tab:focus-visible { gap: 10px; }
.fs-header a.fs-dock-tab:hover span,
.fs-header a.fs-dock-tab:focus-visible span { max-width: 220px; opacity: 1; }
.fs-header .fs-dock-tab:hover,
.fs-header .fs-dock-app.is-open > .fs-dock-tab { background: var(--fs-navy2) !important; }
.fs-header .fs-dock-tab.is-gold { background: var(--fs-gold) !important; color: var(--fs-navy) !important; }
.fs-header .fs-dock-tab.is-gold:hover { background: #FFC633 !important; }

/* app store panel, opens to the left of its tab */
.fs-header .fs-dock-fly {
    position: absolute;
    right: calc(100% + 12px);
    top: 50%;
    width: 230px;
    padding: 16px;
    border-radius: 12px;
    background: #fff;
    color: var(--fs-navy);
    box-shadow: 0 12px 32px rgba(26, 31, 78, .22);
    opacity: 0;
    visibility: hidden;
    transform: translate(8px, -50%);
    transition: opacity .2s, transform .2s, visibility .2s;
}
.fs-header .fs-dock-app.is-open .fs-dock-fly { opacity: 1; visibility: visible; transform: translate(0, -50%); }
.fs-header .fs-dock-fly-t { margin: 0 0 4px; font-size: 15px; font-weight: 800; }
.fs-header .fs-dock-fly-d { margin: 0 0 12px; font-size: 13px; line-height: 1.4; color: #4A4F72; }
.fs-header .fs-dock-badges { display: flex; flex-direction: column; gap: 8px; }
.fs-header .fs-dock-badges img { display: block; width: 135px; height: auto; }

@media (hover: hover) and (min-width: 992px) {
    .fs-header .fs-dock-app:hover .fs-dock-fly { opacity: 1; visibility: visible; transform: translate(0, -50%); }
    /* bridge the gap between tab and panel so the hover isn't lost */
    .fs-header .fs-dock-fly:before { content: ""; position: absolute; top: 0; bottom: 0; left: 100%; width: 12px; }
}

/* tablet/phone: one round button bottom-right (above scroll-to-top) opening a panel */
@media (max-width: 991.98px) {
    .fs-header .fs-dock { top: auto; bottom: 76px; right: 15px; transform: none; }
    .fs-header .fs-dock-toggle {
        display: flex;
        align-items: center;
        gap: 8px;
        height: 48px;
        padding: 0 18px 0 16px;
        border-radius: 999px;
        background: var(--fs-navy);
        color: #fff;
        font-size: 14px;
        font-weight: 700;
        box-shadow: 0 8px 24px rgba(26, 31, 78, .3);
    }
    .fs-header .fs-dock-toggle .fa-xmark,
    .fs-header .fs-dock.is-open .fs-dock-toggle .fa-link { display: none; }
    .fs-header .fs-dock.is-open .fs-dock-toggle .fa-xmark { display: inline-block; }

    .fs-header .fs-dock-list {
        display: none;
        position: absolute;
        right: 0;
        bottom: calc(100% + 10px);
        width: min(300px, calc(100vw - 30px));
        padding: 8px;
        border-radius: 14px;
        background: #fff;
        box-shadow: 0 12px 32px rgba(26, 31, 78, .25);
        align-items: stretch;
        gap: 4px;
    }
    .fs-header .fs-dock.is-open .fs-dock-list { display: flex; }
    .fs-header .fs-dock-tab,
    .fs-header .fs-dock-tab.is-gold {
        flex-direction: row;
        justify-content: flex-start;
        gap: 12px;
        width: 100%;
        min-height: 48px;
        padding: 10px 12px;
        border-radius: 10px;
        background: transparent !important;
        color: var(--fs-navy) !important;
        font-size: 15px;
        text-align: left !important;
        box-shadow: none;
    }
    .fs-header .fs-dock-tab i { width: 24px; font-size: 18px; text-align: center; }
    .fs-header .fs-dock-tab { height: auto; }
    .fs-header .fs-dock-tab span { max-width: none; opacity: 1; }
    .fs-header .fs-dock-tab:hover,
    .fs-header .fs-dock-tab.is-gold:hover,
    .fs-header .fs-dock-app.is-open > .fs-dock-tab { background: var(--fs-tint) !important; transform: none; }
    .fs-header .fs-dock-tab.is-gold i { color: #C98A00; }

    /* app badges always shown inside the panel */
    .fs-header .fs-dock-app > .fs-dock-tab { pointer-events: none; }
    .fs-header .fs-dock-fly,
    .fs-header .fs-dock-app.is-open .fs-dock-fly {
        position: static;
        width: auto;
        padding: 0 12px 8px 48px;
        box-shadow: none;
        opacity: 1;
        visibility: visible;
        transform: none;
    }
    .fs-header .fs-dock-fly-t { display: none; }
    .fs-header .fs-dock-badges { flex-direction: row; }
    .fs-header .fs-dock-badges img { width: 112px; }
}
