/*
 * AK Kurse - Frontend-Styles
 *
 * Nutzt dieselben CSS-Variablen wie das Theme (theme.json), damit
 * Kursseiten optisch nicht von der übrigen Website abweichen.
 * Fallback-Werte dienen nur, falls das Theme ohne diese Variablen
 * läuft.
 */

.ak-kurs-seite,
.ak-lektion-seite,
.ak-kursuebersicht {
	max-width: 760px;
	margin: 0 auto;
	padding: 48px 20px;
	color: var(--wp--preset--color--creme, #FFF9EB);
}

.ak-kurs-kopf h1,
.ak-lektion-seite h1,
.ak-kursuebersicht h1 {
	font-family: var(--wp--preset--font-family--boska, serif);
	font-weight: 300;
	font-size: clamp(1.75rem, 3.4vw, 2.5rem);
	margin-bottom: 16px;
}

.ak-kurs-beschreibung {
	margin-bottom: 32px;
	line-height: 1.75;
}

/* ==========================================================
   Fortschrittsbalken
   ========================================================== */

.ak-fortschritt {
	margin-bottom: 32px;
}

.ak-fortschritt-leiste {
	width: 100%;
	height: 8px;
	border-radius: 999px;
	background-color: rgba(255, 249, 235, 0.12);
	overflow: hidden;
}

.ak-fortschritt-leiste--klein {
	height: 5px;
	margin-top: 10px;
}

.ak-fortschritt-fuellung {
	height: 100%;
	background-color: var(--wp--preset--color--knallrot, #CD002C);
	border-radius: 999px;
	transition: width 400ms ease;
}

.ak-fortschritt-text {
	margin-top: 8px;
	font-size: 13px;
	letter-spacing: 0.04em;
	color: var(--wp--preset--color--kaltgelb, #E9E6B5);
}

/* ==========================================================
   Lektionsliste
   ========================================================== */

.ak-lektionsliste {
	list-style: none;
	margin: 0 0 32px;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.ak-lektion-eintrag {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 12px 14px;
	border-radius: 10px;
	background-color: rgba(255, 249, 235, 0.04);
	transition: background-color 160ms ease;
}

.ak-lektion-eintrag:hover {
	background-color: rgba(255, 249, 235, 0.08);
}

.ak-lektion-eintrag--gesperrt {
	opacity: 0.5;
}

.ak-lektion-titel {
	color: inherit;
	text-decoration: none;
	flex: 1;
}

.ak-lektion-titel:hover {
	text-decoration: underline;
}

.ak-lektion-griff {
	cursor: grab;
	opacity: 0.4;
	user-select: none;
}

.ak-lektion-griff:active {
	cursor: grabbing;
}

.ak-lektion-eintrag.is-dragging {
	opacity: 0.5;
}

.ak-lektion-haken {
	width: 26px;
	height: 26px;
	border-radius: 50%;
	border: 1px solid rgba(255, 249, 235, 0.35);
	background: none;
	color: transparent;
	cursor: pointer;
	flex-shrink: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 14px;
	transition: background-color 160ms ease, color 160ms ease, border-color 160ms ease;
}

.ak-lektion-haken.is-erledigt {
	background-color: var(--wp--preset--color--knallrot, #CD002C);
	border-color: var(--wp--preset--color--knallrot, #CD002C);
	color: #FFF9EB;
}

.ak-lektion-schloss {
	opacity: 0.6;
}

/* ==========================================================
   Kaufbereich
   ========================================================== */

.ak-kauf-box {
	margin-top: 24px;
}

.ak-button {
	display: inline-block;
	padding: 14px 32px;
	border-radius: 999px;
	background-color: var(--wp--preset--color--knallrot, #CD002C);
	color: var(--wp--preset--color--creme, #FFF9EB);
	text-decoration: none;
	font-weight: 300;
	letter-spacing: 0.02em;
	border: none;
	cursor: pointer;
	transition: transform 200ms ease, background-color 200ms ease;
}

.ak-button:hover {
	transform: scale(1.04);
}

/* ==========================================================
   Lektionsseite
   ========================================================== */

.ak-lektion-zurueck a {
	color: var(--wp--preset--color--kaltgelb, #E9E6B5);
	font-size: 13px;
	text-decoration: none;
}

.ak-video-rahmen {
	position: relative;
	width: 100%;
	aspect-ratio: 16 / 9;
	margin: 24px 0;
	border-radius: 10px;
	overflow: hidden;
}

.ak-video-rahmen iframe {
	width: 100%;
	height: 100%;
	border: 0;
}

.ak-lektion-inhalt {
	line-height: 1.75;
	margin-bottom: 32px;
}

.ak-lektion-haken-gross {
	margin-bottom: 40px;
}

.ak-lektion-haken-gross.is-erledigt {
	background-color: transparent;
	border: 1px solid var(--wp--preset--color--knallrot, #CD002C);
}

.ak-lektion-navigation {
	display: flex;
	justify-content: space-between;
	gap: 16px;
	padding-top: 24px;
	border-top: 1px solid rgba(255, 249, 235, 0.12);
	font-size: 14px;
}

.ak-lektion-navigation a {
	color: inherit;
	text-decoration: none;
}

.ak-lektion-navigation a:hover {
	text-decoration: underline;
}

/* ==========================================================
   Kursübersicht
   ========================================================== */

/* Die Archivseite braucht mehr Platz als die schmalen Kurs-/
   Lektionsseiten, damit drei Kacheln pro Zeile gut aussehen. */
.ak-kursuebersicht--archiv {
	max-width: 1100px;
}

.ak-kurs-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 28px;
}

@media (max-width: 900px) {
	.ak-kurs-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 600px) {
	.ak-kurs-grid {
		grid-template-columns: 1fr;
	}
}

.ak-kurs-karte {
	display: flex;
	flex-direction: column;
	padding: 16px;
	border-radius: 14px;
	background-color: rgba(255, 249, 235, 0.04);
	color: inherit;
	text-decoration: none;
	transition: background-color 160ms ease, transform 160ms ease;
}

.ak-kurs-karte:hover {
	background-color: rgba(255, 249, 235, 0.08);
	transform: translateY(-2px);
}

.ak-kurs-karte__bild {
	display: block;
	width: 100%;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	border-radius: 8px;
	margin-bottom: 14px;
	background-color: rgba(255, 249, 235, 0.06);
}

.ak-kurs-karte h2 {
	font-family: var(--wp--preset--font-family--boska, serif);
	font-weight: 300;
	font-size: 1.2rem;
	margin: 0 0 8px;
}

.ak-kurs-preis {
	font-size: 15px;
	color: var(--wp--preset--color--creme, #FFF9EB);
	margin-bottom: 10px;
}

.ak-kurs-preis ins {
	text-decoration: none;
	color: var(--wp--preset--color--knallrot, #CD002C);
}

.ak-kurs-preis del {
	opacity: 0.5;
	margin-right: 6px;
}

.ak-kurs-status {
	font-size: 12px;
	color: var(--wp--preset--color--kaltgelb, #E9E6B5);
	margin-top: auto;
	padding-top: 6px;
}

.ak-kurs-status--gesperrt {
	opacity: 0.6;
}

@media (prefers-reduced-motion: reduce) {
	.ak-fortschritt-fuellung,
	.ak-lektion-haken,
	.ak-button {
		transition: none;
	}
}
