/**
 * MiRed Steps — tarjetas apiladas animadas por scroll.
 *
 * Modos:
 *  - Base (sin JS / reduced-motion / clase .mired-steps--static): columna estática.
 *  - .is-animated (la añade el JS): panel sticky + pila absoluta dirigida por scroll.
 */

.mired-steps,
.mired-steps *,
.mired-steps *::before,
.mired-steps *::after {
	box-sizing: border-box;
}

/* ─── Layout base (estático) ─────────────────────────────────────────────── */

.mired-steps__panel {
	padding: 8px 0;
}

.mired-steps__stage {
	list-style: none;
	margin: 0 auto;
	padding: 0;
	width: 100%;
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.mired-steps__item {
	margin: 0;
	padding: 0;
}

.mired-steps__card {
	display: flex;
	width: 100%;
	overflow: hidden;
	border-radius: 30px;
	min-height: 190px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
	transition: box-shadow 0.35s ease;
}

.mired-steps__badge {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	width: 210px;
	min-width: 210px;
	background-color: #999;
}

.mired-steps__badge span {
	font-weight: 700;
	font-size: 34px;
	color: #fff;
	text-align: center;
	line-height: 1.15;
}

.mired-steps__content {
	background-color: #f4f4f4;
	flex: 1;
	display: flex;
	flex-direction: column;
	justify-content: center;
	padding: 32px 36px;
}

.mired-steps__title {
	font-weight: 700;
	font-size: 21px;
	color: #161616;
	line-height: 1.3;
	margin: 0 0 8px;
}

.mired-steps__desc {
	font-weight: 500;
	font-size: 15px;
	color: #555;
	line-height: 1.6;
	margin: 0;
}

/* El hint sólo tiene sentido en modo animado. */
.mired-steps__hint {
	display: none;
}

/* ─── Modo animado (scroll-driven) ───────────────────────────────────────── */

/* Panel compacto en flujo normal: el contenido alrededor permanece visible;
   el avance de tarjetas se controla con scroll-lock (wheel/touch) en JS. */
.mired-steps.is-animated .mired-steps__panel {
	overflow: hidden;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
}

.mired-steps.is-animated .mired-steps__stage {
	position: relative;
	display: block;
	margin: 0;
	width: 100%;
	/* Entrada inicial: oculto hasta que IntersectionObserver añade .is-revealed. */
	opacity: 0;
	transform: translateY(28px);
	transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.mired-steps.is-animated.is-revealed .mired-steps__stage {
	opacity: 1;
	transform: none;
}

.mired-steps.is-animated .mired-steps__item {
	position: absolute;
	left: 0;
	right: 0;
	top: 50%;
	display: flex;
	justify-content: center;
	will-change: transform, opacity, filter;
}

.mired-steps__item.is-hero .mired-steps__card {
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

.mired-steps.is-animated .mired-steps__hint {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 4px;
	margin-top: 6px;
	pointer-events: none;
	color: #bbb;
}

.mired-steps__hint span {
	font-size: 13px;
	font-weight: 500;
}

/* ─── Mobile ─────────────────────────────────────────────────────────────── */

/* En móvil la tarjeta pasa a columna: badge como franja superior y
   tipografías más grandes para que la card luzca protagonista. */
@media (max-width: 640px) {
	.mired-steps__card {
		flex-direction: column;
		border-radius: 22px;
		min-height: 0;
	}

	.mired-steps__badge {
		width: 100%;
		min-width: 0;
		padding: 13px 18px;
	}

	.mired-steps__badge span {
		font-size: 18px;
	}

	.mired-steps__content {
		padding: 20px 20px 24px;
	}

	.mired-steps__title {
		font-size: 19px;
		margin-bottom: 10px;
	}

	.mired-steps__desc {
		font-size: 14.5px;
		line-height: 1.55;
	}

	.mired-steps__hint span {
		font-size: 12px;
	}
}

/* ─── Movimiento reducido / modo estático forzado ────────────────────────── */

@media (prefers-reduced-motion: reduce) {
	.mired-steps.is-animated .mired-steps__panel {
		height: auto;
		overflow: visible;
		display: block;
	}

	.mired-steps.is-animated .mired-steps__stage {
		position: static;
		display: flex;
		flex-direction: column;
		gap: 20px;
		margin: 0 auto;
		opacity: 1;
		transform: none;
		transition: none;
	}

	.mired-steps.is-animated .mired-steps__item {
		position: static;
		display: block;
		transform: none !important;
		filter: none !important;
		opacity: 1 !important;
		will-change: auto;
	}

	.mired-steps.is-animated .mired-steps__hint {
		display: none;
	}
}
