/* Mobile Navbar Dropdown + Hamburger Animation */

.navbar .nav-toggle {
  display: none;
  width: 42px;
  height: 32px;
  cursor: pointer;
  position: relative;
  z-index: 1002;
  pointer-events: auto;
  flex-direction: column;
  justify-content: space-between;
  align-items: stretch;
  padding: 0;
  border: none;
  background: transparent;
  -webkit-tap-highlight-color: transparent;
}

.navbar .nav-toggle i {
  display: none;
}

.navbar .nav-toggle .bar {
  display: block;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, #ffffff 0%, #fde68a 55%, #facc15 100%);
  border-radius: 999px;
  transition: transform 0.4s ease, opacity 0.4s ease, box-shadow 0.4s ease, filter 0.4s ease;
  transform-origin: center;
  box-shadow: 0 0 10px rgba(250, 204, 21, 0.35);
  position: absolute;
  left: 0;
  top: 50%;
}

.navbar .nav-toggle:hover .bar {
  filter: brightness(1.08);
  box-shadow: 0 0 14px rgba(250, 204, 21, 0.45);
}

.navbar .nav-toggle .bar1 {
  transform: translateY(-12px);
}
.navbar .nav-toggle .bar2 {
  transform: translateY(0);
}
.navbar .nav-toggle .bar3 {
  transform: translateY(12px);
}

.navbar .nav-toggle.active .bar1 {
  transform: translateY(0) rotate(-45deg);
}
.navbar .nav-toggle.active .bar2 {
  opacity: 0;
  transform: scaleX(0.2);
}
.navbar .nav-toggle.active .bar3 {
  transform: translateY(0) rotate(45deg);
}

@keyframes navMenuDrop {
  from {
    opacity: 0;
    transform: translateY(-24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 768px) {
  .navbar .nav-container {
    position: relative;
    overflow: visible;
  }

  .navbar .nav-menu {
    position: absolute;
    top: 62px;
    right: 20px;
    left: auto;
    width: min(82vw, 320px);
    z-index: 1001;
    background: linear-gradient(160deg, rgba(2, 6, 23, 0.97), rgba(30, 41, 59, 0.98));
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    flex-direction: column;
    padding: 0;
    border: 1px solid rgba(250, 204, 21, 0.38);
    border-radius: 12px;
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px) scale(0.98);
    transform-origin: top right;
    transition: max-height .4s ease, opacity .3s ease, transform .3s ease, visibility .3s ease, box-shadow .3s ease;
    box-shadow: 0 18px 36px rgba(0,0,0,.45), 0 0 0 rgba(250, 204, 21, 0);
  }

  .navbar .nav-menu li {
    width: 100%;
  }

  .navbar .nav-menu a {
    display: block;
    padding: 15px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
  }

  .navbar .nav-menu li:last-child a {
    border-bottom: none;
  }

  .navbar .nav-menu.active,
  .navbar .nav-menu.show {
    max-height: 380px;
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
    animation: navMenuDrop .32s ease;
    box-shadow: 0 18px 36px rgba(0,0,0,.48), 0 0 20px rgba(250, 204, 21, 0.22);
  }

  .navbar .nav-toggle {
    display: inline-flex;
  }
}

/* Fallback classes in case some pages use generic .active/.show rules */
.navbar .nav-menu.active,
.navbar .nav-menu.show {
  display: flex !important;
}
