/* Header */
header {
  background: #fff;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
}

.logo {
  font-size: 1.8rem;
  font-weight: bold;
  color: #007bff;
}

nav {
  display: flex;
}

nav ul {
  list-style: none;
  display: flex;
  gap: 1rem;
  align-items: center;
}

nav a {
  text-decoration: none;
  color: #333;
  font-weight: 500;
  transition: color 0.3s;
  padding: 0.5rem 0.75rem;
}

nav a:hover {
  color: #007bff;
}

/* Dropdown */
.dropdown {
  position: relative;
}

.dropdown-menu {
  display: none;
  position: absolute;
  background: #fff;
  top: 100%;
  left: 0;
  min-width: 140px; /* reduced from 180px */
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  border-radius: 4px;
  flex-direction: column;
  z-index: 999;
  padding: 0.25rem 0; /* tighten top/bottom spacing */
}

.dropdown-menu li a {
  padding: 0.4rem 0.8rem; /* tighter padding inside items */
  display: block;
  font-size: 0.95rem; /* slightly smaller font */
  color: #333;
  white-space: nowrap;
}


.dropdown-menu li a:hover {
  background-color: #f0f0f0;
}

/* Show on hover for desktop */
.dropdown:hover .dropdown-menu {
  display: flex;
}

/* Hamburger */
.hamburger {
  display: none;
  font-size: 1.8rem;
  cursor: pointer;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  nav {
    display: none;
    width: 100%;
  }

  nav.active {
    display: block;
    background: #fff;
    margin-top: 1rem;
  }

  nav ul {
    flex-direction: column;
    gap: 0.5rem;
    padding: 1rem;
  }

  .header {
    flex-direction: column;
    align-items: flex-start;
  }

  .hamburger {
    display: block;
  }

  .dropdown-menu {
    position: static;
    box-shadow: none;
    border-radius: 0;
  }

  .dropdown:hover .dropdown-menu {
    display: none;
  }

  .dropdown.active .dropdown-menu {
    display: flex;
  }
}
