/*
 * Kompatibilität für Blocksy 2.x (seit 11/2026).
 * Stellt das Layout wieder so her, wie es mit Blocksy 1.8.2 war – die Werte stammen aus dem
 * Vergleich beider Fassungen (berechnete Styles, Pixelvergleich). Jede Regel nennt den Grund.
 */

/* Blocksy 2 hat die CSS-Variablen umbenannt; overrides.css rechnet mit --contentSpacing */
:root {
	--contentSpacing: var(--theme-content-spacing, 1.5em);
}

/* Blocksy 1.8 setzte die Grundschrift (18px) auf <html>, Blocksy 2 nur auf <body>.
   Alle rem-Angaben in overrides.css (1.2rem, 1.7rem, 3rem …) beziehen sich auf <html>. */
html {
	font-size: var(--theme-font-size, 18px);
}

/* Inhaltsbereich: In 1.8 lag der Artikel in einem 90 %-Container (max. 1900px), die Blöcke
   darin ohne eigene Ränder. Blocksy 2 macht den Artikel volle Breite und zentriert jeden Block
   einzeln – dadurch rutschten schmale Blöcke (max-width 65ch) in die Mitte. */
.ct-container-full > article {
	width: var(--theme-container-width, 90vw);
	max-width: var(--theme-normal-container-max-width, 1900px);
	margin-left: auto;
	margin-right: auto;
}
.entry-content.is-layout-constrained > :not(.gb-grid-wrapper) {
	margin-left: 0 !important;
	margin-right: 0 !important;
}
/* GenerateBlocks-Raster haben eigene negative Ränder (Spaltenabstand), die bleiben */

/* Footer: Spaltenabstände wie im alten Footer-Builder (60px horizontal, 40px vertikal) */
.ct-footer [data-row="top"] .ct-container {
	column-gap: 60px;
	row-gap: 0;
}
.ct-footer [data-row="middle"] .ct-container {
	column-gap: 60px;
	row-gap: 40px;
}

/* Footer-Textwidgets trugen in 1.8 die Klasse entry-content, dadurch waren Links unterstrichen */
.ct-footer .textwidget a {
	text-decoration: underline;
}

/* Überschriften-Abstand: Blocksy 1.8 rechnete calc(.2em + 10px), Blocksy 2 calc(.3em + 10px) */
.entry-content :where(h1, h2, h3, h4, h5, h6) {
	margin-block-end: calc(.2em + 10px);
}

/* Blocksy 1.8 setzte den Seitenhintergrund explizit auf Weiß; die grüne Startseite
   (overrides.css) hat eine höhere Spezifität und bleibt davon unberührt */
body {
	background-color: #ffffff;
}

/* Footer-Textwidgets: Absätze ohne Abstand nach unten, 20px zwischen zwei Absätzen (wie 1.8) */
.ct-footer .textwidget > * {
	margin-bottom: 0;
}
.ct-footer .textwidget > * + * {
	margin-top: 20px;
}

/* Projektraster: In 1.8 galt „.entry-content h3:last-child { margin-bottom: 0 }" und schlug das
   Inline-CSS des Raster-Plugins (0.5em). Blocksy 2 hat diese Regel nicht mehr. */
.entry-content .postgrid-item .entry-title:last-child {
	margin-bottom: 0;
}

/* Startseite: .home-letters (overrides.css) ist absolut positioniert und soll sich an der vollen
   Seitenbreite ausrichten. Blocksy 2 gibt jedem Block eine feste Breite (--theme-block-width),
   dadurch würde es nur noch die Artikelbreite füllen. */
.entry-content.is-layout-constrained > .home-letters {
	width: auto;
	max-width: none;
}

/* Footer-Mittelzeile am Tablet: 1.8 hatte dort 50px Innenabstand, Blocksy 2 nimmt 40px */
@media (min-width: 690px) and (max-width: 999.98px) {
	.ct-footer [data-row="middle"] .ct-container {
		padding-top: 50px;
		padding-bottom: 50px;
	}
}

/* GenerateBlocks-Raster: WordPress erzwingt für „constrained"-Layouts margin auto (!important) und
   überschreibt damit den negativen Spaltenrand des Rasters (-30px = halber Spaltenabstand).
   Blocksy 2 gibt dem Block außerdem eine feste Breite. Beides zurück auf den Stand von 1.8. */
.entry-content.is-layout-constrained > .gb-grid-wrapper {
	margin-left: -30px !important;
	margin-right: 0 !important;
	width: auto !important;
}

/* Listen: Blocksy 2 setzt ul:last-child auf 0 und schlägt damit „main ul { margin-bottom: 2em }"
   aus overrides.css; Listenpunkte hatten in 1.8 0,3em Abstand (--listItemSpacing) */
main ul:last-child,
main ol:last-child {
	margin-bottom: 2em;
}
.entry-content ul li,
.entry-content ol li,
.ct-widget ul li,
.ct-widget ol li {
	margin-bottom: var(--theme-list-item-spacing, 0.3em);
}

/* Hauptmenü: erster Eintrag ohne linken Innenabstand, wie in 1.8 (nur Hover-Fläche, Text sitzt gleich) */
header .menu > li:first-child > a {
	padding-left: 0;
}
