/* RT Hero Workflow 1.1.0 — Markenfarben Red Tiger IT:
   Weiß #ffffff (--awb-color1) · Hellgrau #f5f5f5 (--awb-color2) · Grau #d1d1d1 (--awb-color3)
   Rot #e20917 (--awb-color5) · Dunkelrot #a60711 (--awb-color6) · Schwarz #050505 (--awb-color8)

   Ablauf v2:
   - Ohne JavaScript und bei prefers-reduced-motion: alles statisch sichtbar.
   - .rthw-anim (JS): Intro läuft EINMAL — Karte erscheint (0.55s, Aufwärts-
     bewegung + Skalierung 0.92→1), der Folgepfeil wird von links nach rechts
     gezeichnet und flackert dabei kurz markenrot auf (Lichtimpuls), erst
     danach die nächste Karte. Danach bleibt alles dauerhaft sichtbar.
   - .rthw-loop (JS, nach kurzer Pause): nur noch ein dezenter Lichtimpuls
     wandert alle 7.5s durch Karten und Pfeile — kein Ausblenden mehr,
     kein harter Neustart.
   - Animiert werden nur opacity/transform/clip-path/box-shadow/border-color/
     color — keine Layout-Verschiebungen. */

.rthw {
	padding: clamp(32px, 4.5vw, 52px) 0 26px;
	color: var(--awb-color8, #050505);
}
.rthw-inner {
	max-width: 1400px;
	margin: 0 auto;
}
/* Die Prozesskette darf breiter laufen als die Standard-Inhaltsbreite:
   die Avada-Zeile des Hero-Containers wird gezielt aufgeweitet. */
.fusion-fullwidth:has(.rthw) .fusion-builder-row {
	max-width: 1400px !important;
}
.fusion-fullwidth:has(.rthw) {
	padding-left: 3% !important;
	padding-right: 3% !important;
}
/* Sehr dezenter, leicht warmer Verlauf statt Weiß-auf-Weiß — übersteuert den
   im Avada-Container hinterlegten Verlauf ohne Datenbankänderung. Die weißen
   Karten heben sich damit klar vom Hintergrund ab. */
.fusion-fullwidth:has(.rthw) {
	background-image: linear-gradient(180deg, #fbfaf8 0%, #f1efeb 100%) !important;
}
/* Folgebereich näher an den Hero heranführen (nur der Container direkt
   nach dem Hero-Container). */
.fusion-fullwidth:has(.rthw) + .fusion-fullwidth {
	padding-top: 44px !important;
}

/* ID-Selektor: Avadas globale h1-Typografie (--awb-typography1) würde eine
   reine Klassen-Regel überstimmen. */
h1#rthw-title,
.rthw-copy h1 {
	font-size: clamp(30px, 4.5vw, 46px);
	line-height: 1.12;
	margin: 0 0 16px;
	overflow-wrap: break-word;
}
.rthw-sub {
	font-size: clamp(16.5px, 1.9vw, 19.5px);
	line-height: 1.6;
	margin: 0 0 22px;
	max-width: 880px;
	color: #262626;
}
.rthw-cta {
	display: inline-block;
	background: var(--awb-color5, #e20917);
	color: #ffffff;
	font-weight: 700;
	font-size: 15.5px;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	padding: 15px 30px;
	border-radius: 4px;
	text-decoration: none;
	transition: background-color 0.2s ease;
}
.rthw-cta:hover,
.rthw-cta:focus {
	background: var(--awb-color6, #a60711);
	color: #ffffff;
}
.rthw-cta:focus-visible {
	outline: 3px solid rgba(226, 9, 23, 0.45);
	outline-offset: 3px;
}

/* ---- Prozesskette ---------------------------------------------------- */

.rthw-flow {
	list-style: none;
	display: flex;
	align-items: stretch;
	justify-content: center;
	gap: 0;
	margin: 26px 0 0;
	padding: 0;
}
.rthw-step {
	display: flex;
	align-items: stretch;
	flex: 1 1 0;
	min-width: 0;
}
/* Das letzte Listenelement trägt keinen Pfeil — mit vollem Flex-Anteil wären
   seine Karte breiter und die übrigen vier um die Pfeilbreite schmaler.
   Der reduzierte Anteil gleicht das aus (Kartenbreiten ~identisch). */
.rthw-step:last-child {
	flex-grow: 0.84;
}
/* Reihenfolge-Index für Animations-Verzögerungen (Pfeil erbt ihn vom li). */
.rthw-step-0 { --i: 0; }
.rthw-step-1 { --i: 1; }
.rthw-step-2 { --i: 2; }
.rthw-step-3 { --i: 3; }
.rthw-step-4 { --i: 4; }

.rthw-card {
	position: relative;
	overflow: hidden;
	flex: 1 1 auto;
	min-width: 0;
	display: flex;
	flex-direction: column;
	background: var(--awb-color1, #ffffff);
	border: 1px solid #d9d9d9;
	border-radius: 14px;
	box-shadow: 0 1px 2px rgba(5, 5, 5, 0.05), 0 10px 28px rgba(5, 5, 5, 0.10);
	padding: 14px 14px 16px;
}
/* Lichtimpuls-Schicht (Sheen) — nur im Loop in Bewegung. */
.rthw-card::after {
	content: "";
	position: absolute;
	inset: 0;
	pointer-events: none;
	background: linear-gradient(105deg, transparent 42%, rgba(226, 9, 23, 0.07) 50%, transparent 58%);
	transform: translateX(-130%);
}
.rthw-arrow {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #4f4f4f;
	padding: 0 4px;
}
.rthw-arrow svg {
	display: block;
	width: 36px;
	height: 25px;
}

/* Mini-Ansicht: angedeutetes Software-Fenster */
.rthw-mini {
	background: #fafafa;
	border: 1px solid #e4e4e4;
	border-radius: 9px;
	overflow: hidden;
	margin-bottom: 13px;
}
.rthw-mini-bar {
	display: flex;
	gap: 4px;
	padding: 7px 9px;
	background: var(--awb-color2, #f5f5f5);
	border-bottom: 1px solid #e4e4e4;
}
.rthw-mini-bar i {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: var(--awb-color3, #d1d1d1);
}
.rthw-mini-body {
	padding: 12px;
	display: flex;
	flex-direction: column;
	gap: 8px;
	min-height: 118px;
	color: #5f5f5f;
}
.rthw-row {
	display: flex;
	align-items: center;
	gap: 7px;
}
.rthw-avatar {
	width: 16px;
	height: 16px;
	border-radius: 50%;
	background: var(--awb-color3, #d1d1d1);
	flex: 0 0 auto;
}
.rthw-line {
	display: block;
	height: 7px;
	border-radius: 3.5px;
	background: #e4e4e4;
}
.rthw-line.dark { background: #c4c4c4; }
.w18 { width: 18%; }
.w30 { width: 30%; }
.w40 { width: 40%; }
.w45 { width: 45%; }
.w50 { width: 50%; }
.w52 { width: 52%; }
.w55 { width: 55%; flex: 1 1 auto; }
.w58 { width: 58%; }
.w60 { width: 60%; }
.w65 { width: 65%; }
.w70 { width: 70%; }
.w80 { width: 80%; }
.w85 { width: 85%; }
.rthw-chip {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	font-size: 10.5px;
	font-weight: 700;
	line-height: 1;
	padding: 5px 8px;
	border-radius: 999px;
	white-space: nowrap;
	flex: 0 0 auto;
	margin-left: auto;
}
.chip-red { background: rgba(226, 9, 23, 0.09); color: var(--awb-color6, #a60711); }
.chip-green { background: rgba(20, 105, 54, 0.11); color: #146936; }
.chip-gray { background: #ececec; color: #4e4e4e; }
.rthw-ico { flex: 0 0 auto; }
.rthw-doctitle {
	font-size: 11.5px;
	font-weight: 700;
	color: #2e2e2e;
	letter-spacing: 0.03em;
	text-transform: uppercase;
}
.rthw-mailrow {
	display: flex;
	align-items: center;
	gap: 7px;
	color: #7a7a7a;
}
.rthw-mailrow .rthw-line { flex: 1 1 auto; }
.rthw-sumrow,
.rthw-tablerow {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
}
.rthw-tablerow.total {
	border-top: 1px solid #dfdfdf;
	padding-top: 8px;
	margin-top: 2px;
}
.rthw-sum {
	display: block;
	width: 38px;
	height: 9px;
	border-radius: 3.5px;
	background: var(--awb-color8, #050505);
	opacity: 0.78;
}
.rthw-task {
	display: flex;
	align-items: center;
	gap: 8px;
}
.rthw-box {
	width: 15px;
	height: 15px;
	border-radius: 4px;
	border: 1.5px solid #c6c6c6;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	color: #ffffff;
}
.rthw-box.done {
	background: #146936;
	border-color: #146936;
}
.rthw-done {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 9px;
	padding: 5px 0 3px;
}
.rthw-donecheck {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: #146936;
	color: #ffffff;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}
.rthw-donecheck svg { width: 18px; height: 18px; }
.rthw-done ~ .rthw-line { align-self: center; }

.rthw-step-name {
	font-size: 17px;
	font-weight: 700;
	margin: 0 0 4px;
}
.rthw-step-desc {
	font-size: 13.5px;
	line-height: 1.45;
	color: #3f3f3f;
}

/* ---- Intro-Animation (einmalig, .rthw-anim) -------------------------- */

.rthw-anim .rthw-card {
	opacity: 0;
	transform: translateY(20px) scale(0.92);
	animation: rthwCardIn 0.55s cubic-bezier(0.22, 0.61, 0.36, 1) both;
	animation-delay: calc(var(--i) * 1.05s);
}
.rthw-anim .rthw-arrow {
	opacity: 0;
	clip-path: inset(-10px 100% -10px 0);
	animation: rthwArrowIn 0.42s ease-out both;
	animation-delay: calc(var(--i) * 1.05s + 0.6s);
}
.rthw-paused .rthw-card,
.rthw-paused .rthw-arrow,
.rthw-paused .rthw-card::after {
	animation-play-state: paused !important;
}
@keyframes rthwCardIn {
	from { opacity: 0; transform: translateY(20px) scale(0.92); }
	to { opacity: 1; transform: none; }
}
/* Pfeil wird gezeichnet und trägt dabei einen kurzen roten Lichtimpuls,
   der zur Ruhefarbe abklingt. */
@keyframes rthwArrowIn {
	0% { opacity: 0; clip-path: inset(-10px 100% -10px 0); color: #a60711; }
	60% { opacity: 1; clip-path: inset(-10px 0 -10px 0); color: #a60711; }
	100% { opacity: 1; clip-path: inset(-10px 0 -10px 0); color: #4f4f4f; }
}

/* ---- Dauerbetrieb (.rthw-loop): dezenter Lichtimpuls ----------------- */

.rthw-loop .rthw-card,
.rthw-loop .rthw-arrow {
	opacity: 1;
	transform: none;
	clip-path: none;
}
.rthw-loop .rthw-card {
	animation: rthwCardPulse 7.5s linear infinite;
	animation-delay: calc(var(--i) * 0.8s);
}
.rthw-loop .rthw-card::after {
	animation: rthwSheen 7.5s linear infinite;
	animation-delay: calc(var(--i) * 0.8s);
}
.rthw-loop .rthw-arrow {
	animation: rthwArrowPulse 7.5s linear infinite;
	animation-delay: calc(var(--i) * 0.8s + 0.4s);
}
@keyframes rthwCardPulse {
	0%, 13%, 100% {
		border-color: #d9d9d9;
		box-shadow: 0 1px 2px rgba(5, 5, 5, 0.05), 0 10px 28px rgba(5, 5, 5, 0.10);
	}
	4.5% {
		border-color: rgba(226, 9, 23, 0.45);
		box-shadow: 0 1px 2px rgba(5, 5, 5, 0.05), 0 12px 32px rgba(226, 9, 23, 0.13);
	}
}
@keyframes rthwSheen {
	0% { transform: translateX(-130%); }
	13%, 100% { transform: translateX(130%); }
}
@keyframes rthwArrowPulse {
	0%, 14%, 100% { color: #4f4f4f; }
	5% { color: #e20917; }
}

@media (prefers-reduced-motion: reduce) {
	.rthw-anim .rthw-card,
	.rthw-anim .rthw-arrow,
	.rthw-loop .rthw-card,
	.rthw-loop .rthw-card::after,
	.rthw-loop .rthw-arrow {
		animation: none !important;
		opacity: 1 !important;
		transform: none !important;
		clip-path: none !important;
	}
	.rthw-anim .rthw-card,
	.rthw-anim .rthw-arrow { opacity: 1 !important; }
}

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

/* Tablet quer: kompaktere Karten, Kette bleibt horizontal */
@media (max-width: 1099px) and (min-width: 861px) {
	.rthw-card { padding: 11px 10px 12px; }
	.rthw-mini-body { min-height: 92px; padding: 9px; gap: 6px; }
	.rthw-step-name { font-size: 14.5px; }
	.rthw-step-desc { font-size: 11.5px; }
	.rthw-chip { font-size: 9px; padding: 4px 6px; }
	.rthw-doctitle { font-size: 9.5px; }
	.rthw-arrow { padding: 0 2px; }
	.rthw-arrow svg { width: 24px; height: 17px; }
}

/* Mobil/schmal: vertikaler Ablauf, Pfeile zeigen nach unten,
   Karten nutzen fast die volle Breite */
@media (max-width: 860px) {
	.rthw-flow {
		flex-direction: column;
		align-items: center;
	}
	.rthw-step {
		flex-direction: column;
		align-items: center;
		width: 100%;
		max-width: 520px;
		flex: 0 0 auto;
	}
	.rthw-card { width: 100%; }
	.rthw-arrow {
		transform: rotate(90deg);
		padding: 8px 0;
	}
	/* Der gedrehte Pfeil zeigt nach unten; das Intro-Zeichnen läuft dadurch
	   automatisch von oben nach unten. */
}
@media (max-width: 600px) {
	.rthw-step { max-width: none; }
}
