/*!
 * THK Verlag — Frontend-Stylesheet für CMS-Block-Renderer
 * v0.16.3.0 — CI-Refit Welle 2
 *
 * Stylt die `.ghos-*`-Klassen, die der BlockRenderer im Frontend
 * ausgibt. Bislang hatte das Frontend-Render-Output kein eigenes
 * CSS — die Klassen wurden ausgegeben, aber nicht gestylt. Damit
 * standen Pflichttext-Seiten und alle anderen CMS-Inhalte ohne
 * Container, ohne Akkordeon-Optik, ohne Hierarchie auf der Seite.
 *
 * Diese Datei deckt die für Pflichttext-Seiten kritischen Klassen
 * ab. Weitere ghos-Klassen (Cards, Tiles, Hero-Varianten, Galerie)
 * kommen in Folge-Wellen.
 *
 * Designsystem-Tokens kommen aus site.css (`--thk-papier`,
 * `--thk-tinte`, `--thk-bordeaux`, …).
 */

/* ══════════════════════════════════════════════════════════════════
 * BLOCK-WRAPPER (Section, Container, Abstände)
 * ══════════════════════════════════════════════════════════════════ */

/* Jeder Block ist eine eigene Section. Standard-Abstand oben/unten,
   damit aufeinanderfolgende Blocks atmen — aber nicht zu viel.
   v0.16.4.0: Abstand reduziert (war padding-block: var(--space-7))
   — auf den Pflichttext-Seiten wirkte das viel zu locker. */
.ghos-block {
  padding-block: var(--space-5);
}
.ghos-block:first-child {
  padding-top: var(--space-6);
}
.ghos-block + .ghos-block {
  padding-top: 0;
}

/* Container: Standardbreite, schmal-Variante für Lesefluss. */
.ghos-container {
  max-width: var(--content-max);
  margin-inline: auto;
  padding-inline: var(--space-5);
}
.ghos-container--schmal {
  max-width: var(--content-narrow);    /* 740px — Lesefluss-Breite */
}

/* Section-Hintergrund-Optionen aus dem BlockRegistry. Werden vom
   Renderer als modifier-Klasse oder via section_hintergrund-Attribut
   am Section-Element gesetzt. Aktuell setzt der Renderer die noch
   nicht durchgehend — die Klassen sind hier verfügbar, sobald er es
   tut. */
.ghos-block--bg-papier        { background: var(--thk-papier); }
.ghos-block--bg-papier-tief   { background: var(--thk-papier-tief); }
.ghos-block--bg-papier-warm   { background: var(--thk-papier-warm); }
.ghos-block--bg-papier-card   { background: var(--thk-papier-card); }
.ghos-block--bg-tinte         { background: var(--thk-tinte); color: var(--thk-papier); }

/* ══════════════════════════════════════════════════════════════════
 * BLOCK-HEADLINES (h2, Lead, Kicker)
 * ══════════════════════════════════════════════════════════════════ */

/* Block-Hauptüberschrift. Vor v0.16.3.0 ohne CSS — fiel auf
   browser-default H2 (Times-Roman, fett). Jetzt: Serif, Tinte,
   großzügig. */
.ghos-h2 {
  font-family: var(--thk-serif);
  color: var(--thk-tinte);
  font-weight: 500;
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0 0 var(--space-5) 0;
}
.ghos-h2--zentriert {
  text-align: center;
}

/* Kicker — kleines Label über der H2/H3. Sans, all-caps, weit. */
.ghos-kicker,
.ghos-hero__kicker {
  font-family: var(--thk-sans);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 600;
  color: var(--thk-bordeaux);
  margin: 0 0 var(--space-3) 0;
}

/* Lead-Absatz nach H2. Etwas größer, ruhiger als Body. */
.ghos-lead {
  font-family: var(--thk-sans);
  font-size: 1.08rem;
  line-height: 1.65;
  color: var(--thk-text-mute-stark);
  margin: 0 0 var(--space-5) 0;
  max-width: 60ch;
}

/* ══════════════════════════════════════════════════════════════════
 * BLOCK-PROSE (Body-Text aus WYSIWYG, Akkordeon-Antworten etc.)
 * ══════════════════════════════════════════════════════════════════ */

.ghos-prose {
  font-family: var(--thk-sans);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--thk-text);
}
.ghos-prose > * + * {
  margin-top: var(--space-4);
}
/* Adressblock-Pattern: ein <p> mit <br>-Zeilen soll NICHT auseinander-
   driften — kompakter Zeilenabstand innerhalb des <p>, normaler Abstand
   zum nächsten Absatz. */
.ghos-prose p { margin: 0 0 var(--space-4) 0; }
.ghos-prose p:last-child { margin-bottom: 0; }
.ghos-prose h2 {
  font-family: var(--thk-serif);
  font-size: 1.6rem;
  line-height: 1.2;
  color: var(--thk-tinte);
  font-weight: 500;
  margin: var(--space-6) 0 var(--space-3) 0;
}
.ghos-prose h3 {
  font-family: var(--thk-sans);
  font-size: 1.05rem;
  line-height: 1.3;
  color: var(--thk-tinte);
  font-weight: 600;
  margin: var(--space-5) 0 var(--space-2) 0;
}
.ghos-prose h4 {
  font-family: var(--thk-sans);
  font-size: 0.95rem;
  color: var(--thk-tinte);
  font-weight: 600;
  margin: var(--space-4) 0 var(--space-2) 0;
}
.ghos-prose ul,
.ghos-prose ol {
  margin: 0 0 var(--space-4) 0;
  padding-left: var(--space-5);
}
.ghos-prose li {
  margin-bottom: var(--space-2);
}
.ghos-prose li:last-child { margin-bottom: 0; }
.ghos-prose strong { font-weight: 600; color: var(--thk-tinte); }
.ghos-prose em { font-style: italic; }
.ghos-prose a {
  color: var(--thk-bordeaux);
  text-decoration: underline;
  text-decoration-color: rgba(122, 44, 30, 0.3);
  text-underline-offset: 3px;
}
.ghos-prose a:hover {
  color: var(--thk-bordeaux-tief);
  text-decoration-color: var(--thk-bordeaux);
}
.ghos-prose blockquote {
  margin: var(--space-5) 0;
  padding: var(--space-4) var(--space-5);
  border-left: 3px solid var(--thk-bordeaux);
  background: var(--thk-papier-warm);
  font-style: italic;
  color: var(--thk-text-mute-stark);
}
.ghos-prose small { font-size: 0.85rem; color: var(--thk-text-mute); }

/* ══════════════════════════════════════════════════════════════════
 * AKKORDEON-KOMPONENTE (mit Icon-Kreis links, nach Mockup)
 * ══════════════════════════════════════════════════════════════════ */

/* Wrapper: List ohne Bullet, mit klaren Trennlinien zwischen Items. */
.ghos-akkordeon {
  border-top: 1px solid var(--thk-akkordeon-line);
  margin-top: var(--space-3);
}

/* Item: <details>-Element, eigene Trennlinie unten. */
.ghos-akkordeon__item {
  border-bottom: 1px solid var(--thk-akkordeon-line);
  background: transparent;
}

/* Summary (klickbare Frage-Zeile). Cursor-Pointer, Hover-State,
   Icon-Kreis links via ::before. */
.ghos-akkordeon__frage {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-4) 0;
  font-family: var(--thk-sans);
  font-size: 1.02rem;
  font-weight: 600;
  color: var(--thk-tinte);
  cursor: pointer;
  list-style: none;
  position: relative;
  padding-right: var(--space-6);  /* Platz für Chevron rechts */
  transition: color 0.15s ease;
}
/* v0.16.4.0 — Browser-Default-Marker auf <summary> in allen Browsern
   sicher unterdrücken. Vorher nur ::-webkit-details-marker — Firefox
   und Safari haben weitere Marker-Pseudos, die das graue Chevron-Symbol
   neben dem Text gezeigt haben. */
.ghos-akkordeon__frage::-webkit-details-marker { display: none !important; }
.ghos-akkordeon__frage::marker { content: ""; }
.ghos-akkordeon__item > summary::-webkit-details-marker { display: none !important; }
.ghos-akkordeon__item > summary::marker { content: ""; }
.ghos-akkordeon__item > summary { list-style: none; list-style-type: none; }

/* Icon-Kreis links — Mockup-typisch. Standardmäßig ein "+"-Symbol,
   bei offenem Item ein "−"-Symbol. Erzeugt über ::before. */
.ghos-akkordeon__frage::before {
  content: "+";
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--thk-akkordeon-icon-bg);
  color: var(--thk-akkordeon-icon-color);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  font-weight: 500;
  line-height: 1;
  transition: background 0.2s ease, transform 0.2s ease;
}
.ghos-akkordeon__item[open] > .ghos-akkordeon__frage::before {
  content: "−";
  background: var(--thk-bordeaux);
  color: var(--thk-papier);
}

/* v0.16.4.0 — Chevron rechts ENTFERNT. Das +/−-Icon links ist ausreichendes
   visuelles Signal. Das ::after-Pseudo wurde von Jens (zu Recht) als
   unnötiges Beiwerk markiert, das im Screenshot wie ein graues `×` aussah. */

.ghos-akkordeon__frage:hover {
  color: var(--thk-bordeaux);
}
.ghos-akkordeon__frage:hover::before {
  background: var(--thk-bordeaux-hell);
  color: var(--thk-papier);
}

/* Antwort-Container: Body-Text via .ghos-prose, Einrückung links,
   Abstand unten. */
.ghos-akkordeon__antwort {
  padding: 0 0 var(--space-5) calc(28px + var(--space-4));
  /* Einrückung = Icon-Breite + Gap, damit Antwort unter der Frage
     bündig zum Frage-Text steht und nicht zum Icon. */
}

/* ══════════════════════════════════════════════════════════════════
 * SEITEN-TITEL (.thk-seite-titel) — Mockup-Großformat zentriert
 * ══════════════════════════════════════════════════════════════════ */

/* v0.16.3.0 — Mockup zeigt H1 zentriert in sehr großer Serif. Die
   Klasse existierte schon, wurde aber linksbündig und mit nur 2.4rem
   gerendert. Jetzt: zentriert, deutlich größer, mehr Atemraum. */
.thk-seite-titel {
  font-family: var(--thk-serif);
  font-size: clamp(2.8rem, 6vw, 4.8rem);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--thk-tinte);
  text-align: center;
  margin: var(--space-8) auto var(--space-6) auto;
  max-width: 14ch;     /* schmal halten, damit lange Titel umbrechen
                          und das Mockup-Bild beibehalten */
}
.thk-seite-untertitel {
  text-align: center;
  font-family: var(--thk-sans);
  font-size: 1.05rem;
  color: var(--thk-text-mute);
  max-width: 60ch;
  margin: 0 auto var(--space-7) auto;
}

/* ══════════════════════════════════════════════════════════════════
 * RESPONSIVE-ANPASSUNGEN
 * ══════════════════════════════════════════════════════════════════ */

@media (max-width: 720px) {
  .ghos-block { padding-block: var(--space-6); }
  .ghos-container { padding-inline: var(--space-4); }
  .thk-seite-titel { font-size: clamp(2rem, 9vw, 3rem); max-width: none; }
  .ghos-h2 { font-size: clamp(1.5rem, 5vw, 2rem); }
  .ghos-akkordeon__antwort { padding-left: calc(28px + var(--space-3)); }
}

/* Hinweis (v0.16.4.0): Token-Klassen-Modifier (.ghos-block--card-bg-*,
   .ghos-block--container-*, .ghos-block--padding-*, .ghos-prose-heading--*)
   und das .legal-page-Komponenten-CSS für zweispaltige Pflichttextseiten
   liegen in ghos-blocks-full.css, das nach dieser Datei geladen wird.
   Diese Datei hier (ghos-frontend.css) bleibt der Owner der Basis-Hülle:
   .ghos-block-Wrapper, .ghos-container, .ghos-h2, .ghos-akkordeon,
   .ghos-prose, .thk-seite-titel. */
