/* =========================================================
   Streambuzzer Mega-Menü Navigation — v2.6.0 (desk #249)
   Aufbau/Verhalten wie nc3.de-Mega-Menü, Panel dunkel im SB-Design. Scoped under .sb-nav — no global leaks.
   ========================================================= */

.sb-nav {
  --stage: #060a12;   /* = nc3.de --void (dunkel wie NC3, desk #249) */
  --stage-2: #0b1220;
  --stage-line: rgba(255,255,255,.09);
  --on-stage: #E9EEF5;
  --on-stage-soft: #9AA6B8;
  /* Mega-Panel dunkel (v2.6.0): Schiene = --sb-surface, Bühne eine Stufe heller */
  --rail: #0a1020;
  --paper: #0f1729;
  --line: rgba(62,195,240,.14);
  --ink: #F2F6FB;
  --ink-soft: #9AA6B8;
  --blue: #33b8e3;
  --ci-ink: #007aa3;
  --glow: linear-gradient(90deg,#0099cc 0%,#00b8e6 100%);
  --orange: #ff9900;
  --orange-hover: #e68a00;
  --bar-h: 76px;
  --f-display: "Albert Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-body: "Barlow", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-label: "Barlow Semi Condensed", "Barlow", system-ui, sans-serif;
}

/* ---------- Bar ---------- */
.sb-nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--stage);
  border-bottom: 1px solid var(--stage-line);
  isolation: isolate;
}
.sb-nav__bar {
  max-width: 1440px;
  margin: 0 auto;
  height: var(--bar-h);
  display: flex;
  align-items: stretch;
  gap: 40px;
  padding: 0 32px;
}
.sb-nav__logo {
  display: flex;
  align-items: center;
  flex: none;
  color: var(--on-stage);
  text-decoration: none;
  font-family: var(--f-display);
  font-size: 26px;
}
.sb-nav__logo img {
  height: 34px;
  width: auto;
  display: block;
}
.sb-nav__menu {
  display: flex;
  align-items: stretch;
  flex: 1;
}
.sb-nav__menu > nav {
  display: flex;
  align-items: stretch;
}
.sb-nav__list {
  display: flex;
  align-items: stretch;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.sb-nav__item {
  display: flex;
}
.sb-nav__trigger,
.sb-nav__link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 18px;
  margin-bottom: -1px;
  font: 500 17px/1 var(--f-body);
  color: var(--on-stage);
  background: none;
  border: 0;
  text-decoration: none;
  cursor: pointer;
  position: relative;
  transition: background .15s, color .15s;
}
.sb-nav__trigger svg {
  width: 12px;
  height: 12px;
  transition: transform .2s;
}
.sb-nav__trigger:hover,
.sb-nav__link:hover {
  color: #fff;
}
.sb-nav__trigger::after,
.sb-nav__link::after {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  height: 2px;
  background: var(--blue);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .2s;
}
.sb-nav__link:hover::after,
.sb-nav__trigger:hover::after {
  transform: scaleX(1);
}
.sb-nav__link[aria-current="page"]::after {
  transform: scaleX(1);
}
/* offener Reiter: Fläche des Panels, bündig – kein Spalt */
.sb-nav__trigger[aria-expanded="true"] {
  background: var(--paper);
  color: #fff;
}
.sb-nav__trigger[aria-expanded="true"]::after {
  display: none;
}
.sb-nav__trigger[aria-expanded="true"] svg {
  transform: rotate(180deg);
}
.sb-nav__item.is-current-parent > .sb-nav__trigger::after { transform: scaleX(1); }

.sb-nav__actions {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-left: auto;
}
.sb-nav__cta-btn {
  display: inline-flex;
  align-items: center;
  height: 44px;
  padding: 0 24px;
  border-radius: var(--sb-radius-btn, 6px);   /* wie alle Buttons (v2.5.0, vorher Pille 22px) */
  font: 600 16px/1 var(--f-body);
  color: var(--stage);
  text-decoration: none;
  /* gleicher Verlauf wie .sb-btn-primary – vorher per !important aus sb-theme.css überschrieben */
  background: linear-gradient(180deg, #ffa41f, #ff8a00);
  box-shadow: 0 4px 14px rgba(255,138,0,.30), inset 0 1px 0 rgba(255,255,255,.3);
  transition: transform .2s, box-shadow .2s;
}
.sb-nav__cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(255,138,0,.40), inset 0 1px 0 rgba(255,255,255,.3);
}
.sb-burger {
  display: none;
}

/* ---------- Kunden-Login (v2.9.3): Icon vor „Termin vereinbaren“, mobil neben dem Burger ---------- */
.sb-nav__account {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: var(--sb-radius-btn, 6px);
  color: var(--on-stage);            /* #E9EEF5 auf #060a12 ≈ 17:1 */
  text-decoration: none;
  transition: color .2s, background .2s;
}
.sb-nav__account .nc3-icon { color: inherit; }
.sb-nav__account svg { width: 26px; height: 26px; }   /* fest am svg: .nc3-icon setzt eigene Größe */
.sb-nav__account-txt { font: 600 15px/1 var(--f-body); }
.sb-nav__account:hover { color: var(--blue); background: rgba(51,184,227,.1); }
.sb-nav__account:focus-visible,
.sb-nav__mobile-login:focus-visible,
.sb-burger:focus-visible {
  outline: 2px solid #8be4ff;
  outline-offset: 2px;
}
/* Tooltip (Hover/Tastatur-Fokus), Name kommt per aria-label */
.sb-nav__account::after {
  content: attr(data-tip);
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  padding: 6px 10px;
  border-radius: 6px;
  background: var(--paper);
  border: 1px solid var(--line);
  color: var(--ink);
  font: 500 14px/1 var(--f-body);
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity .15s, visibility 0s linear .15s;
}
.sb-nav__account:hover::after,
.sb-nav__account:focus-visible::after {
  opacity: 1;
  visibility: visible;
  transition-delay: 0s;
}
.sb-nav__mobile-login { display: none; }

/* ---------- Mega-Panel (dunkel) ---------- */
.sb-mega {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  background: var(--paper);
  color: var(--ink);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 40px 80px -24px rgba(0,0,0,.85);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity .16s ease, transform .16s ease, visibility 0s linear .16s;
}
.sb-mega.is-open {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition: opacity .16s ease, transform .16s ease;
}
/* Schiene läuft links bis zum Rand, Bühne rechts – Panel bleibt 1440 breit zentriert */
.sb-mega::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 50%;
  background: var(--rail);
}
.sb-mega__inner {
  position: relative;
  max-width: 1440px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(320px,410px) 1fr;
  min-height: 420px;
  max-height: calc(100vh - var(--bar-h) - 24px);
}

.sb-mega__rail {
  background: var(--rail);
  padding: 34px 0 30px 32px;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}
.sb-mega__group {
  margin: 0 0 10px;
  font: 600 15px/1 var(--f-label);
  letter-spacing: .03em;
  color: var(--ink-soft);
}
.sb-mega__group:not(:first-child) {
  margin-top: 26px;
}
.sb-mega__fams {
  list-style: none;
  margin: 0;
  padding: 0;
}
.sb-mega__fam {
  position: relative;
  display: block;
  padding: 9px 28px 9px 16px;
  margin-left: -16px;
  font: 600 21px/1.2 var(--f-display);
  color: var(--on-stage);
  text-decoration: none;
  border-radius: 10px 0 0 10px;
  transition: color .12s;
}
.sb-mega__fams--small .sb-mega__fam {
  font-size: 17px;
  padding-top: 7px;
  padding-bottom: 7px;
}
.sb-mega__fam:hover {
  color: var(--blue);
}
/* aktiver Eintrag verschmilzt mit der Bühne */
.sb-mega__fam.is-active {
  background: var(--paper);
  color: #fff;
}
.sb-mega__fam.is-active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  bottom: 10px;
  width: 3px;
  border-radius: 2px;
  background: var(--blue);
}
.sb-mega__fam[aria-current="page"] { color: var(--blue); }
.sb-mega__hint {
  display: none;
}
/* kleine Linkzeile (z. B. Vergleiche) */
.sb-mega__line {
  margin: 22px 28px 0 0;
  font: 400 15px/1.6 var(--f-body);
  color: var(--ink-soft);
}
.sb-mega__line > span:first-child {
  display: block;
  margin-bottom: 4px;
  font: 600 15px/1 var(--f-label);
  letter-spacing: .03em;
}
.sb-mega__line a {
  color: var(--on-stage);
  text-decoration: none;
  border-bottom: 1px solid rgba(62,195,240,.35);
}
.sb-mega__line a:hover { color: var(--blue); border-bottom-color: currentColor; }
.sb-mega__cta {
  margin-top: auto;
  padding-top: 28px;
  padding-right: 28px;
  font: 600 16px/1.3 var(--f-body);
  color: #ffb547;
  text-decoration: none;
}
.sb-mega__cta span {
  border-bottom: 1.5px solid currentColor;
}
.sb-mega__cta:hover { color: #ffc24d; }
.sb-mega__cta small {
  display: block;
  margin-top: 4px;
  font-weight: 400;
  font-size: 14px;
  color: var(--ink-soft);
}

.sb-mega__stage {
  position: relative;
  padding: 44px 56px 40px;
  overflow: hidden;
  background: var(--paper);
}
/* Signatur: Passkreuz-Raster, dezent in der Ecke */
.sb-mega__stage::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  width: 46%;
  height: 70%;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='36' height='36'%3E%3Cpath d='M18 13v10M13 18h10' stroke='%233EC3F0' stroke-opacity='.22' stroke-width='1.2'/%3E%3C/svg%3E");
  -webkit-mask: radial-gradient(circle at 100% 100%, #000 0, transparent 70%);
  mask: radial-gradient(circle at 100% 100%, #000 0, transparent 70%);
}
.sb-pane {
  display: none;
  position: relative;
  z-index: 1;
  max-width: 760px;
}
.sb-pane.is-active {
  display: block;
  animation: sb-pane .18s ease;
}
@keyframes sb-pane {
  from { opacity: 0; transform: translateX(6px); }
  to   { opacity: 1; transform: none; }
}
.sb-pane__title {
  margin: 0 0 14px;
  font: 600 40px/1.08 var(--f-display);
  letter-spacing: -.01em;
  color: #fff;
}
.sb-pane__text {
  margin: 0 0 30px;
  max-width: 46ch;
  font: 400 19px/1.5 var(--f-body);
  color: #C3CDDC;
}
.sb-pane__more {
  display: inline-flex;
  align-items: center;
  height: 46px;
  padding: 0 22px;
  border-radius: var(--sb-radius-btn, 6px);
  border: 1px solid rgba(62,195,240,.45);
  background: rgba(62,195,240,.06);
  color: #fff;
  font: 600 16px/1 var(--f-body);
  text-decoration: none;
  transition: background .15s, border-color .15s;
}
.sb-pane__more:hover {
  background: rgba(62,195,240,.16);
  border-color: var(--blue);
}

/* Fokus */
.sb-nav :focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Footer-Styles: nur noch in sb-theme.css (v2.3.0) */

.screen-reader-text {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Schmale Desktops (1280–1439, v2.9.3; vorher 1024–1279): Bar passt ohne Umbruch ---------- */
.sb-nav__menu { min-width: 0; }
.sb-nav__cta-btn { white-space: nowrap; flex: none; }
@media (min-width: 1280px) { .sb-nav__trigger, .sb-nav__link { white-space: nowrap; } }
@media (min-width: 1280px) and (max-width: 1439px) {
  .sb-nav__bar { gap: 20px; padding: 0 24px; }
  .sb-nav__trigger,
  .sb-nav__link { padding: 0 12px; font-size: 16px; }
  .sb-nav__trigger::after,
  .sb-nav__link::after { left: 12px; right: 12px; }
  .sb-nav__actions { gap: 14px; }
  .sb-nav__cta-btn { padding: 0 18px; font-size: 15px; }
}

/* ---------- Mobil (Burger bis 1279 px, v2.9.3) ---------- */
@media (max-width: 1279px) {
  .sb-nav__bar {
    padding: 0 20px;
    gap: 16px;
    height: 64px;
  }
  .sb-nav { --bar-h: 64px; }
  .sb-nav__actions .sb-nav__cta-btn { display: none; }
  .sb-burger {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    align-self: center;   /* v2.10.3: mittig zur Leiste wie Login-Icon + Logo (vorher oben, 10 px höher) */
    margin-left: auto;
    background: none;
    border: 0;
    color: #fff;
    cursor: pointer;
  }
  .sb-burger span,
  .sb-burger span::before,
  .sb-burger span::after {
    display: block;
    width: 22px;
    height: 2px;
    background: currentColor;
    position: relative;
    transition: transform .2s, background .2s;
  }
  .sb-burger span::before,
  .sb-burger span::after {
    content: "";
    position: absolute;
    left: 0;
    width: 100%;
    transition: transform .2s, background .2s, top .2s;
  }
  .sb-burger span::before { top: -7px; }
  .sb-burger span::after  { top:  7px; }
  .sb-nav.is-mobile-open .sb-burger span { background: transparent; }
  .sb-nav.is-mobile-open .sb-burger span::before { top: 0; transform: rotate(45deg); }
  .sb-nav.is-mobile-open .sb-burger span::after  { top: 0; transform: rotate(-45deg); }
  .sb-nav__actions { margin-left: auto; }
  .sb-burger { margin-left: 0; }
  .sb-nav__account::after { display: none; }   /* mobil kein Tooltip (Touch) */

  .sb-nav__menu {
    display: none;
    position: fixed;
    inset: var(--bar-h) 0 0 0;
    background: var(--stage);
    overflow-y: auto;
    padding: 12px 20px 40px;
    flex-direction: column;
  }
  .sb-nav.is-mobile-open .sb-nav__menu { display: flex; }
  .sb-nav__menu > nav { display: block; }
  .sb-nav__list { flex-direction: column; gap: 0; }
  .sb-nav__item { flex-direction: column; border-bottom: 1px solid var(--stage-line); }
  .sb-nav__trigger,
  .sb-nav__link {
    height: 60px;
    padding: 0 4px;
    justify-content: space-between;
    font: 600 24px/1 var(--f-display);
    margin: 0;
  }
  .sb-nav__trigger::after,
  .sb-nav__link::after { display: none; }
  .sb-nav__trigger[aria-expanded="true"] { background: none; color: #fff; }
  .sb-mega {
    position: static;
    display: none;
    opacity: 1;
    visibility: visible;
    transform: none;
    background: none;
    color: var(--on-stage);
    box-shadow: none;
    transition: none;
  }
  .sb-mega.is-open { display: block; }
  .sb-mega::before { display: none; }
  .sb-mega__inner { display: block; min-height: 0; max-height: none; }
  .sb-mega__stage { display: none; }
  .sb-mega__rail { background: none; padding: 0 0 18px; overflow: visible; }
  .sb-mega__group { color: var(--on-stage-soft); margin-top: 14px; }
  .sb-mega__fam,
  .sb-mega__fams--small .sb-mega__fam {
    margin: 0;
    padding: 10px 0;
    border-radius: 0;
    font: 600 18px/1.25 var(--f-body);
    color: var(--on-stage);
  }
  .sb-mega__fam.is-active { background: none; color: var(--on-stage); }
  .sb-mega__fam.is-active::before { display: none; }
  .sb-mega__fam:hover { color: var(--blue); }
  .sb-mega__hint {
    display: block;
    margin-top: 2px;
    font: 400 15px/1.35 var(--f-body);
    color: var(--on-stage-soft);
  }
  .sb-mega__fam[aria-current="page"] { color: var(--blue); }
  .sb-mega__line { margin: 12px 0 0; }
  .sb-mega__cta { padding-top: 18px; }
  .sb-mega__cta small { color: var(--on-stage-soft); }
  .sb-nav__mobile-cta { display: flex; margin-top: 28px; }
  .sb-nav__mobile-login {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    align-self: flex-start;
    margin-top: 18px;
    padding: 8px 4px;
    font: 600 18px/1.25 var(--f-body);
    color: var(--on-stage);
    text-decoration: none;
  }
  .sb-nav__mobile-login:hover { color: var(--blue); }
  .sb-nav__mobile-login svg { width: 24px; height: 24px; }
  .sb-nav__mobile-login .nc3-icon { color: var(--blue); }
}
@media (min-width: 1280px) {
  .sb-nav__mobile-cta { display: none; }
}

/* ---------- Reduced Motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .sb-nav *,
  .sb-nav *::before,
  .sb-nav *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* ── Fix: Burger close icon ─────────────── */
.sb-burger {
  position: relative;
  z-index: 100;
}
.sb-burger span {
  transition: background .15s ease;
}
.sb-burger span::before,
.sb-burger span::after {
  transition: top .15s ease, transform .15s ease;
}
@media (max-width: 1279px) {
  .sb-nav.is-mobile-open .sb-burger span {
    background: transparent !important;
  }
  .sb-nav.is-mobile-open .sb-burger span::before {
    top: 0 !important;
    transform: rotate(45deg) !important;
    width: 22px !important;
  }
  .sb-nav.is-mobile-open .sb-burger span::after {
    top: 0 !important;
    transform: rotate(-45deg) !important;
    width: 22px !important;
  }
}
