/* Modern Mobile Menu - Advanced Animations & Effects */

/* Smooth scrolling for the entire page */
html {
  scroll-behavior: smooth;
}

/* Enhanced Mobile Menu Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInFromRight {
  from {
    transform: translateX(100%);
  }
  to {
    transform: translateX(0);
  }
}

@keyframes bounceIn {
  0% {
    opacity: 0;
    transform: scale(0.3);
  }
  50% {
    opacity: 1;
    transform: scale(1.05);
  }
  70% {
    transform: scale(0.9);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.7);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(245, 158, 11, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(245, 158, 11, 0);
  }
}

/* Mobile Menu Panel Enhanced Animations */
.mobile-nav-panel {
  transform: translateX(100%);
  transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.mobile-nav-panel.is-open {
  transform: translateX(0);
  animation: slideInFromRight 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Mobile Menu Header Animation */
.mobile-nav-header {
  animation: fadeInUp 0.5s ease-out 0.2s both;
}

/* Mobile Menu Logo Animation */
.mobile-nav-logo img {
  transition: transform 0.3s ease;
}

.mobile-nav-logo:hover img {
  transform: rotate(360deg) scale(1.1);
}

/* Enhanced Menu Item Hover Effects */
.mobile-nav-menu a {
  position: relative;
  overflow: hidden;
}

.mobile-nav-menu a::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.6s ease;
}

.mobile-nav-menu a:hover::before {
  left: 100%;
}

/* Ripple Effect on Menu Items */
.mobile-nav-menu a {
  position: relative;
  overflow: hidden;
}

.mobile-nav-menu a::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.6s ease, height 0.6s ease;
}

.mobile-nav-menu a:active::after {
  width: 300px;
  height: 300px;
}

/* Enhanced CTA Button Animation */
.mobile-nav-cta {
  animation: bounceIn 0.6s ease-out 0.8s both;
  position: relative;
}

.mobile-nav-cta:hover {
  animation: pulse 1.5s infinite;
}

/* Backdrop Blur Enhancement */
.mobile-nav-overlay {
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.mobile-nav-overlay.is-open {
  animation: fadeInUp 0.3s ease-out;
}

/* Loading State Animation */
.mobile-nav-panel.loading {
  pointer-events: none;
}

.mobile-nav-panel.loading::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--passport-gold), var(--passport-blue), var(--passport-gold));
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
}

@keyframes loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* Micro-interactions for Better UX */
.mobile-nav-content li {
  transform: translateX(50px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.mobile-nav-panel.is-open .mobile-nav-content li {
  transform: translateX(0);
  opacity: 1;
}

/* Staggered delays for menu items */
.mobile-nav-panel.is-open .mobile-nav-content li:nth-child(1) { transition-delay: 0.1s; }
.mobile-nav-panel.is-open .mobile-nav-content li:nth-child(2) { transition-delay: 0.15s; }
.mobile-nav-panel.is-open .mobile-nav-content li:nth-child(3) { transition-delay: 0.2s; }
.mobile-nav-panel.is-open .mobile-nav-content li:nth-child(4) { transition-delay: 0.25s; }
.mobile-nav-panel.is-open .mobile-nav-content li:nth-child(5) { transition-delay: 0.3s; }
.mobile-nav-panel.is-open .mobile-nav-content li:nth-child(6) { transition-delay: 0.35s; }

/* Enhanced Focus States */
.mobile-nav-menu a:focus,
.mobile-nav-close:focus,
.mobile-nav-cta:focus {
  outline: 3px solid var(--passport-gold);
  outline-offset: 2px;
  background: rgba(245, 158, 11, 0.2);
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
  .mobile-nav-panel {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  }
  
  .mobile-nav-menu a {
    color: #e2e8f0;
  }
  
  .mobile-nav-overlay {
    background: rgba(0, 0, 0, 0.7);
  }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
  .mobile-nav-panel {
    background: #000;
    border: 2px solid #fff;
  }
  
  .mobile-nav-menu a {
    color: #fff;
    border-bottom: 1px solid #fff;
  }
  
  .mobile-nav-cta {
    background: #fff;
    color: #000;
    border: 2px solid #000;
  }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
  .mobile-nav-panel,
  .mobile-nav-overlay,
  .mobile-nav-menu li,
  .mobile-nav-header,
  .mobile-nav-cta,
  .hamburger span {
    animation: none !important;
    transition-duration: 0.01ms !important;
  }
  
  .mobile-nav-panel.is-open {
    transform: translateX(0);
  }
  
  .mobile-nav-menu li {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
  .mobile-nav-menu a {
    padding: 1.25rem 1.5rem;
    min-height: 48px;
  }
  
  .mobile-nav-toggle {
    min-width: 48px;
    min-height: 48px;
  }
  
  .mobile-nav-close {
    min-width: 48px;
    min-height: 48px;
  }
}

/* Performance Optimizations */
.mobile-nav-panel {
  will-change: transform;
  contain: layout style paint;
}

.mobile-nav-overlay {
  will-change: opacity;
  contain: layout style paint;
}

.hamburger span {
  will-change: transform;
}

/* Custom Scrollbar for Mobile Menu */
.mobile-nav-panel::-webkit-scrollbar {
  width: 4px;
}

.mobile-nav-panel::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.1);
}

.mobile-nav-panel::-webkit-scrollbar-thumb {
  background: rgba(245, 158, 11, 0.6);
  border-radius: 2px;
}

.mobile-nav-panel::-webkit-scrollbar-thumb:hover {
  background: rgba(245, 158, 11, 0.8);
}