/* Enhanced Mobile Menu Styles */

/* Increase the size of the menu toggle button for better touch targets */
.menu__toggle {
  padding: 10px;
}

.menu__toggle__icon {
  width: 28px;
  height: 24px;
}

.menu__toggle__icon span, 
.menu__toggle__icon span:before, 
.menu__toggle__icon span:after {
  height: 4px;
  border-radius: 2px;
}

/* Improve the mobile menu appearance */
@media (max-width: 1024px) {
  .menu__wrap {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
    transform: translateY(-100%);
    opacity: 1;
    visibility: visible;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
  
  .menu--open .menu__wrap {
    transform: translateY(0);
  }
  
  .menu__list {
    padding: 30px;
    max-width: 100%;
    text-align: center;
  }
  
  .menu__list__item {
    margin-bottom: 20px;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    transition-delay: 0.1s;
  }
  
  .menu__list__item:nth-child(2) { transition-delay: 0.15s; }
  .menu__list__item:nth-child(3) { transition-delay: 0.2s; }
  .menu__list__item:nth-child(4) { transition-delay: 0.25s; }
  .menu__list__item:nth-child(5) { transition-delay: 0.3s; }
  .menu__list__item:nth-child(6) { transition-delay: 0.35s; }
  .menu__list__item:nth-child(7) { transition-delay: 0.4s; }
  
  .menu--open .menu__list__item {
    opacity: 1;
    transform: translateY(0);
  }
  
  .menu__list__item__link {
    font-size: 24px;
    padding: 12px 0;
    display: block;
    position: relative;
  }
  
  .menu__list__item__link:after {
    content: '';
    position: absolute;
    bottom: 8px;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--accent-color);
    transition: all 0.3s ease;
    transform: translateX(-50%);
  }
  
  .menu__list__item__link:hover:after,
  .menu__list__item__link.active-link:after {
    width: 40px;
  }
  
  /* Add a semi-transparent overlay behind the menu */
  .menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease;
    z-index: 999;
  }
  
  .menu--open .menu-overlay {
    opacity: 1;
    visibility: visible;
  }
}

/* Dark mode compatibility */
body.dark-mode .menu__wrap {
  background: rgba(18, 18, 18, 0.98);
}

body.dark-mode .menu__list__item__link:after {
  background: var(--accent-color);
}

/* Adjust dark mode toggle position when menu is open */
.menu--open .dark-mode-toggle {
  z-index: 1001;
}