/* BLT Wheels homepage service hero — [bltw_diensten].
   Desktop (>=1200px, motion allowed): four full-size layers, each clipped to its slice; the slice
   boundaries (--bltw-b1..3) animate, so photos slide past each other instead of being resized.
   Only clip-path, transform, filter and opacity change per frame — no layout work.
   Below 1200px or with reduced motion: plain image cards (2x2 tablet, stacked mobile). */

@property --bltw-b1 { syntax: '<percentage>'; inherits: true; initial-value: 25%; }
@property --bltw-b2 { syntax: '<percentage>'; inherits: true; initial-value: 50%; }
@property --bltw-b3 { syntax: '<percentage>'; inherits: true; initial-value: 75%; }

.bltw-diensten {
	--bltw-ease-move: cubic-bezier(.65, 0, .35, 1);
	--bltw-ease-out: cubic-bezier(.23, 1, .32, 1);
	--bltw-green: #61ce70;
	--bltw-active: 43%;            /* active slice width; others share the rest equally */
	--bltw-b1: 25%; --bltw-b2: 50%; --bltw-b3: 75%;
	position: relative; color: #fff;
}
.bltw-diensten__sr, .bltw-diensten .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;
}
.bltw-diensten__stage { position: relative; }

/* ---------------------------------------------------------------- shared panel parts */
.bltw-dienst { position: relative; overflow: hidden; background: #111; border-radius: 10px; }
.bltw-dienst__media { position: absolute; inset: 0; }
.bltw-dienst__img {
	position: absolute; top: 0; left: 0; width: 100%; height: 100%; max-width: none !important; margin: 0 !important;
	object-fit: cover; display: block; border-radius: 0 !important;
}
.bltw-dienst::after { /* readability scrim behind the text */
	content: ""; position: absolute; inset: 0; pointer-events: none;
	background: linear-gradient(to top, rgba(0, 0, 0, .88) 0%, rgba(0, 0, 0, .55) 34%, rgba(0, 0, 0, .05) 70%);
}
.bltw-dienst__body { position: absolute; inset: 0; z-index: 1; display: flex; flex-direction: column; justify-content: flex-end; }
.bltw-dienst__inner { padding: 22px 22px 24px; }
.bltw-dienst__bar { display: block; width: 32px; height: 3px; margin: 0 0 12px; background: var(--bltw-green); border-radius: 2px; transform-origin: left center; }
.bltw-dienst__title {
	margin: 0 !important; padding: 0; color: #fff !important; font-size: clamp(22px, 1.7vw, 28px) !important; line-height: 1.15 !important;
	font-weight: 700; letter-spacing: 0; white-space: nowrap; text-transform: none;
}
.bltw-dienst__text { margin: 10px 0 16px !important; color: rgba(255, 255, 255, .9); font-size: 15px; line-height: 1.5; max-width: 34ch; }
.bltw-dienst__link {
	display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border-radius: 6px;
	background: var(--bltw-green); color: #0b0d0b !important; font-weight: 700; font-size: 15px; line-height: 1.2; text-decoration: none !important;
	transition: background-color .15s ease;
}
/* the whole panel is the link's hit area: one tap, no nested links.
   Never transform the link itself (e.g. :active scale): that would make it the containing block,
   shrink this overlay mid-press and lose the click. */
.bltw-dienst__link::after { content: ""; position: absolute; inset: 0; z-index: 0; }
.bltw-dienst__link:hover, .bltw-dienst:hover .bltw-dienst__link { background: #7fdc8b; }
.bltw-dienst__link:active { background: #4fbb5e; }
.bltw-dienst__link:focus-visible { outline: 3px solid #fff; outline-offset: 3px; box-shadow: 0 0 0 6px #0b0d0b; }

/* ---------------------------------------------------------------- cards (mobile/tablet/reduced motion) */
.bltw-diensten__stage { display: grid; grid-template-columns: 1fr; gap: 12px; }
/* explicit heights, not aspect-ratio: Elementor's column/wrap flex containers mis-size aspect-ratio grids (collapsed to the margin) */
.bltw-dienst { height: min(72vw, 320px); }
.bltw-dienst::after { background: linear-gradient(to top, rgba(0, 0, 0, .9) 0%, rgba(0, 0, 0, .72) 42%, rgba(0, 0, 0, .12) 82%); }
@media (min-width: 700px) {
	.bltw-diensten__stage { grid-template-columns: repeat(2, 1fr); gap: 14px; }
	.bltw-dienst { height: clamp(260px, 34vw, 380px); }
}
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
	.bltw-dienst__img { transition: transform .5s var(--bltw-ease-out), filter .32s ease; }
	.bltw-dienst:hover .bltw-dienst__img { transform: scale(1.04); }
}
@media (min-width: 1200px) and (prefers-reduced-motion: reduce) {
	.bltw-diensten__stage { grid-template-columns: repeat(4, 1fr); }
	.bltw-dienst { height: 520px; }
	.bltw-dienst__text { min-height: 4.5em; }
}

/* ---------------------------------------------------------------- sliding slices (desktop, motion allowed) */
@media (min-width: 1200px) and (prefers-reduced-motion: no-preference) {
	.bltw-diensten {
		transition: --bltw-b1 .56s var(--bltw-ease-move), --bltw-b2 .56s var(--bltw-ease-move), --bltw-b3 .56s var(--bltw-ease-move);
	}
	.bltw-diensten__stage { display: block; height: clamp(460px, 62vh, 640px); border-radius: 12px; overflow: hidden; background: #000; isolation: isolate; }
	.bltw-dienst::after { background: linear-gradient(to top, rgba(0, 0, 0, .88) 0%, rgba(0, 0, 0, .55) 34%, rgba(0, 0, 0, .05) 70%); }
	.bltw-dienst {
		position: absolute; inset: 0; height: auto; border-radius: 0; background: transparent;
		--mid: calc((var(--l) + var(--r)) / 2);
		/* slices touch (no hit-test gap); the seam is drawn inside each slice */
		clip-path: inset(0 calc(100% - var(--r)) 0 var(--l));
	}
	.bltw-dienst:nth-child(1) { --l: 0%; --r: var(--bltw-b1); }
	.bltw-dienst:nth-child(2) { --l: var(--bltw-b1); --r: var(--bltw-b2); }
	.bltw-dienst:nth-child(3) { --l: var(--bltw-b2); --r: var(--bltw-b3); }
	.bltw-dienst:nth-child(4) { --l: var(--bltw-b3); --r: 100%; }
	.bltw-dienst + .bltw-dienst .bltw-dienst__body { box-shadow: inset 2px 0 0 #000; }

	/* the photo is as wide as the largest slice and follows the slice centre (translate % = stage width) */
	.bltw-dienst__media { transform: translateX(calc(var(--mid) - 50%)); }
	.bltw-dienst__img {
		left: calc((100% - var(--bltw-active)) / 2); width: var(--bltw-active);
		filter: grayscale(1) brightness(.78) contrast(1.06);
		transform: scale(1.001);
		transition: filter .34s ease, transform .6s var(--bltw-ease-out);
		will-change: transform;
	}
	.bltw-dienst__body { transform: translateX(var(--l)); }
	.bltw-dienst__inner { width: var(--bltw-active); box-sizing: border-box; padding: 0 28px 32px 24px; }
	.bltw-dienst__bar { transform: scaleX(1); transition: transform .4s var(--bltw-ease-out); }
	/* opacity only: a transform here would become the containing block of the link's full-panel hit area */
	.bltw-dienst__reveal { opacity: 0; transition: opacity .28s ease; }
	.bltw-dienst__text { max-width: 36ch; }

	/* active state: hover, keyboard focus, or the auto-highlight (data-active) */
	.bltw-diensten:has(.bltw-dienst:nth-child(1):is(:hover, :focus-within)), .bltw-diensten[data-active="1"] { --bltw-b1: 43%; --bltw-b2: 62%; --bltw-b3: 81%; }
	.bltw-diensten:has(.bltw-dienst:nth-child(2):is(:hover, :focus-within)), .bltw-diensten[data-active="2"] { --bltw-b1: 19%; --bltw-b2: 62%; --bltw-b3: 81%; }
	.bltw-diensten:has(.bltw-dienst:nth-child(3):is(:hover, :focus-within)), .bltw-diensten[data-active="3"] { --bltw-b1: 19%; --bltw-b2: 38%; --bltw-b3: 81%; }
	.bltw-diensten:has(.bltw-dienst:nth-child(4):is(:hover, :focus-within)), .bltw-diensten[data-active="4"] { --bltw-b1: 19%; --bltw-b2: 38%; --bltw-b3: 57%; }

	.bltw-dienst:is(:hover, :focus-within) .bltw-dienst__img,
	.bltw-diensten[data-active="1"] .bltw-dienst:nth-child(1) .bltw-dienst__img,
	.bltw-diensten[data-active="2"] .bltw-dienst:nth-child(2) .bltw-dienst__img,
	.bltw-diensten[data-active="3"] .bltw-dienst:nth-child(3) .bltw-dienst__img,
	.bltw-diensten[data-active="4"] .bltw-dienst:nth-child(4) .bltw-dienst__img { filter: grayscale(0) brightness(.92) contrast(1.02); transform: scale(1.05); }

	.bltw-dienst:is(:hover, :focus-within) .bltw-dienst__reveal,
	.bltw-diensten[data-active="1"] .bltw-dienst:nth-child(1) .bltw-dienst__reveal,
	.bltw-diensten[data-active="2"] .bltw-dienst:nth-child(2) .bltw-dienst__reveal,
	.bltw-diensten[data-active="3"] .bltw-dienst:nth-child(3) .bltw-dienst__reveal,
	.bltw-diensten[data-active="4"] .bltw-dienst:nth-child(4) .bltw-dienst__reveal { opacity: 1; transition-delay: .12s; }

	.bltw-dienst:is(:hover, :focus-within) .bltw-dienst__bar,
	.bltw-diensten[data-active="1"] .bltw-dienst:nth-child(1) .bltw-dienst__bar,
	.bltw-diensten[data-active="2"] .bltw-dienst:nth-child(2) .bltw-dienst__bar,
	.bltw-diensten[data-active="3"] .bltw-dienst:nth-child(3) .bltw-dienst__bar,
	.bltw-diensten[data-active="4"] .bltw-dienst:nth-child(4) .bltw-dienst__bar { transform: scaleX(1.75); }
}

/* ---------------------------------------------------------------- pause / resume control */
.bltw-diensten__bar { display: flex; justify-content: flex-end; margin-top: 12px; min-height: 36px; }
.bltw-diensten__toggle[hidden] { display: none !important; }
/* theme button styles (red text/border) are reset here at the component, not overridden globally */
.bltw-diensten button.bltw-diensten__toggle {
	display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 16px; margin: 0; border-radius: 999px;
	border: 1px solid rgba(255, 255, 255, .35); background: transparent; color: #fff; font: inherit; font-size: 13px; font-weight: 600;
	line-height: 1; letter-spacing: 0; text-transform: none; box-shadow: none; cursor: pointer;
	transition: border-color .15s ease, background-color .15s ease;
}
.bltw-diensten button.bltw-diensten__toggle:hover, .bltw-diensten button.bltw-diensten__toggle:focus { border-color: #fff; background: rgba(255, 255, 255, .08); color: #fff; }
.bltw-diensten button.bltw-diensten__toggle:focus-visible { outline: 3px solid var(--bltw-green); outline-offset: 2px; }
.bltw-diensten__ico { fill: currentColor; }
.bltw-diensten__toggle .bltw-diensten__ico--play, .bltw-diensten__toggle[aria-pressed="true"] .bltw-diensten__ico--pause { display: none; }
.bltw-diensten__toggle[aria-pressed="true"] .bltw-diensten__ico--play { display: block; }
@media (max-width: 1199px), (prefers-reduced-motion: reduce) { .bltw-diensten__bar { display: none; } }

/* theme/Elementor set img { height: auto }: restore cover-fit height at the component */
.bltw-diensten .bltw-dienst img.bltw-dienst__img { height: 100% !important; }

/* ---------------------------------------------------------------- homepage sections around the hero */
@media (prefers-reduced-motion: reduce) {
	.bltw-home-video .elementor-background-video-container { display: none; }
	.bltw-home-video { background: #000 url('/wp-content/uploads/bltw-home-video-poster.jpg') center / cover no-repeat; }
}
.bltw-home-contact a:not(.elementor-button) { color: #111317; text-decoration: underline; text-underline-offset: 3px; }
.bltw-home-contact a:not(.elementor-button):hover { color: #18723F; }
.bltw-home-contact h3.elementor-heading-title { text-transform: none; }
@media (min-width: 1025px) {
	.bltw-home-contact__map > .elementor-widget-google_maps,
	.bltw-home-contact__map .elementor-custom-embed,
	.bltw-home-contact__map iframe { height: 100% !important; min-height: 600px; }
	.bltw-home-contact__map > .elementor-widget-google_maps { flex: 1 1 auto; }
}
.bltw-trust .elementor-icon-box-wrapper { align-items: center; }
.bltw-trust .elementor-icon-box-title { margin: 0; }
