/* naturwärme Videothek. Farben, Schrift und Pill-Stil wie auf den Inhaltsseiten (RUNBOOK §2b).
   Bewusst ohne background-image: WP Rockets Lazy-BG würde es entfernen.
   Selektoren mit .nw-vt davor, damit Hello-Reset (pinke Knöpfe) und Kit-Stile nicht greifen. */

/* Nur die Seiten nullen (Hello: padding-inline 10px), oben/unten polstern .nw-vt-einzel und die Sektionen. */
body.nw-videothek-seite .site-main.nw-vt { max-width: none; width: 100%; margin: 0; padding-inline: 0; }

.nw-vt { color: #1A1A1A; font-family: Poppins, sans-serif; font-size: 17px; line-height: 1.6; }
.nw-vt *, .nw-vt *::before, .nw-vt *::after { box-sizing: border-box; }
.nw-vt [hidden] { display: none !important; }
.nw-vt svg { display: block; fill: currentColor; flex: 0 0 auto; }
.nw-vt .screen-reader-text { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.nw-vt-innen { width: 100%; max-width: 1140px; margin: 0 auto; padding: 0 20px; }
@media (min-width: 1601px) { .nw-vt-innen { max-width: 1400px; } }

.nw-vt .nw-vt-h1 { margin: 0; font-family: Poppins, sans-serif; font-weight: 700; font-size: 2.6rem; line-height: 1.2;
  color: #1A1A1A; letter-spacing: 0; text-transform: none; }
.nw-vt .nw-vt-h2 { margin: 0 0 14px; font-family: Poppins, sans-serif; font-weight: 600; font-size: 1.1rem; line-height: 1.3;
  color: #1A1A1A; letter-spacing: 0; text-transform: none; }

.nw-vt-platzhalter { display: inline-block; padding: 2px 8px; border-radius: 6px; background: #FCEFE4; color: #B34700;
  font-size: 15px; font-weight: 500; }

/* ── Knöpfe (Teilen, Zurücksetzen) ───────────────────────────────────────── */
.nw-vt button.nw-vt-knopf { -webkit-appearance: none; appearance: none; display: inline-flex; align-items: center; gap: 8px;
  min-height: 46px; margin: 0; padding: 10px 20px; border: 2px solid #E84B16; border-radius: 100px; background: #FFFFFF;
  color: #E84B16; font-family: Poppins, sans-serif; font-size: 15px; font-weight: 600; line-height: 1.2;
  text-transform: none; letter-spacing: 0; white-space: nowrap; cursor: pointer; box-shadow: none;
  transition: background-color .2s, color .2s; }
.nw-vt button.nw-vt-knopf svg { width: 18px; height: 18px; }
.nw-vt button.nw-vt-knopf:hover { background: #E84B16; color: #FFFFFF; border-color: #E84B16; }
.nw-vt button.nw-vt-knopf:focus { background: #FFFFFF; color: #E84B16; }
.nw-vt button.nw-vt-knopf:focus-visible { outline: 3px solid #B34700; outline-offset: 2px; }
.nw-vt button.nw-vt-knopf:focus:hover { background: #E84B16; color: #FFFFFF; }

/* ── Übersicht ───────────────────────────────────────────────────────────── */
.nw-vt-kopf { background: #FDF3E8; padding: 72px 0 40px; }
.nw-vt-einleitung { max-width: 760px; margin-top: 12px; }
.nw-vt-einleitung:empty { display: none; }
.nw-vt-einleitung p { margin: 0; }

.nw-vt-werkzeuge { margin-top: 28px; }
.nw-vt-suchfeld { position: relative; max-width: 560px; color: #777777; }
.nw-vt-suchfeld svg { position: absolute; left: 18px; top: 50%; width: 20px; height: 20px; transform: translateY(-50%);
  pointer-events: none; }
.nw-vt input#nw-vt-suche { -webkit-appearance: none; appearance: none; display: block; width: 100%; height: 54px; margin: 0;
  padding: 0 22px 0 50px; border: 1px solid #E6DCCF; border-radius: 100px; background: #FFFFFF; color: #1A1A1A;
  font-family: Poppins, sans-serif; font-size: 16px; line-height: 1.2; box-shadow: none; outline: none;
  transition: border-color .2s, box-shadow .2s; }
.nw-vt input#nw-vt-suche::placeholder { color: #777777; opacity: 1; }
.nw-vt input#nw-vt-suche:focus { border-color: #E84B16; box-shadow: 0 0 0 3px rgba(232, 75, 22, .15); }

.nw-vt-chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.nw-vt button.nw-vt-chip { -webkit-appearance: none; appearance: none; min-height: 44px; margin: 0; padding: 10px 20px;
  border: 0; border-radius: 100px; background: rgba(44, 131, 44, .1); color: #1D5E1D; font-family: Poppins, sans-serif;
  font-size: 15px; font-weight: 600; line-height: 1.2; text-transform: none; letter-spacing: 0; white-space: nowrap;
  cursor: pointer; box-shadow: none; transition: background-color .2s, color .2s; }
.nw-vt button.nw-vt-chip:hover, .nw-vt button.nw-vt-chip:focus { background: rgba(44, 131, 44, .18); color: #1D5E1D; }
.nw-vt button.nw-vt-chip[aria-pressed="true"] { background: #1D5E1D; color: #F1F5DD; }
.nw-vt button.nw-vt-chip:focus-visible { outline: 3px solid #B34700; outline-offset: 2px; }

.nw-vt-treffer { margin: 18px 0 0; font-size: 14px; font-weight: 500; color: #4A4A4A; }

.nw-vt-liste { padding: 40px 0 96px; }
.nw-vt-raster { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px 24px; margin: 0; padding: 0;
  list-style: none; }
.nw-vt-kachel { margin: 0; padding: 0; }
.nw-vt-kachel::before, .nw-vt-kachel::marker { content: none; }

.nw-vt a.nw-vt-link { display: block; color: #1A1A1A; text-decoration: none; }
.nw-vt-bild { position: relative; display: block; aspect-ratio: 9 / 16; overflow: hidden; border-radius: 16px;
  background: #2A2A2A; }
.nw-vt-bild img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.ist-quer .nw-vt-bild { background: #FDF3E8; }
.ist-quer .nw-vt-bild img { object-fit: contain; }
.nw-vt-play { position: absolute; left: 50%; top: 50%; display: flex; align-items: center; justify-content: center;
  width: 58px; height: 58px; border-radius: 50%; background: rgba(232, 75, 22, .92); color: #FFFFFF;
  transform: translate(-50%, -50%); box-shadow: 0 5px 20px rgba(0, 0, 0, .25); transition: transform .25s ease; }
.nw-vt-play svg { width: 26px; height: 26px; margin-left: 3px; }
.nw-vt-dauer { position: absolute; right: 10px; bottom: 10px; padding: 3px 9px; border-radius: 100px;
  background: rgba(0, 0, 0, .68); color: #FFFFFF; font-size: 13px; font-weight: 600; line-height: 1.4; }
.nw-vt a.nw-vt-link:hover .nw-vt-bild img { transform: scale(1.03); }
.nw-vt a.nw-vt-link:hover .nw-vt-play { transform: translate(-50%, -50%) scale(1.08); }
.nw-vt a.nw-vt-link:focus-visible { outline: none; }
.nw-vt a.nw-vt-link:focus-visible .nw-vt-bild { outline: 3px solid #E84B16; outline-offset: 3px; }

.nw-vt-text { display: block; margin-top: 12px; }
.nw-vt-kachel .nw-vt-kat { display: inline-block; padding: 3px 10px; border-radius: 100px; background: #F1F5DD;
  color: #1D5E1D; font-size: 12.5px; font-weight: 600; line-height: 1.4; }
.nw-vt-titel { display: block; margin-top: 8px; font-size: 16px; font-weight: 600; line-height: 1.35; color: #1A1A1A;
  overflow-wrap: break-word; -webkit-hyphens: auto; hyphens: auto; }

.nw-vt-leer { padding: 32px 0 8px; text-align: center; }
.nw-vt-leer p { margin: 0 0 16px; font-weight: 500; }
.nw-vt-leer-hinweis { margin: 0; color: #4A4A4A; }

/* ── Einzelseite ─────────────────────────────────────────────────────────── */
.nw-vt-einzel { padding: 56px 0 96px; }
.nw-vt-einzel-raster { display: grid; grid-template-columns: minmax(0, 420px) minmax(0, 1fr); gap: 56px; align-items: start; }
.nw-vt-einzel-raster:has(.ist-quer) { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); }

/* Hochformat so schmal, dass Video samt Steuerleiste und „Ton an“ zwischen Kopf, Zurück-Zeile
   und Handy-Leiste passen (280 px, gemessen 1440x900 und 390x844). Ohne var(), damit der
   svh-Fallback greift. */
.nw-vt-player { position: relative; max-width: max(240px, calc((100vh - 280px) * 9 / 16));
  max-width: max(240px, calc((100svh - 280px) * 9 / 16)); }
.nw-vt-player.ist-quer { max-width: none; }
.nw-vt-player video { display: block; width: 100%; height: auto; border-radius: 16px;
  background: #000000; object-fit: contain; }
/* Unter dem Video statt darauf: oben links blendet iOS seine eigenen Knöpfe ein. */
.nw-vt button.nw-vt-ton { -webkit-appearance: none; appearance: none; position: static; min-height: 44px;
  display: inline-flex; align-items: center; gap: 8px; margin: 12px 0 0; padding: 10px 18px; border: 0; border-radius: 100px;
  background: rgba(0, 0, 0, .72); color: #FFFFFF; font-family: Poppins, sans-serif; font-size: 15px; font-weight: 600;
  line-height: 1.2; text-transform: none; cursor: pointer; box-shadow: none; }
.nw-vt button.nw-vt-ton:hover, .nw-vt button.nw-vt-ton:focus { background: #E84B16; color: #FFFFFF; }
.nw-vt button.nw-vt-ton svg { width: 18px; height: 18px; }
.nw-vt-fehlt { margin: 0; padding: 40px 20px; border-radius: 16px; background: #FDF3E8; text-align: center; }

.nw-vt-zurueck { margin: 0 0 22px; }
.nw-vt .nw-vt-zurueck a { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; color: #E84B16;
  font-size: 15px; font-weight: 600; line-height: 1.4; text-decoration: none; }
.nw-vt .nw-vt-zurueck a:hover { text-decoration: underline; }
.nw-vt .nw-vt-zurueck svg { width: 18px; height: 18px; }
.nw-vt-info .nw-vt-kat { margin: 0 0 10px; color: #B34700; font-size: 14px; font-weight: 700; letter-spacing: 1px;
  text-transform: uppercase; }
.nw-vt-einzel .nw-vt-h1 { font-size: 2rem; line-height: 1.25; }
.nw-vt-beschreibung { margin-top: 16px; }
.nw-vt-beschreibung p { margin: 0 0 12px; }
.nw-vt-stichpunkte { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 0; padding: 0; list-style: none; }
.nw-vt-stichpunkte li { margin: 0; }
.nw-vt .nw-vt-stichpunkte a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px;
  border-radius: 100px; background: #F1F5DD;
  color: #1D5E1D; font-size: 14px; font-weight: 500; line-height: 1.4; text-decoration: none; transition: background-color .2s, color .2s; }
.nw-vt .nw-vt-stichpunkte a:hover { background: #1D5E1D; color: #F1F5DD; }

.nw-vt-teilen { margin-top: 32px; padding-top: 24px; border-top: 1px solid #ECECEC; }
.nw-vt-teilen-knoepfe { display: flex; flex-wrap: wrap; gap: 10px; }
.nw-vt-meldung { min-height: 1.5em; margin: 10px 0 0; color: #1D5E1D; font-size: 14px; font-weight: 500; }

/* ── Overlay der Übersicht (Video startet in der Seite, deshalb mit Ton) ──── */
html.nw-vt-gesperrt { overflow: hidden; }
.nw-vt .nw-vt-dialog { width: min(1080px, calc(100vw - 48px)); max-width: none; max-height: calc(100vh - 48px);
  max-height: calc(100dvh - 48px); margin: auto; padding: 0; border: 0; border-radius: 20px; background: #FFFFFF;
  color: #1A1A1A; box-shadow: 0 24px 80px rgba(0, 0, 0, .35); overflow: auto; overscroll-behavior: contain; }
.nw-vt .nw-vt-dialog::backdrop { background: rgba(26, 26, 26, .78); }
.nw-vt-dialog-innen { position: relative; padding: 48px 48px 40px; }
.nw-vt-dialog .nw-vt-player { max-width: max(220px, calc((100vh - 220px) * 9 / 16));
  max-width: max(220px, calc((100dvh - 220px) * 9 / 16)); }
.nw-vt-dialog .nw-vt-player.ist-quer { max-width: none; }
/* Höher gewichtet als die Breakpoint-Regeln für .nw-vt .nw-vt-h1, sonst wird der Titel am Tablet größer. */
.nw-vt .nw-vt-dialog .nw-vt-h1 { font-size: 1.75rem; line-height: 1.25; }
.nw-vt .nw-vt-h1 { overflow-wrap: break-word; -webkit-hyphens: auto; hyphens: auto; }
.nw-vt-dialog .nw-vt-beschreibung p { white-space: pre-line; }
.nw-vt button.nw-vt-schliessen { -webkit-appearance: none; appearance: none; position: absolute; top: 10px; right: 10px;
  z-index: 2; display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; margin: 0;
  padding: 0; border: 0; border-radius: 50%; background: #F2F2F2; color: #1A1A1A; cursor: pointer; box-shadow: none; }
.nw-vt button.nw-vt-schliessen svg { width: 22px; height: 22px; }
/* :focus neutral (Hello färbt fokussierte Knöpfe pink; das Overlay fokussiert beim Öffnen diesen Knopf). */
.nw-vt button.nw-vt-schliessen:focus { background: #F2F2F2; color: #1A1A1A; }
.nw-vt button.nw-vt-schliessen:hover { background: #E84B16; color: #FFFFFF; }
.nw-vt button.nw-vt-schliessen:focus-visible { outline: 3px solid #B34700; outline-offset: 2px; }

/* ── Breakpoints wie die Inhaltsseiten: Laptop 1600, Tablet 1024, Handy 767 ─ */
@media (max-width: 1024px) {
  .nw-vt-raster { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px 20px; }
  .nw-vt .nw-vt-h1 { font-size: 2rem; }
  .nw-vt .nw-vt-dialog .nw-vt-h1 { font-size: 1.5rem; }
  /* :has() getrennt: in einer Liste würde ein Browser ohne :has() die ganze Regel verwerfen. */
  .nw-vt-einzel-raster { grid-template-columns: minmax(0, 360px) minmax(0, 1fr); gap: 36px; }
  .nw-vt-einzel-raster:has(.ist-quer) { grid-template-columns: minmax(0, 360px) minmax(0, 1fr); }
}
@media (max-width: 767px) {
  .nw-vt { font-size: 16px; }
  .nw-vt-kopf { padding: 40px 0 28px; }
  .nw-vt .nw-vt-h1, .nw-vt-einzel .nw-vt-h1 { font-size: 1.6rem; }
  .nw-vt-liste { padding: 28px 0 64px; }
  .nw-vt-raster { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 14px; }
  .nw-vt-play { width: 48px; height: 48px; }
  .nw-vt-play svg { width: 22px; height: 22px; }
  .nw-vt-titel { font-size: 15px; }
  .nw-vt-chips { gap: 8px; }
  .nw-vt button.nw-vt-chip { padding: 10px 16px; font-size: 14px; }
  .nw-vt-einzel { padding: 24px 0 64px; }
  .nw-vt-einzel-raster { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .nw-vt-einzel-raster:has(.ist-quer) { grid-template-columns: minmax(0, 1fr); }
  .nw-vt-player { margin: 0 auto; }
  .nw-vt button.nw-vt-knopf { padding: 10px 16px; }
  /* Overlay am Handy bildschirmfüllend, Schließen bleibt beim Scrollen sichtbar. */
  .nw-vt .nw-vt-dialog { width: 100vw; height: 100vh; height: 100dvh; max-height: none; border-radius: 0; }
  .nw-vt-dialog-innen { padding: 60px 16px 32px; }
  .nw-vt button.nw-vt-schliessen, .nw-vt button.nw-vt-schliessen:focus { position: fixed; top: 8px; right: 8px;
    background: rgba(242, 242, 242, .95); }
  .nw-vt-dialog .nw-vt-player { max-width: max(220px, calc((100vh - 150px) * 9 / 16));
    max-width: max(220px, calc((100svh - 150px) * 9 / 16)); }
  .nw-vt .nw-vt-dialog .nw-vt-h1 { font-size: 1.4rem; }
}

/* Kurze Fenster (Handy quer): Overlay füllend, Video nach der Höhe und daneben die Angaben,
   damit Steuerleiste und „Ton an“ ohne Scrollen sichtbar sind. */
@media (max-height: 500px) {
  .nw-vt .nw-vt-dialog { width: 100vw; height: 100vh; height: 100dvh; max-height: none; border-radius: 0; }
  .nw-vt-dialog-innen { padding: 12px 64px 12px 16px; }
  .nw-vt button.nw-vt-schliessen, .nw-vt button.nw-vt-schliessen:focus { position: fixed; top: 8px; right: 8px;
    background: rgba(242, 242, 242, .95); }
  .nw-vt .nw-vt-dialog .nw-vt-einzel-raster { grid-template-columns: auto minmax(0, 1fr); gap: 24px; }
  .nw-vt .nw-vt-dialog .nw-vt-player { margin: 0; max-width: calc((100vh - 80px) * 9 / 16);
    max-width: calc((100dvh - 80px) * 9 / 16); }
  .nw-vt .nw-vt-dialog .nw-vt-player.ist-quer { max-width: calc((100vh - 80px) * 16 / 9);
    max-width: calc((100dvh - 80px) * 16 / 9); }
  .nw-vt .nw-vt-dialog .nw-vt-h1 { font-size: 1.3rem; }
}
