/* RZ Timeline - vertikale Jahresleiste nach Figma-Entwurf
   Maße aus dem Entwurf (1440er Frame): Rail links, Inhaltsspalte 807px rechts,
   Jahre als Textliste im 56px-Raster, Bild im Seitenverhältnis 3:2.
   Farben über CSS-Variablen überschreibbar.
*/
.rz-timeline {
	--rz-tl-accent: #E5007D;
	--rz-tl-deep: #670064;
	--rz-tl-muted: #9b8fa0;
	--rz-tl-text: #1a1a1a;
	--rz-tl-radius: 10px;

	--rz-tl-row: 56px;          /* Zeilenabstand der Jahresliste */
	--rz-tl-content: 807px;     /* Breite der Inhaltsspalte */
	--rz-tl-visible: 13;        /* sichtbare Jahre, bevor gescrollt wird */

	color: var(--rz-tl-text);
}

.rz-timeline__inner {
	display: grid;
	grid-template-columns: auto minmax(0, var(--rz-tl-content));
	justify-content: space-between;
	gap: 40px;
	align-items: start;
}

/* ------------------------------------------------- Rail (links) */

.rz-timeline__rail {
	display: flex;
	align-items: center;
	gap: 28px;
}

.rz-timeline__arrows {
	display: flex;
	flex-direction: column;
	gap: 8px;
	flex: 0 0 auto;
}

.rz-timeline__arrow {
	width: 24px;
	height: 24px;
	padding: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: none;
	border: 0;
	color: var(--rz-tl-deep);
	cursor: pointer;
	transition: color 0.2s ease, opacity 0.2s ease;
}

.rz-timeline__arrow svg {
	width: 100%;
	height: 100%;
}

.rz-timeline__arrow:hover:not(:disabled) {
	color: var(--rz-tl-accent);
}

.rz-timeline__arrow:disabled {
	opacity: 0.3;
	cursor: default;
}

.rz-timeline__track {
	display: flex;
	flex-direction: column;
	max-height: calc(var(--rz-tl-row) * var(--rz-tl-visible));
	overflow-y: auto;
	scroll-behavior: smooth;
	scrollbar-width: none;
	-ms-overflow-style: none;
}

.rz-timeline__track::-webkit-scrollbar {
	display: none;
}

.rz-timeline__year {
	flex: 0 0 auto;
	height: var(--rz-tl-row);
	min-width: 56px;
	display: flex;
	align-items: center;
	justify-content: flex-start;
	padding: 0;
	background: none;
	border: 0;
	cursor: pointer;
	font: inherit;
	font-size: 1.625rem;   /* ~26px, Entwurf: Textbreite ~53px bei "2009" */
	font-weight: 700;
	line-height: 1.2;
	color: var(--rz-tl-muted);
	transition: color 0.2s ease;
}

.rz-timeline__year:hover {
	color: var(--rz-tl-deep);
}

.rz-timeline__year.is-active {
	color: var(--rz-tl-accent);
}

.rz-timeline__year:focus-visible {
	outline: 2px solid var(--rz-tl-accent);
	outline-offset: 2px;
	border-radius: 4px;
}

/* -------------------------------------------- Inhalt (rechts) */

.rz-timeline__heading {
	margin: 0 0 35px;
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 0 12px;
	color: var(--rz-tl-deep);
}

.rz-timeline__span {
	color: var(--rz-tl-accent);
	white-space: nowrap;
}

.rz-timeline__panel {
	animation: rz-tl-in 0.35s ease both;
}

.rz-timeline__panel[hidden] {
	display: none;
}

@keyframes rz-tl-in {
	from { opacity: 0; transform: translateY(8px); }
	to   { opacity: 1; transform: none; }
}

/* Entwurf: Jahreszahl 114px hoch, Headline 42px, Abstand 16px */
.rz-timeline__panel-year {
	margin: 0 0 16px;
	font-size: clamp(3.5rem, 6.7vw, 6rem);
	font-weight: 700;
	line-height: 1;
	color: var(--rz-tl-accent);
}

.rz-timeline__title {
	margin: 0 0 40px;
	font-size: clamp(1.5rem, 2.2vw, 2rem);
	line-height: 1.3;
	color: var(--rz-tl-deep);
}

/* Entwurf: Bild 807 x 537.6 = 3:2 */
.rz-timeline__media {
	margin: 0 0 35px;
}

.rz-timeline__media img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 3 / 2;
	object-fit: cover;
	border-radius: var(--rz-tl-radius);
}

.rz-timeline__text > *:first-child { margin-top: 0; }
.rz-timeline__text > *:last-child  { margin-bottom: 0; }

/* ---------------------------------------------------- Responsive */

@media (max-width: 1024px) {
	.rz-timeline {
		--rz-tl-visible: 9;
	}
	.rz-timeline__inner {
		gap: 28px;
	}
}

@media (max-width: 767px) {
	.rz-timeline {
		--rz-tl-row: 44px;
		--rz-tl-visible: 7;
	}
	.rz-timeline__inner {
		grid-template-columns: auto minmax(0, 1fr);
		gap: 20px;
	}
	.rz-timeline__rail {
		gap: 14px;
	}
	.rz-timeline__year {
		font-size: 1.125rem;
		min-width: 44px;
	}
	.rz-timeline__heading {
		margin-bottom: 24px;
	}
	.rz-timeline__title {
		margin-bottom: 24px;
	}
	.rz-timeline__media {
		margin-bottom: 24px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.rz-timeline__panel { animation: none; }
	.rz-timeline__track { scroll-behavior: auto; }
	.rz-timeline__arrow,
	.rz-timeline__year { transition: none; }
}
