/* ================================================
   MOBILE NAVIGATION SYSTEM
   Complete mobile navigation with header and drawer
   ================================================ */

/* ========== MOBILE HEADER ========== */
@media (max-width: 1023px) {
  /* Ensure the header nav is visible and properly styled */
  .hero-header-nav {
    position: fixed !important;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9990 !important;
    background: rgba(15, 23, 42, 0.95) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
  }

  /* FORCE HIDE ALL DESKTOP NAVIGATION ELEMENTS */
  .hero-header-nav > div > div > div:nth-child(2),
  .hero-header-nav .hidden.lg\:flex,
  .hero-header-nav [class*="lg:flex"]:not(.menu-toggle),
  .hero-header-nav [class*="lg:inline-flex"],
  .hero-header-nav a[href="/login"],
  .hero-header-nav a[href="/contact"].hidden,
  .hero-header-nav .flex.items-center.justify-end a:not(.menu-toggle) {
    display: none !important;
    visibility: hidden !important;
  }

  /* Hide the entire desktop nav links container */
  .hero-header-nav .px-4 > .flex > div.hidden {
    display: none !important;
  }

  /* Make the menu toggle visible and styled */
  .menu-toggle,
  .hero-header-nav button[type="button"],
  button.lg\:hidden {
    display: flex !important;
    visibility: visible !important;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    transition: all 0.2s ease;
  }

  .menu-toggle:hover,
  .menu-toggle:active {
    background: rgba(255, 255, 255, 0.15);
  }

  .menu-toggle svg {
    width: 24px;
    height: 24px;
  }

  /* Add padding to body to account for fixed header */
  body {
    padding-top: 64px;
  }
}

/* ========== MOBILE NAVIGATION DRAWER ========== */
.mobile-nav-drawer {
  display: none;
}

@media (max-width: 1023px) {
  .mobile-nav-drawer {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9995;
    pointer-events: none;
  }

  .mobile-nav-drawer.open {
    pointer-events: auto;
  }

  /* Backdrop */
  .mobile-nav-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    opacity: 0;
    transition: opacity 0.3s ease;
  }

  .mobile-nav-drawer.open .mobile-nav-backdrop {
    opacity: 1;
  }

  /* Drawer Panel - Navy premium theme */
  .mobile-nav-panel {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 300px;
    max-width: 85%;
    background: linear-gradient(180deg, #0f172a 0%, #1e3a5f 100%);
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    box-shadow: -4px 0 30px rgba(0, 0, 0, 0.4);
  }

  .mobile-nav-drawer.open .mobile-nav-panel {
    transform: translateX(0);
  }

  /* Drawer Header */
  .mobile-nav-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  .mobile-nav-logo {
    height: 28px;
    width: auto;
  }

  .mobile-nav-close {
    width: 36px;
    height: 36px;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
  }

  .mobile-nav-close:hover {
    background: rgba(255, 255, 255, 0.15);
  }

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

  /* Drawer Navigation Links */
  .mobile-nav-list {
    padding: 1rem;
    list-style: none;
    margin: 0;
  }

  .mobile-nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    border-radius: 10px;
    margin-bottom: 0.25rem;
    transition: background 0.2s ease;
  }

  .mobile-nav-link:hover,
  .mobile-nav-link.active {
    background: rgba(217, 119, 6, 0.15);
    color: #f59e0b;
  }

  .mobile-nav-link svg {
    width: 22px;
    height: 22px;
    opacity: 0.7;
  }

  .mobile-nav-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 0.75rem 0;
  }

  /* Drawer CTA Section */
  .mobile-nav-cta {
    padding: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
  }

  .mobile-nav-cta-btn {
    display: block;
    padding: 0.875rem;
    text-align: center;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9375rem;
    margin-bottom: 0.625rem;
    transition: all 0.2s ease;
  }

  .mobile-nav-cta-login {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
  }

  .mobile-nav-cta-login:hover {
    background: rgba(255, 255, 255, 0.15);
  }

  .mobile-nav-cta-start {
    background: linear-gradient(135deg, #d97706, #f59e0b);
    color: white;
  }

  .mobile-nav-cta-start:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(217, 119, 6, 0.4);
  }
}

/* ========== MOBILE BOTTOM NAVIGATION (Gold Theme) ========== */
/* Override inline styles with gold accent colors */
@media (max-width: 1023px) {
  .mobile-bottom-nav {
    display: block !important;
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    height: 65px !important;
    background: #0f172a !important;
    border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
    z-index: 99999 !important;
    padding-bottom: env(safe-area-inset-bottom, 0) !important;
  }

  .mobile-bottom-nav-inner {
    display: flex !important;
    height: 100% !important;
    max-width: 500px !important;
    margin: 0 auto !important;
  }

  .mobile-nav-item {
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    color: rgba(255, 255, 255, 0.6) !important;
    text-decoration: none !important;
    font-size: 10px !important;
    font-weight: 500 !important;
    gap: 4px !important;
    transition: color 0.2s !important;
  }

  /* Use gold accent for active/hover states instead of purple */
  .mobile-nav-item:hover,
  .mobile-nav-item.active {
    color: #d97706 !important;
  }

  .mobile-nav-item svg {
    width: 24px !important;
    height: 24px !important;
  }

  /* Mobile Drawer Overlay */
  .mobile-drawer-overlay {
    display: block !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background: rgba(0, 0, 0, 0.7) !important;
    z-index: 99998 !important;
    opacity: 0 !important;
    visibility: hidden !important;
    transition: opacity 0.3s, visibility 0.3s !important;
  }

  .mobile-drawer-overlay.open {
    opacity: 1 !important;
    visibility: visible !important;
  }

  /* Mobile Drawer - Navy + Gold Theme */
  .mobile-drawer {
    display: block !important;
    position: fixed !important;
    top: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 280px !important;
    max-width: 85% !important;
    background: linear-gradient(180deg, #0f172a 0%, #1e3a5f 100%) !important;
    z-index: 100000 !important;
    transform: translateX(100%) !important;
    transition: transform 0.3s ease !important;
    overflow-y: auto !important;
  }

  .mobile-drawer.open {
    transform: translateX(0) !important;
  }

  .mobile-drawer-header {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 16px 20px !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
  }

  .mobile-drawer-logo {
    height: 28px !important;
    width: auto !important;
  }

  .mobile-drawer-close {
    width: 36px !important;
    height: 36px !important;
    border: none !important;
    background: rgba(255, 255, 255, 0.1) !important;
    border-radius: 8px !important;
    color: white !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  .mobile-drawer-nav {
    padding: 16px !important;
  }

  .mobile-drawer-link {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    padding: 14px 16px !important;
    color: rgba(255, 255, 255, 0.9) !important;
    text-decoration: none !important;
    font-size: 16px !important;
    font-weight: 500 !important;
    border-radius: 10px !important;
    margin-bottom: 4px !important;
  }

  /* Gold hover and active states */
  .mobile-drawer-link:hover,
  .mobile-drawer-link.active {
    background: rgba(217, 119, 6, 0.15) !important;
    color: #f59e0b !important;
  }

  .mobile-drawer-link svg {
    width: 22px !important;
    height: 22px !important;
    opacity: 0.7 !important;
  }

  .mobile-drawer-divider {
    height: 1px !important;
    background: rgba(255, 255, 255, 0.1) !important;
    margin: 12px 0 !important;
  }

  .mobile-drawer-cta {
    padding: 16px !important;
    border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
  }

  .mobile-cta-btn {
    display: block !important;
    padding: 14px !important;
    text-align: center !important;
    border-radius: 10px !important;
    text-decoration: none !important;
    font-weight: 600 !important;
    font-size: 15px !important;
    margin-bottom: 10px !important;
  }

  .mobile-cta-login {
    background: rgba(255, 255, 255, 0.1) !important;
    color: white !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
  }

  /* Gold gradient for primary CTA */
  .mobile-cta-start {
    background: linear-gradient(135deg, #d97706, #f59e0b) !important;
    color: white !important;
  }

  /* Add body padding for mobile nav */
  body {
    padding-bottom: 70px !important;
  }
}

/* HIDE mobile nav on desktop screens (1024px and up) */
@media (min-width: 1024px) {
  .mobile-bottom-nav,
  .mobile-drawer-overlay,
  .mobile-drawer {
    display: none !important;
    visibility: hidden !important;
  }

  body {
    padding-bottom: 0 !important;
  }
}

/* ========== DESKTOP: HIDE ALL MOBILE ELEMENTS ========== */
@media (min-width: 1024px) {
  .mobile-nav-drawer,
  .mobile-nav-backdrop,
  .mobile-nav-panel {
    display: none !important;
    visibility: hidden !important;
  }
}
