/* =============================================================================
   MEDIA-THEK draussen - Optik der Kundenseite.
   Laeuft ueber extern-core.css + extern-ardm.css (Marine, Limette, Lichtkegel).
   Alles in px: extern-ardm.css setzt html auf 62,5 % (1rem = 10px).
   Breite: .ext-main endet wie die Kopfzeile bei 1560px - der Inhalt fluchtet
   so mit dem Logo (Wunsch 18.11.2026: vorhandene Breite ausnutzen).
   ============================================================================= */

body.mtx-page {
  --mtx-lime: var(--ardm-lime, #bee120);
  --mtx-lime-dark: var(--ardm-lime-dark, #a4c412);
  --mtx-navy: var(--ardm-navy, #002c6b);
  --mtx-ink: #ffffff;
  --mtx-soft: rgba(255, 255, 255, 0.84);
  --mtx-muted: rgba(255, 255, 255, 0.64);
  --mtx-faint: rgba(255, 255, 255, 0.44);
  --mtx-line: rgba(255, 255, 255, 0.14);
  --mtx-card: rgba(0, 26, 64, 0.6);
  --ext-embed-padding: 0;
  color: var(--mtx-ink);
}
body.mtx-page [hidden] { display: none !important; }
.mtx-main { container-type: inline-size; container-name: mtx; color: var(--mtx-ink); }

.mtx-eyebrow { margin: 0 0 6px; color: var(--mtx-lime); font-size: 12px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; }
.mtx-h1 { margin: 0 0 22px; color: var(--mtx-ink); font-size: clamp(24px, 3.2cqw, 34px); font-weight: 700; line-height: 1.15; letter-spacing: -0.015em; }
.mtx-h1 small { display: block; margin-top: 6px; color: var(--mtx-muted); font-size: 15px; font-weight: 400; letter-spacing: 0; }

/* ── Player + Text ──────────────────────────────────────────────────────── */
.mtx-player { border-radius: 14px; overflow: hidden; background: #000; box-shadow: 0 24px 60px rgba(0, 10, 30, 0.45); }
.mtx-player video { display: block; width: 100%; aspect-ratio: 16 / 9; max-height: calc(100vh - 230px); background: #000; }
.mtx-now { padding: 18px 2px 0; }
.mtx-now h2 { margin: 0 0 6px; color: var(--mtx-ink); font-size: 22px; line-height: 1.25; }
.mtx-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; color: var(--mtx-muted); font-size: 13.5px; }
.mtx-meta span:first-child { color: var(--mtx-soft); font-weight: 600; }
.mtx-now p { max-width: 80ch; margin: 12px 0 0; color: var(--mtx-soft); white-space: pre-line; }

/* ── Kundenlink: Player links, Auswahl + Ansprechpartner rechts ─────────── */
.mtx-sel { display: grid; grid-template-columns: minmax(0, 1fr) clamp(320px, 28cqw, 440px); gap: 22px; align-items: start; }
.mtx-side { display: grid; gap: 16px; }
.mtx-list { overflow: hidden; border: 1px solid var(--mtx-line); border-radius: 14px; background: var(--mtx-card); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.mtx-list__h { display: flex; justify-content: space-between; align-items: baseline; padding: 14px 16px 10px; }
.mtx-list__h b { font-size: 15px; }
.mtx-list__h span { color: var(--mtx-muted); font-size: 13px; }
.mtx-item { display: grid; grid-template-columns: 26px 128px minmax(0, 1fr); gap: 12px; align-items: center; width: 100%; padding: 10px 16px; border: 0; border-top: 1px solid var(--mtx-line); background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; transition: background 0.15s; }
.mtx-item:hover { background: rgba(255, 255, 255, 0.07); }
.mtx-item:focus-visible { outline: 2px solid var(--mtx-lime); outline-offset: -2px; }
.mtx-item.is-on { background: rgba(190, 225, 32, 0.12); }
.mtx-item__n { color: var(--mtx-faint); font-size: 13px; font-weight: 700; text-align: center; font-variant-numeric: tabular-nums; }
.mtx-item.is-on .mtx-item__n { color: var(--mtx-lime); }
.mtx-item.is-on .mtx-thumb { box-shadow: 0 0 0 2px var(--mtx-lime); }
.mtx-item__t b { display: -webkit-box; overflow: hidden; -webkit-line-clamp: 2; -webkit-box-orient: vertical; font-size: 14px; line-height: 1.3; }
.mtx-item__t small { display: block; color: var(--mtx-muted); font-size: 12.5px; }
.mtx-playing { color: var(--mtx-lime); font-weight: 700; }

/* Kachelbild (span -> display:block, sonst hat es keine Hoehe und der Titel
   rutscht darueber - im Entwurf am 18.11. so passiert). */
.mtx-thumb { position: relative; display: block; overflow: hidden; aspect-ratio: 16 / 9; border-radius: 7px; background: linear-gradient(135deg, #0b3f8c, #001f4d); }
/* Bild absolut: sonst drueckt ein Bild mit anderem Seitenverhaeltnis die
   Kachel auf seine eigene Hoehe (aspect-ratio ist nur eine Vorgabe) - die
   Kacheln einer Reihe waren dadurch unterschiedlich hoch (18.11.2026). */
.mtx-thumb img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; }
.mtx-thumb__ph { position: absolute; inset: 0; display: grid; place-items: center; padding: 6px; color: rgba(255, 255, 255, 0.78); font-size: 11px; font-weight: 700; line-height: 1.2; text-align: center; }
.mtx-thumb em { position: absolute; right: 5px; bottom: 5px; padding: 1px 6px; border-radius: 5px; background: rgba(0, 0, 0, 0.72); color: #fff; font-size: 11px; font-style: normal; font-weight: 600; font-variant-numeric: tabular-nums; }

.mtx-contact { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 14px; align-items: center; padding: 16px; border: 1px solid var(--mtx-line); border-radius: 14px; background: var(--mtx-card); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); text-align: left; }
.mtx-contact__k { grid-column: 1 / -1; margin: 0 0 -4px; color: var(--mtx-muted); font-size: 12px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; }
.mtx-avatar { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: linear-gradient(135deg, #2c6fd6, #0a2f6e); box-shadow: 0 0 0 3px rgba(190, 225, 32, 0.55); color: #fff; font-size: 22px; font-weight: 700; }
.mtx-contact h3 { margin: 2px 0 0; color: var(--mtx-ink); font-size: 17px; }
.mtx-contact__role { color: var(--mtx-muted); font-size: 13px; }
.mtx-contact dl { grid-column: 1 / -1; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 12px; margin: 4px 0 0; font-size: 14px; }
.mtx-contact dt { color: var(--mtx-faint); }
.mtx-contact dd { margin: 0; overflow-wrap: anywhere; }
.mtx-contact a { color: #fff; text-decoration: none; }
.mtx-contact a:hover { color: var(--mtx-lime); }
.mtx-cta { display: inline-flex; justify-content: center; align-items: center; gap: 8px; min-height: 42px; padding: 0 18px; border: 0; border-radius: 6px; background: var(--mtx-lime); color: var(--mtx-navy) !important; font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; }
.mtx-contact .mtx-cta { grid-column: 1 / -1; }
.mtx-cta:hover { background: var(--mtx-lime-dark); }
.mtx-cta:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

@container mtx (max-width: 980px) {
  .mtx-sel { grid-template-columns: minmax(0, 1fr); }
  .mtx-side { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}
@container mtx (max-width: 640px) {
  .mtx-side { grid-template-columns: minmax(0, 1fr); }
  .mtx-item { grid-template-columns: 22px 104px minmax(0, 1fr); gap: 10px; padding: 9px 12px; }
}

/* ── Direktlink ─────────────────────────────────────────────────────────── */
.mtx-single { max-width: 1400px; }
.mtx-back { display: inline-flex; margin-top: 22px; color: var(--mtx-lime); font-weight: 600; text-decoration: none; }
.mtx-back:hover { text-decoration: underline; }

/* ── Hinweis (Link ungueltig / aus, Fehler) ─────────────────────────────── */
.mtx-gone { max-width: 620px; margin: 6vh auto 0; text-align: center; }
.mtx-gone__icon { display: grid; place-items: center; width: 64px; height: 64px; margin: 0 auto 18px; border-radius: 50%; background: rgba(255, 255, 255, 0.08); color: var(--mtx-lime); }
.mtx-gone p { color: var(--mtx-soft); }
.mtx-gone .mtx-contact { margin-top: 26px; }
.mtx-empty { padding: 40px 0; color: var(--mtx-soft); text-align: center; }

/* ── Website-Mediathek ──────────────────────────────────────────────────── */
.mtx-stage { padding: 0 0 8px; scroll-margin-top: 12px; }
/* Eingebettet scrollt scrollIntoView die WEBSITE mit - deren feste Kopfzeile
   lag dann ueber "Schliessen". scroll-margin gilt auch fuer die Elternseite. */
body.ext-embed .mtx-stage { padding-top: 14px; scroll-margin-top: 130px; }
.mtx-stage__close { padding: 6px 12px; border: 1px solid rgba(255, 255, 255, 0.3); border-radius: 6px; background: none; color: #fff; font: inherit; font-size: 14px; cursor: pointer; }
.mtx-stage__close:hover { border-color: #fff; }
/* Player A (v1.1.0): Video links (zwei Drittel), rechts Titel, Angaben,
   Beschreibung und "Mehr aus <Format>". Bei 1330px Inhalt ~880x495 - passt mit
   dem Kopf der Website in ein uebliches Fenster. Kanten buendig mit den Reihen. */
.mtx-stage__grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(300px, 1fr); gap: 24px; align-items: start; }
.mtx-stage__side { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.mtx-stage__top { display: flex; align-items: flex-start; gap: 12px; }
.mtx-stage__top h2 { flex: 1; min-width: 0; margin: 0; color: #fff; font-size: 22px; line-height: 1.25; }
.mtx-stage__close { flex: none; }
.mtx-stage__side .mtx-meta { margin-top: -6px; }
.mtx-stage__desc { display: -webkit-box; overflow: hidden; -webkit-line-clamp: 5; -webkit-box-orient: vertical; margin: 10px 0 0; color: var(--mtx-soft); white-space: pre-line; }
.mtx-more { padding-top: 14px; border-top: 1px solid var(--mtx-line); }
.mtx-more h3 { margin: 0 0 10px; color: var(--mtx-muted); font-size: 12px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; }
.mtx-more__list { display: grid; gap: 4px; max-height: 300px; overflow-y: auto; scrollbar-width: thin; }
.mtx-mini { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 12px; align-items: center; padding: 6px; border: 0; border-radius: 9px; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.mtx-mini:hover { background: rgba(255, 255, 255, 0.07); }
.mtx-mini:focus-visible { outline: 2px solid var(--mtx-lime); outline-offset: -2px; }
.mtx-mini.is-on { background: rgba(190, 225, 32, 0.12); }
.mtx-mini.is-on .mtx-thumb { box-shadow: 0 0 0 2px var(--mtx-lime); }
.mtx-mini .mtx-thumb { border-radius: 6px; }
.mtx-mini b { display: -webkit-box; overflow: hidden; -webkit-line-clamp: 2; -webkit-box-orient: vertical; font-size: 13.5px; line-height: 1.3; }
.mtx-mini small { display: block; color: var(--mtx-muted); font-size: 12px; }
@container mtx (max-width: 900px) {
  .mtx-stage__grid { grid-template-columns: minmax(0, 1fr); }
  .mtx-more__list { max-height: none; }
}

/* Highlights als "Plakat": die Cover tragen oft eigenen Text - der Titel
   steht deshalb NEBEN dem Cover, nie darauf (wie Entdecken in der MEDIA-THEK). */
/* Flacher (v1.1.0, Wunsch 18.11.): 3:1, hoechstens 420px - vorher 21:8, ~500px. */
.mtx-hero { position: relative; overflow: hidden; aspect-ratio: 3 / 1; max-height: 420px; min-height: 240px; border-radius: 14px; background: #001a40; }
.mtx-hero__slide { position: absolute; inset: 0; overflow: hidden; opacity: 0; transition: opacity 0.6s; }
.mtx-hero__slide.is-on { opacity: 1; }
.mtx-hero__blur { position: absolute; inset: -40px; display: block; background: center / cover no-repeat; filter: blur(36px) saturate(1.1); opacity: 0.55; }
.mtx-hero__slide::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0, 26, 64, 0.95) 0%, rgba(0, 26, 64, 0.82) 38%, rgba(0, 26, 64, 0.35) 100%); }
.mtx-hero__poster { position: absolute; z-index: 1; top: 8%; bottom: 8%; right: clamp(56px, 6cqw, 80px); display: block; aspect-ratio: 16 / 9; border-radius: 10px; background: center / cover no-repeat #000; box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5); }
.mtx-hero__txt { position: absolute; z-index: 1; top: 50%; left: clamp(56px, 6cqw, 80px); width: 36%; transform: translateY(-50%); }
.mtx-hero__txt small { color: var(--mtx-lime); font-size: 12px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; }
.mtx-hero__txt h2 { margin: 6px 0 14px; color: #fff; font-size: clamp(22px, 3.2cqw, 38px); line-height: 1.1; }
.mtx-hero__dots { position: absolute; z-index: 2; right: 18px; bottom: 14px; display: flex; gap: 6px; }
.mtx-hero__dots button { width: 26px; height: 4px; padding: 0; border: 0; border-radius: 2px; background: rgba(255, 255, 255, 0.35); cursor: pointer; }
.mtx-hero__dots button.is-on { background: var(--mtx-lime); }
.mtx-hero__nav { position: absolute; z-index: 2; top: 50%; width: 40px; height: 40px; margin-top: -20px; border: 0; border-radius: 50%; background: rgba(0, 0, 0, 0.4); color: #fff; font-size: 20px; line-height: 1; cursor: pointer; }
.mtx-hero__nav:hover { background: rgba(0, 0, 0, 0.65); }
.mtx-hero__nav--l { left: 10px; }
.mtx-hero__nav--r { right: 10px; }

.mtx-rows { padding: 26px 0 10px; }
/* Eingebettet ohne eigenen Seitenabstand (v1.1.0): Slider, Player und Reihen
   stehen auf derselben Kante; die Breite gibt die Website am iframe vor. */
.mtx-row { margin-bottom: 26px; }
.mtx-row h2 { display: flex; align-items: baseline; gap: 10px; margin: 0 0 12px; color: #fff; font-size: 18px; }
.mtx-row h2 span { color: var(--mtx-muted); font-size: 13px; font-weight: 400; }
.mtx-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.mtx-tile { padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.mtx-tile .mtx-thumb { border-radius: 9px; transition: transform 0.2s, box-shadow 0.2s; }
.mtx-tile:hover .mtx-thumb, .mtx-tile:focus-visible .mtx-thumb { transform: translateY(-2px); box-shadow: 0 0 0 2px var(--mtx-lime), 0 14px 30px rgba(0, 0, 0, 0.35); }
.mtx-tile:focus-visible { outline: none; }
.mtx-tile b { display: -webkit-box; overflow: hidden; -webkit-line-clamp: 2; -webkit-box-orient: vertical; margin-top: 8px; font-size: 14px; line-height: 1.3; }
.mtx-tile small { display: block; margin-top: 2px; color: var(--mtx-muted); font-size: 12.5px; }

@container mtx (max-width: 640px) {
  .mtx-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .mtx-hero { aspect-ratio: auto; max-height: none; min-height: 0; padding: 16px 16px 44px; }
  .mtx-hero__slide { position: relative; display: none; }
  .mtx-hero__slide.is-on { display: block; }
  .mtx-hero__poster { position: relative; top: auto; bottom: auto; right: auto; width: 100%; transform: none; }
  .mtx-hero__txt { position: relative; top: auto; left: auto; width: auto; padding-top: 14px; transform: none; }
  .mtx-hero__nav { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .mtx-hero__slide, .mtx-tile .mtx-thumb, .mtx-item { transition: none; }
}

/* Eingebettet laeuft der Player in voller Breite, buendig mit Highlights und
   Reihen (v1.0.3, Wunsch 18.11.: zentriert und schmal sah eingerueckt aus).
   Die Hoehenbremse am Video greift im Rahmen nicht (100vh = Rahmenhoehe) -
   auf sehr breiten Schirmen ist der Player dann hoeher als das Fenster. */

/* Kacheln oben ausrichten (v1.0.2): Die Kachel ist ein <button>, und Knoepfe
   zentrieren ihren Inhalt senkrecht. Das Raster streckt alle Kacheln einer
   Reihe auf die hoechste (zweizeiliger Titel) - Kacheln mit einzeiligem Titel
   rutschten dadurch nach unten und wirkten verschieden gross. */
.mtx-tiles { align-items: start; }
.mtx-tile { display: flex; flex-direction: column; align-items: stretch; justify-content: flex-start; align-self: start; width: 100%; }

/* Buendig mit Logo und Fusszeile (v1.0.4): Kopf- und Fusszeile haben ihren
   Innenabstand AUSSEN und die 1560px innen - .ext-main hat ihn INNEN. Ab
   1640px Fensterbreite stand der Inhalt deshalb 40px rechts vom Logo. Mit dem
   Abstand in der Hoechstbreite stehen beide Kanten auf jeder Breite gleich. */
body.mtx-page:not(.ext-embed) .ext-main { max-width: calc(1560px + 2 * clamp(16px, 4vw, 40px)); }

/* ── v1.1.1: eingebettet mittig mit Abstand, Slider volle Breite ──────────
   Rueckmeldung 18.11. (Schirm ~2000px): Slider zu schmal, kein Abstand, Video
   zu gross.
   - Slider: aspect-ratio + max-height OHNE feste Breite -> der Browser rechnet
     die Breite aus der Hoechsthoehe zurueck (3 x Hoehe). width: 100% loest das;
     max-height kappt dann nur noch die Hoehe.
   - Eingebettet traegt der Inhalt Hoechstbreite, Mitte und Innenabstand selbst
     (statt auf eine Aenderung am iframe der Website zu warten). Damit bleibt
     auch Player A auf breiten Schirmen in einem sinnvollen Mass (~800x450).
     Raster gemessen auf www.ard-media.de/produktwelt/mediathek (18.11.2026):
     .header-main hoechstens 1440px, mittig, Innenabstand 24px (bis 992px
     Fensterbreite 16px); der iframe geht ueber die volle Breite. Mit denselben
     Massen fluchtet die Mediathek mit Logo und Suche der Website. Der iframe
     ist ~15px schmaler als das Fenster (Scrollleiste) - daher 977px. */
.mtx-hero { width: 100%; }
body.ext-embed .ext-main.mtx-main {
  max-width: var(--mtx-embed-max, 1440px);
  margin: 0 auto;
  padding: 24px 24px 32px;
}
@media (max-width: 977px) {
  body.ext-embed .ext-main.mtx-main { padding: 16px 16px 24px; }
}
/* Fester Kopf der Website: 81px (mobil 61px) - "Schliessen" bleibt darunter. */
body.ext-embed .mtx-stage { padding-top: 0; scroll-margin-top: 105px; }
@media (max-width: 977px) { body.ext-embed .mtx-stage { scroll-margin-top: 77px; } }

/* ── Overlay ueber die ganze Seite (v1.2.0, Landingpage ohne Rahmen) ───────
   Dunkler Hintergrund, Video mittig. Groesse: so breit wie moeglich, aber
   nie hoeher als das Fenster - Breite = min(1600px, Fenster - Pfeile,
   (Fensterhoehe - Platz fuer Infos) * 16/9). Infos darunter, an der
   Videokante. Pfeile blaettern innerhalb des Formats. */
body.mtx-ovl-open { overflow: hidden; }
.mtx-ovl { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: 24px;
  background: rgba(3, 8, 18, 0.94); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); animation: mtxOvlIn 0.25s ease; }
@keyframes mtxOvlIn { from { opacity: 0; } }
.mtx-ovl__box { width: min(1600px, calc(100vw - 160px), calc((100vh - 190px) * 16 / 9)); }
.mtx-ovl__player { overflow: hidden; border-radius: 12px; background: #000; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6); }
.mtx-ovl__player video { display: block; width: 100%; aspect-ratio: 16 / 9; background: #000; }
.mtx-ovl__info { padding: 16px 2px 0; color: #fff; }
.mtx-ovl__info h2 { margin: 0 0 6px; font-size: 20px; line-height: 1.25; }
.mtx-ovl__desc { display: -webkit-box; overflow: hidden; -webkit-line-clamp: 2; -webkit-box-orient: vertical; max-width: 90ch; margin: 8px 0 0; color: var(--mtx-soft); white-space: pre-line; }
.mtx-ovl__x { position: absolute; top: 18px; right: 18px; width: 44px; height: 44px; border: 1px solid rgba(255, 255, 255, 0.28); border-radius: 50%; background: rgba(255, 255, 255, 0.06); color: #fff; font-size: 20px; line-height: 1; cursor: pointer; }
.mtx-ovl__x:hover, .mtx-ovl__x:focus-visible { border-color: #fff; background: rgba(255, 255, 255, 0.14); outline: none; }
.mtx-ovl__nav { position: absolute; top: 50%; width: 52px; height: 52px; margin-top: -26px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, 0.08); color: #fff; font-size: 28px; line-height: 1; cursor: pointer; }
.mtx-ovl__nav:hover, .mtx-ovl__nav:focus-visible { background: rgba(255, 255, 255, 0.18); outline: none; }
.mtx-ovl__nav--l { left: 20px; }
.mtx-ovl__nav--r { right: 20px; }
@media (max-width: 760px) {
  .mtx-ovl { padding: 64px 12px 16px; place-items: start center; }
  .mtx-ovl__box { width: min(100%, calc((100vh - 220px) * 16 / 9)); }
  .mtx-ovl__x { top: 12px; right: 12px; }
  .mtx-ovl__nav { top: auto; bottom: 16px; margin-top: 0; width: 44px; height: 44px; }
  .mtx-ovl__nav--l { left: 12px; }
  .mtx-ovl__nav--r { right: 12px; }
}
@media (prefers-reduced-motion: reduce) { .mtx-ovl { animation: none; } }
