/*
 * Seite "Kurse" (Template kurse, Markup in kurse.php, Verhalten in scripts/kurse.js).
 * Maße und Verhalten sind am Original (keramikdrehen.de bei Jimdo) gemessen, der Code ist selbst geschrieben.
 * Die Textstile (Überschriften, Absätze, Listen, Ausrichtung) stammen aus .kd-prose in base.css. Die Texte der
 * Terminlisten bleiben dadurch Zeichen für Zeichen so gesetzt wie im Original.
 *
 * Bausteine (Präfix kd-ku-):
 *   .kd-ku-cover      Kopfbereich: Text und Pfeil in einer Hälfte, Bild in der anderen (mobil Bild oben)
 *   .kd-ku-akk        aufklappbarer Block aus drei Zeilen (.kd-ku-akk__zeile > __kopf + __feld)
 *   .kd-ku-rahmen     Bild im Seitenverhältnis des Fotos (padding-bottom per Inline-Stil)
 *   .kd-ku--invers    weiße Schrift auf farbigem Grund (Kopfbereich, grünlicher und blauer Block)
 */

/* ------------------------------------------------------------------ Kopfbereich */
.kd-ku-cover {
	/* Höhe des Kopfbereichs der Seite: Der Abschnitt füllt das Fenster darunter. scripts/kurse.js passt den Wert
	   an, wenn der Kopf beim Scrollen kleiner wird. */
	--kd-ku-versatz: 144px;
	position: relative;
	z-index: 3;
	display: flex;
	flex-direction: column-reverse;
	justify-content: flex-end;
	min-height: calc(100vh - var(--kd-ku-versatz));
}
.kd-ku--invers { color: var(--kd-white); }
.kd-ku--invers .kd-prose { color: var(--kd-white); }

/* Mobil: Bild quadratisch oben, Text darunter */
.kd-ku-cover__bild {
	position: relative;
	flex-grow: 1;
	width: 100%;
	min-height: 100vw;
	margin-bottom: 20px;
	overflow: hidden;
}
.kd-ku-cover__bild picture,
.kd-ku-cover__bild img {
	position: absolute;
	inset: 0;
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}
.kd-ku-cover__text {
	position: relative;
	flex-grow: 1;
}
.kd-ku-cover__box {
	width: 100%;
	padding: 0 20px 60px;
}
.kd-ku-cover .kd-prose h1 { font-size: 40px; }

.kd-ku-cover__weiter {
	position: absolute;
	right: 0;
	bottom: 0;
	left: 0;
	width: 100%;
	padding: 0 60px;
	text-align: center;
}
.kd-ku-pfeil {
	display: inline-block;
	vertical-align: top;
	color: var(--kd-white);
	text-decoration: none;
}
.kd-ku-pfeil__flaeche {
	display: flex;
	padding: 17px 20px;
}
.kd-ku-pfeil svg { display: block; }
.kd-ku-pfeil:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: -6px;
}

@media (min-width: 801px) {
	.kd-ku-cover {
		flex-direction: row-reverse;
		justify-content: flex-start;
	}
	.kd-ku-cover__text {
		display: flex;
		flex-direction: column;
		align-items: flex-end;
		justify-content: center;
		width: 50%;
	}
	.kd-ku-cover__box {
		max-width: 840px;
		margin: 0 auto;
		padding: 60px;
	}
	.kd-ku-cover__bild {
		width: 50%;
		min-height: 0;
		margin-bottom: 0;
	}
	.kd-ku-cover .kd-prose h1 { font-size: 64px; }
	.kd-ku-cover__weiter {
		max-width: 840px;
		margin: 0 auto;
		text-align: left;
	}
	.kd-ku-pfeil { margin-left: -25px; }
}

/* ------------------------------------------------------------------ Aufklappbare Blöcke */
.kd-ku--invers { --kd-ku-linie: #dcdcdc; --kd-ku-symbol: var(--kd-white); }
.kd-bg-secondary { --kd-ku-linie: #e6e7f0; --kd-ku-symbol: var(--kd-text); }

.kd-ku-akk {
	display: flex;
	flex-direction: column;
}
.kd-ku-akk__zeile {
	display: flex;
	flex-direction: column;
	padding: 10px 0;
	border-top: 1px solid var(--kd-ku-linie, #dcdcdc);
}
.kd-ku-akk__zeile:first-child { border-top: 0; }

.kd-ku-akk__kopf {
	display: flex;
	align-items: center;
	margin: 5px 0;
}
.kd-ku-akk__kopf > .kd-text__body {
	flex: 1 1 auto;
	min-width: 0;
}
.kd-ku-akk__symbol {
	display: none;
	flex: none;
	width: 24px;
	height: 24px;
	margin-left: 20px;
	color: var(--kd-ku-symbol, var(--kd-text));
}
.kd-ku-akk__symbol svg {
	display: block;
	fill: none;
	stroke: currentColor;
	stroke-width: 2;
	stroke-linecap: round;
}
.kd-ku-akk__feld { margin: 5px 0; }

/* Mit JavaScript sind die Zeilen zu, bis jemand sie öffnet. Ohne JavaScript bleibt alles offen und lesbar. */
html.js .kd-ku-akk__symbol { display: block; }
html.js .kd-ku-akk__feld {
	max-height: 0;
	overflow: hidden;
	transition-property: max-height;
}
html.js .kd-ku-akk__kopf { cursor: pointer; }
.kd-ku-akk__zeile.is-offen .kd-ku-akk__senkrecht { display: none; }
.kd-ku-akk__kopf:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 4px;
}
@media (prefers-reduced-motion: reduce) {
	html.js .kd-ku-akk__feld { transition: none !important; }
}

/* ------------------------------------------------------------------ Gruppen & Einzelstunde */
.kd-ku-gruppen__bild { padding: 20px 0; }
.kd-ku-rahmen {
	position: relative;
	width: 100%;
	overflow: hidden;
}
.kd-ku-rahmen__innen {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
}
.kd-ku-rahmen picture {
	display: block;
	width: 64%;
}
.kd-ku-rahmen img {
	display: block;
	width: 100%;
	height: auto;
}

/* Ausrichtung aus dem Editor (die Seite kennt auch die Klasse für linksbündig) */
.kd-prose .text-align-left { text-align: left; }
