/**
 * Ficha del programa (at a glance).
 *
 * Colores de la captura: fondo #FAFAF7, tarjeta #fff con borde #E4E9EB,
 * separadores #EDEDED, título #183132; acento verde del Kit (#1FC170 → #21F185)
 * y menta #E3FCEF para la fila activa.
 */

.rvb-ficha.rvb-ficha {
	position: relative;
	isolation: isolate;
	box-sizing: border-box;
	width: 100%;
	max-width: none;
	margin: 0;
	padding: clamp(56px, 8vw, 120px) clamp(16px, 4vw, 40px) clamp(96px, 13vw, 190px);
	/* Sin overflow: anularía el sticky de la columna izquierda. */
	overflow: visible;
	background: var(--rvb-ficha-bg, #fafaf7);
	color: #282827;
	font-family: 'Segoe UI', system-ui, -apple-system, Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* ---------- Texto gigante de fondo ---------- */

.rvb-ficha .rvb-ficha__fondo {
	position: absolute;
	inset: 0;
	z-index: 0;
	overflow: hidden;
	pointer-events: none;
}

.rvb-ficha .rvb-ficha__marca {
	position: absolute;
	bottom: clamp(4px, 1.5vw, 24px);
	left: 0;
	font-family: 'Raleway', 'Segoe UI', sans-serif;
	font-size: clamp(5rem, 15vw, 14rem);
	font-weight: 800;
	line-height: 0.9;
	letter-spacing: -0.02em;
	white-space: nowrap;
	color: transparent;
	-webkit-text-stroke: 1.5px rgb(24 49 50 / 0.11);
	will-change: transform;
}

/* ---------- Distribución ---------- */

.rvb-ficha .rvb-ficha__grid {
	position: relative;
	z-index: 1;
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 2.3fr);
	gap: clamp(32px, 5vw, 72px);
	align-items: start;
	max-width: 1180px;
	margin: 0 auto;
}

/* La celda ocupa todo el alto de la fila para que lo de dentro pueda quedarse fijo. */
.rvb-ficha .rvb-ficha__lado {
	align-self: stretch;
}

.rvb-ficha .rvb-ficha__fijo {
	position: sticky;
	top: calc(var(--rvb-header, 0px) + clamp(24px, 4vw, 56px));
}

/* ---------- Columna izquierda ---------- */

.rvb-ficha .rvb-ficha__eyebrow {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0 0 clamp(12px, 1.6vw, 18px);
	padding: 0;
	font-family: 'Raleway', 'Segoe UI', sans-serif;
	font-size: clamp(1rem, 1.3vw, 1.0625rem);
	font-weight: 500;
	line-height: 1.4;
	color: #183132;
}

.rvb-ficha .rvb-ficha__punto {
	position: relative;
	flex: none;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: #1fc170;
}

.rvb-ficha .rvb-ficha__punto::after {
	content: '';
	position: absolute;
	inset: 0;
	border-radius: 50%;
	background: #1fc170;
	animation: rvb-ficha-latido 2.2s ease-out infinite;
}

@keyframes rvb-ficha-latido {
	0% { transform: scale(1); opacity: 0.55; }
	70%, 100% { transform: scale(2.8); opacity: 0; }
}

.rvb-ficha .rvb-ficha__title {
	margin: 0;
	padding: 0;
	font-family: 'Raleway', 'Segoe UI', sans-serif;
	font-size: clamp(2.25rem, 4.2vw, 3.25rem);
	font-weight: 800;
	font-style: normal;
	line-height: 1.05;
	letter-spacing: -0.01em;
	text-transform: none;
	color: #183132;
}

/* Cada palabra dentro de una máscara (el recorte deja espacio para los trazos bajos). */
.rvb-ficha .rvb-ficha__w {
	display: inline-block;
	overflow: hidden;
	padding-bottom: 0.1em;
	margin-bottom: -0.1em;
	vertical-align: top;
}

.rvb-ficha .rvb-ficha__wi {
	display: inline-block;
}

/* Contador */
.rvb-ficha .rvb-ficha__contador {
	display: grid;
	gap: 12px;
	margin-top: clamp(32px, 5vw, 64px);
}

.rvb-ficha .rvb-ficha__num {
	display: flex;
	align-items: baseline;
	gap: 10px;
	font-family: 'Raleway', 'Segoe UI', sans-serif;
}

.rvb-ficha .rvb-ficha__cifras {
	display: inline-block;
	height: 1em;
	overflow: hidden;
	font-size: clamp(2.5rem, 4.4vw, 3.5rem);
	font-weight: 800;
	line-height: 1;
	font-variant-numeric: lining-nums tabular-nums;
	color: #183132;
}

.rvb-ficha .rvb-ficha__rueda {
	display: block;
	transform: translateY(calc(var(--n, 0) * -1em));
	transition: transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.rvb-ficha .rvb-ficha__rueda > span {
	display: block;
	height: 1em;
}

.rvb-ficha .rvb-ficha__de {
	font-size: 1rem;
	font-weight: 600;
	color: #8a9793;
}

.rvb-ficha .rvb-ficha__activo {
	min-height: 1.3em;
	font-size: 12.5px;
	font-weight: 600;
	line-height: 1.3;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: #183132;
}

.rvb-ficha .rvb-ficha__activo.is-cambio {
	animation: rvb-ficha-cambio 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes rvb-ficha-cambio {
	from { opacity: 0; transform: translateY(8px); }
	to { opacity: 1; transform: none; }
}

.rvb-ficha .rvb-ficha__ticks {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
}

.rvb-ficha .rvb-ficha__tick {
	width: 18px;
	height: 3px;
	border-radius: 2px;
	background: #dfe5e2;
	transition: background-color 0.4s ease;
}

.rvb-ficha .rvb-ficha__tick.is-on {
	background: #183132;
}

.rvb-ficha .rvb-ficha__tick.is-actual {
	background: linear-gradient(90deg, #1fc170, #21f185);
}

/* ---------- Tarjeta con la ficha ---------- */

.rvb-ficha .rvb-ficha__card {
	--rvb-ficha-pad: clamp(20px, 3vw, 36px);
	position: relative;
	box-sizing: border-box;
	padding: 6px var(--rvb-ficha-pad);
	/* Recorta el barrido de la fila activa a las esquinas redondeadas. */
	overflow: hidden;
	border: 1px solid #e4e9eb;
	border-radius: 14px;
	background: #fff;
	box-shadow: 0 30px 80px -50px rgb(24 49 50 / 0.35);
}

/* Carril de progreso en el borde izquierdo */
.rvb-ficha .rvb-ficha__riel {
	position: absolute;
	top: 24px;
	bottom: 24px;
	left: 0;
	z-index: 1;
	width: 3px;
	border-radius: 3px;
	background: linear-gradient(#183132, #1fc170 70%, #21f185);
	transform: scaleY(var(--riel, 1));
	transform-origin: top;
}

.rvb-ficha .rvb-ficha__lista {
	margin: 0;
	padding: 0;
}

.rvb-ficha .rvb-ficha__fila {
	position: relative;
	z-index: 0;
	display: grid;
	grid-template-columns: minmax(110px, 150px) minmax(0, 1fr);
	gap: 8px clamp(16px, 2.4vw, 28px);
	padding: clamp(18px, 2vw, 24px) 0;
}

/* Separador que se dibuja con el scroll (--linea de 0 a 1) */
.rvb-ficha .rvb-ficha__fila::after {
	content: '';
	position: absolute;
	right: 0;
	bottom: 0;
	left: 0;
	height: 1px;
	background: #ededed;
	transform: scaleX(var(--linea, 1));
	transform-origin: left;
}

.rvb-ficha .rvb-ficha__fila:last-child::after {
	display: none;
}

/* Barrido menta de la fila activa: llega hasta los bordes de la tarjeta */
.rvb-ficha .rvb-ficha__fila::before {
	content: '';
	position: absolute;
	top: 0;
	right: calc(var(--rvb-ficha-pad) * -1);
	bottom: 0;
	left: calc(var(--rvb-ficha-pad) * -1 + 1px);
	z-index: -1;
	background: linear-gradient(90deg, #e3fcef 0%, rgb(227 252 239 / 0.6) 45%, rgb(227 252 239 / 0) 90%);
	opacity: 0;
	transform: scaleX(0.4);
	transform-origin: left;
	transition: opacity 0.5s ease, transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.rvb-ficha .rvb-ficha__fila.is-activa::before {
	opacity: 1;
	transform: none;
}

.rvb-ficha .rvb-ficha__label {
	position: relative;
	margin: 0;
	padding: 2px 0 0;
	font-size: 12.5px;
	font-weight: 600;
	line-height: 1.45;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: #000;
}

/* Guion verde de la fila activa */
.rvb-ficha .rvb-ficha__label::before {
	content: '';
	position: absolute;
	top: 0.72em;
	left: -16px;
	width: 10px;
	height: 2px;
	border-radius: 2px;
	background: #1fc170;
	transform: scaleX(0);
	transform-origin: left;
	transition: transform 0.4s ease;
}

.rvb-ficha .rvb-ficha__fila.is-activa .rvb-ficha__label::before {
	transform: none;
}

.rvb-ficha .rvb-ficha__valor {
	margin: 0;
	padding: 0;
	font-size: clamp(0.9375rem, 1.15vw, 1rem);
	line-height: 1.65;
	color: #282827;
	transition: color 0.4s ease;
}

.rvb-ficha .rvb-ficha__fila.is-activa .rvb-ficha__valor {
	color: #183132;
}

/* ---------- Tablet y móvil: una columna ---------- */

@media (max-width: 860px) {
	.rvb-ficha .rvb-ficha__grid {
		grid-template-columns: minmax(0, 1fr);
	}

	.rvb-ficha .rvb-ficha__fijo {
		position: static;
	}

	.rvb-ficha .rvb-ficha__contador {
		display: none;
	}
}

@media (max-width: 560px) {
	.rvb-ficha .rvb-ficha__fila {
		grid-template-columns: minmax(0, 1fr);
		gap: 6px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.rvb-ficha .rvb-ficha__punto::after {
		animation: none;
	}

	.rvb-ficha .rvb-ficha__rueda,
	.rvb-ficha .rvb-ficha__fila::before {
		transition: none;
	}
}

/* Editor: sin columna fija */
.editor-styles-wrapper .rvb-ficha .rvb-ficha__fijo {
	position: static;
}
