/* --- NAVBAR STYLES (Extracted from style.css) --- */

/* 1. Variables & Body Lock */
:root {
    --navbar-height: 80px;
    --mega-menu-transition: max-height 0.4s cubic-bezier(0.86, 0, 0.07, 1), opacity 0.4s ease-out;
  }
  
  /* Optional: Prevent vertical scrolling when mobile menu is open */
  body.no-scroll {
      overflow: hidden;
  }
  
  /* 2. Navbar (Unified Desktop & Mobile) */
  .navbar {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 15px 40px; /* Base padding */
    background: rgba(255, 255, 255, 0.9); 
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    position: sticky; 
    top: 0;
    z-index: 1000;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
    height: var(--navbar-height);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08); 
  }
  
  /* Desktop Centering and Background for Links */
  .nav-content {
    max-width: 1200px;
    margin: 0 auto;
    height: var(--navbar-height);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 40px; /* Base content padding */
    width: 100%;
  }
  
  .logo {
    margin-right: 25px; 
    z-index: 1002;
  }
  
  .logo img {
    height: 60px;
    width: auto;
    display: block;
  }
  
  .nav-links-center-wrapper {
    display: flex;
    flex-grow: 1; 
    justify-content: center;
    background: rgba(255, 255, 255); 
    padding: 5px 20px;
    border-radius: 50px;
    margin-right: 25px; 
  }
  
  .nav-links {
    list-style: none;
    display: flex;
    gap: 25px;
    padding: 0; 
    margin: 0; 
  }
  
  .nav-links a {
    color: var(--color-text); 
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    padding: 10px 0;
    display: block;
    line-height: 1.1; 
  }
  
  .nav-links a:hover {
    color: #555;
  }
  
  .nav-right {
    display: flex;
    align-items: center;
  }
  
  .nav-cta {
    padding: 10px 25px;
    background: linear-gradient(90deg, #FFC72C 0%, var(--color-sun) 100%) ; 
    color: var(--color-text) ; 
    font-weight: 600;
    border-radius: 50px;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none !important;
    box-shadow: 0 4px 8px rgba(255, 153, 0, 0.3);
  }
  
  .nav-cta:hover {
    background: linear-gradient(90deg, var(--color-sun) 0%, #FFC72C 100%) ;
    box-shadow: 0 6px 12px rgba(255, 153, 0, 0.4); 
  }
  
  /* 3.1 Mobile Toggle Button */
  .menu-toggle {
      display: none; 
      background: none;
      border: none;
      cursor: pointer;
      padding: 10px;
      z-index: 1002;
  }
  
  .hamburger {
      width: 24px;
      height: 2px;
      background-color: transparent; 
      position: relative;
      transition: background-color 0.3s ease;
  }
  
  .hamburger::before,
  .hamburger::after {
      content: '';
      position: absolute;
      width: 80%;
      height: 2px;
      background-color: var(--color-text);
      transition: transform 0.3s ease, top 0.3s ease;
  }
  
  .hamburger::before {
      top: -4px;
  }
  
  .hamburger::after {
      top: 4px;
  }
  
  /* Animation to transform lines into an 'X' */
  .navbar.menu-open .hamburger {
      background-color: transparent;
  }
  
  .navbar.menu-open .hamburger::before {
      transform: rotate(45deg);
      top: 0;
  }
  
  .navbar.menu-open .hamburger::after {
      transform: rotate(-45deg);
      top: 0;
  }
  
  
  /* 3.2 FULL-WIDTH MEGA-MENU STYLES (DESKTOP) */
  
  .nav-links li.has-dropdown {
    position: static; 
    display: block; 
  }
  
  /* Change link color on HOVER, FOCUS-WITHIN, or when dropdown is OPEN */
  .nav-links li.has-dropdown:hover > a, 
  .nav-links li.has-dropdown.is-open > a,
  .nav-links li.has-dropdown:focus-within > a, 
  .nav-links li.has-dropdown > a:focus         
  {
      color: var(--color-primary);
  }
  
  .dropdown-menu {
    position: absolute;
    top: var(--navbar-height); 
    
    /* FULL-WIDTH PROPERTIES */
    left: 0;       
    right: 0;
    width: 100vw;
    max-width: 100vw;
    
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 0 0 12px 12px; 
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1); 
    padding: 30px 40px; 
    
    opacity: 0;
    visibility: hidden;
    pointer-events: none; 
    
    max-height: 0;
    overflow: hidden;
    
    transition: opacity 0.3s ease-out, max-height 0s 0.3s, visibility 0s 0.3s;
                
    z-index: 998; 
  }
  
  /* Show dropdown on HOVER, OPEN class, or FOCUS-WITHIN */
  .has-dropdown:hover > .dropdown-menu, 
  .has-dropdown.is-open > .dropdown-menu,
  .has-dropdown:focus-within > .dropdown-menu
  {
    opacity: 1;
    visibility: visible; 
    pointer-events: auto; 
    max-height: 600px; 
    
    transition: opacity 0.3s ease-out, max-height 0.4s cubic-bezier(0.86, 0, 0.07, 1);
  }
  
  
  .dropdown-content-wrapper {
      display: flex;
      gap: 40px;
      text-align: left;
      max-width: 1200px; 
      margin: 0 auto; 
  }
  
  .products-grid-3col {
      grid-template-columns: repeat(3, 1fr);
      display: grid;
  }
  
  .for-you-grid, 
  .mon-app-grid, 
  .projects-grid, 
  .support-grid, 
  .about-grid {
      grid-template-columns: repeat(2, 1fr); 
      display: grid;
  }
  
  .dropdown-menu ul {
    list-style: none;
    padding-left: 0; 
  }
  
  .dropdown-menu li {
    padding: 0;
    display: block; 
  }
  
  .dropdown-menu .menu-title {
      font-size: 1.2rem;
      font-weight: 700;
      color: var(--color-text);
      margin-bottom: 15px;
      display: block;
      text-transform: uppercase;
      letter-spacing: 0.5px;
  }
  
  .dropdown-menu a {
    color: #555;
    padding: 4px 0;
    font-weight: 500;
    display: block; 
    white-space: nowrap; 
    transition: color 0.2s ease, transform 0.1s ease;
  }
  
  .dropdown-menu a:hover,
  .dropdown-menu a:focus { 
    color: var(--color-primary); 
    transform: translateX(5px);
  }
  
  .promo-card {
      background: #f0f0f5; 
      padding: 20px;
      border-radius: 8px;
      display: flex;
      flex-direction: column;
      justify-content: center;
      align-items: flex-start;
  }
  
  .promo-card h4 {
      color: var(--color-primary);
      margin-bottom: 5px;
      font-size: 1.1rem;
      font-weight: 600;
  }
  
  .promo-card p {
      color: #555;
      margin-bottom: 15px;
      font-size: 0.95rem;
  }
  
  .promo-card .cta-mini {
      padding: 8px 18px;
      background: var(--color-sun);
      color: var(--color-text) !important; 
      font-weight: 600;
      border-radius: 50px;
      text-decoration: none;
      transition: background-color 0.3s ease;
      display: inline-block; 
  }
  
  .promo-card .cta-mini:hover {
      background: #e68a00; 
      transform: none;
  }
  
  /* --- NAVBAR RESPONSIVE STYLES --- */
  
  @media (max-width: 1024px) {
    
    /* CRITICAL FIXES FOR MOBILE SPACING */
    .navbar {
      padding: 15px 15px; 
      /* Must be fixed for mobile menu overlay */
    }
    
    .nav-content {
      padding: 0 0; /* CRITICAL: Remove content padding to allow full width */
    }
    
    /* 1. Navbar and Toggle (Mobile Takeover) */
    .navbar {
      justify-content: space-between; 
    }
    
    
    /* Show mobile toggle */
    .menu-toggle {
      display: block;
    }
    
    /* Hide desktop CTA on smaller screens */
    .nav-cta {
      display: none; 
    }
    
    /* ************************************************************ */
    /* CRITICAL FIX: Target the wrapper to hide/show the entire menu */
    /* ************************************************************ */
    .nav-links-center-wrapper {
        /* Hiding state: default to hidden on mobile */
        display: none; 
        
        /* Positioning for full-screen takeover */
        position: fixed;
        top: var(--navbar-height);
        left: 0;
        width: 100%;
        height: calc(100vh - var(--navbar-height));
        background: #ffffff; 
        overflow-y: auto; 
        z-index: 999;
    }
    
    /* CRITICAL: This rule is triggered by the JS click */
    .navbar.menu-open .nav-links-center-wrapper {
        display: block; /* Overrides the 'display: none' above */
    }
  
    /* Full-screen Mobile Menu UL styles (adjust UL display inside the now-visible wrapper) */
    .nav-links {
        display: flex; /* Ensure links inside the wrapper appear */
        flex-direction: column;
        gap: 0;
        padding: 20px 0;
        margin: 0;
        border-radius: 0;
        box-shadow: none;
        /* Remove the redundant visibility/opacity transitions here as we use display: none/block */
        visibility: visible;
        opacity: 1;
        transition: none; 
    }
    
    /* Mobile Menu Link/Dropdown Item Styles */
    .nav-links li {
      width: 100%;
      border-bottom: 1px solid #eee;
    }
  
    .nav-links li a {
      padding: 15px 20px; 
      display: flex;
      justify-content: space-between;
      align-items: center;
      width: 100%;
      line-height: 1.5;
    }
  
    /* Reset Mega Menu for Mobile (Accordion) */
    .dropdown-menu {
      position: static; 
      opacity: 1; 
      visibility: visible;
      pointer-events: auto;
      
      max-height: 0; 
      overflow: hidden;
      box-shadow: none;
      padding: 0; 
      transition: max-height 0.4s cubic-bezier(0.86, 0, 0.07, 1); 
      background: #f8f8f8;
    }
  
    .has-dropdown.is-open > .dropdown-menu {
      max-height: 600px; 
      padding: 10px 0 20px 20px;
      transition: max-height 0.4s cubic-bezier(0.86, 0, 0.07, 1);
    }
    
    .dropdown-content-wrapper {
      display: block; 
      max-width: none;
      gap: 0;
    }
    
    .menu-column {
      margin-bottom: 15px;
    }
    .menu-column:last-child {
        margin-bottom: 0;
    }
  
    .promo-card {
      display: none; 
    }
    
    .dropdown-menu a {
        padding: 6px 0; 
    }
  }