/* ============================================
   nav.css - Shared top navigation
   ============================================ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 200;
  background: var(--bg-deep, #0f172a);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 5%;
  min-height: 64px;
  border-bottom: 1px solid rgba(37, 99, 235, 0.15);
  box-shadow: 0 2px 16px rgba(15, 23, 42, 0.3);
}

.site-header > * {
  min-width: 0;
}

#top-nav-container {
  display: contents;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  flex-shrink: 0;
  transition: opacity 0.2s;
}

.nav-logo:hover {
  opacity: 0.85;
}

.nav-logo-stack {
  display: flex;
  flex-direction: column;
  line-height: 1;
  gap: 4px;
}

.nav-logo-text {
  font-family: "Sora", sans-serif;
  font-weight: 800;
  color: #f8fbff;
  font-size: 1rem;
  letter-spacing: 0;
}

.nav-logo-sub {
  font-family: "DM Sans", sans-serif;
  font-size: 0.68rem;
  color: rgba(255, 255, 255, 0.58);
  letter-spacing: 0;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 1;
  justify-content: center;
}

.nav-item {
  color: rgba(255, 255, 255, 0.7);
  font-family: "Sora", sans-serif;
  font-weight: 600;
  font-size: 0.85rem;
  text-decoration: none;
  padding: 8px 16px;
  border-radius: 6px;
  transition: color 0.2s, background 0.2s;
  white-space: nowrap;
  position: relative;
}

.nav-item:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.nav-item.active {
  color: var(--brand-light, #3b82f6);
  background: rgba(37, 99, 235, 0.1);
}

.nav-item.active::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 16px;
  right: 16px;
  height: 2px;
  background: var(--brand, #2563eb);
  border-radius: 2px 2px 0 0;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}

.nav-email {
  color: rgba(255, 255, 255, 0.7);
  font-family: "Sora", sans-serif;
  font-weight: 500;
  font-size: 0.82rem;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 7px;
  transition: color 0.2s;
}

.nav-email:hover {
  color: var(--brand-light, #3b82f6);
}

.nav-email .material-symbols-outlined {
  font-size: 1rem;
  color: var(--brand, #2563eb);
  font-variation-settings: "FILL" 0, "wght" 400, "GRAD" 0, "opsz" 24;
}

.nav-cta-btn {
  background: var(--orange, #f97316);
  color: #fff;
  padding: 8px 20px;
  border-radius: 6px;
  border: none;
  font-family: "Sora", sans-serif;
  font-weight: 700;
  font-size: 0.82rem;
  cursor: pointer;
  letter-spacing: 0;
  text-decoration: none;
  transition: background 0.2s, transform 0.15s;
  white-space: nowrap;
}

.nav-cta-btn:hover {
  background: var(--orange-hover, #ea6c0a);
  transform: translateY(-1px);
}

.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
  transition: background 0.2s;
}

.nav-hamburger:hover {
  background: rgba(255, 255, 255, 0.1);
}

.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 2px;
  transition: transform 0.25s, opacity 0.25s, width 0.25s;
  transform-origin: center;
}

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

.nav-hamburger.open span:nth-child(2) {
  opacity: 0;
  width: 0;
}

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

.nav-mobile-drawer {
  position: fixed;
  top: 64px;
  left: 0;
  right: 0;
  z-index: 199;
  background: var(--bg-deep, #0f172a);
  border-bottom: 2px solid rgba(37, 99, 235, 0.2);
  box-shadow: 0 8px 32px rgba(15, 23, 42, 0.45);
  display: flex;
  flex-direction: column;
  transform: translateY(-10px);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.nav-mobile-drawer.open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.nav-drawer-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 5%;
  color: rgba(255, 255, 255, 0.75);
  font-family: "Sora", sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  transition: background 0.15s, color 0.15s;
}

.nav-drawer-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
}

.nav-drawer-item.active {
  color: var(--brand-light, #3b82f6);
}

.nav-drawer-item .material-symbols-outlined {
  font-size: 1.2rem;
  color: var(--brand, #2563eb);
  flex-shrink: 0;
  font-variation-settings: "FILL" 0, "wght" 400, "GRAD" 0, "opsz" 24;
}

.nav-drawer-footer {
  padding: 16px 5%;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.nav-drawer-email {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: center;
  background: var(--orange, #f97316);
  color: #fff;
  padding: 12px;
  border-radius: 7px;
  text-decoration: none;
  font-family: "Sora", sans-serif;
  font-weight: 700;
  font-size: 0.9rem;
  transition: background 0.2s;
}

.nav-drawer-email:hover {
  background: var(--orange-hover, #ea6c0a);
}

.nav-drawer-email .material-symbols-outlined {
  font-size: 1.1rem;
}

.nav-overlay {
  position: fixed;
  inset: 0;
  z-index: 198;
  background: rgba(15, 23, 42, 0.6);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
}

.nav-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

@media (max-width: 960px) {
  .nav-email {
    display: none;
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
  }

  .nav-hamburger {
    display: flex;
    margin-left: auto;
  }

  .nav-right {
    gap: 10px;
  }

  .nav-cta-btn {
    font-size: 0.78rem;
    padding: 7px 14px;
  }
}

@media (max-width: 560px) {
  .site-header {
    min-height: 60px;
  }

  .nav-logo-text {
    font-size: 0.92rem;
  }

  .nav-right {
    display: none;
  }

  .nav-mobile-drawer {
    top: 60px;
  }
}

@media (max-width: 480px) {
  .site-header {
    padding: 0 4%;
  }

  .nav-logo-sub {
    display: none;
  }
}
