/*
Theme Name: Bauexperts
Theme URI: https://bauexperts.ch/
Description: Block-Theme für Bauexperts & Immowert GmbH – neutrale Bauexpertise, Schadensanalyse und Gutachten. Abgestimmt auf die aus Contao übernommenen Inhalte (Leistungen, Referenzen, Seiten).
Version: 1.7.2
Requires at least: 6.5
Tested up to: 7.1
Requires PHP: 7.4
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: bauexperts
Tags: block-patterns, full-site-editing, one-column, two-columns, custom-logo, editor-style
*/

/* ---------------------------------------------------------------- basics */

:root {
	--be-tick: var(--wp--preset--color--stahl);
	--be-red: var(--wp--preset--color--signalrot);
}

html { scroll-padding-top: 6rem; }

body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }

:where(.wp-site-blocks) :focus-visible {
	outline: 3px solid var(--wp--preset--color--signalrot-tief);
	outline-offset: 3px;
}

.wp-block-post-content > p,
.wp-block-post-content > ul,
.wp-block-post-content > ol,
.wp-block-post-content > h2,
.wp-block-post-content > h3 { max-width: 68ch; }

.be-inhalt .wp-block-post-content > * + * { margin-block-start: 1.25rem; }

a[href^="tel:"] { font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ---------------------------------------------------------------- Massstab (ruler) */

/* A measuring scale: minor ticks every 10px, major ticks every 50px, one red mark. */
.be-massstab,
.be-header::after,
.be-footer::before {
	content: "";
	display: block;
	height: 13px;
	background:
		repeating-linear-gradient(to right, var(--be-tick) 0 1px, transparent 1px 50px) left bottom / 100% 12px no-repeat,
		repeating-linear-gradient(to right, var(--be-tick) 0 1px, transparent 1px 10px) left bottom / 100% 6px no-repeat,
		linear-gradient(var(--be-tick), var(--be-tick)) left bottom / 100% 1px no-repeat;
	opacity: 0.55;
}

.be-header::after,
.be-footer::before {
	opacity: 0.45;
}

hr.wp-block-separator.is-style-massstab {
	border: 0;
	height: 13px;
	width: 100%;
	max-width: none;
	background:
		repeating-linear-gradient(to right, var(--be-tick) 0 1px, transparent 1px 50px) left bottom / 100% 12px no-repeat,
		repeating-linear-gradient(to right, var(--be-tick) 0 1px, transparent 1px 10px) left bottom / 100% 6px no-repeat,
		linear-gradient(var(--be-tick), var(--be-tick)) left bottom / 100% 1px no-repeat;
	opacity: 0.5;
}

/* ---------------------------------------------------------------- header */

/* The template-part wrapper is the sticky element (the group inside has no room to stick). */
.wp-site-blocks > header.wp-block-template-part {
	position: sticky;
	top: 0;
	z-index: 50;
	background: var(--wp--preset--color--papier);
}

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

@media (max-width: 600px) {
	.admin-bar .wp-site-blocks > header.wp-block-template-part { top: 0; }
}

.be-header { background: var(--wp--preset--color--papier); }

.be-header__bar { padding-block: 0.75rem; gap: 1.5rem; }

.be-header .wp-block-site-logo img { width: 240px; max-width: 100%; height: auto; }

@media (max-width: 600px) {
	.be-header .wp-block-site-logo img { width: 170px; }
}

/* Show the site title only when no logo is set. */
.be-header .wp-block-site-logo + .wp-block-site-title { display: none; }

.be-header .wp-block-site-title {
	font-family: var(--wp--preset--font-family--barlow-semi-condensed);
	font-weight: 600;
	font-size: 1.375rem;
	margin: 0;
}

.be-header .wp-block-site-title a { text-decoration: none; color: inherit; }

.be-header__actions { gap: 1.5rem; }

.be-header__phone { margin: 0; font-weight: 500; }

.be-header__phone a { color: var(--wp--preset--color--graphit); text-decoration: none; }

.be-header__phone a:hover { text-decoration: underline; }

.be-header .wp-block-navigation-item__content { padding-block: 0.25rem; }

/* Desktop menu: hover only changes the colour; the red bar marks the current page (or its parent) alone. */
.be-header .wp-block-navigation .wp-block-navigation-item__content,
.be-header .wp-block-navigation .wp-block-navigation-item__content:hover,
.be-header .wp-block-navigation .wp-block-navigation-item__content:focus {
	text-decoration: none;
}

.be-header .wp-block-navigation .wp-block-navigation-item__content { transition: color 0.15s ease; }

.be-header .wp-block-navigation .wp-block-navigation-item:hover > .wp-block-navigation-item__content,
.be-header .wp-block-navigation .wp-block-navigation-item__content:focus-visible,
.be-header .wp-block-navigation .wp-block-navigation-item:hover > .wp-block-navigation-submenu__toggle {
	color: var(--wp--preset--color--signalrot-tief);
}

@media (min-width: 961px) {
	.be-header .wp-block-navigation__container > .wp-block-navigation-item > .wp-block-navigation-item__content { position: relative; }

	.be-header .wp-block-navigation__container > .wp-block-navigation-item > .wp-block-navigation-item__content::after {
		content: "";
		position: absolute;
		left: 0;
		right: 0;
		bottom: -0.35rem;
		height: 2px;
		background: var(--be-red);
		transform: scaleX(0);
		transform-origin: left;
		transition: transform 0.2s ease;
	}

	.be-header .wp-block-navigation__container > .current-menu-item > .wp-block-navigation-item__content::after,
	.be-header .wp-block-navigation__container > .current-menu-ancestor > .wp-block-navigation-item__content::after,
	.be-header .wp-block-navigation__container > .wp-block-navigation-item > a[aria-current="page"]::after {
		transform: scaleX(1);
	}
}

@media (max-width: 960px) {
	.be-header__phone { display: none; }
}

@media (max-width: 600px) {
	.be-header .wp-block-site-title { font-size: 1.125rem; }
	.be-header .wp-block-buttons.be-header__cta .wp-block-button__link { padding: 0.6rem 0.8rem; font-size: 0.9375rem; }
}

/* ---------------------------------------------------------------- page title band */

.be-titelband {
	background: var(--wp--preset--color--beton);
	padding-block: clamp(2.25rem, 6vw, 4rem) clamp(1.75rem, 4vw, 2.75rem);
}

.be-titelband .wp-block-post-title,
.be-titelband h1 { margin: 0; max-width: 22ch; }

.be-titelband .be-zurueck { margin: 0 0 0.75rem; font-size: var(--wp--preset--font-size--small); }

.be-titelband .be-zurueck a { color: var(--wp--preset--color--stahl); }

.be-titelband .wp-block-post-excerpt { margin-top: 1rem; font-size: var(--wp--preset--font-size--large); max-width: 46ch; }

.be-titelband .wp-block-post-excerpt__excerpt { color: var(--wp--preset--color--stahl); }

.be-inhalt { padding-block: clamp(2rem, 6vw, 4.5rem); }

/* ---------------------------------------------------------------- hero (front page) */

.be-hero { padding-block: clamp(2rem, 6vw, 4.5rem) clamp(1rem, 3vw, 2rem); }

.be-hero + .be-anlass { padding-top: clamp(2.5rem, 6vw, 4.5rem); }

.be-hero h1 { max-width: 19ch; margin-bottom: 1.25rem; line-height: 1.04; font-size: clamp(2.4rem, 4.6vw, 3.75rem) !important; }

.be-hero__lead { max-width: 40ch; color: var(--wp--preset--color--stahl); }

.be-hero .wp-block-buttons { margin-top: 2rem; }

.be-hero__bild { margin: 0; }

.be-hero__bild img { display: block; width: 100%; height: auto; }

/* ---------------------------------------------------------------- shared section rhythm */

/* Full-width bands sit flush against each other and against header/footer. */
.wp-site-blocks > main,
.wp-site-blocks > footer,
main.wp-block-group > .alignfull,
main.wp-block-group > .be-titelband + * { margin-block-start: 0; }

.be-sektion { padding-block: clamp(3rem, 8vw, 6rem); }

.be-sektion > .wp-block-heading:first-child,
.be-sektion__kopf { margin-bottom: clamp(1.5rem, 4vw, 2.5rem); }

.be-sektion__intro { color: var(--wp--preset--color--stahl); max-width: 56ch; }

/* An item marked like a gauge reading: thin rule with a short red mark at its start. */
.be-markiert {
	position: relative;
	border-top: 1px solid var(--wp--preset--color--linie);
	padding-top: 1.25rem;
}

.be-markiert::before {
	content: "";
	position: absolute;
	top: -2px;
	left: 0;
	width: 2.5rem;
	height: 3px;
	background: var(--be-red);
}

/* ---------------------------------------------------------------- "Wann Sie uns brauchen" */

.be-anlass .wp-block-columns { row-gap: 2.5rem; }

.be-anlass h3 { margin: 0 0 0.5rem; }

.be-anlass p { margin: 0 0 0.75rem; }

.be-anlass .be-anlass__link a { font-weight: 500; }

/* ---------------------------------------------------------------- Vorgehen (4 steps) */

.be-schritte { counter-reset: be-schritt; }

.be-schritt { position: relative; padding-top: 4.25rem; }

.be-schritt::before {
	counter-increment: be-schritt;
	content: counter(be-schritt);
	position: absolute;
	top: 0;
	left: 0;
	font-family: var(--wp--preset--font-family--barlow-semi-condensed);
	font-weight: 600;
	font-size: 2.75rem;
	line-height: 1;
	color: var(--wp--preset--color--graphit);
}

.be-schritt::after {
	content: "";
	position: absolute;
	top: 3.15rem;
	left: 0;
	right: 0;
	height: 12px;
	background:
		linear-gradient(var(--be-red), var(--be-red)) left bottom / 2px 12px no-repeat,
		repeating-linear-gradient(to right, var(--be-tick) 0 1px, transparent 1px 10px) left bottom / 100% 5px no-repeat,
		linear-gradient(var(--be-tick), var(--be-tick)) left bottom / 100% 1px no-repeat;
	opacity: 0.75;
}

.be-schritt h3 { margin: 0.5rem 0 0.4rem; }

.be-schritt p { margin: 0; color: var(--wp--preset--color--stahl); }

/* ---------------------------------------------------------------- Leistungen list (query loop) */


.be-leistungen .wp-block-post {
	position: relative;
	border-top: 1px solid var(--wp--preset--color--linie);
	padding-top: 1.1rem;
}

.be-leistungen .wp-block-post::before {
	content: "";
	position: absolute;
	top: -2px;
	left: 0;
	width: 2.5rem;
	height: 3px;
	background: var(--be-red);
}

.be-leistungen .wp-block-post-title { margin: 0 0 0.4rem; font-size: var(--wp--preset--font-size--large); }

.be-leistungen .wp-block-post-title a { text-decoration: none; color: var(--wp--preset--color--graphit); }

.be-leistungen .wp-block-post-title a:hover { text-decoration: underline; text-decoration-color: var(--be-red); }

.be-leistungen .wp-block-post-excerpt { margin: 0; font-size: 1rem; }

.be-leistungen .wp-block-post-excerpt__more-text { margin-top: 0.4rem; }

/* compact variant: titles only (sidebar / "weitere Leistungen") */
.be-liste-kompakt .wp-block-post-template { gap: 0; }

.be-liste-kompakt .wp-block-post { border-top: 1px solid var(--wp--preset--color--linie); padding-block: 0.65rem; }

.be-liste-kompakt .wp-block-post-title { margin: 0; font-size: 1.0625rem; }

.be-liste-kompakt .wp-block-post-title a { text-decoration: none; color: var(--wp--preset--color--graphit); }

.be-liste-kompakt .wp-block-post-title a:hover { color: var(--wp--preset--color--signalrot-tief); }

/* ---------------------------------------------------------------- Neutral / audiences */

.be-neutral { background: var(--wp--preset--color--beton); }

.be-neutral .be-zielgruppen li { border-top-color: #D6D4CF; }

.be-zielgruppen { list-style: none; padding: 0; margin: 0; columns: 2; column-gap: 2rem; }

.be-zielgruppen li {
	break-inside: avoid;
	border-top: 1px solid var(--wp--preset--color--linie);
	padding: 0.6rem 0;
	font-family: var(--wp--preset--font-family--barlow-semi-condensed);
	font-weight: 500;
	font-size: 1.1875rem;
}

.be-zertifikat { font-size: var(--wp--preset--font-size--small); color: var(--wp--preset--color--stahl); }

@media (max-width: 600px) {
	.be-zielgruppen { columns: 1; }
}

/* ---------------------------------------------------------------- CTA band */

.be-cta { background: var(--wp--preset--color--graphit); color: var(--wp--preset--color--papier); padding-block: clamp(3rem, 7vw, 5rem); }

.be-cta h2 { color: var(--wp--preset--color--papier); margin: 0 0 0.5rem; font-size: var(--wp--preset--font-size--xx-large); }

.be-cta p { color: #C5C5C5; margin: 0; max-width: 46ch; }

.be-cta .wp-block-button.is-style-outline .wp-block-button__link {
	color: var(--wp--preset--color--papier);
	border: 1.5px solid currentColor;
	background: transparent;
}

.be-cta .wp-block-button.is-style-outline .wp-block-button__link:hover,
.be-cta .wp-block-button.is-style-outline .wp-block-button__link:focus {
	background: var(--wp--preset--color--papier);
	color: var(--wp--preset--color--graphit);
}

.be-cta .wp-block-button:not(.is-style-outline) .wp-block-button__link:hover,
.be-cta .wp-block-button:not(.is-style-outline) .wp-block-button__link:focus {
	background: var(--wp--preset--color--papier);
	color: var(--wp--preset--color--graphit);
}

/* outline buttons elsewhere */
.wp-block-button.is-style-outline .wp-block-button__link {
	background: transparent;
	color: var(--wp--preset--color--graphit);
	border: 1.5px solid var(--wp--preset--color--graphit);
	padding-block: calc(0.85rem - 1.5px);
}

.wp-block-button.is-style-outline .wp-block-button__link:hover,
.wp-block-button.is-style-outline .wp-block-button__link:focus {
	background: var(--wp--preset--color--graphit);
	color: var(--wp--preset--color--papier);
}

/* ---------------------------------------------------------------- contact box (sidebar) – same card as the coming-soon page */

.be-kontaktbox {
	background: var(--wp--preset--color--graphit);
	color: var(--wp--preset--color--papier);
	border-top: 4px solid var(--be-red);
	padding: 1.75rem 1.5rem 1.5rem;
}

.be-kontaktbox h2 { font-size: var(--wp--preset--font-size--large); margin: 0 0 0.6rem; color: var(--wp--preset--color--papier); }

.be-kontaktbox p { margin: 0 0 0.35rem; font-size: 1rem; color: #C5C5C5; }

.be-kontaktbox p a { color: var(--wp--preset--color--papier); }

.be-kontaktbox p a:hover { color: var(--wp--preset--color--lachs); }

.be-kontaktbox .wp-block-button__link:hover,
.be-kontaktbox .wp-block-button__link:focus {
	background: var(--wp--preset--color--papier);
	color: var(--wp--preset--color--graphit);
}

.be-kontaktbox .wp-block-buttons { margin-top: 1rem; }

@media (min-width: 782px) {
	.be-sticky { position: sticky; top: 7.5rem; }
}

/* ---------------------------------------------------------------- footer */

.be-footer { background: var(--wp--preset--color--beton); font-size: 1rem; }

.be-footer__inhalt { padding-block: clamp(2.5rem, 6vw, 4rem) 1.5rem; }

.be-footer h2 { font-size: 1.1875rem; margin: 0 0 0.75rem; }

.be-footer p { margin: 0 0 0.35rem; }

.be-footer a { color: var(--wp--preset--color--graphit); }

.be-footer__links { list-style: none; padding: 0; margin: 0; }

.be-footer__links li { margin: 0 0 0.35rem; }

.be-footer__unten {
	border-top: 1px solid #D6D4CF;
	padding-block: 1.25rem 2rem;
	font-size: var(--wp--preset--font-size--small);
	color: var(--wp--preset--color--stahl);
}

/* ---------------------------------------------------------------- content imported from Contao */

/* Groups that had a background in Contao (c2w-bg-*) and any coloured group */
.wp-block-post-content .wp-block-group.has-background,
.wp-block-post-content .c2w-bg-lightgray {
	padding: clamp(1.5rem, 4vw, 2.5rem);
}

.wp-block-post-content .c2w-bg-lightgray { background: var(--wp--preset--color--beton-hell); }

/* Former theme boxes (iconbox, teambox, linkbox, …) */
.wp-block-post-content [class*="c2w-"]:not(.c2w-bg-lightgray):not(.c2w-todo):not(.c2w-map) {
	border-top: 1px solid var(--wp--preset--color--linie);
	padding-top: 1rem;
}

/* Former header images / sliders */
.wp-block-post-content .wp-block-cover { min-height: 320px; }

.wp-block-post-content .wp-block-cover h1,
.wp-block-post-content .wp-block-cover h2,
.wp-block-post-content .wp-block-cover p { color: var(--wp--preset--color--papier); }

/* Query loops inside imported pages (e.g. Leistungen) get the list look */
.wp-block-post-content .wp-block-query .wp-block-post {
	border-top: 1px solid var(--wp--preset--color--linie);
	padding-top: 1rem;
}

.wp-block-post-content .wp-block-query .wp-block-post-title a { text-decoration: none; color: var(--wp--preset--color--graphit); }

.wp-block-post-content .wp-block-query .wp-block-post-featured-image { margin-bottom: 0.75rem; }

.c2w-map { display: block; width: 100%; border: 0; }

.c2w-todo { font-family: var(--wp--preset--font-family--barlow); }

/* images */
.wp-block-image img,
.wp-block-post-featured-image img { border-radius: 0; }

/* ---------------------------------------------------------------- tables */

.wp-block-table table { border-collapse: collapse; }

.wp-block-table td,
.wp-block-table th { border: 0; border-bottom: 1px solid var(--wp--preset--color--linie); padding: 0.6rem 0.75rem 0.6rem 0; text-align: left; }

.wp-block-table thead { border-bottom: 2px solid var(--wp--preset--color--graphit); }

/* ---------------------------------------------------------------- motion */

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

/* Links on images / dark areas stay readable */
.wp-block-cover a,
.be-cta a:not(.wp-block-button__link) { color: var(--wp--preset--color--papier); }

/* ---------------------------------------------------------------- mobile header + menu overlay */

.be-header .wp-block-button__link { white-space: nowrap; }

@media (max-width: 600px) {
	.be-header__bar { gap: 0.75rem; }
	.be-header__actions { gap: 0.75rem; }
	/* burger last, at the far right; the CTA stays visible next to it */
	.be-header__actions > .wp-block-navigation { order: 3; }
	/* bigger logo on phones; it shrinks by itself when the header has less room (e.g. with the button next to it) */
	.be-header .wp-block-site-logo img { width: 200px; }
	.be-header__bar > .wp-block-group:first-child,
	.be-header .wp-block-site-logo,
	.be-header .wp-block-site-logo a { min-width: 0; flex-shrink: 1; }
}

/* Bigger tap targets; the open button stays hidden from 600px up (WordPress shows the full menu there). */
@media (max-width: 599px) {
	.be-header .wp-block-navigation__responsive-container-open:not(.always-shown) {
		width: 44px;
		height: 44px;
		display: inline-flex;
		align-items: center;
		justify-content: center;
	}
}

.be-header .wp-block-navigation__responsive-container-close {
	width: 44px;
	height: 44px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.be-header .wp-block-navigation__responsive-container-open svg,
.be-header .wp-block-navigation__responsive-container-close svg { width: 28px; height: 28px; }

/* The open overlay: full-width list, left aligned, large touch targets. */
.be-header .wp-block-navigation__responsive-container.is-menu-open {
	padding: 0.75rem clamp(1rem, 5vw, 1.5rem) 2rem;
	background: var(--wp--preset--color--papier);
	border-top: 4px solid var(--be-red);
}

.be-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-close {
	max-width: none;
	width: 100%;
}

.be-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-close {
	top: 0;
	right: 0;
}

.be-header .wp-block-navigation .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content {
	align-items: stretch;
	padding-top: 3.5rem;
}

.be-header .wp-block-navigation .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container {
	align-items: stretch;
	justify-content: flex-start;
	width: 100%;
	gap: 0;
}

.be-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item {
	width: 100%;
	align-items: stretch;
	border-bottom: 1px solid var(--wp--preset--color--linie);
}

.be-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content {
	display: block;
	box-sizing: border-box;
	width: 100%;
	padding: 1rem 0 1rem 0.9rem;
	font-size: 1.5rem;
	font-weight: 600;
	text-align: left;
	box-shadow: none;
}

.be-header .wp-block-navigation__responsive-container.is-menu-open a[aria-current="page"] {
	box-shadow: inset 3px 0 0 var(--be-red);
	color: var(--wp--preset--color--signalrot-tief);
}

/* Tablets: WordPress switches to the burger only below 600px; use it up to 960px so the menu never wraps. */
@media (min-width: 600px) and (max-width: 960px) {
	.be-header .wp-block-navigation__responsive-container-open:not(.always-shown) {
		display: inline-flex;
		width: 44px;
		height: 44px;
		align-items: center;
		justify-content: center;
		order: 3;
	}
	.be-header .wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open) { display: none; }
	.be-header__actions > .wp-block-navigation { order: 3; }
	.be-header .wp-block-site-logo img { width: 200px; }
}

/* ---------------------------------------------------------------- start page as page content */

.be-startseite > .alignfull { margin-block-start: 0; }

.be-startseite { margin-block-start: 0; }

.be-hero__kicker {
	margin: 0 0 1rem;
	font-family: var(--wp--preset--font-family--barlow-semi-condensed);
	font-weight: 500;
	font-size: 1.125rem;
	color: var(--wp--preset--color--signalrot-tief);
}

/* ---------------------------------------------------------------- team */

.be-team { gap: clamp(1.5rem, 4vw, 3rem); margin-block: 2.5rem; }

.be-person h3 { margin: 1rem 0 0.25rem; }

.be-person .be-person__rolle { color: var(--wp--preset--color--stahl); margin: 0 0 0.6rem; }

.be-person .wp-block-image { margin: 0; }

.be-person .wp-block-image img { width: 100%; height: auto; }

/* Leistungen overview with images */
.be-leistungen--bilder .wp-block-post { border-top: 0; padding-top: 0; }

.be-leistungen--bilder .wp-block-post::before { display: none; }

.be-leistungen--bilder .wp-block-post-featured-image { margin: 0 0 1rem; }

.be-leistungen--bilder .wp-block-post-title { font-size: var(--wp--preset--font-size--large); margin: 0 0 0.4rem; }

.be-leistungen--bilder .wp-block-post-title a { text-decoration: none; color: var(--wp--preset--color--graphit); }

/* ---------------------------------------------------------------- dropdown menus (desktop) */

.be-header .wp-block-navigation .wp-block-navigation__submenu-container {
	background: var(--wp--preset--color--papier);
	border: 1px solid var(--wp--preset--color--linie);
	padding: 0.4rem 0;
	min-width: 17rem;
	white-space: nowrap;
	box-shadow: 0 16px 32px rgba(23, 23, 23, 0.1);
}

@media (min-width: 961px) {
	/* Open to the right, starting under the menu item (the text lines up), with a small gap below the bar. */
	.be-header .wp-block-navigation.items-justified-right .wp-block-navigation__container > .has-child > .wp-block-navigation__submenu-container {
		left: -1.1rem;
		right: auto;
		top: calc(100% + 0.9rem);
	}

	/* Invisible bridge over the gap so the menu stays open while the mouse moves down. */
	.be-header .wp-block-navigation__container > .has-child > .wp-block-navigation__submenu-container::before {
		content: "";
		position: absolute;
		left: 0;
		right: 0;
		top: calc(-0.9rem - 1px);
		height: 0.9rem;
	}
}

.be-header .wp-block-navigation .wp-block-navigation__submenu-container .wp-block-navigation-item__content {
	padding: 0.6rem 1.1rem;
	font-weight: 500;
	transition: background-color 0.15s ease, color 0.15s ease;
}

.be-header .wp-block-navigation .wp-block-navigation__submenu-container .wp-block-navigation-item__content:hover,
.be-header .wp-block-navigation .wp-block-navigation__submenu-container .wp-block-navigation-item__content:focus-visible {
	background: var(--wp--preset--color--beton);
	color: var(--wp--preset--color--signalrot-tief);
}

.be-header .wp-block-navigation .wp-block-navigation__submenu-container a[aria-current="page"] {
	color: var(--wp--preset--color--signalrot-tief);
	box-shadow: inset 3px 0 0 var(--be-red);
}

/* ---------------------------------------------------------------- sub-menus in the mobile overlay */

.be-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-container {
	align-items: stretch;
	width: 100%;
	white-space: normal;
	border: 0;
	box-shadow: none;
	padding: 0 0 0.75rem 0.9rem;
	min-width: 0;
	background: transparent;
}

.be-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-container .wp-block-navigation-item {
	border-bottom: 0;
	justify-content: flex-start;
}

.be-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-container .wp-block-navigation-item__content {
	font-size: 1.125rem;
	font-weight: 500;
	padding: 0.5rem 0 0.5rem 0.9rem;
	color: var(--wp--preset--color--stahl);
}

.be-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-submenu__toggle { display: none; }

/* two white sections in a row: no double spacing */
.be-leistungen + .be-anlass { padding-top: clamp(1rem, 3vw, 2rem); }

.be-team .be-person img { aspect-ratio: 4 / 5; object-fit: cover; }

/* Mobile overlay: sub-menus span the full width, aligned with their parent (WordPress sets a fixed width). */
.be-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item.has-child {
	align-items: stretch;
}

.be-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item.has-child > .wp-block-navigation__submenu-container {
	width: 100% !important;
	min-width: 0 !important;
	margin: 0;
	padding: 0 0 0.75rem 0.9rem !important;
}

.be-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container > .has-child {
	padding: 0 !important;
}

.be-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container > .has-child > .wp-block-navigation-item__content {
	margin: 0 !important;
}

/* ---------------------------------------------------------------- forms (Contact Form 7 + search) */

:root {
	--be-feld-rand: #B9B7B1;
	--be-fokus: 0 0 0 3px rgba(217, 37, 25, 0.18);
}

.wpcf7 form { margin: 0; }

.be-form { display: grid; gap: 1.25rem; max-width: 46rem; }

.be-form__reihe { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }

@media (max-width: 640px) {
	.be-form__reihe { grid-template-columns: 1fr; }
}

.be-form__feld { display: flex; flex-direction: column; gap: 0.4rem; margin: 0; }

.wpcf7 label,
.be-form__feld > label {
	font-family: var(--wp--preset--font-family--barlow-semi-condensed);
	font-weight: 600;
	font-size: 1.0625rem;
	color: var(--wp--preset--color--graphit);
}

.be-form__pflicht { color: var(--wp--preset--color--signalrot-tief); }

.be-form__optional { font-family: var(--wp--preset--font-family--barlow); font-weight: 400; font-size: 0.9375rem; color: var(--wp--preset--color--stahl); }

.be-form__hinweis { font-size: 0.875rem; color: var(--wp--preset--color--stahl); }

.wpcf7 .wpcf7-form-control-wrap { display: block; }

.wpcf7 input[type="text"],
.wpcf7 input[type="email"],
.wpcf7 input[type="tel"],
.wpcf7 input[type="url"],
.wpcf7 input[type="number"],
.wpcf7 input[type="date"],
.wpcf7 select,
.wpcf7 textarea,
.wp-block-search__input {
	box-sizing: border-box;
	width: 100%;
	min-height: 3.1rem;
	padding: 0.8rem 0.95rem;
	font: inherit;
	font-size: 1.0625rem;
	line-height: 1.4;
	color: var(--wp--preset--color--graphit);
	background: var(--wp--preset--color--papier);
	border: 1px solid var(--be-feld-rand);
	border-radius: var(--wp--custom--radius);
	transition: border-color 0.15s, box-shadow 0.15s;
	-webkit-appearance: none;
	appearance: none;
}

.wpcf7 textarea { min-height: 9.5rem; resize: vertical; }

.wpcf7 select {
	padding-right: 2.75rem;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 6l5 5 5-5' fill='none' stroke='%23171717' stroke-width='1.6'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 0.95rem center;
	background-size: 1rem;
	cursor: pointer;
}

.wpcf7 input::placeholder,
.wpcf7 textarea::placeholder { color: #8A8C8B; }

.wpcf7 input:hover,
.wpcf7 select:hover,
.wpcf7 textarea:hover { border-color: var(--wp--preset--color--stahl); }

.wpcf7 input:focus,
.wpcf7 select:focus,
.wpcf7 textarea:focus,
.wp-block-search__input:focus {
	outline: none;
	border-color: var(--wp--preset--color--graphit);
	box-shadow: var(--be-fokus);
}

/* File upload: a real button instead of the browser default */
.wpcf7 input[type="file"] {
	width: 100%;
	padding: 0.6rem;
	font: inherit;
	font-size: 0.9375rem;
	color: var(--wp--preset--color--stahl);
	background: var(--wp--preset--color--beton);
	border: 1px dashed var(--be-feld-rand);
	border-radius: var(--wp--custom--radius);
	cursor: pointer;
}

.wpcf7 input[type="file"]::file-selector-button {
	margin-right: 0.9rem;
	padding: 0.55rem 1rem;
	font-family: var(--wp--preset--font-family--barlow-semi-condensed);
	font-weight: 600;
	font-size: 0.9375rem;
	color: var(--wp--preset--color--papier);
	background: var(--wp--preset--color--graphit);
	border: 0;
	border-radius: var(--wp--custom--radius);
	cursor: pointer;
}

.wpcf7 input[type="file"]:focus-visible { outline: 3px solid var(--wp--preset--color--signalrot-tief); outline-offset: 2px; }

/* Consent checkbox */
.be-form__zustimmung,
.wpcf7 .wpcf7-acceptance { font-size: 0.9375rem; color: var(--wp--preset--color--stahl); }

.wpcf7 .wpcf7-list-item { margin: 0; }

.wpcf7 .wpcf7-acceptance label { display: flex; gap: 0.7rem; align-items: flex-start; font: inherit; color: inherit; cursor: pointer; }

.wpcf7 input[type="checkbox"],
.wpcf7 input[type="radio"] {
	flex: none;
	width: 1.25rem;
	height: 1.25rem;
	margin: 0.15rem 0 0;
	accent-color: var(--wp--preset--color--signalrot);
	cursor: pointer;
}

/* Submit */
.be-form__senden { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; }

.wpcf7 input[type="submit"],
.wpcf7 .wpcf7-submit {
	padding: 0.95rem 1.75rem;
	font-family: var(--wp--preset--font-family--barlow-semi-condensed);
	font-weight: 600;
	font-size: 1.125rem;
	line-height: 1.2;
	color: var(--wp--preset--color--papier);
	background: var(--wp--preset--color--signalrot);
	border: 0;
	border-radius: var(--wp--custom--radius);
	cursor: pointer;
	transition: background-color 0.15s;
}

.wpcf7 input[type="submit"]:hover,
.wpcf7 input[type="submit"]:focus-visible { background: var(--wp--preset--color--signalrot-tief); }

.wpcf7 input[type="submit"]:focus-visible { outline: 3px solid var(--wp--preset--color--graphit); outline-offset: 3px; }

.wpcf7 input[type="submit"]:disabled { opacity: 0.55; cursor: not-allowed; }

.wpcf7 .wpcf7-spinner { margin: 0; background-color: var(--wp--preset--color--stahl); }

/* Errors */
.wpcf7 .wpcf7-not-valid { border-color: var(--wp--preset--color--signalrot-tief); }

.wpcf7 .wpcf7-not-valid-tip { margin-top: 0.4rem; font-size: 0.9375rem; color: var(--wp--preset--color--signalrot-tief); }

/* Result message after sending */
.wpcf7 form .wpcf7-response-output {
	margin: 1.5rem 0 0;
	padding: 0.9rem 1.1rem;
	font-size: 1rem;
	border: 0;
	border-left: 4px solid var(--wp--preset--color--stahl);
	background: var(--wp--preset--color--beton);
	border-radius: 0;
}

.wpcf7 form.sent .wpcf7-response-output { border-left-color: #2E7D4F; background: #EEF5F0; }

.wpcf7 form.invalid .wpcf7-response-output,
.wpcf7 form.unaccepted .wpcf7-response-output,
.wpcf7 form.failed .wpcf7-response-output,
.wpcf7 form.spam .wpcf7-response-output { border-left-color: var(--wp--preset--color--signalrot-tief); background: #FBEDEC; }

/* Search block button matches */
.wp-block-search__button {
	padding: 0.8rem 1.25rem;
	font-family: var(--wp--preset--font-family--barlow-semi-condensed);
	font-weight: 600;
	color: var(--wp--preset--color--papier);
	background: var(--wp--preset--color--signalrot);
	border: 0;
	border-radius: var(--wp--custom--radius);
}

/* German file picker (assets/js/formular.js); the native input stays focusable but hidden */
.wpcf7 input[type="file"] { box-sizing: border-box; }

.wpcf7 .be-datei__input {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}

.wpcf7 .be-datei {
	display: flex;
	align-items: center;
	gap: 0.9rem;
	box-sizing: border-box;
	width: 100%;
	min-height: 3.1rem;
	padding: 0.45rem;
	font-family: var(--wp--preset--font-family--barlow);
	font-weight: 400;
	font-size: 0.9375rem;
	color: var(--wp--preset--color--stahl);
	background: var(--wp--preset--color--beton);
	border: 1px dashed var(--be-feld-rand);
	border-radius: var(--wp--custom--radius);
	cursor: pointer;
}

.wpcf7 .be-datei:hover { border-color: var(--wp--preset--color--stahl); }

.wpcf7 .be-datei__knopf {
	flex: none;
	padding: 0.55rem 1rem;
	font-family: var(--wp--preset--font-family--barlow-semi-condensed);
	font-weight: 600;
	color: var(--wp--preset--color--papier);
	background: var(--wp--preset--color--graphit);
	border-radius: var(--wp--custom--radius);
}

.wpcf7 .be-datei__name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.wpcf7 .be-datei.has-file { border-style: solid; color: var(--wp--preset--color--graphit); }

.wpcf7 .be-datei__input:focus-visible + .be-datei {
	outline: 3px solid var(--wp--preset--color--signalrot-tief);
	outline-offset: 2px;
}

.wpcf7 .wpcf7-not-valid + .be-datei { border-color: var(--wp--preset--color--signalrot-tief); }

/* ---------------------------------------------------------------- Leistungen: line icons (one per service, by slug) */

.be-leistungen:not(.be-leistungen--bilder) .wp-block-post[class*="be-leistung--"] {
	padding-top: 1.5rem;
}

.be-leistungen:not(.be-leistungen--bilder) .wp-block-post[class*="be-leistung--"]::after {
	content: "";
	display: block;
	width: 3rem;
	height: 3rem;
	margin-bottom: 1rem;
	background-repeat: no-repeat;
	background-position: left center;
	background-size: contain;
	order: -1;
}

.be-leistungen .wp-block-post.be-leistung--bauschaeden-und-maengel::after { background-image: url("assets/images/icons/bauschaeden-und-maengel.svg"); }
.be-leistungen .wp-block-post.be-leistung--feuchte-und-schallmessungen::after { background-image: url("assets/images/icons/feuchte-und-schallmessungen.svg"); }
.be-leistungen .wp-block-post.be-leistung--gutachten-und-beweissicherung::after { background-image: url("assets/images/icons/gutachten-und-beweissicherung.svg"); }
.be-leistungen .wp-block-post.be-leistung--baubegleitung-und-qualitaetskontrolle::after { background-image: url("assets/images/icons/baubegleitung-und-qualitaetskontrolle.svg"); }
.be-leistungen .wp-block-post.be-leistung--beratung-beim-immobilienkauf::after { background-image: url("assets/images/icons/beratung-beim-immobilienkauf.svg"); }
.be-leistungen .wp-block-post.be-leistung--bau-und-sanierungsberatung::after { background-image: url("assets/images/icons/bau-und-sanierungsberatung.svg"); }

.be-leistungen:not(.be-leistungen--bilder) .wp-block-post[class*="be-leistung--"] { display: flex; flex-direction: column; }

/* ---------------------------------------------------------------- "Nach oben" button */

.be-nach-oben {
	position: fixed;
	right: clamp(1rem, 2.5vw, 2rem);
	bottom: clamp(1rem, 2.5vw, 2rem);
	z-index: 50;
	display: grid;
	place-items: center;
	width: 3rem;
	height: 3rem;
	padding: 0;
	border: 0;
	border-radius: 2px;
	background: var(--wp--preset--color--graphit);
	color: var(--wp--preset--color--papier);
	box-shadow: 0 8px 20px rgba(23, 23, 23, 0.18);
	cursor: pointer;
	overflow: hidden;
	opacity: 0;
	visibility: hidden;
	transform: translateY(0.75rem);
	transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s, background-color 0.15s ease;
}

.be-nach-oben[hidden] { display: none; }

.be-nach-oben.is-sichtbar { opacity: 1; visibility: visible; transform: none; }

/* progress line along the bottom edge, like a measuring tape running out */
.be-nach-oben::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: 0;
	width: 100%;
	height: 3px;
	background: var(--be-red);
	transform: scaleX(var(--be-fortschritt, 0));
	transform-origin: left;
}

.be-nach-oben svg { transition: transform 0.2s ease; }

.be-nach-oben:hover,
.be-nach-oben:focus-visible { background: var(--be-red); }

.be-nach-oben:hover::after,
.be-nach-oben:focus-visible::after { background: var(--wp--preset--color--graphit); }

.be-nach-oben:hover svg { transform: translateY(-2px); }

.be-nach-oben:focus-visible { outline: 2px solid var(--wp--preset--color--graphit); outline-offset: 3px; }

.wp-site-blocks:focus { outline: none; }

/* stays out of the way of the open mobile menu */
.has-modal-open .be-nach-oben { display: none; }

@media (prefers-reduced-motion: reduce) {
	.be-nach-oben, .be-nach-oben svg { transition: none; }
}

@media print {
	.be-nach-oben { display: none !important; }
}

/* ---------------------------------------------------------------- Card hover: whole card clickable, bar runs out, arrow moves */

:root {
	--be-pfeil: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 12h15M13 6l6 6-6 6' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
	--be-karte-tempo: 0.35s cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* the link covers the whole card */
.be-anlass .be-anlass__link a::after,
.be-leistungen .wp-block-post-title a::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
}

.be-anlass .be-markiert,
.be-leistungen .wp-block-post { cursor: pointer; }

/* red marker bar runs out to full width */
.be-anlass .be-markiert::before,
.be-leistungen .wp-block-post::before { transition: width var(--be-karte-tempo); }

.be-anlass .be-markiert:hover::before,
.be-anlass .be-markiert:focus-within::before,
.be-leistungen:not(.be-leistungen--bilder) .wp-block-post:hover::before,
.be-leistungen:not(.be-leistungen--bilder) .wp-block-post:focus-within::before { width: 100%; }

/* titles turn red */
.be-anlass .be-markiert h3,
.be-leistungen .wp-block-post-title a { transition: color 0.2s ease; }

.be-anlass .be-markiert:hover h3,
.be-anlass .be-markiert:focus-within h3,
.be-leistungen .wp-block-post:hover .wp-block-post-title a,
.be-leistungen .wp-block-post:focus-within .wp-block-post-title a {
	color: var(--wp--preset--color--signalrot-tief);
	text-decoration: none;
}

/* "Wann Sie uns brauchen": link with an arrow instead of an underline */
.be-anlass .be-anlass__link a {
	display: inline-block;
	padding-right: 1.6em;
	text-decoration: none;
	color: var(--wp--preset--color--signalrot-tief);
}

.be-anlass .be-anlass__link a {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 12h15M13 6l6 6-6 6' fill='none' stroke='%23AF1B12' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-size: 1.05em;
	background-position: right 0.4em center;
	transition: background-position var(--be-karte-tempo);
}

.be-anlass .be-markiert:hover .be-anlass__link a,
.be-anlass .be-markiert:focus-within .be-anlass__link a { background-position: right 0 center; }

/* Leistungen: arrow slides in after the title */
.be-leistungen .wp-block-post-title::after {
	content: "";
	display: inline-block;
	width: 0.8em;
	height: 0.8em;
	margin-left: 0.35em;
	vertical-align: -0.06em;
	background: var(--wp--preset--color--signalrot-tief);
	-webkit-mask: var(--be-pfeil) no-repeat center / contain;
	mask: var(--be-pfeil) no-repeat center / contain;
	opacity: 0;
	transform: translateX(-0.4em);
	transition: opacity 0.2s ease, transform var(--be-karte-tempo);
}

.be-leistungen .wp-block-post:hover .wp-block-post-title::after,
.be-leistungen .wp-block-post:focus-within .wp-block-post-title::after { opacity: 1; transform: none; }

/* icon cards: the icon lifts a little */
.be-leistungen:not(.be-leistungen--bilder) .wp-block-post[class*="be-leistung--"]::after { transition: transform var(--be-karte-tempo); }

.be-leistungen:not(.be-leistungen--bilder) .wp-block-post:hover::after,
.be-leistungen:not(.be-leistungen--bilder) .wp-block-post:focus-within::after { transform: translateY(-4px); }

/* photo cards: slow zoom, colours come up, red bar runs along the top edge of the photo */
.be-leistungen--bilder .wp-block-post-featured-image { overflow: hidden; position: relative; }

.be-leistungen--bilder .wp-block-post-featured-image img {
	transition: transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1), filter 0.4s ease;
	filter: saturate(0.85);
}

.be-leistungen--bilder .wp-block-post:hover .wp-block-post-featured-image img,
.be-leistungen--bilder .wp-block-post:focus-within .wp-block-post-featured-image img {
	transform: scale(1.05);
	filter: saturate(1);
}

.be-leistungen--bilder .wp-block-post::before {
	display: block;
	top: 0;
	width: 0;
	z-index: 2;
}

.be-leistungen--bilder .wp-block-post:hover::before,
.be-leistungen--bilder .wp-block-post:focus-within::before { width: 100%; }

/* keyboard focus stays visible on the (now card-sized) link */
.be-anlass .be-anlass__link a:focus-visible,
.be-leistungen .wp-block-post-title a:focus-visible { outline: none; }

.be-anlass .be-markiert:has(a:focus-visible),
.be-leistungen .wp-block-post:has(a:focus-visible) { outline: 2px solid var(--wp--preset--color--graphit); outline-offset: 6px; }

@media (prefers-reduced-motion: reduce) {
	.be-anlass .be-markiert::before,
	.be-leistungen .wp-block-post::before,
	.be-leistungen .wp-block-post::after,
	.be-leistungen .wp-block-post-title::after,
	.be-anlass .be-anlass__link a,
	.be-leistungen--bilder .wp-block-post-featured-image img { transition: none; }

	.be-leistungen--bilder .wp-block-post:hover .wp-block-post-featured-image img { transform: none; }
}

/* ---------------------------------------------------------------- Slider (pattern "Startseite – Slider") */

.be-slider { position: relative; }

.be-slider .be-slide {
	min-height: clamp(24rem, 64vh, 40rem);
	padding: clamp(3rem, 7vw, 5.5rem) var(--wp--style--root--padding-right, 1.5rem) clamp(4rem, 8vw, 6rem) var(--wp--style--root--padding-left, 1.5rem);
	align-items: center;
}

/* text lines up with the rest of the page (wide width), on the left */
.be-slider .be-slide.has-custom-content-position.has-custom-content-position .wp-block-cover__inner-container,
.be-slider .be-slide .wp-block-cover__inner-container {
	width: 100%;
	max-width: var(--wp--style--global--wide-size, 1200px);
	margin-inline: auto;
	color: var(--wp--preset--color--papier);
}

/* dark shade on the left behind the text, photo stays clear on the right */
.be-slider .be-slide:has(.wp-block-cover__image-background)::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(90deg, rgba(23, 23, 23, 0.62) 0%, rgba(23, 23, 23, 0.3) 50%, rgba(23, 23, 23, 0) 85%);
	pointer-events: none;
}

.be-slider .be-slide .wp-block-cover__inner-container { position: relative; z-index: 1; }

.be-slider .be-slide__titel {
	font-family: var(--wp--preset--font-family--barlow-semi-condensed);
	font-weight: 600;
	font-size: clamp(2rem, 4.4vw, 3.75rem);
	line-height: 1.04;
	letter-spacing: 0.005em;
	text-transform: uppercase;
	max-width: 20ch;
	margin: 0 0 1rem;
	color: var(--wp--preset--color--papier);
	text-wrap: balance;
}

.be-slider .be-slide__text {
	font-size: clamp(1.05rem, 1.5vw, 1.3rem);
	line-height: 1.5;
	max-width: 34ch;
	margin: 0 0 1.75rem;
	color: rgba(255, 255, 255, 0.92);
}

.be-slider .be-slide .wp-block-button__link { box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18); }

/* --- carousel (only once the script has set it up; in the editor the slides stack) */

.be-slider.is-bereit { overflow: hidden; }

.be-slider__spur {
	display: flex;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
	overscroll-behavior-x: contain;
}

.be-slider__spur::-webkit-scrollbar { display: none; }

.be-slider__spur > .be-slide,
.be-slider__spur > .wp-block-cover {
	flex: 0 0 100%;
	margin: 0 !important;
	scroll-snap-align: start;
	scroll-snap-stop: always;
}

/* slow zoom on the visible photo, text glides in */
.be-slider.is-bereit .wp-block-cover__image-background { transition: transform 7s ease-out; transform: scale(1.06); }

.be-slider.is-bereit [aria-hidden="false"] .wp-block-cover__image-background { transform: scale(1); }

.be-slider.is-bereit .wp-block-cover__inner-container {
	opacity: 0;
	transform: translateY(14px);
	transition: opacity 0.6s ease 0.15s, transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1) 0.15s;
}

.be-slider.is-bereit [aria-hidden="false"] .wp-block-cover__inner-container { opacity: 1; transform: none; }

/* arrows */
.be-slider__pfeil {
	position: absolute;
	top: 50%;
	z-index: 3;
	display: grid;
	place-items: center;
	width: 3.5rem;
	height: 3.5rem;
	margin-top: -1.75rem;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.78);
	color: var(--wp--preset--color--graphit);
	cursor: pointer;
	-webkit-backdrop-filter: blur(6px);
	backdrop-filter: blur(6px);
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
	transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.be-slider__pfeil--zurueck { left: clamp(0.75rem, 2vw, 2rem); }

.be-slider__pfeil--weiter { right: clamp(0.75rem, 2vw, 2rem); }

.be-slider__pfeil:hover,
.be-slider__pfeil:focus-visible { background: var(--wp--preset--color--papier); color: var(--be-red); }

.be-slider__pfeil--zurueck:hover { transform: translateX(-2px); }

.be-slider__pfeil--weiter:hover { transform: translateX(2px); }

.be-slider__pfeil:focus-visible { outline: 2px solid var(--wp--preset--color--papier); outline-offset: 3px; }

/* dots: short bars like ruler marks; the current one is red and longer */
.be-slider__punkte {
	position: absolute;
	left: 0;
	right: 0;
	bottom: clamp(1rem, 2.5vw, 1.75rem);
	z-index: 3;
	display: flex;
	justify-content: center;
	gap: 0.4rem;
}

.be-slider__punkt {
	width: 2rem;
	height: 1.5rem;
	padding: 0;
	border: 0;
	background: none;
	cursor: pointer;
	position: relative;
	transition: width 0.3s ease;
}

.be-slider__punkt::before {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	top: 50%;
	height: 3px;
	margin-top: -1.5px;
	background: rgba(255, 255, 255, 0.6);
	transition: background-color 0.2s ease;
}

.be-slider__punkt:hover::before { background: var(--wp--preset--color--papier); }

.be-slider__punkt[aria-current="true"] { width: 3rem; }

.be-slider__punkt[aria-current="true"]::before { background: var(--be-red); }

.be-slider__punkt:focus-visible { outline: 2px solid var(--wp--preset--color--papier); outline-offset: 2px; }

/* narrower screens: arrows move down next to the dots, so they never cover the text */
@media (max-width: 1360px) {
	.be-slider__pfeil {
		top: auto;
		bottom: clamp(0.6rem, 2vw, 1.25rem);
		margin-top: 0;
		width: 2.75rem;
		height: 2.75rem;
	}
	.be-slider__pfeil--zurueck { left: auto; right: calc(clamp(0.75rem, 2vw, 2rem) + 3.25rem); }
	.be-slider__punkte { justify-content: flex-start; padding-left: max(var(--wp--style--root--padding-left, 1.5rem), calc((100% - var(--wp--style--global--wide-size, 1200px)) / 2)); bottom: clamp(1.25rem, 2.5vw, 1.85rem); }
}

/* phones: swipe + dots, no arrows */
@media (max-width: 600px) {
	.be-slider__pfeil { display: none; }
	.be-slider .be-slide { min-height: 26rem; padding-bottom: 4.5rem; }
	.be-slider .be-slide:has(.wp-block-cover__image-background)::after {
		background: linear-gradient(0deg, rgba(23, 23, 23, 0.7) 0%, rgba(23, 23, 23, 0.35) 60%, rgba(23, 23, 23, 0.15) 100%);
	}
	.be-slider .be-slide { align-items: flex-end; }
}

@media (prefers-reduced-motion: reduce) {
	.be-slider.is-bereit .wp-block-cover__image-background,
	.be-slider.is-bereit .wp-block-cover__inner-container { transition: none; transform: none; }
}

@media print {
	.be-slider__pfeil, .be-slider__punkte { display: none; }
}

/* play / pause for the automatic slide change */
.be-slider__abspielen {
	display: grid;
	place-items: center;
	width: 1.75rem;
	height: 1.75rem;
	margin-right: 0.35rem;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.2);
	color: var(--wp--preset--color--papier);
	cursor: pointer;
	align-self: center;
	transition: background-color 0.2s ease;
}

.be-slider__abspielen:hover { background: rgba(255, 255, 255, 0.35); }

.be-slider__abspielen:focus-visible { outline: 2px solid var(--wp--preset--color--papier); outline-offset: 2px; }
