/* ==========================================================================
   Schlesiger · Volk – ergänzende Styles
   Farben/Schriften stehen in theme.json, hier nur Bausteine und Barrierefreiheit.
   ========================================================================== */

:root {
	--sv-navy: var(--wp--preset--color--navy, #2b3d4f);
	--sv-salbei: var(--wp--preset--color--salbei, #b5c9cc);
	--sv-gelb: var(--wp--preset--color--gelb, #ffe874);
	--sv-salbei-hell: var(--wp--preset--color--salbei-hell, #ecf2f3);
	--sv-gelb-hell: var(--wp--preset--color--gelb-hell, #fff9da);
	--sv-radius: 32px;
	--sv-schatten: 0 12px 40px rgba(38, 54, 69, 0.12);
}

@media (prefers-reduced-motion: no-preference) {
	html { scroll-behavior: smooth; }
}

/* Anker nicht unter dem fixierten Kopfbereich verstecken */
[id] { scroll-margin-top: 140px; }

/* ---------- Barrierefreiheit ---------- */
.sv-sr-only,
.screen-reader-text {
	position: absolute !important;
	width: 1px; height: 1px;
	padding: 0; margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
summary:focus-visible,
.wp-element-button:focus-visible,
[tabindex]:focus-visible {
	outline: 3px solid var(--sv-navy);
	outline-offset: 3px;
	border-radius: 6px;
}
.sv-kontakt a:focus-visible,
.sv-kontakt button:focus-visible { outline-color: var(--sv-gelb); }
.sv-kontakt .sv-formular a:focus-visible,
.sv-kontakt .sv-formular button:focus-visible,
.sv-kontakt .sv-formular input:focus-visible,
.sv-kontakt .sv-formular textarea:focus-visible { outline-color: var(--sv-navy); }

.skip-link.screen-reader-text:focus {
	background: var(--sv-gelb);
	color: var(--sv-navy);
	font-weight: 700;
	border-radius: 12px;
}

/* ---------- Kopfbereich ---------- */
header.wp-block-template-part {
	position: sticky;
	top: var(--wp-admin--admin-bar--height, 0px);
	z-index: 50;
	background: rgba(255, 255, 255, 0.97);
	border-bottom: 1px solid #e3eaeb;
}
.sv-header {
	padding-top: 0.5rem;
	padding-bottom: 0.5rem;
}
.sv-logo { display: block; line-height: 0; flex: none; }
.sv-logo__bild { display: block; height: 96px; width: auto; aspect-ratio: 324 / 196; }
.sv-footer .sv-logo__bild { height: 140px; }
@media (max-width: 600px) {
	.sv-logo__bild { height: 72px; }
	.sv-header .wp-block-buttons { display: none; }
	.sv-header .wp-block-navigation__responsive-container-open { padding: 10px; }
	.sv-header .wp-block-navigation__responsive-container-open svg { width: 30px; height: 30px; }
	[id] { scroll-margin-top: 110px; }
}
.sv-header .wp-block-navigation a { text-decoration: none; padding-block: 0.6rem; }
/* Instagram-Button im Kopfbereich: ganz rechts, gelber Kreis, dunkelblaues Logo */
.sv-social.wp-block-social-links { margin: 0; padding: 0; gap: 0; order: 99; }
.sv-social .wp-social-link { background: var(--sv-gelb) !important; color: var(--sv-navy) !important; border-radius: 50%; }
.sv-social .wp-social-link a { width: 44px; height: 44px; padding: 0 !important; display: flex !important; align-items: center; justify-content: center; color: var(--sv-navy) !important; }
.sv-social .wp-social-link svg { width: 24px; height: 24px; fill: currentColor; }
.sv-social .wp-social-link:hover { background: var(--sv-navy) !important; }
.sv-social .wp-social-link:hover a { color: var(--sv-gelb) !important; }
.sv-header .wp-block-navigation a:hover { text-decoration: underline; }

/* ---------- Badges ---------- */
.sv-badge {
	display: inline-block;
	padding: 0.3rem 1.1rem;
	border-radius: 999px;
	font-size: 0.8rem;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	background: #fff;
	line-height: 1.6;
}
.sv-badge--salbei { background: var(--sv-salbei); }
.sv-badge--gelb { background: var(--sv-gelb); }
.sv-badges { display: flex; flex-wrap: wrap; gap: 0.6rem; }

/* ---------- Icons ---------- */
.sv-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	flex: none;
	color: var(--sv-navy);
}
.sv-icon svg { width: 54%; height: 54%; fill: currentColor; }
.sv-icon--s { width: 56px; height: 56px; }
.sv-icon--m { width: 72px; height: 72px; }
.sv-icon--l { width: 112px; height: 112px; }
.sv-icon--navy { background: var(--sv-navy); color: var(--sv-salbei); }
.sv-icon--navy.sv-icon--auf-gelb,
.sv-icon--navy-gelb { background: var(--sv-navy); color: var(--sv-gelb); }
.sv-icon--salbei { background: var(--sv-salbei); }
.sv-icon--gelb { background: var(--sv-gelb); }
.sv-icon--weiss { background: #fff; }
.wp-block-schlesiger-volk-icon { line-height: 0; }
.wp-block-schlesiger-volk-logo { line-height: 0; flex: none; }

/* ---------- Hero ---------- */
.sv-hero {
	position: relative;
	background: var(--sv-salbei);
	padding-top: var(--wp--preset--spacing--60);
	padding-bottom: calc(var(--wp--preset--spacing--60) + 60px);
	overflow: hidden;
}
.sv-hero::after {
	content: "";
	position: absolute;
	left: 0; right: 0; bottom: -1px;
	height: clamp(40px, 7vw, 100px);
	background: url(../images/kurve-unten.svg) center bottom / 100% 100% no-repeat;
	pointer-events: none;
}
.sv-hero h1 { margin-top: 1.5rem; }
.sv-hero .sv-lead { font-size: clamp(1.125rem, 1.6vw, 1.3rem); max-width: 38em; }
.sv-hero__foto {
	position: relative;
	max-width: 460px;
	margin-inline: auto !important;
	padding: 11%;
	aspect-ratio: 1;
	box-sizing: border-box;
}
/* Standard: rundes Foto mit den Bögen aus dem Logo */
.sv-hero__foto::before {
	content: "";
	position: absolute;
	inset: 0;
	background: url(../images/boegen.svg) center / contain no-repeat;
	pointer-events: none;
}
.sv-hero__foto img {
	width: 100%;
	height: 100%;
	aspect-ratio: 1;
	object-fit: cover;
	border-radius: 50%;
	display: block;
}

/* Bild-Stile, im Editor unter „Stile“ wählbar (gelten für jedes Bild) */
.wp-block-image.is-style-sv-rund img,
.wp-block-image.is-style-rounded img {
	aspect-ratio: 1;
	object-fit: cover;
	border-radius: 50%;
}
.wp-block-image.is-style-sv-eckig img {
	aspect-ratio: 4 / 3;
	object-fit: cover;
	border-radius: var(--sv-radius);
}
.wp-block-image.is-style-sv-hoch img {
	aspect-ratio: 4 / 5;
	object-fit: cover;
	border-radius: var(--sv-radius);
}
/* Im Startbereich: ohne Bögen, ohne Punkt, Foto nutzt die volle Fläche */
.sv-hero__foto.is-style-sv-rund,
.sv-hero__foto.is-style-rounded,
.sv-hero__foto.is-style-sv-eckig,
.sv-hero__foto.is-style-sv-hoch { padding: 0; aspect-ratio: auto; max-width: 520px; }
.sv-hero__foto.is-style-sv-rund::before,
.sv-hero__foto.is-style-rounded::before,
.sv-hero__foto.is-style-sv-eckig::before,
.sv-hero__foto.is-style-sv-hoch::before { display: none; }
.sv-hero__foto.is-style-sv-eckig img { aspect-ratio: 4 / 3; border-radius: var(--sv-radius); }
.sv-hero__foto.is-style-sv-hoch img { aspect-ratio: 4 / 5; border-radius: var(--sv-radius); }

/* ---------- Buttons ---------- */
.wp-block-button.is-style-outline > .wp-block-button__link {
	background: transparent;
	color: var(--sv-navy);
	border-color: var(--sv-navy);
}
.wp-block-button.is-style-outline > .wp-block-button__link:hover {
	background: var(--sv-navy);
	color: #fff;
}
.wp-element-button svg { width: 1.25em; height: 1.25em; fill: currentColor; vertical-align: -0.25em; }
/* Text und Icon immer in einer Zeile halten, egal welche Button-Styles sonst greifen */
.sv-route a.wp-element-button,
.sv-formular button.sv-formular__senden {
	display: inline-flex !important;
	flex-wrap: nowrap;
	align-items: center;
	gap: 0.6rem;
	white-space: nowrap;
	width: auto !important;
	max-width: 100%;
	text-decoration: none;
}
.sv-route a.wp-element-button svg,
.sv-formular button.sv-formular__senden svg { flex: 0 0 auto; display: block; vertical-align: 0; }

/* ---------- Karten (Fachbereiche) ---------- */
.sv-fachbereiche { position: relative; z-index: 2; margin-top: -40px !important; }
.sv-card {
	background: #fff;
	border-radius: 28px;
	padding: clamp(1.5rem, 3vw, 2.25rem);
	box-shadow: var(--sv-schatten);
	height: 100%;
	box-sizing: border-box;
}
.sv-card h3 { margin-top: 0.75rem; }
.sv-mehr a { font-weight: 700; text-decoration: none; }
.sv-mehr a::after { content: " →"; content: " →" / ""; }
.sv-mehr a:hover { text-decoration: underline; }

/* ---------- Werte ---------- */
.sv-werte .wp-block-column { text-align: center; }
.sv-werte .wp-block-schlesiger-volk-icon { display: flex; justify-content: center; }
.sv-werte p { font-weight: 500; max-width: 15em; margin-inline: auto; }

/* ---------- Leistungs-Boxen ---------- */
.sv-box {
	border-radius: var(--sv-radius);
	padding: clamp(1.75rem, 4vw, 3.5rem) !important;
}
.sv-box--salbei { background: var(--sv-salbei-hell); }
.sv-box--gelb { background: var(--sv-gelb-hell); }
.sv-box__kopf { align-items: center; }
.sv-box__kopf h3 { margin: 0; font-size: var(--wp--preset--font-size--x-large); }
.sv-listbox {
	background: #fff;
	border-radius: 24px;
	padding: 1.75rem 2rem !important;
	height: 100%;
	box-sizing: border-box;
}
.sv-listbox h4 { margin-top: 0; }
.sv-listbox ul { padding-left: 1.25rem; }
.sv-listbox li + li { margin-top: 0.3rem; }

/* ---------- Team ---------- */
.sv-portrait img {
	aspect-ratio: 4 / 5;
	object-fit: cover;
	border-radius: var(--sv-radius);
	width: 100%;
}

/* ---------- Kontakt ---------- */
.sv-kontakt {
	position: relative;
	background: var(--sv-navy);
	color: #fff;
	padding-top: calc(var(--wp--preset--spacing--60) + 60px);
	padding-bottom: var(--wp--preset--spacing--60);
	margin-top: var(--wp--preset--spacing--60) !important;
}
.sv-kontakt::before {
	content: "";
	position: absolute;
	left: 0; right: 0; top: -1px;
	height: clamp(40px, 7vw, 100px);
	background: url(../images/kurve-oben.svg) center top / 100% 100% no-repeat;
	pointer-events: none;
}
.sv-kontakt h2,
.sv-kontakt a { color: #fff; }
.sv-kontaktliste { list-style: none; padding: 0 !important; }
.sv-kontaktliste li {
	position: relative;
	padding-left: 60px;
	min-height: 44px;
	display: flex;
	flex-direction: column;
	justify-content: center;
	margin-bottom: 1rem;
	line-height: 1.4;
}
.sv-kontaktliste li::before {
	content: "";
	position: absolute;
	left: 0; top: 50%;
	width: 44px; height: 44px;
	margin-top: -22px;
	border-radius: 50%;
	background-color: var(--sv-salbei);
}
.sv-kontaktliste li::after {
	content: "";
	position: absolute;
	left: 10px; top: 50%;
	width: 24px; height: 24px;
	margin-top: -12px;
	background-color: var(--sv-navy);
	-webkit-mask: var(--sv-icon) center / contain no-repeat;
	mask: var(--sv-icon) center / contain no-repeat;
}
.sv-k-telefon { --sv-icon: url(../icons/call.svg); }
.sv-k-email { --sv-icon: url(../icons/mail.svg); }
.sv-k-zeiten { --sv-icon: url(../icons/schedule.svg); }
.sv-k-zeiten::before { background-color: var(--sv-gelb) !important; }

/* ---------- Formular ---------- */
.sv-formbox {
	background: #fff;
	color: var(--sv-navy);
	border-radius: var(--sv-radius);
	padding: clamp(1.5rem, 3vw, 2.5rem) !important;
}
.sv-formbox a { color: var(--sv-navy); }
.sv-formbox h3 { margin-top: 0; }
.sv-formular form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.1rem 1.25rem; }
.sv-formular__hinweis,
.sv-feld--email,
.sv-feld--nachricht,
.sv-feld--checkbox,
.sv-formular__senden { grid-column: 1 / -1; }
@media (max-width: 600px) {
	.sv-formular form { grid-template-columns: minmax(0, 1fr); }
}
.sv-formular__hinweis { margin: 0; font-size: 0.95rem; }
.sv-feld { display: flex; flex-direction: column; gap: 0.35rem; }
.sv-feld label { font-size: 0.95rem; font-weight: 500; }
.sv-feld input[type="text"],
.sv-feld input[type="email"],
.sv-feld input[type="tel"],
.sv-feld textarea {
	font: inherit;
	font-size: 1.0625rem;
	color: var(--sv-navy);
	background: #fff;
	padding: 0.75rem 0.9rem;
	min-height: 48px;
	border: 1.5px solid #6b8183;
	border-radius: 14px;
	box-sizing: border-box;
	width: 100%;
}
.sv-feld textarea { resize: vertical; }
.sv-feld input[aria-invalid="true"],
.sv-feld textarea[aria-invalid="true"] { border-color: #a3262a; border-width: 2px; }
.sv-feld__fehler { margin: 0; color: #a3262a; font-size: 0.95rem; font-weight: 500; }
.sv-feld__fehler::before { content: "⚠ "; content: "⚠ " / ""; }
.sv-feld--checkbox { flex-direction: row; flex-wrap: wrap; align-items: flex-start; gap: 0.6rem; }
.sv-feld--checkbox .sv-feld__fehler { flex-basis: 100%; }
.sv-feld--checkbox input { width: 24px; height: 24px; margin: 0.15rem 0 0; accent-color: var(--sv-navy); flex: none; }
.sv-feld--checkbox label { flex: 1; font-weight: 400; line-height: 1.5; }
.sv-feld--honig { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.sv-formular__senden {
	justify-self: start;
	cursor: pointer;
	font: inherit;
	font-weight: 500;
	min-height: 48px;
}
.sv-formular__meldung {
	border-radius: 16px;
	padding: 1rem 1.25rem;
	margin-bottom: 1.25rem;
}
.sv-formular__meldung p { margin: 0; }
.sv-formular__meldung ul { margin: 0.5rem 0 0; padding-left: 1.25rem; }
.sv-formular__meldung--erfolg { background: var(--sv-salbei-hell); border: 2px solid var(--sv-salbei); }
.sv-formular__meldung--fehler { background: #fbeaea; border: 2px solid #a3262a; color: #5e1214; }
.sv-formular__meldung--fehler a { color: #5e1214; }

/* ---------- Karte ---------- */
.sv-karte {
	position: relative;
	min-height: 380px;
	height: 100%;
	border-radius: var(--sv-radius);
	background: var(--sv-salbei-hell);
	overflow: hidden;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 2rem;
	box-sizing: border-box;
}
.sv-karte__inhalt {
	background: #fff;
	border-radius: 24px;
	padding: 1.5rem 1.75rem;
	max-width: 360px;
	text-align: center;
	box-shadow: var(--sv-schatten);
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.75rem;
}
.sv-karte__inhalt p { margin: 0; font-size: 0.95rem; line-height: 1.5; }
.sv-karte__laden {
	font: inherit;
	font-weight: 500;
	background: transparent;
	color: var(--sv-navy);
	border: 2px solid var(--sv-navy);
	padding: 0.6rem 1.4rem;
	border-radius: 999px;
	min-height: 44px;
	cursor: pointer;
}
.sv-karte__laden:hover { background: var(--sv-navy); color: #fff; }
.sv-karte.is-geladen { padding: 0; }
.sv-karte iframe { border: 0; width: 100%; height: 100%; min-height: 380px; display: block; }

/* ---------- Fußbereich ---------- */
footer.wp-block-template-part { background: var(--wp--preset--color--grau-hell); }
.sv-footer { padding-top: var(--wp--preset--spacing--50); padding-bottom: var(--wp--preset--spacing--50); }
.sv-footer-links a { display: inline-block; padding-block: 0.6rem; }
.sv-footer-links a + a { margin-left: 1.5rem; }

/* ---------- Inhaltsseiten (Impressum, Datenschutz) ---------- */
.sv-seite { padding-top: var(--wp--preset--spacing--50); padding-bottom: var(--wp--preset--spacing--60); }
.sv-seite .wp-block-post-content h2 { font-size: var(--wp--preset--font-size--large); margin-top: 2.5rem; margin-bottom: 0.75rem; }
.sv-seite .wp-block-post-content h3 { font-size: 1.15rem; margin-top: 1.75rem; }
.sv-tagline { font-family: var(--wp--preset--font-family--comfortaa); font-weight: 700; font-size: 1.2rem; line-height: 1.35; margin-top: 1rem !important; }
.sv-listbox li { line-height: 1.5; }
.sv-liste-spalten { columns: 2 320px; column-gap: 2.5rem; }
.sv-liste-spalten li { break-inside: avoid; margin-bottom: 0.5rem; }
.sv-listbox li + li { margin-top: 0.5rem; }
