/**
 * IQX Charts – Seiten-Typografie für die ICX-Seiten (Helenas Text-Module).
 * Wird synchron im <head> geladen (nicht wie style.css asynchron mit den Chart-Modulen),
 * damit Überschriften und Abstände beim Laden nicht springen.
 */

/* =====================================================================
 * Fließtext-Blöcke mit Balken links (Klasse iqx-quote, Helenas Text-Module)
 * Mehr Luft nach oben; Balken exakt von Versal-Oberkante bis Grundlinie.
 * ===================================================================== */
.module.iqx-quote {
	margin-top: clamp(32px, 3.9vw, 56px) !important;
	padding-top: 0 !important;
	padding-bottom: 0 !important;
}
.iqx-quote .tb_text_wrap > :first-child {
	margin-top: 0;
}
.iqx-quote .tb_text_wrap > :last-child {
	margin-bottom: 0;
}
@supports (text-box-trim: trim-both) {
	.iqx-quote .tb_text_wrap > :first-child {
		text-box-trim: trim-start;
		text-box-edge: cap alphabetic;
	}
	.iqx-quote .tb_text_wrap > :last-child {
		text-box-trim: trim-end;
		text-box-edge: cap alphabetic;
	}
	.iqx-quote .tb_text_wrap > :only-child {
		text-box-trim: trim-both;
	}
}
/* Fallback: FF DIN gemessen – Oberlänge 1,04 em, Unterlänge 0,24 em, Versalhöhe 0,712 em */
@supports not (text-box-trim: trim-both) {
	.iqx-quote .tb_text_wrap > :first-child {
		margin-top: calc(.312em - .5lh);
	}
	.iqx-quote .tb_text_wrap > :last-child {
		margin-bottom: calc(.40em - .5lh);
	}
}

/* Blöcke Transaktionsvolumen / Jahresvergleich / Spitzenrendite: mehr Luft zwischen
   Fließtext und nächster Dachzeile (Design ≈ 85–90 px, vorher 45 px). */
.module.iqx-quote + .module_subrow {
	margin-top: clamp(20px, 3.125vw, 45px);
}

/* Abschnitts-Überschriften (H2 in Helenas Text-Modulen) wie im Design:
   45 px bei 1440 (DIN Bold, Sperrung ≈ +0,03 em) und mit der Breite mitwachsend –
   sonst wirken sie auf breiten Bildschirmen neben dem mitwachsenden Content zu klein. */
@media (min-width: 681px) {
	.module-text h2 {
		font-size: clamp(36px, 3.125vw, 64px) !important;
		letter-spacing: .03em !important;
		line-height: 1.25 !important;
	}
}
/* Lange Einzelwörter („Gesamtmarktbetrachtung“) trennen statt überlaufen – greift nur, wenn es nicht passt */
.module-text h2 {
	hyphens: auto;
	-webkit-hyphens: auto;
	overflow-wrap: break-word;
}
@media (max-width: 680px) {
	.module-text h2 {
		letter-spacing: .01em !important;
	}
	/* Risikoverteilung nicht direkt an die Kacheln darüber kleben */
	.iqx-chart.iqx-risk {
		padding-top: 24px;
	}
}

/* Hero-Überschrift mobil: Helenas Umbrüche („Der Marktindex für / Pflegeimmobilien in / Deutschland“)
   behalten, Schrift so skalieren, dass die längste Zeile (8,87 × Schriftgröße) in die Spalte passt
   (Hero-Rand mobil 6 % wie live → Spalte 88 vw → max. 9,9 vw; 9,4 vw mit Luft, bei 440 px = 40 px wie live). */
@media (max-width: 680px) {
	.module-text h1 {
		font-size: clamp(28px, 9.4vw, 40px) !important;
		line-height: 1.15 !important;
	}
}
@media (max-width: 680px) {
	/* EN: längste Zeile „The Market Index for“ = 9,41 × Schriftgröße → max. 9,36 vw */
	html[lang^="en"] .module-text h1 {
		font-size: clamp(28px, 8.8vw, 40px) !important;
	}
}
