/* Header */
header {
  position: relative;
  font-family: "Century Gothic", "AppleGothic", sans-serif;
  font-weight: 300;
  z-index: 999;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-direction: row;
  background: rgb(25, 25, 25);
  width: 100vw;
  height: 70px; /* Fixed height for consistency */
  padding: 0 20px;
  box-sizing: border-box;
  box-shadow: 0 6px 0 0 rgb(76, 136, 183);
}

/* Logo */
.nav-photo {
  max-width: 100px;
  height: auto;
  padding: 5px;
}

/* Nav Links */
.nav-links {
  list-style: none;
  display: flex;
  margin: 0;
  padding: 0;
  font-size: clamp(16px, 2.5vw, 22px);
}

.nav-links li {
  margin-left: 20px;
  position: relative;
}

.nav-links a {
  display: inline-block;
  color: white;
  text-decoration: none;
  padding: 8px 15px;
  border-radius: 5px;
  transition: transform 0.3s ease-out;
  cursor: pointer;
}

.nav-links a:hover {
  transform: scale(1.1);
  box-shadow: 0px 8px 16px rgba(0, 0, 0, 0.3);
}

/* Hamburger Menu */
.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
  gap: 4px;
}

.hamburger .bar {
  width: 25px;
  height: 3px;
  background-color: white;
  transition: 0.3s ease-out;
}

.hamburger.active .bar:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active .bar:nth-child(2) {
  opacity: 0;
}

.hamburger.active .bar:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Animation Keyframes */
@keyframes slideDown {
  0% {
    max-height: 0;
    opacity: 0;
    transform: translateY(-20px);
  }
  100% {
    max-height: 1000px; /* Large enough to fit all items */
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideUp {
  0% {
    max-height: 1000px;
    opacity: 1;
    transform: translateY(0);
  }
  100% {
    max-height: 0;
    opacity: 0;
    transform: translateY(-20px);
  }
}

@keyframes fadeInStaggered {
  0% {
    opacity: 0;
    transform: translateY(10px);
    color: #888;
  }
  100% {
    opacity: 1;
    transform: translateY(0);
    color: #fff;
  }
}

/* Mobile View */
@media (max-width: 768px) {
  header {
    padding-right: 0;
  }

  .nav-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 70px; /* Match header height */
    left: 0;
    width: 100%;
    background: rgb(25, 25, 25);
    overflow: hidden;
    max-height: 0;
    text-align: center;
  }

  .navbar-nav.active .nav-links {
    display: flex;
    animation: slideDown 0.4s ease-out forwards;
  }

  .navbar-nav:not(.active) .nav-links {
    animation: slideUp 0.4s ease-out forwards;
  }

  .nav-links li {
    opacity: 0;
    animation: fadeInStaggered 0.3s ease-out forwards;
  }

  .nav-links li:nth-child(1) { animation-delay: 0.1s; }
  .nav-links li:nth-child(2) { animation-delay: 0.2s; }
  .nav-links li:nth-child(3) { animation-delay: 0.3s; }
  .nav-links li:nth-child(4) { animation-delay: 0.4s; }

  .hamburger {
    display: flex;
    padding-right: 20px;
  }

  .nav-photo {
    max-width: 80px;
  }
}
