/* Zeitstrahl – Theme-agnostisch. Farben/Abstände über Custom Properties
   im Theme überschreibbar, z. B.:
   .zs-timeline { --zs-akzent: #132579; } */

.zs-timeline {
	--zs-akzent: #132579;
	--zs-linie: color-mix(in srgb, #132579 25%, transparent);
	--zs-karte-bg: color-mix(in srgb, #132579 5%, transparent);
	--zs-abstand: 3rem;
	--zs-marker: 0.875rem;

	list-style: none;
	margin: 0 auto;
	padding: 0;
	position: relative;
	width: 90%;
	max-width: none;
}

/* Auf schmaleren Containern volle Breite nutzen */
@media (max-width: 1024px) {
	.zs-timeline {
		width: 100%;
	}
}

/* Mittellinie */
.zs-timeline::before {
	content: "";
	position: absolute;
	top: 0;
	bottom: 0;
	left: 50%;
	width: 1px;
	transform: translateX(-50%);
	background: var(--zs-linie);
	
}

.zs-item {
	position: relative;
	width: 50%;
	padding: 0 var(--zs-abstand) var(--zs-abstand) 0;
	box-sizing: border-box;
}

.zs-item:nth-child(even) {
	margin-left: 50%;
	padding: 0 0 var(--zs-abstand) var(--zs-abstand);
}

.zs-item:last-child {
	padding-bottom: 0;
}

/* Punkt-Marker auf der Linie */
.zs-marker {
	position: absolute;
	top: 0.4rem;
	width: var(--zs-marker);
	height: var(--zs-marker);
	border-radius: 50%;
	background: var(--zs-akzent);
	box-shadow: 0 0 0 4px color-mix(in srgb, var(--zs-akzent) 20%, transparent);
}

.zs-item:nth-child(odd) .zs-marker {
	right: calc(var(--zs-marker) / -2);
}

.zs-item:nth-child(even) .zs-marker {
	left: calc(var(--zs-marker) / -2);
}

.zs-card {
	background: var(--zs-karte-bg);
	border-radius: 0.5rem;
	padding: 1.25rem 1.5rem;
}

.zs-item:nth-child(odd) .zs-card {
	text-align: left;
}

/* Jahreszahl neben dem Marker, auf der gegenüberliegenden Seite der Linie */
.zs-date {
	position: absolute;
	top: 0.25rem;
	font-size: 1em;
	font-weight: 700;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	color: var(--zs-akzent);
	white-space: nowrap;
}

.zs-item:nth-child(odd) .zs-date {
	left: calc(100% + var(--zs-marker) + 0.75rem);
}

.zs-item:nth-child(even) .zs-date {
	right: calc(100% + var(--zs-marker) + 0.75rem);
}

.zs-title {
	margin: 0 0 0.75rem;
	font-size: 1.5em;
	line-height: 1.3;
}

.zs-figure {
	margin: 0 0 0.75rem;
}

.zs-image {
	width: 100%;
	height: auto;
	border-radius: 0.375rem;
	display: block;
}

.zs-text > :last-child {
	margin-bottom: 0;
}

/* Einblend-Animation (JS setzt .zs-visible) */
@media (prefers-reduced-motion: no-preference) {
	.zs-item {
		opacity: 0;
		transform: translateY(2rem);
		transition: opacity 0.7s ease-out, transform 0.7s ease-out;
	}

	.zs-item.zs-visible {
		opacity: 1;
		transform: none;
	}
}

/* Mobil: einspaltig, Linie links */
@media (max-width: 700px) {
	.zs-timeline::before {
		left: 0.5rem;
		transform: none;
	}

	.zs-item,
	.zs-item:nth-child(even) {
		width: 100%;
		margin-left: 0;
		padding: 0 0 var(--zs-abstand) 2.25rem;
	}

	.zs-item:last-child {
		padding-bottom: 0;
	}

	.zs-item:nth-child(odd) .zs-marker,
	.zs-item:nth-child(even) .zs-marker {
		left: calc(0.5rem - var(--zs-marker) / 2);
		right: auto;
	}

	.zs-item:nth-child(odd) .zs-card {
		text-align: left;
	}

	/* Jahreszahl rechts neben dem Marker, Karte rückt darunter */
	.zs-item:nth-child(odd) .zs-date,
	.zs-item:nth-child(even) .zs-date {
		position: static;
		display: block;
		margin-bottom: 0.375rem;
	}
}
