/* ============================================
   Mobile Menu Styles
   Hamburger menu for mobile navigation
   ============================================ */

/* Mobile Menu Toggle Button */
.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-light);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.5rem;
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  z-index: 1000;
  position: relative;
  transition: var(--transition);
  left: 276px;
 
}

.mobile-menu-toggle:active {
  transform: scale(0.95);
}

.mobile-menu-toggle span {
  display: block;
  width: 25px;
  height: 3px;
  background: var(--text-light);
  border-radius: 3px;
  transition: var(--transition);
}

.mobile-menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(8px, 8px);
}

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

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

/* Mobile Menu Overlay */
.mobile-menu-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 998;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.mobile-menu-overlay.active {
  display: block;
  opacity: 1;
}

/* Mobile Navigation Menu */
.mobile-nav {
  display: none;
  position: fixed;
  top: 0;
  left: -100%;
  width: 280px;
  max-width: 85%;
  height: 100vh;
  background: var(--nav-bg);
  z-index: 1000;
  overflow-y: auto;
  transition: left 0.3s ease;
  box-shadow: 2px 0 10px rgba(0, 0, 0, 0.3);
}

.mobile-nav.active {
  left: 0;
}

.mobile-nav-header {
  padding: 1rem;
  background: var(--primary-color);
  color: var(--text-light);
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-nav-header h3 {
  margin: 0;
  font-size: 1.1rem;
}

.mobile-nav-close {
  background: none;
  border: none;
  color: var(--text-light);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.5rem;
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mobile-nav-close:active {
  transform: scale(0.9);
}

.mobile-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.mobile-nav ul li {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-nav ul li a {
  display: block;
  padding: 1rem 1.5rem;
  color: var(--text-light);
  text-decoration: none;
  font-size: 1rem;
  transition: var(--transition);
  min-height: 44px;
  display: flex;
  align-items: center;
}

.mobile-nav ul li a:active {
  background: var(--primary-dark);
  transform: scale(0.98);
}

.mobile-nav ul li a i {
  margin-right: 0.75rem;
  width: 20px;
  text-align: center;
}

/* Mobile Dropdown in Menu */
.mobile-nav .dropdown-menu {
  display: none !important;
  background: var(--primary-dark);
  padding-left: 1rem;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.3s ease, padding 0.3s ease, opacity 0.3s ease;
  visibility: hidden;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.mobile-nav .dropdown-menu.active {
  display: block !important;
  max-height: 500px;
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
  opacity: 1;
  visibility: visible;
}

.mobile-nav .dropdown-menu li {
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.mobile-nav .dropdown-menu li a {
  padding-left: 2.5rem;
  font-size: 0.9rem;
}

.mobile-nav .dropdown-toggle {
  position: relative;
}

.mobile-nav .dropdown-toggle::after {
  content: '\f107';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  position: absolute;
  right: 1.5rem;
  transition: transform 0.3s ease;
}

.mobile-nav .dropdown-toggle.active::after {
  transform: rotate(180deg);
}

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

/* Show mobile menu toggle on mobile */
@media (max-width: 768px) {
  .mobile-menu-toggle {
    display: flex;
  }
  
  .mobile-nav {
    display: block;
  }
  
  /* Hide desktop navigation on mobile */
  .navigation {
    display: none;
  }
}

/* Tablet adjustments */
@media (min-width: 481px) and (max-width: 768px) {
  .mobile-nav {
    width: 320px;
  }
}

/* Smooth scroll for mobile */
@media (max-width: 768px) {
  html {
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
  }
  
  body {
    -webkit-font-smoothing: antialiased;
    /* -moz-osx-font-smoothing is not a standard CSS property */
    /* Use font-smoothing: antialiased; instead if needed */
  }
}
