/*
 * 5.8 So läuft's: vier Schritte, immer genau einer offen.
 * Ziffern zählt CSS aus der Reihenfolge auf der Seite.
 */

.hk-ablauf {
	padding: 56px 16px 64px;
}

.hk-ablauf-raster > :is(h1, h2) {
	margin-bottom: 28px;
	font-size: 32px;
	line-height: 1.18;
}

.hk-schritte {
	counter-reset: hk-schritt;
	padding-left: 60px;
}

.hk-schritt {
	position: relative;
	padding-bottom: 16px;
	counter-increment: hk-schritt;
}

/* Kreis mit Ziffer: 40 px, Rand 2 px, Ziffer optisch mittig (0,14em tiefer). */
.hk-schritt::before {
	content: counter(hk-schritt);
	position: absolute;
	top: 2px;
	left: -60px;
	display: flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	width: 40px;
	height: 40px;
	padding-top: 0.28em;
	border: 2px solid var(--wp--preset--color--border);
	border-radius: 50%;
	background-color: var(--wp--preset--color--paper);
	color: var(--wp--preset--color--ink);
	font-family: var(--wp--preset--font-family--tan-nimbus);
	font-size: 20px;
	line-height: 1;
}

/* Linie unter dem Kreis bis zum Schrittende. */
.hk-schritt::after {
	content: "";
	position: absolute;
	top: 40px;
	bottom: 0;
	left: -41px;
	width: 3px;
	background-color: var(--wp--preset--color--hairline);
	transition: background-color var(--wp--custom--dauer--linie) ease-out;
}

.hk-js .hk-schritt:is(.is-vor, .is-offen)::before {
	border-color: var(--wp--preset--color--cobalt);
	background-color: var(--wp--preset--color--cobalt);
	color: var(--wp--preset--color--white);
}

.hk-js .hk-schritt.is-vor::after {
	background-color: var(--wp--preset--color--cobalt);
}

/* Titelzeile: mit JavaScript ein Button über die volle Breite. */
.hk-schritt > :is(h3, h4, h5, h6) {
	margin: 0;
	color: var(--wp--preset--color--cobalt);
	font-family: var(--wp--preset--font-family--inter);
	font-size: 20px;
	font-weight: 700;
	line-height: 1.25;
}

.hk-schritt-knopf {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	min-height: 44px;
}

.hk-js .hk-schritt-knopf {
	cursor: pointer;
}

/* Plus und Minus rechts (nur Deko): offen „−“ auf ink, zu „+“ auf cobalt. */
.hk-js .hk-schritt-knopf::after {
	content: "+" / "";
	display: grid;
	flex: none;
	place-items: center;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	background-color: var(--wp--preset--color--cobalt);
	color: var(--wp--preset--color--white);
	font-size: 16px;
	font-weight: 900;
	line-height: 1;
}

.hk-js .hk-schritt.is-offen .hk-schritt-knopf::after {
	content: "−" / "";
	background-color: var(--wp--preset--color--ink);
}

.hk-schritt > p {
	margin: 4px 0 8px;
	font-size: 17px;
	line-height: 1.6;
}

/* Ohne JavaScript bleiben alle Texte sichtbar. */
.hk-js .hk-schritt:not(.is-offen) > p {
	display: none;
}

@media (min-width: 700px) {
	.hk-ablauf {
		padding: 96px max(24px, calc((100% - 1152px) / 2));
	}

	.hk-ablauf-raster > :is(h1, h2) {
		font-size: 48px;
	}

	.hk-schritte {
		padding-left: 64px;
	}

	.hk-schritt {
		padding-bottom: 20px;
	}

	.hk-schritt::before {
		left: -64px;
		width: 44px;
		height: 44px;
		font-size: 22px;
	}

	.hk-schritt::after {
		top: 44px;
		left: -43px;
	}

	.hk-schritt > :is(h3, h4, h5, h6) {
		font-size: 22px;
	}

	.hk-schritt-knopf {
		min-height: 48px;
	}

	.hk-js .hk-schritt-knopf::after {
		width: 30px;
		height: 30px;
		font-size: 17px;
	}

	.hk-schritt > p {
		font-size: 18px;
	}
}

/* Zweispaltig erst ab 861 px: links Überschrift, rechts Schritte. */
@media (min-width: 861px) {
	.hk-ablauf-raster {
		display: grid;
		grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
		gap: 64px;
		align-items: start;
	}

	.hk-ablauf-raster > :is(h1, h2) {
		margin-bottom: 0;
	}
}
