header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #0e1d54;
  color: white;
  padding: 1rem 2rem;
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: all 0.3s ease;
  flex-wrap: wrap;
}

header h1 {
  font-size: 1.6rem;
}

header.scrolled {
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  background-color: #09133d;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  flex-wrap: wrap;
}

nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
}

nav a {
  margin: 0 1rem;
  color: white;
  text-decoration: none;
  font-weight: 500;
  position: relative;
  transition: color 0.3s ease;
}

nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -5px;
  width: 0%;
  height: 2px;
  background-color: #fff;
  transition: width 0.3s ease;
}

nav a:hover {
  color: #5b9ace;
}

nav a:hover::after {
  width: 100%;
}

.hamburger {
  display: none;
  background: none;
  border: none;
  color: white;
  font-size: 1.8rem;
  cursor: pointer;
}

/* 🔄 Responsive Styles */
@media (max-width: 768px) {
  .hamburger {
    display: block;
  }

  nav {
    display: none;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    margin-top: 10px;
    gap: 0;
    transition: all 0.3s ease-in-out;
  }

  nav.show {
    display: flex;
  }

  nav a {
    width: 100%;
    margin: 0;
    padding: 10px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 0;
    -webkit-border-radius: 0;
    -o-border-radius: 0;
    -moz-border-radius: 0;
    -ms-border-radius: 0;
    box-sizing: border-box; /* ✅ Ensure padding doesn't overflow */
  }

  nav a:hover::after {
    width: 0%; /* Disable underline on mobile to keep things clean */
  }
}
