/* 
   MEGA MENU
*/

/* Burger-Button - X-Transformation bei offenem Panel */
.burger-menu-btn.is-open .burger-line:nth-child(1) {
  transform: translateY(5px) rotate(45deg);
}

.burger-menu-btn.is-open .burger-line:nth-child(2) {
  transform: translateY(-5px) rotate(-45deg);
}

/* Panel */
.mega-panel {
  position: absolute;
  top: calc(100% + 14px);
  right: 0;
  min-width: 360px;
  background: rgba(13, 17, 23, 0.98);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(47, 129, 247, 0.2);
  border-top: 3px solid #2f81f7;
  border-radius: 14px;
  box-shadow:
    0 16px 56px rgba(0, 0, 0, 0.8),
    0 0 0 1px rgba(255, 255, 255, 0.04),
    0 0 32px rgba(47, 129, 247, 0.08);
  z-index: 200001;
  overflow: hidden;
  transform-origin: top right;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px) scale(0.97);
  transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s;
}

.mega-panel.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

/* Einspaltig - Gruppen untereinander */
.mega-columns {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  padding: 16px 0 20px;
}

.mega-col {
  padding: 0;
}

.mega-col + .mega-col {
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  margin-top: 8px;
  padding-top: 8px;
}

/* Spalten-Überschrift */
.mega-col-heading {
  display: block;
  padding: 4px 28px 14px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #7d8590;
  user-select: none;
  pointer-events: none;
}

/* Links - WCAG 2.2 AA: min. 44x44px Touch-Target, 4.5:1 Kontrast */
.mega-link {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 28px;
  min-height: 44px;
  color: rgba(201, 209, 217, 0.92);
  text-decoration: none;
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.3;
  border: none;
  background: transparent;
  width: 100%;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s ease, color 0.15s ease;
  position: relative;
}

/* Blauer linker Akzent-Balken beim Hover */
.mega-link::before {
  content: "";
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 2px;
  height: 0;
  background: #2f81f7;
  border-radius: 2px;
  transition: height 0.2s ease;
}

.mega-link:hover {
  background: rgba(47, 129, 247, 0.09);
  color: #ffffff;
}

.mega-link:hover::before {
  height: 55%;
}

/* Focus - WCAG 2.2 AA 2.4.11 / 2.4.12 */
.mega-link:focus-visible {
  outline: 2px solid #2f81f7;
  outline-offset: -3px;
  background: rgba(47, 129, 247, 0.1);
  color: #ffffff;
}

.mega-link:focus-visible::before {
  height: 55%;
}

/* Icon - via CSS auf 20px gebracht */
.mega-link svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  stroke: #7d8590;
  transition: stroke 0.15s ease;
}

.mega-link:hover svg,
.mega-link:focus-visible svg {
  stroke: #2f81f7;
}

/* Link-Beschreibung */
.mega-link-desc {
  display: block;
  font-size: 0.8rem;
  font-weight: 400;
  color: #7d8590;
  margin-top: 3px;
  line-height: 1.4;
  transition: color 0.15s ease;
}

.mega-link:hover .mega-link-desc,
.mega-link:focus-visible .mega-link-desc {
  color: rgba(201, 209, 217, 0.5);
}

/* Optionale Trennlinie */
.mega-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.06);
  margin: 8px 20px;
}

/* Mobile: volle Breite */
@media (max-width: 480px) {
  .mega-panel {
    right: -8px;
    min-width: calc(100vw - 20px);
    border-radius: 12px;
  }

  .mega-link {
    padding: 12px 20px;
    font-size: 0.95rem;
  }
}
