/* ═══════════════════════════════════════════════════
   LocatifQC — Navigation System
   Stripe-level SaaS nav · Click dropdowns · Accessible
   ═══════════════════════════════════════════════════ */

/* ═══ TOPBAR ═══ */
.nav-topbar {
  background: var(--topbar-bg, var(--bg-raised));
  border-bottom: 1px solid var(--border);
  padding: 10px 0;
  text-align: center;
  font-size: 13px;
  color: var(--topbar-text, var(--text-muted));
}
.nav-topbar a {
  color: var(--topbar-link, var(--accent));
  text-decoration: none;
  font-weight: 600;
}
.nav-topbar a:hover { text-decoration: underline; }

/* ═══ NAV BAR ═══ */
.nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--nav-bg);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--border);
  transition: padding var(--t-med, 250ms) var(--ease-out, cubic-bezier(0.16,1,0.3,1));
}
.nav.is-scrolled .nav__inner {
  height: 48px;
}
.nav__inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
  position: relative;
  transition: height var(--t-med, 250ms) var(--ease-out, cubic-bezier(0.16,1,0.3,1));
}

/* Brand */
.nav__brand {
  text-decoration: none;
  display: flex;
  align-items: baseline;
  gap: 1px;
  flex-shrink: 0;
}
.nav__brand-main {
  font-weight: 800;
  font-size: 19px;
  color: var(--text);
  letter-spacing: -0.5px;
}
.nav__brand-accent {
  font-weight: 800;
  font-size: 19px;
  color: var(--accent);
  letter-spacing: -0.5px;
}

/* Links container */
.nav__links {
  display: flex;
  gap: 4px;
  align-items: center;
}

/* Nav item (link or dropdown trigger) */
.nav__item {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  background: none;
  border: none;
  cursor: pointer;
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 8px;
  font-family: inherit;
  transition: color 0.15s, background 0.15s;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}
.nav__item:hover {
  color: var(--text);
  background: var(--bg-raised);
}
.nav__item.is-active {
  color: var(--text);
  font-weight: 600;
}
.nav__item[aria-expanded="true"] {
  color: var(--text);
  background: var(--bg-raised);
}

/* Chevron */
.nav__chevron {
  font-size: 10px;
  opacity: 0.4;
  transition: transform 0.2s, opacity 0.2s;
  display: inline-block;
}
.nav__item[aria-expanded="true"] .nav__chevron {
  transform: rotate(180deg);
  opacity: 0.8;
}

/* Actions */
.nav__actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-shrink: 0;
}

/* Burger */
.nav__burger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: var(--text-secondary);
  font-size: 20px;
  line-height: 1;
}

/* ═══ DROPDOWN ═══ */
.nav-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
  min-width: 440px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2), 0 0 0 1px var(--border);
  z-index: 1001;
  /* Animation */
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease;
}
.nav-dropdown.is-open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.nav-dropdown__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.nav-dropdown__heading {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding-bottom: 8px;
  margin-bottom: 4px;
  border-bottom: 1px solid var(--border);
}
.nav-dropdown__link {
  display: block;
  padding: 8px 0;
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  transition: color 0.12s;
  border-radius: 6px;
}
.nav-dropdown__link:hover {
  color: var(--accent);
}
.nav-dropdown__sub {
  font-size: 12px;
  font-weight: 400;
  color: var(--text-muted);
  display: block;
  margin-top: 1px;
}
.nav-dropdown__link:hover .nav-dropdown__sub {
  color: var(--accent);
  opacity: 0.6;
}

/* ═══ MOBILE MENU ═══ */
.nav-mobile {
  display: none;
  flex-direction: column;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: 16px 24px 24px;
  max-height: 80vh;
  overflow-y: auto;
}
.nav-mobile.is-open {
  display: flex;
}
.nav-mobile__group {
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.nav-mobile__group:last-of-type {
  border-bottom: none;
}
.nav-mobile__heading {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding-bottom: 6px;
}
.nav-mobile__link {
  display: block;
  padding: 10px 0;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.12s;
}
.nav-mobile__link:hover {
  color: var(--text);
}
.nav-mobile__actions {
  padding-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* ═══ RESPONSIVE ═══ */
@media (max-width: 900px) {
  .nav__links { display: none; }
  .nav__actions .btn { display: none; }
  .nav__actions .theme-btn { display: none; }
  .nav__burger { display: block; }
  .nav-dropdown { display: none !important; }
}
