/* ====== BASE NAV STYLES ====== */
.navbar {
  background-color: transparent;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  position: relative;
  z-index: 10;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  margin-top: 1rem;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

.nav-list {
  list-style: none;
  display: flex;
  gap: 25px;
  margin: 0;
  padding: 0;
  transition: max-height 0.3s ease;
}

.nav-list li a {
  text-decoration: none;
  color: #fff;
  font-weight: 600;
  font-size: 1.05rem;
  transition: all 0.3s ease;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  display: block;
}

.nav-list li a:hover {
  background-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
}

/* ====== HAMBURGER ICON ====== */
.menu-toggle {
  display: none;
  flex-direction: column;
  cursor: pointer;
  width: 30px;
  height: 25px;
  justify-content: center;
  gap: 6px;
  transition: transform 0.3s ease;
  position: relative;
}

.bar {
  height: 3px;
  width: 100%;
  background-color: #fff;
  border-radius: 5px;
  transition: all 0.3s ease;
  transform-origin: center;
}

/* ====== ANIMATION: TURN INTO "X" ====== */
.menu-toggle.open {
  gap: 0;
}

.menu-toggle.open .bar:nth-child(1) {
  transform: rotate(45deg);
  position: absolute;
  top: 50%;
  margin-top: -1.5px;
}

.menu-toggle.open .bar:nth-child(2) {
  opacity: 0;
}

.menu-toggle.open .bar:nth-child(3) {
  transform: rotate(-45deg);
  position: absolute;
  top: 50%;
  margin-top: -1.5px;
}

/* ====== RESPONSIVE BEHAVIOR ====== */
@media (max-width: 768px) {
  .menu-toggle {
    display: flex;
  }

  .nav-list {
    position: absolute;
    top: 60px;
    left: 0;
    width: 100%;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    flex-direction: column;
    align-items: center;
    overflow: hidden;
    max-height: 0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  }

  .nav-list.active {
    max-height: 500px; /* Adjusted for 5 menu items */
  }

  .nav-list li {
    padding: 12px 0;
    width: 100%;
    text-align: center;
  }
}
