/* ─────────────────────────────────────────────────────────────────
   Shared site nav — one canonical copy for every jursu.com page.
   Loaded via nginx sub_filter (same mechanism as consent.js) so it
   reaches every page automatically, including the directory-app's
   React nav (same class names, same behavior, same stylesheet).
   Fixes a real drift bug found 2026-09-14: 9 pages each hand-copied
   their own nav CSS, and 5 of them silently lost all menu access on
   mobile (only the homepage had a working mobile fallback) while the
   other 5 pages had no menu at all, at any width, ever.
   Relies only on --text/--text-secondary/--blue/--border/--surface, which
   every page already defines identically.
   Pages using the older minimal "logo + back link" nav (privacy,
   terms, data-deletion — kept minimal on purpose) simply have none
   of the elements these selectors target — safe no-op there.
   ───────────────────────────────────────────────────────────────── */

nav.site-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 999;
  height: 64px; display: flex; align-items: center; justify-content: space-between;
  padding: 0 6%; background: rgba(255,255,255,0.92); backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(0,0,0,0.07);
  box-sizing: border-box;
}
/* NOT scoped to nav.site-nav on purpose — .logo/.logo-icon are reused
   as-is by the page footers (.footer-brand .logo) on every one of
   these pages. Scoping this to the nav only (an earlier version of
   this fix did that) silently broke the footer logo: with no CSS
   applying, only the raw width="120" height="32" HTML attributes were
   left, stretching the real 558x339px source into the wrong aspect
   ratio instead of the intended height:32px/width:auto. */
.logo { display: flex; align-items: center; gap: 9px; text-decoration: none; flex-shrink: 0; }
.logo-icon { height: 32px; width: auto; object-fit: contain; flex-shrink: 0; }
.logo-name { font-size: 18px; font-weight: 800; color: var(--text); letter-spacing: -0.4px; }

.nav-mid { display: flex; gap: 28px; align-items: center; }
.nav-mid a { color: var(--text-secondary); font-size: 14px; font-weight: 500; text-decoration: none; transition: color .2s; }
.nav-mid a:hover { color: var(--text); }
.nav-mid a.nav-find { color: var(--blue); font-weight: 600; }

.nav-right { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.n-login { color: var(--text-secondary); font-size: 14px; font-weight: 500; text-decoration: none; padding: 7px 14px; border-radius: 8px; transition: color .2s; white-space: nowrap; }
.n-login:hover { color: var(--text); }
.n-cta { background: var(--text); color: #fff; font-size: 14px; font-weight: 600; padding: 8px 18px; border-radius: 8px; text-decoration: none; transition: opacity .2s; white-space: nowrap; }
.n-cta:hover { opacity: 0.82; }

/* Mobile-only "Find a Lawyer" — kept visible outside the hamburger on
   purpose (added 2026-09-14, after discussion). The public directory
   is a real growth/SEO channel of its own, not just another nav link,
   and burying it inside an unlabeled hamburger measurably hurts
   discovery for a visitor looking to HIRE a lawyer rather than sign
   up as one — they may not even know Jursu has a directory otherwise.
   Login/Get started stay hamburger-only; this is the one deliberate
   exception, applied identically on every page via this shared file
   (not hand-added per page like the old homepage-only version was,
   which is part of what caused the mobile nav to drift in the first
   place). */
.nav-find-mobile { display: none; }

/* Hamburger — hidden on desktop, shown at the same breakpoint that
   hides .nav-mid/.nav-right. One real button revealing the SAME full
   link set as desktop, not a lossy "keep one link, drop the rest"
   substitute. */
.nav-burger {
  display: none; flex-direction: column; justify-content: center; align-items: center; gap: 5px;
  width: 36px; height: 36px; padding: 0; border: none; background: none; cursor: pointer; flex-shrink: 0;
}
.nav-burger span { display: block; width: 22px; height: 2px; background: var(--text); border-radius: 2px; transition: transform .25s ease, opacity .2s ease; }
.nav-burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav-mobile-menu {
  display: none; flex-direction: column;
  position: fixed; top: 64px; left: 0; right: 0; z-index: 998;
  background: #fff; border-bottom: 1px solid var(--border);
  padding: 8px 6% 18px; box-shadow: 0 16px 32px rgba(0,0,0,0.08);
  max-height: calc(100vh - 64px); overflow-y: auto;
  box-sizing: border-box;
}
.nav-mobile-menu.open { display: flex; }
.nav-mobile-menu a { color: var(--text-secondary); font-size: 15.5px; font-weight: 500; text-decoration: none; padding: 13px 2px; border-bottom: 1px solid var(--surface); }
.nav-mobile-menu a.nav-find { color: var(--blue); font-weight: 700; }
.nav-mobile-menu a.nav-mobile-cta { background: var(--text); color: #fff; font-weight: 700; border-radius: 9px; text-align: center; margin-top: 10px; padding: 13px; border-bottom: none; }

@media (max-width: 900px) {
  .nav-mid, .nav-right { display: none; }
  .nav-burger { display: flex; }
  .nav-find-mobile { display: inline-block; color: var(--blue); font-size: 13.5px; font-weight: 700; text-decoration: none; white-space: nowrap; padding: 8px 10px; border-radius: 8px; }
}
