/* ------------------------------------------------------------------
   Themen-Reihen (Bild + farbige Textfläche, abwechselnd)
   Shortcode: [themen]
   ------------------------------------------------------------------ */

.themen {
	--th-button: #94cbf0;
	--th-button-hover: #6fb6e6;
	--th-ink: #1a1a18;
	--th-pad: clamp(28px, 5vw, 80px);

	/* Eigener Block-Kontext + Abstand nach unten, damit nachfolgende
	   Inhalte (z. B. der Footer) nie über der Sektion liegen. */
	display: flow-root;
	position: relative;
	width: 100%;
	margin-bottom: clamp(48px, 6vw, 96px);
}

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

.themen__row {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

/* Gerade Reihen: Bild rechts. */
.themen__row:nth-child(even) .themen__media {
	order: 2;
}

/* --- Bild ---------------------------------------------------------- */

.themen__media {
	position: relative;
	margin: 0;
	/* Die Rasterzeile streckt das Bild auf die Höhe der Textfläche. */
	min-height: clamp(280px, 30vw, 520px);
	overflow: hidden;
	background: #eee;
}

/* Höhere Spezifität, weil Elementor ".elementor img { height: auto }" setzt. */
.themen .themen__media img.themen__image {
	position: absolute;
	inset: 0;
	display: block;
	width: 100%;
	max-width: none;
	height: 100%;
	margin: 0;
	border: 0;
	border-radius: 0;
	object-fit: cover;
}

/* Höhere Spezifität, damit Theme-/Elementor-Styles für figcaption nicht greifen. */
.themen .themen__media figcaption.themen__credit {
	position: absolute;
	left: 16px;
	right: 16px;
	bottom: 12px;
	z-index: 1;
	margin: 0;
	padding: 0;
	text-align: left;
	color: #fff;
	font-size: 11px;
	line-height: 1.2;
	text-shadow: 0 0 4px rgba(0, 0, 0, .6);
}

/* --- Textfläche ---------------------------------------------------- */

.themen__content {
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: flex-start;
	padding: var(--th-pad);
	color: var(--th-ink);
}

.themen .themen__content h2.themen__title {
	margin: 0 0 1em;
	color: inherit;
	font-size: 24px;
	font-weight: 700;
	line-height: 1.2;
	text-transform: uppercase;
}

.themen__text {
	max-width: 36em;
	font-size: clamp(15px, 1.2vw, 17px);
	line-height: 1.35;
}

.themen__text p {
	margin: 0 0 .8em;
}

.themen__text p:last-child {
	margin-bottom: 0;
}

.themen__button {
	display: inline-block;
	margin-top: clamp(24px, 3vw, 44px);
	padding: .45em 1.1em;
	border-radius: 6px;
	background: var(--th-button);
	color: #fff;
	font-size: clamp(16px, 1.3vw, 19px);
	font-weight: 700;
	line-height: 1.2;
	text-decoration: none;
	transition: background-color .2s ease;
}

.themen__button:hover,
.themen__button:focus-visible {
	background: var(--th-button-hover);
	color: #fff;
	text-decoration: none;
}

.themen__button:focus-visible {
	outline: 2px solid var(--th-ink);
	outline-offset: 2px;
}

/* --- Mobil: Bild oben, Text darunter ------------------------------- */

@media (max-width: 767px) {
	.themen__row {
		grid-template-columns: 1fr;
	}

	.themen__row:nth-child(even) .themen__media {
		order: 0;
	}

	.themen__media {
		min-height: 0;
		aspect-ratio: 3 / 2;
	}
}
