/* Navigation Component Styles */

.nav {
  background-color: var(--bg-secondary);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-container {
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 2rem;
  padding-right: 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}

@media (max-width: 640px) {
  .nav-container {
    padding-left: 1rem;
    padding-right: 1rem;
  }
}

/* Logo */
.nav-logo {
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--text-primary);
  text-decoration: none;
  letter-spacing: -0.025em;
  transition: color 0.2s;
}

.nav-logo:hover {
  color: var(--accent);
}

/* Mobile Toggle Button */
.navbar-toggle {
  display: none;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

@media (max-width: 640px) {
  .navbar-toggle {
    display: block;
  }
}

/* Hamburger Icon */
.hamburger {
  display: block;
  width: 1.5rem;
  height: 2px;
  background-color: var(--text-primary);
  position: relative;
  transition: all 0.3s;
}

.hamburger::before,
.hamburger::after {
  content: "";
  position: absolute;
  width: 1.5rem;
  height: 2px;
  background-color: var(--text-primary);
  left: 0;
  transition: all 0.3s;
}

.hamburger::before {
  top: -7px;
}

.hamburger::after {
  top: 7px;
}

/* Menu Container */
.navbar-menu {
  display: flex;
  align-items: center;
  gap: 1rem;
}

@media (max-width: 640px) {
  .navbar-menu {
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    background-color: var(--bg-secondary);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1rem;
    display: none;
    flex-direction: column;
    align-items: stretch;
  }

  .navbar-menu.active {
    display: flex;
  }
}

/* Dropdown Container */
.navbar-dropdown {
  position: relative;
}

@media (max-width: 640px) {
  .navbar-dropdown {
    width: 100%;
  }
}

/* Dropdown Trigger Button */
.navbar-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  border-radius: 0.5rem;
  transition: all 0.2s;
}

.navbar-link:hover {
  background-color: var(--bg-tertiary);
  color: var(--accent);
}

@media (max-width: 640px) {
  .navbar-link {
    width: 100%;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background-color: var(--bg-tertiary);
    border-radius: 0.5rem;
  }
}

/* Dropdown Arrow */
.dropdown-arrow {
  transition: transform 0.2s;
}

.navbar-dropdown.active .dropdown-arrow {
  transform: rotate(180deg);
}

/* Dropdown Menu */
.dropdown-menu {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  background-color: var(--bg-secondary);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.75rem;
  min-width: 220px;
  max-height: 70vh;
  overflow-y: auto;
  padding: 0.5rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.2s;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.navbar-dropdown.active .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

@media (max-width: 640px) {
  .dropdown-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    margin-top: 0.5rem;
    max-height: 0;
    overflow: hidden;
    padding: 0;
    border: none;
    box-shadow: none;
    transition: max-height 0.3s;
  }

  .navbar-dropdown.active .dropdown-menu {
    max-height: 500px;
    padding: 0.5rem;
  }
}

/* Dropdown Items */
.dropdown-item {
  display: block;
  padding: 0.625rem 1rem;
  color: var(--text-primary);
  text-decoration: none;
  font-size: 0.875rem;
  border-radius: 0.375rem;
  transition: all 0.2s;
}

.dropdown-item:hover {
  background-color: var(--bg-tertiary);
  color: var(--accent);
}

.dropdown-item.active {
  background-color: rgba(167, 139, 250, 0.15);
  color: var(--accent);
}

/* Dropdown Divider */
.dropdown-divider {
  height: 1px;
  background-color: rgba(255, 255, 255, 0.1);
  margin: 0.5rem 0;
}

/* Dropdown Label */
.dropdown-label {
  display: block;
  padding: 0.5rem 1rem;
  padding-top: 0.5rem;
  padding-bottom: 0.25rem;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
}
