/*
 * Seitenteile, die jede Seite hat: Kopf und Fuss.
 */

.kopf,
.fuss {
	max-width: var(--breite);
	margin: 0 auto;
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 16px 40px;
}

.kopf {
	align-items: center;
	padding: 28px var(--rand);
}

.kopf__logo {
	display: flex;
	align-items: center;
}

/* Originallogo als Ganzes, so hoch wie bisher die Zwiebel allein. */
.kopf__bild {
	height: 48px;
	width: auto;
}

.kopf__nav {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 28px;
	font-weight: var(--fett);
}

.kopf__link {
	padding: 12px 0;
	text-decoration: none;
}

.kopf__link[aria-current] {
	text-decoration: underline;
}

/* Doktor Glueck: Menuepunkt mit Punkt in der Hausfarbe davor. */
.kopf__link--punkt {
	display: inline-flex;
	align-items: center;
	gap: 8px;
}

.kopf__link--punkt::before {
	content: "";
	flex: 0 0 auto;
	width: 0.6em;
	height: 0.6em;
	border-radius: 50%;
	background: var(--farbe);
	box-shadow: inset 0 0 0 var(--farbe-kontur-breite) var(--farbe-kontur);
}

/* --- Menueknopf fuer schmale Bildschirme (assets/js/navigation.js) --- */

.kopf__schalter {
	display: inline-flex;
	align-items: center;
	gap: 12px;
}

/* Auf Touchgeraeten bleibt :hover nach dem Tippen haengen, der Knopf
   wirkte dann grau wie abgeschaltet. */
@media (hover: none) {
	.kopf__schalter:hover {
		background: var(--schwarz);
	}
}

/* .knopf setzt display und schlaegt damit das hidden-Attribut. */
.kopf__schalter[hidden] {
	display: none;
}

/* Drei Striche, offen ein Kreuz. Die mittlere Linie ist das Element selbst. */
.kopf__striche,
.kopf__striche::before,
.kopf__striche::after {
	display: block;
	width: 18px;
	height: 2px;
	background: currentColor;
}

.kopf__striche {
	position: relative;
}

.kopf__striche::before,
.kopf__striche::after {
	content: "";
	position: absolute;
	left: 0;
}

.kopf__striche::before {
	top: -6px;
}

.kopf__striche::after {
	top: 6px;
}

.kopf--offen .kopf__striche {
	background: transparent;
}

.kopf--offen .kopf__striche::before {
	top: 0;
	transform: rotate(45deg);
}

.kopf--offen .kopf__striche::after {
	top: 0;
	transform: rotate(-45deg);
}

@media (min-width: 1101px) {
	.kopf__schalter {
		display: none;
	}
}

@media (max-width: 1100px) {
	.kopf--klappbar:not(.kopf--offen) .kopf__nav {
		display: none;
	}

	/* „Schliessen“ ist breiter als „Menü“: Mit dem weiten Abstand rutschte
	   der Knopf auf 390 px offen unter das Logo. */
	.kopf--klappbar {
		column-gap: 16px;
	}

	/* Offen liegt der ganze Kopf als weisse Flaeche ueber der Seite.
	   Logo und Knopf bleiben, wo sie waren; das Menue folgt darunter. */
	.kopf--offen {
		position: fixed;
		top: var(--wp-admin--admin-bar--height, 0px);
		right: 0;
		bottom: 0;
		left: 0;
		z-index: 50;
		max-width: none;
		align-content: flex-start;
		overflow-y: auto;
		background: var(--weiss);
	}

	.kopf--offen .kopf__nav {
		flex-basis: 100%;
		flex-direction: column;
		align-items: flex-start;
		gap: 0;
		padding-top: var(--stapel-weit);
	}

	.kopf--offen .kopf__link {
		padding: 8px 0;
		font-size: var(--g-gross);
		line-height: 1.25;
	}

	.kopf--offen .kopf__nav .knopf {
		margin-top: var(--stapel);
	}

	/* Untereinander stuende der Punkt vor der linken Kante der anderen
	   Menuepunkte; dahinter bleibt die Kante gerade. */
	.kopf--offen .kopf__link--punkt::before {
		order: 1;
	}

	.seite--menue-offen {
		overflow: hidden;
	}
}

/* Sehr schmal passt neben das Logo nur noch das Zeichen. Der Text bleibt
   fuer Vorleseprogramme erhalten. */
@media (max-width: 359px) {
	.kopf__schalter {
		justify-content: center;
		width: 48px;
		height: 48px;
		padding: 0;
	}

	.kopf__schalter-text {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip-path: inset(50%);
		white-space: nowrap;
	}
}

.fuss {
	padding: 32px var(--rand) 56px;
	font-size: var(--g-klein);
}

.fuss__nav {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 28px;
}

.fuss__nav a {
	padding: 12px 0;
}

.fuss p {
	padding: 12px 0;
}
