/* gleiten.tv – mobile first */

@font-face { font-family: "Ubuntu"; font-weight: 400; font-display: swap; src: url("../fonts/ubuntu-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Ubuntu"; font-weight: 500; font-display: swap; src: url("../fonts/ubuntu-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Ubuntu"; font-weight: 700; font-display: swap; src: url("../fonts/ubuntu-latin-700-normal.woff2") format("woff2"); }

:root {
  --orange: #f15a25;
  --orange-dark: #d2471a;
  --ink: #222;
  --text: #3c3c3c;
  --muted: #777;
  --line: #e4e4e4;
  --tile: #f2f2f2;
  --bar: rgba(12, 12, 12, .94);
  --sheet: rgba(255, 255, 255, .8);   /* leicht durchscheinend */
  --radius: 6px;
  --gap: 16px;
  --topbar: 52px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh;
  font: 400 16px/1.55 "Ubuntu", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--text); background: #1b1b1b;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--orange-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { color: var(--ink); line-height: 1.25; margin: 0 0 .5em; }
h1 { font-size: 1.5rem; font-weight: 500; }
h1 small { font-size: .9rem; color: var(--muted); font-weight: 400; margin-left: .4em; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* Hintergrundfoto der Rubrik */
.backdrop {
  position: fixed; inset: 0; z-index: -1;
  background: #1b1b1b center / cover no-repeat;
}
.backdrop::after { content: ""; position: absolute; inset: 0; background: linear-gradient(rgba(0,0,0,.25), rgba(0,0,0,.45)); }

/* Kopfleiste */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 12px;
  height: var(--topbar); padding: 0 12px;
  background: var(--bar);  /* kein backdrop-filter hier: würde das fixierte Mobil-Menü auf die Leistenhöhe begrenzen */
}
.logo img { height: 26px; width: auto; }
.burger {
  margin-left: auto; width: 44px; height: 44px; border: 0; background: none; cursor: pointer; position: relative;
}
.burger span:first-child, .burger span:first-child::before, .burger span:first-child::after {
  position: absolute; left: 11px; width: 22px; height: 2px; background: #fff; content: ""; transition: .2s;
}
.burger span:first-child { top: 21px; }
.burger span:first-child::before { top: -7px; left: 0; }
.burger span:first-child::after { top: 7px; left: 0; }
.nav-open .burger span:first-child { background: transparent; }
.nav-open .burger span:first-child::before { top: 0; transform: rotate(45deg); }
.nav-open .burger span:first-child::after { top: 0; transform: rotate(-45deg); }

.search { display: none; }
/* Mobil: Lupe in der Leiste und Suchfeld oben im Menü */
.search-link {
  margin-left: auto; width: 44px; height: 44px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='10.5' cy='10.5' r='6.5'/%3E%3Cpath d='M15.5 15.5 21 21'/%3E%3C/svg%3E") center / 22px no-repeat;
}
.search-link + .burger { margin-left: 0; }
.nav-search { padding: 8px 20px 12px; }
.nav-search input {
  width: 100%; font: inherit; padding: 10px 12px; border-radius: var(--radius);
  border: 1px solid #444; background: #222; color: #fff;
}
.search input, .search-page input {
  width: 100%; font: inherit; padding: 8px 12px; border-radius: var(--radius);
  border: 1px solid #444; background: #222; color: #fff;
}

/* Navigation: mobil als ausklappbare Liste */
.nav {
  display: none; position: fixed; top: var(--topbar); left: 0; right: 0; bottom: 0;
  overflow-y: auto; background: #111; padding: 8px 0 32px;
}
.nav-open .nav { display: block; }
.nav ul { list-style: none; margin: 0; padding: 0; }
.nav a { display: block; padding: 10px 20px; color: #ddd; text-transform: uppercase; font-size: .95rem; letter-spacing: .02em; }
.nav a:hover { color: #fff; text-decoration: none; background: #1e1e1e; }
.nav .active > a { color: var(--orange); }
.nav-sub a { padding-left: 36px; text-transform: none; color: #aaa; font-size: .92rem; }
.nav-sub ul a { padding-left: 52px; font-size: .88rem; color: #888; }
.nav-open { overflow: hidden; }

.subnav { display: none; }

/* Inhaltsblatt */
.sheet {
  background: var(--sheet); margin: 16vh 0 0; padding: 20px 16px 32px; border-radius: var(--radius) var(--radius) 0 0;
  min-height: 60vh;
}
.crumbs { font-size: .8rem; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; display: flex; flex-wrap: wrap; gap: 4px 8px; }
.crumbs a, .crumbs span { color: var(--muted); }
.crumbs > * + *::before { content: "/"; margin-right: 8px; color: #bbb; }

.tag {
  display: inline-block; background: var(--orange); color: #fff; font-size: .95rem; font-weight: 500;
  padding: 6px 12px; border-radius: var(--radius); margin: 0 0 12px;
}
.section-title { font-size: 1.15rem; font-weight: 500; border-bottom: 2px solid var(--orange); padding-bottom: 6px; }
.kicker { text-transform: uppercase; font-size: .78rem; letter-spacing: .08em; color: var(--orange); margin: 0 0 4px; font-weight: 500; }
.meta { color: var(--muted); font-size: .9rem; display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; }
.chip { background: var(--tile); color: var(--text); padding: 2px 10px; border-radius: 99px; font-size: .8rem; }
.prose { overflow-wrap: anywhere; }
.prose img { height: auto; }
.more { display: inline-block; margin-top: 12px; font-weight: 500; }

/* Player */
.player { position: relative; aspect-ratio: 16 / 9; background: #000; border-radius: var(--radius); overflow: hidden; margin-bottom: 16px; }
.player video, .player iframe, .player > img { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; object-fit: cover; }
.player.consent { background: #000 center / cover no-repeat; }
.play {
  position: absolute; left: 50%; top: 45%; transform: translate(-50%, -50%);
  width: 76px; height: 76px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--orange) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M8 5v14l11-7z'/%3E%3C/svg%3E") 55% 50% / 44px no-repeat;
  box-shadow: 0 4px 18px rgba(0,0,0,.4); transition: transform .15s;
}
.play:hover { transform: translate(-50%, -50%) scale(1.07); }
.consent-note {
  position: absolute; left: 0; right: 0; bottom: 0; margin: 0; padding: 8px 12px;
  font-size: .72rem; color: #eee; background: linear-gradient(transparent, rgba(0,0,0,.8));
}
.consent-note a { color: #fff; text-decoration: underline; }
.player.pending { background: #000 center / cover no-repeat; display: flex; align-items: flex-end; }
.player.pending p { position: relative; margin: 0; width: 100%; padding: 14px 16px; color: #fff; font-size: .9rem; background: rgba(0,0,0,.7); }

/* Startseite */
.hero h1 { font-size: 1.35rem; margin-bottom: .25em; }
.hero h1 a { color: var(--ink); }
.hero-text p:last-child { color: var(--muted); margin-top: 0; }
.split { display: grid; gap: 28px; margin-top: 24px; }

/* Karten & Listen */
.grid { display: grid; gap: var(--gap); grid-template-columns: 1fr; margin: 16px 0; }
.vcard { display: flex; flex-direction: column; background: var(--tile); border-radius: var(--radius); overflow: hidden; color: var(--text); }
.vcard:hover { text-decoration: none; box-shadow: 0 3px 14px rgba(0,0,0,.12); }
.vcard img { aspect-ratio: 16 / 9; object-fit: cover; width: 100%; background: #ddd; }
.vcard-title { padding: 10px 12px 2px; font-weight: 500; color: var(--ink); line-height: 1.3; }
.vcard-sub, .vcard time { padding: 0 12px 10px; font-size: .82rem; color: var(--muted); }
.vlist { display: grid; gap: 8px; }
.vrow { display: grid; grid-template-columns: 120px 1fr; gap: 10px; align-items: center; background: var(--tile); border-radius: var(--radius); overflow: hidden; color: var(--ink); font-size: .92rem; line-height: 1.3; }
.vrow img { width: 120px; height: 67px; object-fit: cover; }
.vrow span { padding-right: 10px; }
.vrow:hover { text-decoration: none; background: #e9e9e9; }

/* Werbeflächen: exaktes Bannerformat, nie breiter als das Original, mobil proportional verkleinert */
.ad-slot { margin: 28px 0; display: flex; flex-direction: column; align-items: center; }
.ad-slot::before {
  content: "Anzeige"; font-size: .62rem; letter-spacing: .1em; text-transform: uppercase; color: #a0a0a0; margin-bottom: 4px;
}
.ad {
  position: relative; width: 100%; max-width: calc(var(--w) * 1px);
  aspect-ratio: var(--w) / var(--h); overflow: hidden; background: var(--tile); border-radius: 3px;
}
.ad iframe { position: absolute; left: 0; top: 0; border: 0; max-width: none; transform-origin: 0 0; }
.ad-pair { display: grid; gap: 16px; margin: 28px 0; }
.ad-pair .ad-slot { margin: 0; }
.vlist .ad-side { margin: 12px 0; }
.ad-strip { margin: 24px 0 8px; }
.ad-strip .ad, .ad-side .ad { max-width: 100%; }   /* Video-Seite: Banner auf volle Spaltenbreite (siehe data-stretch in site.js) */

/* Rubriken-Übersicht */
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 16px; }
.section-head h1 { text-transform: capitalize; margin-bottom: .3em; }
.section-all { font-weight: 500; font-size: .95rem; }
.lead { display: grid; gap: 4px; }
.lead .ad-slot { margin: 20px 0 0; }
.hero-card { position: relative; display: block; border-radius: var(--radius); overflow: hidden; background: #000; color: #fff; }
.hero-card img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; opacity: .92; transition: transform .4s, opacity .4s; }
.hero-card:hover { text-decoration: none; }
.hero-card:hover img { transform: scale(1.03); opacity: 1; }
.hero-card-text {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 40px 16px 14px;
  display: flex; flex-direction: column; gap: 2px;
  background: linear-gradient(transparent, rgba(0,0,0,.85));
}
.hero-card .kicker { color: #ff8a5c; }
.hero-card-title { font-size: 1.25rem; font-weight: 500; line-height: 1.25; }
.hero-card time { font-size: .8rem; color: #ccc; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 18px 0 4px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chips .chip { white-space: nowrap; padding: 6px 14px; font-size: .88rem; }
.chips .chip:hover { background: var(--orange); color: #fff; text-decoration: none; }

.rail-block { position: relative; margin: 30px 0; scroll-margin-top: 110px; }
.rail-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; margin-bottom: 10px; }
.rail-head h2 { margin: 0; font-size: 1.2rem; font-weight: 500; padding-left: 10px; border-left: 4px solid var(--orange); text-transform: capitalize; }
.rail-head h2 a { color: var(--ink); }
.rail-sub { display: flex; flex-wrap: wrap; gap: 2px 12px; font-size: .85rem; }
.rail-sub a { color: var(--muted); }
.rail-all { margin-left: auto; font-size: .9rem; font-weight: 500; white-space: nowrap; }
.rail {
  display: grid; grid-auto-flow: column; grid-auto-columns: 74%; gap: 12px;
  overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory;
  padding-bottom: 10px; scrollbar-width: thin;
}
.rail > * { scroll-snap-align: start; }
.rail-nav button {
  position: absolute; top: calc(50% + 10px); transform: translateY(-50%); z-index: 2;
  width: 42px; height: 42px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(255,255,255,.95); color: var(--ink); font-size: 1.7rem; line-height: 1;
  box-shadow: 0 2px 10px rgba(0,0,0,.25);
}
.rail-nav .prev { left: -14px; }
.rail-nav .next { right: -14px; }
.rail-nav button:disabled { opacity: 0; pointer-events: none; }

/* Video-Seite */
.watch { display: grid; gap: 28px; }
.watch-main h1 { font-size: 1.4rem; }
.watch-more { margin-top: 36px; }

/* Fragen & Antworten (YouTube-Kommentare) */
.qa { margin-top: 32px; }
.qa-list, .qa-replies { list-style: none; margin: 0; padding: 0; }
.qa-item { padding: 14px 0; border-bottom: 1px solid var(--line); }
.qa-replies { margin: 10px 0 0 18px; padding-left: 14px; border-left: 3px solid var(--line); display: grid; gap: 10px; }
.qa-meta { margin: 0 0 2px; font-size: .85rem; color: var(--muted); display: flex; gap: 10px; align-items: baseline; }
.qa-meta strong { color: var(--ink); font-weight: 500; }
.qa-text { margin: 0; white-space: pre-line; overflow-wrap: anywhere; }
.qa-owner .qa-meta strong { color: #fff; background: var(--orange); padding: 1px 8px; border-radius: 99px; font-size: .78rem; }
.qa-actions { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; }
.qa-actions small { color: var(--muted); }
.button { display: inline-block; background: var(--orange); color: #fff; padding: 9px 16px; border-radius: var(--radius); font-weight: 500; }
.button:hover { background: var(--orange-dark); text-decoration: none; }

/* Blättern, Footer */
.pager { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 24px 0; font-size: .95rem; }
.pager span { color: var(--muted); }
.footer { color: #ccc; text-align: center; padding: 24px 16px 40px; font-size: .9rem; background: rgba(0,0,0,.6); }
.footer nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; margin-bottom: 8px; }
.footer a { color: #fff; }
.footer .social { margin-bottom: 14px; gap: 10px; }
.footer .social a { padding: 6px 14px; border: 1px solid rgba(255,255,255,.45); border-radius: 99px; font-weight: 500; }
.footer .social a:hover { background: var(--orange); border-color: var(--orange); text-decoration: none; }
.search-page { margin: 12px 0; max-width: 560px; }
.search-page input { background: #fff; color: var(--ink); border-color: #ccc; font-size: 1.05rem; padding: 12px 14px; }

/* Suche: Startzustand */
.search-hero { margin-bottom: 8px; }
#search-empty section { margin: 28px 0; }
.suggest .section-title { font-size: 1rem; margin-top: 18px; }
.suggest-chips { display: flex; flex-wrap: wrap; gap: 8px; }
button.chip { font: inherit; font-size: .9rem; border: 0; cursor: pointer; padding: 7px 14px; }
button.chip:hover, button.chip:focus-visible { background: var(--orange); color: #fff; }
.sparten { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.sparte {
  position: relative; display: flex; flex-direction: column; justify-content: flex-end;
  aspect-ratio: 4 / 3; padding: 12px; border-radius: var(--radius); overflow: hidden;
  background: #333 center / cover no-repeat; color: #fff;
}
.sparte::before { content: ""; position: absolute; inset: 0; background: linear-gradient(transparent 35%, rgba(0,0,0,.75)); transition: background .2s; }
.sparte:hover { text-decoration: none; }
.sparte:hover::before { background: linear-gradient(rgba(241,90,37,.15), rgba(0,0,0,.8)); }
.sparte > * { position: relative; }
.sparte-title { font-size: 1.15rem; font-weight: 500; text-transform: uppercase; letter-spacing: .03em; }
.sparte-count { font-size: .8rem; color: #ddd; }

/* ≥ 600 px: zwei Spalten */
@media (min-width: 600px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
  .sheet { margin: 20vh 12px 0; border-radius: var(--radius); padding: 24px; }
  h1 { font-size: 1.75rem; }
  .ad-pair { grid-template-columns: repeat(2, minmax(0, 301px)); justify-content: center; gap: 24px; }
  .sparten { grid-template-columns: repeat(3, 1fr); }
  .rail { grid-auto-columns: 42%; }
  .hero-card-title { font-size: 1.5rem; }
}

/* ≥ 1000 px: Desktop-Navigation, Suche in der Leiste, Seitenspalten */
@media (min-width: 1000px) {
  :root { --topbar: 46px; }
  .topbar { backdrop-filter: blur(6px); }
  .burger, .search-link, .nav-search { display: none; }
  .search { display: block; margin-left: auto; width: 220px; }
  .search input { padding: 5px 10px; font-size: .88rem; }
  .nav { display: block; position: static; background: none; padding: 0; overflow: visible; }
  /* Menü wie auf der alten Seite: Unterebenen als waagerechte Zeilen über die volle Breite,
     aktueller Pfad auf allen Ebenen orange, beim Darüberfahren hell hinterlegt */
  .nav-top { display: flex; height: var(--topbar); }
  .nav-top > li { position: static; display: flex; }
  .nav-top > li > a { display: flex; align-items: center; padding: 0 11px; font-size: .84rem; color: #ccc; }
  .nav-top > li > a:hover, .nav-top > li:hover > a { background: rgba(255,255,255,.18); color: #fff; }
  .nav-top > li.active > a { color: var(--orange); }
  .nav .nav-sub, .nav .nav-sub ul, .subnav li ul {
    display: none; position: absolute; top: 100%; left: 0; right: 0; z-index: 2;
    list-style: none; margin: 0; padding: 0 max(12px, calc((100% - 1240px) / 2 + 12px));
    flex-wrap: wrap; background: rgba(40,40,40,.97);
  }
  .nav-sub { z-index: 16; }
  .nav-sub ul, .subnav li ul { background: rgba(20,20,20,.97); border-bottom: 1px solid rgba(255,255,255,.25); }
  .nav-top > li:hover > .nav-sub, .nav-top > li:focus-within > .nav-sub { display: flex; }
  .nav-sub li, .subnav li { position: static; }
  .nav-sub li:hover > ul, .nav-sub li:focus-within > ul { display: flex; }
  .nav-sub a, .subnav a { display: block; padding: 9px 12px; color: #ddd; font-size: .82rem; text-transform: uppercase; }
  .nav-sub ul a, .subnav li ul a { text-transform: none; font-size: .86rem; color: #ccc; }
  .nav-sub a:hover, .subnav a:hover { background: rgba(255,255,255,.18); color: #fff; text-decoration: none; }
  .nav-sub .active > a, .subnav .active > a { color: var(--orange); }

  .subnav { display: block; position: sticky; top: var(--topbar); z-index: 15; background: rgba(40,40,40,.92); backdrop-filter: blur(6px); }
  .subnav > ul { list-style: none; margin: 0 auto; padding: 0 12px; display: flex; flex-wrap: wrap; max-width: 1240px; }
  /* dritte Ebene: die des aktuellen Bereichs bleibt stehen, beim Darüberfahren erscheint die jeweilige */
  .subnav li.active > ul, .subnav li:hover > ul, .subnav li:focus-within > ul { display: flex; }
  .subnav > ul:hover > li.active:not(:hover) > ul { display: none; }
  /* beim Darüberfahren über das Hauptmenü nur dessen Zeilen zeigen, nicht die stehende dritte Ebene */
  body:has(.nav-top > li:hover) .subnav li.active > ul { display: none; }

  .sheet { max-width: 1240px; margin: 28vh auto 0; border-radius: var(--radius); padding: 28px 32px 40px; box-shadow: 0 10px 40px rgba(0,0,0,.35); }
  .grid { grid-template-columns: repeat(3, 1fr); }
  .split { grid-template-columns: minmax(280px, 1fr) 2fr; }
  .split .grid-2 { grid-template-columns: repeat(2, 1fr); margin-top: 0; }
  .hero { display: grid; grid-template-columns: 2fr 1fr; gap: 24px; align-items: end; }
  .hero .player { margin: 0; }
  .hero h1 { font-size: 1.6rem; }
  .watch { grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); }
  .watch-side .ad-pair { grid-template-columns: minmax(0, 301px); }
  .footer { background: none; text-shadow: 0 1px 3px rgba(0,0,0,.6); }
  .hero-card img { aspect-ratio: 21 / 9; }
  .hero-card-text { padding: 60px 28px 22px; }
  .hero-card-title { font-size: 1.9rem; max-width: 70%; }
  .rail { grid-auto-columns: calc((100% - 3 * 14px) / 4); gap: 14px; }
  .chips { display: none; }  /* Desktop: die Unternavigation zeigt dieselben Rubriken */
  .sparten { grid-template-columns: repeat(3, 1fr); gap: 14px; }
  .sparte { aspect-ratio: 16 / 7; padding: 16px 18px; }
  .sparte-title { font-size: 1.35rem; }
  .search-hero { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 24px; }
  .search-hero h1 { margin: 0; }
  .search-hero .search-page { flex: 1; min-width: 320px; }
}

@media (min-width: 1400px) {
  .grid { grid-template-columns: repeat(4, 1fr); }
  .split .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .rail { grid-auto-columns: calc((100% - 4 * 14px) / 5); }
}
