/* ==========================================================
   Website header + mobile drawer (resources/views/partials/site-header)
   Shared by every front-end page: the CMS pages and the signed-in
   calculator / My Quotes / My Account pages, so it looks the same
   everywhere. Colours are scoped here so page styles can't clash.
   ========================================================== */

.site-header,
.drawer {
    --sh-red: #ff0000;
    --sh-text: rgba(0, 0, 0, .81);
    --sh-muted: #6b6b6b;
    --sh-line: rgba(0, 0, 0, .08);
    --sh-light: #f5f5f4;
    --sh-height: 76px;
    --sh-page: 1300px;
    font-family: 'Aptos', 'Inter', Arial, sans-serif;
    line-height: 1.5;
}
.site-header *, .drawer * { box-sizing: border-box; }

/* ── HEADER ────────────────────────────────────────────── */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: #fff;
    border-bottom: 1px solid var(--sh-line);
}
.site-header__inner {
    position: relative;
    max-width: var(--sh-page);
    margin: 0 auto;
    min-height: var(--sh-height);
    padding: 0 24px;
    display: flex;
    align-items: center;
    gap: 24px;
}
.site-logo { display: flex; align-items: center; text-decoration: none; color: #000; flex-shrink: 0; }
.site-logo img { max-height: 50px; width: auto; }
.site-logo span { font-size: 22px; font-weight: 700; letter-spacing: .5px; color: #000; }

.site-nav { flex: 1; display: flex; justify-content: center; }
.site-nav > ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 6px; }
.site-nav > ul > li { position: relative; }
.site-nav > ul > li > a {
    display: flex; align-items: center; gap: 6px;
    padding: 10px 12px;
    font-size: 15px;
    color: var(--sh-text);
    text-decoration: none;
    transition: color .15s;
}
.site-nav > ul > li > a .fa-chevron-down { font-size: 10px; opacity: .6; transition: transform .2s; }
.site-nav > ul > li > a:hover,
.site-nav > ul > li > a.is-current { color: #000; }
.site-nav > ul > li > a.is-current { text-decoration: underline; text-underline-offset: 6px; }
.site-nav__dropdown {
    list-style: none; margin: 0; padding: 10px 0;
    position: absolute; top: 100%; left: 0; z-index: 110;
    min-width: 230px;
    background: #fff;
    border: 1px solid var(--sh-line);
    box-shadow: 0 12px 30px rgba(0,0,0,.08);
    opacity: 0; visibility: hidden; transform: translateY(6px);
    transition: all .18s ease;
}
.site-nav li.has-children:hover .site-nav__dropdown,
.site-nav li.has-children:focus-within .site-nav__dropdown { opacity: 1; visibility: visible; transform: none; }
.site-nav li.has-children:hover > a .fa-chevron-down { transform: rotate(180deg); }
.site-nav__dropdown a {
    display: block; padding: 8px 20px;
    font-size: 14px; color: var(--sh-muted); text-decoration: none;
}
.site-nav__dropdown a:hover { color: #000; background: var(--sh-light); }

/* Account icon + its dropdown (signed in) */
.site-header__actions { margin-left: auto; display: flex; gap: 4px; }
.site-header__icon {
    background: none; border: 0; color: #000; font-size: 20px;
    width: 42px; height: 42px; display: inline-flex; align-items: center; justify-content: center;
    text-decoration: none; cursor: pointer; padding: 0;
}
.site-account { position: relative; }
.site-account__menu {
    position: absolute; top: 100%; right: 0; z-index: 110;
    min-width: 200px; padding: 8px 0;
    background: #fff; border: 1px solid var(--sh-line);
    box-shadow: 0 12px 30px rgba(0,0,0,.08);
    opacity: 0; visibility: hidden; transform: translateY(6px);
    transition: all .18s ease;
}
.site-account:hover .site-account__menu,
.site-account:focus-within .site-account__menu { opacity: 1; visibility: visible; transform: none; }
.site-account__name { padding: 6px 18px 8px; font-size: 12px; color: var(--sh-muted); border-bottom: 1px solid var(--sh-line); margin-bottom: 6px; }
.site-account__menu a {
    display: flex; align-items: center; gap: 10px;
    padding: 8px 18px; font-size: 14px; color: var(--sh-text); text-decoration: none;
}
.site-account__menu a i { width: 16px; text-align: center; color: var(--sh-muted); }
.site-account__menu a:hover, .site-account__menu a.is-current { color: #000; background: var(--sh-light); }

.sh-mobile-only { display: none !important; }
@media (max-width: 991.98px) {
    .sh-mobile-only { display: inline-flex !important; }
    .sh-desktop-only { display: none !important; }
    .site-header__inner { gap: 8px; padding: 0 12px; }
    .site-logo { position: absolute; left: 50%; transform: translateX(-50%); }
    .site-logo img { max-height: 40px; }
}

/* ── MOBILE DRAWER ─────────────────────────────────────── */
.drawer { position: fixed; inset: 0; z-index: 200; visibility: hidden; }
.drawer.is-open { visibility: visible; }
.drawer__backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.4); opacity: 0; transition: opacity .25s; }
.drawer.is-open .drawer__backdrop { opacity: 1; }
.drawer__panel {
    position: absolute; top: 0; left: 0; bottom: 0;
    width: min(360px, 88vw);
    background: #fff; color: #000;
    padding: 64px 24px 24px;
    overflow-y: auto;
    transform: translateX(-100%);
    transition: transform .28s ease;
}
.drawer.is-open .drawer__panel { transform: none; }
.drawer__close { position: absolute; top: 14px; right: 14px; background: none; border: 0; font-size: 22px; color: #000; cursor: pointer; }
.drawer ul { list-style: none; margin: 0; padding: 0; }
.drawer__row { display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--sh-line); }
.drawer__row a { flex: 1; padding: 14px 0; font-size: 20px; color: #000; text-decoration: none; }
.drawer__row a.is-current { color: var(--sh-red); }
.drawer__toggle { background: none; border: 0; width: 44px; height: 44px; font-size: 16px; color: #000; cursor: pointer; }
.drawer__toggle .fa-plus { transition: transform .2s; }
.drawer__toggle[aria-expanded="true"] .fa-plus { transform: rotate(45deg); }
.drawer__children { display: none; padding: 6px 0 12px 12px !important; }
.drawer__children.is-open { display: block; }
.drawer__children a { display: block; padding: 8px 0; color: var(--sh-muted); text-decoration: none; font-size: 16px; }
.drawer__account { margin-top: 18px; padding-top: 6px; }
.drawer__account a { display: flex; align-items: center; gap: 12px; padding: 10px 0; font-size: 16px; color: var(--sh-text); text-decoration: none; }
.drawer__account a i { width: 18px; text-align: center; color: var(--sh-muted); }
body.drawer-open { overflow: hidden; }

/* Printed quotes keep the logo / site name, without the menu and buttons */
@media print {
    .site-header { position: static; }
    .site-nav, .site-header__actions, .sh-mobile-only, .drawer { display: none !important; }
}
