/* Header menu sizing, shared by the public pages (both themes).
   The desktop menu needs about 1,220-1,290px. Pages switch to the ☰ menu at
   their own phone breakpoint (768 or 900px), so between that and ~1,250px the
   desktop menu overflowed: an iPad held upright (820px) got a 972px-wide page
   that scrolled sideways. This file extends the ☰ menu to everything below
   1200px (iPads in either orientation, small laptops) and tightens the
   desktop menu's spacing from 1200 to 1319px so it fits on one line.
   Loaded after each page's own <style> and before light-theme.css. */

@media (max-width: 1199px) {
  .nav-links { display: none; }
  .nav-hamburger { display: block; }
  /* privacy-policy opens its menu with .open rather than inline styles;
     these are its own phone values, now applied up to 1199px. */
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 64px; left: 0; right: 0;
    background: rgba(16,16,22,0.98);
    backdrop-filter: blur(24px);
    padding: 24px;
    gap: 20px;
    border-bottom: 1px solid var(--border);
    z-index: 999;
  }
}

/* With the desktop links hidden, space-between left the Login/Book buttons in
   the middle of the header and the ☰ alone at the right edge. Keep them together
   on the right. */
@media (max-width: 1199px) {
  .nav-actions { margin-left: auto; }
}
@media (min-width: 561px) and (max-width: 1199px) {
  .nav-inner { column-gap: 12px; }
}

@media (min-width: 1200px) {
  /* The desktop menu had ~1px to spare, so "Book a Strategy Call" sometimes
     broke onto two lines (pricing at 1320 and 1400px). Header items stay on one line. */
  .nav-logo, .nav-actions > * { white-space: nowrap; }
  .nav-logo { flex-shrink: 0; }
}

@media (min-width: 1200px) and (max-width: 1319px) {
  .nav-links { gap: 18px; }
  .nav-actions { gap: 8px; }
  .nav-inner { column-gap: 12px; }
}
/* Seven menu links since Pay Per Lead was added (12/02): with the pages' 32px
   link gaps the logo touched Platform and Blog touched Login. */
@media (min-width: 1320px) {
  .nav-links { gap: 22px; }
  .nav-inner { column-gap: 20px; }
}

/* Pricing, contact and pay-per-lead open the menu full-screen (top: 0), which
   covered the logo and the menu button, so it couldn't be closed. Keep the
   header row above the open menu. (Was white-mode only; dark had the same bug.) */
.nav-inner:has(.nav-links[style*="display: flex"]) > :is(.nav-logo, .nav-actions, .nav-hamburger) {
  position: relative;
  z-index: 1000;
}
/* Once scrolled, .nav.scrolled gets a backdrop-filter, which makes the nav the
   containing block for the fixed menu: it was squeezed into the 64px bar and the
   links spilled over the page. Drop the blur while the menu is open. */
.nav:has(.nav-links[style*="display: flex"]) {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}
