/* RTS main site — floating pill nav bar + high-visibility button states.
   v2: shrunk from an inset-but-still-near-full-width bar to a true centered, content-width
   pill (left:50% + translateX(-50%), width:max-content) with a red-tinted glow on the
   bar itself -- CTA/link focus states below stay cyan (brand color, already working well)
   so the red reads as the container's own accent, not a status color.
   Vertical position/height are left untouched deliberately -- other sections likely
   reserve top clearance sized to the nav's current height+offset, and changing `top`
   here risked a few px of overlap with hero content that couldn't be verified without
   a rendered browser. Background/border-bottom are set as inline styles on <nav> itself
   so overriding them needs !important; everything else wins by source order since this
   file loads after the bundle stylesheet. Attribute-selectors (not full class strings)
   are used throughout, order-independent against a future rebuild, same approach as
   footer-pin-fix.css's div.min-h-screen selector. */

nav[class*="fixed"][class*="z-50"] {
  /* v3 fix: v2's width:max-content + max-width:calc(100vw-24px) squeezed the bar
     narrower than its own content needed on any viewport roughly 768-900px wide (a
     resized browser window, or an iPad) -- measured live: the Book Meeting button's
     box went from 128x38 to 90x58, i.e. its label was wrapping inside a crushed
     pill. On mobile (<768px, links hidden) the same max-content sizing left the RTS
     logo and the hamburger with a measured, confirmed ZERO px gap between them,
     since justify-between has no slack left to distribute once the box is sized
     exactly to content. Fixed by widening the safety margin (100vw-24 -> 100vw-8,
     so it only ever bites at genuinely tiny widths) and, more importantly, by
     shrinking the content's own intrinsic width need (link gap + padding, below)
     and adding an explicit minimum gap on the row itself so logo/links/CTA can
     never touch even if a future content change makes the box tight again.
     top+height unchanged from v2 (bottom edge still lands at the original 66px). */
  left: 50%;
  right: auto;
  top: 16px;
  transform: translateX(-50%);
  width: max-content;
  max-width: calc(100vw - 8px);
  border-radius: 9999px !important;
  border-bottom: none !important;
  background: rgba(7, 13, 17, 0.86) !important;
  box-shadow:
    0 0 0 1px rgba(239, 68, 68, 0.28),
    0 20px 44px -16px rgba(0, 0, 0, 0.88),
    0 10px 30px rgba(239, 68, 68, 0.22),
    0 0 40px rgba(239, 68, 68, 0.14);
}

/* Shrink the pill itself from the original 64px-tall bar (sized for an edge-to-edge
   nav) down to a tighter, better-proportioned height now that it's a compact
   centered pill, and tighten the horizontal padding to match -- the old lg:px-20
   (80px/side) was tuned for a near-full-width bar and reads as stretched here.
   gap is a hard floor between logo / links-group / CTA-group: with the box sized to
   max-content, justify-between has zero slack to distribute on its own once any of
   those groups collapses (mobile hides two of the three), so without an explicit
   gap they can end up touching -- this guarantees they never do, on any viewport. */
nav[class*="fixed"][class*="z-50"] > div {
  height: 50px;
  padding-left: 22px !important;
  padding-right: 22px !important;
  gap: 20px;
}

/* Desktop link row -- gap-8 (32px x5 gaps = 160px) was sized for the old
   edge-to-edge bar; reduced so the pill's true minimum content width drops enough
   to clear the 768-900px squeeze zone above with real margin to spare. */
nav div[class*="md:flex"] {
  gap: 18px !important;
}

@media (max-width: 480px) {
  nav[class*="fixed"][class*="z-50"] {
    /* top(10)+height(46)=56 < original 66 -- strictly less reach, so this can only
       ever add clearance versus the original, never remove it. */
    top: 10px;
    max-width: calc(100vw - 16px);
  }
  nav[class*="fixed"][class*="z-50"] > div {
    height: 46px;
    padding-left: 16px !important;
    padding-right: 16px !important;
    gap: 14px;
  }
}

/* Primary CTA ("Book Meeting") -- smooth lift + glow on hover/focus so it reads as
   the one thing on the bar you're meant to press. */
nav a[href="/book-meeting"] {
  transition: transform 220ms cubic-bezier(.16, 1, .3, 1),
              box-shadow 220ms cubic-bezier(.16, 1, .3, 1),
              background-color 220ms ease, border-color 220ms ease !important;
  box-shadow: 0 0 0 1px rgba(0, 212, 255, 0.25), 0 0 16px rgba(0, 212, 255, 0.15);
}

nav a[href="/book-meeting"]:hover {
  transform: translateY(-2px) scale(1.045);
  background: rgba(0, 212, 255, 0.18) !important;
  border-color: rgba(0, 212, 255, 0.7) !important;
  box-shadow:
    0 0 0 1px rgba(0, 212, 255, 0.55),
    0 12px 28px -8px rgba(0, 212, 255, 0.45),
    0 0 26px rgba(0, 212, 255, 0.4);
}

nav a[href="/book-meeting"]:focus-visible,
nav button:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 1px rgba(0, 212, 255, 0.75),
    0 0 0 4px rgba(0, 212, 255, 0.28),
    0 0 26px rgba(0, 212, 255, 0.5) !important;
}

/* Mobile hamburger -- same smooth hover/focus glow treatment. */
nav button[aria-label="Open menu"] {
  transition: background-color 200ms ease, border-color 200ms ease,
              box-shadow 200ms ease, color 200ms ease !important;
}

nav button[aria-label="Open menu"]:hover {
  background: rgba(0, 212, 255, 0.1) !important;
  border-color: rgba(0, 212, 255, 0.45) !important;
  color: rgb(0, 212, 255) !important;
}

/* Desktop text links -- pill-shaped hover/focus highlight. Horizontal padding is
   offset by a matching negative margin so the extra hit area doesn't widen the
   existing gap-8 spacing between links. */
nav div[class*="md:flex"] > a[href] {
  padding-left: 10px;
  padding-right: 10px;
  margin-left: -10px;
  margin-right: -10px;
  border-radius: 9999px;
  transition: background-color 200ms ease, color 200ms ease !important;
}

nav div[class*="md:flex"] > a[href]:hover,
nav div[class*="md:flex"] > a[href]:focus-visible {
  background: rgba(0, 212, 255, 0.1);
  color: rgb(0, 212, 255) !important;
}

nav div[class*="md:flex"] > a[href]:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px rgba(0, 212, 255, 0.5);
}

@media (prefers-reduced-motion: reduce) {
  nav a[href="/book-meeting"],
  nav button[aria-label="Open menu"],
  nav div[class*="md:flex"] > a[href] {
    transition: none !important;
  }
  nav a[href="/book-meeting"]:hover {
    transform: none;
  }
}

/* Close the remaining squeeze zone found by live measurement: even after trimming
   gap/padding above, the full desktop nav still needs ~808px, which is wider than
   the viewport between Tailwind's own md breakpoint (768px) and ~900px -- confirmed
   live, Book Meeting's box was still wrapping (90x58 instead of 128x38) at 768-800px.
   Rather than keep shaving pixels to chase a moving target, the compact
   logo+hamburger layout (already proven to fit cleanly, confirmed via measurement)
   is forced to start at 900px instead of relying on the bundle's baked-in 768px --
   the full link row only ever renders where it demonstrably has room (>=900px,
   content needs 808.5px, >80px to spare). The hamburger button\'s click handler is
   a plain state toggle, not viewport-gated in JS, so forcing it visible here doesn\'t
   change its behavior, only when it appears. */
@media (max-width: 900px) {
  nav div[class*="md:flex"] {
    display: none !important;
  }
  nav a[href="/book-meeting"] {
    display: none !important;
  }
  nav button[aria-label="Open menu"] {
    display: flex !important;
  }
}
