/* ==========================================================================
   Site header — shared top bar + sticky navigation (header.php)
   Same palette as the page hero (page-hero.css): navy, deep navy, gold.
   Everything is scoped under .sh / .sh-top so it cannot collide with the
   Bootstrap 3 navbar rules still present in style-v1.css.
   ========================================================================== */

.sh,
.sh-top,
.sh-skip {
    --sh-navy: #243a73;
    --sh-navy-deep: #1a2b57;
    --sh-gold: #faa619;
    --sh-gold-deep: #e08e00;
    --sh-gold-tint: #fff6e5;
    --sh-ink: #1c2541;
    --sh-muted: #586074;
    --sh-line: #e6e3da;
    --sh-tint: #f4f6fb;
    --sh-radius: 10px;
    --sh-serif: "Noto Serif", Georgia, "Times New Roman", serif;
    --sh-sans: "Open Sans", "Segoe UI", Arial, sans-serif;
    --sh-bar-h: 76px;
}

.sh *,
.sh *::before,
.sh *::after,
.sh-top *,
.sh-top *::before,
.sh-top *::after {
    box-sizing: border-box;
}

.sh :focus-visible,
.sh-top :focus-visible,
.sh-skip:focus-visible {
    outline: 3px solid var(--sh-gold);
    outline-offset: 2px;
}

.sh ul,
.sh-top ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

/* style-v1.css clips li.active on small screens, which would cut off submenus */
.sh li.active {
    overflow: visible;
}

/* --------------------------------------------------------------------------
   Skip link
   -------------------------------------------------------------------------- */

.sh-skip {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 1100;
    padding: 10px 16px;
    font: 600 14px/1.2 var(--sh-sans);
    color: var(--sh-navy);
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(28, 37, 65, .2);
    transform: translateY(-160%);
    transition: transform .2s ease;
}

.sh-skip:focus {
    color: var(--sh-navy);
    text-decoration: none;
    transform: none;
}

/* --------------------------------------------------------------------------
   Top bar
   -------------------------------------------------------------------------- */

.sh-top {
    font-family: var(--sh-sans);
    font-size: 13px;
    line-height: 1.4;
    color: rgba(255, 255, 255, .78);
    background: var(--sh-navy-deep);
}

.sh-top__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 40px;
}

.sh-top__note {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    font-size: 13px;
    line-height: 1.4;
    color: rgba(255, 255, 255, .78);
}

.sh-top__note .fa {
    color: var(--sh-gold);
}

.sh-top__links {
    display: flex;
    align-items: center;
    gap: 4px;
}

.sh-top__links a {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 32px;
    padding: 4px 8px;
    color: #fff;
    text-decoration: none;
    white-space: nowrap;
    border-radius: 6px;
    transition: background-color .2s ease, color .2s ease;
}

.sh-top__links a:hover,
.sh-top__links a:focus {
    color: var(--sh-gold);
    text-decoration: none;
    background: rgba(255, 255, 255, .06);
}

.sh-top__links .fa {
    font-size: 14px;
    color: var(--sh-gold);
}

.sh-top__links a:hover .fa,
.sh-top__links a:focus .fa {
    color: inherit;
}

.sh-top__sep {
    width: 1px;
    height: 16px;
    margin: 0 6px;
    background: rgba(255, 255, 255, .2);
}

.sh-top__social a {
    justify-content: center;
    width: 32px;
    padding: 4px;
}

.sh-top__social .fa {
    color: rgba(255, 255, 255, .85);
}

/* --------------------------------------------------------------------------
   Main bar (sticky)
   -------------------------------------------------------------------------- */

.sh {
    position: -webkit-sticky;
    position: sticky;
    top: 0;
    z-index: 1000;
    font-family: var(--sh-sans);
    line-height: 1.4;
    background: rgba(255, 255, 255, .97);
    border-bottom: 1px solid var(--sh-line);
    transition: box-shadow .25s ease, background-color .25s ease;
}

@supports ((-webkit-backdrop-filter: blur(8px)) or (backdrop-filter: blur(8px))) {
    .sh {
        background: rgba(255, 255, 255, .9);
        -webkit-backdrop-filter: saturate(160%) blur(10px);
        backdrop-filter: saturate(160%) blur(10px);
    }
}

/* Gold hairline along the very top of the bar */
.sh::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--sh-gold) 0%, #ffc85c 50%, var(--sh-gold) 100%);
}

.sh.is-scrolled {
    box-shadow: 0 6px 24px rgba(28, 37, 65, .1);
}

.sh__inner {
    display: flex;
    align-items: center;
    gap: 24px;
    min-height: var(--sh-bar-h);
    padding-top: 3px;
}

/* --------------------------------------------------------------------------
   Brand
   -------------------------------------------------------------------------- */

.sh-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
    margin-right: auto;
    text-decoration: none;
}

.sh-brand:hover,
.sh-brand:focus {
    text-decoration: none;
}

.sh-brand img {
    display: block;
    width: auto;
    height: 50px;
    transition: transform .3s ease;
}

.sh-brand:hover img {
    transform: scale(1.04);
}

.sh-brand__text {
    display: flex;
    flex-direction: column;
    padding-left: 12px;
    border-left: 1px solid var(--sh-line);
}

.sh-brand__name {
    font-family: var(--sh-serif);
    font-size: 20px;
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -.01em;
    color: var(--sh-navy);
}

.sh-brand__tag {
    margin-top: 3px;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--sh-muted);
}

/* --------------------------------------------------------------------------
   Menu toggle (below 1280px)
   -------------------------------------------------------------------------- */

.sh-toggle {
    display: none;
    align-items: center;
    gap: 10px;
    height: 44px;
    padding: 0 14px;
    font: 600 14px/1 var(--sh-sans);
    color: var(--sh-navy);
    background: var(--sh-tint);
    border: 1px solid transparent;
    border-radius: var(--sh-radius) !important;
    cursor: pointer;
    transition: background-color .2s ease, border-color .2s ease;
}

.sh-toggle:hover {
    background: #e9edf7;
}

.sh-toggle__icon {
    position: relative;
    width: 20px;
    height: 14px;
}

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

.sh-toggle__icon span:nth-child(1) { top: 0; }
.sh-toggle__icon span:nth-child(2) { top: 6px; }
.sh-toggle__icon span:nth-child(3) { top: 12px; }

.sh-toggle[aria-expanded="true"] .sh-toggle__icon span:nth-child(1) {
    top: 6px;
    transform: rotate(45deg);
}

.sh-toggle[aria-expanded="true"] .sh-toggle__icon span:nth-child(2) {
    opacity: 0;
}

.sh-toggle[aria-expanded="true"] .sh-toggle__icon span:nth-child(3) {
    top: 6px;
    transform: rotate(-45deg);
}

/* --------------------------------------------------------------------------
   Navigation
   -------------------------------------------------------------------------- */

.sh-nav {
    display: flex;
    align-items: center;
    gap: 20px;
}

.sh-menu {
    display: flex;
    align-items: center;
    gap: 2px;
}

.sh-menu > li {
    position: relative;
}

.sh .sh-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 44px;
    padding: 0 12px;
    font-family: var(--sh-sans);
    font-size: 14.5px;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
    color: var(--sh-ink);
    text-decoration: none;
    text-transform: none;
    background: none;
    border: 0;
    border-radius: 8px !important;
    cursor: pointer;
    transition: color .2s ease, background-color .2s ease;
}

.sh .sh-link:hover,
.sh .sh-link:focus {
    color: var(--sh-navy);
    text-decoration: none;
    background: var(--sh-tint);
}

/* Gold underline marks the current section */
.sh .sh-link::after {
    content: "";
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 6px;
    height: 2px;
    background: var(--sh-gold);
    border-radius: 2px;
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform .25s ease;
}

.sh .is-active > .sh-link {
    color: var(--sh-navy);
}

.sh .is-active > .sh-link::after {
    transform: scaleX(1);
}

.sh-caret {
    font-size: 11px;
    color: var(--sh-muted);
    transition: transform .25s ease;
}

.sh-link[aria-expanded="true"] .sh-caret {
    transform: rotate(180deg);
}

/* Submenu */
.sh-sub {
    min-width: 250px;
    padding: 8px !important;
    background: #fff;
    border: 1px solid var(--sh-line);
    border-radius: 12px;
    box-shadow: 0 18px 40px rgba(28, 37, 65, .14), 0 2px 6px rgba(28, 37, 65, .06);
}

.sh-sub a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.35;
    color: var(--sh-ink);
    text-decoration: none;
    border-radius: 8px;
    transition: background-color .15s ease, color .15s ease;
}

.sh-sub a::before {
    content: "";
    flex-shrink: 0;
    width: 6px;
    height: 6px;
    background: var(--sh-line);
    border-radius: 50%;
    transition: background-color .15s ease;
}

.sh-sub a:hover,
.sh-sub a:focus {
    color: var(--sh-navy);
    text-decoration: none;
    background: var(--sh-tint);
}

.sh-sub a:hover::before,
.sh-sub a:focus::before {
    background: var(--sh-navy);
}

.sh-sub li.active > a {
    color: var(--sh-navy);
    background: var(--sh-gold-tint);
}

.sh-sub li.active > a::before {
    background: var(--sh-gold);
}

.sh-sub__divider {
    height: 1px;
    margin: 6px 12px;
    background: var(--sh-line);
}

/* Actions */
.sh-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.sh .sh-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 18px;
    font-family: var(--sh-sans);
    font-size: 14.5px;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
    text-decoration: none;
    border: 2px solid transparent;
    border-radius: 999px;
    transition: background-color .2s ease, color .2s ease, border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.sh .sh-btn:hover,
.sh .sh-btn:focus {
    text-decoration: none;
}

.sh .sh-btn:active {
    transform: translateY(1px);
}

.sh .sh-btn--ghost {
    color: var(--sh-navy);
    border-color: rgba(36, 58, 115, .22);
}

.sh .sh-btn--ghost .fa {
    color: #d94f4f;
}

.sh .sh-btn--ghost:hover,
.sh .sh-btn--ghost:focus,
.sh .sh-btn--ghost.is-active {
    color: var(--sh-navy);
    background: var(--sh-tint);
    border-color: var(--sh-navy);
}

.sh .sh-btn--primary {
    color: var(--sh-navy-deep);
    background: var(--sh-gold);
    box-shadow: 0 4px 14px rgba(250, 166, 25, .35);
}

.sh .sh-btn--primary:hover,
.sh .sh-btn--primary:focus,
.sh .sh-btn--primary.is-active {
    color: #fff;
    background: var(--sh-navy);
    box-shadow: 0 6px 18px rgba(36, 58, 115, .3);
}

.sh .sh-btn--primary .fa {
    transition: transform .2s ease;
}

.sh .sh-btn--primary:hover .fa {
    transform: translateX(3px);
}

/* --------------------------------------------------------------------------
   Desktop (1280px and up): inline menu with floating submenus
   -------------------------------------------------------------------------- */

@media (min-width: 1280px) {
    /* Wider than Bootstrap's 1170px container so the full menu fits on one line */
    .sh .sh__inner,
    .sh-top .sh-top__inner {
        width: auto;
        max-width: 1340px;
    }

    .sh-sub {
        position: absolute;
        top: calc(100% + 10px);
        left: 50%;
        z-index: 10;
        visibility: hidden;
        opacity: 0;
        transform: translate(-50%, 8px);
        transition: opacity .2s ease, transform .2s ease, visibility 0s linear .2s;
    }

    /* Invisible bridge so the pointer can travel from the link into the panel */
    .sh-sub::before {
        content: "";
        position: absolute;
        top: -12px;
        left: 0;
        right: 0;
        height: 12px;
    }

    .sh-link[aria-expanded="true"] + .sh-sub {
        visibility: visible;
        opacity: 1;
        transform: translate(-50%, 0);
        transition: opacity .2s ease, transform .2s ease, visibility 0s;
    }

    @media (hover: hover) {
        .sh-menu > li:hover > .sh-sub {
            visibility: visible;
            opacity: 1;
            transform: translate(-50%, 0);
            transition: opacity .2s ease, transform .2s ease, visibility 0s;
        }

        .sh-menu > li:hover > .sh-link .sh-caret {
            transform: rotate(180deg);
        }
    }
}

/* Slightly tighter spacing on narrower desktops */
@media (min-width: 1280px) and (max-width: 1399px) {
    .sh__inner {
        gap: 16px;
    }

    .sh-nav {
        gap: 12px;
    }

    .sh .sh-link {
        padding: 0 10px;
    }

    .sh .sh-link::after {
        left: 10px;
        right: 10px;
    }

    .sh .sh-btn {
        padding: 0 15px;
    }
}

/* --------------------------------------------------------------------------
   Below 1280px: menu becomes a drop-down panel with accordion submenus
   -------------------------------------------------------------------------- */

@media (max-width: 1279px) {
    .sh {
        --sh-bar-h: 68px;
    }

    .sh-toggle {
        display: inline-flex;
    }

    .sh-brand img {
        height: 44px;
    }

    .sh-nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        max-height: calc(100vh - var(--sh-bar-h));
        max-height: calc(100dvh - var(--sh-bar-h));
        overflow-y: auto;
        overscroll-behavior: contain;
        background: #fff;
        border-top: 1px solid var(--sh-line);
        box-shadow: 0 24px 40px rgba(28, 37, 65, .16);
    }

    .sh.is-open .sh-nav {
        display: flex;
        animation: sh-drop .22s ease;
    }

    .sh-menu {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        width: 100%;
        max-width: 750px;
        margin: 0 auto !important;
        padding: 10px 15px !important;
    }

    .sh-menu > li + li {
        border-top: 1px solid #f0eee8;
    }

    .sh .sh-link {
        justify-content: space-between;
        width: 100%;
        min-height: 52px;
        padding: 0 8px;
        font-size: 16px;
        border-radius: 8px !important;
    }

    .sh .sh-link::after {
        top: 14px;
        bottom: 14px;
        left: -6px;
        right: auto;
        width: 3px;
        height: auto;
        transform: scaleY(0);
    }

    .sh .is-active > .sh-link::after {
        transform: scaleY(1);
    }

    .sh-caret {
        font-size: 16px;
    }

    .sh-sub {
        display: none;
        min-width: 0;
        margin: 0 0 10px !important;
        padding: 6px !important;
        background: var(--sh-tint);
        border: 0;
        border-radius: 10px;
        box-shadow: none;
    }

    .sh-link[aria-expanded="true"] + .sh-sub {
        display: block;
    }

    .sh-sub a {
        min-height: 44px;
        font-size: 15px;
    }

    .sh-sub li.active > a {
        background: #fff;
    }

    .sh-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
        width: 100%;
        max-width: 750px;
        margin: 0 auto;
        padding: 6px 15px 20px;
    }

    .sh .sh-btn {
        min-height: 50px;
        font-size: 15px;
    }
}

@media (max-width: 991px) {
    .sh-top__note {
        display: none;
    }

    .sh-top__inner {
        justify-content: center;
    }
}

@media (max-width: 767px) {

    .sh-top__label {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
        white-space: nowrap;
    }

    .sh-top__links .sh-top__phone .sh-top__label {
        position: static;
        width: auto;
        height: auto;
        overflow: visible;
        clip: auto;
    }
}

@media (max-width: 479px) {
    .sh__inner {
        gap: 12px;
    }

    .sh-brand {
        gap: 10px;
    }

    .sh-brand img {
        height: 40px;
    }

    .sh-brand__text {
        padding-left: 10px;
    }

    .sh-brand__name {
        font-size: 17px;
    }

    .sh-brand__tag {
        font-size: 9.5px;
        letter-spacing: .1em;
    }

    .sh-toggle {
        width: 44px;
        padding: 0;
        justify-content: center;
    }

    .sh-toggle__label {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
        white-space: nowrap;
    }

    .sh-actions {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 359px) {
    .sh-brand__tag {
        display: none;
    }
}

@keyframes sh-drop {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .sh *,
    .sh *::before,
    .sh *::after,
    .sh-skip {
        animation: none !important;
        transition: none !important;
    }
}
