/* Elerhain – ergänzende Stile (Farben/Schriften kommen aus theme.json). */

:root {
	--e-radius: 8px;
	--e-rahmen: var(--wp--preset--color--rahmen);
}

html { scroll-behavior: smooth; }
body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

h1, h2, h3, .wp-block-post-title { text-wrap: balance; }
p { text-wrap: pretty; }

.visually-hidden {
	position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0;
	overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* Fokus: Siegelrot auf hell, Glimmgold auf dunkel */
:focus-visible { outline: 2px solid var(--wp--preset--color--siegelrot); outline-offset: 2px; }
.has-nacht-background-color :focus-visible,
.wp-block-cover :focus-visible,
.wp-block-navigation__responsive-container.is-menu-open :focus-visible { outline-color: var(--wp--preset--color--glimmgold); }

/* Zum Inhalt springen (Kernlink) */
.skip-link.screen-reader-text:focus {
	background: var(--wp--preset--color--glimmgold); color: var(--wp--preset--color--tinte);
	font-family: var(--wp--preset--font-family--cinzel); padding: .75rem 1.25rem; z-index: 100000;
	clip: auto !important; clip-path: none; height: auto; width: auto; left: 1rem; top: 1rem;
}

/* Links: unterstrichen */
a:where(:not(.wp-element-button):not(.wp-block-site-title a):not(.wp-block-navigation-item__content)) { text-underline-offset: .18em; text-decoration-thickness: 1px; }

/* ===== Dunkle Bereiche: Nacht, Leinen, Glimmgold, Ocker ===== */
.has-nacht-background-color, .wp-block-cover { color: var(--wp--preset--color--leinen); }
.has-nacht-background-color :is(h1, h2, h3, h4, h5, h6),
.wp-block-cover :is(h1, h2, h3, h4, h5, h6) { color: var(--wp--preset--color--glimmgold); }
.has-nacht-background-color a:where(:not(.wp-element-button)):not(.wp-block-navigation-item__content),
.wp-block-cover a:where(:not(.wp-element-button)) { color: var(--wp--preset--color--ocker); }
.has-nacht-background-color a:where(:not(.wp-element-button)):hover,
.wp-block-cover a:where(:not(.wp-element-button)):hover { color: var(--wp--preset--color--glimmgold); }
.has-nacht-background-color .wp-element-button,
.wp-block-cover .wp-element-button { border-color: var(--wp--preset--color--ocker); }
.has-nacht-background-color .wp-element-button:hover,
.wp-block-cover .wp-element-button:hover { background: var(--wp--preset--color--glimmgold); color: var(--wp--preset--color--tinte); }

/* Knöpfe: Hover/Fokus/Aktiv */
.wp-element-button, .wp-block-button__link { transition: background-color .2s, color .2s; box-shadow: none; }
.wp-block-button.is-style-outline > .wp-block-button__link {
	background: transparent; color: var(--wp--preset--color--tinte); border: 2px solid var(--wp--preset--color--rahmen);
}
.wp-block-button.is-style-outline > .wp-block-button__link:hover { background: var(--wp--preset--color--tinte); color: var(--wp--preset--color--glimmgold); }

/* ===== Kopf- und Fußzeile ===== */
.kopfzeile { border-bottom: 1px solid var(--wp--preset--color--rahmen); position: relative; z-index: 20; }
.kopfzeile .wp-block-site-title { margin: 0; line-height: 1.1; }
.kopfzeile .wp-block-navigation a.wp-block-navigation-item__content {
	color: var(--wp--preset--color--leinen); text-decoration: none; padding: .35rem 0;
	border-bottom: 2px solid transparent;
}
.kopfzeile .wp-block-navigation a.wp-block-navigation-item__content:hover { color: var(--wp--preset--color--glimmgold); border-bottom-color: var(--wp--preset--color--ocker); }
.kopfzeile .wp-block-navigation [aria-current="page"],
.kopfzeile .wp-block-navigation .current-menu-item > a { color: var(--wp--preset--color--glimmgold); border-bottom-color: var(--wp--preset--color--ocker); }
.wp-block-navigation__responsive-container-open, .wp-block-navigation__responsive-container-close { color: var(--wp--preset--color--glimmgold); }
.wp-block-navigation__responsive-container.is-menu-open { padding: var(--wp--preset--spacing--50); }
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container { gap: 1.25rem; font-size: 1.25rem; }

.fusszeile { border-top: 1px solid var(--wp--preset--color--rahmen); }
.fusszeile .wp-block-navigation a.wp-block-navigation-item__content { color: var(--wp--preset--color--ocker); text-decoration: underline; text-underline-offset: .2em; padding: .25rem 0; }
.fusszeile .wp-block-navigation a.wp-block-navigation-item__content:hover { color: var(--wp--preset--color--glimmgold); }
.fusszeile-fiktion { color: var(--wp--preset--color--leinen); opacity: .85; margin-top: var(--wp--preset--spacing--50); }
.fusszeile .wp-block-navigation { font-size: 1rem; text-transform: none; letter-spacing: .04em; }

/* ===== Seitenkopf mit Zierlinie ===== */
.seitenkopf { text-align: center; }
.seitenkopf .wp-block-separator { margin-top: var(--wp--preset--spacing--40); }
hr.wp-block-separator.is-style-ornament {
	border: 0; height: 14px; width: min(100%, 26rem); margin-inline: auto; opacity: 1; background:
		url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath d='M7 1l6 6-6 6-6-6z' fill='%23B28C4C'/%3E%3C/svg%3E") center / 14px 14px no-repeat,
		linear-gradient(var(--wp--preset--color--ocker), var(--wp--preset--color--ocker)) left center / calc(50% - 18px) 1px no-repeat,
		linear-gradient(var(--wp--preset--color--ocker), var(--wp--preset--color--ocker)) right center / calc(50% - 18px) 1px no-repeat;
}
.einleitung, p.einleitung {
	font-style: italic; font-size: var(--wp--preset--font-size--einleitung); line-height: 1.5;
}
.seitenkopf .einleitung { max-width: 40rem; margin-inline: auto; }
.seiteninhalt { padding-bottom: var(--wp--preset--spacing--60); }
.seiteninhalt > * + .wp-block-heading { margin-top: var(--wp--preset--spacing--50); }
.seiteninhalt > .alignwide, .seiteninhalt > .alignfull { margin-top: var(--wp--preset--spacing--50); }
.seiteninhalt > .alignfull:first-child, .seiteninhalt-start > .alignfull { margin-top: 0; }
.seiteninhalt-start { padding-bottom: 0; }
.seiteninhalt-start > * { margin-block-start: 0; }
.seiteninhalt > :last-child.alignfull { margin-bottom: calc(-1 * var(--wp--preset--spacing--60)); }
.seiteninhalt-start > :last-child.alignfull { margin-bottom: 0; }

/* Abschnitte */
.abschnitt { padding-block: var(--wp--preset--spacing--60); }
.abschnitt-eng { padding-block: var(--wp--preset--spacing--50); }
.abschnitt > .wp-block-heading:first-child { text-align: center; }
.abschnitt-kopf { text-align: center; margin-bottom: var(--wp--preset--spacing--50); }
.abschnitt-kopf p { margin-inline: auto; }
.mitte, .has-text-align-center { text-align: center; }
.wp-block-buttons.is-content-justification-center { justify-content: center; }

/* ===== Hero ===== */
.hero.wp-block-cover { min-height: 80vh; padding: 0; align-items: center; }
.wp-site-blocks > * { margin-block-start: 0 !important; }
.wp-block-cover.hero.has-custom-content-position.has-custom-content-position .wp-block-cover__inner-container {
	box-sizing: border-box; width: min(100%, var(--wp--style--global--wide-size, 72rem)); margin-inline: auto;
	padding: var(--wp--preset--spacing--60) var(--wp--preset--spacing--40);
}
.hero-inhalt { max-width: 34rem; }
.hero-logo { margin: 0 0 var(--wp--preset--spacing--40); }
.hero-logo img { width: min(100%, 31rem); height: auto; }
.hero-slogan { margin-block: 0 var(--wp--preset--spacing--40); }
.hero-stand { margin-top: var(--wp--preset--spacing--30); color: var(--wp--preset--color--glimmgold); font-size: 1rem; }
@media (max-width: 781px) {
	.hero .wp-block-cover__background { background: rgba(20, 17, 13, .82) !important; opacity: 1 !important; }
	.hero-inhalt { margin-inline: auto; text-align: center; }
	.hero-logo img { margin-inline: auto; display: block; width: min(100%, 20rem); }
	.hero .wp-block-buttons { justify-content: center; }
}

/* ===== Karten / Kacheln ===== */
.is-style-karte {
	background: var(--wp--preset--color--pergament-dunkel); border: 2px solid var(--wp--preset--color--rahmen);
	border-radius: var(--e-radius); padding: var(--wp--preset--spacing--40); overflow: hidden; color: var(--wp--preset--color--tinte);
}
.is-style-karte.karte-kachel { padding: 0; }
.karte-kachel > .wp-block-image, .karte-kachel > .wp-block-post-featured-image { margin: 0; }
.karte-kachel > .wp-block-image img, .karte-kachel > .wp-block-post-featured-image img { display: block; width: 100%; border-radius: 0; }
.karte-text { padding: var(--wp--preset--spacing--40); }
.karte-text > :first-child { margin-top: 0; }
.karte-text > :last-child { margin-bottom: 0; }
.karte-text :is(h2, h3, h4) { margin-bottom: .4em; }
.wp-block-columns > .wp-block-column > .karte-kachel { height: 100%; }
.is-style-karte .wp-block-post-title a, .is-style-karte a { color: var(--wp--preset--color--siegelrot); }
.is-style-karte .wp-block-post-title a { text-decoration: none; }
.is-style-karte .wp-block-post-title a:hover { text-decoration: underline; }
.is-style-karte .wp-block-post-excerpt__more-link { display: inline-block; margin-top: .4rem; }

/* Kernbotschaften: 3 + 2 mittig */
.kacheln { display: grid; grid-template-columns: repeat(6, 1fr); gap: 1.5rem; }
.kacheln > * { grid-column: span 2; margin: 0; }
.kacheln > :nth-child(4) { grid-column: 2 / span 2; }
.kacheln > :nth-child(5) { grid-column: 4 / span 2; }
@media (max-width: 900px) { .kacheln { grid-template-columns: 1fr 1fr; } .kacheln > *, .kacheln > :nth-child(4), .kacheln > :nth-child(5) { grid-column: auto; } }
@media (max-width: 600px) { .kacheln { grid-template-columns: 1fr; } }
.kacheln .is-style-karte { height: 100%; }
.kachel-nummer { font-family: var(--wp--preset--font-family--cinzel); color: var(--wp--preset--color--siegelrot); font-size: 1rem; letter-spacing: .12em; margin: 0 0 .25rem; }

/* Figurenkarten */
.figuren { display: grid; grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); gap: 1.5rem; }
.figuren > * { margin: 0; }
.figur-name { font-family: var(--wp--preset--font-family--cinzel); font-size: 1.375rem; letter-spacing: .04em; margin: 0; }
.figur-rolle { font-style: italic; color: var(--wp--preset--color--tinte-hell); margin: .15rem 0 .6rem; }
.figur-text { margin: 0; }

/* Hinweiskasten */
.is-style-hinweis {
	border: 2px solid var(--wp--preset--color--siegelrot); border-radius: var(--e-radius); padding: var(--wp--preset--spacing--40);
	background: rgba(153, 38, 26, .06);
}
.is-style-hinweis > :first-child { margin-top: 0; }
.is-style-hinweis > :last-child { margin-bottom: 0; }

/* Legende-Zitat */
.legende { position: relative; padding-bottom: var(--wp--preset--spacing--40); }
.legende .wp-block-quote { margin: 0; border-left-color: var(--wp--preset--color--ocker); }
.legende .wp-block-quote p { margin-block: 0 .9em; }
.legende .wp-block-image { margin: 0; float: right; }
.legende::after { content: ""; display: block; clear: both; }
.legende .wp-block-image img { width: 72px; height: 72px; }

/* Galerie: Bildunterschriften unter dem Bild statt als Überlagerung */
.wp-block-gallery.has-nested-images figure.wp-block-image { justify-content: flex-start; }
.wp-block-gallery.has-nested-images figure.wp-block-image figcaption {
	position: static; background: none; color: var(--wp--preset--color--tinte-hell); text-shadow: none;
	padding: .5rem 0 0; margin: 0; max-height: none; overflow: visible; text-align: center; font-style: italic; font-size: 1rem;
}
.wp-block-gallery.has-nested-images figure.wp-block-image::before { display: none; }
/* Galerie */
.wp-block-gallery { gap: 1rem; }
.wp-block-gallery .wp-block-image img { border-radius: var(--e-radius); }
.wp-block-gallery figcaption.wp-element-caption { font-size: 1rem !important; }
.wp-block-image img { border-radius: var(--e-radius); }
.wp-block-image.is-style-rounded img { border-radius: 9999px; }
.wp-block-image.ohne-rand img { border-radius: 0; }
.wp-lightbox-overlay figcaption, .wp-lightbox-container button { font-family: var(--wp--preset--font-family--eb-garamond); }

/* Newsletter */
.newsletter.wp-block-cover { min-height: 0; }
.newsletter .wp-block-cover__inner-container { padding: var(--wp--preset--spacing--60) var(--wp--preset--spacing--40); }
.newsletter-form { display: grid; gap: .75rem; max-width: 30rem; margin: var(--wp--preset--spacing--40) auto 0; text-align: left; }
.newsletter-form label { font-family: var(--wp--preset--font-family--cinzel); letter-spacing: .06em; color: var(--wp--preset--color--glimmgold); }
.newsletter-form input[type="email"] {
	font: inherit; font-size: 1.1875rem; padding: .7rem .9rem; width: 100%; box-sizing: border-box;
	background: var(--wp--preset--color--leinen); color: var(--wp--preset--color--tinte);
	border: 2px solid var(--wp--preset--color--ocker); border-radius: 6px;
}
.newsletter-form .wp-element-button { cursor: pointer; justify-self: start; }
.newsletter-form .wp-element-button[disabled] { opacity: .65; cursor: not-allowed; }
.newsletter-hinweis { font-size: 1rem; margin: 0; }
.newsletter-status { font-size: 1rem; margin: 0; font-style: italic; }

/* Tabelle (Faktenblatt) */
.wp-block-table table { border-collapse: collapse; width: 100%; }
.wp-block-table td, .wp-block-table th { border: 1px solid var(--wp--preset--color--rahmen); padding: .6em .9em; vertical-align: top; }
.wp-block-table td:first-child { font-family: var(--wp--preset--font-family--cinzel); letter-spacing: .02em; font-size: 1.0625rem; width: 42%; background: rgba(209, 189, 148, .55); overflow-wrap: anywhere; }
.wp-block-table.is-style-stripes tbody tr:nth-child(odd) { background: transparent; }

/* Listen */
.wp-block-list li { margin-block: .35em; }
.kategorien { gap: .5rem 1.25rem; margin-top: var(--wp--preset--spacing--30); }
.kategorien .wp-block-categories { list-style: none; padding: 0; margin: 0; display: flex; gap: .5rem 1.5rem; flex-wrap: wrap; justify-content: center; }

/* Devlog-Liste */
.wp-block-query-pagination { gap: 1rem; margin-top: var(--wp--preset--spacing--50); }
.wp-block-post-terms a { font-family: var(--wp--preset--font-family--cinzel); font-size: 1rem; letter-spacing: .06em; text-decoration: none; }
.wp-block-post-terms a:hover { text-decoration: underline; }
.wp-block-post-date { margin: 0; }
.wp-block-post-navigation-link { font-size: 1rem; text-align: center; }
.beitragsbild img { border-radius: var(--e-radius); }

/* Formularfelder (Suche) */
.wp-block-search__input { font: inherit; padding: .6rem .8rem; border: 2px solid var(--wp--preset--color--rahmen); border-radius: 6px; background: var(--wp--preset--color--leinen); color: var(--wp--preset--color--tinte); }
.wp-block-search__label { font-family: var(--wp--preset--font-family--cinzel); letter-spacing: .06em; }
.wp-block-search__button { font-family: var(--wp--preset--font-family--cinzel); background: var(--wp--preset--color--siegelrot); color: var(--wp--preset--color--pergament); border: 2px solid #62100D; border-radius: 6px; padding: .6rem 1.2rem; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; }

/* Admin-Leiste verdeckt den Kopf nicht */
.admin-bar .skip-link.screen-reader-text:focus { top: 3rem; }

/* Druck */
@media print {
	.kopfzeile, .fusszeile, .wp-block-navigation, .newsletter { display: none !important; }
	body { background: #fff; color: #000; }
}


.fusszeile .fusszeile-fiktion { max-width: var(--wp--style--global--wide-size, 72rem); text-align: left; }
.wp-block-gallery.has-nested-images figure.wp-block-image img { aspect-ratio: 16 / 9; height: auto !important; width: 100%; object-fit: cover; flex: none !important; }

/* Eigenes Video */
.wp-block-video video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; background: var(--wp--preset--color--nacht); border: 2px solid var(--wp--preset--color--rahmen); border-radius: var(--e-radius); }
.wp-block-video figcaption { font-size: 1rem; color: var(--wp--preset--color--tinte-hell); font-style: italic; text-align: center; margin-top: .5rem; }

/* Kontaktformular */
.e-form { display: grid; gap: .6rem; margin-top: var(--wp--preset--spacing--40); }
.e-form label { font-family: var(--wp--preset--font-family--cinzel); letter-spacing: .04em; margin-top: .4rem; }
.e-form input[type="text"], .e-form input[type="email"], .e-form textarea {
	font: inherit; font-size: 1.1875rem; width: 100%; box-sizing: border-box; padding: .65rem .8rem;
	background: var(--wp--preset--color--leinen); color: var(--wp--preset--color--tinte);
	border: 2px solid var(--wp--preset--color--rahmen); border-radius: 6px;
}
.e-form textarea { resize: vertical; min-height: 9rem; }
.e-form-ok label { font-family: var(--wp--preset--font-family--eb-garamond); letter-spacing: 0; display: flex; gap: .6rem; align-items: flex-start; margin-top: .8rem; font-size: 1rem; }
.e-form-ok input[type="checkbox"] { width: 1.3rem; height: 1.3rem; margin-top: .2rem; flex: none; accent-color: var(--wp--preset--color--siegelrot); }
.e-form .wp-element-button { justify-self: start; margin-top: .6rem; cursor: pointer; }
.e-form-hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.e-form-meldung { padding: .8rem 1rem; border-radius: 6px; border: 2px solid; margin: 1rem 0 0; font-size: 1.0625rem; }
.e-form-meldung.ok { border-color: var(--wp--preset--color--waldgruen); color: var(--wp--preset--color--waldgruen); background: rgba(31, 82, 26, .08); }
.e-form-meldung.fehler { border-color: var(--wp--preset--color--siegelrot); color: var(--wp--preset--color--siegelrot); background: rgba(153, 38, 26, .06); }
