/* Whitepaper-Teaser */
.wpt {
	--wpt-bg: #f0f0f0;
	--wpt-accent: #002f6c;
	--wpt-text: #333;
	--wpt-btn-bg: #fec52e;
	--wpt-btn-text: #111;
	--wpt-pad: clamp(1.5rem, 4vw, 3rem);

	display: grid;
	grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
	align-items: stretch;
	gap: 0;
	padding: 0;
	background: var(--wpt-bg);
	color: var(--wpt-text);
	box-sizing: border-box;
	margin-top:32px;
	margin-bottom:32px;
	gap:20px;
	display:flex;
}

/*
 * Breite 810 px, mittig über den Satzspiegel hinaus.
 * Verschiebung nach links = halbe Differenz zwischen Satzspiegel und Teaser:
 * 50 % - 405 px  →  bei 644 px Satzspiegel: (644 - 810) / 2 = -83 px.
 * Auf schmalen Bildschirmen schrumpft der Teaser auf Bildschirmbreite minus 1 rem je Seite.
 * !important ist nötig, weil Block-Themes margin-left/right: auto !important setzen.
 */
.wpt:not(.alignwide):not(.alignfull) {
	--wpt-width: 810px;
	--wpt-gutter: 1rem;
	width: min(var(--wpt-width), 100vw - 2 * var(--wpt-gutter));
	max-width: none;
	margin-left: calc(50% - min(var(--wpt-width) / 2, 50vw - var(--wpt-gutter))) !important;
	margin-right: calc(50% - min(var(--wpt-width) / 2, 50vw - var(--wpt-gutter))) !important;
}

/* Bild füllt die volle Höhe des Teasers, ohne Innenabstand */
.wpt__media {
	position: relative;
	min-height: 100%;
	overflow: hidden;
	width:370px;
}

.wpt .wpt__image {
	position: absolute;
	inset: 0;
	display: flex;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
	object-position: var(--wpt-focus, 50% 50%);
	align-items: center;
}

/* Innenabstand nur auf der Textbox, zum Bild hin (links) keiner */
.wpt__content {
	align-self: center;
	padding: var(--wpt-pad) var(--wpt-pad) var(--wpt-pad) 0;
	flex:1;
}

/* Bild rechts: gespiegelt */
.wpt--image-right .wpt__media {
	order: 2;
}
.wpt--image-right .wpt__content {
	padding: var(--wpt-pad) 0 var(--wpt-pad) var(--wpt-pad);
}

/* Ohne Bild: eine Spalte, Innenabstand rundum */
.wpt:not(:has(.wpt__media)) {
	grid-template-columns: minmax(0, 1fr);
}
.wpt:not(:has(.wpt__media)) .wpt__content {
	padding: var(--wpt-pad);
}

.wpt__content > :last-child {
	margin-bottom: 0;
}

.wpt .wpt__headline {
	margin: 0 0 1rem;
	color: var(--wpt-accent);
	font-size: 1.5rem; /* 24 px */
	font-weight: 700;
	line-height: 1.25;
}

.wpt .wpt__text {
	max-width: 34em;
	color: inherit;
	font-size: 1.0625rem; /* 17 px */
	line-height: 1.6;
	margin-bottom:0;
}

.wpt .wpt__text a {
	color: var(--wpt-accent);
}

.wpt .wpt__button,
.wpt .wpt__button:visited {
	display: inline-block;
	padding: 0.8rem 1.1rem;
	background: var(--wpt-btn-bg);
	color: var(--wpt-btn-text);
	font-size: 1rem;
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	text-decoration: none;
	border: 0;
	border-radius: 0;
	cursor: pointer;
	transition: filter 0.2s ease;
	margin-top:2em;
}

.wpt .wpt__button:hover {
	color: var(--wpt-btn-text);
	filter: brightness(0.94);
}

.wpt .wpt__button:focus-visible {
	outline: 2px solid var(--wpt-accent);
	outline-offset: 3px;
}

@media (max-width: 781px) {
	.wpt {
		grid-template-columns: minmax(0, 1fr);
	}
	.wpt__media,
	.wpt--image-right .wpt__media {
		order: 0;
		aspect-ratio: 4 / 3;
		min-height: 0;
	}
	.wpt .wpt__content,
	.wpt--image-right .wpt__content {
		padding: var(--wpt-pad);
	}
}
