/* Rhenus Historie — vertikales Scrollytelling. Scoped auf .rh-hist, Vanilla, keine Libs. */

.rh-hist {
	--rh-hist-accent: #ffcc01;
	--rh-hist-ink: #1a1a1a;
	--rh-hist-muted: #5f5f63;
	--rh-hist-line: rgba(0, 0, 0, 0.1);
	position: relative;
	max-width: 1280px;
	margin: 0;
	padding: 8px 0;
	font-family: inherit;
}
.rh-hist * { box-sizing: border-box; }

/* Linke Achse + Fuell-Fortschritt — verankert unter der Ueberschrift */
.rh-hist__axis {
	position: absolute;
	top: 0;
	bottom: 0;
	left: 7px;
	width: 2px;
	transform: none;
	background: var(--rh-hist-line);
	overflow: hidden;
}
.rh-hist__fill {
	position: absolute;
	left: 0;
	top: 0;
	width: 100%;
	height: 0;
	background: var(--rh-hist-accent);
	transition: height 0.15s linear;
}

.rh-hist__items { position: relative; }

/* Eintrag — Reveal beim Scrollen, einspaltig rechts neben der Achse */
.rh-hist__item {
	position: relative;
	width: 100%;
	max-width: 1200px;
	padding: 0 0 56px 46px;
	opacity: 0;
	transform: translateY(22px) scale(0.98);
	transition: opacity 0.5s ease, transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.rh-hist__item.is-in { opacity: 0.55; transform: none; }
.rh-hist__item.is-active { opacity: 1; }
.rh-hist__item:last-child { padding-bottom: 0; }

/* Marker auf der Achse */
.rh-hist__dot {
	position: absolute;
	top: 7px;
	left: 1px;
	width: 14px;
	height: 14px;
	border-radius: 50%;
	background: #fff;
	border: 3px solid #c9c9c9;
	z-index: 1;
	transition: transform 0.3s ease, background-color 0.3s ease, border-color 0.3s ease;
}
/* erledigt/durchgelaufen: gelb gefuellt */
.rh-hist__item.is-done .rh-hist__dot { background: var(--rh-hist-accent); border-color: var(--rh-hist-accent); }
/* aktiv: gelber Ring, ungefuellt */
.rh-hist__item.is-active .rh-hist__dot { background: #fff; border-color: var(--rh-hist-accent); transform: scale(1.2); }
/* bevorstehend: grauer Ring */
.rh-hist__item.is-upcoming .rh-hist__dot { background: #fff; border-color: #c9c9c9; }

/* Karte */
.rh-hist__card {
	position: relative;
	display: flex;
	align-items: stretch;
	min-height: 200px;
	background: #fff;
	border: 1px solid rgba(0, 0, 0, 0.08);
	border-radius: 16px;
	overflow: hidden;
	box-shadow: 0 12px 32px -20px rgba(0, 0, 0, 0.22);
	transition: transform 0.35s ease, box-shadow 0.35s ease;
}

/* Bild links: feste Breite 320, fuellt die GANZE Kartenhoehe per cover — battle-proof gegen Theme-img-Regeln */
.rh-hist__media {
	position: relative;
	flex: 0 0 320px;
	width: 320px;
	align-self: stretch;
	overflow: hidden;
	background: rgba(0, 0, 0, 0.04);
}
.rh-hist__media img { display: block !important; width: 100% !important; height: 100% !important; max-width: none !important; object-fit: cover !important; transition: transform 0.5s ease; }
/* Platzhalter ohne Bild — gleiche Box wie eine Bildkarte */
.rh-hist__media--empty {
	background: linear-gradient(135deg, #3a3a3a, #1c1c1c);
}

/* Lese-Verlauf, damit das Jahr auf hellen wie dunklen Motiven sitzt */
.rh-hist__scrim {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 62%;
	background: linear-gradient(to top, rgba(0, 0, 0, 0.62), rgba(0, 0, 0, 0.16) 45%, rgba(0, 0, 0, 0));
	pointer-events: none;
}

/* Jahr + gelbe Keyline */
.rh-hist__year {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	font-size: 25px;
	font-weight: 700;
	line-height: 1;
	letter-spacing: -0.4px;
	color: var(--rh-hist-ink);
	margin: 0 0 12px;
}
.rh-hist__bar {
	width: 30px;
	height: 4px;
	border-radius: 2px;
	background: var(--rh-hist-accent);
	margin: 0 0 9px;
}

/* Jahr ueber dem Bild (Editorial-Scrim) */
.rh-hist__media .rh-hist__year {
	position: absolute;
	left: 18px;
	bottom: 14px;
	margin: 0;
	color: #fff;
	text-shadow: 0 1px 14px rgba(0, 0, 0, 0.45);
}
/* Textspalte rechts */
.rh-hist__body {
	flex: 1 1 auto;
	min-width: 0;
	display: flex;
	flex-direction: column;
	justify-content: center;
	padding: 18px 24px 18px 34px;
}
.rh-hist__text { font-size: 15px; line-height: 1.6; color: var(--rh-hist-muted); }
.rh-hist__text p { margin: 0 0 10px; }
.rh-hist__text p:last-child { margin: 0; }

/* Mobile: Karte stapelt vertikal — Bild oben (volle Breite), Text darunter */
@media (max-width: 768px) {
	.rh-hist__item { padding: 0 0 44px 40px; }
	.rh-hist__item:last-child { padding-bottom: 0; }
	.rh-hist__card { flex-direction: column; }
	.rh-hist__media { flex: 0 0 auto; width: 100%; height: 190px; align-self: stretch; }
	.rh-hist__media--empty { width: 100%; height: 190px; }
	.rh-hist__body { padding: 16px 18px; }
	.rh-hist__year { font-size: 21px; }
}

/* Aktive Karte = Lift + Schatten + Bildzoom — nur Desktop (mobil bleibt nur die Opacity) */
@media (min-width: 769px) {
	.rh-hist__item.is-active .rh-hist__card { transform: translateY(-3px); box-shadow: 0 22px 44px -24px rgba(0, 0, 0, 0.34); }
	.rh-hist__item.is-active .rh-hist__media img { transform: scale(1.05); }
}
@media (hover: hover) {
	.rh-hist__item:hover .rh-hist__card { transform: translateY(-3px); box-shadow: 0 22px 44px -24px rgba(0, 0, 0, 0.34); }
	.rh-hist__item:hover .rh-hist__media img { transform: scale(1.05); }
}

@media (prefers-reduced-motion: reduce) {
	.rh-hist__item { opacity: 1; transform: none; transition: none; }
	.rh-hist__dot { transition: none; }
	.rh-hist__fill { transition: none; }
	.rh-hist__card, .rh-hist__media img { transition: none; }
}

/* Elementor-Editor: Reveal-Animation aus, alles sofort sichtbar (kein Scroll-Trigger im Canvas) */
.elementor-editor-active .rh-hist__item {
	opacity: 1 !important;
	transform: none !important;
}
.elementor-editor-active .rh-hist__fill {
	height: 100% !important;
}
