/* Mobile-Navigation — Hamburger-Menü für kempfart.de
   Funktioniert mit und ohne GooeyNav-Wrapper (.gooey-nav-container).
   Behebt das Problem, dass die 6 Nav-Tabs auf schmalen Screens überlappen. */

.nav-burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px; height: 44px;
  padding: 10px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 10px;
  cursor: pointer;
  z-index: 120;
}
.nav-burger span {
  display: block; width: 100%; height: 2px;
  background: #f0ece4; border-radius: 2px;
  transition: transform 0.28s ease, opacity 0.2s ease;
}
/* offener Zustand: X-Icon */
nav.nav-open .nav-burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
nav.nav-open .nav-burger span:nth-child(2) { opacity: 0; }
nav.nav-open .nav-burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* index.html: heller Zustand nach Scroll → Burger dunkel einfärben */
nav.scrolled .nav-burger { border-color: rgba(0,0,0,0.18); background: rgba(0,0,0,0.05); }
nav.scrolled .nav-burger span { background: #14101c; }

@media (max-width: 760px) {
  .nav-burger { display: flex; }

  /* Menü-Container aus dem Fluss nehmen und als Dropdown unter die Bar legen.
     Deckt beide Varianten ab: direkte .nav-links ODER GooeyNav-Wrapper. */
  nav > .nav-links,
  nav > .gooey-nav-container {
    position: absolute;
    top: 100%; left: 0; right: 0;
    display: block;
    background: rgba(14,14,20,0.97);
    backdrop-filter: blur(16px);
    border-top: 1px solid rgba(255,255,255,0.06);
    border-bottom: 1px solid rgba(255,255,255,0.08);
    padding: 0.3rem 0 0.7rem;
    max-height: 0; overflow: hidden;
    opacity: 0; visibility: hidden;
    transition: max-height 0.32s ease, opacity 0.24s ease, visibility 0.24s;
  }
  nav.nav-open > .nav-links,
  nav.nav-open > .gooey-nav-container {
    max-height: 85vh; overflow-y: auto;
    opacity: 1; visibility: visible;
  }

  /* ul in eine Spalte umbrechen (direkt oder im Wrapper) */
  nav > .nav-links,
  nav > .gooey-nav-container > .nav-links {
    flex-direction: column;
    align-items: stretch;
    gap: 0 !important;
    width: 100%;
  }
  .nav-links li { width: 100%; }
  .nav-links a {
    display: block;
    padding: 0.9rem 1.8rem !important;
    font-size: 0.95rem !important;
    /* im Dropdown immer hell lesbar, auch wenn nav.scrolled dunkel einfärbt */
    color: rgba(240,236,228,0.8) !important;
  }
  .nav-links a:hover,
  .nav-links a.active,
  .nav-links li.gooey-active a { color: var(--yellow, #f0e040) !important; }

  /* GooeyNav-Partikeleffekt im Dropdown ausblenden (Positionierung passt dort nicht) */
  .gooey-nav-container .effect { display: none !important; }
}
