/* Site header (menu.php, javascript/header.js).
   Loaded after the theme's stylesheets. Uses its own class names, so none of
   the theme's header rules apply to it.

   Layout contract with the rest of the theme: the header is absolutely
   positioned over the top of the page, as the theme's was, and the slider and
   page titles already leave room for it. */

.site-header {
    /* The theme's own slate-violet — page titles, banners, dark sections. */
    --sh-navy: #434e6e;
    --sh-navy-hover: #363f5a;
    --sh-gold: #e3cca1;
    --sh-gold-hover: #d9bd88;
    --sh-gold-deep: #b8955a;
    --sh-ink: #1c2433;
    --sh-line: #e7e9ef;
    --sh-in: 1200px;

    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    margin: 0;
    font-family: "Rubik", system-ui, -apple-system, "Segoe UI", sans-serif;
}

.site-header a { text-decoration: none; }

.sh-in {
    max-width: var(--sh-in);
    margin: 0 auto;
    padding: 0 15px;
    display: flex;
    align-items: center;
}

.sh-ic {
    width: 16px;
    height: 16px;
    flex: none;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* The theme sizes and pads #header at several breakpoints (height 150px,
   50px top padding on phones). None of that applies to this header. */
#header.site-header { height: auto; padding: 0; top: 0; }

/* ---------- top bar ---------- */
.sh-top {
    background: var(--sh-navy);
    color: rgba(255, 255, 255, 0.86);
    font-size: 14px;
    line-height: 1;
}
.sh-top .sh-in { height: 44px; gap: 0; }
.sh-top__item,
.sh-top__trust {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: inherit;
    white-space: nowrap;
    transition: color 0.15s ease-out;
}
.sh-top .sh-ic { color: var(--sh-gold); }
.sh-top__item:hover { color: #fff; }
/* Thin dividers between the groups, not around them. */
.sh-top__item + .sh-top__item,
.sh-top__trust + .sh-social {
    margin-left: 22px;
    padding-left: 22px;
    border-left: 1px solid rgba(255, 255, 255, 0.18);
    height: 18px;
}
.sh-top__trust { margin-left: auto; color: rgba(255, 255, 255, 0.78); font-size: 13px; letter-spacing: 0.02em; }

.sh-social { display: flex; align-items: center; gap: 12px; }
.sh-top__trust + .sh-social { height: auto; padding-top: 2px; padding-bottom: 2px; }
.sh-social__label {
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.62);
}
.sh-social__btn {
    position: relative;
    display: inline-grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    transition: background-color 0.2s ease-out, color 0.2s ease-out, transform 0.2s ease-out;
}
/* 44px tap target around the 30px circle. */
.sh-social__btn::before { content: ""; position: absolute; inset: -7px; }
.sh-social__btn svg { width: 15px; height: 15px; fill: currentColor; }
.sh-social__btn:hover {
    background: var(--sh-gold);
    color: var(--sh-navy);
    transform: translateY(-1px);
}

/* ---------- main bar ---------- */
.sh-main {
    background: #fff;
    border-bottom: 1px solid var(--sh-line);
}
.sh-main .sh-in { height: 88px; gap: 40px; }

.sh-logo { flex: none; display: block; }
.sh-logo img { display: block; height: 62px; width: auto; }

.sh-nav { margin-left: auto; }
.sh-nav ul {
    display: flex;
    gap: 34px;
    margin: 0;
    padding: 0;
    list-style: none;
}
.sh-nav li { margin: 0; padding: 0; }
.sh-nav li::before { display: none; }
.sh-nav ul a {
    position: relative;
    display: block;
    padding: 10px 0;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.2;
    color: var(--sh-ink);
    transition: color 0.15s ease-out;
}
.sh-nav ul a::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 2px;
    height: 2px;
    border-radius: 2px;
    background: var(--sh-gold-deep);
    transform: scaleX(0);
    transition: transform 0.2s ease-out;
}
.sh-nav ul a:hover { color: var(--sh-navy); }
.sh-nav ul a:hover::after,
.sh-nav ul a.is-active::after { transform: scaleX(1); }
.sh-nav ul a.is-active { color: var(--sh-navy); }
.sh-nav .sh-nav__cta { display: none; }
.sh-nav__social {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 18px;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #6b7286;
}
.sh-nav__social .sh-social__btn { width: 36px; height: 36px; background: #eef0f5; color: var(--sh-navy); }
.sh-nav__social .sh-social__btn svg { width: 17px; height: 17px; }
.sh-nav__social .sh-social__btn:hover { background: var(--sh-gold); }

.sh-actions { display: flex; align-items: center; gap: 12px; flex: none; }

.sh-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    height: 48px;
    padding: 0 22px;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    line-height: 1;
    letter-spacing: 0.02em;
    white-space: nowrap;
    transition: background-color 0.15s ease-out, transform 0.1s ease-out;
}
.sh-btn:active { transform: scale(0.97); }
.sh-btn--navy { background: var(--sh-navy); color: #fff; }
.sh-btn--navy:hover { background: var(--sh-navy-hover); color: #fff; }
.sh-btn--gold { background: var(--sh-gold); color: var(--sh-navy); }
.sh-btn--gold:hover { background: var(--sh-gold-hover); color: var(--sh-navy); }

.site-header a:focus-visible,
.sh-burger:focus-visible {
    outline: 3px solid var(--sh-gold-deep);
    outline-offset: 3px;
    border-radius: 4px;
}

.sh-burger {
    display: none;
    width: 48px;
    height: 48px;
    padding: 0 12px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    cursor: pointer;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    -webkit-tap-highlight-color: transparent;
}
.sh-burger span {
    display: block;
    height: 2px;
    border-radius: 2px;
    background: var(--sh-navy);
    transition: transform 0.2s ease-out, opacity 0.15s ease-out;
}
.sh-burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.sh-burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.sh-burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- room for the header ----------
   The home slider (.page-title) and the inner pages' heading (.page-head)
   start under the header via padding-top. --sh-h is the header's height at
   each breakpoint; the theme's own values were sized for its much taller
   header — up to 260px on phones. */
:root { --sh-h: 133px; }
.page-title { padding-top: var(--sh-h); }

/* ---------- inner page heading (page_title.php) ----------
   Replaces the theme's 330px title band, which held only the page name
   twice. Breadcrumb, title and one useful line, aligned with the content. */
.page-head {
    position: relative;
    overflow: hidden;
    margin: 0;
    padding: calc(var(--sh-h) + 36px) 0 40px;
    background: #434e6e;
    color: #fff;
    font-family: "Rubik", system-ui, sans-serif;
}
/* The diagonal stripes from the home banner, faded in from the right. */
.page-head::after {
    content: "";
    position: absolute;
    top: var(--sh-h);
    right: 0;
    bottom: 0;
    width: 42%;
    background: repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.07) 0 2px, transparent 2px 26px);
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 70%);
    mask-image: linear-gradient(90deg, transparent, #000 70%);
    pointer-events: none;
}
.page-head__in {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}
.page-head__crumbs {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    line-height: 20px;
    color: rgba(255, 255, 255, 0.72);
}
.page-head__crumbs a { color: inherit; text-decoration: none; transition: color 0.15s ease-out; }
.page-head__crumbs a:hover { color: #e3cca1; }
.page-head__crumbs svg {
    width: 14px;
    height: 14px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.page-head__crumbs [aria-current] { color: #e3cca1; }
.page-head h1 {
    margin: 10px 0 0;
    font-family: "Rajdhani", "Rubik", sans-serif;
    font-size: 46px;
    line-height: 1.05;
    font-weight: 700;
    letter-spacing: 0.01em;
    color: #fff;
}
.page-head__lead {
    max-width: 720px;
    margin: 12px 0 0;
    font-size: 17px;
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.86);
}
.page-head__lead a { color: #e3cca1; text-decoration: underline; text-underline-offset: 3px; }
.page-head__lead a:hover { color: #fff; }
.page-head a:focus-visible { outline: 3px solid #e3cca1; outline-offset: 2px; border-radius: 3px; }

/* ---------- compact sticky state (set by header.js on scroll) ---------- */
.site-header.is-stuck {
    position: fixed;
    animation: sh-drop 0.25s ease-out;
}
.site-header.is-stuck .sh-top { display: none; }
.site-header.is-stuck .sh-main { box-shadow: 0 4px 20px rgba(20, 30, 50, 0.12); border-bottom: 0; }
.site-header.is-stuck .sh-main .sh-in { height: 68px; }
.site-header.is-stuck .sh-logo img { height: 46px; }
.site-header.is-stuck .sh-btn { height: 42px; }
@keyframes sh-drop { from { transform: translateY(-100%); } to { transform: none; } }

/* ---------- narrower desktops: phone button shows the icon only ---------- */
@media (max-width: 1199px) {
    .sh-top__trust { display: none; }
    .sh-top__trust + .sh-social { margin-left: auto; padding-left: 0; border-left: 0; }
    .sh-main .sh-in { gap: 28px; }
    .sh-nav ul { gap: 24px; }
    .sh-call { width: 48px; padding: 0; }
    .sh-call__num { display: none; }
}

/* ---------- tablet & phone: menu collapses behind the burger ---------- */
@media (max-width: 991px) {
    .sh-main .sh-in { height: 76px; gap: 12px; }
    .sh-logo img { height: 52px; }
    .sh-actions { margin-left: auto; }
    .sh-burger { display: inline-flex; }

    .sh-nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        margin: 0;
        padding: 8px 15px 20px;
        background: #fff;
        border-top: 1px solid var(--sh-line);
        box-shadow: 0 16px 30px rgba(20, 30, 50, 0.16);
        display: none;
    }
    .sh-nav.is-open { display: block; }
    .sh-nav ul { flex-direction: column; gap: 0; }
    .sh-nav ul a {
        padding: 14px 4px;
        font-size: 17px;
        border-bottom: 1px solid var(--sh-line);
    }
    .sh-nav ul a::after { display: none; }
    .sh-nav ul a.is-active { color: var(--sh-gold-deep); }
    .sh-nav .sh-nav__cta { display: flex; width: 100%; margin-top: 16px; }
    .sh-nav .sh-nav__social { display: flex; }

    :root { --sh-h: 121px; }
    .page-head { padding: calc(var(--sh-h) + 28px) 0 32px; }
    .page-head h1 { font-size: 40px; }

    .site-header.is-stuck .sh-main .sh-in { height: 64px; }
    .site-header.is-stuck .sh-logo img { height: 42px; }
}

@media (max-width: 767px) {
    .sh-top { display: none; }
    .sh-quote { display: none; }
    .sh-main .sh-in { height: 68px; }
    .sh-logo img { height: 46px; }

    :root { --sh-h: 69px; }
    .page-head { padding: calc(var(--sh-h) + 22px) 0 26px; }
    .page-head::after { width: 60%; }
    .page-head h1 { font-size: 34px; margin-top: 8px; }
    .page-head__lead { font-size: 15px; margin-top: 8px; }
}

@media (prefers-reduced-motion: reduce) {
    .site-header *,
    .site-header.is-stuck { transition: none !important; animation: none !important; }
}
