*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  color: #e0e0e0;
  background: #1a1a1a;
  min-height: 100vh;
}

/* ---- Header ---- */
header {
  background: #111;
  border-bottom: 2px solid #333;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: #fff;
  padding: 0.6rem 0;
}

.logo img {
  height: 48px;
  width: auto;
}

.logo span {
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
}

/* ---- Navigation ---- */
nav {
  display: flex;
  align-items: stretch;
  height: 100%;
}

nav > ul {
  list-style: none;
  display: flex;
  gap: 0;
  height: 100%;
}

nav > ul > li {
  position: relative;
}

nav > ul > li > a {
  display: flex;
  align-items: center;
  height: 100%;
  padding: 1rem 1.25rem;
  color: #ccc;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: color 0.2s, background 0.2s;
}

nav > ul > li > a:hover,
nav > ul > li > a:focus {
  color: #fff;
  background: #222;
}

nav > ul > li > a .arrow {
  margin-left: 0.35rem;
  font-size: 0.6rem;
  transition: transform 0.2s;
}

nav > ul > li:hover > a .arrow {
  transform: rotate(180deg);
}

/* ---- Dropdown ---- */
.dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 240px;
  background: #222;
  border: 1px solid #333;
  border-top: 2px solid #c0913a;
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
  max-height: 70vh;
  overflow-y: auto;
  z-index: 1001;
}

nav > ul > li:hover > .dropdown,
nav > ul > li:focus-within > .dropdown {
  display: block;
}

.dropdown li {
  list-style: none;
}

.dropdown li a {
  display: block;
  padding: 0.6rem 1.25rem;
  color: #ccc;
  text-decoration: none;
  font-size: 0.9rem;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}

.dropdown li a:hover,
.dropdown li a:focus {
  background: #333;
  color: #fff;
}

.dropdown .dropdown-heading {
  padding: 0.5rem 1.25rem 0.25rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #c0913a;
  border-top: 1px solid #333;
}

.dropdown .dropdown-heading:first-child {
  border-top: none;
}

/* ---- Footer ---- */
footer {
  background: #111;
  border-top: 1px solid #333;
  text-align: center;
  padding: 1.5rem;
  color: #666;
  font-size: 0.85rem;
}

/* ---- Mobile hamburger ---- */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: #ccc;
  margin: 5px 0;
  transition: transform 0.3s, opacity 0.3s;
}

@media (max-width: 768px) {
  .menu-toggle {
    display: block;
  }

  .menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }
  .menu-toggle.active span:nth-child(2) {
    opacity: 0;
  }
  .menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
  }

  nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    height: auto;
    background: #111;
    border-top: 1px solid #333;
    max-height: 80vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  nav.open {
    display: block;
  }

  nav > ul {
    flex-direction: column;
  }

  nav > ul > li > a {
    padding: 0.9rem 1.5rem;
    min-height: 48px;
  }

  .dropdown {
    position: static;
    border: none;
    border-top: none;
    box-shadow: none;
    background: #1a1a1a;
    max-height: none;
    display: none;
  }

  .dropdown.mobile-open {
    display: block;
  }

  .dropdown li a {
    padding: 0.7rem 1.5rem 0.7rem 2.5rem;
    min-height: 44px;
    display: flex;
    align-items: center;
  }

  .logo span {
    font-size: 1.4rem;
  }
}

@media (max-width: 400px) {
  .logo span {
    font-size: 1.25rem;
  }
}

/* Dropdown search */
.dropdown-search {
  position: sticky;
  top: 0;
  background: #222;
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid #333;
  z-index: 1;
}

.dropdown-search input {
  width: 100%;
  padding: 0.4rem 0.6rem;
  font-size: 0.85rem;
  border: 1px solid #444;
  border-radius: 4px;
  background: #1a1a1a;
  color: #e0e0e0;
  outline: none;
}

.dropdown-search input:focus {
  border-color: #c0913a;
}

/* Scrollbar styling for dropdowns */
.dropdown::-webkit-scrollbar {
  width: 6px;
}
.dropdown::-webkit-scrollbar-track {
  background: #222;
}
.dropdown::-webkit-scrollbar-thumb {
  background: #555;
  border-radius: 3px;
}
