/* ==========================================================================
   FIXILA - MOBILE NAVIGATION STYLESHEET
   Save as: /css/mobile-navigation.css
   Used on: ALL PAGES (mobile only - screens under 968px)
   ========================================================================== */

/* ==========================================================================
   MOBILE NAV TOGGLE BUTTON
   ========================================================================== */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.nav-toggle svg {
  width: 28px;
  height: 28px;
}

/* ==========================================================================
   MOBILE NAVIGATION (< 968px)
   ========================================================================== */
@media (max-width: 968px) {
  
  /* Show hamburger menu */
  .nav-toggle {
    display: block;
  }

  /* Hide nav links by default */
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: #001833;
    flex-direction: column;
    padding: 1rem 0;
    gap: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  }

  /* Show nav when open */
  .nav-links.open {
    display: flex;
  }

  /* Style nav links */
  .nav-links > a {
    padding: 1rem 2rem !important;
    width: 100%;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  .nav-links > a::after {
    display: none;
  }

  /* ==========================================================================
     MOBILE DROPDOWN STYLING
     ========================================================================== */
  
  /* Dropdown container */
  .dropdown,
  .mega-dropdown {
    width: 100%;
  }

  /* Dropdown toggle button */
  .dropdown-toggle {
    padding: 1rem 2rem !important;
    width: 100%;
    text-align: center;
    justify-content: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  /* Remove hover behavior on mobile */
  .dropdown:hover .dropdown-menu,
  .mega-dropdown:hover .mega-menu {
    display: none;
  }

  /* Show dropdowns when active class is added via JavaScript */
  .dropdown.active .dropdown-menu,
  .mega-dropdown.active .mega-menu {
    display: block;
  }

  /* Regular dropdown menu */
  .dropdown-menu {
    position: static;
    box-shadow: none;
    background: rgba(0, 0, 0, 0.3);
    margin-top: 0;
    border-radius: 0;
    min-width: 100%;
  }

  .dropdown-menu li a {
    padding: 0.75rem 2.5rem;
    text-align: center;
    color: rgba(255, 255, 255, 0.9);
  }

  .dropdown-menu li a:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
  }

  /* ==========================================================================
     MOBILE MEGA MENU STYLING
     ========================================================================== */

  /* Mega menu container */
  .mega-menu {
    position: static !important;
    transform: none !important;
    left: 0 !important;
    min-width: 100% !important;
    width: 100% !important;
    max-width: 100% !important;
    grid-template-columns: 1fr !important;
    gap: 1.5rem !important;
    padding: 1.5rem !important;
    margin-top: 0;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 0;
  }

  /* Mega menu columns */
  .mega-menu-column {
    width: 100% !important;
    padding: 0 !important;
  }

  .mega-menu-column h4 {
    text-align: center;
    font-size: 0.85rem !important;
    margin-bottom: 1rem !important;
    color: #74C0FC !important;
  }

  .mega-menu-column a {
    text-align: center !important;
    padding: 0.75rem 1rem !important;
    white-space: normal !important;
    color: rgba(255, 255, 255, 0.9) !important;
  }

  .mega-menu-column a:hover {
    transform: none !important;
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.1) !important;
  }

  /* Fix for any nested lists in mega menus */
  .mega-menu-column ul {
    list-style: none;
    padding: 0;
    margin: 0;
  }

  .mega-menu-column ul li a {
    color: rgba(255, 255, 255, 0.9) !important;
  }

  /* Two-column variant on mobile */
  .mega-menu-two-col {
    grid-template-columns: 1fr !important;
    min-width: 100% !important;
  }

  /* ==========================================================================
     COMPANY MEGA MENU - MOBILE
     ========================================================================== */

  .company-mega .mega-menu {
    min-width: 100% !important;
    width: 100% !important;
    max-width: 100% !important;
    left: 0 !important;
    padding: 1.5rem !important;
  }

  .company-mega .mega-menu-column {
    padding: 0 !important;
  }

  .company-mega .mega-menu-column h4 {
    text-align: center;
    color: #74C0FC !important;
  }

  .company-mega .mega-menu-column a {
    text-align: center !important;
    white-space: normal;
    color: rgba(255, 255, 255, 0.9) !important;
  }

  .company-mega .mega-menu-column a:hover {
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.1) !important;
  }

  /* ==========================================================================
     PORTAL BUTTON - MOBILE
     ========================================================================== */

  .portal-btn {
    width: 100%;
    text-align: center;
    padding: 1rem 2rem !important;
    border-radius: 0 !important;
    margin-top: 1rem;
  }

  /* ==========================================================================
     GOOGLE TRANSLATE - MOBILE
     ========================================================================== */

  #google_translate_element {
    width: 100%;
    text-align: center;
    padding: 1rem 0;
  }

  /* ==========================================================================
     CATCH-ALL: Ensure ALL dropdown/submenu links are light colored
     MUST use !important to override base navigation.css
     ========================================================================== */
  
  /* Override base navigation.css which has dark colors with !important */
  .nav-links .mega-menu-column a,
  .nav-links.open .mega-menu-column a,
  .mega-dropdown.active .mega-menu-column a,
  .dropdown.active .mega-menu-column a,
  .nav-links .dropdown-menu a,
  .nav-links .mega-menu a,
  .nav-links .dropdown-menu li a,
  .nav-links .mega-menu-column li a,
  .dropdown.active .dropdown-menu a,
  .mega-dropdown.active .mega-menu a {
    color: rgba(255, 255, 255, 0.9) !important;
    background: transparent !important;
  }

  .nav-links .mega-menu-column a:hover,
  .nav-links.open .mega-menu-column a:hover,
  .mega-dropdown.active .mega-menu-column a:hover,
  .nav-links .dropdown-menu a:hover,
  .nav-links .mega-menu a:hover {
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.1) !important;
  }

}

/* ==========================================================================
   TABLET SIZE (768px - 968px)
   ========================================================================== */
@media (max-width: 968px) and (min-width: 768px) {
  
  .mega-menu {
    padding: 2rem !important;
  }

  .mega-menu-column a {
    padding: 0.75rem 1.5rem !important;
  }

}

/* ==========================================================================
   SMALL MOBILE (< 480px)
   ========================================================================== */
@media (max-width: 480px) {
  
  .nav-links > a,
  .dropdown-toggle {
    padding: 0.875rem 1.5rem !important;
    font-size: 0.9rem;
  }

  .mega-menu {
    padding: 1rem !important;
    gap: 1rem !important;
  }

  .mega-menu-column h4 {
    font-size: 0.8rem !important;
  }

  .mega-menu-column a {
    padding: 0.625rem 0.75rem !important;
    font-size: 0.85rem !important;
  }

  .dropdown-menu li a {
    padding: 0.625rem 2rem;
    font-size: 0.875rem;
  }

}