/*
Theme Name: HFD Theme
Theme URI: https://housingfirstduesseldorf.de/
Author: Housing First Düsseldorf
Author URI: https://housingfirstduesseldorf.de/
Description: Schlankes Theme für Housing First Düsseldorf. Farben, Schriften, Logo, Menüleiste und Fußbereich lassen sich unter „Design › Customizer › Theme-Optionen“ einstellen.
Version: 1.0.14
Requires at least: 6.4
Tested up to: 7.1
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: hfd-theme
*/

/* Standardwerte – werden durch die Customizer-Einstellungen überschrieben (inc/customizer.php) */
:root {
	--hfd-primary: #186052;
	--hfd-accent: #c91f8c;
	--hfd-text: #1a1a1a;
	--hfd-page-bg: #f0f1f3;
	--hfd-content-bg: #ffffff;
	--hfd-nav-bg: #ffffff;
	--hfd-content-width: 1200px;
	--hfd-logo-width: 160px;
	--hfd-logo-ratio: 1.65;
	--hfd-nav-button-height: 3.25rem;
	--hfd-font-body: "Heimat Sans", "Helvetica Neue", Arial, sans-serif;
	--hfd-font-heading: "Heimat Sans", "Helvetica Neue", Arial, sans-serif;
	--hfd-gutter: clamp(1rem, 5vw, 4rem);
}

/* Grundlagen ---------------------------------------------------------- */

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	-webkit-text-size-adjust: 100%;
}

body {
	margin: 0;
	background: var(--hfd-page-bg);
	color: var(--hfd-text);
	font-family: var(--hfd-font-body);
	font-size: 1.2rem;
	line-height: 1.5;
	hyphens: auto;
	overflow-wrap: break-word;
}

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

a {
	color: var(--hfd-primary);
	text-underline-offset: 0.15em;
}

a:hover,
a:focus {
	color: var(--hfd-accent);
}

:focus-visible {
	outline: 3px solid var(--hfd-accent);
	outline-offset: 2px;
}

h1,
h2,
h3,
h4,
h5,
h6 {
	font-family: var(--hfd-font-heading);
	font-weight: 700;
	line-height: 1.1;
	margin: 1.5em 0 0.5em;
}

h1 { font-size: clamp(2rem, 4vw, 2.5rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
h3 { font-size: 1.4rem; }
h4 { font-size: 1.2rem; }

blockquote {
	margin: 1.5em 0;
	padding-left: 1.25em;
	border-left: 4px solid var(--hfd-primary);
}

hr {
	border: 0;
	border-top: 1px solid rgba(0, 0, 0, 0.15);
	margin: 2em 0;
}

/* Barrierefreiheit ----------------------------------------------------- */

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

.skip-link:focus {
	position: fixed !important;
	top: 0.5rem;
	left: 0.5rem;
	z-index: 1000;
	width: auto;
	height: auto;
	margin: 0;
	padding: 0.75rem 1rem;
	clip-path: none;
	background: var(--hfd-content-bg);
	color: var(--hfd-text);
}

/* Buttons -------------------------------------------------------------- */

.hfd-button,
.wp-element-button,
.wp-block-button__link,
input[type="submit"],
button.search-submit {
	display: inline-block;
	padding: 0.6em 1.2em;
	border: 0;
	border-radius: 0;
	background: var(--hfd-primary);
	color: #fff;
	font: inherit;
	text-decoration: none;
	cursor: pointer;
}

.hfd-button:hover,
.hfd-button:focus,
.wp-element-button:hover,
.wp-block-button__link:hover,
input[type="submit"]:hover,
button.search-submit:hover {
	background: var(--hfd-accent);
	color: #fff;
}

/* Kontaktleiste -------------------------------------------------------- */

/* Wie Kopfzeile und Inhalt: nur so breit wie die Inhaltsfläche */
.topbar {
	color: #fff;
	font-size: 0.875rem;
}

.topbar-inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.25rem 1.5rem;
	max-width: var(--hfd-content-width);
	margin: 0 auto;
	padding: 0.4rem var(--hfd-gutter);
	background: var(--hfd-accent);
}

.topbar-item {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	color: inherit;
	text-decoration: none;
}

.topbar-item:hover,
.topbar-item:focus {
	color: inherit;
	text-decoration: underline;
}

.topbar .icon {
	flex: none;
	width: 1.1rem;
	height: 1.1rem;
}

.topbar-social {
	display: flex;
	gap: 1rem;
	margin-left: auto;
}

.topbar :focus-visible {
	outline-color: #fff;
}

/* Kopfzeile ------------------------------------------------------------ */

/* Die Kopfzeile ist so breit wie die Inhaltsfläche; außen bleibt der Seitenhintergrund sichtbar. */
.site-header {
	position: relative;
	z-index: 100;
}

.site-header.is-sticky {
	position: sticky;
	top: 0;
}

.admin-bar .site-header.is-sticky {
	top: 32px;
}

.site-header-inner {
	display: flex;
	align-items: center;
	gap: 1rem 2rem;
	max-width: var(--hfd-content-width);
	margin: 0 auto;
	padding: 1rem var(--hfd-gutter);
	background: var(--hfd-nav-bg);
	border-bottom: 1px solid rgba(0, 0, 0, 0.08);
	transition: padding 0.2s ease, box-shadow 0.2s ease;
}

.site-header.is-scrolled .site-header-inner {
	box-shadow: 0 2px 16px rgba(0, 0, 0, 0.08);
}

.site-header.is-scrolled .site-header-inner {
	padding-top: 0.375rem;
	padding-bottom: 0.375rem;
}

.site-branding {
	flex: none;
}

.site-branding .custom-logo-link {
	display: block;
}

.site-branding .custom-logo {
	display: block;
	width: var(--hfd-logo-width);
	max-width: 100%;
	height: auto;
	transition: width 0.2s ease;
}

/* Beim Scrollen schrumpft das Logo auf die Höhe des Spenden-Buttons */
.site-header.is-scrolled .custom-logo {
	width: calc(var(--hfd-nav-button-height) * var(--hfd-logo-ratio));
}

.site-title {
	margin: 0;
	font-family: var(--hfd-font-heading);
	font-size: 1.5rem;
	font-weight: 700;
	line-height: 1.1;
}

.site-title a {
	color: var(--hfd-text);
	text-decoration: none;
}

.site-description {
	margin: 0.25rem 0 0;
	font-size: 0.95rem;
}

/* Navigation ----------------------------------------------------------- */

.main-navigation {
	margin-left: auto;
}

.main-navigation ul {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.25rem 1.75rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

@media (max-width: 1279px) {
	.main-navigation ul {
		column-gap: 1.25rem;
	}

	.site-header-inner {
		column-gap: 1.25rem;
	}
}

/* Desktop: Logo links, Menü in der Mitte, Button („menu-button“) ganz rechts */
@media (min-width: 1080px) {
	.site-header-inner {
		position: relative;
		display: grid;
		grid-template-columns: 1fr auto 1fr;
	}

	.site-branding {
		grid-column: 1;
		justify-self: start;
	}

	.main-navigation {
		grid-column: 2;
		margin-left: 0;
	}

	.main-navigation ul {
		justify-content: center;
	}

	.main-navigation .menu-button,
	.main-navigation .menu-klingel {
		position: absolute;
		top: 50%;
		right: var(--hfd-gutter);
		transform: translateY(-50%);
	}
}

.main-navigation li {
	position: relative;
	display: flex;
	align-items: center;
}

.main-navigation a {
	display: block;
	padding: 0.5rem 0;
	color: var(--hfd-text);
	font-size: 1.05rem;
	text-decoration: none;
	white-space: nowrap;
}

.main-navigation a:hover,
.main-navigation a:focus-visible {
	color: var(--hfd-primary);
}

.main-navigation .current-menu-item > a,
.main-navigation .current_page_item > a,
.main-navigation .current-menu-ancestor > a {
	text-decoration: underline;
	text-decoration-color: var(--hfd-primary);
	text-decoration-thickness: 2px;
	text-underline-offset: 0.45em;
}

/* Spenden-Button: Menüpunkt mit der CSS-Klasse „menu-button“ */
.main-navigation .menu-button > a {
	display: inline-flex;
	align-items: center;
	height: var(--hfd-nav-button-height);
	padding: 0 1.3rem;
	border-radius: 999px;
	background: var(--hfd-primary);
	color: #fff;
	text-decoration: none;
}

.main-navigation .menu-button > a:hover,
.main-navigation .menu-button > a:focus-visible {
	background: color-mix(in srgb, var(--hfd-primary) 80%, #000);
	color: #fff;
}

/* Klingel-Button: Menüpunkt mit der CSS-Klasse „menu-klingel“ (inc/template-tags.php) */
.main-navigation .bell-button {
	display: block;
	height: var(--hfd-nav-button-height);
	aspect-ratio: 527 / 208;
	padding: 0;
	color: var(--hfd-accent);
	text-decoration: none;
}

.bell-button svg {
	display: block;
	width: 100%;
	height: 100%;
	overflow: visible;
}

/* Gefülltes Namensschild in der Farbe der Klingel, Handschrift weiß darauf */
.bell-button .bell-plate {
	fill: currentColor;
}

.bell-button text {
	fill: #fff;
	font-family: "Gochi Hand", var(--hfd-font-heading);
	font-size: 56px;
	font-weight: 400;
}

/* Klingelknopf: unsichtbar, beim Darüberfahren leuchtet nur er sanft (halb durchsichtig) grün auf */
.bell-button .bell-knob {
	fill: var(--hfd-primary);
	fill-opacity: 0;
	transition: fill-opacity 0.15s ease-out;
}

.main-navigation .bell-button:hover .bell-knob,
.main-navigation .bell-button:focus-visible .bell-knob {
	fill-opacity: 0.55;
}

/* Die Klingel selbst bleibt pink (sonst greift die grüne Hover-Farbe der Menülinks) */
.main-navigation .bell-button:hover,
.main-navigation .bell-button:focus-visible {
	color: var(--hfd-accent);
}

@media (prefers-reduced-motion: no-preference) {
	/* Einmal klingeln, kurz nachdem die Seite geladen ist (auf der Grafik) */
	.bell-button svg {
		animation: hfd-ring 0.6s ease-in-out 3s;
	}

	/* Bei jedem Darüberfahren klingeln (auf dem Button selbst –
	   so startet die Animation jedes Mal neu, unabhängig vom Klingeln nach dem Laden) */
	.main-navigation .bell-button:hover,
	.main-navigation .bell-button:focus-visible {
		animation: hfd-ring 0.5s ease-in-out;
	}
}

@keyframes hfd-ring {
	0%, 100% { transform: rotate(0); }
	20% { transform: rotate(-4deg); }
	40% { transform: rotate(3deg); }
	60% { transform: rotate(-2deg); }
	80% { transform: rotate(1deg); }
}

/* Untermenüs */
.submenu-toggle {
	display: inline-flex;
	align-items: center;
	margin-left: 0.15rem;
	padding: 0.25rem;
	border: 0;
	background: none;
	color: inherit;
	cursor: pointer;
}

.submenu-toggle .icon {
	width: 1rem;
	height: 1rem;
	transition: transform 0.2s ease;
}

.submenu-toggle[aria-expanded="true"] .icon {
	transform: rotate(180deg);
}

.main-navigation ul ul {
	position: absolute;
	top: 100%;
	left: -1rem;
	z-index: 10;
	display: none;
	flex-direction: column;
	align-items: stretch;
	gap: 0;
	min-width: 12rem;
	padding: 0.5rem 0;
	background: var(--hfd-nav-bg);
	border: 1px solid rgba(0, 0, 0, 0.08);
	border-radius: 8px;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.main-navigation ul ul a {
	padding: 0.5rem 1rem;
}

.main-navigation li.is-open > ul {
	display: flex;
}

@media (hover: hover) {
	.main-navigation li:hover > ul {
		display: flex;
	}
}

/* Menü-Button fürs Handy */
.menu-toggle {
	display: none;
	align-items: center;
	gap: 0.4rem;
	margin-left: auto;
	padding: 0.5rem 0;
	border: 0;
	background: none;
	color: var(--hfd-text);
	font: inherit;
	cursor: pointer;
}

.menu-toggle .icon {
	width: 1.75rem;
	height: 1.75rem;
}

.menu-toggle-open,
.menu-toggle-close {
	display: inline-flex;
}

.menu-toggle-close {
	display: none;
}

@media (max-width: 1079px) {
	.menu-toggle {
		display: inline-flex;
	}

	.menu-is-open .menu-toggle-open {
		display: none;
	}

	.menu-is-open .menu-toggle-close {
		display: inline-flex;
	}

	/* Menü als ganze Fläche unter der Kopfzeile */
	.main-navigation {
		position: fixed;
		inset: 0;
		z-index: -1;
		display: none;
		overflow-y: auto;
		margin: 0;
		padding: calc(var(--hfd-header-bottom, 6rem) + 1rem) var(--hfd-gutter) 2rem;
		background: var(--hfd-nav-bg);
	}

	.menu-is-open .main-navigation {
		display: block;
	}

	.main-navigation ul {
		flex-direction: column;
		align-items: stretch;
		gap: 0;
	}

	.main-navigation li {
		flex-wrap: wrap;
		border-bottom: 1px solid rgba(0, 0, 0, 0.08);
	}

	.main-navigation a {
		flex: 1;
		padding: 0.9rem 0;
		font-size: 1.35rem;
	}

	.submenu-toggle {
		display: none;
	}

	.main-navigation ul ul {
		position: static;
		display: flex;
		flex-basis: 100%;
		min-width: 0;
		padding: 0 0 0.75rem 1rem;
		border: 0;
		border-radius: 0;
		background: none;
		box-shadow: none;
	}

	.main-navigation ul ul li {
		border: 0;
	}

	.main-navigation ul ul a {
		padding: 0.45rem 0;
		font-size: 1.1rem;
	}

	.main-navigation .menu-button {
		margin-top: 1.5rem;
		border: 0;
	}

	.main-navigation .menu-button > a {
		display: block;
		height: auto;
		padding: 0.9rem 1.3rem;
		text-align: center;
	}

	.main-navigation .menu-klingel {
		margin-top: 1.5rem;
		border: 0;
	}

	.main-navigation .menu-klingel .bell-button {
		flex: none;
		height: 4.5rem;
	}
}

html.menu-open {
	overflow: hidden;
}

@media (max-width: 782px) {
	.admin-bar .site-header.is-sticky {
		top: 46px;
	}
}

@media (max-width: 600px) {
	.admin-bar .site-header.is-sticky {
		top: 0;
	}
}

@media (max-width: 700px) {
	/* Auf dem Handy nur Icons – Telefonnummer und E-Mail bleiben für Screenreader lesbar */
	.topbar-text {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip-path: inset(50%);
		white-space: nowrap;
	}

	.topbar-inner {
		gap: 1.5rem;
		padding-top: 0.5rem;
		padding-bottom: 0.5rem;
	}

	.topbar .icon {
		width: 1.25rem;
		height: 1.25rem;
	}
}

/* Seitenrahmen --------------------------------------------------------- */

.site {
	display: flex;
	flex-direction: column;
	min-height: 100vh;
	max-width: var(--hfd-content-width);
	margin: 0 auto;
	background: var(--hfd-content-bg);
}

.site-main {
	flex: 1;
	padding: 2.5rem var(--hfd-gutter) 3rem;
}

/* Inhalte -------------------------------------------------------------- */

.page-header,
.entry-header {
	margin-bottom: 1.5rem;
}

.page-title,
.entry-title {
	margin-top: 0.5em;
}

.entry-title a {
	color: inherit;
	text-decoration: none;
}

.entry-title a:hover {
	color: var(--hfd-primary);
}

.entry-meta {
	margin: 0;
	font-size: 0.9rem;
	opacity: 0.75;
}

.post-thumbnail img {
	display: block;
	width: 100%;
}

.entry-content > .alignwide {
	max-width: none;
}

.entry-content > .alignfull {
	max-width: none;
	margin-right: calc(-1 * var(--hfd-gutter));
	margin-left: calc(-1 * var(--hfd-gutter));
}

.alignleft {
	float: left;
	margin: 0.3em 1.5em 1em 0;
}

.alignright {
	float: right;
	margin: 0.3em 0 1em 1.5em;
}

/* Auf kleinen Bildschirmen keine schmale Textspalte neben Bildern */
@media (max-width: 600px) {
	.entry-content .wp-block-image:is(.alignleft, .alignright),
	.entry-content .wp-block-image > :is(.alignleft, .alignright) {
		float: none;
		margin: 1rem 0;
	}
}

.aligncenter {
	display: block;
	margin-right: auto;
	margin-left: auto;
}

.wp-caption-text,
figcaption {
	font-size: 0.9rem;
	opacity: 0.8;
}

.entry-content::after {
	content: "";
	display: table;
	clear: both;
}

/* Beitragsliste */
.hentry + .hentry {
	margin-top: 3rem;
	padding-top: 3rem;
	border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.nav-links {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 1rem;
	margin-top: 3rem;
}

/* Formulare */
input[type="text"],
input[type="email"],
input[type="url"],
input[type="search"],
textarea {
	width: 100%;
	max-width: 32rem;
	padding: 0.5em 0.75em;
	border: 1px solid rgba(0, 0, 0, 0.3);
	background: #fff;
	color: var(--hfd-text);
	font: inherit;
}

.search-form {
	display: flex;
	gap: 0.5rem;
	max-width: 32rem;
}

/* Kommentare */
.comments-area {
	margin-top: 3rem;
	padding-top: 2rem;
	border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.comment-list {
	padding-left: 0;
	list-style: none;
}

.comment-list .children {
	list-style: none;
}

/* Fußbereich ----------------------------------------------------------- */

.site-footer {
	padding: 2rem var(--hfd-gutter);
	border-top: 1px solid rgba(0, 0, 0, 0.1);
	font-size: 1rem;
	text-align: center;
}

.site-footer a {
	color: inherit;
}

.footer-widgets {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
	gap: 2rem;
	margin-bottom: 2rem;
}

.footer-menu {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.5rem 1.5rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.site-info p {
	margin: 1rem 0 0;
}

/* Seitenkopf mit Illustration ------------------------------------------ */

.page-hero {
	display: flex;
	align-items: center;
	gap: 1.5rem 3rem;
	margin-bottom: 2.5rem;
}

.page-hero-text {
	flex: 1;
	min-width: 0;
}

.page-hero .entry-title {
	margin: 0;
}

.page-hero-lead {
	max-width: 40rem;
	margin: 0.75rem 0 0;
	font-size: 1.25rem;
}

.hfd-illustration {
	--mx: 0;
	--my: 0;
	position: relative;
	flex: none;
	width: clamp(110px, 13vw, 150px);
	aspect-ratio: 1;
	color: var(--hfd-primary);
}

.hfd-illustration.is-accent {
	color: var(--hfd-accent);
}

/* Zwei Ebenen, die sich beim Darüberfahren mit der Maus gegenläufig bewegen (assets/js/illustration.js) */
.hfd-illustration-bg,
.hfd-illustration-art {
	position: absolute;
	inset: 0;
	transition: transform 0.4s ease-out;
}

.hfd-illustration-bg {
	transform: translate(calc(var(--mx) * -20px), calc(var(--my) * -20px));
}

.hfd-illustration-art {
	transform: translate(calc(var(--mx) * 18px), calc(var(--my) * 18px)) rotate(calc(var(--mx) * 5deg));
}

.hfd-illustration-blob {
	position: absolute;
	inset: 0;
	border-radius: 50%;
	background: color-mix(in srgb, currentColor 13%, #fff);
}

/* Feste Fläche von 82 % – das Motiv wird darin eingepasst, egal ob hoch- oder querformatig */
.hfd-illustration svg {
	position: absolute;
	top: 9%;
	left: 9%;
	width: 82%;
	height: 82%;
	overflow: visible;
}

/* Farbfläche erscheint, Illustration zeichnet sich Strich für Strich und schwebt einmal leicht.
   Nach spätestens 5 Sekunden steht alles still (WCAG 2.2.2) – nur der Maus-Effekt bleibt. */
@media (prefers-reduced-motion: no-preference) {
	.hfd-illustration-blob {
		animation: hfd-pop 0.7s cubic-bezier(0.2, 0.8, 0.2, 1.2) both, hfd-morph 4.2s 0.7s ease-in-out;
	}

	.hfd-illustration svg {
		animation: hfd-float 2.5s 2.4s ease-in-out;
	}

	.hfd-illustration svg :is(path, polygon) {
		opacity: 0;
		transform-box: fill-box;
		transform-origin: center;
		animation: hfd-draw 0.45s ease-out forwards;
		animation-delay: calc(350ms + var(--i) * 1600ms / var(--n));
	}
}

@keyframes hfd-pop {
	from { transform: scale(0.3); opacity: 0; }
	to { transform: none; opacity: 1; }
}

@keyframes hfd-draw {
	from { transform: scale(0.92); opacity: 0; }
	to { transform: none; opacity: 1; }
}

@keyframes hfd-float {
	0%, 100% { transform: translateY(0) rotate(0); }
	50% { transform: translateY(-8px) rotate(-1.5deg); }
}

@keyframes hfd-morph {
	0%, 100% { border-radius: 50%; }
	33% { border-radius: 58% 42% 55% 45% / 45% 58% 42% 55%; }
	66% { border-radius: 42% 58% 45% 55% / 58% 42% 55% 45%; }
}

@media (max-width: 640px) {
	/* Auf dem Handy steht die Illustration über dem Titel */
	.page-hero.has-illustration {
		flex-direction: column-reverse;
		align-items: flex-start;
		gap: 1rem;
	}

	.hfd-illustration {
		width: 110px;
	}
}

/* Bausteine (Vorlagen „Housing First“, inc/patterns.php) --------------- */

.entry-content > .hfd-facts,
.entry-content > .hfd-quote-card,
.entry-content > .hfd-people,
.entry-content > .hfd-chips,
.entry-content > .hfd-cards,
.entry-content > .hfd-faq,
.entry-content > .hfd-checklist,
.entry-content > .hfd-note,
.entry-content > .hfd-steps,
.entry-content > .hfd-timeline,
.entry-content > .hfd-compare,
.entry-content > .hfd-band,
.entry-content > .hfd-stat,
.entry-content > .hfd-bank,
.entry-content > .hfd-contact,
.entry-content > .hfd-cta {
	margin-top: 1.5rem;
	margin-bottom: 3rem;
}

/* Kontaktkarte als erster Baustein: direkt unter dem Seitenkopf */
.entry-content > .hfd-contact:first-child {
	margin-top: 0;
}

/* Klassische Themes bekommen um den Inhalt jeder Gruppe einen zusätzlichen Container –
   für die Raster-Bausteine soll er im Layout keine Rolle spielen. */
:is(.hfd-facts, .hfd-quote-card, .hfd-people, .hfd-cards, .hfd-compare, .hfd-bank, .hfd-contact, .hfd-press-item, .hfd-press-media, .hfd-sponsor) > .wp-block-group__inner-container {
	display: contents;
}

/* Fakten auf einen Blick */
.hfd-facts {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
	gap: 1rem;
}

.hfd-fact {
	padding: 1.25rem 1.5rem;
	border-radius: 12px;
	background: var(--hfd-page-bg);
}

.hfd-fact p {
	margin: 0;
	font-size: 1rem;
	line-height: 1.4;
}

.hfd-fact .hfd-fact-number {
	margin-bottom: 0.35rem;
	color: var(--hfd-accent);
	font-family: var(--hfd-font-heading);
	font-size: clamp(2rem, 4vw, 2.6rem);
	font-weight: 700;
	line-height: 1.05;
}

/* Zitat mit Foto */
.hfd-quote-card {
	display: grid;
	grid-template-columns: minmax(7rem, 10rem) 1fr;
	align-items: center;
	gap: 1.5rem 2.5rem;
	padding: 2rem;
	border-radius: 12px;
	background: var(--hfd-page-bg);
}

.hfd-quote-card .wp-block-image {
	margin: 0;
}

.hfd-quote-card img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 10px;
}

.hfd-quote-card blockquote {
	margin: 0;
	padding: 0;
	border: 0;
}

.hfd-quote-card blockquote p {
	margin: 0 0 1rem;
	font-size: clamp(1.15rem, 2vw, 1.35rem);
	line-height: 1.45;
}

.wp-block-quote cite {
	display: block;
	font-size: 0.95rem;
	font-style: normal;
	opacity: 0.8;
}

@media (max-width: 600px) {
	.hfd-quote-card {
		grid-template-columns: 1fr;
		padding: 1.5rem;
	}

	.hfd-quote-card .wp-block-image {
		max-width: 9rem;
	}
}

/* Hervorgehobenes Zitat */
.wp-block-quote.hfd-highlight {
	margin: 2.5rem 0;
	padding: 0.25rem 0 0.25rem 1.5rem;
	border-left: 4px solid var(--hfd-accent);
}

.hfd-highlight p {
	margin: 0 0 0.5rem;
	font-family: var(--hfd-font-heading);
	font-size: clamp(1.35rem, 2.6vw, 1.75rem);
	font-weight: 700;
	line-height: 1.3;
}

/* Personenkarten */
/* Alle Karten gleich hoch; „Mehr über …“ direkt unter Name und Funktion, freier Platz unten in der Karte */
.hfd-people {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 18rem), 1fr));
	grid-auto-rows: 1fr;
	align-items: stretch;
	gap: 1rem;
}

/* Ist ein „Mehr über …“ geöffnet, wächst nur diese Karte – die anderen behalten ihre Höhe */
.hfd-people:has(details[open]) {
	grid-auto-rows: auto;
	align-items: start;
}

/* Mit Skript (people.js): Mindesthöhe = höchste geschlossene Karte. So bleiben beim Öffnen auch dann alle anderen
   Karten unverändert, wenn Namen unterschiedlich umbrechen. */
.hfd-people.has-equal-height {
	grid-auto-rows: auto;
	align-items: start;
}

.hfd-people.has-equal-height .hfd-person {
	min-height: var(--hfd-person-min, auto);
}

/* Ab zwei Spalten klappt „Mehr über …“ als Fläche unter der Karte auf und legt sich über das, was darunter steht –
   so bewegt sich keine andere Karte. Am Handy (eine Spalte) klappt der Text ganz normal auf. */
@media (min-width: 48rem) {
	.hfd-person {
		position: relative;
	}

	.hfd-person:has(details[open]) {
		z-index: 20;
		border-bottom-right-radius: 0;
		border-bottom-left-radius: 0;
		background: var(--hfd-content-bg);
		box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
	}

	.hfd-person details[open] > :not(summary) {
		position: absolute;
		top: calc(100% - 1px);
		right: -1px;
		left: -1px;
		margin: 0;
		padding: 0.25rem 1.5rem 1.25rem;
		border: 1px solid rgba(0, 0, 0, 0.1);
		border-top: 0;
		border-radius: 0 0 12px 12px;
		background: var(--hfd-content-bg);
		box-shadow: 0 16px 28px rgba(0, 0, 0, 0.12);
	}
}

.hfd-person {
	display: flex;
	flex-direction: column;
	padding: 1.25rem 1.5rem;
	border: 1px solid rgba(0, 0, 0, 0.1);
	border-radius: 12px;
}

.hfd-person > .wp-block-group__inner-container {
	display: flex;
	flex: 1;
	flex-direction: column;
}

.hfd-person p {
	margin: 0;
}

.hfd-person .hfd-avatar {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 3rem;
	height: 3rem;
	margin-bottom: 0.85rem;
	border-radius: 50%;
	background: color-mix(in srgb, var(--hfd-primary) 13%, #fff);
	color: var(--hfd-primary);
	font-size: 1rem;
	font-weight: 700;
}

.hfd-person .hfd-avatar.is-accent {
	background: color-mix(in srgb, var(--hfd-accent) 13%, #fff);
	color: color-mix(in srgb, var(--hfd-accent) 80%, #000); /* Kontrast ≥ 4,5 : 1 auf der hellen Fläche */
}

.hfd-person-name {
	font-family: var(--hfd-font-heading);
	font-weight: 700;
}

.hfd-person-role {
	font-size: 0.95rem;
	opacity: 0.75;
}

.hfd-person .wp-block-details {
	margin-top: 0; /* direkt unter Name und Funktion – beim Öffnen springt der Link nicht */
	padding-top: 0.85rem;
	font-size: 1rem;
}

.hfd-person summary {
	color: var(--hfd-primary);
	cursor: pointer;
}

.hfd-person details p {
	margin-top: 0.6rem;
}

/* Partner-Liste */
.hfd-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	padding: 0;
	list-style: none;
}

.hfd-chips li {
	padding: 0.4rem 1rem;
	border: 1px solid rgba(0, 0, 0, 0.15);
	border-radius: 999px;
	font-size: 1rem;
}

/* Mitmachen-Box */
.hfd-cta {
	padding: 2rem 2.25rem;
	border-radius: 12px;
	background: var(--hfd-primary);
	color: #fff;
}

.hfd-cta h2 {
	margin: 0 0 1.25rem;
	color: inherit;
}

.hfd-cta .wp-block-buttons {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
}

.hfd-cta .wp-block-button__link {
	border: 2px solid #fff;
	border-radius: 999px;
	background: #fff;
	color: var(--hfd-primary);
}

.hfd-cta .is-style-outline .wp-block-button__link {
	background: transparent;
	color: #fff;
}

.hfd-cta .wp-block-button__link:hover,
.hfd-cta .wp-block-button__link:focus-visible {
	border-color: var(--hfd-accent);
	background: var(--hfd-accent);
	color: #fff;
}

/* Karten */
.hfd-cards {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
	gap: 1rem;
}

.hfd-card {
	display: flex;
	flex-direction: column;
	padding: 1.5rem;
	border-radius: 12px;
	background: var(--hfd-page-bg);
}

.hfd-card > .wp-block-group__inner-container {
	display: flex;
	flex: 1;
	flex-direction: column;
}

.hfd-card h3 {
	margin: 0 0 0.5rem;
	font-size: 1.3rem;
}

.hfd-card p {
	margin: 0 0 0.75rem;
	font-size: 1.05rem;
}

.hfd-card .hfd-card-link {
	margin: auto 0 0;
	font-weight: 700;
}

/* Größere Klickfläche (mind. 44 px hoch), gut antippbar auf dem Handy */
.hfd-card .hfd-card-link a {
	display: inline-block;
	padding: 0.65rem 0;
}

.hfd-card .hfd-card-link:last-child {
	margin-bottom: -0.65rem;
}

/* Häufige Fragen */
.hfd-faq .wp-block-details {
	border-bottom: 1px solid rgba(0, 0, 0, 0.12);
}

.hfd-faq .wp-block-details:first-child {
	border-top: 1px solid rgba(0, 0, 0, 0.12);
}

.hfd-faq summary,
.hfd-press-older > summary {
	position: relative;
	padding: 1rem 2.5rem 1rem 0;
	font-family: var(--hfd-font-heading);
	font-size: 1.15rem;
	font-weight: 700;
	list-style: none;
	cursor: pointer;
}

.hfd-faq summary::-webkit-details-marker,
.hfd-press-older > summary::-webkit-details-marker {
	display: none;
}

/* Plus/Minus statt Dreieck */
.hfd-faq summary::after,
.hfd-press-older > summary::after {
	content: "+";
	position: absolute;
	top: 50%;
	right: 0.25rem;
	transform: translateY(-50%);
	color: var(--hfd-accent);
	font-size: 1.6rem;
	font-weight: 400;
	line-height: 1;
}

.hfd-faq details[open] summary::after,
.hfd-press-older[open] > summary::after {
	content: "–";
}

.hfd-faq summary:hover,
.hfd-faq summary:focus-visible,
.hfd-press-older > summary:hover,
.hfd-press-older > summary:focus-visible {
	color: var(--hfd-primary);
}

.hfd-faq details > :not(summary) {
	margin: 0 0 1rem;
}

/* Hervorgehobener Satz */
.entry-content .hfd-callout {
	margin: 2rem 0;
	padding: 1.25rem 1.5rem;
	border-left: 4px solid var(--hfd-accent);
	border-radius: 0 12px 12px 0;
	background: color-mix(in srgb, var(--hfd-accent) 7%, #fff);
	font-family: var(--hfd-font-heading);
	font-size: clamp(1.2rem, 2.2vw, 1.45rem);
	font-weight: 700;
	line-height: 1.35;
}

/* Checkliste */
.hfd-checklist {
	padding: 0;
	list-style: none;
}

.hfd-checklist li {
	position: relative;
	margin: 0 0 0.85rem;
	padding-left: 2.5rem;
}

.hfd-checklist li::before {
	content: "";
	position: absolute;
	top: 0.05em;
	left: 0;
	width: 1.6rem;
	height: 1.6rem;
	border-radius: 50%;
	background: color-mix(in srgb, var(--hfd-primary) 13%, #fff);
}

/* Häkchen */
.hfd-checklist li::after {
	content: "";
	position: absolute;
	top: 0.4em;
	left: 0.55rem;
	width: 0.45rem;
	height: 0.75rem;
	border: solid var(--hfd-primary);
	border-width: 0 3px 3px 0;
	transform: rotate(45deg);
}

/* Hinweis */
.hfd-note {
	padding: 1.25rem 1.5rem;
	border: 1px solid rgba(0, 0, 0, 0.15);
	border-radius: 12px;
}

.hfd-note :is(h2, h3) {
	margin: 0 0 0.4rem;
	font-size: 1.15rem;
}

.hfd-note p {
	margin: 0;
}

/* Buttons im Seitenkopf */
.page-hero .hfd-hero-buttons {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	margin-top: 1.5rem;
}

.page-hero .hfd-hero-buttons .wp-block-button__link {
	padding: 0.75rem 1.4rem;
	border: 2px solid var(--hfd-primary);
	border-radius: 999px;
}

.page-hero .hfd-hero-buttons .is-style-outline .wp-block-button__link {
	background: transparent;
	color: var(--hfd-primary);
}

.page-hero .hfd-hero-buttons .wp-block-button__link:hover,
.page-hero .hfd-hero-buttons .wp-block-button__link:focus-visible {
	border-color: var(--hfd-accent);
	background: var(--hfd-accent);
	color: #fff;
}

/* Schritte */
.hfd-steps {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr));
	gap: 1.25rem 2rem;
	padding: 0;
	list-style: none;
	counter-reset: hfd-step;
}

.hfd-steps li {
	position: relative;
	padding-left: 3.25rem;
	counter-increment: hfd-step;
}

.hfd-steps li::before {
	content: counter(hfd-step);
	position: absolute;
	top: 0;
	left: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 2.4rem;
	height: 2.4rem;
	border-radius: 50%;
	background: var(--hfd-accent);
	color: #fff;
	font-family: var(--hfd-font-heading);
	font-weight: 700;
}

.hfd-steps strong {
	font-family: var(--hfd-font-heading);
	font-size: 1.15rem;
}

/* Zeitleiste – auf großen Bildschirmen waagerecht, sonst senkrecht */
.hfd-timeline {
	position: relative;
	padding: 0;
	list-style: none;
}

.hfd-timeline li {
	position: relative;
	padding: 0 0 1.25rem 2.25rem;
}

.hfd-timeline li::before {
	content: "";
	position: absolute;
	top: 0.2rem;
	left: 0;
	width: 1rem;
	height: 1rem;
	border: 3px solid var(--hfd-accent);
	border-radius: 50%;
	background: var(--hfd-content-bg);
}

.hfd-timeline li::after {
	content: "";
	position: absolute;
	top: 1.4rem;
	bottom: 0;
	left: 0.5rem;
	width: 2px;
	background: color-mix(in srgb, var(--hfd-accent) 30%, #fff);
	transform: translateX(-50%);
}

.hfd-timeline li:last-child::after {
	display: none;
}

.hfd-timeline strong {
	color: var(--hfd-accent);
	font-family: var(--hfd-font-heading);
	font-size: 1.2rem;
}

@media (min-width: 800px) {
	.hfd-timeline {
		display: grid;
		grid-auto-columns: 1fr;
		grid-auto-flow: column;
		gap: 1.5rem;
	}

	.hfd-timeline li {
		padding: 2rem 0 0;
		text-align: center;
	}

	.hfd-timeline li::before {
		left: 50%;
		transform: translateX(-50%);
	}

	.hfd-timeline li::after {
		top: 0.7rem;
		right: calc(-50% - 0.75rem);
		bottom: auto;
		left: calc(50% + 0.75rem);
		width: auto;
		height: 2px;
		transform: none;
	}
}

/* Vergleich */
.hfd-compare {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
	gap: 1rem;
}

.hfd-compare-item {
	padding: 1.25rem 1.5rem;
	border-radius: 12px;
	background: var(--hfd-page-bg);
}

.hfd-compare-item.is-highlight {
	background: color-mix(in srgb, var(--hfd-accent) 10%, #fff);
}

.hfd-compare-item h3 {
	margin: 0 0 0.4rem;
	font-size: 1.15rem;
}

.hfd-compare-item p {
	margin: 0;
}

.hfd-compare-item p + p {
	margin-top: 0.75rem;
}

/* Karten mit Motiv (CSS-Klasse has-motif-…): Farbfläche mit kleiner Illustration */
.hfd-card[class*="has-motif-"] {
	position: relative;
	padding-top: 5.5rem;
}

.hfd-card[class*="has-motif-"]::before,
.hfd-card[class*="has-motif-"]::after {
	content: "";
	position: absolute;
	top: 1.25rem;
	left: 1.5rem;
	width: 3.5rem;
	height: 3.5rem;
}

.hfd-card[class*="has-motif-"]::before {
	border-radius: 50%;
	background: color-mix(in srgb, var(--hfd-motif-color, var(--hfd-primary)) 14%, #fff);
}

.hfd-card[class*="has-motif-"]::after {
	background: var(--hfd-motif-color, var(--hfd-primary));
	-webkit-mask: var(--hfd-motif) center / 72% no-repeat;
	mask: var(--hfd-motif) center / 72% no-repeat;
}

.has-motif-schluessel-gruen { --hfd-motif: url("assets/illustrations/schluessel-gruen.svg"); }
.has-motif-schluessel-pink { --hfd-motif: url("assets/illustrations/schluessel-pink.svg"); --hfd-motif-color: var(--hfd-accent); }
.has-motif-klingel { --hfd-motif: url("assets/illustrations/klingel.svg"); }
/* Es gibt nur noch den eingerichteten Grundriss – die alten Klassen zeigen ihn ebenfalls */
:is(.has-motif-grundriss-1-eingerichtet, .has-motif-grundriss-1, .has-motif-grundriss-2) { --hfd-motif: url("assets/illustrations/grundriss-1-eingerichtet.svg"); --hfd-motif-color: var(--hfd-accent); }
.has-motif-pflanze-1 { --hfd-motif: url("assets/illustrations/pflanze-1.svg"); }
.has-motif-pflanze-2 { --hfd-motif: url("assets/illustrations/pflanze-2.svg"); }
.has-motif-pflanze-3 { --hfd-motif: url("assets/illustrations/pflanze-3.svg"); }
.has-motif-rahmen { --hfd-motif: url("assets/illustrations/rahmen.svg"); }

/* Grünes Band */
.hfd-band {
	position: relative;
	overflow: hidden;
	padding: 2rem 7.5rem 2rem 2.25rem;
	border-radius: 12px;
	background: var(--hfd-primary);
	color: #fff;
}

.hfd-band h2 {
	margin: 0 0 0.85rem;
	color: inherit;
	font-size: clamp(1.25rem, 2.4vw, 1.6rem);
	line-height: 1.3;
}

.hfd-band p {
	margin: 0;
	color: color-mix(in srgb, #fff 88%, var(--hfd-primary));
}

.hfd-band a {
	color: #fff;
	text-decoration-thickness: 2px;
}

.hfd-band a:hover,
.hfd-band a:focus-visible {
	color: #fff;
	text-decoration-color: var(--hfd-accent);
}

.hfd-band :focus-visible {
	outline-color: #fff;
}

/* Kleine Pflanze unten rechts */
.hfd-band::after {
	content: "";
	position: absolute;
	right: 1.5rem;
	bottom: 1.25rem;
	width: 4.5rem;
	height: 4.5rem;
	background: color-mix(in srgb, #fff 55%, var(--hfd-primary));
	-webkit-mask: url("assets/illustrations/pflanze-3.svg") center / contain no-repeat;
	mask: url("assets/illustrations/pflanze-3.svg") center / contain no-repeat;
}

@media (max-width: 600px) {
	.hfd-band {
		padding: 1.5rem 1.5rem 6.5rem;
	}
}

/* Handgezeichnete Unterstreichung im Titel */
.hfd-underline {
	position: relative;
	display: inline-block;
}

.hfd-underline svg {
	position: absolute;
	left: -0.05em;
	bottom: -0.18em;
	width: 102%;
	height: 0.32em;
	overflow: visible;
}

.hfd-underline path {
	fill: none;
	stroke: var(--hfd-accent);
	stroke-width: 3.5;
	stroke-linecap: round;
}

@media (prefers-reduced-motion: no-preference) {
	.hfd-underline path {
		stroke-dasharray: 1 2;
		stroke-dashoffset: 1.02; /* knapp vor dem Anfang, damit vorab kein Punkt zu sehen ist */
		animation: hfd-underline 1.1s 0.5s ease-out forwards;
	}
}

@keyframes hfd-underline {
	to { stroke-dashoffset: 0; }
}

/* Startseite: Seitenkopf als Fläche, größere Überschrift */
.home .page-hero {
	margin: -2.5rem calc(-1 * var(--hfd-gutter)) 2.5rem;
	padding: 3rem var(--hfd-gutter);
	background: color-mix(in srgb, var(--hfd-page-bg) 65%, #fff);
}

.home .page-hero .entry-title {
	font-size: clamp(2.2rem, 5vw, 3.25rem);
	line-height: 1.1;
}

.home .page-hero-lead {
	font-size: clamp(1.2rem, 2vw, 1.4rem);
}

/* Startseite: ruhigere Textspalte (ca. 65 Zeichen), das Band bleibt breit */
.home .entry-content > :not(.hfd-band) {
	max-width: 42rem;
	margin-right: auto;
	margin-left: auto;
}

/* Sanftes Einblenden (assets/js/reveal.js setzt die Klasse js-reveal nur ohne „Bewegung reduzieren“) */
.js-reveal .entry-content > * {
	opacity: 0;
	transform: translateY(14px);
	transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.js-reveal .entry-content > .is-revealed {
	opacity: 1;
	transform: none;
}

/* Kennzahl: große Zahl, Text daneben */
.hfd-stat > .wp-block-group__inner-container {
	display: contents;
}

.hfd-stat {
	display: grid;
	grid-template-columns: auto 1fr;
	align-items: center;
	gap: 0.5rem 2rem;
	padding: 1.75rem 2rem;
	border-radius: 12px;
	background: color-mix(in srgb, var(--hfd-accent) 7%, #fff);
}

.hfd-stat p {
	grid-column: 2;
	margin: 0;
}

.hfd-stat .hfd-stat-number {
	grid-column: 1;
	grid-row: 1 / span 3;
	color: var(--hfd-accent);
	font-family: var(--hfd-font-heading);
	font-size: clamp(2.5rem, 6vw, 4rem);
	font-weight: 700;
	line-height: 1;
	white-space: nowrap;
}

@media (max-width: 600px) {
	.hfd-stat {
		grid-template-columns: 1fr;
		padding: 1.5rem;
	}

	.hfd-stat p,
	.hfd-stat .hfd-stat-number {
		grid-column: 1;
		grid-row: auto;
	}
}

/* Spendenkonto */
.hfd-bank {
	display: grid;
	grid-template-columns: 1fr auto;
	align-items: center;
	gap: 1.5rem 2.5rem;
	padding: 2rem 2.25rem;
	border-radius: 12px;
	background: var(--hfd-primary);
	color: #fff;
}

.hfd-bank p {
	margin: 0.3rem 0;
}

.hfd-bank .hfd-handwriting {
	margin: 0 0 0.85rem;
	color: color-mix(in srgb, var(--hfd-accent) 25%, #fff);
	font-family: "Gochi Hand", var(--hfd-font-heading);
	font-size: clamp(1.8rem, 3.5vw, 2.4rem);
	line-height: 1.1;
}

.hfd-bank-label {
	display: inline-block;
	min-width: 7.5rem;
	color: color-mix(in srgb, #fff 72%, var(--hfd-primary));
}

.hfd-iban {
	font-size: 1.15rem;
	letter-spacing: 0.03em;
	font-variant-numeric: tabular-nums;
}

.hfd-copy {
	margin-left: 0.75rem;
	padding: 0.35rem 0.9rem;
	border: 2px solid #fff;
	border-radius: 999px;
	background: transparent;
	color: #fff;
	font: inherit;
	font-size: 0.9rem;
	cursor: pointer;
	vertical-align: middle;
}

.hfd-copy:hover,
.hfd-copy:focus-visible {
	background: #fff;
	color: var(--hfd-primary);
}

.hfd-bank :focus-visible {
	outline-color: #fff;
}

.hfd-bank .hfd-bank-qr {
	width: 11rem;
	margin: 0;
	padding: 0.75rem 0.75rem 0.5rem;
	border-radius: 10px;
	background: #fff;
	color: var(--hfd-text);
	text-align: center;
}

.hfd-bank-qr img {
	display: block;
	width: 100%;
	height: auto;
}

.hfd-bank-qr figcaption {
	margin-top: 0.35rem;
	font-size: 0.85rem;
	line-height: 1.3;
	opacity: 1;
}

@media (max-width: 700px) {
	.hfd-bank {
		grid-template-columns: 1fr;
		padding: 1.5rem;
	}

	.hfd-bank-label {
		display: block;
		min-width: 0;
		font-size: 0.9rem;
	}

	.hfd-copy {
		margin: 0.5rem 0 0;
		display: block;
	}
}

/* Etiketten als Links */
.hfd-chips a {
	color: var(--hfd-primary);
	font-weight: 700;
	text-decoration: none;
}

.hfd-chips a:hover,
.hfd-chips a:focus-visible {
	color: var(--hfd-accent);
	text-decoration: underline;
}

.hfd-chips li:has(a) {
	padding: 0;
}

.hfd-chips li > a {
	display: inline-block;
	padding: 0.55rem 1.1rem;
}

/* Hauptkontakt */
.hfd-contact {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
	gap: 1rem 2.5rem;
	padding: 2rem clamp(1.25rem, 5vw, 2.25rem);
	border-radius: 12px;
	background: var(--hfd-primary);
	color: #fff;
}

.hfd-contact p {
	margin: 0 0 0.4rem;
}

.hfd-contact a {
	color: #fff;
	text-decoration-thickness: 2px;
}

.hfd-contact a:hover,
.hfd-contact a:focus-visible {
	color: #fff;
	text-decoration-color: var(--hfd-accent);
}

.hfd-contact :focus-visible {
	outline-color: #fff;
}

/* Schlichte Variante: weiß mit Rahmen (Impressum) */
.hfd-contact.is-plain {
	border: 1px solid rgba(0, 0, 0, 0.12);
	background: var(--hfd-content-bg);
	color: inherit;
}

.hfd-contact.is-plain a {
	color: var(--hfd-primary);
	text-decoration-thickness: 1px;
}

.hfd-contact.is-plain a:hover,
.hfd-contact.is-plain a:focus-visible {
	color: var(--hfd-primary);
}

.hfd-contact.is-plain :focus-visible {
	outline-color: var(--hfd-primary);
}

/* „Stand: …“ am Ende rechtlicher Texte */
.entry-content .hfd-stand {
	margin-top: 2.5rem;
	color: rgba(0, 0, 0, 0.6);
	font-size: 0.95rem;
}

/* Kontaktkarten für Personen (nutzen die Personenkarten der Vereinsseite) */
.hfd-person {
	/* Schriftgröße der Kontaktzeilen: auf schmalen Handys etwas kleiner, damit auch lange Adressen in eine Zeile passen */
	--hfd-contact-size: clamp(0.875rem, 4vw, 1rem);
}

/* aus demselben Grund auf schmalen Handys etwas weniger Innenabstand an den Seiten */
.hfd-person:has(.hfd-person-phone, .hfd-person-mail) {
	padding-inline: clamp(1rem, 4.5vw, 1.5rem);
}

.hfd-person .hfd-person-phone,
.hfd-person .hfd-person-mail {
	margin-top: 0.35rem;
	font-size: var(--hfd-contact-size);
	overflow-wrap: anywhere;
}

.hfd-person .hfd-person-phone a,
.hfd-person .hfd-person-mail a {
	display: inline-block;
	padding: 0.2rem 0;
}

.hfd-person .hfd-person-name + .hfd-person-phone,
.hfd-person .hfd-person-name + .hfd-person-mail,
.hfd-person .hfd-person-name + .hfd-person-note {
	margin-top: 0.5rem;
}

.hfd-person .hfd-person-note {
	margin-top: 0.35rem;
	font-size: 0.95rem;
	font-style: italic;
	opacity: 0.75;
}

/* Fehlt eine der beiden Kontaktzeilen (z. B. keine Telefonnummer), bleibt ihr Platz frei – so sind alle Kontaktkarten gleich hoch */
.hfd-person:has(.hfd-person-mail):not(:has(.hfd-person-phone, .hfd-person-note))::after,
.hfd-person:has(.hfd-person-phone):not(:has(.hfd-person-mail, .hfd-person-note))::after {
	content: "";
	/* Abstand + Innenabstand des Links + eine Textzeile */
	height: calc(0.75rem + 1.5 * var(--hfd-contact-size));
}

/* Social-Media-Links mit Icon */
.hfd-social a {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
}

.hfd-social a::before {
	content: "";
	width: 1.25rem;
	height: 1.25rem;
	background: currentColor;
	-webkit-mask: var(--hfd-social-icon) center / contain no-repeat;
	mask: var(--hfd-social-icon) center / contain no-repeat;
}

.hfd-social a[href*="facebook"] {
	--hfd-social-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 10v4h3v7h4v-7h3l1 -4h-4v-2a1 1 0 0 1 1 -1h3v-4h-3a5 5 0 0 0 -5 5v2h-3'/%3E%3C/svg%3E");
}

.hfd-social a[href*="instagram"] {
	--hfd-social-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 8a4 4 0 0 1 4 -4h8a4 4 0 0 1 4 4v8a4 4 0 0 1 -4 4h-8a4 4 0 0 1 -4 -4z'/%3E%3Cpath d='M9 12a3 3 0 1 0 6 0a3 3 0 0 0 -6 0'/%3E%3Cpath d='M16.5 7.5v.01'/%3E%3C/svg%3E");
}

/* Pressechronik: Jahre mit Ereignissen an einer senkrechten Linie (wie die Zeitleiste) */
.entry-content > .hfd-press-year:first-child h2 {
	margin-top: 0;
}

.hfd-press {
	margin: 1rem 0 2.5rem;
}

.hfd-press-item {
	position: relative;
	padding: 0 0 2rem 2.25rem;
}

.hfd-press-item::before {
	content: "";
	position: absolute;
	top: 0.3rem;
	left: 0;
	width: 1rem;
	height: 1rem;
	border: 3px solid var(--hfd-accent);
	border-radius: 50%;
	background: var(--hfd-content-bg);
}

.hfd-press-item::after {
	content: "";
	position: absolute;
	top: 1.5rem;
	bottom: 0;
	left: 0.5rem;
	width: 2px;
	background: color-mix(in srgb, var(--hfd-accent) 30%, #fff);
	transform: translateX(-50%);
}

.hfd-press-item:last-child::after {
	display: none;
}

.hfd-press-date {
	margin: 0;
	color: var(--hfd-accent);
	font-family: var(--hfd-font-heading);
	font-size: 1.1rem;
	font-weight: 700;
}

.hfd-press-item h3 {
	margin: 0.2rem 0 0.4rem;
	font-size: 1.25rem;
}

.hfd-press-item p {
	margin: 0.4rem 0;
}

.hfd-press-more a::after {
	content: " →";
}

/* Berichte mit Symbol für die Art; der Text im Symbol bleibt für Screenreader lesbar */
.hfd-press-links {
	margin: 0.75rem 0 0;
	padding: 0;
	list-style: none;
}

.hfd-press-links li {
	position: relative;
	margin: 0 0 0.6rem;
	padding-left: 1.9rem;
}

.hfd-press-links em {
	color: rgba(0, 0, 0, 0.6);
}

.hfd-press-type {
	position: absolute;
	top: 0.2em;
	left: 0;
	width: 1.2rem;
	height: 1.2rem;
	overflow: hidden;
	white-space: nowrap;
	text-indent: 1.5rem;
	background: var(--hfd-primary);
	-webkit-mask: var(--hfd-press-icon) center / contain no-repeat;
	mask: var(--hfd-press-icon) center / contain no-repeat;
}

.hfd-press-type.is-article {
	--hfd-press-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M16 6h3a1 1 0 0 1 1 1v11a2 2 0 0 1 -4 0v-13a1 1 0 0 0 -1 -1h-10a1 1 0 0 0 -1 1v12a3 3 0 0 0 3 3h11'/%3E%3Cpath d='M8 8h4'/%3E%3Cpath d='M8 12h4'/%3E%3Cpath d='M8 16h4'/%3E%3C/svg%3E");
}

.hfd-press-type.is-video {
	--hfd-press-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M15 10l4.553 -2.276a1 1 0 0 1 1.447 .894v6.764a1 1 0 0 1 -1.447 .894l-4.553 -2.276v-4z'/%3E%3Cpath d='M3 8a2 2 0 0 1 2 -2h8a2 2 0 0 1 2 2v8a2 2 0 0 1 -2 2h-8a2 2 0 0 1 -2 -2z'/%3E%3C/svg%3E");
}

.hfd-press-type.is-audio {
	--hfd-press-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 15a2 2 0 0 1 2 -2h1a2 2 0 0 1 2 2v3a2 2 0 0 1 -2 2h-1a2 2 0 0 1 -2 -2z'/%3E%3Cpath d='M15 15a2 2 0 0 1 2 -2h1a2 2 0 0 1 2 2v3a2 2 0 0 1 -2 2h-1a2 2 0 0 1 -2 -2z'/%3E%3Cpath d='M4 15v-3a8 8 0 0 1 16 0v3'/%3E%3C/svg%3E");
}

.hfd-press-type.is-pdf {
	--hfd-press-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 3v4a1 1 0 0 0 1 1h4'/%3E%3Cpath d='M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2z'/%3E%3Cpath d='M9 9h1'/%3E%3Cpath d='M9 13h6'/%3E%3Cpath d='M9 17h6'/%3E%3C/svg%3E");
}

.hfd-press-type.is-instagram {
	--hfd-press-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 8a4 4 0 0 1 4 -4h8a4 4 0 0 1 4 4v8a4 4 0 0 1 -4 4h-8a4 4 0 0 1 -4 -4z'/%3E%3Cpath d='M9 12a3 3 0 1 0 6 0a3 3 0 0 0 -6 0'/%3E%3Cpath d='M16.5 7.5v.01'/%3E%3C/svg%3E");
}

/* Kleine Vorschaubilder neben dem Ereignis, am Handy darunter */
.hfd-press-item.has-media {
	display: flex;
	gap: 1.5rem;
	align-items: flex-start;
}

.hfd-press-text {
	flex: 1;
	min-width: 0;
}

.hfd-press-media {
	display: flex;
	flex: none;
	gap: 0.75rem;
}

.hfd-press-media .wp-block-image {
	margin: 0;
}

.hfd-press-media img {
	display: block;
	width: 110px;
	height: auto;
	border: 1px solid rgba(0, 0, 0, 0.12);
	border-radius: 6px;
}

.hfd-press-media a:hover img,
.hfd-press-media a:focus-visible img,
.hfd-press-media .wp-lightbox-container:hover img,
.hfd-press-media .wp-lightbox-container:focus-within img {
	border-color: var(--hfd-primary);
}

@media (max-width: 640px) {
	.hfd-press-item.has-media {
		flex-direction: column;
		gap: 0.75rem;
	}

	.hfd-press-media img {
		width: 96px;
	}
}

/* Ältere Jahre zum Aufklappen (Aussehen wie bei den häufigen Fragen) */
.entry-content > .hfd-press-older {
	margin: 0 0 3rem;
	border-top: 1px solid rgba(0, 0, 0, 0.12);
	border-bottom: 1px solid rgba(0, 0, 0, 0.12);
}

.hfd-press-older[open] > summary {
	margin-bottom: 0.5rem;
}

/* Förderhinweis mit Logo */
.entry-content > .hfd-sponsor {
	margin: 0 0 2.5rem;
}

.hfd-sponsor {
	display: flex;
	flex-wrap: wrap;
	gap: 1rem 1.5rem;
	align-items: center;
	padding: 1rem 1.25rem;
	border: 1px solid rgba(0, 0, 0, 0.1);
	border-radius: 12px;
}

.hfd-sponsor .wp-block-image {
	flex: none;
	margin: 0;
}

.hfd-sponsor img {
	display: block;
	width: 120px;
	height: auto;
}

.hfd-sponsor p {
	flex: 1 1 14rem;
	margin: 0;
}

/* Fehlerseite (404) */
.entry-content .hfd-404-heading {
	margin: 2.5rem 0 0.75rem;
	font-size: 1.25rem;
}

.entry-content .hfd-404-heading:first-child {
	margin-top: 0;
}
