/*
Theme Name: Zukunftsdepot
Theme URI: https://zukunfts-depot.at/
Author: Andreas Greiner
Author URI: https://www.sparzinsen.at/
Description: Block-Theme für zukunfts-depot.at. Sachlich, schnell und barrierefrei, im Look von sparzinsen.at, mit Dark Mode, lokalen Schriften und frei kombinierbaren Sektionen als Block Patterns.
Requires at least: 6.6
Tested up to: 7.1
Requires PHP: 7.4
Version: 1.2.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: zukunftsdepot
Tags: block-patterns, full-site-editing, blog, accessibility-ready, dark-mode
*/

/* ==========================================================
   1. Farben im Dark Mode
   Die Farbpresets aus theme.json werden überschrieben, damit
   alle Blöcke automatisch mitwechseln.
   ========================================================== */

:root {
	--zd-logo-ring: #1d3664;
	--zd-logo-akzent: #2e8b57;
	--zd-logo-text: #1d3664;
	--zd-logo-tld: #006699;
	--zd-radius: var(--wp--custom--radius--mittel, 12px);
	--zd-radius-klein: var(--wp--custom--radius--klein, 6px);
	--zd-schatten: var(--wp--custom--schatten);
	--zd-fokus: #006699;
	color-scheme: light;
}

:root[data-theme="dunkel"] {
	--wp--preset--color--primaer: #a9cbed;
	--wp--preset--color--aktion: #5bb8e6;
	--wp--preset--color--flaeche: #1b2d4a;
	--wp--preset--color--flaeche-hell: #15243b;
	--wp--preset--color--akzent: #4cc082;
	--wp--preset--color--akzent-dunkel: #6fd29d;
	--wp--preset--color--akzent-hell: #15301f;
	--wp--preset--color--hintergrund: #0e1828;
	--wp--preset--color--hintergrund-dezent: #122037;
	--wp--preset--color--text: #e3e9f0;
	--wp--preset--color--text-dezent: #a9b4c2;
	--wp--preset--color--grau: #8f9bab;
	--wp--preset--color--linie: #26384f;
	--zd-logo-ring: #e3e9f0;
	--zd-logo-akzent: #4cc082;
	--zd-logo-text: #ffffff;
	--zd-logo-tld: #9cc3e6;
	--zd-fokus: #5bb8e6;
	--zd-schatten: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.25);
	color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
	:root:not([data-theme="hell"]) {
		--wp--preset--color--primaer: #a9cbed;
		--wp--preset--color--aktion: #5bb8e6;
		--wp--preset--color--flaeche: #1b2d4a;
		--wp--preset--color--flaeche-hell: #15243b;
		--wp--preset--color--akzent: #4cc082;
		--wp--preset--color--akzent-dunkel: #6fd29d;
		--wp--preset--color--akzent-hell: #15301f;
		--wp--preset--color--hintergrund: #0e1828;
		--wp--preset--color--hintergrund-dezent: #122037;
		--wp--preset--color--text: #e3e9f0;
		--wp--preset--color--text-dezent: #a9b4c2;
		--wp--preset--color--grau: #8f9bab;
		--wp--preset--color--linie: #26384f;
		--zd-logo-ring: #e3e9f0;
		--zd-logo-akzent: #4cc082;
		--zd-logo-text: #ffffff;
		--zd-logo-tld: #9cc3e6;
		--zd-fokus: #5bb8e6;
		--zd-schatten: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.25);
		color-scheme: dark;
	}
}

/* Buttons behalten im Dark Mode lesbaren Kontrast */
:root[data-theme="dunkel"] .wp-element-button,
:root[data-theme="dunkel"] .wp-block-button__link { color: #0e1828; }
@media (prefers-color-scheme: dark) {
	:root:not([data-theme="hell"]) .wp-element-button,
	:root:not([data-theme="hell"]) .wp-block-button__link { color: #0e1828; }
}

/* ==========================================================
   2. Grundlagen und Barrierefreiheit
   ========================================================== */

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
	overflow-x: hidden;
}

img { height: auto; max-width: 100%; }

:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
	outline: 3px solid var(--zd-fokus);
	outline-offset: 2px;
	border-radius: 3px;
}

.screen-reader-text {
	border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%);
	height: 1px; margin: -1px; overflow: hidden; padding: 0;
	position: absolute !important; width: 1px; word-wrap: normal !important;
}

.skip-link.screen-reader-text:focus {
	background: var(--wp--preset--color--hintergrund);
	clip: auto; clip-path: none; color: var(--wp--preset--color--primaer);
	height: auto; width: auto; left: 8px; top: 8px; padding: 12px 18px;
	z-index: 100000; font-weight: 700;
}

.wp-block-post-content a:not(.wp-element-button),
.zd-text a { text-underline-offset: 3px; text-decoration-thickness: 1px; }

::selection { background: var(--wp--preset--color--flaeche); color: var(--wp--preset--color--primaer); }

/* Platzhalter, die vor dem Livegang ersetzt werden sollen */
.zd-platzhalter {
	border: 2px dashed var(--wp--preset--color--akzent);
	background: var(--wp--preset--color--akzent-hell);
	padding: 1rem 1.25rem;
	border-radius: var(--zd-radius-klein);
}

/* ==========================================================
   3. Kopfbereich und Navigation
   ========================================================== */

.zd-header {
	position: sticky; top: 0; z-index: 50;
	background: var(--wp--preset--color--hintergrund);
	border-bottom: 1px solid var(--wp--preset--color--linie);
}
.admin-bar .zd-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .zd-header { top: 46px; } }

.zd-header__inner { min-height: 68px; }

.zd-logo { display: inline-flex; align-items: center; line-height: 0; text-decoration: none; }
.zd-logo__svg { height: 34px; width: auto; }
@media (min-width: 900px) { .zd-logo__svg { height: 40px; } }

.zd-header .wp-block-navigation a { color: var(--wp--preset--color--primaer); }
.zd-header .wp-block-navigation a:hover,
.zd-header .wp-block-navigation .current-menu-item > a,
.zd-header .wp-block-navigation [aria-current="page"] { color: var(--wp--preset--color--aktion); }
.zd-header .wp-block-navigation [aria-current="page"],
.zd-header .wp-block-navigation .current-menu-item > a { text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 2px; }

.wp-block-navigation__responsive-container.is-menu-open {
	background: var(--wp--preset--color--hintergrund) !important;
	color: var(--wp--preset--color--text) !important;
	padding: 1.5rem;
}
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item { font-size: 1.15rem; }

.zd-design-umschalter {
	display: inline-flex; align-items: center; justify-content: center;
	width: 40px; height: 40px; border-radius: 50%;
	border: 1px solid var(--wp--preset--color--linie);
	background: transparent; color: var(--wp--preset--color--primaer);
	cursor: pointer; padding: 0;
}
.zd-design-umschalter:hover { background: var(--wp--preset--color--flaeche-hell); }
.zd-icon { width: 20px; height: 20px; }
.zd-design-umschalter .zd-icon--sonne { display: none; }
.zd-design-umschalter[aria-pressed="true"] .zd-icon--sonne { display: block; }
.zd-design-umschalter[aria-pressed="true"] .zd-icon--mond { display: none; }
.zd-design-umschalter p, .wp-block-shortcode:has(.zd-design-umschalter) { margin: 0; }

/* ==========================================================
   4. Statusleiste Gesetzgebung
   ========================================================== */

.zd-statusleiste {
	background: var(--wp--preset--color--akzent-hell);
	border-bottom: 1px solid var(--wp--preset--color--linie);
	font-size: 0.925rem;
}
.zd-statusleiste p { margin: 0; }
.zd-status-badge {
	display: inline-block; font-weight: 700; font-size: 0.8rem;
	text-transform: uppercase; letter-spacing: .04em;
	background: var(--wp--preset--color--akzent-dunkel); color: var(--wp--preset--color--hintergrund);
	padding: 0.15rem 0.55rem; border-radius: 999px; margin-right: 0.5rem;
}

/* ==========================================================
   5. Hero im Stil von sparzinsen.at
   ========================================================== */

.zd-hero { position: relative; isolation: isolate; }
.zd-hero::before {
	content: ""; position: absolute; inset: 0; z-index: -1;
	background: var(--wp--preset--color--flaeche);
	border-radius: var(--zd-radius);
}
@media (min-width: 900px) {
	.zd-hero::before {
		clip-path: polygon(0 0, 84% 0, 38% 100%, 0 100%);
		border-radius: var(--zd-radius) 0 0 var(--zd-radius);
	}
}
.zd-hero__dachzeile {
	display: flex; align-items: center; gap: 0.5rem;
	font-size: 0.9rem; color: var(--wp--preset--color--primaer); margin: 0;
}
.zd-hero__dachzeile::before {
	content: ""; width: 14px; height: 14px; flex: none;
	background: var(--wp--preset--color--akzent); border-radius: 50%;
	box-shadow: 0 0 0 4px var(--wp--preset--color--akzent-hell);
}
.zd-hero__links .wp-block-column { min-width: 0; }
.zd-hero__links h3, .zd-hero__links h2 { font-size: 1.05rem; margin: 0 0 0.2rem; }
.zd-hero__links p { margin: 0; font-size: 0.9rem; }
.zd-hero__bild img {
	border-radius: var(--zd-radius-klein);
	box-shadow: var(--zd-schatten);
	aspect-ratio: 560 / 615; object-fit: cover; width: 100%;
}
.zd-hero__bild figcaption {
	font-family: var(--wp--preset--font-family--lora); font-style: italic;
	font-size: 0.9rem; line-height: 1.5; text-align: left;
	color: var(--wp--preset--color--text-dezent);
}

.zd-hero { padding: clamp(1.25rem, 4vw, 2.75rem); }
.zd-hero h1 { margin-top: 0.6rem; }
.zd-hero__weiter { margin-bottom: 0.25rem; font-weight: 600; color: var(--wp--preset--color--primaer); }
.zd-hero__links { gap: 1.25rem 2rem !important; margin-top: 0.75rem; }
.zd-hero__links + .zd-hero__links { margin-top: 1rem; }
.zd-hero__spalten { gap: clamp(1.5rem, 4vw, 3rem) !important; }
@media (max-width: 781px) { .zd-hero__bild { max-width: 340px; } }
.zd-hero--schlicht::before { clip-path: none !important; border-radius: var(--zd-radius) !important; }

/* ==========================================================
   5b. Abstände zwischen Sektionen
   ========================================================== */

.zd-sektion { margin-top: var(--wp--preset--spacing--60) !important; }
.zd-hero + .zd-sektion, .zd-startseite > .zd-hero { margin-top: var(--wp--preset--spacing--30); }
.zd-sektion > .wp-block-heading:first-child,
.zd-sektion > .wp-block-columns h2:first-child { margin-top: 0; }
.zd-seite > * + * { margin-top: var(--wp--preset--spacing--50); }
.zd-klein { font-size: 0.875rem; color: var(--wp--preset--color--text-dezent); }

.zd-ueber-kurz { align-items: center !important; }
.zd-rundbild img { border-radius: 50%; aspect-ratio: 1; object-fit: cover; width: 120px; }
.zd-autorenbox > .wp-block-image { flex: none; margin: 0; }
@media (max-width: 600px) { .zd-autorenbox { flex-wrap: wrap !important; } }

/* ==========================================================
   6. Karten, Boxen, Kacheln
   ========================================================== */

.is-style-zd-karte {
	background: var(--wp--preset--color--hintergrund);
	border: 1px solid var(--wp--preset--color--linie);
	border-radius: var(--zd-radius);
	box-shadow: var(--zd-schatten);
	padding: clamp(1.1rem, 3vw, 1.6rem);
}
.is-style-zd-box {
	background: var(--wp--preset--color--flaeche-hell);
	border-radius: var(--zd-radius);
	padding: clamp(1.1rem, 3vw, 1.75rem);
}
.is-style-zd-hinweis {
	background: var(--wp--preset--color--akzent-hell);
	border-left: 4px solid var(--wp--preset--color--akzent);
	border-radius: var(--zd-radius-klein);
	padding: 1rem 1.25rem;
}
.is-style-zd-hinweis > :first-child { margin-top: 0; }
.is-style-zd-hinweis > :last-child { margin-bottom: 0; }

/* Themenkacheln: ganze Kachel klickbar über den Titel-Link */
.zd-kachel { position: relative; height: 100%; transition: transform .15s ease, box-shadow .15s ease; }
.zd-kachel:hover { transform: translateY(-2px); }
.zd-kachel:focus-within { outline: 3px solid var(--zd-fokus); outline-offset: 2px; }
.zd-kachel h3 { font-size: 1.15rem; margin: 0.6rem 0 0.35rem; }
.zd-kachel h3 a { text-decoration: none; color: var(--wp--preset--color--primaer); }
.zd-kachel h3 a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.zd-kachel h3 a:focus-visible { outline: none; }
.zd-kachel p { margin: 0; font-size: 0.95rem; color: var(--wp--preset--color--text-dezent); }
.zd-kachel__icon {
	width: 44px; height: 44px; border-radius: 10px; display: grid; place-items: center;
	background: var(--wp--preset--color--flaeche); color: var(--wp--preset--color--primaer);
}
.zd-kachel__icon svg { width: 24px; height: 24px; }
.zd-kachel--akzent .zd-kachel__icon { background: var(--wp--preset--color--akzent-hell); color: var(--wp--preset--color--akzent-dunkel); }

/* Eckdatenleiste */
.zd-eckdaten .wp-block-column { text-align: left; }
.zd-eckdaten__zahl {
	font-size: clamp(1.6rem, 3.5vw, 2.1rem); font-weight: 700; line-height: 1.1;
	color: var(--wp--preset--color--primaer); margin: 0;
}
.zd-eckdaten__zahl--akzent { color: var(--wp--preset--color--akzent-dunkel); }
.zd-eckdaten__text { margin: 0.3rem 0 0; font-size: 0.95rem; color: var(--wp--preset--color--text-dezent); }

/* Zeitleiste Gesetzgebung */
.zd-zeitleiste { list-style: none; margin: 1.75rem 0 0; padding: 0; display: grid; gap: 0; }
@media (min-width: 800px) { .zd-zeitleiste { grid-template-columns: repeat(5, 1fr); } }
.zd-zeitleiste li { position: relative; padding: 0 0 1.25rem 2.25rem; }
@media (min-width: 800px) { .zd-zeitleiste li { padding: 2.25rem 1rem 0 0; } }
.zd-zeitleiste li::before {
	content: ""; position: absolute; left: 0; top: 0.2rem; width: 18px; height: 18px; border-radius: 50%;
	background: var(--wp--preset--color--hintergrund); border: 3px solid var(--wp--preset--color--grau);
	box-sizing: border-box; z-index: 1;
}
@media (min-width: 800px) { .zd-zeitleiste li::before { top: 0; } }
.zd-zeitleiste li::after {
	content: ""; position: absolute; left: 8px; top: 1.2rem; bottom: 0; width: 2px;
	background: var(--wp--preset--color--linie);
}
@media (min-width: 800px) { .zd-zeitleiste li::after { left: 18px; right: 0; top: 8px; bottom: auto; width: auto; height: 2px; } }
.zd-zeitleiste li:last-child::after { display: none; }
.zd-zeitleiste .is-erledigt::before { background: var(--wp--preset--color--akzent); border-color: var(--wp--preset--color--akzent); }
.zd-zeitleiste .is-aktuell::before { border-color: var(--wp--preset--color--akzent); box-shadow: 0 0 0 5px var(--wp--preset--color--akzent-hell); }
.zd-zeitleiste .is-erledigt::after { background: var(--wp--preset--color--akzent); }
.zd-zeitleiste strong { display: block; color: var(--wp--preset--color--primaer); font-weight: 700; }
.zd-zeitleiste span { display: block; font-size: 0.9rem; color: var(--wp--preset--color--text-dezent); }

/* Pfeil-Link */
.zd-pfeil-link { font-weight: 600; text-decoration: none !important; }
.zd-pfeil-link::after { content: " →"; transition: margin .15s ease; }
.zd-pfeil-link:hover::after { margin-left: 3px; }

/* Listen mit Haken */
.is-style-zd-haken { list-style: none; padding-left: 0; }
.is-style-zd-haken li { position: relative; padding-left: 1.75rem; margin-bottom: 0.4rem; }
.is-style-zd-haken li::before {
	content: ""; position: absolute; left: 0; top: 0.35em; width: 1.1em; height: 1.1em; border-radius: 50%;
	background: var(--wp--preset--color--akzent-hell) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.5l2.5 2.5L12 5.5' fill='none' stroke='%232e8b57' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 80% no-repeat;
}

/* ==========================================================
   7. Beitragslisten und Beitragsseite
   ========================================================== */

.zd-beitragskarte { height: 100%; display: flex; flex-direction: column; }
.zd-beitragskarte .wp-block-post-title { font-size: 1.2rem; margin: 0.4rem 0; }
.zd-beitragskarte .wp-block-post-excerpt { font-size: 0.95rem; color: var(--wp--preset--color--text-dezent); }
.zd-beitragskarte .wp-block-post-excerpt__excerpt { margin: 0; }
.zd-beitragskarte .wp-block-post-featured-image img { border-radius: var(--zd-radius-klein); aspect-ratio: 16/9; object-fit: cover; }
.zd-beitragskarte .wp-block-post-terms a {
	text-decoration: none; color: var(--wp--preset--color--akzent-dunkel);
	text-transform: uppercase; letter-spacing: .04em; font-size: 0.78rem;
}

.zd-verwandte__liste { list-style: none; padding: 0; margin: 1rem 0 0; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); }
.zd-verwandte__liste h3 { font-size: 1.05rem; margin: 0.2rem 0 0.4rem; }
.zd-verwandte__liste h3 a { text-decoration: none; color: var(--wp--preset--color--primaer); }
.zd-verwandte__datum, .zd-verwandte__auszug { margin: 0; font-size: 0.875rem; color: var(--wp--preset--color--text-dezent); }

.zd-meta { font-size: 0.9rem; color: var(--wp--preset--color--text-dezent); }
.zd-meta p { margin: 0; }
.zd-meta > * + *::before { content: "·"; margin: 0 0.5rem; }
.zd-meta .wp-block-shortcode, .zd-meta .wp-block-shortcode p { display: inline; }

.zd-brotkrumen { font-size: 0.875rem; color: var(--wp--preset--color--text-dezent); }
.zd-brotkrumen p { margin: 0; }
.zd-brotkrumen a { color: var(--wp--preset--color--text-dezent); }

.wp-block-post-content > h2 { margin-top: 2.25rem; }
.wp-block-post-content > h3 { margin-top: 1.75rem; }

.wp-block-query-pagination { gap: 0.5rem; font-weight: 600; }
.wp-block-query-pagination-numbers .page-numbers {
	display: inline-block; min-width: 2.2rem; padding: 0.3rem 0.6rem; text-align: center;
	border-radius: var(--zd-radius-klein); text-decoration: none;
}
.wp-block-query-pagination-numbers .current { background: var(--wp--preset--color--primaer); color: var(--wp--preset--color--hintergrund); }

/* ==========================================================
   8. Tabellen
   ========================================================== */

.wp-block-table { overflow-x: auto; }
.wp-block-table table { border-collapse: collapse; width: 100%; }
.wp-block-table th, .wp-block-table td { border: 0; border-bottom: 1px solid var(--wp--preset--color--linie); padding: 0.65rem 0.75rem; text-align: left; vertical-align: top; }
.wp-block-table thead th {
	background: var(--wp--preset--color--flaeche-hell); color: var(--wp--preset--color--primaer);
	font-size: 0.85rem; font-weight: 700; border-bottom: 2px solid var(--wp--preset--color--flaeche);
}
.is-style-zd-tabelle table { border: 1px solid var(--wp--preset--color--linie); border-radius: var(--zd-radius-klein); overflow: hidden; }
.is-style-zd-tabelle tbody tr:nth-child(even) { background: var(--wp--preset--color--hintergrund-dezent); }
.is-style-zd-tabelle td:first-child { font-weight: 600; color: var(--wp--preset--color--primaer); }
.wp-block-table figcaption { text-align: left; }

/* ==========================================================
   9. FAQ (Details-Block und Rank Math FAQ)
   ========================================================== */

.wp-block-details summary,
.rank-math-list .rank-math-question {
	cursor: pointer; font-weight: 700; color: var(--wp--preset--color--primaer);
	list-style: none; position: relative; padding-right: 2.25rem; font-size: 1.05rem;
}
.wp-block-details summary::-webkit-details-marker { display: none; }
.wp-block-details summary::after {
	content: ""; position: absolute; right: 0.25rem; top: 50%; width: 22px; height: 22px; margin-top: -11px;
	border-radius: 50%; background: var(--wp--preset--color--flaeche-hell)
		url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 6l4 4 4-4' fill='none' stroke='%23006699' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 70% no-repeat;
	transition: transform .2s ease;
}
.wp-block-details[open] summary::after { transform: rotate(180deg); }
.wp-block-details > :not(summary) { margin-top: 0.6rem; }
.wp-block-details:first-of-type { border-top: 1px solid var(--wp--preset--color--linie); }

.rank-math-list .rank-math-list-item { border-bottom: 1px solid var(--wp--preset--color--linie); padding: 0.9rem 0; }
.rank-math-list .rank-math-question { margin: 0 0 0.4rem; }

/* ==========================================================
   10. Autorenbox und Newsletter
   ========================================================== */

.zd-autorenbox { align-items: flex-start !important; }
.zd-autorenbox .wp-block-image img { border-radius: 50%; width: 96px; height: 96px; object-fit: cover; }
.zd-autorenbox__name { margin: 0; font-weight: 700; color: var(--wp--preset--color--primaer); font-size: 1.1rem; }
.zd-autorenbox__rolle { margin: 0 0 0.5rem; font-size: 0.9rem; color: var(--wp--preset--color--text-dezent); }
.zd-autorenbox p { margin-top: 0; }

.zd-newsletter {
	padding: clamp(1.5rem, 4vw, 2.5rem);
	background: var(--wp--preset--color--primaer);
	color: var(--wp--preset--color--hintergrund);
	border-radius: var(--zd-radius);
}
.zd-newsletter :where(h2, h3, p) { color: inherit; }
.zd-newsletter h2 { margin-top: 0; }
.zd-newsletter p { margin-bottom: 0; }
.zd-newsletter .wp-block-columns { align-items: center !important; }
@media (min-width: 782px) { .zd-newsletter .wp-block-buttons { justify-content: flex-end; } }
.zd-newsletter .wp-block-button__link { background: var(--wp--preset--color--akzent-dunkel); color: #ffffff; }
.zd-newsletter .wp-block-button__link:hover { background: #15542f; color: #ffffff; }
:root[data-theme="dunkel"] .zd-newsletter { background: var(--wp--preset--color--flaeche); color: var(--wp--preset--color--text); }
:root[data-theme="dunkel"] .zd-newsletter .wp-block-button__link { color: #0e1828; }
@media (prefers-color-scheme: dark) {
	:root:not([data-theme="hell"]) .zd-newsletter { background: var(--wp--preset--color--flaeche); color: var(--wp--preset--color--text); }
	:root:not([data-theme="hell"]) .zd-newsletter .wp-block-button__link { color: #0e1828; }
}

/* ==========================================================
   11. Fußbereich
   ========================================================== */

.zd-footer { background: var(--wp--preset--color--hintergrund-dezent); border-top: 1px solid var(--wp--preset--color--linie); font-size: 0.95rem; }
.zd-footer h2 { font-size: 1rem; margin: 0 0 0.6rem; }
.zd-footer ul { list-style: none; padding: 0; margin: 0; }
.zd-footer li { margin: 0 0 0.35rem; }
.zd-footer a { color: var(--wp--preset--color--text); text-decoration: none; }
.zd-footer a:hover { color: var(--wp--preset--color--aktion); text-decoration: underline; }
.zd-footer__unten { font-size: 0.85rem; color: var(--wp--preset--color--text-dezent); border-top: 1px solid var(--wp--preset--color--linie); }
.zd-footer__unten p { margin: 0; }

/* ==========================================================
   12. Plugins: wpDiscuz und Borlabs Cookie
   ========================================================== */

#wpdcom, #wpdcom .wpd-comment-text, #wpdcom textarea, #wpdcom input { font-family: inherit !important; }
#wpdcom .wpd-comment-text { color: var(--wp--preset--color--text); }
#wpdcom .wpd-comment-author, #wpdcom .wpd-comment-author a { color: var(--wp--preset--color--primaer) !important; font-weight: 700; }
#wpdcom .wpd-comment-wrap { border-color: var(--wp--preset--color--linie) !important; }
#wpdcom .wc_comm_submit, #wpdcom .wpd-prim-button {
	background: var(--wp--preset--color--aktion) !important; color: #fff !important;
	border-radius: var(--zd-radius-klein) !important; font-weight: 600 !important;
}
#wpdcom .wpd-thread-head { border-bottom-color: var(--wp--preset--color--primaer) !important; }
#wpdcom .wpd-thread-info { color: var(--wp--preset--color--primaer) !important; border-bottom-color: var(--wp--preset--color--primaer) !important; }
:root[data-theme="dunkel"] #wpdcom, :root[data-theme="dunkel"] #wpdcom .wpd-comment-text { background: transparent; color: var(--wp--preset--color--text); }

#BorlabsCookieBox, #BorlabsCookieBox * { font-family: inherit !important; }
#BorlabsCookieBox a { color: #006699 !important; }
.brlbs-cmpnt-container ._brlbs-btn, #BorlabsCookieBox ._brlbs-btn { border-radius: var(--zd-radius-klein) !important; font-weight: 600 !important; }

/* ==========================================================
   13. Editor-Feinheiten
   ========================================================== */

.editor-styles-wrapper .zd-header { position: relative; }

/* Kacheln am Handy zweispaltig, spart Scrollen */
@media (max-width: 600px) {
	.zd-kacheln { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 0.75rem !important; }
	.zd-kachel { padding: 0.9rem !important; }
	.zd-kachel h3 { font-size: 1rem; hyphens: auto; }
	.zd-kachel p { font-size: 0.85rem; }
}
.zd-hero__dachzeile { align-items: flex-start; }
.zd-hero__dachzeile::before { margin-top: 0.3em; }
.zdr-chart { max-width: 960px; }

/* Formularfelder (Kommentare, Suche, Kontakt) */
:where(input[type="text"], input[type="email"], input[type="url"], input[type="search"], input[type="tel"], textarea, select) {
	font: inherit; color: var(--wp--preset--color--text);
	background: var(--wp--preset--color--hintergrund);
	border: 1px solid var(--wp--preset--color--grau);
	border-radius: var(--zd-radius-klein); padding: 0.6rem 0.75rem;
}
.wp-block-search__input { border-radius: var(--zd-radius-klein) 0 0 var(--zd-radius-klein); }
.wp-block-details + .wp-block-details { margin-top: 0 !important; }

/* ==========================================================
   14. Themenseiten
   ========================================================== */

.zd-themenkopf {
	background: var(--wp--preset--color--flaeche);
	border-radius: var(--zd-radius);
	padding: clamp(1.25rem, 4vw, 2.25rem);
	margin-top: var(--wp--preset--spacing--30);
}
.zd-themenkopf h1 { margin: 0.5rem 0 0.75rem; font-size: clamp(1.8rem, 4.5vw, 2.5rem); }
.zd-themenkopf__intro { font-size: 1.125rem; }
.zd-themenkopf .zd-klein { margin-bottom: 0; }
.zd-sprungmarken { font-size: 0.925rem; color: var(--wp--preset--color--text-dezent); line-height: 1.9; }
.zd-themenseite .wp-block-post-content > h2 { scroll-margin-top: 110px; }
.zd-themenseite .wp-block-post-content > ol { padding-left: 1.4rem; }
.zd-themenseite .wp-block-post-content > ol li { margin-bottom: 0.6rem; padding-left: 0.25rem; }
.zd-themenseite .wp-block-post-content > ol li::marker { color: var(--wp--preset--color--akzent-dunkel); font-weight: 700; }
.zd-themenseite .zd-zeitleiste { grid-template-columns: 1fr !important; }
.zd-themenseite .zd-zeitleiste li { padding: 0 0 1.25rem 2.25rem !important; }
.zd-themenseite .zd-zeitleiste li::before { top: 0.2rem !important; }
.zd-themenseite .zd-zeitleiste li::after { left: 8px !important; top: 1.2rem !important; bottom: 0 !important; width: 2px !important; height: auto !important; right: auto !important; }
.zd-themenseite .zdr--kompakt { margin-block: 1.25rem; }
