/**
 * Ergänzungen für alle Vorlagen: echte Überschriften, Anruf-Button, FAQ,
 * mobile Anrufleiste, Fokus-Stile und reduzierte Bewegung.
 * Wird nach styles.css und der Vorlagen-CSS geladen.
 */

:root {
	--cta: #5b45b8;
	--cta-hover: #47349a;
	--cta-ink: #ffffff;
}

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

/* Abschnittstitel sind jetzt <h2>: Optik der bisherigen <div>-Titel beibehalten. */
h2.section__title-rich {
	font-family: inherit;
	font-weight: 400;
	line-height: 1.28;
	margin-bottom: 0;
}

.section__title-line {
	display: block;
}

/* Ersetzt den Abstand, den früher der innere <p> lieferte */
.page-content-flow > h2.content-block.section__title-rich {
	padding-top: 0.75em;
	padding-bottom: 0.25em;
}

/* Sprungziele nicht unter Kanten verstecken */
[id] {
	scroll-margin-top: 1rem;
}

/* Anruf-Button im Kopfbereich */
.hero-cta {
	margin: 1.1rem 0 0;
}

.hero-cta__btn {
	display: inline-flex;
	align-items: center;
	gap: 0.55rem;
	padding: 0.75rem 1.25rem;
	border-radius: 999px;
	background: var(--cta);
	color: var(--cta-ink);
	font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
	font-size: 1rem;
	font-weight: 600;
	text-decoration: none;
	box-shadow: 0 8px 22px rgb(60 40 140 / 0.25);
	white-space: nowrap;
	transition: background-color 0.15s ease, transform 0.15s ease;
}

.hero-cta__btn:hover {
	background: var(--cta-hover);
	transform: translateY(-1px);
}

/* Lesbare Kontaktzeilen */
.content-block--contact-line a,
.contact-plain-link {
	text-underline-offset: 0.18em;
}

/* FAQ */
.section--faq .faq-list {
	display: grid;
	gap: 0.6rem;
	margin-top: 0.75rem;
}

.faq-item {
	background: rgb(255 255 255 / 0.85);
	border: 1px solid rgb(0 0 0 / 0.08);
	border-radius: 12px;
	padding: 0;
	overflow: hidden;
}

.faq-item__q {
	cursor: pointer;
	list-style: none;
	padding: 0.9rem 2.6rem 0.9rem 1.1rem;
	font-weight: 600;
	position: relative;
}

.faq-item__q::-webkit-details-marker {
	display: none;
}

.faq-item__q::after {
	content: "+";
	position: absolute;
	right: 1.1rem;
	top: 50%;
	transform: translateY(-50%);
	font-size: 1.35rem;
	line-height: 1;
	color: var(--cta);
}

.faq-item[open] .faq-item__q::after {
	content: "–";
}

.faq-item__a {
	padding: 0 1.1rem 1rem;
}

/* Footer: Adresse in eigener Zeile (NAP-Angaben für lokale Suche) */
.site-footer__address {
	flex-basis: 100%;
	font-style: normal;
	margin-bottom: 0.35rem;
}

/* Mobile Anrufleiste */
.call-bar {
	display: none;
}

@media (max-width: 720px) {
	.call-bar {
		position: fixed;
		left: 50%;
		bottom: max(12px, env(safe-area-inset-bottom));
		transform: translateX(-50%);
		z-index: 50;
		display: inline-flex;
		align-items: center;
		gap: 0.5rem;
		padding: 0.8rem 1.4rem;
		border-radius: 999px;
		background: var(--cta);
		color: var(--cta-ink);
		font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
		font-weight: 600;
		font-size: 1rem;
		text-decoration: none;
		box-shadow: 0 10px 26px rgb(30 20 80 / 0.35);
	}

	/* Platz, damit die Leiste den Footer nicht verdeckt */
	.site-footer {
		padding-bottom: 5.5rem;
	}
}

/* Tastaturbedienung sichtbar machen */
a:focus-visible,
summary:focus-visible,
button:focus-visible {
	outline: 3px solid var(--cta);
	outline-offset: 3px;
	border-radius: 4px;
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

	.hero-cta__btn {
		transition: none;
	}
}

@media print {
	.call-bar,
	.hero-cta {
		display: none !important;
	}
}

/* ------------------------------------------------------------------
 * Impressum / Rechtliches — modernes Layout für alle Vorlagen
 * ------------------------------------------------------------------ */
main.page.legal--modern {
	max-width: 1080px;
	margin: 0 auto;
	padding: clamp(1rem, 3vw, 2rem) clamp(1rem, 3vw, 1.75rem) 4rem;
}

.legal--modern .legal-hero {
	position: relative;
	overflow: hidden;
	padding: clamp(1.75rem, 5vw, 3.25rem) clamp(1.25rem, 4vw, 2.75rem);
	border-radius: 24px;
	background:
		radial-gradient(circle at 85% 20%, rgb(255 255 255 / 0.18) 0%, transparent 45%),
		linear-gradient(135deg, #2b1d5c 0%, var(--cta) 65%, #8b78d8 100%);
	color: #ffffff;
	box-shadow: 0 20px 48px rgb(43 29 92 / 0.25);
}

.legal--modern .legal-crumbs {
	display: flex;
	flex-wrap: wrap;
	gap: 0.45rem;
	margin: 0 0 1rem;
	font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
	font-size: 0.88rem;
	color: rgb(255 255 255 / 0.75);
}

.legal--modern .legal-crumbs a {
	color: #ffffff;
	font-weight: 600;
	text-decoration: none;
}

.legal--modern .legal-crumbs a:hover {
	text-decoration: underline;
}

main.page.legal--modern .legal-hero h1 {
	margin: 0;
	padding: 0;
	border: none;
	font-size: clamp(2.2rem, 5.5vw, 3.4rem);
	font-weight: 700;
	letter-spacing: -0.02em;
	line-height: 1.05;
	color: #ffffff;
	text-align: left;
}

.legal--modern .legal-hero__sub {
	margin: 0.6rem 0 0;
	font-size: 1.05rem;
	color: rgb(255 255 255 / 0.85);
}

.legal--modern .legal-layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 300px;
	gap: 1.5rem;
	align-items: start;
	margin-top: 1.5rem;
}

.legal--modern .legal-card {
	background: #ffffff;
	border: 1px solid rgb(29 23 48 / 0.08);
	border-radius: 20px;
	box-shadow: 0 16px 40px rgb(29 23 48 / 0.07);
	padding: clamp(1.25rem, 3.5vw, 2.25rem);
	color: #1d1730;
}

main.page.legal--modern .impressum.legal-card {
	margin: 0;
	font-size: 1.02rem;
	line-height: 1.7;
	max-width: none;
}

.legal--modern .impressum.legal-card p {
	margin: 0 0 0.85rem;
	font-weight: 400;
}

.legal--modern .impressum.legal-card a {
	color: var(--cta);
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 0.18em;
	word-break: break-word;
}

.legal--modern .legal-h {
	scroll-margin-top: 1.25rem;
	margin: 2.25rem 0 0.75rem;
	padding-top: 1.5rem;
	border-top: 1px solid rgb(29 23 48 / 0.08);
	font-size: clamp(1.25rem, 2.6vw, 1.55rem);
	font-weight: 650;
	line-height: 1.25;
	color: #1d1730;
}

.legal--modern .legal-updated {
	margin: 2rem 0 0 !important;
	padding-top: 1rem;
	border-top: 1px dashed rgb(29 23 48 / 0.12);
	font-size: 0.88rem;
	color: #5b5570;
}

.legal--modern .legal-aside {
	position: sticky;
	top: 1.25rem;
	display: grid;
	gap: 1rem;
}

.legal--modern .legal-aside h2 {
	margin: 0 0 0.75rem;
	font-size: 0.8rem;
	font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--cta);
	border: none;
	padding: 0;
}

.legal--modern .legal-aside address {
	font-style: normal;
	line-height: 1.6;
}

.legal--modern .legal-contact-links {
	margin: 0.9rem 0 0;
	padding: 0.9rem 0 0;
	border-top: 1px solid rgb(29 23 48 / 0.08);
	list-style: none;
	display: grid;
	gap: 0.4rem;
}

.legal--modern .legal-contact-links a,
.legal--modern .legal-toc a {
	color: var(--cta);
	font-weight: 600;
	text-decoration: none;
	word-break: break-word;
}

.legal--modern .legal-contact-links a:hover,
.legal--modern .legal-toc a:hover {
	text-decoration: underline;
}

.legal--modern .legal-toc ol {
	margin: 0;
	padding-left: 1.2rem;
	display: grid;
	gap: 0.45rem;
	font-size: 0.95rem;
	line-height: 1.4;
}

main.page.legal--modern .legal-back {
	margin: 1.75rem 0 0;
	font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
}

main.page.legal--modern .legal-back a {
	color: var(--cta);
	font-weight: 600;
	text-decoration: none;
}

@media (max-width: 860px) {
	.legal--modern .legal-layout {
		grid-template-columns: 1fr;
	}

	/* Kontakt & Inhaltsverzeichnis zuerst, Text danach */
	.legal--modern .legal-aside {
		position: static;
		order: -1;
	}
}

@media print {
	.legal--modern .legal-hero {
		background: none;
		color: #000;
		box-shadow: none;
	}

	.legal--modern .legal-aside {
		display: none;
	}
}

/* Fett gesetzte Einzelzeilen im Rechtstext als Zwischentitel */
.legal--modern .impressum.legal-card p:has(> strong:only-child) {
	margin: 1.6rem 0 0.4rem;
	font-size: 1.06rem;
	color: #1d1730;
}
