/* nav.css */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #3b82f6;
  padding: 1rem 2rem;
  color: white;
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-links {
  display: flex;
  gap: 2rem;
  align-items: center;
}

nav a {
  color: white;
  text-decoration: none;
  font-weight: bold;
  font-size: 0.8rem;
  transition: color 0.2s ease;
}

nav a:hover {
  color: #dbeafe;
}

/* Dropdown */
.dropdown {
  position: relative;
  cursor: pointer;
}

.dropdown-content {
  display: none;
  position: absolute;
  background-color: #3b82f6;
  min-width: 160px;
  top: 100%;
  left: 0;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
  border-radius: 0 0 0.5rem 0.5rem;
  z-index: 10;
  flex-direction: column;
  padding: 0.5rem 0;
}

.dropdown-content a {
  padding: 0.75rem 1rem;
  display: block;
  color: white;
  font-weight: normal;
  text-align: left;
  white-space: nowrap;
  transition: background-color 0.2s ease;
}

.dropdown-content a:hover {
  background-color: #2563eb;
}

/* Show dropdown on hover - desktop */
@media (min-width: 769px) {
  .dropdown:hover .dropdown-content {
    display: flex;
  }
}

/* Mobile styles */
@media (max-width: 768px) {
  .burger {
    display: flex;
    flex-direction: column;
    cursor: pointer;
  }

  .nav-links {
    display: none;
    flex-direction: column;
    background-color: #2563eb;
    position: absolute;
    top: 100%;
    right: 0;
    width: 100%;
    text-align: center;
    padding: 1rem 0;
    gap: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-radius: 0 0 0.5rem 0.5rem;
  }

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

  .dropdown-content {
    position: relative;
    box-shadow: none;
    background-color: transparent;
    padding-left: 1rem;
    display: none;
    flex-direction: column;
  }

  .dropdown-content.show {
    display: flex !important;
  }

  .nav-links a {
    font-size: 1.2rem;
    padding: 1.25rem 0;
    line-height: 1.6;
  }

  .dropdown-content a {
    font-size: 1.05rem;
    padding: 1rem 1.5rem;
  }
}

/* Burger icon animation */
.burger div {
  width: 25px;
  height: 3px;
  background-color: white;
  margin: 4px;
  transition: all 0.3s ease;
}

.burger.active div:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.burger.active div:nth-child(2) {
  opacity: 0;
}
.burger.active div:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}
