/* ============================================================
   CAZNET — nav.css
   Topbar · Navigation · Dropdowns · Mobile menu
   ============================================================ */

/* ── Topbar ─────────────────────────────────────────────────── */
.topbar {
  background: var(--charcoal);
}

.topbar .wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 7px;
  padding-bottom: 7px;
  font-size: 12px;
  color: rgba(255,255,255,0.6);
}

.topbar a {
  color: rgba(255,255,255,0.6);
  text-decoration: none;
  transition: color 0.15s;
}
.topbar a:hover { color: #fff; }

.topbar-left {
  display: flex;
  align-items: center;
  gap: 6px;
}

.topbar-dot {
  width: 6px;
  height: 6px;
  background: var(--cyan);
  border-radius: 50%;
  flex-shrink: 0;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ── Main nav ───────────────────────────────────────────────── */
nav {
  background: #fff;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 40px;
  display: flex;
  align-items: center;
  height: 66px;
}

.nav-logo {
  margin-right: 36px;
  display: flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}

.nav-logo img {
  height: 34px;
  width: auto;
  display: block;
}

/* ── Nav items & dropdowns ──────────────────────────────────── */
.nav-links {
  display: flex;
  align-items: center;
  flex: 1;
  height: 66px;
}

.nav-item {
  position: relative;
  height: 66px;
  display: flex;
  align-items: center;
}

.nav-item > a,
.nav-links > a {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  padding: 0 14px;
  height: 66px;
  display: flex;
  align-items: center;
  border-bottom: 2.5px solid transparent;
  white-space: nowrap;
  transition: color 0.15s, border-color 0.15s;
  gap: 4px;
}

.nav-item > a:hover,
.nav-links > a:hover {
  color: var(--cyan-dark);
  border-bottom-color: var(--cyan);
}

.nav-item > a.active,
.nav-links > a.active {
  color: var(--cyan-dark);
  border-bottom-color: var(--cyan);
}

/* Chevron indicator on items with dropdowns */
.nav-item > a .nav-chevron {
  width: 10px;
  height: 10px;
  stroke: currentColor;
  flex-shrink: 0;
  transition: transform 0.2s;
}

.nav-item:hover > a .nav-chevron {
  transform: rotate(180deg);
}

/* Dropdown panel */
.nav-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 1px);
  left: 0;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 32px rgba(0,0,0,0.1);
  min-width: 220px;
  padding: 8px 0;
  z-index: 200;
}

.nav-item:hover .nav-dropdown {
  display: block;
}

.nav-dropdown a {
  display: block;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 400;
  color: var(--text-mid);
  text-decoration: none;
  border-bottom: none;
  white-space: nowrap;
  transition: background 0.12s, color 0.12s;
}

.nav-dropdown a:hover {
  background: var(--off-white);
  color: var(--charcoal);
}

/* Dropdown section label (optional grouping) */
.nav-dropdown-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-light);
  padding: 10px 20px 4px;
}

.nav-dropdown hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 6px 0;
}

/* ── Nav CTA ────────────────────────────────────────────────── */
.nav-cta {
  margin-left: auto;
  display: flex;
  gap: 10px;
  align-items: center;
}

/* ── Hamburger (mobile) ─────────────────────────────────────── */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
  margin-left: auto;
}

.hamburger span {
  display: block;
  height: 2px;
  background: var(--charcoal);
  border-radius: 2px;
  transition: transform 0.2s, opacity 0.2s;
}

.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Mobile menu ────────────────────────────────────────────── */
.mobile-menu {
  display: none;
  background: #fff;
  border-top: 1px solid var(--border);
  max-height: calc(100vh - 66px);
  overflow-y: auto;
}

.mobile-menu.open { display: block; }

.mobile-menu-item {
  border-bottom: 1px solid var(--border);
}

/* Parent link row */
.mobile-menu-parent {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mobile-menu-parent > a {
  flex: 1;
  display: block;
  padding: 15px 24px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
}
.mobile-menu-parent > a:hover { color: var(--cyan-dark); }

/* Toggle button for sub-items */
.mobile-sub-toggle {
  background: none;
  border: none;
  padding: 15px 20px;
  cursor: pointer;
  color: var(--text-light);
  display: flex;
  align-items: center;
}

.mobile-sub-toggle svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  transition: transform 0.2s;
}

.mobile-menu-item.open .mobile-sub-toggle svg {
  transform: rotate(180deg);
}

/* Sub-links */
.mobile-sub-links {
  display: none;
  background: var(--off-white);
  padding: 4px 0 8px;
}

.mobile-menu-item.open .mobile-sub-links { display: block; }

.mobile-sub-links a {
  display: block;
  padding: 10px 24px 10px 36px;
  font-size: 14px;
  color: var(--text-mid);
  text-decoration: none;
  border-bottom: none;
}

.mobile-sub-links a:hover { color: var(--cyan-dark); }

/* Simple mobile links (no sub-menu) */
.mobile-menu > a {
  display: block;
  padding: 15px 24px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid var(--border);
}
.mobile-menu > a:hover { color: var(--cyan-dark); }

/* Mobile CTA buttons */
.mobile-menu-cta {
  padding: 16px 24px;
  display: flex;
  gap: 10px;
}

.mobile-menu-cta a {
  flex: 1;
  text-align: center;
  padding: 12px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

/* ─────────────────────────────────────────────────────────────
   RESPONSIVE
───────────────────────────────────────────────────────────── */

@media (max-width: 1024px) {
  .nav-inner { padding-left: 32px; padding-right: 32px; }
  .nav-item > a,
  .nav-links > a { padding: 0 11px; font-size: 13px; }
}

@media (max-width: 768px) {
  .nav-inner { padding-left: 20px; padding-right: 20px; height: 58px; }
  .topbar .wrap { flex-direction: column; gap: 4px; text-align: center; font-size: 11px; }
  .nav-links { display: none; }
  .nav-cta { display: none; }
  .hamburger { display: flex; }
  .mobile-menu { max-height: calc(100vh - 58px); }
}

@media (max-width: 480px) {
  .nav-inner { padding-left: 16px; padding-right: 16px; }
}
