/*
 * Angleichung an Avada 7.8 nach dem Update auf Avada 7.15: was die neue Version anders
 * darstellt, wird hier auf das alte Aussehen zurückgesetzt. Wird nur mit Avada 7.15 oder neuer
 * geladen (functions.php).
 */

/* Titel-Elemente mit kleiner Überschrift (bis 24px, z. B. h3 mit 22px): Avada 7.8 schrieb die
   Mindestgröße mit Einheit ins Markup (--minFontSize:22px). Die Rechnung für die Schriftgröße
   war damit ungültig, die Überschrift erbte die Grundschrift (16px), der Titel-Block hatte keine
   eigene Größe. Avada 7.15 rechnet richtig, die Überschriften wurden größer. Gilt wie die
   Rechnung selbst nur bis 1550px Bildschirmbreite. */
/* Titel-Elemente auf dem Handy: Avada 7.8 ließ die Handy-Abstände weg, wenn sie den
   Standardwerten entsprachen (oben 0, unten 20px), und nahm die Abstände für Tablets bzw. die
   normalen. Avada 7.15 wendet sie immer an. */
@media only screen and (max-width: 640px) {
	.fusion-body .fusion-title[style*="--awb-margin-top-small:0px;--awb-margin-right-small:0px;--awb-margin-bottom-small:20px;--awb-margin-left-small:0px"] {
		margin-top: var(--awb-margin-top-medium) !important;
		margin-right: var(--awb-margin-right-medium) !important;
		margin-bottom: var(--awb-margin-bottom-medium) !important;
		margin-left: var(--awb-margin-left-medium) !important;
	}
}

@media only screen and (max-width: 1550px) {
	.fusion-body .fusion-title:not([style*="--awb-font-size"]):has(> .fusion-responsive-typography-calculated[style*="--minFontSize:"]:not([style*="--minFontSize: "])) {
		font-size: inherit;
	}
	/* nur die vom Server ausgegebenen (--minFontSize:22 ohne Leerzeichen); die das Avada-Skript im
	   Browser setzt (--minFontSize: 18), rechneten auch in 7.8 richtig */
	/* gleiche Gewichtung wie Avadas Regel für die Rechnung: eigene Regeln mit !important in
	   main.css (z. B. Slider-Überschriften) gehen wie früher vor */
	:where(.fusion-body .fusion-title) > .fusion-responsive-typography-calculated:where([style*="--minFontSize:"]:not([style*="--minFontSize: "])) {
		font-size: inherit !important;
	}
}

/* Bild-Elemente: Avada 7.15 legt um jedes Bild einen Rahmen mit Zeilenhöhe 1. Vorher saß das
   Bild direkt in der Spalte und erbte die Zeilenhöhe der Seite (40px), die Lücke unter dem Bild
   war dadurch größer. */
.fusion-body .fusion-image-element {
	line-height: inherit;
}

/* Überschriften im Text eines Titel-Elements (nicht die Titel-Überschrift selbst): Avada 7.16
   setzt sie auf 1em der Titelgröße, in 7.8 hatten sie ihre normale Größe (h3 22px). */
.fusion-body #wrapper .fusion-title h1:not(.fusion-title-heading) { font-size: var(--h1_typography-font-size); }
.fusion-body #wrapper .fusion-title h2:not(.fusion-title-heading) { font-size: var(--h2_typography-font-size); }
.fusion-body #wrapper .fusion-title h3:not(.fusion-title-heading) { font-size: var(--h3_typography-font-size); }
.fusion-body #wrapper .fusion-title h4:not(.fusion-title-heading) { font-size: var(--h4_typography-font-size); }
.fusion-body #wrapper .fusion-title h5:not(.fusion-title-heading) { font-size: var(--h5_typography-font-size); }
.fusion-body #wrapper .fusion-title h6:not(.fusion-title-heading) { font-size: var(--h6_typography-font-size); }

/* Polylang statt WPML (Oktober 2026): Portfolio-Kategorieseiten zeigen unter jeder Kachel die
   Kategorie. Unter WPML blieb diese Zeile leer (WPML-Fehler); das Element bleibt, nur leer wie bisher. */
.tax-portfolio_category .fusion-portfolio-meta { font-size: 0; line-height: 0; }
.tax-portfolio_category .fusion-portfolio-meta > * { display: none; }
