/*
 * OPASCA Veranstaltungen – Übersicht
 * Alle Regeln sind unter .opv gekapselt, damit Theme und Page-Builder nicht hineinfunken.
 * Anpassen über die Variablen im ersten Block (z. B. im Customizer unter "Zusätzliches CSS").
 */

.opv {
	--opv-ink: #0e2a3b;
	--opv-muted: #4c6474;
	--opv-surface: #f1f7fa;
	--opv-line: #d8e7ee;
	--opv-cyan: #42baee;
	--opv-blue: #0077d9;
	--opv-blue-strong: #0062b3;
	--opv-magenta: #be1e63;

	--opv-accent: var(--opv-cyan);
	--opv-accent-text: var(--opv-blue-strong);

	--opv-font: inherit;
	--opv-max: 1240px;
	--opv-gutter: clamp(16px, 4vw, 40px);
	--opv-sticky-top: 12px; /* Abstand der Leiste unter dem Header – die Header-Höhe erkennt das Skript selbst (--opv-header) */
	--opv-r-lg: 28px;
	--opv-r: 20px;
	--opv-r-sm: 10px;
	--opv-ease: cubic-bezier(.2, .7, .2, 1);

	position: relative;
	/* width: 100% – sonst schrumpft das Plugin in Flex-Containern (z. B. Nicepage) auf seinen Inhalt */
	box-sizing: border-box;
	width: 100%;
	max-width: calc(var(--opv-max) + 2 * var(--opv-gutter)); /* Inhaltsbreite wie bisher: --opv-max */
	margin-inline: auto;
	padding: clamp(40px, 7vw, 96px) var(--opv-gutter) clamp(56px, 8vw, 120px);
	font-family: var(--opv-font);
	font-size: 1rem;
	line-height: 1.55;
	color: var(--opv-ink);
}

.opv *,
.opv *::before,
.opv *::after {
	box-sizing: border-box;
}

.opv [data-bereich="klinik"] {
	--opv-accent: var(--opv-magenta);
	--opv-accent-text: var(--opv-magenta);
}

.opv [data-bereich="strahlentherapie"] {
	--opv-accent: var(--opv-blue);
	--opv-accent-text: var(--opv-blue-strong);
}

.opv .opv-sr {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}

.opv a:focus-visible,
.opv button:focus-visible {
	outline: 3px solid var(--opv-blue);
	outline-offset: 3px;
}

/* ---------- Kopfbereich ---------- */

.opv .opv-hero {
	display: grid;
	gap: clamp(16px, 2vw, 28px);
	margin: 0 0 clamp(24px, 3vw, 36px);
}

.opv .opv-hero__title {
	margin: 0;
	padding: 0 0 .12em;
	overflow-x: visible;
	overflow-y: clip; /* Maske für die Einblendung, schneidet seitlich nie ab */
	font-family: inherit;
	font-size: clamp(2.25rem, 9.2vw, 6.75rem);
	font-weight: 700;
	line-height: 1;
	letter-spacing: -.045em;
	color: var(--opv-ink);
	text-transform: none;
}

.opv .opv-hero__title-inner {
	display: inline-block;
}

.opv.opv-js .opv-hero__title-inner {
	animation: opv-rise 1s var(--opv-ease) both;
}

.opv .opv-hero__intro {
	max-width: 44ch;
	margin: 0 0 .5em;
	font-size: clamp(1rem, 1.25vw, 1.125rem);
	color: var(--opv-muted);
}

.opv.opv-js .opv-hero__intro {
	animation: opv-fade .8s var(--opv-ease) .25s both;
}

@keyframes opv-rise {
	from { transform: translateY(105%); }
	to { transform: none; }
}

@keyframes opv-fade {
	from { opacity: 0; transform: translateY(10px); }
	to { opacity: 1; transform: none; }
}

/* ---------- Umschaltleiste Bevorstehend / Rückblick ---------- */

.opv .opv-switch {
	position: sticky;
	top: calc(var(--opv-header, 0px) + var(--opv-sticky-top));
	z-index: 20;
	display: flex;
	width: fit-content;
	margin: 0 0 clamp(40px, 6vw, 72px);
	padding: 5px;
	border: 1px solid var(--opv-line);
	border-radius: 999px;
	background: rgb(255 255 255 / .85);
	-webkit-backdrop-filter: blur(14px) saturate(1.4);
	backdrop-filter: blur(14px) saturate(1.4);
	transition: box-shadow .35s var(--opv-ease), border-color .35s;
}

.opv .opv-switch.is-stuck {
	border-color: transparent;
	box-shadow: 0 12px 32px -14px rgb(14 42 59 / .35), 0 0 0 1px rgb(14 42 59 / .06);
}

.opv .opv-switch__link {
	position: relative;
	z-index: 1;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 40px;
	padding: 0 16px 0 18px;
	border-radius: 999px;
	font-size: .9375rem;
	font-weight: 600;
	line-height: 1;
	color: var(--opv-muted);
	text-decoration: none;
	transition: color .3s;
}

.opv .opv-switch__link:hover {
	color: var(--opv-ink);
}

.opv .opv-switch__link.is-active {
	color: #fff;
}

/* Ohne JavaScript (oder bis es läuft) trägt der aktive Link selbst den Hintergrund. */
.opv .opv-switch:not(.is-ready) .opv-switch__link.is-active {
	background: var(--opv-ink);
}

.opv .opv-switch__count {
	display: inline-grid;
	place-items: center;
	min-width: 24px;
	height: 24px;
	padding: 0 7px;
	border-radius: 999px;
	background: var(--opv-surface);
	font-size: .75rem;
	font-variant-numeric: tabular-nums;
	color: var(--opv-ink);
	transition: background-color .3s, color .3s;
}

.opv .opv-switch__link.is-active .opv-switch__count {
	background: rgb(255 255 255 / .18);
	color: #fff;
}

.opv .opv-switch__indicator {
	position: absolute;
	top: 5px;
	bottom: 5px;
	left: 0;
	z-index: 0;
	width: 0;
	border-radius: 999px;
	background: var(--opv-ink);
	transition: transform .5s var(--opv-ease), width .5s var(--opv-ease);
}

/* Nehmen Header und Leiste zusammen zu viel Höhe ein (z. B. Handy quer), scrollt die Leiste mit. */
.opv .opv-switch.is-static {
	position: relative;
	top: auto;
}

/* ---------- Abschnitte ---------- */

.opv .opv-section {
	scroll-margin-top: calc(var(--opv-header, 0px) + var(--opv-sticky-top) + 84px);
}

.opv .opv-section__head {
	display: flex;
	flex-wrap: wrap;
	align-items: end;
	justify-content: space-between;
	gap: 16px 24px;
	margin: 0 0 clamp(20px, 2.5vw, 28px);
}

.opv .opv-section__title {
	margin: 0;
	font-family: inherit;
	font-size: clamp(1.5rem, 2.6vw, 2.125rem);
	font-weight: 700;
	line-height: 1.15;
	letter-spacing: -.025em;
	color: var(--opv-ink);
}

.opv .opv-section__title:focus {
	outline: none;
}

.opv .opv-empty {
	max-width: 62ch;
	margin: 0;
	padding: clamp(24px, 4vw, 44px);
	border-radius: var(--opv-r-lg);
	background: var(--opv-surface);
	font-size: 1.0625rem;
}

/* ---------- Medien und Platzhalter ---------- */

.opv .opv-media {
	position: relative;
	display: block;
	overflow: hidden;
	background: var(--opv-ink);
}

.opv .opv-media__img {
	position: absolute;
	inset: 0;
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
	transition: transform .9s var(--opv-ease);
}

/* Platzhalter ohne Titelbild: Fadenkreuz wie bei Positionierungslasern, eingefärbt nach Bereich */
.opv .opv-media__ph {
	--opv-ph-x: 64%;
	--opv-ph-y: 42%;
	background:
		linear-gradient(to right, transparent calc(var(--opv-ph-x) - .5px), rgb(255 255 255 / .28) calc(var(--opv-ph-x) - .5px), rgb(255 255 255 / .28) calc(var(--opv-ph-x) + .5px), transparent calc(var(--opv-ph-x) + .5px)),
		linear-gradient(to bottom, transparent calc(var(--opv-ph-y) - .5px), rgb(255 255 255 / .28) calc(var(--opv-ph-y) - .5px), rgb(255 255 255 / .28) calc(var(--opv-ph-y) + .5px), transparent calc(var(--opv-ph-y) + .5px)),
		radial-gradient(circle at var(--opv-ph-x) var(--opv-ph-y), rgb(255 255 255 / .55) 0, rgb(255 255 255 / 0) 3px),
		radial-gradient(60% 70% at var(--opv-ph-x) var(--opv-ph-y), color-mix(in srgb, var(--opv-accent) 75%, transparent) 0%, transparent 70%),
		radial-gradient(80% 80% at 0% 100%, rgb(66 186 238 / .35) 0%, transparent 60%),
		linear-gradient(160deg, #15415b 0%, #0b2231 100%);
}

.opv .opv-media__ph[data-variant="1"] { --opv-ph-x: 30%; --opv-ph-y: 58%; }
.opv .opv-media__ph[data-variant="2"] { --opv-ph-x: 72%; --opv-ph-y: 66%; }
.opv .opv-media__ph[data-variant="3"] { --opv-ph-x: 44%; --opv-ph-y: 30%; }

/* ---------- Nächste Veranstaltung ---------- */

.opv .opv-feature {
	display: grid;
	grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
	overflow: hidden;
	border-radius: var(--opv-r-lg);
	background: var(--opv-surface);
	isolation: isolate;
}

.opv .opv-feature__media {
	min-height: 440px;
}

.opv .opv-feature__body {
	display: flex;
	flex-direction: column;
	gap: 20px;
	padding: clamp(24px, 4vw, 52px);
}

.opv .opv-flag {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	margin: 0;
	font-size: .9375rem;
	font-weight: 600;
	color: var(--opv-accent-text);
}

.opv .opv-pulse,
.opv .opv-today__dot {
	position: relative;
	flex: none;
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: var(--opv-accent);
}

.opv .opv-pulse::after,
.opv .opv-today__dot::after {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: inherit;
	background: inherit;
	animation: opv-pulse 2.2s ease-out infinite;
}

@keyframes opv-pulse {
	from { opacity: .55; transform: scale(1); }
	to { opacity: 0; transform: scale(3.4); }
}

.opv .opv-feature__title {
	margin: 0;
	font-family: inherit;
	font-size: clamp(1.625rem, 3vw, 2.5rem);
	font-weight: 700;
	line-height: 1.1;
	letter-spacing: -.03em;
	color: var(--opv-ink);
	text-wrap: balance;
}

.opv .opv-feature__title a {
	color: inherit;
	text-decoration: none;
	background: linear-gradient(currentColor, currentColor) 0 100% / 0 2px no-repeat;
	transition: background-size .4s var(--opv-ease);
}

.opv .opv-feature__title a:hover {
	background-size: 100% 2px;
}

.opv .opv-meta {
	display: grid;
	gap: 10px;
	margin: 0;
}

.opv .opv-meta div {
	display: flex;
	align-items: flex-start;
	gap: 12px;
}

.opv .opv-meta dt {
	flex: none;
	margin: 2px 0 0;
	color: var(--opv-accent-text);
}

.opv .opv-meta dt svg {
	display: block;
}

.opv .opv-meta dd {
	margin: 0;
	font-weight: 500;
}

.opv .opv-feature__excerpt {
	max-width: 52ch;
	margin: 0;
	color: var(--opv-muted);
}

.opv .opv-countdown {
	position: relative;
	display: flex;
	flex-wrap: wrap;
	gap: 12px clamp(16px, 2.4vw, 32px);
	margin-top: auto;
	padding-top: 20px;
	border-top: 1px solid var(--opv-line);
}

.opv .opv-countdown__unit {
	display: flex;
	flex-direction: column;
	min-width: 3ch;
}

.opv .opv-countdown__num {
	display: block;
	font-size: clamp(1.75rem, 3.2vw, 2.625rem);
	font-weight: 700;
	line-height: 1;
	letter-spacing: -.03em;
	font-variant-numeric: tabular-nums;
}

.opv .opv-countdown__num.is-tick {
	animation: opv-tick .45s var(--opv-ease);
}

@keyframes opv-tick {
	from { opacity: 0; transform: translateY(-40%); }
	to { opacity: 1; transform: none; }
}

.opv .opv-countdown__label {
	margin-top: 6px;
	font-size: .8125rem;
	color: var(--opv-muted);
}

.opv .opv-countdown.is-done .opv-countdown__unit {
	display: none;
}

.opv .opv-countdown__done {
	margin: 0;
	font-weight: 600;
}

.opv .opv-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
}

/* ---------- Buttons ---------- */

.opv .opv-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 46px;
	padding: 0 22px;
	border: 1.5px solid transparent;
	border-radius: var(--opv-r-sm);
	font-family: inherit;
	font-size: .9375rem;
	font-weight: 600;
	line-height: 1;
	text-decoration: none;
	cursor: pointer;
	transition: background-color .2s, border-color .2s, color .2s, transform .2s var(--opv-ease);
}

.opv .opv-btn:active {
	transform: scale(.97);
}

.opv .opv-btn--primary {
	background: var(--opv-blue);
	color: #fff;
}

.opv .opv-btn--primary:hover {
	background: var(--opv-blue-strong);
	color: #fff;
}

.opv .opv-btn--ghost {
	border-color: rgb(14 42 59 / .22);
	background: transparent;
	color: var(--opv-ink);
}

.opv .opv-btn--ghost:hover {
	border-color: var(--opv-ink);
	color: var(--opv-ink);
}

.opv .opv-btn--small {
	min-height: 40px;
	padding: 0 16px;
	font-size: .875rem;
}

/* ---------- Weitere Termine ---------- */

.opv .opv-agenda {
	margin: clamp(20px, 3vw, 36px) 0 0;
	padding: 0;
	list-style: none;
	border-top: 1px solid var(--opv-line);
}

.opv .opv-agenda__item {
	position: relative;
	display: grid;
	grid-template-columns: 124px minmax(0, 1fr) auto;
	align-items: center;
	gap: 8px 28px;
	margin: 0;
	padding: 24px 16px;
	border-bottom: 1px solid var(--opv-line);
	transition: background-color .3s;
}

.opv .opv-agenda__item.is-linked:hover {
	background: var(--opv-surface);
}

.opv .opv-agenda__date {
	display: flex;
	flex-direction: column;
	padding-left: 14px;
	border-left: 3px solid var(--opv-accent);
}

.opv .opv-agenda__day {
	font-size: 2.375rem;
	font-weight: 700;
	line-height: 1;
	letter-spacing: -.04em;
	font-variant-numeric: tabular-nums;
}

.opv .opv-agenda__month {
	margin-top: 6px;
	font-size: .8125rem;
	color: var(--opv-muted);
}

.opv .opv-agenda__title {
	margin: 0 0 8px;
	font-family: inherit;
	font-size: clamp(1.0625rem, 1.5vw, 1.25rem);
	font-weight: 600;
	line-height: 1.3;
	color: var(--opv-ink);
}

.opv .opv-stretch {
	color: inherit;
	text-decoration: none;
}

.opv .opv-stretch::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
}

.opv .opv-stretch:focus-visible {
	outline: none;
}

.opv .opv-stretch:focus-visible::after {
	outline: 3px solid var(--opv-blue);
	outline-offset: -3px;
}

.opv .opv-agenda__item.is-linked:hover .opv-agenda__title {
	text-decoration: underline;
	text-decoration-thickness: 1.5px;
	text-underline-offset: 4px;
}

.opv .opv-agenda__meta {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 20px;
	margin: 0;
	font-size: .9375rem;
	color: var(--opv-muted);
}

.opv .opv-agenda__meta span {
	display: inline-flex;
	align-items: center;
	gap: 7px;
}

.opv .opv-agenda__meta svg {
	width: 16px;
	height: 16px;
	flex: none;
}

.opv .opv-agenda__desc {
	display: -webkit-box;
	max-width: 68ch;
	margin: 10px 0 0;
	overflow: hidden;
	font-size: .9375rem;
	color: var(--opv-muted);
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
}

.opv .opv-agenda__item.is-linked:hover .opv-agenda__cta {
	border-color: var(--opv-ink);
}

.opv .opv-agenda__side {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 14px;
}

/* ---------- Bereichs-Kennzeichnung ---------- */

.opv .opv-tag {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	min-height: 26px;
	padding: 0 11px;
	border-radius: 999px;
	background: #fff;
	background: color-mix(in srgb, var(--opv-accent) 9%, #fff);
	font-size: .75rem;
	font-weight: 600;
	line-height: 1;
	white-space: nowrap;
	color: var(--opv-accent-text);
}

.opv .opv-tag::before {
	content: "";
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: var(--opv-accent);
}

/* ---------- Heute-Markierung ---------- */

.opv .opv-today {
	display: flex;
	align-items: center;
	gap: 14px;
	margin: clamp(64px, 9vw, 120px) 0 clamp(40px, 6vw, 72px);
	font-size: .9375rem;
	font-weight: 600;
	color: var(--opv-muted);
}

.opv .opv-today::before,
.opv .opv-today::after {
	content: "";
	flex: 1;
	height: 1px;
	background: var(--opv-line);
	transform-origin: right center;
	transition: transform 1.2s var(--opv-ease) .1s;
}

.opv .opv-today::after {
	transform-origin: left center;
}

.opv .opv-today__dot {
	--opv-accent: var(--opv-cyan);
}

/* ---------- Rückblick-Galerie ---------- */

.opv .opv-filter {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.opv .opv-chip {
	min-height: 40px;
	padding: 0 16px;
	border: 1px solid var(--opv-line);
	border-radius: 999px;
	background: #fff;
	font-family: inherit;
	font-size: .875rem;
	font-weight: 600;
	font-variant-numeric: tabular-nums;
	color: var(--opv-ink);
	cursor: pointer;
	transition: background-color .25s, border-color .25s, color .25s;
}

.opv .opv-chip:hover {
	border-color: var(--opv-ink);
}

.opv .opv-chip[aria-pressed="true"] {
	border-color: var(--opv-ink);
	background: var(--opv-ink);
	color: #fff;
}

.opv .opv-gallery {
	display: grid;
	grid-template-columns: repeat(12, minmax(0, 1fr));
	grid-auto-rows: clamp(260px, 27vw, 380px);
	gap: clamp(12px, 1.6vw, 20px);
	margin: 0;
	padding: 0;
	list-style: none;
}

.opv .opv-card {
	grid-column: span 6;
	min-width: 0;
	margin: 0;
	padding: 0;
	view-transition-class: opv-card;
}

.opv .opv-card[data-span="s"] { grid-column: span 5; }
.opv .opv-card[data-span="l"] { grid-column: span 7; }
.opv .opv-card[data-span="full"] { grid-column: 1 / -1; }
.opv .opv-card[hidden] { display: none; }

.opv .opv-card__link {
	position: relative;
	display: block;
	container-type: inline-size;
	height: 100%;
	overflow: hidden;
	border-radius: var(--opv-r);
	background: var(--opv-ink);
	color: #fff;
	text-decoration: none;
	isolation: isolate;
}

.opv .opv-card__media {
	position: absolute;
	inset: 0;
	z-index: 0;
}

.opv .opv-card__link::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
	background: linear-gradient(to top, rgb(7 22 33 / .88) 0%, rgb(7 22 33 / .5) 34%, rgb(7 22 33 / 0) 68%);
	pointer-events: none;
}

.opv .opv-card__tag {
	position: absolute;
	top: 16px;
	left: 16px;
	z-index: 2;
	background: #fff;
}

.opv .opv-card__overlay {
	position: absolute;
	right: 0;
	bottom: 0;
	left: 0;
	z-index: 2;
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 16px;
	padding: clamp(16px, 2vw, 26px);
}

.opv .opv-card__text {
	display: block;
	min-width: 0;
}

.opv .opv-card__date {
	display: block;
	margin-bottom: 6px;
	font-size: .875rem;
	color: rgb(255 255 255 / .85);
}

.opv .opv-card__title {
	display: -webkit-box;
	overflow: hidden;
	font-size: clamp(1.125rem, 1.7vw, 1.5rem);
	font-weight: 600;
	line-height: 1.2;
	letter-spacing: -.015em;
	color: #fff;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	text-wrap: balance;
}

.opv .opv-card__cta {
	flex: none;
	display: inline-flex;
	align-items: center;
	min-height: 38px;
	padding: 0 15px;
	border-radius: 9px;
	background: #fff;
	font-size: .8125rem;
	font-weight: 600;
	white-space: nowrap;
	color: var(--opv-ink);
	transition: background-color .3s, transform .45s var(--opv-ease);
}

.opv a.opv-card__link:hover .opv-media__img {
	transform: scale(1.05);
}

.opv a.opv-card__link:hover .opv-card__cta,
.opv a.opv-card__link:focus-visible .opv-card__cta {
	background: var(--opv-cyan);
	transform: translateY(-2px);
}

/* Schmale Kacheln: Button unter den Titel, damit lange Namen nicht abgeschnitten werden. */
@container (max-width: 540px) {
	.opv .opv-card__overlay {
		flex-direction: column;
		align-items: flex-start;
		gap: 14px;
	}
}

::view-transition-group(.opv-card) {
	animation-duration: .5s;
	animation-timing-function: cubic-bezier(.2, .7, .2, 1);
}

/* ---------- Einblendungen (nur mit JavaScript) ---------- */

.opv.opv-js [data-opv-reveal] {
	opacity: 0;
	transform: translateY(18px);
	transition: opacity .8s var(--opv-ease) var(--opv-delay, 0ms), transform .8s var(--opv-ease) var(--opv-delay, 0ms);
}

.opv.opv-js [data-opv-reveal].is-in {
	opacity: 1;
	transform: none;
}

/*
 * Bilder werden aufgedeckt statt eingeblendet. Der Clip liegt auf dem Kind-Element,
 * weil ein vollständig geclipptes Element für IntersectionObserver unsichtbar bliebe.
 */
.opv.opv-js .opv-card[data-opv-reveal],
.opv.opv-js .opv-feature[data-opv-reveal] {
	opacity: 1;
	transform: none;
}

.opv.opv-js .opv-card[data-opv-reveal] > .opv-card__link {
	clip-path: inset(100% 0 0 0 round var(--opv-r));
	transition: clip-path 1.1s var(--opv-ease) var(--opv-delay, 0ms);
}

.opv.opv-js .opv-card[data-opv-reveal].is-in > .opv-card__link {
	clip-path: inset(0 0 0 0 round var(--opv-r));
}

.opv.opv-js .opv-feature[data-opv-reveal] .opv-feature__media {
	clip-path: inset(0 100% 0 0);
	transition: clip-path 1.2s var(--opv-ease) var(--opv-delay, 0ms);
}

.opv.opv-js .opv-feature[data-opv-reveal].is-in .opv-feature__media {
	clip-path: inset(0 0 0 0);
}

.opv.opv-js .opv-feature[data-opv-reveal] .opv-feature__body {
	opacity: 0;
	transform: translateY(14px);
	transition: opacity .8s var(--opv-ease) calc(var(--opv-delay, 0ms) + 350ms), transform .8s var(--opv-ease) calc(var(--opv-delay, 0ms) + 350ms);
}

.opv.opv-js .opv-feature[data-opv-reveal].is-in .opv-feature__body {
	opacity: 1;
	transform: none;
}

.opv.opv-js [data-opv-reveal] .opv-media__img {
	transform: scale(1.18);
	transition: transform 1.6s var(--opv-ease) var(--opv-delay, 0ms);
}

.opv.opv-js [data-opv-reveal].is-in .opv-media__img {
	transform: none;
}

/* Die Heute-Linie zieht sich von der Mitte nach außen auf. */
.opv.opv-js .opv-today[data-opv-reveal] {
	transform: none;
}

.opv.opv-js .opv-today[data-opv-reveal]::before,
.opv.opv-js .opv-today[data-opv-reveal]::after {
	transform: scaleX(0);
}

.opv.opv-js .opv-today[data-opv-reveal].is-in::before,
.opv.opv-js .opv-today[data-opv-reveal].is-in::after {
	transform: scaleX(1);
}

/* ---------- Responsiv ---------- */

@media (max-width: 960px) {
	.opv .opv-feature {
		grid-template-columns: minmax(0, 1fr);
	}

	.opv .opv-feature__media {
		min-height: 0;
		aspect-ratio: 16 / 9;
	}

	.opv .opv-card[data-span="s"],
	.opv .opv-card[data-span="l"] {
		grid-column: span 6;
	}
}

/*
 * Auf dem Handy den Seitenrand des Themes aufheben und nur den eigenen, schmalen Rand verwenden –
 * sonst addieren sich beide. Nur bei Touch-Geräten, weil 100vw am Desktop die Scrollleiste enthält.
 */
@media (max-width: 640px) and (pointer: coarse) {
	.opv {
		box-sizing: border-box;
		width: 100vw;
		max-width: 100vw;
		margin-inline: calc(50% - 50vw);
	}
}

@media (max-width: 640px) {
	.opv .opv-gallery {
		grid-template-columns: minmax(0, 1fr);
		grid-auto-rows: 300px;
	}

	.opv .opv-card[data-span] {
		grid-column: 1 / -1;
	}

	.opv .opv-agenda__item {
		align-items: start;
		grid-template-columns: 78px minmax(0, 1fr);
		gap: 14px 16px;
		padding: 20px 8px;
	}

	.opv .opv-agenda__day {
		font-size: 1.875rem;
	}

	.opv .opv-agenda__side {
		grid-column: 2;
		flex-wrap: wrap;
		justify-content: flex-start;
		gap: 10px 12px;
	}

	.opv .opv-countdown__unit {
		min-width: 0;
	}
}

/* ---------- Reduzierte Bewegung ---------- */

@media (prefers-reduced-motion: reduce) {
	.opv *,
	.opv *::before,
	.opv *::after {
		animation-duration: .001ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: .001ms !important;
		transition-delay: 0ms !important;
	}

	.opv.opv-js [data-opv-reveal],
	.opv.opv-js [data-opv-reveal] .opv-card__link,
	.opv.opv-js [data-opv-reveal] .opv-feature__media,
	.opv.opv-js [data-opv-reveal] .opv-feature__body,
	.opv.opv-js [data-opv-reveal] .opv-media__img {
		opacity: 1;
		transform: none;
		clip-path: none;
	}

	.opv.opv-js .opv-today[data-opv-reveal]::before,
	.opv.opv-js .opv-today[data-opv-reveal]::after {
		transform: none;
	}
}
