/* Ergänzende Stile, die theme.json nicht abdeckt. */

:root {
	--wf-radius: 14px;
	--wf-shadow: 0 1px 2px rgb(31 42 34 / 6%), 0 8px 24px rgb(31 42 34 / 7%);
}

/* Sprunglink / Fokus */
:where(a, button, input, summary):focus-visible {
	outline: 3px solid var(--wp--preset--color--terrakotta);
	outline-offset: 2px;
	border-radius: 4px;
}

/* Fußbereich auch auf kurzen Seiten am unteren Fensterrand */
.wp-site-blocks { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; }
.admin-bar .wp-site-blocks { min-height: calc(100dvh - var(--wp-admin--admin-bar--height, 0px)); }
.wp-site-blocks > .wp-block-template-part:last-child { margin-top: auto; }

/* Kopfbereich – „sticky“ muss am Template-Part-Container sitzen, sonst klebt er nur in sich selbst */
.wp-site-blocks > .wp-block-template-part:has(> .wf-header) {
	position: sticky;
	top: 0;
	z-index: 50;
}
.admin-bar .wp-site-blocks > .wp-block-template-part:has(> .wf-header) { top: var(--wp-admin--admin-bar--height, 0); }
.wf-header {
	--wf-header-hoehe: 74px;
	backdrop-filter: saturate(140%) blur(8px);
	background: rgb(247 243 234 / 92%);
	border-bottom: 1px solid var(--wp--preset--color--sand);
}

.wf-brand .wp-block-image,
.wf-footer__logo { margin: 0; }
.wf-brand__logo img,
.wf-footer__logo img { display: block; }

.wf-header .wp-block-navigation-item__content { padding: 0.35rem 0.1rem; }
.wf-header .wp-block-navigation .current-menu-item > a,
.wf-header .wp-block-navigation .current-menu-ancestor > a {
	box-shadow: inset 0 -2px 0 var(--wp--preset--color--terrakotta);
}
.wf-header .wp-block-navigation__submenu-container {
	border: 1px solid var(--wp--preset--color--sand) !important;
	border-radius: 10px;
	box-shadow: var(--wf-shadow);
	padding: 0.4rem 0 !important;
	min-width: 15rem !important;
}
.wf-header .wp-block-navigation__submenu-container .wp-block-navigation-item__content {
	padding: 0.45rem 1rem;
}

/* Titelbild Startseite */
.wf-hero .wp-block-cover__inner-container { max-width: 1200px; }
.wf-hero h1 { text-wrap: balance; }

.wf-facts { gap: 0 !important; }
.wf-facts > * {
	border-left: 1px solid rgb(255 255 255 / 35%);
	padding-inline: 1.25rem;
}
.wf-facts > *:first-child { border-left: 0; padding-left: 0; }

/* Bildstreifen der Unterseiten */
.wf-bildstreifen h1 {
	font-size: var(--wp--preset--font-size--xx-large);
	text-wrap: balance;
	margin-bottom: 0;
}
.wf-bildstreifen .wp-block-post-date,
.wf-bildstreifen .wp-block-post-terms { font-size: 0.95rem; }
.wf-bildstreifen .wp-block-post-terms a { text-decoration: none; }
@media (max-width: 600px) {
	.wf-bildstreifen { min-height: 180px !important; }
	.wf-bildstreifen h1 { font-size: 1.9rem; }
}

/* Lange deutsche Wörter in Überschriften sauber trennen statt hart umbrechen */
h1, h2, h3 { hyphens: auto; -webkit-hyphens: auto; overflow-wrap: break-word; }

/* Kopf auf dem Handy: Vereinsname einzeilig, Untertitel ausblenden */
@media (max-width: 600px) {
	.wf-header .wp-block-site-title { font-size: 1.1rem; white-space: nowrap; }
	.wf-header .wp-block-site-tagline { display: none; }
	.wf-brand__logo img { width: 38px !important; height: 40px !important; }
}

/* Karten */
.wf-card {
	background: var(--wp--preset--color--weiss);
	border-radius: var(--wf-radius);
	box-shadow: var(--wf-shadow);
	overflow: hidden;
}

/* Beitragsliste */
.wf-post-list .wp-block-post {
	border-bottom: 1px solid var(--wp--preset--color--sand);
	padding-block: 1.5rem;
}
.wf-post-list .wp-block-post:first-child { padding-top: 0; }

/* Footer */
.wf-footer a { color: inherit; }
.wf-footer a:hover { color: var(--wp--preset--color--salbei); }

/* Bilder abrunden */
.wp-block-image.is-style-rounded img,
.wf-rounded img { border-radius: var(--wf-radius); }

/* Mobile */
@media (max-width: 600px) {
	.wf-facts > * { border-left: 0; padding-inline: 0; }
}

/* Einleitungsabsatz */
.wf-lead { font-size: var(--wp--preset--font-size--large); line-height: 1.55; }

/* ---------- Chronik: Zeitstrahl ---------- */
.wf-zeitstrahl__nav {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem;
	position: sticky;
	top: calc(var(--wp-admin--admin-bar--height, 0px) + 84px);
	z-index: 10;
	padding: 0.6rem 0;
	background: var(--wp--preset--color--creme);
	border-bottom: 1px solid var(--wp--preset--color--sand);
}
.wf-zeitstrahl__nav a {
	padding: 0.2rem 0.7rem;
	border-radius: 999px;
	background: var(--wp--preset--color--salbei);
	color: var(--wp--preset--color--wald-dunkel);
	font-weight: 600;
	font-size: 0.95rem;
	text-decoration: none;
}
.wf-zeitstrahl__nav a:hover { background: var(--wp--preset--color--wald); color: #fff; }

.wf-zeitstrahl {
	position: relative;
	margin-top: var(--wp--preset--spacing--50);
	padding-left: 2.25rem;
}
.wf-zeitstrahl::before {
	content: "";
	position: absolute;
	left: 0.55rem;
	top: 0.5rem;
	bottom: 0.5rem;
	width: 3px;
	border-radius: 3px;
	background: linear-gradient(var(--wp--preset--color--moos), var(--wp--preset--color--wald));
}
.wf-zeitstrahl__eintrag { position: relative; margin-block: 0 var(--wp--preset--spacing--50) !important; }
.wf-zeitstrahl__jahr {
	position: relative;
	scroll-margin-top: 150px;
	margin-bottom: 0.5rem;
	color: var(--wp--preset--color--wald);
}
.wf-zeitstrahl__jahr::before {
	content: "";
	position: absolute;
	left: -2.25rem;
	top: 0.35em;
	width: 1.2rem;
	height: 1.2rem;
	border-radius: 50%;
	background: var(--wp--preset--color--creme);
	border: 4px solid var(--wp--preset--color--terrakotta);
	box-sizing: border-box;
}
.wf-zeitstrahl__mehr summary {
	cursor: pointer;
	font-weight: 600;
	color: var(--wp--preset--color--wald);
}
.wf-zeitstrahl__mehr[open] summary { margin-bottom: 1rem; }
.wf-zeitstrahl__notiz { font-style: italic; color: var(--wp--preset--color--grau); font-size: 0.95rem; }
.wf-zeitstrahl__bilder img { border-radius: 8px; }

/* Tabellen */
.wf-tabelle table { border-collapse: collapse; width: 100%; font-size: 0.98rem; }
.wf-tabelle th, .wf-tabelle td { border: 0; border-bottom: 1px solid var(--wp--preset--color--sand); padding: 0.5rem 0.6rem; text-align: left; vertical-align: top; }
.wf-tabelle thead th { border-bottom: 2px solid var(--wp--preset--color--wald); color: var(--wp--preset--color--wald-dunkel); }
.wf-tabelle table.has-fixed-layout td:first-child { white-space: nowrap; }
@media (max-width: 600px) {
	.wf-zeitstrahl__nav {
		top: calc(var(--wp-admin--admin-bar--height, 0px) + 74px);
		flex-wrap: nowrap;
		overflow-x: auto;
		scrollbar-width: none;
		margin-inline: calc(-1 * var(--wp--preset--spacing--40));
		padding-inline: var(--wp--preset--spacing--40);
	}
	.wf-zeitstrahl__nav a { flex: 0 0 auto; }
	.wf-tabelle table.has-fixed-layout { table-layout: auto; }
	.wf-zeitstrahl { padding-left: 1.75rem; }
	.wf-zeitstrahl__jahr::before { left: -1.75rem; }
	.wf-zeitstrahl::before { left: 0.35rem; }
}

/* ---------- Karten-Raster (Funktionsträger, Geräte, Kacheln) ---------- */
.wf-karten { gap: 1.25rem; margin-bottom: var(--wp--preset--spacing--50); }
.wf-karten > .wf-card { padding: 1.25rem 1.35rem; margin: 0 !important; display: flex; flex-direction: column; gap: 0.4rem; }
.wf-card h3 { font-size: 1.15rem; margin: 0.25rem 0 0; }
.wf-card p { margin: 0; }
.wf-person { align-items: flex-start; }
.wf-person__foto { margin: 0 0 0.4rem !important; }
.wf-person__foto img { width: 84px; height: 84px; object-fit: cover; border-radius: 50%; }
.wf-person__initialen {
	width: 84px; height: 84px; border-radius: 50%;
	display: grid; place-items: center;
	background: var(--wp--preset--color--salbei); color: var(--wp--preset--color--wald);
	font-family: var(--wp--preset--font-family--serif); font-size: 1.6rem; font-weight: 600;
	margin-bottom: 0.4rem !important;
}
.wf-person__kontakt { font-size: 0.95rem; color: var(--wp--preset--color--grau); overflow-wrap: anywhere; }
.wf-geraet__foto, .wf-geraet__symbol { margin: 0 0 0.5rem !important; }
.wf-geraet__symbol img { display: block; width: 72px; height: 72px; }
.wf-geraet__foto img { border-radius: 10px; width: 100%; height: 160px; object-fit: contain; background: #fff; }
.wf-geraet__preis { margin-top: auto !important; padding-top: 0.5rem; color: var(--wp--preset--color--wald-dunkel); }
.wf-kachel a { font-weight: 600; text-decoration: none; }

/* Fragen und Antworten */
.wp-block-details { border-bottom: 1px solid var(--wp--preset--color--sand); padding-block: 0.9rem; }
.wp-block-details summary { cursor: pointer; font-weight: 600; font-size: 1.08rem; color: var(--wp--preset--color--wald-dunkel); }
.wp-block-details[open] summary { margin-bottom: 0.6rem; }

/* Entwurfsmarkierung für den Review – vor dem Livegang entfernen */
.wf-pruefen { background: #ffe8a3; color: #6b4b00; padding: 0 0.3em; border-radius: 4px; font-size: 0.9em; }
.wf-tabelle table:not(.has-fixed-layout) td:last-child, .wf-tabelle table:not(.has-fixed-layout) th:last-child { text-align: right; white-space: nowrap; }
.wf-tabelle table:not(.has-fixed-layout) td:nth-child(2):not(:last-child) { color: var(--wp--preset--color--grau); white-space: nowrap; }
@media (max-width: 600px) {
	.wf-tabelle table:not(.has-fixed-layout) td { white-space: normal !important; }
	.wf-tabelle th, .wf-tabelle td { padding: 0.45rem 0.3rem; font-size: 0.9rem; }
}
