/* ============================================================
   WordPress-Ergänzungen zur Gestaltung aus der HTML-Fassung:
   Inhaltsbreiten, Standardblöcke (Bild, Galerie, Zitat, Buttons, Datei …),
   Blockmuster und datenschutzfreundliche Videos.
   ============================================================ */

/* ---------- Inhaltsbereich: Lesebreite, weite und volle Breite ---------- */
.entry-content.is-layout-constrained { padding-inline: var(--gutter); }

/* Vorlage „Breite Seite“: volle Breite, Lesetext links und schmal */
.al-wide > :is(p, ul, ol, h2, h3, h4, blockquote, .wp-block-quote, .wp-block-verse, .wp-block-file, .audio, .wp-block-table) { max-width: 760px; }
.al-wide > .alignfull { margin-inline: calc(50% - 50vw); }
.al-wide > .alignleft { float: left; margin: .3em 1.6em 1em 0; max-width: min(50%, 360px); }
.al-wide > .alignright { float: right; margin: .3em 0 1em 1.6em; max-width: min(50%, 360px); }
.al-wide > h2 { margin-top: 2.2em; }
.al-wide > h2:first-child { margin-top: 0; }
.entry-content.is-layout-constrained > :not(.alignwide):not(.alignfull):not(.alignleft):not(.alignright) { max-width: 720px; margin-inline: auto; }
.entry-content.is-layout-constrained > .alignwide { max-width: 1180px; margin-inline: auto; }
.entry-content > .alignfull { margin-inline: calc(-1 * var(--gutter)); max-width: none; }
.entry-content.is-layout-constrained > .alignleft { float: left; margin: .3em 1.6em 1em max(0px, calc((100% - 720px) / 2)); max-width: min(50%, 360px); }
.entry-content.is-layout-constrained > .alignright { float: right; margin: .3em max(0px, calc((100% - 720px) / 2)) 1em 1.6em; max-width: min(50%, 360px); }
.entry-content::after { content: ""; display: table; clear: both; }
.prose > .alignwide, .prose > .alignfull { margin-top: 2.2em; }
.prose > .alignwide + *, .prose > .alignfull + * { margin-top: 2.2em; }
.has-text-align-center { text-align: center; }
.has-text-align-right { text-align: right; }
.aligncenter { margin-inline: auto; text-align: center; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Inhalt der Startseite unterhalb der festen Abschnitte */
.al-front-content { padding-block: clamp(48px, 7vw, 96px) 0; }
.al-front-content > * + * { margin-top: clamp(48px, 7vw, 96px); }

/* Buchseite: Text neben dem Cover, weitere Abschnitte darunter */
.work-body > *:first-child { margin-top: 0; }
.al-book-more > h2:first-child, .al-book-more > .wp-block-heading:first-child { margin-top: 0; }

/* Seite mit Inhaltsverzeichnis: Abschnitte durch Abstand trennen */
.al-toc-content > h2 { margin-top: 2.4em; }
.al-toc-content > h2:first-child { margin-top: 0; }

/* ---------- Bilder und Galerien ---------- */
.prose .wp-block-image { margin-block: 2em; }
.prose .wp-block-image img { height: auto; }
.prose .wp-block-image.is-style-rounded img { border-radius: 9999px; }
.prose .wp-block-image figcaption, .prose .wp-element-caption { font-family: var(--font-ui); font-size: .85rem; color: var(--fg-3); margin-top: 10px; text-align: left; }
.prose .wp-block-image.aligncenter figcaption { text-align: center; }
/* Den Bildabstand der Galerie nicht überschreiben: WordPress berechnet daraus die Bildbreiten (sonst bricht die Galerie um) */
.prose .wp-block-gallery { margin-block: 2em; }
.prose .wp-block-gallery figure { margin: 0; }
.prose .wp-block-gallery.has-nested-images figure.wp-block-image img { max-height: none; width: 100%; height: 100%; object-fit: cover; border-radius: var(--r-sm); margin: 0; }
.prose .wp-block-gallery.has-nested-images figure.wp-block-image figcaption { font-size: .78rem; }
.wp-block-image.is-style-al-cover img, .prose .wp-block-image.is-style-al-cover img { border-radius: 4px; box-shadow: var(--cover-shadow); width: auto; max-width: 100%; }

/* ---------- Zitate ---------- */
.prose .wp-block-quote cite, .prose blockquote cite { display: block; margin-top: .7em; font-family: var(--font-ui); font-size: .85rem; font-style: normal; color: var(--fg-3); }
.prose .wp-block-quote p + p { margin-top: .8em; }
.prose blockquote.voice, .prose .wp-block-quote.voice, .prose .wp-block-quote.is-style-al-voice { margin: 0; padding: 0; border: 0; font-style: normal; color: var(--fg); }
.voice cite { display: block; margin-top: 12px; font-family: var(--font-ui); font-size: .85rem; font-style: normal; color: var(--fg-3); }
.voice cite a { color: var(--fg-2); }
.prose .wp-block-quote.is-style-al-voice { padding: 22px 0 0; border-top: 1px solid var(--border); }
.prose .wp-block-pullquote { margin: 2em 0; padding: 24px 0; border-block: 1px solid var(--border); text-align: left; font-size: 1.35rem; }
.prose .wp-block-pullquote blockquote { margin: 0; padding: 0; border: 0; color: var(--fg); }
.prose .voice-grid { margin-block: 2em; }
/* Gruppen-Block „Stimmen“: Zitate nebeneinander */
.voice-grid > .wp-block-quote, .voice-grid > blockquote,
.prose .voice-grid > .wp-block-quote.voice, .prose .voice-grid > blockquote.voice { flex: 1 1 320px; background: var(--bg); padding: 26px 26px 24px; margin: 0; min-width: 0; border: 0; }

/* ---------- Buttons ---------- */
.wp-block-buttons { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.prose .wp-block-buttons { margin-top: 1.6em; }
.wp-block-button { margin: 0; }
.wp-block-button__link, .prose .wp-block-button__link {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 9px 18px; border-radius: 10px;
  border: 1px solid transparent; font-family: var(--font-ui); font-weight: 500; font-size: .95rem; line-height: 1.3; text-decoration: none;
  background: var(--btn-bg); color: var(--btn-fg); box-shadow: var(--shadow-sm); transition: transform 160ms var(--ease-out), background-color .2s ease, border-color .2s ease;
}
.wp-block-button.is-style-al-secondary .wp-block-button__link, .wp-block-button.is-style-outline .wp-block-button__link,
.prose .wp-block-button.is-style-al-secondary .wp-block-button__link, .prose .wp-block-button.is-style-outline .wp-block-button__link { background: var(--bg); color: var(--fg); border-color: var(--border-2); box-shadow: none; }
.wp-block-button.is-style-al-ghost .wp-block-button__link, .prose .wp-block-button.is-style-al-ghost .wp-block-button__link { background: transparent; color: var(--fg-2); border-color: transparent; box-shadow: none; padding-inline: 10px; }
.wp-block-button__link:active { transform: scale(.97); }
@media (hover: hover) and (pointer: fine) {
  .wp-block-button.is-style-al-secondary .wp-block-button__link:hover, .wp-block-button.is-style-outline .wp-block-button__link:hover { border-color: var(--fg-3); }
  .wp-block-button.is-style-al-ghost .wp-block-button__link:hover { color: var(--fg); background: var(--bg-3); }
}

/* ---------- Datei (z. B. Leseprobe als PDF) ---------- */
.prose .wp-block-file { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; padding: 14px 16px; border: 1px solid var(--border); border-radius: var(--r); background: var(--bg-2); font-family: var(--font-ui); font-size: .98rem; }
.prose .wp-block-file a:not(.wp-block-file__button) { color: var(--fg); text-decoration: none; font-weight: 500; }
.prose .wp-block-file .wp-block-file__button { display: inline-flex; align-items: center; height: 34px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--border-2); background: var(--bg); color: var(--fg); font-size: .875rem; text-decoration: none; }
.prose .wp-block-file__embed { display: none; }

/* ---------- Trenner, Tabellen, Listen, Spalten ---------- */
.prose .wp-block-separator { border: 0; border-top: 1px solid var(--border); margin: 2.4em auto; opacity: 1; }
.prose .wp-block-table { margin-block: 2em; overflow-x: auto; }
.prose .wp-block-table table { border: 0; }
.prose .wp-block-table :is(td, th) { border: 0; border-bottom: 1px solid var(--border); }
.prose .wp-block-table thead { border-bottom: 1px solid var(--border-2); }
/* Abstand zwischen Beitragskopf und Text, wenn kein Beitragsbild da ist */
.article-head + .entry-content { padding-top: clamp(28px, 4vw, 44px); }
.prose .wp-block-table figcaption { font-family: var(--font-ui); font-size: .85rem; color: var(--fg-3); }
.prose .wp-block-columns { margin-block: 2em; gap: 24px; }
.prose .wp-block-column > * + * { margin-top: .9em; }
.prose .wp-block-column figure { margin: 0; }
.prose .wp-block-media-text { margin-block: 2em; gap: 0; }
.prose .wp-block-media-text__content > * + * { margin-top: .9em; }
.prose .wp-block-video { margin-block: 1.6em; }
.prose .wp-block-video figcaption { font-family: var(--font-ui); font-size: .85rem; color: var(--fg-3); margin-top: 10px; }
.prose .wp-block-group > * + *, .prose .wp-block-group__inner-container > * + * { margin-top: 1.1em; }
.prose .wp-block-verse, .prose pre.wp-block-verse { font-family: var(--font-serif); font-style: italic; white-space: pre-wrap; padding-left: 22px; border-left: 2px solid var(--border-2); background: none; }
.prose .is-style-al-lead, .prose p.lead { font-size: clamp(1.25rem, 1.7vw, 1.45rem); line-height: 1.5; }
.prose .has-small-font-size, .prose .has-klein-font-size { font-size: .9rem; }

/* Buttons und Video-Vorschauen aus der HTML-Fassung innerhalb des Lesetexts (Linkfarbe des Texts nicht übernehmen) */
.prose a.btn { text-decoration: none; }
.prose a.btn-primary { color: var(--btn-fg); }
.prose a.btn-secondary { color: var(--fg); }
.prose a.btn-ghost { color: var(--fg-2); }
.prose a.yt { color: #fff; text-decoration: none; }

/* ---------- Bausteine aus der HTML-Fassung innerhalb des Lesetexts ---------- */
.prose :is(.event-list, .past-list, .al-works, .voice-grid, .card, .grid, .cta-band, .section-head, .press-item, .sidecard, .notice, .kv, .chips, .about-grid, .audio) { font-family: var(--font-ui); font-size: 1rem; line-height: 1.6; }
.prose .voice-grid .voice, .prose .voice-grid .wp-block-quote { font-family: var(--font-serif); font-size: 1.2rem; line-height: 1.5; }
.entry-content :is(.card, .cta-band, .section-head, .press-item, .sidecard, .event, .notice, .about-grid) :is(h2, h3, h4) { margin: 0; }
.entry-content :is(.card, .event, .sidecard, .section-head, .cta-band) a:not(.btn):not(.wp-block-button__link):not(.wp-block-file__button) { color: inherit; }
.entry-content .card a.card-link, .entry-content .event a { text-decoration: none; }
.entry-content :is(.card, .press-item, .about-grid, .sidecard) figure { margin: 0; }
.entry-content .card-media img, .entry-content .card .wp-block-image img { width: 100%; height: 100%; max-height: none; object-fit: cover; border-radius: 0; margin: 0; }
.entry-content .card .wp-block-buttons { margin-top: 8px; }
.entry-content .card-body > * + * { margin-top: 0; }
.entry-content .cta-band .wp-block-buttons, .entry-content .section-head .wp-block-buttons { margin-top: 0; }
.entry-content .section-head h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); }
.entry-content .about-grid h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); }
.entry-content .about-grid p.lead { margin-top: 16px; }
.entry-content .about-grid p.muted { margin-top: 16px; }
.entry-content .about-grid .wp-block-buttons { margin-top: 24px; }
.entry-content .about-grid img { width: 100%; max-height: none; border-radius: var(--r-lg); box-shadow: var(--shadow); }
.entry-content .press-item img { max-height: none; width: 100%; border-radius: var(--r-sm); border: 1px solid var(--border); }
.entry-content .press-item h3 { font-size: 1.3rem; }
.entry-content .press-item > div > * + * { margin-top: 10px; }
.entry-content .sidecard > * + * { margin-top: 10px; }
.entry-content .sidecard h3 { font-size: 1rem; }
.entry-content .sidecard p { font-size: .95rem; }
.entry-content .past-list { padding-left: 0; }
.entry-content .past-list li + li { margin-top: 0; }
.entry-content .event-list, .entry-content .al-works { margin-block: 1.6em; }
.al-contact-side > * + * { margin-top: 0; }
.al-contact-side .sidecard h3 { margin: 0 0 12px; }
.al-contact-side .wp-block-buttons { margin-top: 12px; }
.cover--empty { aspect-ratio: 2 / 3; }

/* Abschnitt in voller Breite mit hellem Hintergrund (Blockmuster „Abschnitt hell hinterlegt“) */
.prose .al-band { background: var(--bg-2); border-block: 1px solid var(--border); padding: clamp(36px, 5vw, 64px) var(--gutter); }
.prose .al-band > * + * { margin-top: 1.1em; }

/* ---------- Videos fremder Plattformen: erst nach Klick laden ---------- */
.al-embed { margin-block: 2em; }
.al-consent { position: relative; aspect-ratio: 16 / 9; display: grid; place-items: center; padding: 20px; border-radius: var(--r); background: var(--bg-3); border: 1px solid var(--border); text-align: center; font-family: var(--font-ui); overflow: hidden; }
.al-embed--portrait .al-consent { aspect-ratio: 9 / 16; max-width: 380px; }
.al-consent-inner { display: grid; gap: 10px; justify-items: center; max-width: 42ch; }
.al-consent-title { font-weight: 500; font-size: 1rem; line-height: 1.35; color: var(--fg); }
.al-consent-note { font-size: .8rem; color: var(--fg-3); line-height: 1.45; }
.al-consent.is-loaded { padding: 0; background: #000; border-color: transparent; }
.al-consent iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.prose .al-embed figcaption { font-family: var(--font-ui); font-size: .85rem; color: var(--fg-3); margin-top: 10px; }
.wp-block-embed__wrapper iframe { max-width: 100%; }

/* ---------- Ältere Inhalte aus dem klassischen Editor (Bilder im Absatz, Bildunterschriften) ---------- */
.prose img.alignleft, .prose .wp-caption.alignleft { float: left; margin: .3em 1.5em 1em 0; max-width: 50%; }
.prose img.alignright, .prose .wp-caption.alignright { float: right; margin: .3em 0 1em 1.5em; max-width: 50%; }
.prose img.aligncenter, .prose .wp-caption.aligncenter { display: block; margin-inline: auto; }
.prose p img { border-radius: var(--r-sm); height: auto; }
.entry-content .wp-caption { max-width: 100% !important; } /* WordPress schreibt die Breite fest ins HTML */
.prose .wp-caption img { border-radius: var(--r-sm); }
.prose .wp-caption-text, .prose .gallery-caption { font-family: var(--font-ui); font-size: .85rem; color: var(--fg-3); margin-top: 8px; }
.prose::after { content: ""; display: table; clear: both; }

/* ---------- Kopfzeile auf sehr schmalen Handys: etwas mehr Luft ---------- */
.brand { min-width: 0; }
.brand span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 400px) { .site-header .container { gap: 10px; } .header-actions { gap: 2px; } }

/* ---------- Blätternavigation ---------- */
.navigation.pagination { margin-top: 32px; }
.nav-links { display: flex; flex-wrap: wrap; gap: 6px; font-size: .95rem; }
.nav-links .page-numbers { display: inline-flex; align-items: center; justify-content: center; min-width: 38px; height: 38px; padding: 0 10px; border: 1px solid var(--border); border-radius: 9px; text-decoration: none; color: var(--fg-2); }
.nav-links .page-numbers.current { color: var(--fg); background: var(--bg-3); }

/* ---------- Kopfzeile: Menüpunkte nicht umbrechen; bei mittlerer Fensterbreite das Menü-Symbol zeigen ---------- */
.nav a { white-space: nowrap; }
@media (max-width: 1099px) {
  .site-header .nav { display: none; }
  .site-header .menu-btn { display: inline-flex; }
}

/* Mit „hidden“ ausgeblendete Elemente (Blogfilter, Lightbox) bleiben ausgeblendet, auch wenn ihre Klasse eine Anzeigeart festlegt. */
[hidden] { display: none !important; }

/* Zitatwechsel auf der Startseite: Alle Zitate liegen übereinander in derselben Zelle. Der Kasten ist so hoch
   wie das längste Zitat, deshalb springt die Seite beim Wechsel nicht mehr. Kürzere Zitate stehen in der Mitte. */
.rotator { display: grid; min-height: 0; }
.rotator .voice { grid-area: 1 / 1; align-self: center; position: relative; inset: auto; opacity: 0; visibility: hidden; }
.rotator .voice.is-active { opacity: 1; visibility: visible; }

/* Kästen mit Lesungsformaten („Lesung anfragen“, Muster „Karten mit Bild“): Die Beschreibung wird vollständig
   gezeigt statt nach drei Zeilen abgeschnitten. Die Knöpfe stehen in allen Kästen einer Reihe auf gleicher Höhe. */
.format-card .card-text { display: block; -webkit-line-clamp: unset; line-clamp: none; overflow: visible; }
.format-card .card-body > .btn-row:last-child, .format-card .card-body > .wp-block-buttons:last-child { margin-top: auto !important; padding-top: 8px; }
