/* Mobile Menu Icon Toggle */
.mobile-menu-btn .close-icon {
  display: none;
}

.mobile-menu-btn.active .hamburger-icon {
  display: none;
}

.mobile-menu-btn.active .close-icon {
  display: block;
}

/* Mobile Sidebar Overlay */
.mobile-sidebar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(6, 15, 42, 0.85);
  backdrop-filter: blur(4px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  z-index: 99;
  pointer-events: none;
}

.mobile-sidebar-overlay.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* Mobile Sidebar */
.mobile-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: 300px;
  max-width: 85vw;
  height: 100vh;
  background: rgba(12, 27, 73, 0.98);
  backdrop-filter: blur(20px);
  border-right: 1px solid var(--border);
  transform: translateX(-100%);
  transition: transform 0.3s ease;
  z-index: 100;
  overflow-y: auto;
  overflow-x: hidden;
}

.mobile-sidebar.active {
  transform: translateX(0);
}

.mobile-sidebar .nav-links {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 5rem 1.5rem 2rem;
  align-items: stretch;
}

.mobile-sidebar .nav-links > a,
.mobile-sidebar .nav-dropdown-trigger {
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 1rem;
}

.mobile-sidebar .nav-dropdown {
  position: static;
}

.mobile-sidebar .nav-dropdown-menu {
  position: static;
  opacity: 1;
  visibility: visible;
  transform: none;
  padding-top: 0;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.mobile-sidebar .nav-dropdown.active .nav-dropdown-menu {
  max-height: 500px;
  padding-top: 0.5rem;
}

.mobile-sidebar .nav-dropdown-trigger svg {
  transition: transform 0.3s ease;
}

.mobile-sidebar .nav-dropdown.active .nav-dropdown-trigger svg {
  transform: rotate(180deg);
}

.mobile-sidebar .nav-dropdown-content {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0.5rem 0 0.5rem 1rem;
  min-width: auto;
  box-shadow: none;
}

.mobile-sidebar .nav-dropdown-content a {
  padding: 0.75rem 0;
  border-radius: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.mobile-sidebar .nav-dropdown-content a:last-child {
  border-bottom: none;
}

.mobile-sidebar .nav-dropdown-label {
  padding: 0.75rem 0 0.5rem;
  margin-top: 0.5rem;
}

.mobile-sidebar .nav-cta {
  margin-top: 1rem;
  text-align: center;
  border-bottom: none;
}

/* Mobile Sidebar Close Button */
.mobile-sidebar-close {
  position: absolute;
  top: 1rem;
  right: 0rem;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  z-index: 101;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s ease;
}

.mobile-sidebar-close:hover {
  opacity: 0.7;
}

.mobile-sidebar-close:active {
  opacity: 0.5;
}

.mobile-sidebar-close svg {
  width: 24px;
  height: 24px;
  stroke: var(--text-primary);
  stroke-width: 2;
  fill: none;
}

/* Body scroll lock */
body.body-no-scroll {
  overflow: hidden;
  position: fixed;
  width: 100%;
}

/* Hide mobile sidebar and overlay on desktop */
@media (min-width: 769px) {
  .mobile-sidebar,
  .mobile-sidebar-overlay {
    display: none !important;
  }
}

@media (max-width: 768px) {
  .mobile-sidebar,
  .mobile-sidebar-overlay {
    display: block;
  }
}

@media (min-width: 769px) and (max-width: 991px) {
  .mobile-sidebar,
  .mobile-sidebar-overlay {
    display: block;
  }
}
