/* --- Burger wrap -------------------------------------------- */
#burger-wrap {
  position: relative;
  height: 0;
  overflow: visible;
  z-index: 1000;
}

/* --- Burger button ------------------------------------------ */
#burger-btn {
  position: relative;
  background: transparent !important;
  background-color: transparent !important;
  color: inherit !important;
  border: none;
  border-radius: 0 !important;
  cursor: pointer;
  padding: 0.25rem !important;
  margin: 0 !important;
  display: flex;
  flex-direction: column;
  gap: 5px;
  pointer-events: all;
}

#burger-btn span {
  display: block;
  width: 24px;
  height: 2px;
  background: currentColor;
  transition: transform 0.25s ease, opacity 0.25s ease;
  transform-origin: center;
}

/* Animate to X when open */
#burger-btn.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
#burger-btn.open span:nth-child(2) { opacity: 0; }
#burger-btn.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* --- Drop-down nav ------------------------------------------ */
#burger-nav {
  position: fixed;
  top: 0;
  left: max(5%, calc(50% - 22.5rem));
  right: max(5%, calc(50% - 22.5rem));
  z-index: 999;
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  border-bottom: 1px solid var(--text);
  padding: 0.5rem 1.5rem 1rem;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transition: max-height 0.3s ease, opacity 0.2s ease;
}

#burger-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

#burger-nav ul li {
  padding: 0.45rem 0;
  border-bottom: 1px solid rgba(128,128,128,0.2);
}

#burger-nav ul li:last-child {
  border-bottom: none;
}

#burger-nav ul li a {
  font-size: 1rem;
}
