/* Expect these variables somewhere globally:
:root{
  --accent-color:#6cf;
  --text-primary:#fff;
  --bg:#000;
}
*/

.site-nav {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;

  background-color: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(5px);

  padding: 0 5%;
  display: flex;
  justify-content: space-between;
  align-items: center;

  border-bottom: 1px solid #333;
  height: 70px;
}

.logo {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--accent-color);
  text-transform: uppercase;
  letter-spacing: 2px;
  text-decoration: none;
  cursor: pointer;
  line-height: 1;
}

.nav-links {
  display: flex;
  align-items: center;
  height: 100%;
}

.nav-link {
  color: var(--text-primary);
  text-decoration: none;
  margin-left: 25px;
  font-size: 0.9rem;
  transition: color 0.2s ease;
  height: 100%;
  display: flex;
  align-items: center;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--accent-color);
}

/* Mobile menu button (hidden on desktop) */
.mobile-menu-btn {
  display: none;
  background: transparent;
  border: 1px solid #333;
  color: var(--text-primary);
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  line-height: 1;
}

/* Dropdown */
.dropdown {
  position: relative;
  margin-left: 25px;
  height: 100%;
  display: flex;
  align-items: center;
}

.dropdown-toggle {
  background: transparent;
  border: 0;
  color: var(--text-primary);
  font-size: 0.9rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: color 0.2s ease;
  user-select: none;
  height: 100%;
  padding: 0 5px;
}

.dropdown-toggle:hover {
  color: var(--accent-color);
}

.arrow {
  font-size: 0.7rem;
  transition: transform 0.2s ease;
  display: inline-block;
}

/* Dropdown menu (hidden by default) */
.dropdown-menu {
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) translateY(-6px);

  background-color: rgba(20, 20, 20, 0.98);
  backdrop-filter: blur(10px);

  min-width: 220px;
  border: 1px solid #333;
  border-top: 2px solid var(--accent-color);
  border-radius: 10px;

  padding: 8px 0;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);

  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s ease;
  z-index: 1001;
}

.dropdown-menu a {
  display: block;
  padding: 10px 14px;
  color: var(--text-primary);
  text-decoration: none;
  font-size: 0.9rem;
  white-space: nowrap;
}

.dropdown-menu a:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--accent-color);
}

.dropdown-divider {
  height: 1px;
  background: #333;
  margin: 6px 0;
}

/* Desktop open behavior: hover OR .open class (JS uses .open too) */
@media (min-width: 769px) {
  .dropdown:hover .dropdown-menu,
  .dropdown.open .dropdown-menu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
  }

  .dropdown:hover .arrow,
  .dropdown.open .arrow {
    transform: rotate(180deg);
  }
}

/* Mobile layout */
@media (max-width: 768px) {
  .mobile-menu-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .nav-links {
    position: fixed;
    top: 70px;
    right: 0;
    left: 0;

    background: rgba(0, 0, 0, 0.96);
    backdrop-filter: blur(10px);

    border-bottom: 1px solid #333;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 10px 5%;
    gap: 6px;
    height: auto;
  }

  .nav-links.active {
    display: flex;
  }

  .nav-link {
    margin-left: 0;
    height: auto;
    padding: 12px 10px;
    border-radius: 10px;
  }

  .dropdown {
    margin-left: 0;
    height: auto;
    flex-direction: column;
    align-items: stretch;
  }

  .dropdown-toggle {
    height: auto;
    padding: 12px 10px;
    border-radius: 10px;
    width: 100%;
    justify-content: space-between;
  }

  .dropdown-menu {
    position: static;
    transform: none;
    top: auto;
    left: auto;

    border-radius: 10px;
    margin-top: 6px;

    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    height: 0;
    overflow: hidden;
    padding: 0;
  }

  .dropdown.open .dropdown-menu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    height: auto;
    padding: 8px 0;
  }

  .dropdown.open .arrow {
    transform: rotate(180deg);
  }
}
