/* Mobile Menu Styles - Force display on mobile */

/* Backdrop - Beautiful blur effect */
#siteMobileBackdrop {
  position: fixed !important;
  left: 0 !important;
  right: 0 !important;
  top: 0 !important;
  bottom: 0 !important;
  width: 100% !important;
  height: 100% !important;
  background: linear-gradient(135deg, rgba(13, 47, 107, 0.6) 0%, rgba(0, 0, 0, 0.7) 100%) !important;
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
  z-index: 9999 !important;
  transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1), backdrop-filter 0.4s ease !important;
}

@media (max-width: 1023px) {
  #siteMobileBackdrop {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
  }
  
  #siteMobileBackdrop.lg\:hidden {
    display: block !important;
  }
}

/* Force display when backdrop is open */
#siteMobileBackdrop.mobile-backdrop-open {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}

@media (min-width: 1024px) {
  #siteMobileBackdrop.mobile-backdrop-open {
    display: block !important;
  }
}

/* Menu Panel - MUST be above backdrop - Beautiful Modern Design */
#siteMobileNav {
  position: fixed !important;
  left: 0 !important;
  right: 0 !important;
  top: 64px !important;
  bottom: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  background: linear-gradient(to bottom right, #ffffff, #f9fafb, #ffffff) !important;
  z-index: 10001 !important; /* Higher than backdrop (9999) and header (9999) */
  overflow-y: auto !important;
  overflow-x: hidden !important;
  pointer-events: auto !important;
  box-shadow: 0 -20px 25px -5px rgba(0, 0, 0, 0.1), 0 -10px 10px -5px rgba(0, 0, 0, 0.04) !important;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s ease !important;
  -webkit-overflow-scrolling: touch !important;
}

/* Dark mode background */
.dark #siteMobileNav {
  background: linear-gradient(to bottom right, #111827, #1f2937, #111827) !important;
}

/* CRITICAL: Override Tailwind's lg:hidden on mobile */
@media (max-width: 1023px) {
  #siteMobileNav {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
  }
  
  /* Override Tailwind's responsive display:none */
  #siteMobileNav.lg\:hidden {
    display: block !important;
  }
}

/* Force display when menu is open, regardless of screen size */
#siteMobileNav.mobile-menu-open {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}

/* Override any Tailwind responsive classes */
@media (min-width: 1024px) {
  #siteMobileNav.mobile-menu-open {
    display: block !important;
  }
}

.dark #siteMobileNav {
  background-color: #111827 !important;
}

/* Toggle Button */
#siteMenuToggle {
  position: relative !important;
  z-index: 10001 !important;
  pointer-events: auto !important;
  cursor: pointer !important;
  -webkit-tap-highlight-color: transparent !important;
}

/* Ensure menu is visible when open */
#siteMobileNav.mobile-menu-open {
  transform: translateY(0) !important;
  opacity: 1 !important;
  visibility: visible !important;
  display: block !important;
}

/* Beautiful animations for menu items */
#siteMobileNav .mobile-link {
  opacity: 0;
  transform: translateX(-20px);
  animation: slideInLeft 0.4s ease-out forwards;
}

#siteMobileNav.mobile-menu-open .mobile-link:nth-child(1) { animation-delay: 0.1s; }
#siteMobileNav.mobile-menu-open .mobile-link:nth-child(2) { animation-delay: 0.15s; }
#siteMobileNav.mobile-menu-open .mobile-link:nth-child(3) { animation-delay: 0.2s; }
#siteMobileNav.mobile-menu-open .mobile-link:nth-child(4) { animation-delay: 0.25s; }
#siteMobileNav.mobile-menu-open .mobile-link:nth-child(5) { animation-delay: 0.3s; }

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Smooth scrollbar styling */
#siteMobileNav::-webkit-scrollbar {
  width: 6px;
}

#siteMobileNav::-webkit-scrollbar-track {
  background: transparent;
}

#siteMobileNav::-webkit-scrollbar-thumb {
  background: rgba(13, 47, 107, 0.3);
  border-radius: 3px;
}

#siteMobileNav::-webkit-scrollbar-thumb:hover {
  background: rgba(13, 47, 107, 0.5);
}

.dark #siteMobileNav::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
}

.dark #siteMobileNav::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

#siteMobileBackdrop.mobile-backdrop-open {
  opacity: 1 !important;
  pointer-events: auto !important;
  visibility: visible !important;
  display: block !important;
}

