/* ======================================================
   ROOT VARIABLEN (SYSTEM)
====================================================== */
:root {
  --primary: #ff4d4d;
  --primary-light: #c9f1ff;
  --primary-dark: #7a0000;
  --accent: #00ff88;

  --background: #1a1a1a;
  --glass-bg: rgba(26,26,26,.85);

  --box-radius: 14px;
  --transition: .3s ease;
  --font-family: 'Segoe UI', Arial, sans-serif;
}

/* ======================================================
   NAV CONTAINER – BOX STYLE
====================================================== */
.main-nav {
  max-width: 1100px;
  margin: 28px auto;
  padding: 18px 22px 22px;
  position: relative;

  background: var(--glass-bg);
  border-radius: var(--box-radius);
  font-family: var(--font-family);

  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  overflow: visible;
  z-index: 1000;
}

/* ======================================================
   NEON RAHMEN
====================================================== */
.main-nav::before,
.main-nav::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
}

.main-nav::before {
  border: 2px solid transparent;
  background: linear-gradient(
    90deg,
    var(--primary),
    var(--accent),
    var(--primary-light)
  ) border-box;

  -webkit-mask:
    linear-gradient(#000 0 0) padding-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;

  animation: neo-border 6s linear infinite;
}

.main-nav::after {
  inset: 6px;
  border-radius: calc(var(--box-radius) - 6px);
  background: radial-gradient(
    circle at top,
    rgba(0,255,136,.18),
    transparent 70%
  );
  opacity: .6;
}

@keyframes neo-border {
  0%   { filter: hue-rotate(0deg); }
  100% { filter: hue-rotate(360deg); }
}

/* ======================================================
   TAGLINE
====================================================== */
.nav-tagline {
  text-align: center;
}

.nav-title {
  font-size: 1.7rem;
  font-weight: 800;
  color: var(--primary-light);
}

.nav-subtitle {
  display: block;
  font-size: .95rem;
  color: rgba(201,241,255,.75);
}

/* ======================================================
   NAV LIST (DESKTOP)
====================================================== */
.nav-list {
  list-style: none;
  display: flex;
  gap: 18px;
  padding: 0;
  margin: 0;
  align-items: center;
  flex-wrap: wrap;
  overflow: visible;
}

.nav-list li {
  position: relative;
}

/* ======================================================
   LINKS / BUTTONS
====================================================== */
.nav-list a,
.dropdown-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;

  padding: 10px 20px;
  border-radius: 12px;

  background: rgba(255,255,255,.06);
  color: var(--primary-light);
  text-decoration: none;
  font-weight: 600;

  border: 1px solid rgba(201,241,255,.18);
  transition: background var(--transition),
              transform var(--transition);
}

.nav-list a:hover,
.dropdown-toggle:hover {
  background: rgba(0,255,136,.18);
  transform: translateY(-2px);
}

.nav-list a[aria-current="page"] {
  background: rgba(0,255,136,.28);
}

/* ======================================================
   DROPDOWN
====================================================== */
.has-dropdown > .dropdown {
  position: absolute;
  top: 100%;
  left: 0;

  min-width: 240px;
  padding: 10px;

  background: rgba(20,20,20,.95);
  border-radius: 12px;
  box-shadow: 0 12px 30px rgba(0,0,0,.6);

  display: flex;
  flex-direction: column;
  gap: 6px;

  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  pointer-events: none;

  transition: opacity .25s ease,
              transform .25s ease;
  z-index: 2000;
}

.has-dropdown.open > .dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

.dropdown a {
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(255,255,255,.05);
  font-size: .95rem;
}

/* ======================================================
   HAMBURGER
====================================================== */
.hamburger {
  display: none;
  position: absolute;
  top: 20px;
  right: 20px;
  width: 34px;
  height: 26px;
  cursor: pointer;
}

.hamburger span {
  display: block;
  height: 3px;
  background: var(--accent);
  border-radius: 3px;
  transition: .3s;
}

.hamburger span + span {
  margin-top: 6px;
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.hamburger.active span:nth-child(2) {
  opacity: 0;
}
.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

/* ======================================================
   MOBILE – FINAL FIX (KEIN ABSTAND PROBLEM)
====================================================== */
@media (max-width: 900px) {

  .hamburger {
    display: block;
  }

  .nav-list {
    display: none;          /* 🔥 WICHTIG */
    flex-direction: column;
    width: 100%;
    gap: 6px;               /* 🔥 realer Abstand */
  }

  .nav-list.open {
    display: flex;          /* 🔥 kein max-height */
  }

  .nav-list a,
  .dropdown-toggle {
    width: 100%;
    justify-content: center;
    padding: 10px 14px;
  }

  .has-dropdown > .dropdown {
    position: static;
    box-shadow: none;
    transform: none;
    padding: 6px 0;
  }

  .dropdown a {
    padding: 8px 14px;
    font-size: .9rem;
  }
}

/* ======================================================
   VISUALLY HIDDEN (SEO & ACCESSIBILITY)
   Für Screenreader sichtbar, aber nicht im Layout
====================================================== */
.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}