/* nav.css - Bristol Dance Centre Navigation */
/* Dark navbar with gold accents matching Liverpool design */

.header {
  background-color: var(--color-dark);
  position: fixed;
  width: 100%;
  z-index: 1000;
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
}

.logo {
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem;
  font-weight: 400;
  color: #fff;
  text-decoration: none;
  line-height: 1.3;
  letter-spacing: 0.5px;
}

.logo span {
  display: block;
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.nav {
  display: flex;
  align-items: center;
}

.nav__list {
  display: flex;
  list-style: none;
}

.nav__item {
  position: relative;
  margin-left: 1.5rem;
}

.nav__link {
  color: #ccc;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.85rem;
  transition: color 0.3s;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
}

.dropdown-arrow {
  margin-left: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.dropdown-arrow i {
  color: var(--color-primary);
  font-size: 10px;
}

.nav__link:hover {
  color: var(--color-primary);
}

/* Dropdown styles */
.nav__item--has-dropdown:hover .nav__dropdown {
  display: block;
}

.nav__dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  width: 220px;
  background-color: var(--color-dark);
  box-shadow: 0 5px 15px rgba(0,0,0,0.3);
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  padding: 0.625rem 0;
  z-index: 100;
  border-top: 2px solid var(--color-primary);
}

.nav__dropdown--wide {
  width: 280px;
  max-height: 400px;
  overflow-y: auto;
}

.nav__dropdown li {
  list-style: none;
}

.nav__dropdown a {
  display: block;
  padding: 0.5rem 1.25rem;
  color: #bbb;
  text-decoration: none;
  transition: background-color 0.3s, color 0.3s;
  font-size: 0.8rem;
}

.nav__dropdown a:hover {
  background-color: var(--color-dark-secondary);
  color: var(--color-primary);
}

/* Scrollbar for dropdown */
.nav__dropdown--wide::-webkit-scrollbar {
  width: 4px;
}

.nav__dropdown--wide::-webkit-scrollbar-track {
  background: var(--color-dark-secondary);
}

.nav__dropdown--wide::-webkit-scrollbar-thumb {
  background: var(--color-primary);
  border-radius: 2px;
}

/* Mobile menu */
.nav__toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.5rem;
  color: #fff;
  padding: 0.5rem;
  transition: color 0.3s ease;
}

.nav__toggle:hover {
  color: var(--color-primary);
}

/* Add dropdown arrow for mobile */
@media (max-width: 992px) {
  .nav__item--has-dropdown .nav__link::after {
    content: '\f107';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    float: right;
    transition: transform 0.3s ease;
  }

  .nav__item--has-dropdown.active .nav__link::after {
    transform: rotate(180deg);
  }
}

/* Space for fixed header */
.header-spacer {
  height: 70px;
}

/* Responsive */
@media (max-width: 1100px) {
  .nav__item {
    margin-left: 1.2rem;
  }

  .nav__link {
    font-size: 0.78rem;
  }
}

@media (max-width: 992px) {
  .nav__toggle {
    display: block;
  }

  .nav {
    position: fixed;
    top: 70px;
    left: 0;
    width: 100%;
    height: calc(100vh - 70px);
    background-color: var(--color-dark);
    flex-direction: column;
    align-items: flex-start;
    padding: 2rem 1.5rem;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
    z-index: 999;
  }

  .nav.active {
    transform: translateX(0);
  }

  .nav__list {
    flex-direction: column;
    width: 100%;
  }

  .nav__item {
    margin: 0;
    width: 100%;
    border-bottom: 1px solid var(--color-dark-tertiary);
  }

  .nav__link {
    display: block;
    padding: 1rem 0;
    font-size: 1rem;
    font-weight: 500;
    color: #ccc;
  }

  .nav__link:hover {
    color: var(--color-primary);
  }

  .nav__dropdown {
    position: static;
    display: none;
    width: 100%;
    box-shadow: none;
    padding: 0;
    margin: 0;
    background-color: var(--color-dark-secondary);
    border-radius: 0;
    border-top: none;
  }

  .nav__dropdown a {
    padding: 0.75rem 1.5rem;
    font-size: 0.875rem;
    border-bottom: 1px solid var(--color-dark-tertiary);
  }

  .nav__dropdown a:hover {
    color: var(--color-primary);
  }

  .nav__dropdown--wide {
    max-height: none;
    overflow-y: visible;
  }

  .nav__item--has-dropdown.active .nav__dropdown {
    display: block;
  }
}

@media (max-width: 576px) {
  .navbar {
    padding: 0.8rem 0;
  }

  .logo {
    font-size: 0.95rem;
  }

  .logo span {
    font-size: 1rem;
  }

  .nav {
    top: 60px;
    height: calc(100vh - 60px);
    padding: 1.5rem 1rem;
  }

  .header-spacer {
    height: 60px;
  }
}
