.main-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
}

.nav-list {
  display: flex;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 8px;
}

.nav-item {
  position: relative;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 16px;
  color: #334155;
  text-decoration: none;
  font-weight: 500;
  border-radius: 8px;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.nav-link:hover {
  background: #f1f5f9;
  color: #1e293b;
  text-decoration: none;
}

.nav-item.active .nav-link,
.nav-link.current {
  background: #3b82f6;
  color: white;
}

.nav-arrow {
  transition: transform 0.2s ease;
}

.nav-item:hover .nav-arrow {
  transform: rotate(180deg);
}

/* Dropdown styles */
.nav-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  background: white;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  padding: 8px;
  list-style: none;
  margin: 8px 0 0 0;
  min-width: 200px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all 0.2s ease;
  z-index: 1000;
  border: 1px solid #e2e8f0;
}

.nav-item:hover .nav-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-item {
  margin: 0;
}

.dropdown-link {
  display: block;
  padding: 10px 16px;
  color: #334155;
  text-decoration: none;
  border-radius: 6px;
  transition: all 0.2s ease;
  font-size: 0.9rem;
}

.dropdown-link:hover {
  background: #f1f5f9;
  color: #1e293b;
  text-decoration: none;
}

.dropdown-item.active .dropdown-link,
.dropdown-link.current {
  background: #3b82f6;
  color: white;
}

/* Mobile menu toggle */
.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: 6px;
  transition: background-color 0.2s ease;
}

.mobile-menu-toggle:hover {
  background: #f1f5f9;
}

.hamburger-line {
  width: 24px;
  height: 2px;
  background: #334155;
  margin: 2px 0;
  transition: all 0.3s ease;
  border-radius: 1px;
}

/* Mobile menu toggle animation */
.mobile-menu-toggle.active .hamburger-line:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

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

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

/* Responsive design */
@media (max-width: 768px) {
  .mobile-menu-toggle {
    display: flex;
  }

  .nav-list {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin-top: 8px;
    padding: 16px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid #e2e8f0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.2s ease;
    z-index: 1000;
  }

  .nav-list.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .nav-item {
    width: 100%;
  }

  .nav-link {
    justify-content: space-between;
    padding: 16px;
    border-radius: 8px;
  }

  .nav-dropdown {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: none;
    margin: 8px 0 0 16px;
    padding: 0;
    background: #f8fafc;
    border-radius: 8px;
  }

  .dropdown-link {
    padding: 12px 16px;
  }
}

@media (max-width: 480px) {
  .nav-link {
    font-size: 0.9rem;
  }

  .dropdown-link {
    font-size: 0.85rem;
  }
}

/* Accessibility improvements */
.nav-link:focus,
.dropdown-link:focus {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
}

/* Smooth animations */
.nav-item,
.dropdown-item {
  animation: fadeInUp 0.3s ease-out;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
