/*
Theme Name: Stadtportal
Author: Roland Grünewald
Author URI: https://www.roland-gruenewald.de
Description: Stadt-, Regions- und Branchenportal als vollständiges Gutenberg Block-Theme. Ortsunabhängig: Portalname, Ort/Region und Teilorte werden zentral in den Portal-Einstellungen gepflegt. Mit Branchen-, Orts- und Kombiseiten, Einzeleinträgen mit LocalBusiness-Schema und Ratgeber-/Antwortseiten.
Version: 1.1.0
Requires at least: 6.4
Tested up to: 6.6
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: stadtportal
Tags: full-site-editing, block-patterns, custom-colors, custom-menu, block-styles, directory
*/

/*
 * Das Theme wird vollstaendig ueber theme.json und Block-Templates gesteuert.
 * Diese Datei enthaelt nur ergaenzende Stilregeln fuer die dynamischen Blocks
 * (Karten, Gitter, Eintragsdetails), die nicht ueber theme.json abbildbar sind.
 */

/* ====================================================================
 * Lokale Schriften (DSGVO-konform, ohne Google-CDN).
 * Dateien liegen in assets/fonts/  –  Format: woff2.
 * ==================================================================== */
@font-face {
	font-family: 'Inter';
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url('assets/fonts/inter-regular.woff2') format('woff2');
}
@font-face {
	font-family: 'Inter';
	font-style: normal;
	font-weight: 600;
	font-display: swap;
	src: url('assets/fonts/inter-semibold.woff2') format('woff2');
}
@font-face {
	font-family: 'Inter';
	font-style: normal;
	font-weight: 700;
	font-display: swap;
	src: url('assets/fonts/inter-bold.woff2') format('woff2');
}
@font-face {
	font-family: 'Plus Jakarta Sans';
	font-style: normal;
	font-weight: 600;
	font-display: swap;
	src: url('assets/fonts/jakarta-semibold.woff2') format('woff2');
}
@font-face {
	font-family: 'Plus Jakarta Sans';
	font-style: normal;
	font-weight: 700;
	font-display: swap;
	src: url('assets/fonts/jakarta-bold.woff2') format('woff2');
}
@font-face {
	font-family: 'Plus Jakarta Sans';
	font-style: normal;
	font-weight: 800;
	font-display: swap;
	src: url('assets/fonts/jakarta-extrabold.woff2') format('woff2');
}

:root {
	--sp-radius: 16px;
	--sp-radius-sm: 10px;
	/* Zweistufige, weichere Schatten: nah (Kante) + fern (Tiefe). */
	--sp-shadow: 0 1px 2px rgba(16, 36, 43, 0.06), 0 8px 24px -8px rgba(16, 36, 43, 0.12);
	--sp-shadow-hover: 0 2px 4px rgba(16, 36, 43, 0.08), 0 18px 40px -12px rgba(16, 36, 43, 0.22);
	--sp-border: 1px solid rgba(43, 38, 34, 0.10);
	--sp-ease: cubic-bezier(.2, .7, .3, 1);
}

/* Sanfte Bewegungen nur für Nutzer ohne Reduced-Motion-Wunsch. */
@media (prefers-reduced-motion: reduce) {
	.sp-card, .sp-tile, .wp-block-button__link.wp-element-button,
	.sp-card__media img { transition: none !important; }
	.sp-card:hover, .sp-tile:hover { transform: none !important; }
}

/* ---------- Karten-Gitter ---------- */
.sp-grid {
	display: grid;
	gap: clamp(1rem, 2.4vw, 1.6rem);
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	grid-auto-flow: row dense;
	margin: 0;
	padding: 0;
	list-style: none;
}

.sp-grid--2 { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }

/* Featured-Grid („Empfohlene Betriebe"): auf Desktop IMMER genau 2 Kacheln
   nebeneinander, ab iPad-Hochformat (≤ 820px) eine Kachel. Die Premium-
   Spannweite (span 2) wird hier neutralisiert, sonst kollabiert das Raster
   bei mittleren Breiten zu einer einzigen Riesenkachel pro Reihe. */
.sp-grid--featured { grid-template-columns: repeat(2, 1fr); }
/* Höhere Spezifität nötig: „.sp-grid .sp-card--premium { span 2 }" steht
   später im Stylesheet und würde sonst gewinnen → 1 Riesenkachel pro Reihe. */
.sp-grid.sp-grid--featured .sp-card--premium { grid-column: auto; }
@media (max-width: 820px) {
	.sp-grid--featured { grid-template-columns: 1fr; }
}

.sp-card {
	display: flex;
	flex-direction: column;
	background: var(--wp--preset--color--base, #fff);
	border: var(--sp-border);
	border-radius: var(--sp-radius);
	overflow: hidden;
	box-shadow: var(--sp-shadow);
	transition: transform .22s var(--sp-ease), box-shadow .22s var(--sp-ease), border-color .22s var(--sp-ease);
	height: 100%;
}

.sp-card:hover { transform: translateY(-4px); box-shadow: var(--sp-shadow-hover); }
.sp-card:focus-within { box-shadow: var(--sp-shadow-hover); }
.sp-card a:focus-visible {
	outline: 2px solid var(--wp--preset--color--primary, #11b5a6);
	outline-offset: 2px;
	border-radius: 4px;
}

.sp-card__media {
	position: relative;
	aspect-ratio: 16 / 10;
	background: #f4f7f6;
	overflow: hidden;
}

.sp-card__media img {
	width: 100%;
	height: 100%;
	/* contain statt cover: das ganze Bild bleibt sichtbar, nichts wird
	   abgeschnitten. Off-Format-Bilder bekommen ruhige Randflaechen. */
	object-fit: contain;
	padding: 6px;
	box-sizing: border-box;
	display: block;
	transition: transform .35s var(--sp-ease);
}
.sp-card:hover .sp-card__media img { transform: scale(1.03); }

/* Bild-Platzhalter für Einträge ohne eigenes Foto: Branchen-Foto als
   Hintergrund, halbtransparent in der festen Branchenfarbe (--sp-ph)
   eingefärbt (+ dezentes Punktmuster), darüber der Firmenname als
   „Wortmarke" – jede Karte individuell, die Farbe ordnet die Branche. */
.sp-card__ph {
	position: absolute;
	inset: 0;
	display: grid;
	place-items: center;
	padding: 1rem 1.2rem;
	box-sizing: border-box;
	background-color: var(--sp-ph, #11324D);
	overflow: hidden;
}
.sp-card__ph img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	padding: 0;
}
.sp-card__ph::after {
	content: "";
	position: absolute;
	inset: 0;
	/* Fallback für sehr alte Browser ohne color-mix: kräftige, deckende Tönung. */
	background-color: rgba(17, 50, 77, .82);
	background:
		radial-gradient(rgba(255, 255, 255, .13) 1.5px, transparent 1.5px) 0 0 / 22px 22px,
		linear-gradient(135deg,
			color-mix(in srgb, var(--sp-ph, #11324D) 68%, transparent) 0%,
			color-mix(in srgb, var(--sp-ph, #11324D) 52%, transparent) 100%);
	background-color: color-mix(in srgb, var(--sp-ph, #11324D) 60%, transparent);
}
.sp-card__ph b {
	position: relative;
	z-index: 1;
	font-family: var(--wp--preset--font-family--heading, sans-serif);
	font-weight: 800;
	font-size: clamp(1.15rem, 2.4vw, 1.5rem);
	line-height: 1.25;
	letter-spacing: .01em;
	text-align: center;
	color: #fff;
	/* Etwas kräftigerer Schatten, weil das Foto stärker durchscheint. */
	text-shadow: 0 1px 3px rgba(0, 0, 0, .45), 0 3px 16px rgba(0, 0, 0, .4);
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
	overflow-wrap: break-word;
}

/* ---------- Badges: einheitliches System ---------- */
.sp-card__badge {
	position: absolute;
	top: 12px;
	left: 12px;
	display: inline-flex;
	align-items: center;
	gap: .3em;
	background: rgba(17, 50, 77, .78);
	-webkit-backdrop-filter: blur(6px);
	backdrop-filter: blur(6px);
	color: #fff;
	font-family: var(--wp--preset--font-family--heading, sans-serif);
	font-size: .76rem;
	font-weight: 600;
	line-height: 1;
	padding: 6px 11px;
	border-radius: 999px;
	letter-spacing: .02em;
	box-shadow: 0 2px 10px rgba(0, 0, 0, .18);
}
.sp-card__badge svg { width: .9em; height: .9em; }
.sp-card__badge--featured {
	left: auto;
	right: 12px;
	background: linear-gradient(135deg, #f7b733, #f4a91f);
	color: #3a2c00;
	font-weight: 700;
}
.sp-card__badge--verein {
	background: rgba(15, 143, 160, .88);
}
.sp-card__badge--new {
	left: auto;
	right: 12px;
	background: var(--wp--preset--color--accent, #E8543A);
	color: #fff;
	font-weight: 700;
}

/* Premium-Karte: hervorgehoben, größer, mit Galerie-Vorschau. */
.sp-card--premium {
	border: 2px solid var(--wp--preset--color--primary, #11b5a6);
	box-shadow: 0 16px 40px -22px rgba(17, 181, 166, .55);
}
.sp-grid .sp-card--premium {
	grid-column: span 2;
}
@media (max-width: 700px) {
	.sp-grid .sp-card--premium { grid-column: auto; }
}
.sp-card--premium .sp-card__desc {
	-webkit-line-clamp: 4;
}
.sp-card__gallery {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: .4rem;
	margin: .2rem 0 .1rem;
}
.sp-card__gallery img {
	width: 100%;
	aspect-ratio: 1 / 1;
	object-fit: cover;
	border-radius: 8px;
	display: block;
}

.sp-card__body {
	display: flex;
	flex-direction: column;
	gap: .45rem;
	padding: 1.1rem 1.2rem 1.3rem;
	flex: 1;
}

.sp-card__title {
	font-family: var(--wp--preset--font-family--heading, "Quicksand", sans-serif);
	font-size: 1.18rem;
	font-weight: 600;
	line-height: 1.25;
	margin: 0;
}

.sp-card__title a { text-decoration: none; color: inherit; }
.sp-card__title a:hover { color: var(--wp--preset--color--primary, #b85c38); }

.sp-card__meta {
	font-size: .92rem;
	color: var(--wp--preset--color--muted, #6f665c);
	display: flex;
	flex-wrap: wrap;
	gap: .35rem .8rem;
	margin: 0;
}

.sp-card__desc {
	font-size: .96rem;
	line-height: 1.5;
	margin: .2rem 0 0;
	color: var(--wp--preset--color--contrast, #2a2521);
}

.sp-card__tags { margin-top: auto; padding-top: .6rem; display: flex; flex-wrap: wrap; gap: .4rem; }

.sp-tag {
	font-size: .8rem;
	text-decoration: none;
	color: var(--wp--preset--color--accent, #8a5a2b);
	background: var(--wp--preset--color--tertiary, #efe3d3);
	padding: 3px 10px;
	border-radius: 999px;
}
.sp-tag:hover { background: var(--wp--preset--color--primary, #b85c38); color: #fff; }

/* ---------- Branchen / Orte Kacheln ---------- */
.sp-tiles {
	display: grid;
	gap: clamp(1rem, 2.2vw, 1.5rem);
	grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
	list-style: none;
	margin: 0;
	padding: 0;
}

.sp-tile {
	position: relative;
	display: block;
	border-radius: var(--sp-radius);
	overflow: hidden;
	min-height: 200px;
	color: #fff;
	text-decoration: none;
	box-shadow: var(--sp-shadow);
	transition: transform .18s ease, box-shadow .18s ease;
	/* Fallback-Hintergrund für Kacheln ohne Bild (z. B. neue Branchen). */
	background: var(--wp--preset--gradient--warm-hero, linear-gradient(135deg, #11b5a6, #11324d));
}
.sp-tile:hover { transform: translateY(-3px); box-shadow: var(--sp-shadow-hover); }

.sp-tile img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	z-index: 0;
}

.sp-tile__overlay {
	position: absolute;
	inset: 0;
	z-index: 1;
	background: linear-gradient(180deg, rgba(43,38,34,0) 30%, rgba(43,38,34,0.78) 100%);
}

.sp-tile__content {
	position: relative;
	z-index: 2;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	height: 100%;
	min-height: 200px;
	padding: 1.1rem 1.2rem;
}

.sp-tile__title {
	font-family: var(--wp--preset--font-family--heading, "Quicksand", sans-serif);
	font-size: 1.22rem;
	font-weight: 700;
	margin: 0;
	text-shadow: 0 1px 6px rgba(0,0,0,.35);
}

.sp-tile__count {
	font-size: .88rem;
	opacity: .95;
	margin: .2rem 0 0;
}

/* ---------- Eintragsdetail ---------- */
.sp-detail {
	display: grid;
	grid-template-columns: 1.6fr 1fr;
	gap: clamp(1.4rem, 3vw, 2.4rem);
	align-items: start;
}
@media (max-width: 781px) { .sp-detail { grid-template-columns: 1fr; } }

.sp-detail__hero {
	width: 100%;
	aspect-ratio: 16 / 9;
	object-fit: contain;
	background: #f4f7f6;
	border-radius: var(--sp-radius);
	box-shadow: var(--sp-shadow);
	margin-bottom: 1.4rem;
}

/* Beitragsbild auf Einzelseiten (Veranstaltungen, Jobs, Angebote, News):
   vollständig, mittig, ruhiger Hintergrund, Höhe begrenzt – so wird ein oft
   quadratisches/logohaftes Bild nicht überdimensional groß dargestellt. */
.wp-block-post-featured-image {
	margin-top: 1.2rem;
	margin-bottom: 1.4rem;
	background: #f4f7f6;
	border-radius: var(--sp-radius);
	overflow: hidden;
}
.wp-block-post-featured-image img {
	width: 100%;
	height: auto;
	max-height: 420px;
	object-fit: contain;
	display: block;
	margin: 0 auto;
}

.sp-infocard {
	background: var(--wp--preset--color--base, #fff);
	border: var(--sp-border);
	border-radius: var(--sp-radius);
	box-shadow: var(--sp-shadow);
	padding: 1.4rem 1.5rem;
	position: sticky;
	top: 1.5rem;
}

.sp-infocard h2 {
	font-size: 1.1rem;
	margin: 0 0 .9rem;
}

/* Logo oben in der Kontaktbox – responsive, bricht auf keinem Gerät. */
.sp-infocard__logo {
	display: flex;
	justify-content: center;
	align-items: center;
	margin: 0 0 1.1rem;
	padding: .9rem 1rem;
	background: #f4f7f6;
	border-radius: var(--sp-radius-sm, 10px);
}
.sp-infocard__logo img {
	max-width: 100%;
	width: auto;
	height: auto;
	max-height: 120px;
	object-fit: contain;
	display: block;
}

.sp-infolist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .7rem; }
.sp-infolist li { display: flex; gap: .6rem; align-items: flex-start; font-size: .98rem; line-height: 1.4; }
.sp-infolist .sp-ico { flex: 0 0 1.3rem; color: var(--wp--preset--color--primary, #b85c38); font-weight: 700; }
.sp-infolist a { color: var(--wp--preset--color--accent, #8a5a2b); }

/* ---------- SVG-Icons (ersetzen die früheren Emojis) ---------- */
.sp-ico svg {
	width: 1.15em;
	height: 1.15em;
	display: block;
	margin-top: .12em;
}
.sp-card__meta .sp-ico { display: inline-flex; color: var(--wp--preset--color--primary, #11b5a6); }
.sp-card__meta .sp-ico svg { width: 1em; height: 1em; margin-top: .1em; }

/* ---------- CTA-Leiste in der Infokarte ---------- */
.sp-cta {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: .55rem;
	margin-top: 1.1rem;
}
.sp-cta__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: .45rem;
	padding: .65rem .6rem;
	border-radius: var(--sp-radius-sm);
	border: 1px solid rgba(17, 181, 166, .45);
	color: var(--wp--preset--color--primary, #11b5a6) !important;
	background: #fff;
	font-weight: 600;
	font-size: .95rem;
	text-decoration: none;
	transition: background .15s ease, color .15s ease, transform .18s var(--sp-ease, ease);
}
.sp-cta__btn svg { width: 1.05em; height: 1.05em; }
.sp-cta__btn:hover { background: var(--wp--preset--color--tertiary, #E7F7F5); transform: translateY(-1px); }
.sp-cta__btn--primary {
	background: var(--wp--preset--color--primary, #11b5a6);
	border-color: transparent;
	color: #fff !important;
}
.sp-cta__btn--primary:hover { background: var(--wp--preset--color--secondary, #11324D); }

/* ---------- „Jetzt geöffnet"-Status ---------- */
.sp-open {
	display: inline-flex;
	align-items: center;
	gap: .35rem;
	margin-left: .5rem;
	font-size: .78rem;
	font-weight: 700;
	padding: 3px 10px;
	border-radius: 999px;
	vertical-align: middle;
}
.sp-open::before {
	content: "";
	width: .5em;
	height: .5em;
	border-radius: 50%;
	background: currentColor;
}
.sp-open--yes { background: #E5F6EC; color: #1E7A45; }
.sp-open--no { background: #F0F1F2; color: #5A6B70; }

/* ---------- Karte (OpenStreetMap, lädt erst nach Klick) ---------- */
.sp-map { margin-top: 1.1rem; }
.sp-map iframe {
	width: 100%;
	height: 230px;
	border: 0;
	border-radius: var(--sp-radius-sm);
	display: block;
}
.sp-map__load {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: .3rem;
	width: 100%;
	min-height: 130px;
	padding: 1rem;
	cursor: pointer;
	border: 1px dashed rgba(17, 181, 166, .5);
	border-radius: var(--sp-radius-sm);
	background: var(--wp--preset--color--tertiary, #E7F7F5);
	color: var(--wp--preset--color--secondary, #11324D);
	font-weight: 600;
	font-size: .95rem;
	transition: background .15s ease;
}
.sp-map__load:hover { background: #DDF2EF; }
.sp-map__load svg { width: 1.4em; height: 1.4em; color: var(--wp--preset--color--primary, #11b5a6); }
.sp-map__load small { font-weight: 400; font-size: .76rem; color: var(--wp--preset--color--muted, #5A6B70); }
.sp-map__big {
	display: inline-block;
	margin-top: .4rem;
	font-size: .82rem;
	color: var(--wp--preset--color--primary, #11b5a6);
}

.sp-btn {
	display: block;
	box-sizing: border-box;
	margin-top: 1.1rem;
	background: var(--wp--preset--color--primary, #b85c38);
	color: #fff !important;
	text-decoration: none;
	font-weight: 600;
	padding: .7rem 1.2rem;
	border-radius: var(--sp-radius-sm);
	text-align: center;
	width: 100%;
}
.sp-btn:hover { background: var(--wp--preset--color--accent, #8a5a2b); }

.sp-detail__hours { width: 100%; border-collapse: collapse; font-size: .95rem; }
.sp-detail__hours th, .sp-detail__hours td { text-align: left; padding: .35rem 0; border-bottom: 1px dashed rgba(43,38,34,.12); }
.sp-detail__hours td { text-align: right; color: var(--wp--preset--color--muted, #6f665c); }

/* ---------- Verwandte Links / Chips ---------- */
.sp-links { display: flex; flex-wrap: wrap; gap: .55rem; margin: 0; padding: 0; list-style: none; }
.sp-links a {
	display: inline-block;
	text-decoration: none;
	font-size: .95rem;
	color: var(--wp--preset--color--contrast, #2a2521);
	background: var(--wp--preset--color--tertiary, #efe3d3);
	border: var(--sp-border);
	padding: .5rem .9rem;
	border-radius: 999px;
}
.sp-links a:hover { background: var(--wp--preset--color--primary, #b85c38); color: #fff; }

/* ---------- Ratgeber-Hub (Übersichtsseite) ---------- */
.sp-rg__tools {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: .8rem 1.2rem;
	margin: 1.6rem 0 1.4rem;
}
.sp-rg__search { flex: 1 1 320px; }
.sp-rg__search input[type="search"] {
	width: 100%;
	border: var(--sp-border);
	border-radius: 999px;
	padding: .8rem 1.3rem;
	font-size: 1rem;
	background: var(--wp--preset--color--base-2, #fff);
	box-shadow: var(--sp-shadow);
	transition: box-shadow .2s ease, border-color .2s ease;
}
.sp-rg__search input[type="search"]:focus {
	outline: none;
	border-color: var(--wp--preset--color--primary, #11b5a6);
	box-shadow: 0 0 0 3px rgba(17, 181, 166, .18);
}
.sp-rg__chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.sp-rg__chips button {
	border: var(--sp-border);
	background: var(--wp--preset--color--base-2, #fff);
	color: var(--wp--preset--color--muted, #5A6B70);
	font-family: var(--wp--preset--font-family--heading, sans-serif);
	font-weight: 600;
	font-size: .85rem;
	padding: .45rem .95rem;
	border-radius: 999px;
	cursor: pointer;
	transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.sp-rg__chips button:hover { border-color: var(--wp--preset--color--primary, #11b5a6); color: var(--wp--preset--color--primary, #11b5a6); }
.sp-rg__chips button.is-on {
	background: var(--wp--preset--color--primary, #11b5a6);
	border-color: transparent;
	color: #fff;
}

.sp-rg {
	display: grid;
	gap: clamp(1rem, 2.4vw, 1.5rem);
	grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}
.sp-rg__card {
	display: flex;
	flex-direction: column;
	gap: .55rem;
	background: var(--wp--preset--color--base-2, #fff);
	border: var(--sp-border);
	border-top: 3px solid var(--rg, #11b5a6);
	border-radius: var(--sp-radius);
	padding: 1.15rem 1.25rem 1.05rem;
	box-shadow: var(--sp-shadow);
	transition: transform .22s var(--sp-ease), box-shadow .22s var(--sp-ease);
}
.sp-rg__card:hover { transform: translateY(-4px); box-shadow: var(--sp-shadow-hover); }
/* Wichtig: display:flex oben überstimmt sonst das hidden-Attribut, das die
   Live-Suche setzt – Karten würden als „versteckt" markiert, blieben aber
   sichtbar (Suche wirkt kaputt). */
.sp-rg__card[hidden] { display: none; }
.sp-rg__card--feat { grid-column: span 2; }
@media (max-width: 700px) { .sp-rg__card--feat { grid-column: auto; } }
.sp-rg__head { display: flex; align-items: center; gap: .55rem; }
.sp-rg__ico {
	display: grid;
	place-items: center;
	width: 38px;
	height: 38px;
	border-radius: 12px;
	color: var(--rg, #11b5a6);
	background: color-mix(in srgb, var(--rg, #11b5a6) 12%, #fff);
	flex: none;
}
.sp-rg__ico svg { width: 21px; height: 21px; }
.sp-rg__topic {
	font-family: var(--wp--preset--font-family--heading, sans-serif);
	font-weight: 700;
	font-size: .76rem;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--rg, #11b5a6);
}
.sp-rg__featbadge {
	margin-left: auto;
	background: linear-gradient(135deg, #f7b733, #f4a91f);
	color: #3a2c00;
	font-size: .72rem;
	font-weight: 700;
	padding: 3px 10px;
	border-radius: 999px;
}
.sp-rg__title { margin: 0; font-size: 1.16rem; line-height: 1.3; }
.sp-rg__card--feat .sp-rg__title { font-size: 1.35rem; }
.sp-rg__title a { text-decoration: none; color: var(--wp--preset--color--contrast, #10242B); }
.sp-rg__title a:hover { color: var(--wp--preset--color--primary, #11b5a6); }
.sp-rg__excerpt { margin: 0; font-size: .94rem; line-height: 1.55; color: var(--wp--preset--color--muted, #5A6B70); flex: 1; }
.sp-rg__meta {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 1rem;
	margin-top: .35rem;
	padding-top: .65rem;
	border-top: 1px dashed rgba(43, 38, 34, .12);
	font-size: .83rem;
	color: var(--wp--preset--color--muted, #5A6B70);
}
.sp-rg__meta > span { display: inline-flex; align-items: center; gap: .35rem; }
.sp-rg__meta svg { width: 1em; height: 1em; }
.sp-rg__more { color: var(--wp--preset--color--primary, #11b5a6); font-weight: 600; }
@media (prefers-reduced-motion: reduce) {
	.sp-rg__card { transition: none !important; }
	.sp-rg__card:hover { transform: none !important; }
}

/* ---------- FAQ / Ratgeber ---------- */
.sp-faq { display: flex; flex-direction: column; gap: .8rem; }
.sp-faq details {
	border: var(--sp-border);
	border-radius: var(--sp-radius-sm);
	background: var(--wp--preset--color--base, #fff);
	padding: .2rem 1.1rem;
	box-shadow: var(--sp-shadow);
}
.sp-faq summary {
	cursor: pointer;
	font-weight: 600;
	padding: .9rem 0;
	font-family: var(--wp--preset--font-family--heading, "Quicksand", sans-serif);
	list-style: none;
}
.sp-faq summary::-webkit-details-marker { display: none; }
.sp-faq summary::after { content: "+"; float: right; color: var(--wp--preset--color--primary, #b85c38); font-size: 1.3rem; line-height: 1; }
.sp-faq details[open] summary::after { content: "\2013"; }
.sp-faq details > *:not(summary) { padding-bottom: 1rem; }

/* ---------- Brotkrumen-Navigation ---------- */
.sp-crumbs { margin: 0 0 .9rem; }
.sp-crumbs ol {
	display: flex;
	flex-wrap: wrap;
	gap: .25rem;
	margin: 0;
	padding: 0;
	list-style: none;
	font-size: .84rem;
	color: var(--wp--preset--color--muted, #5A6B70);
}
.sp-crumbs li { display: flex; align-items: center; gap: .25rem; min-width: 0; }
.sp-crumbs li + li::before {
	content: "\203A";
	color: var(--wp--preset--color--muted, #5A6B70);
	opacity: .6;
}
.sp-crumbs a {
	color: inherit;
	text-decoration: none;
}
.sp-crumbs a:hover { color: var(--wp--preset--color--primary, #11b5a6); text-decoration: underline; }
.sp-crumbs li[aria-current] {
	color: var(--wp--preset--color--contrast, #10242B);
	font-weight: 600;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	max-width: 28ch;
	display: inline-block;
}

/* ---------- Sektionstitel ---------- */
.sp-section-eyebrow {
	display: inline-block;
	font-family: var(--wp--preset--font-family--heading, "Quicksand", sans-serif);
	font-weight: 700;
	font-size: .85rem;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: var(--wp--preset--color--primary, #b85c38);
	margin-bottom: .4rem;
}

/* ---------- Hero: Pill, Such-Chips, Statistik ---------- */
.sp-hero-tag {
	display: inline-flex;
	align-items: center;
	gap: .5rem;
	background: rgba(255, 255, 255, .16);
	border: 1px solid rgba(255, 255, 255, .3);
	color: #fff;
	padding: .4rem .95rem;
	border-radius: 999px;
	font-family: var(--wp--preset--font-family--heading, sans-serif);
	font-weight: 600;
	font-size: .85rem;
}
.sp-hero-chips {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: .5rem;
	margin-top: 1.2rem;
}
.sp-hero-chips a {
	background: rgba(255, 255, 255, .14);
	border: 1px solid rgba(255, 255, 255, .28);
	color: #fff;
	padding: .42rem .9rem;
	border-radius: 999px;
	font-size: .88rem;
	font-weight: 600;
	font-family: var(--wp--preset--font-family--heading, sans-serif);
	text-decoration: none;
	transition: background .15s, color .15s;
}
.sp-hero-chips a:hover {
	background: #fff;
	color: var(--wp--preset--color--primary, #11b5a6);
}
.sp-hero-stats {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: clamp(1.4rem, 4vw, 2.6rem);
	margin-top: 1.8rem;
}
.sp-hero-stats div b {
	display: block;
	font-family: var(--wp--preset--font-family--heading, sans-serif);
	font-weight: 800;
	font-size: 1.6rem;
	color: #fff;
	line-height: 1;
}
.sp-hero-stats div span {
	font-size: .82rem;
	color: rgba(255, 255, 255, .85);
}

/* ---------- Sticky-Header mit Schrumpf-Effekt ----------
   Der Header (Template-Part) bleibt beim Scrollen sichtbar; sobald die Seite
   gescrollt ist (Body-Klasse .sp-scrolled per theme.js), schrumpfen Logo und
   Innenabstand dezent und der Header bekommt einen feinen Schatten. */
header.wp-block-template-part {
	position: sticky;
	top: 0;
	z-index: 90;
}
body.admin-bar header.wp-block-template-part {
	top: var(--wp-admin--admin-bar--height, 32px);
}
header.wp-block-template-part > .wp-block-group {
	transition: padding .25s var(--sp-ease, ease), box-shadow .25s var(--sp-ease, ease);
}
body.sp-scrolled header.wp-block-template-part > .wp-block-group {
	padding-top: 0.4rem !important;
	padding-bottom: 0.4rem !important;
	box-shadow: 0 6px 24px -12px rgba(16, 36, 43, .25);
}
.spc-brand__logo { transition: height .25s var(--sp-ease, ease); }
body.sp-scrolled .spc-brand__logo { height: 44px; }
@media (max-width: 600px) {
	body.sp-scrolled .spc-brand__logo { height: 38px; }
}
@media (prefers-reduced-motion: reduce) {
	header.wp-block-template-part > .wp-block-group,
	.spc-brand__logo { transition: none !important; }
}

/* ---------- Markenzeichen / Logo im Header ---------- */
.spc-brand {
	display: inline-flex;
	align-items: center;
	gap: .6rem;
	text-decoration: none;
	line-height: 1;
}
.spc-brand__mark {
	width: 40px;
	height: 40px;
	border-radius: 12px;
	background: var(--wp--preset--gradient--warm-hero, linear-gradient(135deg, #11B5A6, #11324D));
	display: grid;
	place-items: center;
	color: #fff;
	flex: none;
}
.spc-brand__name {
	font-family: var(--wp--preset--font-family--heading, sans-serif);
	font-weight: 800;
	font-size: 1.35rem;
	letter-spacing: -.02em;
	color: var(--wp--preset--color--contrast, #10242b);
}
.spc-brand__name b {
	color: var(--wp--preset--color--primary, #11b5a6);
	font-weight: 800;
}
.spc-brand:hover .spc-brand__name { opacity: .85; }
.spc-brand__logo { height: 58px; width: auto; display: block; }
@media (max-width: 600px) { .spc-brand__logo { height: 44px; } }

/* ---------- Bildnachweis ---------- */
.sp-credit { font-size: .78rem; color: var(--wp--preset--color--muted, #6f665c); margin-top: .4rem; }
.sp-credit a { color: inherit; }

/* ---------- Suchformular ---------- */
.sp-search { display: flex; gap: .5rem; flex-wrap: wrap; max-width: 560px; }
.sp-search input[type="search"] {
	flex: 1;
	min-width: 200px;
	border: var(--sp-border);
	border-radius: var(--sp-radius-sm);
	padding: .8rem 1rem;
	font-size: 1rem;
}
.sp-search button {
	border: 0;
	border-radius: var(--sp-radius-sm);
	background: var(--wp--preset--color--primary, #b85c38);
	color: #fff;
	font-weight: 600;
	padding: .8rem 1.3rem;
	cursor: pointer;
}
.sp-empty { color: var(--wp--preset--color--muted, #6f665c); font-style: italic; }

/* ------------------------------------------------------------------ *
 *  Top-Menü: Hover-Effekt (mittig wachsende Unterstreichung + Farbe)
 * ------------------------------------------------------------------ */
.wp-block-navigation .wp-block-navigation-item__content {
	position: relative;
	padding-bottom: 4px;
	transition: color .2s ease;
}
.wp-block-navigation .wp-block-navigation-item__content::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 2px;
	border-radius: 2px;
	background: var(--wp--preset--color--primary, #11b5a6);
	transform: scaleX(0);
	transform-origin: center;
	transition: transform .25s ease;
}
.wp-block-navigation .wp-block-navigation-item__content:hover,
.wp-block-navigation .wp-block-navigation-item__content:focus,
.wp-block-navigation .current-menu-item > .wp-block-navigation-item__content {
	color: var(--wp--preset--color--primary, #11b5a6);
}
.wp-block-navigation .wp-block-navigation-item__content:hover::after,
.wp-block-navigation .wp-block-navigation-item__content:focus::after,
.wp-block-navigation .current-menu-item > .wp-block-navigation-item__content::after {
	transform: scaleX(1);
}

/* Buttons (z. B. „Eintrag sichern"): dezenter Lift beim Hover. */
.wp-block-button__link.wp-element-button {
	transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}
.wp-block-button__link.wp-element-button:hover {
	transform: translateY(-2px);
	box-shadow: 0 10px 22px -10px rgba(0, 0, 0, .35);
	filter: brightness(1.05);
}

/* ---------- Ratgeber: Antwort-Box, Hinweise, Eckdaten ---------- */

/* Antwort-Box „Das Wichtigste in Kürze" */
.sp-infobox {
	background: var(--wp--preset--color--tertiary, #E7F7F5);
	border: 1px solid rgba(17, 181, 166, .25);
	border-radius: var(--sp-radius, 16px);
	padding: 1.25rem 1.5rem;
	margin: 1.5rem 0;
}
.sp-infobox > :first-child { margin-top: 0; }
.sp-infobox > :last-child { margin-bottom: 0; }
.sp-infobox h2,
.sp-infobox h3 {
	font-size: 1.15rem;
	margin: 0 0 .75rem;
	color: var(--wp--preset--color--secondary, #11324D);
}
.sp-infobox ul {
	list-style: none;
	margin: 0;
	padding: 0;
}
.sp-infobox li {
	position: relative;
	padding-left: 1.9rem;
	margin: .55rem 0;
	line-height: 1.5;
}
.sp-infobox li::before {
	content: "";
	position: absolute;
	left: 0;
	top: .15em;
	width: 1.25rem;
	height: 1.25rem;
	background: no-repeat center / contain;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2311B5A6' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E");
}

/* Hinweis-Kästen: Tipp (türkis) und Achtung/Gut zu wissen (koralle) */
.sp-callout {
	position: relative;
	border-radius: var(--sp-radius-sm, 10px);
	padding: 1rem 1.15rem 1rem 3rem;
	margin: 1.25rem 0;
	background: var(--wp--preset--color--tertiary, #E7F7F5);
	border-left: 4px solid var(--wp--preset--color--primary, #11B5A6);
}
.sp-callout::before {
	content: "";
	position: absolute;
	left: .9rem;
	top: 1rem;
	width: 1.4rem;
	height: 1.4rem;
	background: no-repeat center / contain;
}
.sp-callout > :last-child { margin-bottom: 0; }
.sp-callout strong {
	display: block;
	margin-bottom: .15rem;
	color: var(--wp--preset--color--secondary, #11324D);
}
.sp-callout--tip::before {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2311B5A6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 18h6M10 22h4M12 2a7 7 0 0 0-4 12.7c.6.5 1 1.3 1 2.1h6c0-.8.4-1.6 1-2.1A7 7 0 0 0 12 2z'/%3E%3C/svg%3E");
}
.sp-callout--note {
	background: #FDEEEB;
	border-left-color: var(--wp--preset--color--accent, #E8543A);
}
.sp-callout--note strong { color: var(--wp--preset--color--accent, #E8543A); }
.sp-callout--note::before {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23E8543A' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 9v4M12 17h.01M10.3 3.9 1.8 18a2 2 0 0 0 1.7 3h17a2 2 0 0 0 1.7-3L13.7 3.9a2 2 0 0 0-3.4 0z'/%3E%3C/svg%3E");
}

/* Eckdaten-Chips */
.sp-facts {
	display: flex;
	flex-wrap: wrap;
	gap: .75rem;
	margin: 1.25rem 0;
	padding: 0;
	list-style: none;
}
.sp-facts li,
.sp-fact {
	flex: 1 1 120px;
	background: var(--wp--preset--color--base, #F4FAF9);
	border: 1px solid rgba(17, 50, 77, .08);
	border-radius: var(--sp-radius-sm, 10px);
	padding: .7rem .9rem;
}
.sp-fact__label {
	display: block;
	font-size: .8rem;
	color: var(--wp--preset--color--muted, #5A6B70);
	margin-bottom: .15rem;
}
.sp-fact__value {
	display: block;
	font-size: 1.4rem;
	font-weight: 600;
	color: var(--wp--preset--color--secondary, #11324D);
	font-family: var(--wp--preset--font-family--heading, sans-serif);
}

/* FAQ-Aufklapper (Gutenberg Details-Block) im Ratgeber-Design */
.wp-block-details {
	background: var(--wp--preset--color--base, #fff);
	border: var(--sp-border);
	border-radius: var(--sp-radius-sm, 10px);
	padding: 0 1.1rem;
	margin: .6rem 0;
}
.wp-block-details summary {
	cursor: pointer;
	font-weight: 600;
	color: var(--wp--preset--color--secondary, #11324D);
	padding: .85rem 1.8rem .85rem 0;
	list-style: none;
	position: relative;
}
.wp-block-details summary::-webkit-details-marker { display: none; }
.wp-block-details summary::after {
	content: "+";
	position: absolute;
	right: .1rem;
	top: 50%;
	transform: translateY(-50%);
	font-size: 1.5rem;
	line-height: 1;
	color: var(--wp--preset--color--primary, #11B5A6);
}
.wp-block-details[open] summary::after { content: "\2013"; }
.wp-block-details[open] summary {
	border-bottom: 1px solid rgba(17, 50, 77, .08);
	margin-bottom: .7rem;
}
.wp-block-details > :not(summary) { margin: 0 0 .85rem; }

/* ====================================================================
 * Portal-Branding (Logo bzw. Namenszug aus den Portal-Einstellungen,
 * eingesetzt über die Tokens {{logo_or_name}} in Header und Footer).
 * ==================================================================== */
.spc-brand .sp-portal-logo { height: 58px; width: auto; display: block; transition: height .25s var(--sp-ease, ease); }
body.sp-scrolled .spc-brand .sp-portal-logo { height: 44px; }
.sp-foot__brand .sp-portal-logo { width: 150px; height: auto; display: block; }
.sp-portal-name { font-family: var(--wp--preset--font-family--heading, sans-serif); font-weight: 800; font-size: 1.35rem; letter-spacing: -.02em; color: var(--wp--preset--color--contrast, #10242b); white-space: nowrap; }
.sp-foot__brand .sp-portal-name { color: var(--wp--preset--color--contrast, #10242b); }
