/****************************
*   M2 Text und Bild — Projekt-Overrides
*   (laedt zusaetzlich zur Parent-CSS)
****************************/

/* Spalten vertikal mittig */
section.m2_text_and_image .mM_container .mM_row {
	align-items: center;
}

/* Kursiv-Auszeichnung im Titel per span (nur Standard-Variante — in der
   Boozit-Variante zeichnet der span nichts kursiv aus) */
section.m2_text_and_image:not(.m2_variante_wobei):not(.m2_variante_ueber) .m2_titel span {
	font-style: italic;
}

/* Absatz-Abstand im Flieẞtext */
section.m2_text_and_image .m2_text_container_inner p:not(:last-child) {
	margin-bottom: 25px;
}

/* Rundes Bild (Figma: 538px Kreis) */
section.m2_text_and_image .mM_container .m2_galerie_container {
	display: flex;
	justify-content: center;
}

section.m2_text_and_image .mM_container .m2_galerie_item {
	width: 100%;
	max-width: 538px;
}

section.m2_text_and_image .mM_container .m2_galerie_item .m2_image {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 1 / 1;
	border-radius: 50%;
	object-fit: cover;
}

/* --- Section "Ueber mich" --- */

/* Deko-Vektor unten links am Bild */
#ueber-mich .m2_galerie_item {
	position: relative;
}

#ueber-mich .m2_galerie_item::after {
	content: '';
	position: absolute;
	left: -20px;
	bottom: -25px;
	width: 170px;
	height: 168px;
	background-image: url('../../../img/m2_ueber_deko.svg');
	background-repeat: no-repeat;
	background-size: contain;
	pointer-events: none;
}

/* Salbei-Button: kommt jetzt global aus project.css (.button.salbei),
   Verlinkung-Typ im Backend auf "Salbei" gestellt */

/* --- Variante 2 "Powerbanks" (m2_variante = wobei) --- */

/* Blaue Flaeche ueber die volle Breite, 25px Radius (Figma 33:359:
   1920x821). Sie deckt sich mit der Section inkl. ihrer Innenabstaende. */
section.m2_text_and_image.m2_variante_wobei {
	position: relative;
	/* Der Entwurf setzt die Flaeche 821px hoch: 143 oben (global) + 596
	   Inhalt + 81 unten. Der globale Wert unten waere 143 und machte die
	   Flaeche 61px zu hoch. */
	padding-bottom: 81px;
}

section.m2_text_and_image.m2_variante_wobei::before {
	content: '';
	position: absolute;
	inset: 0;
	background-color: var(--color_primary);
	border-radius: 25px;
	pointer-events: none;
}

section.m2_text_and_image.m2_variante_wobei .mM_container {
	position: relative;
}

/* Beide Spalten oben buendig — der Kreis haengt an eigenen Aussenabstaenden */
section.m2_text_and_image.m2_variante_wobei .mM_container .mM_row {
	align-items: flex-start;
}

/* Text-Position kommt aus dem normalen Section-Padding — keine Extra-Margins */
section.m2_text_and_image.m2_variante_wobei .m2_content_wrapper {
	margin-top: 0;
	margin-bottom: 0;
}

/* Der Kreis ragt 48px unter der blauen Flaeche heraus (129 = 81px
   Section-Padding + 48px Ueberstand). Bei 1920 hebt ihn der obere
   Aussenabstand zugleich 72px ueber die Topline — dort ist sein
   Aussenmass 797 - 72 - 129 = 596px, also genau die Hoehe der
   Textspalte. Darunter schrumpft der Kreis mit der Spalte; unten
   verankert bleibt der Ueberstand erhalten, die Luft sammelt sich
   oben statt unter dem Kreis. */
section.m2_text_and_image.m2_variante_wobei .mM_container .m2_galerie_wrapper {
	align-self: flex-end;
	margin-top: -72px;
	margin-bottom: -129px;
}

/* Bild groesser als Standard-Variante — laeuft rechts aus der Spalte
   heraus (Figma: 797px Kreis bei x 970) */
section.m2_text_and_image.m2_variante_wobei .mM_container .m2_galerie_container {
	justify-content: flex-start;
}

section.m2_text_and_image.m2_variante_wobei .mM_container .m2_galerie_item {
	/* Der Entwurf laesst den Kreis 47px ueber die Spalte hinausragen
	   (797 bei 750 Spaltenbreite). An vw gekoppelt schrumpfte er schneller
	   als die Section — dann klaffte unten Blau. An der Spalte bleibt das
	   Verhaeltnis erhalten. */
	width: min(797px, calc(100% + 47px));
	max-width: none;
	flex-shrink: 0;
	position: relative;
}

/* Textmasse aus dem Entwurf */
section.m2_text_and_image.m2_variante_wobei .m2_titel {
	max-width: 415px;
}

section.m2_text_and_image.m2_variante_wobei .m2_text_container {
	max-width: 523px;
}

/* Abstaende der Textspalte aus dem Entwurf: Titelunterkante 141,
   Textoberkante 164, Knopfoberkante 542 (jeweils ab Topline) */
section.m2_text_and_image.m2_variante_wobei .m2_titel {
	margin-bottom: 23px;
}

section.m2_text_and_image.m2_variante_wobei .m2_links_container {
	margin-top: 78px;
}

/* Knopf wie im Hero und in m35: milchige Flaeche, Verlaufsring aus
   der Grundregel. */
section.m2_text_and_image.m2_variante_wobei .button {
	background-color: rgba(255, 255, 255, .1);
	box-shadow: none;
}

/* Auf dem cyanen Feld traegt der Knopf keinen Verlaufsrand: im Entwurf
   messen sich Ober- und Unterkante gleich (57/58 gegen Grund 48), es gibt
   dort also keinen hellen Unterrand. Auf Cyan wirkt der dunkle obere Halt
   ausserdem schmutzig. */
section.m2_text_and_image.m2_variante_wobei .button::after {
	content: none;
}

section.m2_text_and_image.m2_variante_wobei .button:hover {
	background-color: rgba(255, 255, 255, .22);
}

/* --- Responsive --- */

/* Umbruch auf einspaltig schon ab 1199px (synchron zu Header/Hero) —
   das Parent-Spaltensystem schaltet mM_col_50 erst ab 992px auf 50% */
@media only screen and (max-width: 1199px) {
	section.m2_text_and_image .mM_container .mM_row [class*="mM_col_"] {
		width: 100%;
	}

	/* Gestapelt: Abstand zwischen Bild und Text (Parent macht das erst ab 991) */
	section.m2_text_and_image .mM_container .m2_galerie_wrapper {
		margin-bottom: 40px;
	}

	/* Wobei gestapelt: Text zuerst, Bild darunter (ragt 40px unten raus);
	   Aussenabstaende kommen aus dem normalen Section-Padding */
	section.m2_text_and_image.m2_variante_wobei .mM_container .mM_row {
		flex-direction: column-reverse;
	}

	section.m2_text_and_image.m2_variante_wobei .m2_content_wrapper {
		margin-top: 0;
		margin-bottom: 40px;
	}

	section.m2_text_and_image.m2_variante_wobei .mM_container .m2_galerie_wrapper {
		align-self: auto;
		margin-top: 0;
		margin-bottom: -121px; /* 81px Section-Padding + 40px Ueberhang */
	}

	section.m2_text_and_image.m2_variante_wobei .mM_container .m2_galerie_container {
		justify-content: center;
	}

	section.m2_text_and_image.m2_variante_wobei .mM_container .m2_galerie_item {
		width: 100%;
		max-width: 500px;
	}

	/* Gestapelt steht die Textspalte allein — die Entwurfsbreiten (Titel 415,
	   Text 523) stammen aus der zweispaltigen Fassung und liessen hier rechts
	   die halbe Flaeche leer. */
	section.m2_text_and_image.m2_variante_wobei .m2_titel,
	section.m2_text_and_image.m2_variante_wobei .m2_text_container {
		max-width: 100%;
	}
}

/* Ab 991 steht das Bild nicht mehr unten heraus. Der Ueberhang stammt aus dem
   Entwurf der breiten Fassung; auf schmalen Bildschirmen wird daraus ein
   Kreis, der in den naechsten Abschnitt ragt. Ohne den negativen Abstand
   greift wieder das normale Polster der Sektion (81px). */
@media only screen and (max-width: 991px) {
	section.m2_text_and_image.m2_variante_wobei .mM_container .m2_galerie_wrapper {
		margin-bottom: 0;
	}
}

@media only screen and (max-width: 575px) {
	#ueber-mich .m2_galerie_item::after {
		width: 120px;
		height: 119px;
		left: -10px;
		bottom: -15px;
	}
}


/****************************
*   Variante "ueber" — Über boozit
*   Foto-Kreis mit Farbschein links, Text rechts
****************************/

section.m2_text_and_image.m2_variante_ueber {
	padding-top: 139px;
	padding-bottom: 146px;
}

/* Der Block ist im Entwurf 1327 breit und sitzt mittig — er reicht nicht
   bis an die Kanten des container_breit. */
section.m2_text_and_image.m2_variante_ueber .mM_container .mM_row {
	max-width: 1327px;
	margin: 0 auto;
	flex-wrap: nowrap;
	gap: 138px;
	align-items: center;
}

section.m2_text_and_image.m2_variante_ueber .m2_galerie_wrapper {
	flex: 0 0 590px; /* 52 Vorlauf + 538 Kreis */
	max-width: 590px;
	padding-left: 52px;
}

section.m2_text_and_image.m2_variante_ueber .m2_content_wrapper {
	flex: 0 0 599px;
	max-width: 599px;
}

/* --- Kreis mit Schein --- */

section.m2_text_and_image.m2_variante_ueber .m2_galerie_container,
section.m2_text_and_image.m2_variante_ueber .m2_galerie_item {
	width: 100%;
	overflow: visible; /* der Schein ragt weit ueber den Kreis hinaus */
}

section.m2_text_and_image.m2_variante_ueber .m2_galerie_item {
	position: relative;
	aspect-ratio: 1;
}

/* Die dunklen Raender des Scheinbildes sind exakt die Seitenfarbe #161616.
   Mit "lighten" verschwinden sie restlos und nur das Farbleuchten bleibt —
   dadurch braucht das Bild keinen Alphakanal und wiegt 20 KB. */
section.m2_text_and_image.m2_variante_ueber .m2_galerie_item::before {
	content: '';
	position: absolute;
	left: -63.9%;
	top: -50.7%;
	width: 213.8%;
	height: 214.5%;
	background-image: url('../../../img/ueber_schein.jpg');
	background-size: 100% 100%;
	background-repeat: no-repeat;
	mix-blend-mode: lighten;
	pointer-events: none;
}

section.m2_text_and_image.m2_variante_ueber .m2_galerie_item img {
	position: relative;
	z-index: 1;
	width: 100%;
	height: 100%;
	border-radius: 50%;
	object-fit: cover;
}

/* --- Textspalte --- */

section.m2_text_and_image.m2_variante_ueber .m2_titel {
	max-width: 546px;
	margin-bottom: 23px;
}

section.m2_text_and_image.m2_variante_ueber .m2_text_container {
	max-width: 596px;
}

section.m2_text_and_image.m2_variante_ueber .m2_links_container {
	margin-top: 78px;
}

/* Die Kante gehoert auch hier dazu (Figma 33:379) — sie war faelschlich
   abgeschaltet. Hoehe und Polster kommen aus der Grundregel. */
section.m2_text_and_image.m2_variante_ueber .button {
	border-radius: 15px;
	background-color: rgba(255, 255, 255, 0.1);
	box-shadow: none;
}

/* --- Responsive --- */

@media only screen and (max-width: 1400px) {
	section.m2_text_and_image.m2_variante_ueber .mM_container .mM_row {
		gap: 80px;
	}

	section.m2_text_and_image.m2_variante_ueber .m2_galerie_wrapper {
		flex: 0 1 538px;
		max-width: 538px;
		padding-left: 0;
	}

	section.m2_text_and_image.m2_variante_ueber .m2_content_wrapper {
		flex: 1 1 auto;
		max-width: 599px;
	}
}

@media only screen and (max-width: 1199px) {
	section.m2_text_and_image.m2_variante_ueber {
		padding-top: 110px;
		padding-bottom: 110px;
	}

	section.m2_text_and_image.m2_variante_ueber .mM_container .mM_row {
		flex-wrap: wrap;
		gap: 70px;
	}

	section.m2_text_and_image.m2_variante_ueber .m2_galerie_wrapper,
	section.m2_text_and_image.m2_variante_ueber .m2_content_wrapper {
		flex: 1 1 100%;
		max-width: none;
	}

	section.m2_text_and_image.m2_variante_ueber .m2_galerie_item {
		width: 538px;
		max-width: 100%;
		margin: 0 auto;
	}

	section.m2_text_and_image.m2_variante_ueber .m2_titel,
	section.m2_text_and_image.m2_variante_ueber .m2_text_container {
		max-width: none;
	}
}

@media only screen and (max-width: 767px) {
	section.m2_text_and_image.m2_variante_ueber {
		padding-top: 90px;
		padding-bottom: 90px;
	}

	section.m2_text_and_image.m2_variante_ueber .m2_links_container {
		margin-top: 55px;
	}
}
