/* Shared header rules for every page that uses the main site nav
   (homepage, case studies, call library, call review, resources, fractional blueprint, blog).
   Each page keeps its own nav background and logo; this file owns everything else about the header:
   text size, the proof buttons, the booking button, which items drop out as the screen narrows,
   the active-page highlight, and the ☰ menu. Load it after the page's own <style> blocks so it wins.
   Selectors start with "nav" so they beat each page's own nav rules without !important wars. */

/* ── Sizes, in one place ── */
/* Header buttons (Case Studies, Hear Real Calls, phone, Book) are all 44px tall. */

/* ── Text links: 16px, medium weight, full white (was 13px at 72% white). ── */
nav .nav-links { gap: 16px; }
nav .nav-links > li > a, nav .nav-links .dropdown-trigger {
  font-size: 16px; font-weight: 500; color: #fff; white-space: nowrap; line-height: 1.2;
}
nav .nav-links .dropdown-trigger { color: #F1C96B !important; padding: 0 6px; }

/* ── Proof buttons: Case Studies (white outline) and Hear Real Calls (gold outline, play icon). ── */
nav .nav-links > li > a.nav-btn {
  display: inline-flex; align-items: center; gap: 9px; height: 44px; padding: 0 18px;
  border: 1.5px solid rgba(255,255,255,0.55); border-radius: 8px; background: rgba(255,255,255,0.04);
  color: #fff !important; font-weight: 600; text-decoration: none;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s, transform 0.2s;
}
nav .nav-links > li > a.nav-btn:hover { border-color: #fff; background: rgba(255,255,255,0.1); transform: translateY(-1px); }
nav .nav-links > li > a.nav-btn-hear { border-color: #F1C96B; color: #F1C96B !important; background: rgba(241,201,107,0.08); }
nav .nav-links > li > a.nav-btn-hear:hover { border-color: #F1C96B; background: rgba(241,201,107,0.16); box-shadow: 0 0 22px rgba(241,201,107,0.35); }
nav .nav-btn svg { width: 14px; height: 14px; flex-shrink: 0; }

/* ── Phone and booking buttons ── */
nav .nav-links > li > a.nav-phone-btn {
  display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 16px;
  border: 1px solid rgba(255,255,255,0.35); border-radius: 8px; color: #fff !important;
  font-size: 15px; font-weight: 500; text-decoration: none; transition: border-color 0.2s, box-shadow 0.2s;
}
nav .nav-links > li > a.nav-phone-btn:hover { border-color: #B8860B; box-shadow: 0 0 18px rgba(184,134,11,0.3); }
nav .nav-phone-btn svg { width: 14px; height: 14px; }
/* inline-block, not flex: flex would drop the spaces around the "Discovery " span. */
nav .nav-links > li > a.btn-nav {
  display: inline-block; height: 44px; line-height: 44px; padding: 0 22px; border-radius: 8px;
  background: #B8860B; color: #071428 !important; font-size: 16px; font-weight: 600 !important;
  text-decoration: none; transition: box-shadow 0.3s, transform 0.2s;
}
nav .nav-links > li > a.btn-nav:hover { box-shadow: 0 0 24px rgba(241,201,107,0.55); transform: translateY(-1px); }

/* ── Current page: its button or link is filled/gold. ── */
nav .nav-links > li > a.nav-btn[aria-current="page"] { background: rgba(255,255,255,0.16); border-color: #fff; }
nav .nav-links > li > a.nav-btn-hear[aria-current="page"] { background: rgba(241,201,107,0.22); border-color: #F1C96B; }
.dropdown-menu a[aria-current="page"] { color: #F1C96B; }

/* ── Resources dropdown also opens on keyboard focus and on tap (site-nav.js adds .open). ── */
.nav-dropdown:focus-within .dropdown-menu,
.nav-dropdown.open .dropdown-menu { display: block; }
.dropdown-menu a { font-size: 14px; }
.drop-dot { width: 6px; height: 6px; border-radius: 50%; background: #B8860B; box-shadow: 0 0 8px rgba(241,201,107,0.8); flex-shrink: 0; }

/* ── Nav fit: every item stays on one line. As the screen narrows we drop
      the lowest-priority items instead of letting labels wrap. ── */
@media (max-width: 1359px) {
  /* The floating call pill still shows the phone number, so the nav copy goes first. */
  body:has(.call-pill) nav .nav-links > li:has(> .nav-phone-btn) { display: none; }
}
@media (max-width: 1240px) {
  /* Pages without the call pill: the number moves into the ☰ menu. */
  nav .nav-links > li:has(> .nav-phone-btn) { display: none; }
  .nav-logo img { height: 30px !important; }
}
@media (max-width: 1100px) {
  nav .nav-links { gap: 12px; }
  nav .nav-links > li > a, nav .nav-links .dropdown-trigger { font-size: 15px; }
  nav .nav-links > li > a.nav-btn { padding: 0 14px; }
  nav .nav-links > li > a.btn-nav { padding: 0 18px; }
  .nav-logo img { height: 26px !important; }
}

/* ── ☰ menu: from 980px down, Case Studies and Resources move into it.
      Hear Real Calls stays in the bar down to 701px; Book stays at every width. ── */
.nav-toggle { display: none; }
.mobile-menu { display: none; }

@media (max-width: 980px) {
  nav .nav-links { display: flex !important; margin-left: auto; }
  nav .nav-links > li { display: none !important; }
  nav .nav-links > li.nav-hear, nav .nav-links > li:last-child { display: block !important; }
  .nav-inner { gap: 10px; }

  .nav-toggle {
    display: grid; place-items: center; flex-shrink: 0;
    width: 44px; height: 44px; padding: 0; cursor: pointer;
    background: transparent; border: 1px solid rgba(255,255,255,0.35); border-radius: 8px;
  }
  .nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after {
    display: block; width: 18px; height: 2px; border-radius: 2px; background: #fff;
    transition: transform 0.2s, background 0.2s;
  }
  .nav-toggle-bars { position: relative; }
  .nav-toggle-bars::before, .nav-toggle-bars::after { content: ""; position: absolute; left: 0; }
  .nav-toggle-bars::before { top: -6px; }
  .nav-toggle-bars::after { top: 6px; }
  /* Open state: the three bars turn into an X. */
  .nav-toggle[aria-expanded="true"] { border-color: #B8860B; }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bars { background: transparent; }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bars::before { transform: translateY(6px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bars::after { transform: translateY(-6px) rotate(-45deg); }

  /* The panel hangs straight below the sticky header. */
  .mobile-menu:not([hidden]) {
    display: block; position: absolute; top: 100%; left: 0; right: 0;
    max-height: calc(100vh - 64px); overflow-y: auto;
    background: #071428; border-top: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 24px 48px rgba(0,0,0,0.45);
    padding: 16px 20px 24px;
  }
  .mobile-menu a {
    display: block; padding: 14px 4px; font-size: 17px; font-weight: 500; line-height: 1.3;
    color: #fff; text-decoration: none; border-bottom: 1px solid rgba(255,255,255,0.08);
  }
  .mobile-menu a[aria-current="page"] { color: #F1C96B; }
  /* The two proof pages are big buttons at the top of the menu. */
  .mobile-menu .mobile-menu-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 6px; }
  .mobile-menu .mobile-menu-btn {
    display: flex; align-items: center; justify-content: center; gap: 9px; min-height: 52px; padding: 10px;
    border: 1.5px solid rgba(255,255,255,0.55); border-radius: 10px; font-weight: 600; text-align: center;
  }
  .mobile-menu .mobile-menu-btn-hear { border-color: #F1C96B; color: #F1C96B; background: rgba(241,201,107,0.08); }
  .mobile-menu .mobile-menu-btn svg { width: 15px; height: 15px; flex-shrink: 0; }
  .mobile-menu .mobile-menu-btn[aria-current="page"] { background: rgba(255,255,255,0.14); }
  .mobile-menu-label {
    margin: 20px 4px 2px; font-size: 11px; font-weight: 600; letter-spacing: 0.14em;
    text-transform: uppercase; color: #B8860B;
  }
  .mobile-menu .mobile-menu-sub { font-size: 15px; font-weight: 400; color: rgba(255,255,255,0.78); }
  .mobile-menu .mobile-menu-phone { margin-top: 20px; border-bottom: none; color: #F1C96B; font-family: 'DM Mono', monospace; }
  .mobile-menu .mobile-menu-cta {
    margin-top: 8px; padding: 14px; border: none; border-radius: 8px; text-align: center;
    background: #B8860B; color: #071428; font-weight: 600; font-size: 16px;
  }
}
@media (max-width: 700px) {
  /* Phones: logo, Book and ☰ only. The proof buttons lead the ☰ menu instead. */
  nav .nav-links > li.nav-hear { display: none !important; }
}
@media (max-width: 480px) {
  /* Logo, booking button and ☰ have to share one line on a phone. */
  nav .nav-logo img { height: 22px !important; }
  .nav-inner { gap: 8px; }
  nav .nav-links > li > a.btn-nav { height: 40px; line-height: 40px; padding: 0 14px; font-size: 13px; }
  .nav-toggle { width: 40px; height: 40px; }
  .mobile-menu .mobile-menu-btns { grid-template-columns: 1fr; }
}
@media (max-width: 420px) {
  /* "Book a Discovery Call" becomes "Book a Call" so everything fits on small phones. */
  .btn-nav-extra { display: none; }
}
@media (max-width: 370px) {
  nav .nav-logo img { height: 18px !important; }
  nav .nav-links > li > a.btn-nav { padding: 0 12px; font-size: 12.5px; }
}
