/* ==================================================================
   NextRB · gemeinsamer Rahmen aller Webseiten
   Kopf (Logo, Programme, Anmelden), Produktleiste, Fuß, Dialoge.
   Alle Klassen beginnen mit „nx-“, damit sie sich nicht mit den
   Stilen der einzelnen Seiten (WaWi, Fallstudien, ProjektM) beißen.
   ================================================================== */
:root {
  --nx-petrol: #0D4D55;
  --nx-petrol-tief: #0A3A40;
  --nx-nacht: #072E33;
  --nx-blau: #277092;
  --nx-blau-hell: #8FD0EA;
  --nx-nebel: #F3F6F6;
  --nx-fuellung: #E3EFF0;
  --nx-linie: #CFDFE1;
  --nx-tinte: #10333A;
  --nx-grau: #516d73;
  --nx-schrift: 'Schibsted Grotesk', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --nx-kopf-hoehe: 68px;
}

html { scroll-padding-top: 130px; }

/* ---------- Kopf ---------- */
.nx-kopf { position: sticky; top: 0; z-index: 50; background: rgba(243, 246, 246, .86); backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid transparent; transition: border-color .2s, box-shadow .2s; font-family: var(--nx-schrift); }
.nx-kopf.nx-gerollt { border-bottom-color: var(--nx-linie); box-shadow: 0 6px 24px -18px rgba(13, 77, 85, .45); }
.nx-kopf-innen { width: min(1200px, 100% - 2rem); margin: 0 auto; height: var(--nx-kopf-hoehe); display: flex; align-items: center; gap: 1.2rem; }
.nx-logo { display: block; flex: none; line-height: 0; }
.nx-logo img { height: 40px; width: auto; display: block; }
.nx-nav { display: flex; align-items: center; gap: 0.2rem; margin-left: auto; }
.nx-nav > a, .nx-nav > button.nx-nav-knopf { font: inherit; font-size: 0.97rem; font-weight: 500; color: var(--nx-tinte); text-decoration: none; background: none; border: 0; padding: 0.55rem 0.8rem; border-radius: 10px; cursor: pointer; display: inline-flex; align-items: center; gap: 0.35rem; transition: background .15s, color .15s; }
.nx-nav > a:hover, .nx-nav > button.nx-nav-knopf:hover, .nx-nav > button.nx-nav-knopf[aria-expanded="true"] { background: rgba(13, 77, 85, .07); color: var(--nx-petrol); }
.nx-nav > a[aria-current="page"] { color: var(--nx-petrol); font-weight: 700; }
.nx-pfeil { width: 9px; height: 9px; border: solid currentColor; border-width: 0 1.8px 1.8px 0; transform: rotate(45deg) translateY(-2px); transition: transform .2s; }
.nx-nav-knopf[aria-expanded="true"] .nx-pfeil { transform: rotate(-135deg) translateY(-2px); }
.nx-rechts { display: flex; align-items: center; gap: 0.6rem; flex: none; }
.nx-anmelden { font: inherit; font-weight: 700; font-size: 0.95rem; color: #fff; background: var(--nx-petrol); border: 0; border-radius: 999px; padding: 0.6rem 1.15rem; cursor: pointer; display: inline-flex; align-items: center; gap: 0.45rem; transition: background .15s, transform .15s; }
.nx-anmelden:hover { background: var(--nx-petrol-tief); }
.nx-anmelden svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.nx-anmelden .nx-punkt { width: 8px; height: 8px; border-radius: 50%; background: #6fe08a; box-shadow: 0 0 0 3px rgba(111, 224, 138, .25); }
.nx-burger { display: none; width: 44px; height: 44px; border: 1px solid var(--nx-linie); background: #fff; border-radius: 12px; cursor: pointer; align-items: center; justify-content: center; flex-direction: column; gap: 5px; }
.nx-burger span { width: 18px; height: 2px; background: var(--nx-petrol); border-radius: 2px; transition: transform .2s, opacity .2s; }
.nx-burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nx-burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nx-burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Sprachwähler (Flaggen) – nur auf Seiten mit Übersetzung */
.sprache { position: relative; }
.sprache > button { display: flex; align-items: center; gap: 6px; background: #fff; border: 1px solid var(--nx-linie); border-radius: 999px; padding: 7px 10px; cursor: pointer; }
.sprache > button:hover { border-color: var(--nx-blau); }
.sprache svg { display: block; width: 22px; height: 16px; border-radius: 3px; box-shadow: 0 0 0 1px rgba(0, 0, 0, .08); }
.sprache .pfeil { border: solid var(--nx-grau); border-width: 0 2px 2px 0; padding: 2.5px; transform: rotate(45deg); margin-top: -3px; }
.sprache-liste { position: absolute; top: calc(100% + 8px); right: 0; z-index: 100; background: #fff; border: 1px solid var(--nx-linie); border-radius: 14px; box-shadow: 0 16px 40px -12px rgba(13, 77, 85, .35); padding: 6px; display: none; flex-direction: column; gap: 2px; }
.sprache-liste.offen { display: flex; }
.sprache-liste button { background: none; border: 0; padding: 7px 9px; border-radius: 9px; cursor: pointer; display: flex; align-items: center; }
.sprache-liste button:hover, .sprache-liste button.aktiv { background: var(--nx-fuellung); }

/* Programme-Ausklapper (Kacheln) */
.nx-ausklapper { position: absolute; left: 0; right: 0; top: 100%; background: #fff; border-bottom: 1px solid var(--nx-linie); box-shadow: 0 30px 60px -30px rgba(13, 77, 85, .45); opacity: 0; visibility: hidden; transform: translateY(-6px); transition: opacity .18s, transform .18s, visibility .18s; }
.nx-ausklapper.offen { opacity: 1; visibility: visible; transform: none; }
.nx-ausklapper-innen { width: min(1200px, 100% - 2rem); margin: 0 auto; padding: 1.4rem 0 1.6rem; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.9rem; }
.nx-prog { display: grid; grid-template-columns: 46px minmax(0, 1fr); gap: 0.25rem 0.85rem; align-items: start; padding: 0.95rem 1rem; border-radius: 16px; border: 1.5px solid var(--nx-linie); text-decoration: none; color: var(--nx-tinte); background: var(--nx-nebel); transition: border-color .15s, background .15s, transform .15s; }
.nx-prog:hover { border-color: var(--nx-blau); background: #fff; transform: translateY(-2px); }
.nx-prog i { grid-row: 1 / span 2; grid-column: 1; width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; color: #fff; font-style: normal; }
.nx-prog i svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.nx-prog b { grid-column: 2; font-size: 1rem; color: var(--nx-petrol); }
.nx-prog span { grid-column: 2; font-size: 0.85rem; color: var(--nx-grau); line-height: 1.4; }
.nx-farbe-wawi { background: linear-gradient(135deg, #277092, #0D4D55); }
.nx-farbe-3d { background: linear-gradient(135deg, #b5461f, #8a3a20); }
.nx-farbe-pm { background: linear-gradient(135deg, #6b5bb5, #3c3480); }
.nx-farbe-qa { background: linear-gradient(135deg, #2E9E5B, #1b6b3c); }
.nx-farbe-cmd { background: linear-gradient(135deg, #50627a, #2f3b4f); }

/* Mobiles Menü */
.nx-mobil { display: none; }
@media (max-width: 980px) {
  .nx-nav, .nx-ausklapper { display: none; }
  .nx-burger { display: inline-flex; }
  .nx-rechts { margin-left: auto; }
  .nx-anmelden .nx-anmelden-text { display: none; }
  .nx-anmelden { padding: 0.65rem; }
  .nx-mobil { display: block; z-index: 45; position: fixed; inset: var(--nx-kopf-hoehe) 0 0 0; background: var(--nx-nebel); overflow-y: auto; padding: 1rem 1rem 2rem; opacity: 0; visibility: hidden; transform: translateY(-8px); transition: opacity .2s, transform .2s, visibility .2s; }
  .nx-mobil.offen { opacity: 1; visibility: visible; transform: none; }
  .nx-mobil .nx-prog { margin-bottom: 0.6rem; background: #fff; }
  .nx-mobil-links { display: grid; gap: 0.3rem; margin-top: 0.8rem; }
  .nx-mobil-links a { display: block; padding: 0.9rem 1rem; border-radius: 12px; background: #fff; border: 1px solid var(--nx-linie); color: var(--nx-tinte); font-weight: 600; text-decoration: none; }
  body.nx-menue-offen { overflow: hidden; }
}
@media (max-width: 420px) { .nx-logo img { height: 34px; } .nx-rechts { gap: 0.4rem; } .sprache > button { padding: 6px 7px; } }

/* ---------- Produktleiste unter dem Kopf ---------- */
.nx-leiste { position: sticky; top: var(--nx-kopf-hoehe); z-index: 40; background: rgba(255, 255, 255, .9); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--nx-linie); font-family: var(--nx-schrift); }
.nx-leiste-innen { width: min(1200px, 100% - 2rem); margin: 0 auto; height: 50px; display: flex; align-items: center; gap: 1.2rem; }
.nx-leiste-name { font-weight: 800 !important; color: var(--nx-petrol); font-size: 1.05rem; letter-spacing: -0.01em; white-space: nowrap; text-decoration: none; }
.nx-leiste-name small { font-weight: 500; color: var(--nx-grau); font-size: 0.85rem; margin-left: 0.35rem; }
.nx-leiste-links { display: flex; gap: 0.2rem; overflow-x: auto; scrollbar-width: none; }
.nx-leiste-links::-webkit-scrollbar { display: none; }
.nx-leiste-links a { color: var(--nx-grau); text-decoration: none; font-weight: 500; font-size: 0.9rem; padding: 0.35rem 0.65rem; border-radius: 8px; white-space: nowrap; }
.nx-leiste-links a:hover, .nx-leiste-links a.nx-aktiv { color: var(--nx-petrol); background: var(--nx-fuellung); }
.nx-leiste-aktion { margin-left: auto; flex: none; font: inherit; font-weight: 700; font-size: 0.88rem; color: #fff; background: var(--nx-blau); border: 0; border-radius: 10px; padding: 0.45rem 0.95rem; text-decoration: none; cursor: pointer; white-space: nowrap; }
.nx-leiste-aktion:hover { background: #2b7da0; }
.nx-leiste-fortschritt { position: absolute; left: 0; bottom: -1px; height: 3px; width: 0; background: var(--nx-blau); transition: width .1s linear; }
@media (max-width: 760px) { .nx-leiste-links { display: none; } .nx-leiste-name small { display: none; } }
/* Produktleiste auf sehr schmalen Handys (320 px) */
@media (max-width: 380px) { .nx-leiste-innen { gap: 0.6rem; } .nx-leiste-name { font-size: 0.95rem; } .nx-leiste-aktion { font-size: 0.8rem; padding: 0.4rem 0.6rem; } }

/* ---------- Fuß ---------- */
.nx-fuss { background: var(--nx-nacht); color: #a9c9cd; font-family: var(--nx-schrift); font-size: 0.95rem; line-height: 1.6; position: relative; overflow: hidden; }
.nx-fuss::before { content: ''; position: absolute; width: 640px; height: 640px; right: -220px; top: -360px; background: radial-gradient(circle, rgba(39, 112, 146, .22), transparent 65%); pointer-events: none; }
.nx-fuss-innen { position: relative; width: min(1200px, 100% - 2rem); margin: 0 auto; padding: 3.6rem 0 1.6rem; display: grid; grid-template-columns: 1.4fr repeat(4, minmax(0, 1fr)); gap: 2rem; }
.nx-fuss img { height: 44px; width: auto; display: block; margin-bottom: 1rem; }
.nx-fuss p { margin: 0; max-width: 34ch; }
.nx-fuss h4 { color: #fff; font-size: 0.82rem; text-transform: uppercase; letter-spacing: .12em; margin: 0.3rem 0 0.9rem; }
.nx-fuss ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.45rem; }
.nx-fuss a { color: #cfe2e5; text-decoration: none; font-weight: 400; }
.nx-fuss a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.nx-fuss-unten { position: relative; width: min(1200px, 100% - 2rem); margin: 0 auto; padding: 1.2rem 0 1.6rem; border-top: 1px solid rgba(255, 255, 255, .1); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.6rem; font-size: 0.85rem; color: #7fa3a8; }
@media (max-width: 820px) { .nx-fuss-innen { grid-template-columns: 1fr 1fr; } .nx-fuss-marke { grid-column: 1 / -1; } }
@media (max-width: 460px) { .nx-fuss-innen { grid-template-columns: 1fr; } }

/* ---------- Dialoge (Anmelden-Auswahl, Kontakt) ---------- */
.nx-dialog { border: 0; padding: 0; border-radius: 22px; width: min(520px, calc(100% - 2rem)); max-height: calc(100% - 2rem); box-shadow: 0 40px 100px -30px rgba(7, 46, 51, .6); font-family: var(--nx-schrift); color: var(--nx-tinte); background: #fff; }
.nx-dialog::backdrop { background: rgba(7, 46, 51, .55); backdrop-filter: blur(3px); }
.nx-dialog-kopf { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.3rem 1.5rem 0.4rem; }
.nx-dialog-kopf h2 { margin: 0; font-size: 1.35rem; color: var(--nx-petrol); letter-spacing: -0.02em; }
.nx-zu { width: 38px; height: 38px; border-radius: 50%; border: 0; background: var(--nx-nebel); color: var(--nx-grau); font-size: 1.4rem; line-height: 1; cursor: pointer; }
.nx-zu:hover { background: var(--nx-fuellung); color: var(--nx-tinte); }
.nx-dialog-inhalt { padding: 0.6rem 1.5rem 1.5rem; }
.nx-dialog-inhalt > p { margin: 0 0 1rem; color: var(--nx-grau); font-size: 0.95rem; }
.nx-wahl { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; gap: 0.2rem 1rem; align-items: center; width: 100%; text-align: left; font: inherit; padding: 1rem 1.1rem; margin-bottom: 0.7rem; border-radius: 16px; border: 1.5px solid var(--nx-linie); background: var(--nx-nebel); color: var(--nx-tinte); cursor: pointer; text-decoration: none; transition: border-color .15s, background .15s, transform .15s; }
.nx-wahl:hover { border-color: var(--nx-blau); background: #fff; transform: translateY(-1px); }
.nx-wahl i { grid-row: 1 / span 2; grid-column: 1; width: 52px; height: 52px; border-radius: 15px; display: grid; place-items: center; color: #fff; font-style: normal; }
.nx-wahl i svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.nx-wahl b { grid-column: 2; font-size: 1.05rem; color: var(--nx-petrol); }
.nx-wahl span { grid-column: 2; font-size: 0.86rem; color: var(--nx-grau); line-height: 1.4; }
.nx-wahl em { grid-row: 1 / span 2; grid-column: 3; font-style: normal; font-size: 1.3rem; color: var(--nx-blau); }
.nx-wahl-titel { margin: 1rem 0 0.5rem; font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--nx-grau); }
.nx-wahl-klein { padding: 0.7rem 1.1rem; margin-bottom: 0.5rem; }
.nx-wahl-klein i { width: 42px; height: 42px; border-radius: 12px; }
.nx-wahl-klein i svg { width: 22px; height: 22px; }
.nx-wahl-status { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; margin: -0.3rem 0 0.8rem; padding: 0.55rem 0.9rem; border-radius: 12px; background: #e6f4ea; color: #1f6b38; font-size: 0.88rem; }
.nx-wahl-status button { font: inherit; font-weight: 600; background: none; border: 0; color: #1f6b38; text-decoration: underline; cursor: pointer; padding: 0; }
.nx-feld { display: block; font-size: 0.86rem; font-weight: 600; color: var(--nx-petrol); margin: 0.7rem 0 0.25rem; }
.nx-eingabe { width: 100%; font: inherit; font-size: 0.98rem; padding: 0.7rem 0.85rem; border: 1.5px solid var(--nx-linie); border-radius: 12px; background: #fff; color: var(--nx-tinte); box-sizing: border-box; }
.nx-eingabe:focus { outline: none; border-color: var(--nx-blau); box-shadow: 0 0 0 4px rgba(39, 112, 146, .15); }
textarea.nx-eingabe { resize: vertical; min-height: 120px; }
.nx-senden { width: 100%; margin-top: 1rem; font: inherit; font-weight: 700; color: #fff; background: var(--nx-petrol); border: 0; border-radius: 12px; padding: 0.85rem 1rem; cursor: pointer; }
.nx-senden:hover { background: var(--nx-petrol-tief); }
.nx-hinweis { margin: 0.7rem 0 0; font-size: 0.82rem; color: var(--nx-grau); }

@media (prefers-reduced-motion: reduce) {
  .nx-ausklapper, .nx-mobil, .nx-prog, .nx-wahl { transition: none; }
}
/* Kontaktformular: Anliegen, zwei Spalten, Einwilligung, Bestätigung */
.nx-anliegen { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0 0 0.3rem; }
.nx-anliegen button { font: inherit; font-size: 0.88rem; font-weight: 600; padding: 0.42rem 0.85rem; border-radius: 999px; border: 1.5px solid var(--nx-linie); background: #fff; color: var(--nx-petrol); cursor: pointer; }
.nx-anliegen button.aktiv { border-color: var(--nx-petrol); background: var(--nx-petrol); color: #fff; }
.nx-zwei { display: grid; grid-template-columns: 1fr 1fr; gap: 0 0.8rem; }
@media (max-width: 560px) { .nx-zwei { grid-template-columns: 1fr; } }
.nx-honig { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.nx-einwilligung { display: flex; gap: 0.5rem; align-items: flex-start; margin-top: 0.8rem; font-size: 0.84rem; color: var(--nx-tinte); line-height: 1.45; cursor: pointer; }
.nx-einwilligung input { margin-top: 0.2rem; flex: none; width: 16px; height: 16px; }
.nx-einwilligung a { color: var(--nx-blau); white-space: nowrap; }
.nx-kontakt-fehler { margin: 0.7rem 0 0; padding: 0.55rem 0.75rem; border-radius: 10px; background: #fdf0ec; color: #8c3a20; font-size: 0.86rem; }
.nx-kontakt-ok p { margin: 0 0 0.6rem; }
#kontakt-dialog { width: min(600px, calc(100% - 2rem)); }

/* ---------- Barrierefreiheit (BFSG / WCAG 2.1 AA) ---------- */
a:focus-visible, button:focus-visible, summary:focus-visible, [role="button"]:focus-visible, [tabindex]:not([tabindex="-1"]):focus-visible {
  outline: 2px solid #277092; outline-offset: 2px;
}
.nx-sprunglink { position: fixed; left: 0.75rem; top: -4rem; z-index: 10000; padding: 0.6rem 1rem; border-radius: 10px;
  background: #277092; color: #fff; font-weight: 700; text-decoration: none; box-shadow: 0 6px 18px rgba(16, 51, 58, .25); transition: top .15s; }
.nx-sprunglink:focus { top: 0.75rem; outline: 2px solid #0D4D55; outline-offset: 2px; }
main:focus { outline: none; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}

/* Nur für Bildschirmleser */
.nur-sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
