/* ============================================================= */
/* MOBILE MENU TOGGLE - Universal Styles                        */
/* ============================================================= */

/* Mobile Menu Button (Hamburger) */
.mobile-menu-btn {
  z-index: 1001;
  display: none;
  flex-direction: column;
  gap: 5px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 5px;
}

.hamburger-line {
  width: 30px;
  height: 3px;
  background: var(--light, #f8f9fa);
  border-radius: 3px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Hamburger Animation - Transform to X */
.mobile-menu-btn.active .hamburger-line:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.mobile-menu-btn.active .hamburger-line:nth-child(2) {
  opacity: 0;
}

.mobile-menu-btn.active .hamburger-line:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* Mobile Menu Overlay - Created dynamically by navbar.js */
.mobile-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(5px);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.mobile-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Prevent body scroll when menu is open */
body.menu-open {
  overflow: hidden;
}

/* ============================================================= */
/* MOBILE RESPONSIVE - Navigation Panel                         */
/* ============================================================= */

@media (max-width: 768px) {
  /* Show mobile menu button */
  .mobile-menu-btn {
    display: flex;
  }

  /* Slide-in Navigation Panel */
  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 300px;
    height: 100vh;
    background: linear-gradient(180deg, #0a0a1a 0%, #050511 100%);
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    padding: 80px 20px 20px;
    gap: 0;
    box-shadow: -5px 0 30px rgba(0, 0, 0, 0.5);
    transition: right 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    z-index: 1000;
    overflow-y: auto;
  }

  .nav-links.active {
    right: 0;
  }

  .nav-links > a,
  .nav-links .dropdown > a,
  .nav-links .nav-services-dropdown > a {
    padding: 15px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    width: 100%;
    text-align: left;
  }

  /* Mobile Dropdown Styling */
  .dropdown-content,
  .nav-services-content {
    position: static;
    display: none;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    background: rgba(0, 20, 50, 0.8);
    border-radius: 8px;
    margin-top: 8px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    border: 1px solid rgba(107, 195, 255, 0.2);
  }

  .dropdown.active .dropdown-content,
  .nav-services-dropdown.active .nav-services-content {
    display: block;
    max-height: 600px;
  }

  .dropdown-scroll,
  .nav-services-scroll {
    max-height: none;
    overflow: visible;
  }

  .dropdown-content a,
  .nav-services-content a {
    padding: 14px 20px;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.9);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  }
  
  .dropdown-content a:last-child,
  .nav-services-content a:last-child {
    border-bottom: none;
  }
  
  .dropdown-content a:hover,
  .nav-services-content a:hover {
    background: rgba(107, 195, 255, 0.15);
    color: #6bc3ff;
    padding-left: 28px;
  }

  /* Rotate chevron when dropdown is active */
  .dropdown.active .dropdown-toggle i,
  .nav-services-dropdown.active .nav-services-toggle i {
    transform: rotate(180deg);
  }

  .dropdown-toggle i,
  .nav-services-toggle i {
    transition: transform 0.3s ease;
  }

  /* CTA Button Mobile */
  .nav-links .cta-buttons,
  .nav-links .cta-button {
    margin-top: 20px;
    width: 100%;
    text-align: center;
    justify-content: center;
  }
}

/* ============================================================= */
/* MOBILE SCROLLBAR STYLING                                     */
/* ============================================================= */

@media (max-width: 768px) {
  .nav-links::-webkit-scrollbar {
    width: 6px;
  }

  .nav-links::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
  }

  .nav-links::-webkit-scrollbar-thumb {
    background: rgba(0, 242, 255, 0.3);
    border-radius: 3px;
  }

  .nav-links::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 242, 255, 0.5);
  }
}
