/*
Theme Name: Himmelgeist 1100
Theme URI: https://www.himmelgeist.de/
Author: pasu|edv Patrick Susenburger
Author URI: https://www.pasu-edv.de/
Description: Schlankes Theme für den Verein Himmelgeist 1100 e.V. – mit Terminverwaltung, Kontaktformular und Bildergalerie, ohne Page-Builder und ohne externe Dienste.
Version: 1.0.4
Requires at least: 6.4
Requires PHP: 8.0
License: GNU General Public License v2 or later
Text Domain: himmelgeist
*/

/* ---------- Schriften (lokal, SIL Open Font License) ---------- */
@font-face {
	font-family: "Figtree";
	src: url("assets/fonts/figtree-latin-wght-normal.woff2") format("woff2");
	font-weight: 300 900;
	font-style: normal;
	font-display: swap;
}

/* ---------- Grundwerte ---------- */
:root {
	--tinte: #17302c;
	--gruen: #2e6a55;
	--gruen-hell: #dfe9dc;
	--fluss: #2d6e86;
	--papier: #f7f4ec;
	--sand: #ece5d6;
	--weiss: #fffdf8;
	--akzent: #b4452e;
	--akzent-dunkel: #933723;
	--linie: #d9d1bf;
	--grau: #55635f;

	--serif: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; /* Überschriften: gleiche Familie, kräftiger Schnitt */
	--sans: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

	--rand: clamp(1rem, 4vw, 2.5rem);
	--radius: 14px;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
	margin: 0;
	background: var(--papier);
	color: var(--tinte);
	font-family: var(--sans);
	font-size: 1.0625rem;
	line-height: 1.65;
	-webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; height: auto; display: block; }

a { color: var(--fluss); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { color: var(--akzent); }

:focus-visible { outline: 3px solid var(--akzent); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3 {
	font-family: var(--serif);
	font-weight: 750;
	line-height: 1.1;
	letter-spacing: -0.03em;
	margin: 0 0 0.5em;
	text-wrap: balance;
}
h1 { font-size: clamp(2.3rem, 6vw, 4.1rem); }
h2 { font-size: clamp(1.55rem, 3.2vw, 2.15rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1.1em; }

.breite { width: min(100% - 2 * var(--rand), 1160px); margin-inline: auto; }

.sprung {
	position: absolute; left: 1rem; top: -4rem; z-index: 100;
	background: var(--tinte); color: #fff; padding: 0.6rem 1rem; border-radius: 8px;
}
.sprung:focus { top: 1rem; color: #fff; }

.vorzeile {
	font-size: 0.8rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
	color: var(--gruen); margin-bottom: 0.9rem;
}

/* ---------- Knöpfe ---------- */
.knopf, .wp-block-button__link, .wp-element-button {
	display: inline-flex; align-items: center; gap: 0.5rem;
	background: var(--akzent); color: #fff;
	font: inherit; font-weight: 650; line-height: 1.2;
	padding: 0.85rem 1.4rem; border: 2px solid var(--akzent); border-radius: 999px;
	text-decoration: none; cursor: pointer;
	transition: background-color .15s, border-color .15s, color .15s, transform .15s;
}
.knopf:hover, .wp-block-button__link:hover, .wp-element-button:hover {
	background: var(--akzent-dunkel); border-color: var(--akzent-dunkel); color: #fff; transform: translateY(-1px);
}
.knopf--hell { background: transparent; color: var(--tinte); border-color: currentColor; }
.knopf--hell:hover { background: var(--tinte); border-color: var(--tinte); color: #fff; }

.pfeil { font-weight: 650; text-decoration: none; white-space: nowrap; }
.pfeil::after { content: " →"; transition: margin .15s; }
.pfeil:hover::after { margin-left: 0.25em; }

/* ---------- Kopf ---------- */
.kopf {
	position: sticky; top: 0; z-index: 50;
	background: color-mix(in srgb, var(--papier) 92%, transparent);
	backdrop-filter: blur(10px);
	border-bottom: 1px solid var(--linie);
}
.admin-bar .kopf { top: 32px; }
@media (max-width: 782px) { .admin-bar .kopf { top: 46px; } }
@media (max-width: 600px) { .admin-bar .kopf { top: 0; } }

.kopf__innen { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; min-height: 4.5rem; }

.marke { display: inline-flex; align-items: baseline; gap: 0.55rem; text-decoration: none; color: var(--tinte); }
.marke:hover { color: var(--tinte); }
.marke__name { font-family: var(--serif); font-size: 1.6rem; font-weight: 800; letter-spacing: -0.035em; }
.marke__zusatz {
	font-size: 0.78rem; font-weight: 700; letter-spacing: 0.08em;
	background: var(--gruen); color: #fff; padding: 0.15rem 0.55rem; border-radius: 999px;
	transform: translateY(-0.3em); white-space: nowrap;
}
.marke__logo { max-height: 3rem; width: auto; }

.hauptmenue ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 0.25rem; }
.hauptmenue a {
	display: block; padding: 0.55rem 0.95rem; border-radius: 999px;
	color: var(--tinte); font-weight: 600; text-decoration: none;
}
.hauptmenue a:hover { background: var(--sand); color: var(--tinte); }
.hauptmenue .current-menu-item > a, .hauptmenue .current_page_item > a { background: var(--tinte); color: #fff; }

.menue-knopf {
	display: none; align-items: center; gap: 0.6rem;
	background: none; border: 2px solid var(--tinte); border-radius: 999px;
	padding: 0.45rem 0.95rem; font: inherit; font-weight: 650; color: var(--tinte); cursor: pointer;
}
.menue-knopf__striche, .menue-knopf__striche::before, .menue-knopf__striche::after {
	display: block; width: 18px; height: 2px; background: currentColor; border-radius: 2px; position: relative;
	transition: transform .2s, opacity .2s;
}
.menue-knopf__striche::before, .menue-knopf__striche::after { content: ""; position: absolute; left: 0; }
.menue-knopf__striche::before { top: -6px; }
.menue-knopf__striche::after { top: 6px; }
.menue-knopf[aria-expanded="true"] .menue-knopf__striche { background: transparent; }
.menue-knopf[aria-expanded="true"] .menue-knopf__striche::before { transform: translateY(6px) rotate(45deg); }
.menue-knopf[aria-expanded="true"] .menue-knopf__striche::after { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 760px) {
	.menue-knopf { display: inline-flex; }
	.hauptmenue {
		display: none; position: absolute; left: 0; right: 0; top: 100%;
		background: var(--papier); border-bottom: 1px solid var(--linie);
		padding: 0.75rem var(--rand) 1.25rem; box-shadow: 0 18px 30px -20px rgba(23, 48, 44, .45);
	}
	.hauptmenue.ist-offen { display: block; }
	.hauptmenue ul { flex-direction: column; }
	.hauptmenue a { padding: 0.8rem 1rem; font-size: 1.15rem; border-radius: 10px; }
}

/* ---------- Bühne (Startseite) ---------- */
.buehne { padding: clamp(2.5rem, 7vw, 5.5rem) 0 clamp(2.5rem, 6vw, 4.5rem); overflow: hidden; }
.buehne__innen { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.buehne h1 { margin-bottom: 0.35em; }
.buehne__claim { font-size: clamp(1.2rem, 2.2vw, 1.5rem); font-weight: 500; color: var(--gruen); max-width: 30ch; line-height: 1.4; }
.buehne__knoepfe { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 2rem 0 0; }

/* Bildrahmen mit Rundbogen – eine Anspielung auf die romanische Kirche St. Nikolaus */
.buehne__bild {
	position: relative; aspect-ratio: 4 / 4.4; max-height: 560px; justify-self: end; width: 100%;
	border-radius: 999px 999px var(--radius) var(--radius); overflow: hidden; background: var(--gruen-hell);
	box-shadow: 0 30px 60px -35px rgba(23, 48, 44, .55);
}
.buehne__bild img, .buehne__bild svg { width: 100%; height: 100%; object-fit: cover; }
.buehne__bild--leer svg { object-fit: cover; }

@media (max-width: 820px) {
	.buehne__innen { grid-template-columns: 1fr; }
	.buehne__bild { aspect-ratio: 4 / 3; border-radius: 160px 160px var(--radius) var(--radius); max-height: 380px; }
}

/* ---------- Zahlenleiste ---------- */
.zahlen { background: var(--tinte); color: #fff; }
.zahlen__innen { display: grid; grid-template-columns: repeat(3, 1fr); }
.zahlen p { margin: 0; padding: 1.6rem 1.5rem 1.7rem 0; display: flex; flex-direction: column; gap: 0.2rem; }
.zahlen p + p { padding-left: 1.5rem; border-left: 1px solid rgba(255, 255, 255, .18); }
.zahlen strong { font-family: var(--serif); font-size: clamp(1.7rem, 3.4vw, 2.4rem); font-weight: 750; letter-spacing: -0.03em; line-height: 1.1; color: #f1cf7a; }
.zahlen span { font-size: 0.95rem; color: rgba(255, 255, 255, .82); line-height: 1.4; }
@media (max-width: 680px) {
	.zahlen__innen { grid-template-columns: 1fr; }
	.zahlen p, .zahlen p + p { padding: 1.1rem 0; border-left: 0; flex-direction: row; align-items: baseline; gap: 1rem; }
	.zahlen p + p { border-top: 1px solid rgba(255, 255, 255, .18); }
	.zahlen strong { min-width: 5.2rem; }
}

/* ---------- Abschnitte ---------- */
.abschnitt { padding: clamp(2.5rem, 6vw, 5rem) 0; }
.abschnitt--sand { background: var(--sand); }
.abschnitt__kopf { display: flex; align-items: end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.75rem; }
.abschnitt__kopf h2 { margin: 0; }

.zweispaltig { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.85fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: start; }
@media (max-width: 900px) { .zweispaltig { grid-template-columns: 1fr; } }

.seitenkopf { padding: clamp(2.5rem, 6vw, 4.5rem) 0 clamp(1.5rem, 3vw, 2.25rem); border-bottom: 1px solid var(--linie); background: linear-gradient(180deg, var(--gruen-hell), var(--papier)); }
.seitenkopf h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); margin: 0; }
.seitenkopf__einleitung { font-size: 1.2rem; color: var(--grau); max-width: 52ch; margin: 0.9rem 0 0; }

/* ---------- Fließtext ---------- */
.fliesstext > * { max-width: 100%; }
.fliesstext--schmal > *:not(.alignwide):not(.alignfull) { max-width: 46rem; }
.fliesstext > p:first-of-type:not(.vorzeile) { font-size: 1.18rem; }
.fliesstext .vorzeile + p { font-size: 1.18rem; }
.fliesstext h2 { margin-top: 2.2em; }
.fliesstext > h2:first-child { margin-top: 0; }
.fliesstext h3 { margin-top: 1.8em; }
.fliesstext ul, .fliesstext ol { padding-left: 1.3em; margin: 0 0 1.2em; }
.fliesstext li { margin-bottom: 0.4em; }
.fliesstext small { color: var(--grau); font-size: 0.9rem; }

.kasten { background: var(--weiss); border: 1px solid var(--linie); border-radius: var(--radius); padding: clamp(1.25rem, 3vw, 2rem); position: sticky; top: 6rem; }
.kasten h2 { font-size: 1.5rem; }
.kasten > p:last-child { margin: 1.25rem 0 0; }
@media (max-width: 900px) { .kasten { position: static; } }

/* ---------- Termine ---------- */
.termine-monat {
	font-family: var(--sans); font-size: 0.85rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
	color: var(--gruen); border-bottom: 1px solid var(--linie); padding-bottom: 0.6rem; margin: 2.6rem 0 0 !important;
}
.termine-monat:first-child { margin-top: 0 !important; }
.fliesstext ul.termine, .termine { list-style: none; margin: 0; padding: 0; }
.termin { display: grid; grid-template-columns: 4.6rem 1fr; gap: 1.15rem; align-items: center; padding: 1.1rem 0; border-bottom: 1px solid var(--linie); margin: 0 !important; }
.termine--kurz .termin:last-child { border-bottom: 0; }
.termine--kurz .termin:first-child { padding-top: 0.3rem; }
.termin__datum {
	display: grid; justify-items: center; align-content: center; line-height: 1;
	background: var(--gruen-hell); border-radius: 12px; padding: 0.55rem 0.3rem 0.6rem; min-height: 4.6rem;
}
.termin__wtag, .termin__monat { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--gruen); }
.termin__tag { font-size: 1.8rem; font-weight: 750; letter-spacing: -0.03em; margin: 0.12rem 0; }
.termin__titel { font-size: 1.2rem; margin: 0 0 0.2rem; }
.termin__titel a { color: inherit; }
.termin__meta, .termin__hinweis { margin: 0; color: var(--grau); font-size: 0.98rem; line-height: 1.45; }
.termin__hinweis { font-size: 0.92rem; }
.termine-leer { color: var(--grau); }

/* ---------- Galerie ---------- */
.kacheln { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.9rem; }
.kachel { display: block; border-radius: var(--radius); overflow: hidden; aspect-ratio: 4 / 3; background: var(--gruen-hell); }
.kachel img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.kachel:hover img { transform: scale(1.04); }
@media (max-width: 640px) { .kacheln { grid-template-columns: repeat(2, 1fr); } }

.fliesstext .wp-block-gallery.has-nested-images { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.9rem; margin: 0 0 2rem; }
.fliesstext .wp-block-gallery.has-nested-images.columns-2 { grid-template-columns: repeat(2, 1fr); }
.fliesstext .wp-block-gallery.has-nested-images.columns-4 { grid-template-columns: repeat(4, 1fr); }
.fliesstext .wp-block-gallery.has-nested-images figure.wp-block-image {
	width: 100% !important; margin: 0 !important; aspect-ratio: 4 / 3; border-radius: 10px; overflow: hidden; background: var(--gruen-hell); display: block;
}
.fliesstext .wp-block-gallery.has-nested-images figure.wp-block-image a { display: block; height: 100%; }
.fliesstext .wp-block-gallery.has-nested-images figure.wp-block-image img { width: 100%; height: 100% !important; object-fit: cover; border-radius: 0; transition: transform .4s; }
.fliesstext .wp-block-gallery.has-nested-images figure.wp-block-image a:hover img { transform: scale(1.04); }
@media (max-width: 640px) {
	.fliesstext .wp-block-gallery.has-nested-images,
	.fliesstext .wp-block-gallery.has-nested-images.columns-4 { grid-template-columns: repeat(2, 1fr); gap: 0.6rem; }
}
.fliesstext .termine + p { margin-top: 2rem; }
.wp-block-image img { border-radius: 10px; }

.lichtkasten { position: fixed; inset: 0; z-index: 200; background: rgba(12, 24, 22, .94); display: grid; place-items: center; padding: 3.5rem 1rem 1.5rem; }
.lichtkasten[hidden] { display: none; }
.lichtkasten img { max-width: min(100%, 1400px); max-height: calc(100vh - 6rem); border-radius: 6px; box-shadow: 0 20px 60px rgba(0, 0, 0, .5); }
.lichtkasten button {
	position: absolute; width: 3rem; height: 3rem; border-radius: 50%; border: 0; cursor: pointer;
	background: rgba(255, 255, 255, .14); color: #fff; font-size: 1.5rem; line-height: 1; display: grid; place-items: center;
}
.lichtkasten button:hover { background: rgba(255, 255, 255, .28); }
.lichtkasten__zu { top: 0.75rem; right: 0.75rem; }
.lichtkasten__vor { right: 0.75rem; top: 50%; transform: translateY(-50%); }
.lichtkasten__zurueck { left: 0.75rem; top: 50%; transform: translateY(-50%); }
.lichtkasten__zaehler { position: absolute; top: 1.4rem; left: 1.25rem; color: rgba(255, 255, 255, .75); font-size: 0.9rem; }

/* ---------- Linkliste ---------- */
.fliesstext ul.linkliste { list-style: none; padding: 0; display: grid; gap: 0.6rem; }
.linkliste li { margin: 0; background: var(--weiss); border: 1px solid var(--linie); border-radius: 12px; padding: 0.85rem 1.1rem; color: var(--grau); }
.linkliste li:has(a) { padding: 0; }
.linkliste a { display: flex; justify-content: space-between; gap: 1rem; padding: 0.85rem 1.1rem; color: var(--tinte); font-weight: 600; text-decoration: none; border-radius: 12px; }
.linkliste a::after { content: "↗"; color: var(--akzent); }
.linkliste a:hover { background: var(--gruen-hell); }

/* ---------- Formular ---------- */
.formular { background: var(--weiss); border: 1px solid var(--linie); border-radius: var(--radius); padding: clamp(1.25rem, 3vw, 2rem); margin: 1.5rem 0 2.5rem; }
.formular p { margin: 0 0 1.1rem; }
.formular p:last-child { margin-bottom: 0; }
.formular__zeile { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 560px) { .formular__zeile { grid-template-columns: 1fr; gap: 0; } }
.formular label { display: block; font-weight: 650; font-size: 0.95rem; margin-bottom: 0.35rem; }
.formular input[type=text], .formular input[type=email], .formular select, .formular textarea {
	width: 100%; font: inherit; color: inherit; background: #fff;
	border: 1.5px solid #b9b19f; border-radius: 10px; padding: 0.7rem 0.85rem;
}
.formular textarea { resize: vertical; min-height: 9rem; }
.formular input:focus, .formular select:focus, .formular textarea:focus { outline: 3px solid color-mix(in srgb, var(--fluss) 35%, transparent); border-color: var(--fluss); }
.formular__check label { display: flex; gap: 0.7rem; align-items: flex-start; font-weight: 400; }
.formular__check input { margin-top: 0.35rem; width: 1.1rem; height: 1.1rem; flex: none; accent-color: var(--gruen); }
.formular__falle { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.hinweis { border-radius: 12px; padding: 1rem 1.2rem; margin: 1.5rem 0; border: 1px solid; }
.hinweis--ok { background: #e3f0e4; border-color: #9cc4a2; }
.hinweis--fehler { background: #f8e3dd; border-color: #dba595; }

/* ---------- Mitmachen ---------- */
.mitmachen { background: var(--gruen); color: #fff; }
.mitmachen__innen { display: flex; align-items: center; justify-content: space-between; gap: 2rem; flex-wrap: wrap; padding-block: clamp(2.25rem, 5vw, 3.75rem); }
.mitmachen h2 { margin-bottom: 0.3em; }
.mitmachen p { margin: 0; max-width: 46ch; color: rgba(255, 255, 255, .9); }
.mitmachen .knopf--hell { color: #fff; }
.mitmachen .knopf--hell:hover { background: #fff; border-color: #fff; color: var(--gruen); }

/* ---------- Fuß ---------- */
.fuss { background: var(--tinte); color: rgba(255, 255, 255, .82); font-size: 0.98rem; }
.fuss a { color: #fff; }
.fuss a:hover { color: #f1cf7a; }
.fuss__innen { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 2.5rem; padding-block: clamp(2.5rem, 5vw, 4rem) 2rem; }
.fuss h2 { font-family: var(--sans); font-size: 0.8rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: #f1cf7a; margin-bottom: 0.9rem; }
.fuss__marke { font-size: 1.6rem; font-weight: 800; letter-spacing: -0.035em; color: #fff; margin-bottom: 0.4rem; line-height: 1.2; }
.fuss__marke span { font-family: var(--sans); font-size: 0.8rem; font-weight: 700; letter-spacing: 0.08em; color: #f1cf7a; }
.fuss ul { list-style: none; margin: 0; padding: 0; }
.fuss li { margin-bottom: 0.35rem; }
.fuss__spalte p { margin-bottom: 0.7rem; }
.fuss__unten { display: flex; flex-wrap: wrap; gap: 0.5rem 1.75rem; align-items: center; border-top: 1px solid rgba(255, 255, 255, .16); padding-block: 1.25rem 1.75rem; font-size: 0.9rem; }
.fuss__unten p { margin: 0; }
.fuss__unten ul { display: flex; gap: 1.25rem; }
.fuss__unten li { margin: 0; }
.fuss__credit { margin-left: auto !important; }
@media (max-width: 760px) {
	.fuss__innen { grid-template-columns: 1fr; gap: 1.75rem; }
	.fuss__credit { margin-left: 0 !important; width: 100%; }
}

/* ---------- Sonstiges ---------- */
.eintrag { padding-bottom: 1.5rem; margin-bottom: 1.5rem; border-bottom: 1px solid var(--linie); }
.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

@media (prefers-reduced-motion: reduce) {
	* { transition: none !important; scroll-behavior: auto !important; }
}

@media print {
	.kopf, .fuss, .mitmachen, .menue-knopf, .buehne__knoepfe { display: none; }
	body { background: #fff; }
}

/* ---------- Sehr schmale Bildschirme ---------- */
@media (max-width: 460px) {
	.kopf__innen { gap: 0.6rem; }
	.marke { gap: 0.4rem; }
	.marke__name { font-size: 1.4rem; }
	.marke__zusatz { font-size: 0.68rem; padding: 0.12rem 0.45rem; }
	.menue-knopf { padding: 0.4rem 0.8rem; }
}
