/* wagnergraphics – Kopf-Video & Imagefilm (Film: Stadt Wernigerode), 20.11.2026
   Geladen nur auf Seiten mit .wg-kopfvideo / .wg-imagefilm (mu-plugin wagnergraphics-imagefilm.php) */

/* Kopf-Video: Vorschaubild (picture) liegt hinter dem Video, feste Seitenverhältnisse gegen Springen */
.wg-kopfvideo {
	position: relative;
	aspect-ratio: 12 / 5;
	overflow: hidden;
	background: #ece8dd;
}
.wg-kopfvideo__bild,
.wg-kopfvideo__bild img,
.wg-kopfvideo__video {
	position: absolute;
	inset: 0;
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	margin: 0;
}
.wg-kopfvideo__video { background: transparent; }

@media (max-width: 767.98px) {
	.wg-kopfvideo { aspect-ratio: 1 / 1; }
}

/* Pause-Knopf (WCAG 2.2.2), erscheint erst, wenn das Skript läuft */
.wg-kopfvideo__pause {
	position: absolute;
	right: clamp(12px, 2vw, 28px);
	bottom: clamp(12px, 2vw, 28px);
	z-index: 2;
	width: 44px;
	height: 44px;
	display: grid;
	place-items: center;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, .85);
	color: var(--theme-palette-color-4, #004829);
	cursor: pointer;
	transition: transform .35s cubic-bezier(.3, 1.6, .5, 1), background-color .2s;
}
.wg-kopfvideo__pause[hidden] { display: none !important; }
.wg-kopfvideo__pause svg { width: 20px; height: 20px; }
.wg-kopfvideo__pause .wg-i-play { display: none; }
.wg-kopfvideo__pause[data-paused="1"] .wg-i-play { display: block; }
.wg-kopfvideo__pause[data-paused="1"] .wg-i-pause { display: none; }
.wg-kopfvideo__pause:focus-visible {
	outline: 3px solid var(--theme-palette-color-2, #c19c2b);
	outline-offset: 3px;
}
@media (hover: hover) and (pointer: fine) {
	.wg-kopfvideo__pause:hover { transform: scale(1.08); background: #fff; }
}

/* Imagefilm-Sektion: heller Cremegrund, Text links, Film rechts, mobil gestapelt */
.wg-imagefilm.wp-block-group {
	margin-block: 0;
	padding: clamp(56px, 8vw, 128px) 5vw;
	background: var(--theme-palette-color-6, #f6efe0);
}
.wg-imagefilm__innen {
	max-width: 2400px;
	margin-inline: auto;
	display: grid;
	grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
	gap: clamp(32px, 6vw, 120px);
	align-items: center;
}
.wg-imagefilm__innen > * { margin: 0; }
.wg-imagefilm__text > * { max-width: 34rem; }
.wg-imagefilm__text > * + * { margin-top: 1.1em; }
.wg-imagefilm__text h2 { text-wrap: balance; }
.wg-imagefilm__film.wp-block-video { margin: 0; }
.wg-imagefilm__film video {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 16 / 9;
	border-radius: 3px;
	background: #1e1a14;
	box-shadow: 0 22px 44px -22px rgba(0, 72, 41, .45);
}
.wg-imagefilm__film figcaption {
	margin: 12px 0 0;
	font-size: 14px;
	line-height: 1.5;
	text-align: start;
	color: rgba(0, 0, 0, .64);
}

/* gestapelt: Überschrift, Text, Film, darunter der Button */
@media (max-width: 999.98px) {
	.wg-imagefilm__innen { grid-template-columns: minmax(0, 1fr); gap: 20px; }
	.wg-imagefilm__text { display: contents; }
	.wg-imagefilm__text > * { max-width: 40rem; }
	.wg-imagefilm__text > * + * { margin-top: 0; }
	.wg-imagefilm__text h2 { order: 1; }
	.wg-imagefilm__text p { order: 2; }
	.wg-imagefilm__film.wp-block-video { order: 3; margin-top: 12px; }
	.wg-imagefilm__text .wp-block-buttons { order: 4; margin-top: 12px; }
}
@media (max-width: 767.98px) {
	.wg-imagefilm__text .wp-block-button,
	.wg-imagefilm__text .wp-block-button__link { width: 100%; }
}
