/* ═══════════════════════════════════════════════════════════════
   NEXUS DIJI - NAVBAR STYLES
   Navigation bar, hamburger menu, and mobile menu
   Production-grade mobile navigation system
   ═══════════════════════════════════════════════════════════════ */

/* ═══════════════════════════════════════════════════════════════
   SITE HEADER
   ═══════════════════════════════════════════════════════════════ */

.site-header {
  position: relative;
  z-index: var(--z-sticky);
}

/* ═══════════════════════════════════════════════════════════════
   PROMO BANNER
   ═══════════════════════════════════════════════════════════════ */

.promo-banner {
  background: rgba(67, 97, 238, 0.1);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  color: var(--text);
  text-align: center;
  padding: 0.75rem 1.5rem;
  font-size: 0.85rem;
  font-weight: 500;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 998;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  transition: transform 0.4s ease, opacity 0.4s;
  overflow: hidden;
  letter-spacing: 0.03em;
}

.promo-banner::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -60%;
  width: 20%;
  height: 200%;
  background: linear-gradient(to right,
      transparent,
      rgba(255, 255, 255, 0.15),
      transparent);
  transform: rotate(30deg);
  animation: banner-shimmer 6s infinite;
}

@keyframes banner-shimmer {
  0% { left: -60%; }
  20% { left: 120%; }
  100% { left: 120%; }
}

.promo-badge {
  background: var(--grad);
  color: #fff;
  padding: 0.2rem 0.7rem;
  border-radius: var(--radius-sm);
  font-weight: 800;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.promo-banner a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: all var(--transition-base);
}

.promo-banner a:hover {
  filter: brightness(1.2);
  gap: 0.6rem;
}

.promo-banner.hidden {
  transform: translateY(-100%);
  opacity: 0;
}

/* ═══════════════════════════════════════════════════════════════
   MAIN NAVIGATION BAR
   Desktop-only (1024px and above)
   ═══════════════════════════════════════════════════════════════ */

nav#navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 3rem;
  position: fixed;
  top: var(--promo-banner-height);
  left: 0;
  right: 0;
  z-index: 990;
  border-bottom: 1px solid transparent;
  transition: all var(--transition-base);
  background: transparent;
  height: 70px;
  min-height: 70px;
}

nav#navbar.scrolled {
  top: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-color: var(--border);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

nav#navbar.menu-open {
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-color: transparent;
  box-shadow: none;
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
  text-decoration: none;
  transition: opacity var(--transition-fast);
  position: relative;
  z-index: calc(var(--z-modal) + 5);
}

.logo:hover {
  opacity: 0.7;
}

.logo-img {
  height: clamp(48px, 3.6vw, 54px);
  width: auto;
  max-width: 220px;
  min-height: 0;
  object-fit: contain;
  object-position: left center;
}

/* ==========================================================================
   UNIVERSAL SEGMENTED PILL LANGUAGE SWITCHER (.nav-language)
   Physics-based sliding pill glider, frosted glass, cyber glow
   ========================================================================== */
.nav-language {
  position: relative;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  padding: 3px;
  height: 38px;
  border-radius: 9999px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(240, 244, 253, 0.94) 100%);
  border: 1.5px solid rgba(67, 97, 238, 0.22);
  box-shadow: 
    inset 0 1.5px 3px rgba(15, 23, 42, 0.05),
    0 4px 14px -2px rgba(67, 97, 238, 0.12),
    0 1px 2px rgba(0, 0, 0, 0.04);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  isolation: isolate;
  flex-shrink: 0;
  vertical-align: middle;
  user-select: none;
  overflow: hidden;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.nav-language:hover {
  border-color: rgba(96, 54, 250, 0.38);
  box-shadow: 
    inset 0 1.5px 3px rgba(15, 23, 42, 0.04),
    0 6px 18px -2px rgba(96, 54, 250, 0.18);
}

/* The Animated Sliding Pill Glider */
.nav-language::before {
  content: '';
  position: absolute;
  top: 3px;
  bottom: 3px;
  left: 3px;
  width: calc(50% - 3px);
  border-radius: 9999px;
  background: linear-gradient(135deg, #3a56e8 0%, #6036fa 50%, #7928ca 100%);
  box-shadow: 
    0 3px 10px rgba(96, 54, 250, 0.45),
    0 1px 3px rgba(67, 97, 238, 0.25),
    inset 0 1px 1.5px rgba(255, 255, 255, 0.45);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1),
              box-shadow 0.25s ease;
  z-index: 1;
  pointer-events: none;
  will-change: transform;
}

/* Sliding movement based on active state */
.nav-language[data-active-lang="en"]::before,
.nav-language:has(.nav-language__option[data-lang="en"].is-active)::before {
  transform: translateX(100%);
}

.nav-language[data-active-lang="id"]::before,
.nav-language:has(.nav-language__option[data-lang="id"].is-active)::before {
  transform: translateX(0);
}

.nav-language__option {
  position: relative;
  z-index: 2;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 30px;
  padding: 0 10px;
  border: 0;
  border-radius: 9999px;
  background: transparent !important;
  color: #64748b;
  font-family: var(--font-primary, 'DM Sans', sans-serif);
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.05em;
  cursor: pointer;
  outline: none;
  transition: color 0.24s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.18s cubic-bezier(0.34, 1.56, 0.64, 1);
  -webkit-appearance: none;
  appearance: none;
  user-select: none;
}

.nav-language__option.is-active {
  color: #ffffff !important;
  text-shadow: 0 1px 2px rgba(10, 5, 40, 0.35);
  background: transparent !important;
  box-shadow: none !important;
}

.nav-language__option:not(.is-active):hover {
  color: #4361ee;
  transform: scale(1.08);
}

.nav-language__option:active {
  transform: scale(0.92);
}

.nav-language__option:focus-visible {
  outline: 2px solid #6036fa;
  outline-offset: 1px;
}

/* Navigation Links (Desktop) */
.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
  align-items: center;
  flex: 1;
  margin: 0 2rem;
}

.nav-links li {
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
}

.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  transition: color var(--transition-base);
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 0;
  height: 100%;
  white-space: nowrap;
}

.nav-links a:hover {
  color: var(--text);
}

.nav-links a.active {
  color: var(--accent);
  font-weight: 600;
}

/* Navigation Actions */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  position: relative;
  z-index: calc(var(--z-modal) + 5);
  flex-shrink: 0;
}

/* CTA Button */
.nav-cta {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.6rem;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, #3a56e8 0%, #6036fa 45%, #7928ca 100%) !important;
  color: #fff !important;
  font-weight: 700 !important;
  text-decoration: none;
  letter-spacing: -0.01em;
  border: 1px solid rgba(255, 255, 255, 0.28);
  box-shadow: 
    0 4px 18px -2px rgba(96, 54, 250, 0.42),
    0 8px 24px -4px rgba(67, 97, 238, 0.28),
    inset 0 1px 1.5px rgba(255, 255, 255, 0.45),
    inset 0 -1.5px 2px rgba(0, 0, 0, 0.2);
  overflow: hidden;
  isolation: isolate;
  transition: transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1),
              box-shadow 0.28s ease,
              filter 0.25s ease !important;
  z-index: 0;
}

.nav-cta::before {
  content: '';
  position: absolute;
  top: 0;
  left: -120%;
  width: 65%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.38),
    rgba(255, 255, 255, 0.65),
    transparent
  );
  transform: skewX(-24deg);
  transition: left 0.65s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
  border-radius: inherit;
  z-index: 1;
}

.nav-cta:hover::before {
  left: 150%;
}

.nav-cta span {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: #ffffff !important;
  text-shadow: 0 1px 2px rgba(10, 5, 40, 0.3);
}

.nav-cta span::after {
  content: '→';
  display: inline-block;
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 1.05em;
  line-height: 1;
  font-weight: 700;
  transition: transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.nav-cta:hover {
  color: #fff !important;
  transform: translateY(-2.5px) scale(1.02);
  box-shadow: 
    0 10px 28px -2px rgba(96, 54, 250, 0.55),
    0 0 24px rgba(67, 97, 238, 0.38),
    inset 0 1px 2px rgba(255, 255, 255, 0.6);
  filter: brightness(1.06);
}

.nav-cta:hover span::after {
  transform: translateX(4px);
}

.nav-cta:active {
  transform: translateY(0.5px) scale(0.97);
  box-shadow: 
    0 2px 10px rgba(96, 54, 250, 0.35),
    inset 0 1.5px 2px rgba(0, 0, 0, 0.25);
  filter: brightness(0.98);
}

/* Hamburger Button */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  position: relative;
  z-index: calc(var(--z-modal) + 10);
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
}

.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all var(--transition-base);
}

.hamburger:hover span {
  background: var(--accent);
}

/* Hamburger Animation */
.hamburger.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

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

/* ═══════════════════════════════════════════════════════════════
   MOBILE MENU - FULL SCREEN OVERLAY
   Production-grade mobile navigation with proper spacing
   ═══════════════════════════════════════════════════════════════ */

.nav-mobile-menu {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--surface);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  z-index: var(--z-modal);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  overflow: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  max-height: 100vh;
}

/* Mobile Menu Open State */
.nav-mobile-menu.open {
  display: flex;
  flex-direction: column;
  opacity: 1;
  visibility: visible;
}

/* Mobile Menu Header (Sticky) */
.nav-mobile-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  position: sticky;
  top: 0;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  min-height: 64px;
  gap: 0.75rem;
  z-index: 100;
  flex-shrink: 0;
}

/* Header Left Section (Back + Logo) */
.nav-mobile-header-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 1;
  min-width: 0;
}

/* Back Button */
.back-menu-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text);
  cursor: pointer;
  transition: all var(--transition-fast);
  flex-shrink: 0;
  padding: 0;
  font-size: 1.25rem;
}

.back-menu-btn:hover {
  background: var(--surface);
  border-color: var(--accent);
  color: var(--accent);
  transform: scale(1.05);
}

.back-menu-btn:active {
  transform: scale(0.95);
}

/* Mobile Logo Link */
.nav-mobile-logo-link {
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 0;
  text-decoration: none;
}

/* Mobile Logo - Larger for visibility */
.nav-mobile-logo {
  height: 40px;
  width: auto;
  max-width: 140px;
  object-fit: contain;
  object-position: left center;
}

/* Close Button */
.close-menu-btn {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text);
  font-size: 1.5rem;
  cursor: pointer;
  transition: all var(--transition-fast);
  flex-shrink: 0;
  padding: 0;
}

.close-menu-btn:hover {
  background: var(--surface);
  border-color: var(--accent);
  color: var(--accent);
}

/* Mobile Menu Content */
.nav-mobile-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 0;
  padding-bottom: max(1.5rem, env(safe-area-inset-bottom, 1.5rem));
  min-height: auto;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* Main Navigation Links */
.nav-mobile-links {
  display: flex;
  flex-direction: column;
  gap: 0;
  list-style: none;
  margin: 0;
  padding: 0;
  flex: 1;
}

.nav-mobile-links li {
  border-bottom: 1px solid var(--border);
  margin: 0;
  padding: 0;
}

.nav-mobile-links li:last-child {
  border-bottom: none;
}

.nav-mobile-links a {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.125rem 1.25rem;
  color: var(--text);
  text-decoration: none;
  font-size: 1rem;
  font-weight: 600;
  transition: color var(--transition-fast);
  min-height: 56px;
  width: 100%;
  box-sizing: border-box;
}

.nav-mobile-links a:active {
  background: rgba(67, 97, 238, 0.05);
}

.nav-mobile-links a:hover,
.nav-mobile-links a.active {
  color: var(--accent);
}

.nav-mobile-links a svg {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  opacity: 0.6;
  transition: opacity var(--transition-fast);
}

.nav-mobile-links a:hover svg,
.nav-mobile-links a.active svg {
  opacity: 1;
}

/* Dropdown Section */
.nav-mobile-dropdown {
  border-bottom: 1px solid var(--border);
  padding: 0;
  margin: 0;
  flex-shrink: 0;
}

.nav-mobile-dropdown:last-child {
  border-bottom: none;
}

/* Accordion toggle button */
.mobile-dropdown-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 1.125rem 1.25rem;
  background: transparent;
  border: none;
  color: var(--text);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  min-height: 56px;
  transition: all var(--transition-fast);
  gap: 1rem;
  text-align: left;
  box-sizing: border-box;
}

.mobile-dropdown-toggle:active {
  background: rgba(67, 97, 238, 0.05);
}

.mobile-dropdown-toggle:hover {
  color: var(--accent);
}

.mobile-dropdown-toggle svg {
  width: 24px;
  height: 24px;
  transition: transform var(--transition-base);
  flex-shrink: 0;
  opacity: 0.6;
}

.mobile-dropdown-toggle:hover svg {
  opacity: 1;
}

.mobile-dropdown-toggle.active {
  color: var(--accent);
}

.mobile-dropdown-toggle.active svg {
  transform: rotate(180deg);
  opacity: 1;
}

/* Accordion content - hidden by default */
.nav-mobile-dropdown .mobile-dropdown {
  display: none;
  flex-direction: column;
  gap: 0;
  padding: 0;
  margin: 0;
  background: transparent;
  border-radius: 0;
  overflow: hidden;
  border-top: 1px solid var(--border);
}

/* Accordion content - visible when open */
.nav-mobile-dropdown .mobile-dropdown.open {
  display: flex;
}

/* Nested dropdown items */
.nav-mobile-dropdown .mobile-dropdown a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  padding-left: 3.25rem;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 500;
  min-height: 52px;
  border-bottom: none;
  transition: all var(--transition-fast);
  text-decoration: none;
  width: 100%;
  box-sizing: border-box;
}

.nav-mobile-dropdown .mobile-dropdown a:active {
  background: rgba(67, 97, 238, 0.08);
}

.nav-mobile-dropdown .mobile-dropdown a:hover {
  color: var(--accent);
  background: rgba(67, 97, 238, 0.05);
}

.nav-mobile-dropdown .mobile-dropdown a svg {
  width: 18px;
  height: 18px;
  opacity: 0.6;
  flex-shrink: 0;
}

.nav-mobile-dropdown .mobile-dropdown a:hover svg {
  opacity: 1;
}

/* CTA Button in Mobile Menu */
.nav-mobile-cta {
  margin-top: auto;
  padding: 1.5rem 1.25rem;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

.nav-mobile-cta a {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  width: 100%;
  padding: 1rem 1.5rem;
  background: var(--grad);
  color: #fff;
  text-decoration: none;
  font-size: 1rem;
  font-weight: 700;
  border-radius: var(--radius-lg);
  transition: all var(--transition-base);
  box-shadow: 0 4px 15px rgba(67, 97, 238, 0.25);
  min-height: 48px;
  box-sizing: border-box;
}

.nav-mobile-cta a:active {
  transform: scale(0.98);
}

.nav-mobile-cta a:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(67, 97, 238, 0.3);
}

.nav-mobile-cta a svg {
  width: 20px;
  height: 20px;
}

/* Social Links in Mobile Menu */
.nav-mobile-social {
  display: flex;
  gap: 1rem;
  padding: 1.5rem 1.25rem;
  border-top: 1px solid var(--border);
  justify-content: center;
  flex-wrap: wrap;
  flex-shrink: 0;
}

.nav-mobile-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--muted);
  transition: all var(--transition-fast);
  text-decoration: none;
  flex-shrink: 0;
}

.nav-mobile-social a:active {
  transform: scale(0.95);
}

.nav-mobile-social a:hover {
  background: var(--grad);
  border-color: var(--accent);
  color: #fff;
  transform: translateY(-2px);
}

.nav-mobile-social a svg {
  width: 20px;
  height: 20px;
}

.nav-mobile-social a svg {
  width: 20px;
  height: 20px;
}

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE STYLES - TABLET/MOBILE (max-width: 1023px)
   Desktop navbar hidden, mobile hamburger shown
   ═══════════════════════════════════════════════════════════════ */

@media (max-width: 1023px) {
  nav#navbar {
    padding: 0.75rem 1rem;
    height: 64px;
    min-height: 64px;
  }

  .nav-links {
    display: none !important;
  }

  .logo-img {
    height: clamp(40px, 6vw, 46px);
    width: auto;
    max-width: clamp(160px, 46vw, 195px);
  }

  .hamburger {
    display: flex !important;
  }

  .nav-actions .nav-cta {
    display: none !important;
  }
}

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE STYLES - SMALL MOBILE (max-width: 640px)
   ═══════════════════════════════════════════════════════════════ */

@media (max-width: 640px) {
  nav#navbar {
    padding: 0.5rem 0.75rem;
    height: 58px;
    min-height: 58px;
  }

  .logo {
    gap: 0.5rem;
  }

  .logo-img {
    height: clamp(38px, 9vw, 44px);
    width: auto;
    max-width: clamp(150px, 48vw, 180px);
  }

  .hamburger {
    width: 40px;
    height: 40px;
  }

  .hamburger span {
    width: 20px;
    height: 1.5px;
  }

  /* Mobile Menu Adjustments */
  .nav-mobile-header {
    padding: 0.75rem;
    min-height: 56px;
    gap: 0.5rem;
  }

  .nav-mobile-header-left {
    gap: 0.5rem;
  }

  .back-menu-btn {
    width: 40px;
    height: 40px;
  }

  .back-menu-btn svg {
    width: 20px;
    height: 20px;
  }

  .nav-mobile-logo {
    height: 32px;
    max-width: 110px;
  }

  .close-menu-btn {
    width: 40px;
    height: 40px;
    font-size: 1.25rem;
  }

  .nav-mobile-content {
    padding-bottom: max(1rem, env(safe-area-inset-bottom, 1rem));
  }

  .nav-mobile-links a {
    font-size: 0.95rem;
    padding: 1rem 1rem;
    min-height: 52px;
  }

  .nav-mobile-links a svg {
    width: 20px;
    height: 20px;
  }

  .mobile-dropdown-toggle {
    font-size: 0.95rem;
    padding: 1rem 1rem;
    min-height: 52px;
  }

  .mobile-dropdown-toggle svg {
    width: 20px;
    height: 20px;
  }

  .nav-mobile-dropdown .mobile-dropdown a {
    padding: 0.875rem 1rem;
    padding-left: 2.875rem;
    font-size: 0.9rem;
    min-height: 48px;
  }

  .nav-mobile-cta {
    padding: 1rem;
  }

  .nav-mobile-cta a {
    padding: 0.875rem 1.25rem;
    font-size: 0.95rem;
    min-height: 44px;
  }

  .nav-mobile-social {
    padding: 1rem;
    gap: 0.75rem;
  }

  .nav-mobile-social a {
    width: 44px;
    height: 44px;
  }

  .nav-mobile-social a svg {
    width: 18px;
    height: 18px;
  }
}

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE STYLES - VERY SMALL SCREENS (360px and below)
   ═══════════════════════════════════════════════════════════════ */

@media (max-width: 360px) {
  .nav-mobile-links a {
    font-size: 1.15rem;
    padding: 0.75rem 0;
    min-height: 48px;
  }

  .mobile-dropdown-toggle {
    font-size: 1.15rem;
    padding: 0.75rem 0;
    min-height: 48px;
  }

  .nav-mobile-dropdown .mobile-dropdown a {
    font-size: 0.95rem;
    padding: 0.5rem 0;
    padding-left: 0.75rem;
    min-height: 40px;
  }
}

/* ═══════════════════════════════════════════════════════════════
   SCROLL LOCKING & OVERFLOW
   ═══════════════════════════════════════════════════════════════ */

body.menu-open {
  overflow: hidden;
  position: fixed;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
}

body.menu-open main,
body.menu-open footer {
  display: none;
}

/* ═══════════════════════════════════════════════════════════════
   ANIMATIONS
   ═══════════════════════════════════════════════════════════════ */

@keyframes slideInLeft {
  from {
    transform: translateX(-20px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes fadeInUp {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.nav-mobile-menu.open .nav-mobile-links > * {
  animation: slideInLeft 0.4s ease forwards;
}

.nav-mobile-menu.open .nav-mobile-links > *:nth-child(1) { animation-delay: 0.05s; }
.nav-mobile-menu.open .nav-mobile-links > *:nth-child(2) { animation-delay: 0.1s; }
.nav-mobile-menu.open .nav-mobile-links > *:nth-child(3) { animation-delay: 0.15s; }
.nav-mobile-menu.open .nav-mobile-links > *:nth-child(4) { animation-delay: 0.2s; }
.nav-mobile-menu.open .nav-mobile-links > *:nth-child(5) { animation-delay: 0.25s; }
.nav-mobile-menu.open .nav-mobile-links > *:nth-child(6) { animation-delay: 0.3s; }
.nav-mobile-menu.open .nav-mobile-links > *:nth-child(7) { animation-delay: 0.35s; }

.nav-mobile-cta {
  animation: fadeInUp 0.4s ease 0.3s forwards;
  opacity: 0;
}

.nav-mobile-social {
  animation: fadeInUp 0.4s ease 0.4s forwards;
  opacity: 0;
}

/* ═══════════════════════════════════════════════════════════════
   Z-INDEX HIERARCHY
   ═══════════════════════════════════════════════════════════════ */

/*
   z-index layers (highest to lowest):
   - Mobile menu: 9999 (always on top)
   - Hamburger/Logo: 10000 (above menu)
   - Tools overlay: 998
   - Navbar: 100
   - Promo banner: 1000
   - Main content: 1
*/

.nav-mobile-menu {
  z-index: 9999;
}

.logo,
.hamburger {
  z-index: 10000;
}

.nav-mobile-header {
  z-index: 10;
}

/* Mobile navigation alignment and interaction states */
@media (max-width: 1023px) {
  .nav-mobile-menu {
    height: 100vh;
    height: 100dvh;
    max-height: none;
    overflow: hidden;
  }
  .nav-mobile-menu.open {
    display: flex;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0;
  }
  .nav-mobile-header {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) 44px;
    align-items: center;
    gap: 0;
    min-height: 64px;
    padding: calc(env(safe-area-inset-top, 0px) + 0.5rem) 1rem 0.5rem;
    box-sizing: border-box;
  }
  .nav-mobile-header-left { display: contents; }
  .back-menu-btn {
    grid-column: 1;
    grid-row: 1;
    position: relative;
    z-index: 1;
    width: 44px;
    height: 44px;
    transition: color 220ms ease, background-color 220ms ease, border-color 220ms ease, box-shadow 220ms ease, transform 220ms ease;
  }
  .nav-mobile-logo-link {
    grid-column: 2;
    grid-row: 1;
    justify-self: center;
    justify-content: center;
    width: 100%;
    max-width: 140px;
    min-width: 0;
    flex: none;
  }
  .nav-mobile-logo { height: 36px; max-width: 100%; object-position: center; }
  .close-menu-btn {
    grid-column: 3;
    grid-row: 1;
    justify-self: end;
    position: static;
    width: 44px;
    height: 44px;
    transition: color 220ms ease, background-color 220ms ease, border-color 220ms ease, box-shadow 220ms ease, transform 220ms ease;
  }
  .nav-mobile-content {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding-bottom: max(0.75rem, env(safe-area-inset-bottom, 0.75rem));
  }
  .nav-mobile-links { flex: 0 0 auto; }
  .nav-mobile-links a {
    min-height: 52px;
    padding: 0.875rem 1rem;
    transition: color 220ms ease, background-color 220ms ease;
  }
  .nav-mobile-links a:hover,
  .nav-mobile-links a:focus-visible,
  .nav-mobile-links a.active { background-color: rgba(0, 180, 216, 0.06); }
  .nav-mobile-links a svg { transition: color 220ms ease, opacity 220ms ease; }
  .mobile-dropdown-toggle {
    min-height: 52px;
    padding: 0.875rem 1rem;
    transition: color 220ms ease, background-color 220ms ease;
  }
  .mobile-dropdown-toggle:hover,
  .mobile-dropdown-toggle:focus-visible,
  .mobile-dropdown-toggle.open,
  .mobile-dropdown-toggle.active { color: var(--accent); }
  .mobile-dropdown-toggle:active { background-color: rgba(0, 180, 216, 0.06); }
  .mobile-dropdown-toggle .mobile-dropdown-indicator {
    width: 24px;
    height: 24px;
    flex: 0 0 24px;
    opacity: 0.72;
    transition: color 220ms ease, opacity 220ms ease;
  }
  .mobile-dropdown-toggle .indicator-vertical {
    transform-box: fill-box;
    transform-origin: center;
    transition: transform 220ms ease, opacity 220ms ease;
  }
  .mobile-dropdown-toggle.open .mobile-dropdown-indicator,
  .mobile-dropdown-toggle.active .mobile-dropdown-indicator { opacity: 1; }
  .mobile-dropdown-toggle.open .indicator-vertical,
  .mobile-dropdown-toggle.active .indicator-vertical {
    opacity: 0;
    transform: scaleY(0);
  }
  .nav-mobile-dropdown .mobile-dropdown {
    display: flex;
    max-height: 0;
    visibility: hidden;
    opacity: 0;
    overflow: hidden;
    pointer-events: none;
    border-top-color: transparent;
    transition: max-height 280ms ease, opacity 200ms ease, border-color 200ms ease, visibility 0s linear 280ms;
  }
  .nav-mobile-dropdown .mobile-dropdown.open {
    max-height: 32rem;
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
    border-top-color: var(--border);
    transition: max-height 280ms ease, opacity 200ms ease, border-color 200ms ease, visibility 0s linear 0s;
  }
  .nav-mobile-dropdown .mobile-dropdown a { transition: color 220ms ease, background-color 220ms ease; }
  .nav-mobile-cta {
    position: sticky;
    bottom: 0;
    z-index: 2;
    background: var(--surface);
    padding: 1rem;
    transition: border-color 220ms ease, background-color 220ms ease;
  }
  .nav-mobile-cta a { transition: color 220ms ease, box-shadow 220ms ease, transform 220ms ease; }
  .nav-mobile-social a {
    transition: color 220ms ease, background-color 220ms ease, border-color 220ms ease, box-shadow 220ms ease, transform 220ms ease;
  }
}
@media (max-width: 360px) {
  .nav-mobile-header {
    grid-template-columns: 44px minmax(0, 1fr) 44px;
    padding-right: 0.75rem;
    padding-left: 0.75rem;
  }
  .nav-mobile-logo-link { max-width: 112px; }
  .nav-mobile-links a,
  .mobile-dropdown-toggle {
    min-height: 50px;
    padding: 0.75rem 0.875rem;
    font-size: 1rem;
  }
  .nav-mobile-dropdown .mobile-dropdown a {
    min-height: 44px;
    padding: 0.625rem 0.875rem 0.625rem 1.5rem;
    font-size: 0.9rem;
  }
}
@media (prefers-reduced-motion: reduce) {
  .nav-mobile-menu,
  .nav-mobile-menu *,
  .nav-mobile-menu *::before,
  .nav-mobile-menu *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body.menu-open #toolsOverlay,
body.menu-open #backToTop {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}
