/* ==========================================
   DESKTOP NAVIGATION & HEADER STYLES
   ========================================== */

/* Header Container Fixes */
.site-header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
}

/* Base styles for Desktop Navigation */
.desktop-nav {
  display: flex;
  align-items: center;
  gap: 32px;
}

/* Nav Dropdown Parent Container */
.nav-dropdown {
  position: relative;
  display: inline-block;
  padding-bottom: 12px; /* Bridge to keep dropdown open when moving cursor down */
  margin-bottom: -12px;
}

.dropdown-arrow {
  font-size: 0.65rem;
  margin-left: 4px;
  transition: transform var(--transition-fast, 0.2s ease);
}

.nav-link {
  color: #fff;
  text-decoration: none;
}

/* Dropdown Sub-menu Container */
.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  min-width: 240px;
  background: rgba(12, 20, 32, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-glass, rgba(255, 255, 255, 0.1));
  border-radius: 8px;
  padding: 12px 8px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  gap: 4px;
  z-index: 100;
}

/* HOVER REVEAL EFFECT */
.nav-dropdown:hover .dropdown-menu,
.nav-dropdown:focus-within .dropdown-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.nav-dropdown:hover .dropdown-arrow,
.nav-dropdown:focus-within .dropdown-arrow {
  transform: rotate(180deg);
}

.dropdown-item {
  font-size: 0.85rem;
  color: var(--muted, #a0aec0);
  padding: 8px 12px;
  border-radius: 4px;
  transition: all var(--transition-fast, 0.2s ease);
  white-space: nowrap;
  text-decoration: none;
}

.dropdown-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--accent, #f59e0b);
  padding-left: 16px;
}


/* ==========================================
   HAMBURGER TOGGLE BUTTON
   ========================================== */

.mobile-toggle {
  display: none; /* Hidden on desktop */
  flex-direction: column;
  justify-content: space-between;
  width: 28px;
  height: 20px;
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
  margin: 0 !important;
  cursor: pointer;
  z-index: 50;
  box-shadow: none !important;
}

.mobile-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background-color: #ffffff;
  border-radius: 2px;
  transition: all 0.3s ease-in-out;
}

.mobile-toggle:hover span {
  background-color: var(--amber, #f59e0b);
}

/* Animated X state when mobile menu is active */
.mobile-toggle.active span:nth-child(1) {
  transform: translateY(9px) rotate(45deg);
}

.mobile-toggle.active span:nth-child(2) {
  opacity: 0;
}

.mobile-toggle.active span:nth-child(3) {
  transform: translateY(-9px) rotate(-45deg);
}


/* ==========================================
   RESPONSIVE BREAKPOINTS
   ========================================== */

@media screen and (max-width: 1024px) {
  .desktop-nav {
    display: none !important;
  }

  .mobile-toggle {
    display: flex !important;
  }
}


/* ==========================================
   MOBILE FULLSCREEN MENU ACCORDION
   ========================================== */

.mobile-menu {
  position: fixed;
  inset: 0;
  background: var(--bg, #070b12);
  z-index: 35;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 100px;
  padding-bottom: 40px;
  overflow-y: auto;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.mobile-menu.open {
  opacity: 1;
  pointer-events: auto;
}

.mobile-menu-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  width: 100%;
  max-width: 320px;
}

.mobile-nav-link {
  font-family: var(--serif, serif);
  font-size: 1.75rem;
  color: #fff;
  text-align: center;
  text-decoration: none;
}

.mobile-dropdown {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.mobile-dropdown-btn {
  background: none;
  border: none;
  font-family: var(--serif, serif);
  font-size: 1.75rem;
  color: var(--text, #fff);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
}

.mobile-arrow {
  font-size: 0.9rem;
  color: var(--amber, #f59e0b);
  transition: transform 0.2s ease;
}

.mobile-dropdown.active .mobile-arrow {
  transform: rotate(180deg);
}

.mobile-dropdown-content {
  max-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: 100%;
  transition: max-height 0.35s ease, opacity 0.25s ease, margin 0.25s ease;
  opacity: 0;
}

.mobile-dropdown.active .mobile-dropdown-content {
  max-height: 300px;
  opacity: 1;
  margin-top: 12px;
}

.mobile-sub-link {
  font-size: 0.95rem;
  color: var(--muted, #8794a4);
  text-align: center;
  text-decoration: none;
}

.mobile-sub-link:hover {
  color: var(--amber, #f59e0b);
}