/**
 * Mobile Navigation Fix CSS
 * Ensures proper mobile navigation functionality
 */

/* Mobile menu button - ensure it's visible and properly styled */
.mobile-menu-btn {
  display: none; /* Hidden by default on desktop */
  flex-direction: column;
  justify-content: space-around;
  width: 44px;
  height: 44px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 10000;
  position: relative;
  border-radius: 4px;
  transition: background-color 0.2s ease;
}

.mobile-menu-btn:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.mobile-menu-btn:focus {
  outline: 2px solid #a855f7;
  outline-offset: 2px;
}

/* Hamburger lines */
.mobile-menu-btn span {
  display: block;
  width: 24px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: all 0.3s ease;
  transform-origin: center;
}

/* Hamburger animation when active */
.mobile-menu-btn.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.mobile-menu-btn.active span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-btn.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Show mobile menu button on mobile devices */
@media (max-width: 900px) {
  .mobile-menu-btn {
    display: flex;
  }
  
  /* Ensure nav menu is properly positioned */
  .nav-menu {
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 10, 20, 0.98);
    backdrop-filter: blur(20px);
    flex-direction: column;
    padding: 2rem 1rem;
    overflow-y: auto;
    z-index: 9998;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    display: none;
  }
  
  .nav-menu.active {
    display: flex;
    transform: translateX(0);
  }
  
  /* Ensure nav items are properly spaced */
  .nav-item {
    width: 100%;
    margin: 8px 0;
  }
  
  .nav-link {
    display: flex;
    align-items: center;
    padding: 0.75rem 1.25rem;
    min-height: 44px;
    font-size: 1.125rem;
    color: #fff;
    text-decoration: none;
    border-radius: 8px;
    transition: background-color 0.2s ease;
  }
  
  .nav-link:hover,
  .nav-link:focus {
    background-color: rgba(168, 85, 247, 0.2);
  }
  
  /* Dropdown styles for mobile */
  .dropdown {
    position: relative;
  }
  
  .dropdown-content {
    display: none;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 8px;
    margin-top: 8px;
    padding: 8px 0;
  }
  
  .dropdown.active .dropdown-content {
    display: block;
  }
  
  .dropdown-item {
    display: block;
    padding: 0.5rem 1.25rem;
    color: #cbd5e1;
    text-decoration: none;
    transition: background-color 0.2s ease;
  }
  
  .dropdown-item:hover,
  .dropdown-item:focus {
    background-color: rgba(168, 85, 247, 0.2);
    color: #fff;
  }
}

/* Hide mobile menu button on desktop */
@media (min-width: 901px) {
  .mobile-menu-btn {
    display: none;
  }
  
  .nav-menu {
    display: flex;
    position: static;
    flex-direction: row;
    background: transparent;
    padding: 0;
    transform: none;
    overflow: visible;
  }
}

/* Prevent body scroll when mobile menu is open */
body.mobile-menu-open {
  overflow: hidden;
  position: fixed;
  width: 100%;
}