/* =========================================================
   TRC Studios – Design Tokens & Komponenten-Styles
   Extrahiert aus dem Figma-Entwurf (Farben, Radien, Typografie).
   Hinweis: Das Figma-Layout arbeitet mit absoluter Pixel-
   Positionierung (1920px Desktop-Canvas). Für eine echte,
   responsive Website wurden die Komponenten hier in ein
   Flow-/Grid-Layout übersetzt, das Abstände, Proportionen,
   Farben und Typografie des Entwurfs beibehält.
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,400;0,700;0,800;1,400;1,600&family=Roboto+Condensed:ital,wght@0,400;0,600;1,400;1,600&display=swap');

:root {
  /* Farben */
  --color-bg: #000000;
  --color-bg-soft: #0a0a0a;
  --color-card-bg: #eaeaea;
  --color-card-shadow: rgba(0, 0, 0, 0.51);
  --color-text-dark: #111111;
  --color-text-muted: #4b4b4b;
  --color-link: #0051ff;
  --color-white: #ffffff;
  --color-grey: #6b6b6b;

  --color-cta-bg: #101010;
  --color-cta-heading: #ffdbdb;
  --color-cta-text: #fadbdb;
  --color-cta-btn: #910000;

  /* Gradients (aus Figma-Fills) */
  --gradient-header: linear-gradient(-86deg,
      rgba(255, 166, 0, 0.46) 2%,
      rgba(255, 255, 255, 0.46) 13%,
      rgba(255, 187, 0, 0.46) 45%,
      rgba(112, 9, 0, 0.46) 71%,
      rgba(0, 16, 116, 0.46) 100%);
  --gradient-footer: linear-gradient(90deg, rgba(0, 6, 74, 0.85), rgba(0, 21, 255, 0.85));
  --gradient-hero-word: linear-gradient(180deg, #00d0ff 0%, #3000ff 63%, #ff0000 100%);
  --gradient-calendar: linear-gradient(135deg, #ffa600 0%, #ffffff 25%, #ffbb00 48%, #700900 70%, #001074 100%);

  /* Mesh-Gradients 1:1 aus Figma (identische Farbverläufe, zwei
     Größen als SVG-Data-URIs): "sm" für kleine Flächen wie den
     Kalender-Hintergrund oder die Streifen im Brand-Strip, "lg"
     für den großflächigen Seiten-Hintergrund der Story-Seite. */
  --mesh-svg-sm: url("data:image/svg+xml;utf8,<svg viewBox='0 0 321.42 230.68' xmlns='http://www.w3.org/2000/svg' preserveAspectRatio='none'><rect x='0' y='0' height='100%25' width='100%25' fill='url(%23meshSm)' opacity='1'/><defs><radialGradient id='meshSm' gradientUnits='userSpaceOnUse' cx='0' cy='0' r='10' gradientTransform='matrix(-32.142 -23.068 16.556 -23.068 321.42 230.68)'><stop stop-color='rgba(255,166,0,1)' offset='0'/><stop stop-color='rgba(255,199,96,1)' offset='0.0847'/><stop stop-color='rgba(255,255,255,1)' offset='0.226'/><stop stop-color='rgba(255,213,96,1)' offset='0.388'/><stop stop-color='rgba(255,187,0,1)' offset='0.486'/><stop stop-color='rgba(183,98,0,1)' offset='0.594'/><stop stop-color='rgba(112,9,0,1)' offset='0.702'/><stop stop-color='rgba(56,12,58,1)' offset='0.851'/><stop stop-color='rgba(0,16,116,1)' offset='1'/></radialGradient></defs></svg>");
  --mesh-svg-lg: url("data:image/svg+xml;utf8,<svg viewBox='0 0 1920 3848' xmlns='http://www.w3.org/2000/svg' preserveAspectRatio='none'><rect x='0' y='0' height='100%25' width='100%25' fill='url(%23meshLg)' opacity='0.34'/><defs><radialGradient id='meshLg' gradientUnits='userSpaceOnUse' cx='0' cy='0' r='10' gradientTransform='matrix(-154.13 -119.05 113.09 -146.42 944.3 1924)'><stop stop-color='rgba(255,166,0,1)' offset='0'/><stop stop-color='rgba(255,199,96,1)' offset='0.0847'/><stop stop-color='rgba(255,255,255,1)' offset='0.226'/><stop stop-color='rgba(255,213,96,1)' offset='0.388'/><stop stop-color='rgba(255,187,0,1)' offset='0.486'/><stop stop-color='rgba(183,98,0,1)' offset='0.594'/><stop stop-color='rgba(112,9,0,1)' offset='0.702'/><stop stop-color='rgba(56,12,58,1)' offset='0.851'/><stop stop-color='rgba(0,16,116,1)' offset='1'/></radialGradient></defs></svg>");

  /* Radien / Abstände */
  --radius-lg: 25px;
  --radius-pill: 46px;
  --container-w: 1400px;
  --space-section: clamp(48px, 8vw, 120px);

  /* Typografie */
  --font-display: "Roboto", sans-serif; /* ExtraBold / SemiBold */
  --font-copy: "Roboto Condensed", sans-serif; /* Condensed Italic / SemiBold Italic */

  /* Höhe des Sticky-Headers, live per JS gemessen (site.js) und
     hier gesetzt – siehe .hero min-height. 0px Fallback für den
     allerersten Frame vor dem ersten JS-Messwert. */
  --header-h: 0px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-white);
  font-family: var(--font-copy);
  line-height: 1.5;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

img { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

.container {
  width: 100%;
  max-width: var(--container-w);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Header / Nav ----------
   Sticky: bleibt beim Scrollen oben stehen. Unter --nav-breakpoint
   verschwinden die Inline-Links, stattdessen erscheint ein
   Hamburger rechts, der das Off-Canvas-Panel (siehe weiter unten)
   öffnet. */
.site-header {
  position: sticky;
  top: 0;
  z-index: 200;
  padding: 24px 0;
  background: transparent;
}

.nav-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background: var(--gradient-header);
  border-radius: var(--radius-pill);
  box-shadow: 11px 15px 38.8px 0px rgba(255, 255, 255, 0.22);
  padding: 14px 24px 14px 32px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.nav-pill__logo {
  font-family: var(--font-display);
  font-weight: 800;
  font-style: italic;
  letter-spacing: 0.03em;
  font-size: 18px;
  text-shadow: 0 0 13.7px rgba(255, 255, 255, 0.8);
  white-space: nowrap;
  display: flex;
  align-items: center;
}
.nav-pill__logo img { height: 28px; width: auto; display: block; }

.nav-pill__links {
  display: flex;
  gap: clamp(16px, 3vw, 48px);
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-pill__links a {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-shadow: 0 0 13.7px rgba(255, 255, 255, 0.6);
}

.nav-pill__links a:hover { opacity: 0.75; }

.nav-pill__burger {
  display: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.25);
  color: var(--color-white);
  font-size: 18px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}

/* --nav-breakpoint: unter 860px verschwinden die Inline-Links,
   der Hamburger übernimmt (rechtsbündig, wie gefordert). */
@media (max-width: 860px) {
  .nav-pill__links { display: none; }
  .nav-pill__burger { display: flex; }
}

/* ---------- Off-Canvas-Navigation (Master-Detail) ----------
   Struktur nach Vorlage: EIN Panel schiebt sich von rechts ein
   (Master-Liste). Klick auf einen Punkt MIT Kindern schiebt ein
   ZWEITES Panel (Detail) darüber, mit Zurück-Pfeil. Beide Panels
   liegen fixed über der ganzen Seite, unabhängig vom Header. */
.nav-overlay {
  position: fixed;
  inset: 0;
  z-index: 500;
  visibility: hidden;
}
.nav-overlay.is-open { visibility: visible; }

.nav-overlay__scrim {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  transition: opacity .25s ease;
}
.nav-overlay.is-open .nav-overlay__scrim { opacity: 1; }

.nav-panel {
  position: absolute;
  top: 0;
  right: 0;
  height: 100%;
  width: min(380px, 100vw);
  background: #0d0d0d;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  transform: translateX(100%);
  transition: transform .3s ease;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}
.nav-overlay.is-open .nav-panel--master { transform: translateX(0); }
.nav-panel--detail.is-open { transform: translateX(0); }

.nav-panel__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 20px 8px;
}
.nav-panel__close,
.nav-panel__back {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: transparent;
  color: var(--color-white);
  font-size: 15px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.nav-panel__title {
  font-family: var(--font-copy);
  font-style: italic;
  font-weight: 600;
  font-size: 14px;
  color: #9aa0ff;
  padding: 4px 24px 12px;
}

.nav-panel__list {
  list-style: none;
  margin: 0;
  padding: 8px 12px 24px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.nav-panel__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 14px 12px;
  background: none;
  border: none;
  color: var(--color-white);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 17px;
  text-align: left;
  text-decoration: none;
  border-radius: 10px;
  cursor: pointer;
}
.nav-panel__item:hover { background: rgba(255, 255, 255, 0.06); }
.nav-panel__item .chev { opacity: .5; font-size: 16px; }

/* ---------- Hero ("Indexlanding" in Figma) ----------
   100% Viewport-Höhe, Inhalt vertikal zentriert. Eigener, ruhiger
   Hintergrund OHNE die bunten Blobs – die gehören laut Figma zur
   "Artikel Übersicht"-Gruppe weiter unten (siehe .teaser-backdrop),
   nicht in den Hero. */
.hero {
  position: relative;
  overflow: hidden;
  /* --header-h wird per JS (site.js) auf die tatsächliche Höhe des
     Headers gesetzt. Der Header steht VOR dem Hero im Fluss und
     schiebt ihn nach unten; ohne diesen Abzug würde "min-height:
     100vh" dazu führen, dass der Inhalt auf der Mitte der eigenen
     100vh-Box zentriert wird statt auf der Mitte des tatsächlich
     sichtbaren Bereichs unterhalb des Headers – der Inhalt wirkt
     dann zu weit unten. */
  min-height: calc(100vh - var(--header-h, 0px));
  display: flex;
  align-items: center;
  padding: clamp(40px, 8vw, 120px) 0;
}

/* Vollflaechiger Hintergrund (comp.background) HINTER dem gesamten
   Hero-Inhalt, inkl. abdunkelnder Plane (Opacity per Editor-Regler).
   overflow:hidden auf .hero (oben) verhindert, dass Video/Bild bei
   ungewoehnlichem Seitenverhaeltnis sichtbar ueberstehen. */
.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero__bg video,
.hero__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.hero__bg-overlay {
  position: absolute;
  inset: 0;
}

.hero__grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.4fr 0.6fr;
  gap: 32px;
  align-items: center;
}

.hero__title {
  font-family: var(--font-display);
  font-weight: 800;
  font-style: italic;
  font-size: clamp(40px, 6vw, 88px);
  line-height: 1.05;
  margin: 0 0 16px;
}

.hero__title .accent {
  background: var(--gradient-hero-word);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero__subtitle {
  font-family: var(--font-copy);
  font-style: italic;
  font-size: clamp(16px, 1.4vw, 24px);
  color: #d9d9d9;
  margin: 0;
}

.hero__badge {
  justify-self: end;
  position: relative;
  width: 280px;
  height: 240px;
}

/* Kalender-Widget: zwei um 18° rotierte, versetzte Ebenen.
   Hinten: Mesh-Gradient (Figma-Farben). Vorne: transluzente
   "Frost-Glas"-Scheibe mit Blur + Inset-Highlight, auf der Monat
   und Tag liegen. Datum wird per JS live gefüllt (site.js). */
.calendar-badge {
  position: absolute;
  inset: 0;
}
.calendar-badge__back,
.calendar-badge__front {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 210px;
  height: 150px;
  border-radius: 40px;
  transform: translate(-50%, -50%) rotate(18deg);
}
.calendar-badge__back {
  background-image: var(--mesh-svg-sm);
  background-size: cover;
  box-shadow: 0 20px 38px rgba(0, 0, 0, 0.35);
}
.calendar-badge__front {
  top: calc(50% + 18px);
  background: rgba(120, 110, 110, 0.28);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: inset 0 4px 8px rgba(255, 255, 255, 0.35);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--color-white);
  font-family: var(--font-display);
  font-weight: 600;
}
.calendar-badge__month { font-size: 20px; letter-spacing: 0.1em; }
.calendar-badge__day { font-size: 42px; font-weight: 700; line-height: 1; margin-top: 2px; }

/* Hero-Badge im Video-/Bild-Modus (comp.media.type): schlichter
   abgerundeter Rahmen statt der rotierten Kalender-Optik - eine
   gedrehte Video-/Bildfläche würde seltsam wirken. */
.hero__badge--media {
  border-radius: 24px;
  overflow: hidden;
  background: #111;
}
.hero__media-video,
.hero__badge--media img,
.hero__media-placeholder {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 24px;
}
.hero__media-placeholder {
  background: repeating-linear-gradient(45deg, #1a1a1a, #1a1a1a 10px, #222 10px, #222 20px);
}

/* ---------- Brand-Banner (Homepage) ----------
   Bewusst EINFACH gehalten: eine einzelne Bild-Komponente, die
   eine echte PNG/SVG-Datei lädt (über header.json ->
   brandBanner.image). Keine CSS-Nachbildung des Logo-Grafik-
   Assets mehr – das Logo-Banner ist im Figma-Entwurf ein fertig
   gestaltetes Bild, kein aus Text+Gradient zusammengesetztes
   Element. */
.brand-strip {
  background: var(--color-bg);
}
.brand-strip__image { display: block; width: 100%; height: auto; }
.brand-strip__fallback {
  display: block;
  padding: 24px 0;
  text-align: center;
  color: var(--color-white);
  font-family: var(--font-display);
  font-weight: 800;
  font-style: italic;
  letter-spacing: 0.1em;
  font-size: 22px;
}

/* ---------- Dekorative Formen (rotierte Rahmen-Quadrate) ----------
   Wie in Figma: nur Umrandung, kein Fill. Werden auf Story-/
   Topic-Seiten in gegenüberliegenden Ecken platziert. Der
   umgebende Abschnitt braucht position:relative + overflow:hidden
   (siehe .story, .topic-hero). */
.page-shape {
  position: absolute;
  width: clamp(140px, 20vw, 300px);
  aspect-ratio: 1;
  border: 3px solid rgba(255, 255, 255, 0.55);
  border-radius: 25px;
  pointer-events: none;
  z-index: 0;
}
.page-shape--tl { top: -4%; left: -6%; transform: rotate(17deg); }
.page-shape--br { bottom: -6%; right: -6%; transform: rotate(-35deg); }

/* ---------- Teaser Grid (Homepage "Artikel Übersicht") ----------
   .teaser-backdrop trägt die 3 großen, weich verlaufenden
   Blob-Formen aus Figma auf WEISSEM Grund (cyan/blau bereits aus
   dem Design entnommen, die dritte warme Farbe ist mangels
   Figma-API-Kontingent an dieser Stelle sinngemäß an die
   restliche Farbsprache angeglichen, nicht 1:1 aus Figma
   bestätigt). Nur auf der Startseite – die Themenseite nutzt den
   gleichen Hintergrund wie die Story-Seite (siehe body.page-story
   / body.page-topic weiter unten), nicht diesen hier. */
.teaser-backdrop {
  position: relative;
  overflow: hidden;
  background: #ffffff;
}
.teaser-backdrop::before,
.teaser-backdrop::after,
.teaser-backdrop .blob-3 {
  content: "";
  position: absolute;
  width: 620px;
  height: 620px;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.4;
  pointer-events: none;
  z-index: 0;
}
.teaser-backdrop::before {
  background: radial-gradient(circle, #00d9ff 0%, #5ddff7 30%, transparent 75%);
  top: -10%;
  left: -8%;
}
.teaser-backdrop::after {
  background: radial-gradient(circle, #2600ff 0%, #7058f5 30%, transparent 75%);
  top: 35%;
  right: -10%;
}
.teaser-backdrop .blob-3 {
  background: radial-gradient(circle, #ff8a00 0%, #ffb44d 30%, transparent 75%);
  bottom: -15%;
  left: 20%;
}

.topic-hero { position: relative; z-index: 1; }

.teaser-section {
  position: relative;
  z-index: 1;
  padding: var(--space-section) 0;
}

.teaser-section__head {
  margin-bottom: 32px;
}
.teaser-section__head h2 {
  font-family: var(--font-copy);
  font-style: italic;
  font-weight: 600;
  font-size: clamp(24px, 3vw, 36px);
  color: var(--color-white);
}
/* Nur auf der Startseite: weißer Hintergrund -> dunkle Überschrift.
   Die Themenseite bleibt bei hellem Text auf dunklem Mesh-Grund. */
.teaser-backdrop .teaser-section__head h2 {
  color: var(--color-text-dark);
}

/* "2 + 1"-Raster wie in Figma: zwei Karten nebeneinander, dann
   eine zentrierte Karte alleine, wiederholt. Jede 3. Karte
   (nth-child 3n) bekommt die "Solo"-Behandlung automatisch –
   im Editor/Content muss dazu nichts Besonderes markiert werden. */
.teaser-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
  max-width: 1100px;
  margin: 0 auto;
}
.teaser-grid > :nth-child(3n) {
  grid-column: 1 / -1;
  justify-self: center;
  width: 100%;
  max-width: calc(50% - 16px);
}
@media (max-width: 720px) {
  .teaser-grid { grid-template-columns: 1fr; }
  .teaser-grid > :nth-child(3n) { max-width: 100%; }
}

/* ---------- Teaser Card component (used on Home / Topic pages) ---------- */
.teaser-card {
  background: var(--color-card-bg);
  border-radius: var(--radius-lg);
  box-shadow: 8px 8px 14px var(--color-card-shadow);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: transform .2s ease;
}
.teaser-card:hover { transform: translateY(-4px); }

.teaser-card__image {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #333;
}
.teaser-card__image img,
.teaser-card__image video { width: 100%; height: 100%; object-fit: cover; }
.teaser-card__placeholder { width: 100%; height: 100%; background: repeating-linear-gradient(45deg, #333, #333 10px, #3a3a3a 10px, #3a3a3a 20px); }

.teaser-card__heading {
  font-family: var(--font-copy);
  font-style: italic;
  font-weight: 600;
  font-size: 24px;
  color: var(--color-text-dark);
  margin: 0;
}

.teaser-card__body {
  font-family: var(--font-copy);
  font-style: italic;
  font-weight: 600;
  font-size: 15px;
  color: var(--color-text-muted);
  margin: 0;
}

.teaser-card__link {
  align-self: center;
  font-family: var(--font-copy);
  font-style: italic;
  font-weight: 600;
  font-size: 15px;
  color: var(--color-link);
}

/* state badge, shown only in editor previews */
.state-badge {
  display: inline-block;
  font-size: 11px;
  font-family: var(--font-display);
  padding: 2px 10px;
  border-radius: 999px;
  background: #333;
  color: #fff;
  margin-bottom: 8px;
}
.state-badge[data-state="online"] { background: #1c7c34; }
.state-badge[data-state="offline"] { background: #7c1c1c; }
.state-badge[data-state="ready"] { background: #3b5bdb; }
.state-badge[data-state="deleted"] { background: #444; text-decoration: line-through; }

/* ---------- CTA / "Bewerben" block ---------- */
.cta-block {
  max-width: var(--container-w);
  margin: 0 auto;
  padding: 0 24px var(--space-section);
}
.cta-block__inner {
  background: var(--color-cta-bg);
  border-radius: var(--radius-lg);
  box-shadow: 8px 8px 14px rgba(255, 255, 255, 0.08);
  padding: clamp(32px, 5vw, 64px);
  text-align: center;
}
.cta-block__inner h2 {
  font-family: var(--font-copy);
  font-style: italic;
  font-weight: 600;
  font-size: clamp(26px, 4vw, 44px);
  color: var(--color-cta-heading);
  margin: 0 0 16px;
}
.cta-block__inner p {
  font-family: var(--font-copy);
  font-style: italic;
  font-weight: 600;
  color: var(--color-cta-text);
  max-width: 700px;
  margin: 0 auto 28px;
}
.cta-block__btn {
  display: inline-block;
  background: var(--color-cta-btn);
  color: var(--color-white);
  font-family: var(--font-copy);
  font-style: italic;
  font-weight: 600;
  font-size: 20px;
  padding: 16px 40px;
  border-radius: var(--radius-lg);
  border: none;
  cursor: pointer;
}
.cta-block__btn:hover { filter: brightness(1.1); }

/* ---------- Footer ----------
   margin-top: auto schiebt den Footer im Flex-Body IMMER ganz
   nach unten, auch wenn der Seiteninhalt kürzer als der Viewport
   ist (z. B. Themenseite mit nur 1-2 Treffern) – sonst bleibt
   darunter sichtbarer Leerraum und die Seite "schließt nicht mit
   dem Footer ab". */
.site-footer {
  position: relative;
  margin-top: auto;
  background: var(--color-bg);
  padding: var(--space-section) 0 48px;
  overflow: hidden;
}
.site-footer::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--gradient-footer);
  z-index: 0;
}
.site-footer .footer-columns {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  align-items: start;
}
.footer-col {
  flex: 1 1 220px;
}
.footer-col h3 {
  font-family: var(--font-copy);
  font-style: italic;
  font-weight: 600;
  font-size: 28px;
  margin: 0 0 16px;
}
.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.footer-col a, .footer-col p {
  font-family: var(--font-copy);
  font-style: italic;
  font-weight: 600;
  font-size: 15px;
  margin: 0;
}
.footer-col a:hover { text-decoration: underline; }

.footer-contact {
  background: var(--color-grey);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  flex: 0 1 300px;
}

/* Unterste, schmale Zeile ueber die volle Breite (bottom_bar-
   Komponente) - z.B. Impressum/Datenschutz. Eigener .container
   darin fuer dieselbe Breiten-Ausrichtung wie der Rest der Seite,
   bewusst NICHT von der .footer-columns-Regel oben betroffen. */
.footer-bottom-bar {
  position: relative;
  z-index: 1;
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
}
.footer-bottom-bar ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
}
.footer-bottom-bar a {
  font-family: var(--font-copy);
  font-style: italic;
  font-size: 13px;
  color: #cfd3ff;
  opacity: 0.85;
}
.footer-bottom-bar a:hover { opacity: 1; text-decoration: underline; }

/* ---------- Story- & Themenseite: gleicher Hintergrund ----------
   Beide nutzen exakt denselben Mesh-Gradient-Hintergrund (auf
   body, nicht auf der Section – sonst wird er vom Header
   abgeschnitten, der als eigenes <header> VOR der jeweiligen
   Section im body steht). Die Themenseite hatte zwischenzeitlich
   die bunten "Artikelübersicht"-Blobs bekommen – das war falsch,
   ihr Hintergrund ist identisch zur Story-Seite. */
body.page-story,
body.page-topic {
  background-color: var(--color-bg);
  background-image: var(--mesh-svg-lg);
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
  overflow-x: hidden; /* falls die rotierten Formen minimal überstehen */
}
.story {
  position: relative;
  overflow: hidden;
  padding: var(--space-section) 0;
}
.story__card {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: 0 auto;
  background: var(--color-card-bg);
  border-radius: var(--radius-lg);
  padding: clamp(20px, 4vw, 56px);
  color: var(--color-text-dark);
}
.story__thumb-wrap {
  width: 100%;
  aspect-ratio: 16/6.5;
  border-radius: var(--radius-lg);
  margin-bottom: 32px;
  background: #333;
  overflow: hidden;
}
.story__thumb-wrap img,
.story__thumb-wrap video,
.story__thumb-wrap .story__thumb-placeholder { width: 100%; height: 100%; object-fit: cover; }
.story__thumb-placeholder { background: repeating-linear-gradient(45deg, #333, #333 10px, #3a3a3a 10px, #3a3a3a 20px); }
.story__thumb-caption {
  font-family: var(--font-copy);
  font-style: italic;
  font-size: 14px;
  color: var(--color-text-muted);
  margin: -20px 0 32px;
}
.story__meta {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
  font-family: var(--font-copy);
  font-style: italic;
  font-size: 13px;
  color: var(--color-text-muted);
}
.story__heading {
  font-family: var(--font-copy);
  font-style: italic;
  font-weight: 600;
  font-size: clamp(28px, 4vw, 48px);
  margin: 0 0 16px;
}
.story__teaser {
  font-family: var(--font-copy);
  font-style: italic;
  font-size: clamp(16px, 1.6vw, 22px);
  color: #333;
  margin: 0 0 32px;
}
.story__tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 32px;
}
.story__tags a {
  font-size: 12px;
  font-family: var(--font-display);
  font-weight: 700;
  background: #d9d9d9;
  padding: 6px 14px;
  border-radius: 999px;
  color: var(--color-text-dark);
}
.story__tags a:hover { background: var(--color-link); color: #fff; }

/* Component: paragraph */
.c-paragraph { margin: 0 0 28px; }
.c-paragraph h3 {
  font-family: var(--font-copy);
  font-style: italic;
  font-weight: 600;
  font-size: 26px;
  margin: 0 0 10px;
}
.c-paragraph p {
  font-family: var(--font-copy);
  font-style: italic;
  font-size: 18px;
  line-height: 1.7;
  color: #222;
  margin: 0;
}

/* Component: video */
.c-video { margin: 0 0 32px; }
.c-video__frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #000;
}
.c-video__frame iframe {
  position: absolute; inset: 0; width: 100%; height: 100%; border: 0;
}
.c-video__title {
  font-family: var(--font-copy);
  font-style: italic;
  font-weight: 600;
  font-size: 15px;
  margin-top: 10px;
  color: var(--color-text-muted);
}

/* Component: image_carousel (unterstützt gemischt Bild- UND
   Video-Slides, Auto-Play mit pro-Slide einstellbarer "Showtime",
   Pfeile links/rechts AUSSERHALB des Bildes wie in Figma, sowie
   ein Punkte-Slider unterhalb der Bildunterschrift zum direkten
   Ansteuern eines Bildes.) */
.c-carousel { margin: 0 0 32px; }
.c-carousel__row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.c-carousel__viewport {
  position: relative;
  flex: 1;
  min-width: 0;
  aspect-ratio: 16/9;
  background: var(--color-card-bg);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.c-carousel__track {
  display: flex;
  height: 100%;
  transition: transform .35s ease;
}
.c-carousel__slide {
  min-width: 100%;
  height: 100%;
  background: #000;
}
.c-carousel__slide img { width: 100%; height: 100%; object-fit: cover; }
.c-carousel__slide iframe { width: 100%; height: 100%; border: 0; }
.c-carousel__placeholder { width: 100%; height: 100%; background: repeating-linear-gradient(45deg, #1a1a1a, #1a1a1a 10px, #222 10px, #222 20px); }
.c-carousel__caption {
  background: rgba(0, 16, 116, 0.65);
  color: #fff;
  text-align: center;
  font-family: var(--font-copy);
  font-style: italic;
  font-weight: 600;
  font-size: 13px;
  padding: 10px 16px;
}
.c-carousel__nav {
  flex: 0 0 auto;
  background: none;
  border: none;
  color: var(--color-white);
  cursor: pointer;
  font-size: 28px;
  line-height: 1;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.c-carousel__nav:hover { opacity: 0.7; }
.c-carousel__dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 10px;
}
.c-carousel__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.35);
  cursor: pointer;
  padding: 0;
}
.c-carousel__dot.is-active { background: var(--color-white); }

/* Component: single image
   HINWEIS: aspect-ratio 16/9 neu ergaenzt (vorher nur "width:100%"
   ohne feste Hoehe) - ohne feste Ziel-Flaeche hatte object-position
   (der "Bildausschnitt") hier gar keine sichtbare Wirkung, das
   Bild wurde nie beschnitten. Aendert das Erscheinungsbild
   bestehender "image"-Komponenten (feste 16:9-Flaeche statt freier
   Hoehe nach Bildseitenverhaeltnis). overflow:hidden neu, damit ein
   gezoomtes Bild (siehe renderFocusedImg) nicht ueber seinen Rahmen
   hinausquillt. */
.c-image { margin: 0 0 32px; overflow: hidden; border-radius: var(--radius-lg); }
.c-image img { border-radius: var(--radius-lg); width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.c-image__placeholder { border-radius: var(--radius-lg); width: 100%; aspect-ratio: 16/9; background: repeating-linear-gradient(45deg, #ddd, #ddd 10px, #ccc 10px, #ccc 20px); }
.c-image__title {
  font-family: var(--font-copy);
  font-style: italic;
  font-size: 14px;
  color: var(--color-text-muted);
  margin-top: 8px;
}

/* Component: story_teaser - Link auf eine andere Story, zeigt
   bewusst NUR deren Titel (siehe components.js renderStoryTeaser).
   Schmaler, klickbarer Streifen statt einer vollen Teaser-Card. */
.c-story-teaser { margin: 0 0 28px; }
.c-story-teaser__link {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: var(--radius-lg);
  padding: 16px 22px;
  transition: border-color .2s ease, transform .2s ease;
}
.c-story-teaser__link:hover { border-color: var(--color-link); transform: translateX(4px); }
.c-story-teaser__label {
  font-family: var(--font-copy);
  font-style: italic;
  font-size: 13px;
  color: var(--color-text-muted);
  white-space: nowrap;
}
.c-story-teaser__title {
  font-family: var(--font-copy);
  font-style: italic;
  font-weight: 600;
  font-size: 17px;
  color: var(--color-text-dark);
  flex: 1;
}
.c-story-teaser__arrow { color: var(--color-link); font-weight: 700; }
.c-story-teaser__missing {
  font-family: var(--font-copy);
  font-style: italic;
  font-size: 14px;
  color: #b00;
  background: #fdecec;
  border-radius: var(--radius-lg);
  padding: 14px 18px;
}

/* Component: unordered_list. Design-Element vor jedem Punkt: ueber
   CSS-Variablen steuerbar (Groesse/Farbe/Form), damit spaeter kein
   Eingriff in die Regel selbst noetig ist, nur die Variablen-Werte
   aendern. Aktuell: kleines ausgefuelltes Quadrat in der
   Link-Akzentfarbe. */
.c-list {
  margin: 0 0 28px;
  --list-bullet-size: 9px;
  --list-bullet-color: var(--color-link);
  --list-bullet-radius: 2px; /* 2px = leicht abgerundetes Quadrat, 50% = Kreis */
}
.c-list h3 {
  font-family: var(--font-copy);
  font-style: italic;
  font-weight: 600;
  font-size: 26px;
  margin: 0 0 10px;
}
.c-list__items {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.c-list__items li {
  position: relative;
  padding-left: 26px;
  font-family: var(--font-copy);
  font-style: italic;
  font-size: 18px;
  line-height: 1.6;
  color: #222;
}
.c-list__items li::before {
  content: "";
  position: absolute;
  left: 0;
  top: calc(0.5em + 2px);
  transform: translateY(-50%);
  width: var(--list-bullet-size);
  height: var(--list-bullet-size);
  background: var(--list-bullet-color);
  border-radius: var(--list-bullet-radius);
}

/* Component: keypoints (Paragraph-Variante fuer "das Wichtigste in
   Kuerze") - optisch klar als Box abgesetzt, damit sie nicht mit
   einer normalen Liste verwechselt wird: Akzent-Rahmen links, leicht
   getoenter Hintergrund. */
.c-keypoints {
  margin: 0 0 32px;
  background: #eef2ff;
  border-left: 4px solid var(--color-link);
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
  padding: 20px 26px;
}
.c-keypoints__head {
  font-family: var(--font-copy);
  font-style: italic;
  font-weight: 600;
  font-size: 20px;
  margin: 0 0 12px;
  color: var(--color-text-dark);
}
.c-keypoints__items {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.c-keypoints__items li {
  position: relative;
  padding-left: 24px;
  font-family: var(--font-copy);
  font-style: italic;
  font-weight: 600;
  font-size: 16px;
  color: #222;
}
.c-keypoints__items li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--color-link);
  font-weight: 700;
}

/* Component: paragraph_grid - zweispaltiges Layout, jede Spalte ist
   ein eigener, rekursiv gerenderter Komponenten-Container (siehe
   renderParagraphGrid in components.js) - kann JEDEN Story-
   Komponententyp enthalten. */
.c-paragraph-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  margin: 0 0 32px;
}
.c-paragraph-grid__col > *:last-child { margin-bottom: 0; }
@media (max-width: 720px) {
  .c-paragraph-grid { grid-template-columns: 1fr; }
}

/* ---------- Utility ---------- */
.empty-hint {
  color: #888;
  font-style: italic;
  padding: 40px 0;
  text-align: center;
}

@media (max-width: 860px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__badge { justify-self: start; }
  .site-footer .footer-columns { flex-direction: column; }
}
