/**
 * WERI – Ergänzungen zu theme.json.
 * Farben/Abstände kommen als CSS-Variablen aus theme.json.
 */

html {
	scroll-behavior: smooth;
}

/* Sprungziele nicht unter dem fixierten Kopfbereich verstecken. */
[id] {
	scroll-margin-top: 6rem;
}

/* ---------- Kopfbereich ---------- */
.wp-site-blocks > header {
	position: sticky;
	top: 0;
	z-index: 100;
}

.admin-bar .wp-site-blocks > header {
	top: var(--wp-admin--admin-bar--height, 32px);
}

.weri-header {
	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.12);
}

.weri-header .weri-logo {
	margin: 0;
}

.weri-header .wp-block-navigation a:hover,
.weri-header .wp-block-navigation a:focus {
	text-decoration: underline;
	text-underline-offset: 0.35em;
}

/* Buttons auf dunklem Grund */
.has-primary-background-color .wp-block-button.is-style-outline > .wp-block-button__link,
.has-primary-dark-background-color .wp-block-button.is-style-outline > .wp-block-button__link,
.has-primary-darker-background-color .wp-block-button.is-style-outline > .wp-block-button__link,
.weri-hero .wp-block-button.is-style-outline > .wp-block-button__link {
	background: transparent;
	border-color: currentColor;
	color: var(--wp--preset--color--base);
}

.has-primary-background-color .wp-block-button.is-style-outline > .wp-block-button__link:hover,
.has-primary-dark-background-color .wp-block-button.is-style-outline > .wp-block-button__link:hover,
.has-primary-darker-background-color .wp-block-button.is-style-outline > .wp-block-button__link:hover,
.weri-hero .wp-block-button.is-style-outline > .wp-block-button__link:hover {
	background: var(--wp--preset--color--base);
	color: var(--wp--preset--color--primary);
}

.weri-btn-light > .wp-block-button__link {
	border-color: var(--wp--preset--color--base);
}

.weri-btn-light > .wp-block-button__link:hover {
	background: var(--wp--preset--color--primary-light) !important;
	border-color: var(--wp--preset--color--primary-light);
	color: var(--wp--preset--color--primary-dark) !important;
}

/* Outline-Button auf hellem Grund */
.weri-btn-dark > .wp-block-button__link {
	color: var(--wp--preset--color--primary);
	border-color: var(--wp--preset--color--primary);
}

.weri-btn-dark > .wp-block-button__link:hover {
	background: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--base);
}

/* Unter 900px: Burger-Menü statt umbrechender Navigation (core schaltet erst bei 600px um). */
@media (max-width: 899px) {
	.weri-header .wp-block-navigation__responsive-container-open:not(.always-shown) {
		display: flex !important;
	}

	.weri-header .wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open) {
		display: none !important;
	}

	.weri-header .wp-block-buttons.weri-header-cta {
		display: none;
	}
}

/* ---------- Typo-Helfer ---------- */
.weri-script {
	font-family: var(--wp--preset--font-family--script);
	line-height: 1.2;
	margin-bottom: 0;
}

.weri-eyebrow {
	color: var(--wp--preset--color--accent);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 700;
	letter-spacing: 0.12em;
	margin-bottom: 0;
	text-transform: uppercase;
}

/* ---------- Hero (Bannerbild) ---------- */
.weri-hero {
	background-color: var(--wp--preset--color--primary-dark);
	/* 80 % der Fensterhöhe, auf sehr hohen Bildschirmen aber nicht größer als 760px. */
	min-height: min(80vh, 760px) !important;
}

.weri-hero h1 {
	margin-top: 0.5rem;
	text-shadow: 0 2px 16px rgba(0, 0, 0, 0.35);
}

/* Auf schmalen Bildschirmen liegt Text über dem ganzen Bild -> gleichmäßig abdunkeln. */
@media (max-width: 781px) {
	.weri-hero .wp-block-cover__background {
		background: rgba(8, 56, 76, 0.82) !important;
	}
}

/* ---------- Kennzahlen ---------- */
.weri-stat-number {
	color: var(--wp--preset--color--primary);
	font-size: var(--wp--preset--font-size--xx-large);
	font-weight: 700;
	line-height: 1;
	margin-bottom: 0.25rem;
}

.weri-stats .wp-block-column + .wp-block-column {
	border-left: 1px solid var(--wp--preset--color--border);
}

@media (max-width: 781px) {
	.weri-stats .wp-block-column + .wp-block-column {
		border-left: 0;
		border-top: 1px solid var(--wp--preset--color--border);
		padding-top: var(--wp--preset--spacing--30);
	}
}

/* ---------- Karten ---------- */
.is-style-weri-card {
	background: var(--wp--preset--color--base);
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 12px;
	padding: var(--wp--preset--spacing--40);
	transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.is-style-weri-card:hover {
	box-shadow: var(--wp--preset--shadow--soft);
	transform: translateY(-3px);
}

.weri-contact-form.is-style-weri-card:hover {
	transform: none;
}

.weri-card-number {
	align-items: center;
	background: var(--wp--preset--color--primary-light);
	border-radius: 10px;
	color: var(--wp--preset--color--primary);
	display: inline-flex;
	font-weight: 700;
	height: 3rem;
	justify-content: center;
	width: 3rem;
}

.is-style-weri-card h3 {
	margin-top: var(--wp--preset--spacing--20);
}

/* ---------- Kontakt ---------- */
.weri-contact-icon {
	align-items: center;
	background: var(--wp--preset--color--primary);
	border-radius: 50%;
	color: var(--wp--preset--color--base);
	display: inline-flex;
	flex: 0 0 2.75rem;
	font-weight: 700;
	height: 2.75rem;
	justify-content: center;
	width: 2.75rem;
}

.weri-cf7 p {
	margin: 0 0 1rem;
}

.weri-cf7 label {
	display: block;
	font-weight: 500;
}

.weri-cf7 input:not([type="submit"]):not([type="checkbox"]),
.weri-cf7 textarea {
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 6px;
	box-sizing: border-box;
	font: inherit;
	margin-top: 0.35rem;
	padding: 0.7rem 0.9rem;
	width: 100%;
}

.weri-cf7 input:focus,
.weri-cf7 textarea:focus {
	border-color: var(--wp--preset--color--primary);
	outline: 2px solid var(--wp--preset--color--primary-light);
}

.weri-cf7 input[type="submit"] {
	background: var(--wp--preset--color--primary);
	border: 0;
	border-radius: 6px;
	color: var(--wp--preset--color--base);
	cursor: pointer;
	font: inherit;
	font-weight: 500;
	padding: 0.8rem 1.6rem;
}

.weri-cf7 input[type="submit"]:hover {
	background: var(--wp--preset--color--primary-dark);
}

/* ---------- Fußbereich ---------- */
.weri-footer-list {
	list-style: none;
	padding-left: 0;
}

.weri-footer-list li {
	margin-bottom: 0.4rem;
}

.weri-footer a {
	text-decoration: none;
}

.weri-footer a:hover {
	text-decoration: underline;
}

.weri-footer .wp-block-separator {
	border-color: rgba(255, 255, 255, 0.2);
	opacity: 1;
}

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

	.is-style-weri-card {
		transform: none !important;
		transition: none;
	}
}

/* ---------- Inhaltsseiten (Impressum, Datenschutz …) ---------- */
.wp-block-post-content h2 {
	font-size: var(--wp--preset--font-size--x-large);
	margin-top: var(--wp--preset--spacing--40);
}

.wp-block-post-content h3 {
	font-size: var(--wp--preset--font-size--large);
	margin-top: var(--wp--preset--spacing--30);
}

.wp-block-post-content h4 {
	font-size: var(--wp--preset--font-size--medium);
}

.wp-block-post-content h2,
.wp-block-post-content h3 {
	hyphens: auto;
	overflow-wrap: break-word;
}

/* ---------- Betreuung & Sicherheit (Monitoring) ---------- */
.weri-monitoring .weri-eyebrow {
	color: var(--wp--preset--color--primary-light);
}

.weri-checklist {
	list-style: none;
	margin-top: var(--wp--preset--spacing--30);
	padding-left: 0;
}

.weri-checklist li {
	margin-bottom: 1.1rem;
	padding-left: 2.25rem;
	position: relative;
}

.weri-checklist li::before {
	align-items: center;
	background: var(--wp--preset--color--primary-light);
	border-radius: 50%;
	color: var(--wp--preset--color--primary-dark);
	content: "✓";
	display: flex;
	font-size: 0.85rem;
	font-weight: 700;
	height: 1.5rem;
	justify-content: center;
	left: 0;
	position: absolute;
	top: 0.1rem;
	width: 1.5rem;
}

.weri-monitoring-shot img {
	border: 1px solid rgba(255, 255, 255, 0.12);
	border-radius: 10px;
	box-shadow: 0 30px 70px rgba(0, 0, 0, 0.45);
	display: block;
	height: auto;
	width: 100%;
}

.weri-monitoring-shot figcaption {
	color: var(--wp--preset--color--primary-light);
	font-size: var(--wp--preset--font-size--small);
	margin-top: 0.9rem;
	opacity: 0.8;
	text-align: center;
}

.weri-footer .rcb-sc-link {
	font-size: var(--wp--preset--font-size--small);
}
