/* ======================================
   Dynamic Menu (polished)
   Scope: .site-menu …
   ====================================== */

/* Container & Layering */
.site-menu {
  position: relative;
  z-index: 900; /* unter header (1000), über Content */
}

/* Panel (ausgeblendet, solange .d-none vorhanden) */
.site-menu.menu {
  position: absolute;
  top: 100px; /* Abstand zum Trigger */
  left: 12px; /* leicht eingerückt – passt zum Grid-Icon */
  min-width: 280px;
  max-width: min(92vw, 380px);
  padding: 12px;
  border-radius: 16px;

  /* Glas + Neon */
  border: 1px solid rgba(160, 175, 255, 0.26);
  background: radial-gradient(
      120% 120% at 10% 0%,
      rgba(88, 106, 255, 0.12),
      transparent 60%
    ),
    radial-gradient(
      120% 120% at 100% 0%,
      rgba(76, 201, 240, 0.1),
      transparent 60%
    ),
    linear-gradient(180deg, rgba(12, 16, 28, 0.96), rgba(8, 12, 24, 0.96));
  backdrop-filter: blur(12px) saturate(1.05);
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(255, 255, 255, 0.035) inset;

  /* Ein-/Ausblende-Animation */
  transform-origin: top left;
  transform: translateY(-8px) scale(0.985);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease,
    border-color 0.18s ease;
}

/* sichtbar, wenn Bootstrap .d-none entfernt ist */
.site-menu.menu:not(.d-none) {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

/* dezent leuchtende Kante */
.site-menu.menu::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  box-shadow: 0 0 30px rgba(120, 130, 255, 0.18) inset;
}

/* Kopfzeile (optional – wird nur gestylt, falls im Partial vorhanden) */
.site-menu .menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 4px 6px 10px;
  margin: 0 2px 8px;
  border-bottom: 1px dashed rgba(160, 175, 255, 0.28);
}
.site-menu .menu-title {
  margin: 0;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.35px;
  text-transform: uppercase;
  color: #ffffff; /* WEISS */
  opacity: 0.95;
}
.site-menu .menu-close {
  inline-size: 32px;
  block-size: 32px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: #ffffff;
  border: 1px solid rgba(160, 175, 255, 0.26);
  background: linear-gradient(
    180deg,
    rgba(22, 26, 48, 0.5),
    rgba(16, 20, 36, 0.5)
  );
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease,
    box-shadow 0.18s ease;
}
.site-menu .menu-close:hover {
  transform: translateY(-1px);
  border-color: rgba(180, 195, 255, 0.6);
  box-shadow: 0 10px 20px rgba(80, 110, 220, 0.25);
}

/* Listen-Basis */
.site-menu.menu ul,
.site-menu.menu ol {
  list-style: none;
  margin: 0;
  padding: 6px;
  display: grid;
  gap: 8px;
}

/* Einträge */
.site-menu.menu li {
  margin: 0;
  padding: 0;
}

/* Links & Buttons – HIER: weiße Schrift */
.site-menu.menu a,
.site-menu.menu button {
  display: grid;
  grid-template-columns: 1fr auto; /* Titel links, Icon/Badge rechts */
  align-items: center;
  gap: 10px;

  width: 100%;
  text-align: left;
  text-decoration: none;
  cursor: pointer;

  padding: 12px 14px;
  border-radius: 12px;

  color: #ffffff; /* WEISS */
  font-size: 14.5px;
  letter-spacing: 0.2px;

  border: 1px solid rgba(160, 175, 255, 0.22);
  background: linear-gradient(
    180deg,
    rgba(22, 26, 48, 0.72),
    rgba(12, 16, 28, 0.72)
  );
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.03) inset;

  transition: transform 0.15s ease, box-shadow 0.15s ease,
    border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

/* Hover / Focus – stärkerer Kontrast und Glow */
.site-menu.menu a:hover,
.site-menu.menu a:focus,
.site-menu.menu button:hover,
.site-menu.menu button:focus {
  transform: translateY(-1px);
  border-color: rgba(185, 198, 255, 0.7);
  box-shadow: 0 14px 26px rgba(80, 110, 220, 0.28),
    0 0 0 1px rgba(255, 255, 255, 0.05) inset;
  outline: none;
}

/* Active/aktuelle Seite (optional: .is-active am <a> setzen) */
.site-menu.menu a.is-active,
.site-menu.menu button.is-active {
  border-color: rgba(124, 113, 255, 0.9);
  background: linear-gradient(
      180deg,
      rgba(124, 113, 255, 0.22),
      rgba(124, 113, 255, 0.08)
    ),
    linear-gradient(180deg, rgba(22, 26, 48, 0.8), rgba(12, 16, 28, 0.8));
  box-shadow: 0 10px 22px rgba(124, 113, 255, 0.25),
    0 0 0 1px rgba(255, 255, 255, 0.06) inset;
}

/* Link-Inhalt: Titel und Unterzeile (wenn du <span class="menu-sub"> nutzt) */
.site-menu.menu a .menu-title,
.site-menu.menu button .menu-title {
  color: #ffffff; /* WEISS */
  font-weight: 600;
  line-height: 1.2;
}
.site-menu.menu a .menu-sub,
.site-menu.menu button .menu-sub {
  display: block;
  margin-top: 2px;
  font-size: 12.5px;
  color: #d9def7;
  opacity: 0.9;
}

/* Pfeil/Icon rechts (falls vorhanden) */
.site-menu.menu a .menu-arrow,
.site-menu.menu button .menu-arrow {
  justify-self: end;
  inline-size: 16px;
  block-size: 16px;
  opacity: 0.95;
}

/* SVG/IMG-Icons rechts/links */
.site-menu.menu a svg,
.site-menu.menu button svg,
.site-menu.menu a img,
.site-menu.menu button img {
  justify-self: end; /* landet rechts, wenn im Grid letzter */
  max-inline-size: 18px;
  max-block-size: 18px;
  filter: drop-shadow(0 0 6px rgba(120, 130, 255, 0.35));
}

/* Sektionstitel in Partials (wenn vorhanden) */
.site-menu.menu .menu-section-title {
  margin: 8px 6px 4px;
  padding: 6px 8px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.35px;
  text-transform: uppercase;
  color: #ffffff; /* WEISS */
  border-left: 3px solid #7b5cff;
  opacity: 0.95;
}

/* Trennlinie (falls <hr> genutzt) */
.site-menu.menu hr {
  border: 0;
  height: 1px;
  margin: 10px 6px;
  background: linear-gradient(
    90deg,
    rgba(130, 140, 200, 0),
    rgba(130, 140, 200, 0.45),
    rgba(130, 140, 200, 0)
  );
}

/* Badge/Count rechts (optional) */
.site-menu.menu .menu-badge {
  justify-self: end;
  font-size: 11.5px;
  line-height: 1;
  padding: 4px 6px;
  border-radius: 8px;
  color: #ffffff; /* WEISS */
  border: 1px solid rgba(160, 175, 255, 0.36);
  background: linear-gradient(
    180deg,
    rgba(22, 28, 52, 0.7),
    rgba(16, 20, 36, 0.7)
  );
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.03) inset;
}

/* Fokus (Tastatur) */
.site-menu.menu a:focus-visible,
.site-menu.menu button:focus-visible {
  outline: 2px solid rgba(190, 205, 255, 0.85);
  outline-offset: 2px;
}

/* Responsiveness */
@media (max-width: 420px) {
  .site-menu.menu {
    min-width: 230px;
    left: 8px;
    top: 100px;
    padding: 10px;
  }
  .site-menu.menu a,
  .site-menu.menu button {
    padding: 10px 12px;
    font-size: 14px;
  }
}

/* Optional – kleine Dreieck-Markierung zum Trigger (dekorativ) */
.site-menu.menu::after {
  content: "";
  position: absolute;
  top: -8px;
  left: 18px;
  width: 12px;
  height: 12px;
  transform: rotate(45deg);
  background: linear-gradient(
    180deg,
    rgba(12, 16, 28, 0.96),
    rgba(8, 12, 24, 0.96)
  );
  border-left: 1px solid rgba(160, 175, 255, 0.26);
  border-top: 1px solid rgba(160, 175, 255, 0.26);
  box-shadow: -2px -2px 8px rgba(120, 130, 255, 0.12);
}
