/*
Theme Name: Solidarisches Gallus
Theme URI: https://solidarisches-gallus.org
Description: Schlankes Child-Theme von Twenty Twenty-Five für solidarisches-gallus.org. Farben und Schriften in theme.json, fertige Abschnitte als Block-Vorlagen (Patterns).
Template: twentytwentyfive
Version: 1.0.0
Requires at least: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: solidarisches-gallus
*/

/* ---------- Grundgerüst ---------- */

.wp-site-blocks {
	position: relative;
}

/* Kein Abstand zwischen Kopf, Inhalt und Fuß – die Abschnitte bringen ihre eigenen Abstände mit. */
.wp-site-blocks > * {
	margin-block-start: 0;
}

/* Vollbreite Abschnitte (Farbflächen) liegen direkt aneinander. */
.wp-block-post-content > .alignfull {
	margin-block-start: 0 !important;
	margin-block-end: 0 !important;
}

/* ---------- Kopfzeile ---------- */

.wp-block-group.sg-header {
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	align-items: start;
	gap: 1rem;
}

.sg-header > :first-child {
	justify-self: start;
}

.sg-header > :last-child {
	justify-self: end;
}

.sg-header .wp-block-site-title {
	text-align: center;
	text-transform: lowercase;
}

/* Logo-Schriftzug zweizeilig: „solidarisches / gallus“ */
.wp-block-site-title.sg-logo,
.wp-block-site-title.sg-logo-footer {
	width: min-content;
}

.sg-logo-footer {
	text-transform: uppercase;
}

/* Wenn eine Seite mit einem farbigen Kopfbereich (Vorlage „Kopfbereich …“) beginnt,
   liegt die Kopfzeile transparent darüber und wird weiß. */
body:has(.wp-block-post-content > .sg-hero:first-child) .wp-site-blocks > header {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	z-index: 20;
	color: var(--wp--preset--color--base);
}

@media (max-width: 600px) {
	.wp-block-group.sg-header {
		grid-template-columns: 1fr 1fr;
		row-gap: 0.75rem;
	}

	.sg-header > .wp-block-site-title {
		grid-column: 1 / -1;
		grid-row: 1;
		justify-self: center;
	}
}

/* ---------- Farbiger Kopfbereich (Hero) ---------- */

.sg-hero .wp-block-columns {
	margin-block-end: 0;
}

.sg-hero .wp-block-image {
	margin: 0 0 0 auto;
	max-width: 480px;
}

.sg-hero .wp-block-image img {
	display: block;
	width: 100%;
}

/* ---------- Bild-Stile ---------- */

/* „Box“: Illustration in schwarzem, abgerundetem Rahmen */
.wp-block-image.is-style-sg-box img {
	box-sizing: border-box;
	width: 100%;
	border: 2px solid var(--wp--preset--color--contrast);
	border-radius: 22px;
	background: var(--wp--preset--color--base);
	padding: clamp(1rem, 3vw, 1.75rem);
	aspect-ratio: 5 / 4;
	object-fit: contain;
}

/* „Abgerundet“: nur runde Ecken (Fotos) */
.wp-block-image.is-style-sg-rund img {
	border-radius: 22px;
	width: 100%;
}

/* „Box“ für Gruppen: Textkasten */
.wp-block-group.is-style-sg-box {
	border: 2px solid var(--wp--preset--color--contrast);
	border-radius: 22px;
	padding: clamp(1.25rem, 3vw, 2rem);
}

/* ---------- Kleinigkeiten ---------- */

/* Drei Komitee-Kacheln: Überschrift-Links ohne Unterstrich */
.sg-komitees h3 a {
	text-decoration: none;
}

.sg-komitees h3 a:hover {
	text-decoration: underline;
}

/* Fußzeile: Links ohne Unterstrich */
.sg-footer a {
	text-decoration: none;
}

.sg-footer a:hover {
	text-decoration: underline;
}

/* Sprungmarken (z. B. /struktur/#beratung) nicht unter der Kante verstecken */
[id] {
	scroll-margin-top: 2rem;
}

/* Zwischenüberschrift in Großbuchstaben */
.sg-uppercase {
	text-transform: uppercase;
}
