/* Shell & bar ------------------------------------------------------ */

.nav-shell {
  width: 100%;
  display: flex;
  justify-content: center;
  padding: 18px 0 30px; /* spacing above and below nav */
  position: relative;
  z-index: 100;
}

.nav-bar {
  width: 100%;
  max-width: 960px; /* matches events + stats layout */
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;

  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(15, 23, 42, 0.9);

  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(20px);
  font-size: 13px;
}

/* Logo + brand ------------------------------------------------------ */

.nav-logo-link {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #e5e7eb;
}

.nav-logo {
  width: 30px;
  height: 30px;
  border-radius: 50%;
}

.nav-brand-text {
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.07em;
  font-weight: 600;
}

/* Links ------------------------------------------------------------- */

.nav-links {
  display: flex;
  align-items: center;
  gap: 16px;
}

.nav-link {
  text-decoration: none;
  font-size: 13px;
  padding: 6px 12px;
  border-radius: 999px;
  color: #9ca3af;
  transition: 0.15s ease;
}

.nav-link:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.06);
}

.nav-link-active {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(148, 163, 184, 0.7);
}

/* Mobile hamburger -------------------------------------------------- */

.mobile-nav-toggle {
  display: none; /* hidden on desktop */
  background: transparent;
  border: none;
  padding: 6px;
  cursor: pointer;
}

.mobile-nav-toggle .bar {
  display: block;
  width: 22px;
  height: 2.5px;
  border-radius: 999px;
  background: #9ca3af;
  margin: 4px 0;
}

/* Mobile dropdown menu ---------------------------------------------- */

.mobile-menu {
  position: absolute;
  top: 70px;
  right: 18px;
  background: #020617;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.7);
  padding: 8px 0;
  min-width: 190px;
  z-index: 1000;
  display: none; /* JS toggles this */
}

.mobile-menu a {
  display: block;
  padding: 9px 14px;
  font-size: 14px;
  text-decoration: none;
  color: #e5e7eb;
}

.mobile-menu a:hover {
  background: rgba(255, 255, 255, 0.06);
}

.mobile-menu a.active {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

/* Responsive behavior ----------------------------------------------- */

.desktop-only {
  display: flex;
}

 /* Environment badge (STAGING) */
.env-badge {
  margin-left: 8px;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid rgba(249, 115, 22, 0.7);
  background: rgba(249, 115, 22, 0.15);
  color: #fed7aa;
  font-weight: 600;
  line-height: 1;
}

/* Utility */
.hidden {
  display: none !important;
}

/* ── Resources dropdown ─────────────────────────────── */
.nav-dropdown {
  position: relative;
}

.nav-dropdown-toggle {
  display: flex;
  align-items: center;
  gap: 5px;
  background: none;
  border: none;
  font-family: inherit;
  cursor: pointer;
  /* inherit nav-link appearance */
  font-size: 13px;
  padding: 6px 12px;
  border-radius: 999px;
  color: #9ca3af;
  transition: 0.15s ease;
}
.nav-dropdown-toggle:hover,
.nav-dropdown:hover .nav-dropdown-toggle {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.06);
}
.nav-dropdown-toggle.nav-link-active {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(148, 163, 184, 0.7);
}

.dropdown-caret {
  font-size: 8px;
  opacity: 0.5;
  transition: transform 0.15s;
}
.nav-dropdown:hover .dropdown-caret {
  transform: rotate(180deg);
  opacity: 0.8;
}

.nav-dropdown-panel {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 160px;
  background: #0b1220;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 14px;
  padding: 6px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-6px);
  transition: opacity 0.15s, transform 0.15s;
  z-index: 200;
}

/* Invisible bridge covering the 6px gap between button and panel,
   so hover state stays active while moving the cursor downward. */
.nav-dropdown-panel::before {
  content: '';
  position: absolute;
  top: -8px;
  left: 0;
  right: 0;
  height: 8px;
}
.nav-dropdown:hover .nav-dropdown-panel,
.nav-dropdown:focus-within .nav-dropdown-panel {
  opacity: 1;
  pointer-events: all;
  transform: translateY(0);
}

.nav-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 9px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  color: #cbd5e1;
  transition: background 0.1s;
}
.nav-dropdown-item:hover {
  background: rgba(255, 255, 255, 0.06);
}
.nav-dropdown-item.nav-link-active {
  background: rgba(255, 255, 255, 0.06);
}

.nav-dropdown-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* Mobile section label */
.mobile-menu-section {
  padding: 8px 14px 4px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #334155;
}

/* small screens: hide desktop nav, show hamburger */
@media (max-width: 700px) {
  .desktop-only {
    display: none !important;
  }

  .mobile-nav-toggle {
    display: block;
  }

  .nav-bar {
    padding-inline: 14px;
    gap: 10px;
  }

  .nav-brand-text {
    display: none; /* keep just the logo on tight screens */
  }

}
