/****************************
*  M40 Unterseiten-Hero     *
****************************/

.m40_subhero {
	overflow: hidden;
	/* Wie beim Start-Hero: der Kopf ist durchsichtig und liegt auf der
	   Section — --header_total (Topbar + Header) setzt menu.js. */
	margin-top: calc(-1 * var(--header_total, 155px));
	background-color: var(--color_tiefschwarz);
	/* Der Schein sitzt hinter dem Kreis, nicht hinter dem Text */
	background-image: radial-gradient(ellipse at 72% 18%, rgba(48, 172, 217, .28), rgba(48, 172, 217, 0) 55%);
}

.m40_main {
	display: flex;
	flex-wrap: nowrap;
	align-items: center;
	gap: 0 56px;
	padding-top: calc(var(--header_total, 155px) + 70px);
	padding-bottom: 120px;
}

/* --- Linke Spalte --- */

.m40_content_wrapper {
	flex: 1 1 auto;
	min-width: 0;
	/* 745px braucht die laengste erste Titelzeile ("Werbung, die dort
	   ankommt,") bei 60px — darunter faellt sie in eine dritte Zeile. */
	max-width: 760px;
}

/* Der Hero steht auf Schwarz. Das Parent-Theme setzt die Schriftfarbe per
   `* { color }` — Vererbung greift deshalb nicht. */
.m40_subhero .m40_content_wrapper,
.m40_subhero .m40_content_wrapper * {
	color: var(--color_weiss);
}

/* Brotkrumen */
.m40_brotkrumen {
	font-size: 0.882rem; /* 15px */
	margin-bottom: 26px;
}

.m40_subhero .m40_brotkrumen,
.m40_subhero .m40_brotkrumen * {
	color: rgba(255, 255, 255, .62);
}

.m40_brotkrumen a {
	text-decoration: none;
	-webkit-transition: color var(--bz_dauer);
	transition: color var(--bz_dauer);
}

@media (hover: hover) and (pointer: fine) {
	.m40_subhero .m40_brotkrumen a:hover {
		color: var(--color_primary);
	}
}

.m40_brotkrumen_trenner {
	margin: 0 8px;
}

/* Topline-Strich (global aus project.css) auf Weiss */
.m40_subhero .mM_title_container p[class$="_untertitel"]::before {
	background-color: var(--color_weiss);
}

/* Headline: eine Stufe kleiner als auf der Startseite (60 statt 75px) —
   die Unterseiten-Titel sind laenger und brauchen sonst vier Zeilen. */
/* Die laengste erste Titelzeile ("Werbung, die dort ankommt,") misst bei
   56px 695px und passt damit in jede Spaltenbreite dieser Stufe. Die
   Leiter darunter folgt den Container-Breakpoints, damit der Titel
   nirgends eine dritte Zeile mit einem einzelnen Wort bekommt. */
.m40_subhero .m40_titel,
.m40_subhero h1.m40_titel {
	font-size: 3.294rem; /* 56px */
	line-height: 1.1;
}

/* Zweite Zeile steckt im span und traegt den Neon-Schein — dieselbe
   Schattenkette wie im Start-Hero. */
.m40_subhero .m40_titel span {
	display: block;
	text-shadow:
		0 0 15px rgba(48, 170, 217, .6),
		0 0 35px rgba(48, 170, 217, .45),
		0 0 70px rgba(48, 170, 217, .3);
}

.m40_subhero .m40_text_container {
	max-width: 560px;
	margin-top: 28px;
}

/* Buttons (Autoinjektion in mM_links_container) */
.m40_subhero .m40_content_container .m40_links_container {
	display: flex;
	flex-wrap: wrap;
	gap: 14px;
	margin-top: 40px;
}

/* --- Rechte Spalte: Kreisbild --- */

.m40_bild_wrapper {
	flex: 0 1 auto;
	min-width: 0;
	margin-left: auto;
	display: flex;
	justify-content: flex-end;
}

.m40_bild_kreis {
	position: relative;
	width: 480px;
	max-width: 100%;
	aspect-ratio: 1 / 1;
	border-radius: 50%;
	overflow: hidden;
	/* Der Verlauf steht unter dem Foto und traegt die Kante, falls das Bild
	   nicht quadratisch ist. */
	background-image: linear-gradient(150deg, #0a1a22, var(--color_primary));
	box-shadow: 0 0 80px rgba(48, 172, 217, .28);
}

.m40_bild_kreis .m40_bild {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* --- Responsive --- */

/* Oberhalb von 1920 waechst der Container weiter (1740 bei 2200, 1900 bei
   2400). Die Textspalte ist bei 760px gedeckelt, der ganze Zugewinn gehoert
   also dem Kreis — bei 2400 erreicht er die 750px des Start-Heros. */
@media only screen and (min-width: 1920px) {
	.m40_bild_kreis {
		width: 560px;
	}
}

@media only screen and (min-width: 2200px) {
	.m40_bild_kreis {
		width: 660px;
	}
}

@media only screen and (min-width: 2400px) {
	.m40_bild_kreis {
		width: 750px;
	}
}


/* Container 1270 -> Textspalte ~738 */
@media only screen and (max-width: 1599px) {
	.m40_bild_kreis {
		width: 420px;
	}
}

/* Container 1110 -> Textspalte ~654 */
@media only screen and (max-width: 1499px) {
	.m40_subhero .m40_titel,
	.m40_subhero h1.m40_titel {
		font-size: 3rem; /* 51px */
	}

	.m40_bild_kreis {
		width: 380px;
	}
}

/* Container 950 -> Textspalte ~555 */
@media only screen and (max-width: 1399px) {
	.m40_subhero .m40_titel,
	.m40_subhero h1.m40_titel {
		font-size: 2.6rem; /* 44px */
	}

	.m40_bild_kreis {
		width: 320px;
	}
}

/* Umbruch auf einspaltig ab 1199px — synchron zum Header-Umbruch (Burger),
   wie beim Start-Hero. Der Titel bekommt die volle Breite und darf darum
   wieder eine Stufe groesser werden. */
@media only screen and (max-width: 1199px) {
	.m40_main {
		flex-wrap: wrap;
		gap: 50px 0;
		padding-top: calc(var(--header_total, 155px) + 40px);
		padding-bottom: 80px;
	}

	.m40_subhero .m40_titel,
	.m40_subhero h1.m40_titel {
		font-size: 2.8rem; /* 48px */
	}

	.m40_content_wrapper {
		flex: 1 1 100%;
		max-width: 100%;
	}

	.m40_bild_wrapper {
		flex: 1 1 100%;
		justify-content: center;
	}

	.m40_bild_kreis {
		width: 420px;
	}
}

@media only screen and (max-width: 575px) {
	.m40_subhero .m40_titel,
	.m40_subhero h1.m40_titel {
		font-size: 2.2rem; /* 37px */
	}

	.m40_bild_kreis {
		width: 300px;
	}
}

/* Ohne Kreisbild (Rechtsseiten): der Schein wandert hinter den Titel und
   der Kopf wird flacher — es folgt direkt Lesetext. */
.m40_subhero.m40_ohne_bild {
	background-image: radial-gradient(ellipse at 18% 30%, rgba(48, 172, 217, .22), rgba(48, 172, 217, 0) 60%);
}

.m40_subhero.m40_ohne_bild .m40_main {
	padding-bottom: 70px;
}

/* Die 760px-Deckelung gilt nur neben dem Kreis — ohne ihn braeche
   "Allgemeine Geschaeftsbedingungen" auf 1920 mitten im Wort um */
.m40_subhero.m40_ohne_bild .m40_content_wrapper {
	max-width: 100%;
}

@media only screen and (max-width: 1199px) {
	.m40_subhero.m40_ohne_bild .m40_main {
		padding-bottom: 50px;
	}
}
