
header {
  background-color: #FFD700;
  padding: 10px 0;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  margin-bottom: 40px;
  position: relative;
}

/* Hamburger menu icon */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 48px;
  height: 50px;
  background: white;
  border: none;
  border-radius: 14px;
  cursor: pointer;
  padding: 8px 6px;
  z-index: 1005; /* Above overlay (1003) and drawer (1004) */
  position: fixed;
  right: 15px;
  top: 15px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transition: all 0.3s ease;
}

.hamburger::after {
  content: "MENU";
  font-size: 8px;
  font-weight: bold;
  color: #333;
  text-align: center;
  line-height: 1;
  margin-top: 2px;
  transition: all 0.3s ease;
}

.hamburger.active::after {
  content: "CLOSE";
  color: #333;
  font-size: 7px;
}

.hamburger:active {
  transform: scale(0.95);
}

.hamburger span {
  width: 20px;
  height: 2.5px;
  background-color: black;
  border-radius: 1.5px;
  transition: all 0.3s ease;
  transform-origin: center;
  display: block;
}

.hamburger span:nth-child(1) {
  margin-bottom: 4px;
}

.hamburger span:nth-child(3) {
  margin-top: 4px;
}

.hamburger.active {
  background: white;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(0, 6.5px);
  width: 22px;
  background-color: #333;
}

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

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(0, -6.5px);
  width: 22px;
  background-color: #333;
}

/* Drawer overlay */
.drawer-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1003; /* Below drawer (1004) and hamburger (1005) */
  opacity: 0;
  transition: opacity 0.3s ease;
}

.drawer-overlay.active {
  opacity: 1;
}

nav ul {
  list-style-type: none;
  padding: 0;
  margin: 0;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 14px;
}

nav ul li {
  margin: 5px 0;
}

nav ul li a {
  text-decoration: none;
  color: #333;
  font-size: 1rem;
  font-weight: bold;
  text-transform: uppercase;
  padding: 8px 16px;
  border-radius: 12px;
  transition: all 0.3s ease;
  display: inline-block;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.8);
}

nav ul li a:hover {
  background-color: black;
  color: #FFD700;
  transform: scale(1.05);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

@keyframes wow {
  0% {
    transform: rotate(0deg);
  }

  25% {
    transform: rotate(-5deg);
  }

  75% {
    transform: rotate(5deg);
  }

  100% {
    transform: rotate(0deg);
  }
}

nav ul li a:hover::after {
  content: " wow!";
  font-size: 0.8em;
  vertical-align: super;
  animation: wow 0.5s infinite;
  display: inline-block;
}

@media (max-width: 768px) {
  /* Hide header background on mobile */
  header {
    background-color: transparent;
    box-shadow: none;
    padding: 0;
    margin-bottom: 20px;
  }

  /* Show hamburger on mobile */
  .hamburger {
    display: flex;
    width: 48px;
    height: 50px;
    background: linear-gradient(135deg, #FFD700 0%, #FFC400 100%);
    border: 2px solid #FFC400;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
  }

  /* Show overlay when active */
  .drawer-overlay.active {
    display: block;
  }

  /* Mobile drawer navigation */
  nav {
    position: fixed;
    top: 0;
    right: -280px;
    width: 280px;
    height: 100%;
    background-color: #FFD700;
    z-index: 1004; /* Above overlay (1003) */
    transition: right 0.3s ease;
    overflow-y: auto;
    box-shadow: -4px 0 10px rgba(0, 0, 0, 0.2);
  }

  /* Clean slide-in animation without glow effects */
  @keyframes slideInFromRight {
    0% {
      transform: translateX(60px) scale(0.9);
      opacity: 0;
    }
    60% {
      transform: translateX(-5px) scale(1.02);
      opacity: 0.8;
    }
    80% {
      transform: translateX(2px) scale(0.98);
      opacity: 1;
    }
    100% {
      transform: translateX(0) scale(1);
      opacity: 1;
    }
  }

  nav ul li {
    opacity: 0;
    transform: translateX(60px) scale(0.9);
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  }

  nav.active ul li {
    opacity: 1;
    transform: translateX(0) scale(1);
  }

  /* Staggered delays for each menu item */
  nav.active ul li:nth-child(1) {
    transition-delay: 0.1s;
    animation-delay: 0.1s;
  }

  nav.active ul li:nth-child(2) {
    transition-delay: 0.18s;
    animation-delay: 0.18s;
  }

  nav.active ul li:nth-child(3) {
    transition-delay: 0.26s;
    animation-delay: 0.26s;
  }

  nav.active ul li:nth-child(4) {
    transition-delay: 0.34s;
    animation-delay: 0.34s;
  }

  nav.active ul li:nth-child(5) {
    transition-delay: 0.42s;
    animation-delay: 0.42s;
  }

  nav.active ul li:nth-child(6) {
    transition-delay: 0.5s;
    animation-delay: 0.5s;
  }

  nav.active {
    right: 0;
  }

  nav ul {
    flex-direction: column;
    padding: 70px 20px 20px;
    gap: 0;
    align-items: stretch;
  }

  nav ul li {
    margin: 0;
    width: 100%;
  }

  nav ul li a {
    font-size: 1.1rem;
    padding: 15px 20px;
    display: block;
    width: 100%;
    text-align: left;
    border-radius: 12px;
    background: white;
    margin-bottom: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
  }

  nav ul li a:hover {
    background: #fff;
    transform: translateX(5px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
  }

  nav ul li a:hover::after {
    display: none;
  }
}
