/* --------------------------------------------------------------------------
   Site header (lmh-starter-child/header.php)
   --------------------------------------------------------------------------
   Ported from the deploy HTML's .topbar / .header / .nav / .mega / .marquee /
   .mobile-menu rules (herndon-mcfarland-deploy/index.html), renamed to a
   `.site-nav` block per the parent-theme gotcha (never bare `.navbar` —
   parent CSS + Bootstrap both hijack it). Colors/fonts pulled from the
   :root tokens in style.css instead of literal hexes. */

.topbar { background: var(--color-navy2); color:#fff !important; font-size: 12px; }
.topbar .wrap { justify-content: space-between; align-items: center; height: 36px; display: flex; }
.topbar-left { letter-spacing: 0.13em; flex-wrap: wrap; align-items: center; gap: 0; font-weight: 800; display: flex; }
.topbar-left > * { align-items: center; gap: 8px; padding: 0 18px; display: inline-flex; position: relative; }
.topbar-left > * + *::before {
    content: "";
    background: rgba(255, 255, 255, 0.25);
    width: 1px; height: 14px;
    position: absolute; top: 50%; left: 0;
    transform: translateY(-50%);
}
.topbar-left > :first-child { padding-left: 0; }
.topbar-left svg { width: 13px; height: 13px; }
.topbar-right { align-items: center; gap: 12px; font-weight: 800; display: flex; }
.club-btn {
    background: var(--color-gold); color:var(--color-ink) !important;
    letter-spacing: 0.1em; text-transform: uppercase; border-radius: 999px;
    align-items: center; gap: 7px; padding: 5px 14px; font-size: 12px; font-weight: 800;
    transition: transform 0.15s, box-shadow 0.15s; display: inline-flex;
    box-shadow: 0 4px 12px rgba(249, 160, 0, 0.4);
}
.club-btn:hover, .club-btn:focus, .club-btn:active { color: var(--color-ink); transform: translateY(-1px); box-shadow: 0 7px 16px rgba(249, 160, 0, 0.55); }
.club-btn svg { flex-shrink: 0; width: 13px; height: 13px; }
/* Mobile-only topbar call pill (replaces Protection Club under 768px). */
.topbar-call {
    background: var(--color-red); color: #fff !important;
    letter-spacing: 0.1em; text-transform: uppercase; border-radius: 999px;
    align-items: center; gap: 7px; padding: 5px 14px; font-size: 12px; font-weight: 800;
    display: none; box-shadow: 0 4px 12px rgba(248, 27, 38, 0.4);
}
.topbar-call svg { flex-shrink: 0; width: 13px; height: 13px; }

/* Fixed header — overlays page content like the parent's original navbar.
   `.hero` (template-parts/block/hero/hero.css) carries the top offset to clear
   both the topbar + header + marquee stack. */
.site-header {
    position: sticky;
    top: 0;
    z-index: 200;
    border-bottom: 1px solid var(--color-line);
    background: #fff;
    transition: box-shadow 0.25s;
}
.site-header.is-scrolled { box-shadow: 0 6px 24px rgba(9, 65, 124, 0.1); }
.site-header__row { justify-content: space-between; align-items: center; gap: 24px; height: 90px; display: flex; }

.logo { flex-shrink: 0; align-items: center; gap: 13px; display: flex; }
.logo-img { width: auto; height: 54px; display: block; }

/* Desktop menu ------------------------------------------------------------ */
.site-nav__menu {
    letter-spacing: 0.08em; color: var(--color-ink); text-transform: uppercase;
    align-items: center; gap: 28px; font-size: 13px; font-weight: 800;
    display: flex; list-style: none; margin: 0; padding: 0;
}
.site-nav__item { position: static; }
.site-nav__link {
    align-items: center; gap: 6px; padding: 34px 0;
    transition: color 0.15s; display: inline-flex;
}
.site-nav__link:hover, .site-nav__link.is-current { color: var(--color-red); }
.site-nav__caret { width: 12px; height: 12px; transition: transform 0.2s; }
.site-nav__item--mega:hover .site-nav__caret { transform: rotate(180deg); }

/* Mega panel — all columns visible at once (deploy's actual layout is NOT
   tabbed, unlike Clog Busters' mega). */
.mega {
    border: 1px solid var(--color-line);
    opacity: 0; visibility: hidden; pointer-events: none;
    z-index: 300; background: #fff; border-radius: 18px;
    grid-template-columns: repeat(3, 1fr) 1.1fr;
    gap: 22px; width: min(900px, calc(100vw - 48px)); padding: 28px;
    transition: opacity 0.2s 0.35s, transform 0.2s 0.35s, visibility 0s linear 0.55s;
    display: grid; position: absolute; top: 100%; left: 50%;
    transform: translate(-50%) translateY(8px);
    box-shadow: 0 30px 60px rgba(9, 65, 124, 0.22);
}
.site-nav__item--mega:hover .mega {
    opacity: 1; visibility: visible; pointer-events: auto;
    transition: opacity 0.2s, transform 0.2s, visibility;
    transform: translate(-50%) translateY(0);
}
/* Services mega carries six link groups rather than three, so it lays out as a
   3 x 2 block of groups with the promo card as a full-height rail on the right.
   Scoped with :has() so the three-group megas (Service Area, About) are
   untouched and keep their single row. */
.mega:has(.mega__col:nth-of-type(6)) {
    width: min(1040px, calc(100vw - 48px));
    grid-template-columns: repeat(3, 1fr) 1.1fr;
    grid-template-rows: auto auto;
    align-items: start;
    row-gap: 30px;
}
.mega:has(.mega__col:nth-of-type(6)) .mega__col--feature {
    grid-column: 4;
    grid-row: 1 / 3;
    align-self: stretch;
}

.mega__col h5 { letter-spacing: 0.2em; color: var(--color-gold); margin-bottom: 12px; font-size: 12px; }
/* :not(.btn) so the feature card's CTA keeps its own button padding + white
   text (it was inheriting `padding: 7px 0` + ink color → text touched the
   pill edges and read dark on red). */
.mega__col a:not(.btn) {
    color: var(--color-ink); text-transform: none; letter-spacing: 0;
    padding: 7px 0; font-size: 13px; font-weight: 600;
    transition: color 0.15s, padding 0.15s; display: block;
}
.mega__col a:not(.btn):hover { color: var(--color-red); padding-left: 5px; }
.mega__col--feature {
    background: linear-gradient(150deg, var(--color-navy) 0%, var(--color-navy2) 100%);
    color:#fff !important; border-radius: 14px; flex-direction: column;
    justify-content: center; gap: 10px; padding: 22px; display: flex;
}
.mega__col--feature .eyebrow { color: var(--color-gold); }
.mega__col--feature p { color: rgba(255, 255, 255, 0.82); text-transform: none; font-size: 13px; font-weight: 400; line-height: 1.5; }
.mega__col--feature .btn { justify-content: center; margin-top: 6px; width: 100%; padding: 13px 18px 12px; font-size: 12px; letter-spacing: 0.08em; white-space: normal; text-align: center; line-height: 1.3; color: #fff; }

.header-cta {
    background: var(--color-red); color:#fff !important; border-radius: 999px;
    flex-shrink: 0; align-items: center; gap: 12px;
    padding: 11px 26px 11px 22px; transition: transform 0.18s, box-shadow 0.18s;
    display: inline-flex; box-shadow: 0 10px 24px rgba(248, 27, 38, 0.45);
}
.header-cta:hover, .header-cta:focus, .header-cta:active { color: #fff; transform: translateY(-2px); box-shadow: 0 16px 30px rgba(248, 27, 38, 0.55); }
.header-cta svg { flex-shrink: 0; width: 21px; height: 21px; }
.header-cta .btn-line { font-size: 21px; }
.header-cta { padding: 15px 26px 15px 22px; }

.burger {
    cursor: pointer; background: none; border: none;
    flex-direction: column; gap: 5px; display: none;
}
.burger span { background: var(--color-navy2); border-radius: 3px; height: 3px; display: block; }
.burger span:nth-child(1) { width: 24px; }
.burger span:nth-child(2) { width: 18px; }
.burger span:nth-child(3) { width: 24px; }

/* Trust marquee ------------------------------------------------------------ */
.marquee {
    background: var(--color-red); color:#fff !important; white-space: nowrap;
    align-items: center; height: 30px; display: flex; overflow: hidden;
}
.marquee-track {
    letter-spacing: 0.16em; align-items: center; gap: 28px;
    padding-left: 28px; font-size: 13px; font-weight: 600;
    animation: hmc-marquee-scroll 32s linear infinite; display: inline-flex;
}
.marquee-track .dot { background: rgba(255, 255, 255, 0.7); border-radius: 50%; width: 6px; height: 6px; }
@keyframes hmc-marquee-scroll {
    0% { transform: translate(0); }
    100% { transform: translate(-50%); }
}

/* Mobile menu (accordion sheet) -------------------------------------------- */
.mobile-menu {
    background: var(--color-navy); z-index: 500; flex-direction: column;
    padding: 72px 26px 28px; transition: transform 0.3s; display: flex;
    position: fixed; inset: 0; overflow-y: auto; transform: translate(100%);
}
.mobile-menu.is-open { transform: translate(0); }
.mm-close {
    color:#fff !important; cursor: pointer; z-index: 2; background: none; border: none;
    font-size: 34px; line-height: 1; position: absolute; top: 20px; right: 24px;
}
.mm-nav { flex-direction: column; display: flex; }
.mm-group { border-bottom: 1px solid rgba(255, 255, 255, 0.12); }
.mm-top {
    color:#fff !important; width: 100%; font-family: var(--font-display);
    letter-spacing: 0.04em; text-transform: uppercase; cursor: pointer;
    background: none; border: none; justify-content: space-between;
    align-items: center; padding: 15px 0; font-size: 17px; font-weight: 800; display: flex;
}
.mm-top svg { width: 13px; height: 13px; color: var(--color-gold); flex-shrink: 0; transition: transform 0.25s; }
.mm-group.is-open .mm-top svg { transform: rotate(180deg); }
.mm-sub { max-height: 0; transition: max-height 0.3s; overflow: hidden; }
.mm-group.is-open .mm-sub { max-height: 560px; padding-bottom: 8px; }
.mm-sub a { color: rgba(255, 255, 255, 0.82); text-transform: none; letter-spacing: 0; border: none; padding: 9px 0 9px 16px; font-size: 14px; font-weight: 600; display: block; }
.mm-sub a:hover { color: var(--color-gold); }
.mm-link { color: #fff !important; font-family: var(--font-display); letter-spacing: 0.04em; text-transform: uppercase; border-bottom: 1px solid rgba(255, 255, 255, 0.12); padding: 15px 0; font-size: 17px; font-weight: 800; display: block; }
.mm-actions { flex-direction: column; gap: 12px; margin-top: 24px; display: flex; }
.mm-link:hover, .mm-link:focus, .mm-link:active, .mm-top:hover, .mm-top:focus { color: var(--color-gold) !important; }
.mm-actions .btn { justify-content: center; width: 100%; margin: 0; }
/* Long labels ("Join the Herndon McFarland Protection Club") wrap inside the
   pill instead of overflowing the screen edge. */
.mm-actions .btn { white-space: normal; text-align: center; line-height: 1.3; }

@media (max-width: 1024px) {
    .site-nav__menu { display: none !important; }
    .burger { display: flex !important; }
    .topbar-left { display: none !important; }
    .topbar .wrap { justify-content: center !important; }
    .topbar-right { justify-content: center !important; width: 100% !important; margin: 0 !important; }
}

@media (max-width: 768px) {
    .header-cta { display: none !important; }
    .club-btn { display: none !important; }
    .topbar-call { display: inline-flex !important; }
    .site-header__row { gap: 12px; height: 66px !important; }
    .logo-img { height: 44px !important; }
}
