/* Protius 2026: Textseiten (Datenschutz, Impressum und andere flexible Seiten,
   Standard-Templates, 404). Ruhiger blauer Seitenkopf, weiße Fläche, Fließtext
   mit max. ca. 70 Zeichen Zeilenlänge. Tokens und Bauteile aus protius-2026.css. */

/* ---------- Niedriger Seitenkopf ---------- */
.textkopf { padding-block: clamp(2rem, 1.25rem + 3vw, 3.75rem) clamp(2.75rem, 1.75rem + 4vw, 4.75rem); }
.textkopf h1 { max-width: 22ch; font-size: clamp(1.75rem, 1.05rem + 3.4vw, 3.5rem); overflow-wrap: break-word; hyphens: auto; }
.textkopf h1 :is(p, span) { margin: 0; max-width: none; font: inherit; color: inherit; }
.textkopf__lead { margin: 1rem 0 0; max-width: 40rem; font-size: var(--fs-3); line-height: 1.5; color: var(--on-dark-2); }

/* ---------- Textfläche ---------- */
.textseite { padding-block: clamp(2.5rem, 1.5rem + 4vw, 4.5rem) var(--section); }
.prosa { max-width: 42rem; color: var(--ink); overflow-wrap: break-word; }
.prosa > :first-child { margin-top: 0; }
.prosa > :last-child { margin-bottom: 0; }

/* Elementstile für beliebigen Redaktions-HTML (the_content, ACF-WYSIWYG) */
.prosa :where(p) { margin: 0 0 1.1em; max-width: none; }
.prosa :where(h1, h2) { margin: 2.5rem 0 1rem; font-size: var(--fs-4); line-height: 1.2; }
.prosa :where(h3) { margin: 2rem 0 .75rem; font-size: var(--fs-3); line-height: 1.3; letter-spacing: -.01em; }
.prosa :where(h4, h5, h6) { margin: 1.75rem 0 .5rem; font: 700 var(--fs-2)/1.4 var(--sans); letter-spacing: 0; color: var(--ink); }
.prosa :where(h2 + h3, h3 + h4) { margin-top: 1rem; }
.prosa :where(ul, ol) { margin: 0 0 1.25em; padding-left: 1.5rem; }
.prosa :where(ul) { list-style: disc; }
.prosa :where(ol) { list-style: decimal; }
.prosa :where(ul ul) { list-style: circle; }
.prosa :where(ul ul, ol ol, ul ol, ol ul) { margin: .5em 0 0; }
.prosa :where(li) { margin-bottom: .5em; padding-left: .25rem; }
.prosa :where(li)::marker { color: var(--blue); }
.prosa :where(a) { color: var(--blue); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .2em; overflow-wrap: anywhere; }
.prosa :where(a):hover { color: var(--navy-700); text-decoration-thickness: 2px; }
.prosa :where(strong, b) { font-weight: 700; }
.prosa :where(em, i) { font-style: normal; font-weight: 700; }
.prosa :where(hr) { margin: 2.5rem 0; border: 0; border-top: 1px solid var(--line); }
.prosa :where(blockquote) { margin: 1.5rem 0; padding: 1rem 1.25rem; background: var(--paper-2); border-radius: var(--r-1); }
.prosa :where(blockquote) > :last-child { margin-bottom: 0; }
.prosa :where(img) { max-width: 100%; height: auto; border-radius: var(--r-1); }
.prosa :where(figure) { margin: 1.5rem 0; }
.prosa :where(figcaption) { margin-top: .5rem; font-size: var(--fs-0); color: var(--ink-2); }
.prosa :where(address) { font-style: normal; margin-bottom: 1.1em; }
.prosa :where(code) { font-size: .9em; }
.prosa :where(.alignleft) { float: left; margin: .25rem 1.5rem 1rem 0; }
.prosa :where(.alignright) { float: right; margin: .25rem 0 1rem 1.5rem; }
.prosa :where(.aligncenter) { display: block; margin-inline: auto; }

/* Tabellen: bei schmalen Bildschirmen innerhalb der Tabelle scrollen statt der Seite */
.prosa :where(table) { display: block; width: 100%; max-width: 100%; overflow-x: auto; margin: 1.5rem 0; border-collapse: collapse; font-size: var(--fs-1); line-height: 1.45; -webkit-overflow-scrolling: touch; }
.prosa :where(th, td) { padding: .7rem .9rem; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); min-width: 8rem; }
.prosa :where(th) { font-weight: 700; color: var(--ink); background: var(--paper-2); }
.prosa :where(td) { color: var(--ink-2); }
@media (min-width: 48rem) { .prosa :where(table) { display: table; } }

/* Hervorgehobener Kasten (Datenschutz: Verantwortlicher, Einwilligung) */
.prosa .info-box { margin: 1.25rem 0 1.5rem; padding: 1.25rem 1.5rem; background: var(--paper-2); border-radius: var(--r-2); }
.prosa .info-box p:last-child { margin-bottom: 0; }
.prosa .last-updated { margin-top: 3rem; padding-top: 1.25rem; border-top: 1px solid var(--line); font-size: var(--fs-1); color: var(--ink-2); }
/* Nummerierte Hauptabschnitte im Datenschutz mit Trennlinie */
.prosa--abschnitte > h2 { padding-top: 2rem; border-top: 1px solid var(--line); }
.prosa--abschnitte > h2:first-of-type { padding-top: 0; border-top: 0; }

/* Knopf, der wie ein Link aussieht (z. B. Cookie-Einstellungen öffnen) */
.linkknopf { display: inline; padding: 0; border: 0; background: none; font: inherit; color: var(--blue); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .2em; cursor: pointer; }
.linkknopf:hover { color: var(--navy-700); text-decoration-thickness: 2px; }

/* =========================================================
   Flexible Seiten (flexiblePage.php): Module aus ACF
   ========================================================= */
.fp-modul { padding-block: clamp(1.25rem, .75rem + 1.5vw, 2rem); }
.textkopf + .fp-modul, .textkopf + .fp-abstand + .fp-modul { padding-top: clamp(2.5rem, 1.5rem + 4vw, 4.5rem); }
main > .fp-modul:last-child { padding-bottom: var(--section); }
.fp-modul.section--tint, .fp-modul.section--dark { padding-block: clamp(3rem, 2rem + 4vw, 5.5rem); }
.fp-abstand { padding: 0; }

/* Überschriften-Felder: Redaktion setzt h1–h3 oder p; einheitlich als Abschnittsüberschrift */
.fp-titel :is(h1, h2, h3, h4) { margin: 0 0 1rem; font-size: var(--fs-5); line-height: 1.15; }
.fp-titel p { margin: 0 0 1rem; font: 800 var(--fs-5)/1.15 var(--sans); letter-spacing: -.015em; color: var(--blue); }
.section--dark .fp-titel p, .hero .fp-titel p { color: var(--white); }
.fp-untertitel :is(h1, h2, h3, h4, p) { margin: 0 0 .75rem; font: 700 var(--fs-3)/1.35 var(--sans); letter-spacing: 0; color: var(--ink); }
.prosa .fp-titel :is(h1, h2, h3, h4), .prosa .fp-titel p { font-size: var(--fs-4); margin-top: 0; }

/* Seiteneinstieg (blau, Bild + Text) */
.fp-einstieg__grid { display: grid; gap: 2rem; align-items: center; }
.fp-einstieg__bild img { width: 100%; height: auto; border-radius: var(--r-2); }
.fp-einstieg__text :is(h1, h2, h3) { margin-bottom: 1rem; color: var(--white); }
.fp-einstieg__text h1 { font-size: clamp(2rem, 1.4rem + 2.6vw, 3.25rem); }
.fp-einstieg__text p { color: var(--on-dark-2); }
.fp-einstieg__text a:not(.btn) { color: var(--white); }
.fp-einstieg__text .btn { margin-top: .75rem; }
@media (min-width: 56rem) { .fp-einstieg__grid { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); column-gap: clamp(3rem, 6vw, 5rem); } }

/* Bild und Text */
.fp-bildtext__grid { display: grid; gap: 2rem; align-items: start; }
.fp-bildtext__bild img { width: 100%; height: auto; border-radius: var(--r-2); }
.fp-bildtext .btn { margin-top: 1.25rem; }
@media (min-width: 56rem) { .fp-bildtext__grid { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); column-gap: clamp(3rem, 6vw, 5rem); } }

/* Angebots-Karten, Auszeichnungen, Beiträge: Kartenraster */
.fp-karten { display: grid; gap: 1rem; margin-top: 1.5rem; }
@media (min-width: 46rem) { .fp-karten { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; } }
@media (min-width: 64rem) { .fp-karten--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.fp-karte { min-width: 0; padding: clamp(1.25rem, 1rem + 1vw, 1.75rem); background: var(--paper-2); border-radius: var(--r-2); }
.section--tint .fp-karte { background: var(--white); }
.fp-karte__icon { width: 3rem; height: 3rem; margin-bottom: 1rem; object-fit: contain; }
.fp-karte__bild { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; margin-bottom: 1rem; border-radius: var(--r-1); }
.fp-karte__meta { display: block; margin-bottom: .375rem; font-size: var(--fs-0); color: var(--ink-2); }
.fp-karte h3 { margin-bottom: .5rem; font-size: var(--fs-3); line-height: 1.3; }
.fp-karte .prosa { font-size: var(--fs-1); }
.fp-karte .btn { margin-top: 1rem; }

/* Aufklappbare Karten und Checklisten (details/summary statt Skript) */
.fp-auf { background: var(--paper-2); border-radius: var(--r-2); }
.section--tint .fp-auf { background: var(--white); }
.fp-auf > summary { display: flex; align-items: center; gap: 1rem; min-height: 3rem; padding: 1.25rem 1.5rem; cursor: pointer; list-style: none; font: 700 var(--fs-2)/1.35 var(--sans); color: var(--blue); }
.fp-auf > summary::-webkit-details-marker { display: none; }
.fp-auf > summary::after { content: "+"; margin-left: auto; flex: none; font: 300 1.6rem/1 var(--sans); color: var(--blue); transition: transform .2s; }
.fp-auf[open] > summary::after { transform: rotate(45deg); }
.fp-auf > summary :is(h1, h2, h3, h4, p) { margin: 0; font: inherit; color: inherit; letter-spacing: 0; }
.fp-auf > summary img { width: 2.5rem; height: 2.5rem; object-fit: contain; flex: none; }
.fp-auf__inhalt { padding: 0 1.5rem 1.5rem; }
.fp-auf--gross > summary { font: 800 var(--fs-3)/1.3 var(--sans); }
.fp-liste__punkt + .fp-liste__punkt { margin-top: 1.25rem; padding-top: 1.25rem; border-top: 1px solid var(--line); }
.fp-liste__punkt h4 { margin-bottom: .375rem; }

/* Handlungsaufforderung (blau) */
.fp-cta__in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.5rem 3rem; }
.fp-cta .fp-titel :is(h1, h2, h3, h4, p) { margin: 0; max-width: 24ch; color: var(--white); font-size: var(--fs-4); }

/* FAQ aus ACF: Antwort ist Redaktions-HTML */
.fp-faq .faq details > div > :last-child { margin-bottom: 0; }

/* =========================================================
   404, Listen (Archiv, Suche)
   ========================================================= */
.fehlerseite__links { display: grid; gap: .75rem; margin: 2rem 0 2.5rem; padding: 0; list-style: none; }
.fehlerseite__links li { margin: 0; padding: 0; }
.fehlerseite__links a { display: flex; flex-direction: column; gap: .125rem; padding: 1rem 1.25rem; background: var(--paper-2); border-radius: var(--r-2); text-decoration: none; color: var(--ink); }
.fehlerseite__links a:hover { background: #e4e3e4; }
.fehlerseite__links strong { font-size: var(--fs-3); font-weight: 800; color: var(--blue); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: .2em; text-decoration-color: rgba(15,76,129,.3); }
.fehlerseite__links span { font-size: var(--fs-1); color: var(--ink-2); }
@media (min-width: 40rem) { .fehlerseite__links { grid-template-columns: 1fr 1fr; } }

.beitragsliste { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.25rem; max-width: 42rem; }
.beitrag { padding-bottom: 1.25rem; border-bottom: 1px solid var(--line); }
.beitrag h2 { margin-bottom: .5rem; font-size: var(--fs-3); line-height: 1.3; }
.beitrag h2 a { text-decoration: none; }
.beitrag h2 a:hover { text-decoration: underline; }
.beitrag__meta { font-size: var(--fs-0); color: var(--ink-2); margin-bottom: .5rem; }
.textseite .nav-links, .textseite .post-navigation { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; margin-top: 2.5rem; max-width: 42rem; }
.textseite .nav-links a { font-weight: 700; color: var(--blue); }
.textseite .search-form { display: flex; gap: .5rem; max-width: 30rem; margin-top: 1rem; }
.textseite .search-form label { flex: 1; }
.textseite .search-field { width: 100%; min-height: 3rem; padding: .7rem .9rem; border: 1.5px solid var(--line); border-radius: var(--r-1); }
.textseite .search-submit { min-height: 3rem; padding: .7rem 1.2rem; border: 0; border-radius: var(--r-1); background: var(--blue); color: var(--white); font-weight: 700; cursor: pointer; }

/* Live-Fix 08.10.: alte Abstandsmodule erzeugen im neuen Raster nur Leerflächen */
.fp-abstand { display: none !important; }
.textkopf + .fp-abstand + .fp-modul { padding-top: clamp(2.5rem, 1.5rem + 4vw, 4.5rem); }
.fp-titel:empty { display: none; }
