
/* -----------------------------
   Mobile Menu Overlay
   Polished version with all details
----------------------------- */
.mobile-menu {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(3, 5, 8, 0.97);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s ease;
  pointer-events: none;
  /* Prevent scroll on the overlay itself */
  overflow: hidden;
  overscroll-behavior: contain;
}

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

.mobile-menu__content {
  display: flex;
  flex-direction: column;
  gap: 0;
  text-align: center;
  width: 100%;
  max-width: 320px;
  padding: var(--space-4);
  transform: translateY(30px) scale(0.95);
  opacity: 0;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), 
              opacity 0.3s ease;
}

.mobile-menu.is-open .mobile-menu__content {
  transform: translateY(0) scale(1);
  opacity: 1;
  transition-delay: 0.1s;
}

/* Navigation Links */
.mobile-link {
  display: block;
  font-size: clamp(1.25rem, 5vw, 1.5rem);
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  padding: 16px 20px;
  border-radius: 12px;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
  position: relative;
}

.mobile-link:hover,
.mobile-link:focus {
  color: var(--primary);
  background: rgba(79, 142, 255, 0.1);
  text-decoration: none;
}

.mobile-link:active {
  transform: scale(0.98);
  background: rgba(79, 142, 255, 0.15);
}

/* CTA Button in menu - override mobile-link padding */
.mobile-link.btn {
  padding: 18px 24px;
  margin-top: var(--space-4);
}

/* Nav Toggle Button (Hamburger) */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: 110;
  padding: 10px;
  position: relative;
  border-radius: 8px;
  transition: background 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.nav-toggle:hover {
  background: rgba(255, 255, 255, 0.05);
}

.nav-toggle:active {
  background: rgba(255, 255, 255, 0.1);
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background-color: var(--text);
  border-radius: 2px;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              opacity 0.2s ease,
              width 0.2s ease;
  transform-origin: center;
}

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

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

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

/* Responsive visibility */
@media (min-width: 769px) {
  .nav-toggle, 
  .mobile-menu {
    display: none !important;
  }
}

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