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

.site-nav {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  padding: 0;
  position: sticky;
  top: 0;
  z-index: 500;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
}

.site-nav .nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  height: 56px;
}

.nav-brand {
  color: #fff;
  font-size: 1.15rem;
  font-weight: 700;
  text-decoration: none;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.nav-brand span {
  color: #f59e0b;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 6px;
}

.nav-links li a {
  display: block;
  padding: 7px 18px;
  color: #cbd5e1;
  text-decoration: none;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 500;
  transition: background 0.2s, color 0.2s;
  white-space: nowrap;
}

.nav-links li a:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.nav-links li a.active {
  background: #f59e0b;
  color: #1a1a2e;
  font-weight: 700;
}

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: all 0.3s;
}

@media (max-width: 1366px) {
  .site-nav .nav-inner {
    padding: 12px 16px;
  }

  .nav-toggle {
    display: flex;
    z-index: 501;
  }

  /* Hamburger to X Animation */
  .nav-toggle[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .nav-toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
  }

  .nav-toggle[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  /* Right Sidebar Menu */
  .nav-links {
    position: fixed;
    top: 0;
    right: -280px;
    /* Hidden state */
    width: 280px;
    height: 100vh;
    background: #16213e;
    display: flex;
    flex-direction: column;
    padding: 80px 24px 24px;
    gap: 12px;
    transition: right 0.3s ease-in-out;
    box-shadow: -4px 0 15px rgba(0, 0, 0, 0.3);
    z-index: 500;
    overflow-y: auto;
  }

  .nav-links.open {
    right: 0;
  }

  .nav-links li a {
    padding: 14px 16px;
    font-size: 1.05rem;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.03);
  }

  .nav-links li a:hover {
    background: rgba(255, 255, 255, 0.08);
  }
}

/* Background Overlay */
.nav-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.5);
  z-index: 499;
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
}

.nav-overlay.show {
  display: block;
  opacity: 1;
}