/**
 * Gráfica de dona con tabla.
 *
 * Diseño de la captura de Revby. Títulos Raleway #183132, subtítulo #2A8657,
 * filas en #353534 con línea inferior de 1 px, barras con el color de su
 * porción sobre un carril #E6E6E6.
 */

.rvb-ind.rvb-ind {
	position: relative;
	box-sizing: border-box;
	width: 100%;
	max-width: none;
	margin: 0;
	padding: clamp(56px, 7vw, 100px) clamp(16px, 4vw, 40px);
	overflow: visible;
	background: var(--rvb-ind-bg, #fff);
	color: #353534;
	font-family: 'Segoe UI', system-ui, -apple-system, Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.rvb-ind .rvb-ind__wrap {
	max-width: 1180px;
	margin: 0 auto;
}

/* ---------- Encabezado ---------- */

.rvb-ind .rvb-ind__head {
	margin: 0 auto clamp(40px, 5vw, 72px);
	text-align: center;
}

.rvb-ind .rvb-ind__title {
	margin: 0;
	padding: 0;
	font-family: 'Raleway', 'Segoe UI', system-ui, sans-serif;
	font-size: clamp(2rem, 3.6vw, 3.1875rem);
	font-weight: 800;
	font-style: normal;
	line-height: 1.17;
	letter-spacing: -0.005em;
	text-transform: none;
	color: #183132;
}

.rvb-ind .rvb-ind__sub {
	margin: clamp(10px, 1.4vw, 16px) 0 0;
	padding: 0;
	font-family: 'Raleway', 'Segoe UI', system-ui, sans-serif;
	font-size: clamp(1.125rem, 1.8vw, 1.5rem);
	font-weight: 700;
	line-height: 1.3;
	color: #2a8657;
}

.rvb-ind .rvb-ind__intro {
	max-width: 44rem;
	margin: clamp(14px, 2vw, 22px) auto 0;
	padding: 0;
	font-size: clamp(0.9375rem, 1.3vw, 1.125rem);
	line-height: 1.6;
	color: #183132;
}

/* ---------- Cuerpo: dona a la izquierda, tabla a la derecha ---------- */

.rvb-ind .rvb-ind__cuerpo {
	display: grid;
	grid-template-columns: minmax(220px, 0.78fr) minmax(0, 2fr);
	gap: clamp(28px, 4.5vw, 56px);
	align-items: start;
}

.rvb-ind .rvb-ind__grafica {
	min-width: 0;
}

.rvb-ind .rvb-ind__rotulo {
	margin: 0 0 14px;
	padding: 0;
	font-family: 'Raleway', 'Segoe UI', system-ui, sans-serif;
	font-size: clamp(0.875rem, 1.2vw, 1rem);
	font-weight: 600;
	font-style: normal;
	line-height: 1.2;
	letter-spacing: 0.01em;
	text-transform: uppercase;
	color: #000;
}

.rvb-ind .rvb-ind__dona {
	position: relative;
	box-sizing: border-box;
	width: 100%;
	max-width: 340px;
	aspect-ratio: 1;
	padding: 4%;
	background: #fcfcfb;
}

.rvb-ind .rvb-ind__svg {
	display: block;
	width: 100%;
	height: 100%;
	overflow: visible;
}

.rvb-ind .rvb-ind__seg {
	transition: opacity 0.25s ease;
}

/* Una fila (o porción) resaltada: las demás se apagan */
.rvb-ind .rvb-ind__svg.is-dim .rvb-ind__seg:not(.is-on) {
	opacity: 0.3;
}

.rvb-ind .rvb-ind__centro {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 6px;
	pointer-events: none;
}

.rvb-ind .rvb-ind__total {
	font-family: 'Raleway', 'Segoe UI', system-ui, sans-serif;
	font-size: clamp(2.25rem, 4vw, 3.125rem);
	font-weight: 600;
	line-height: 1;
	font-variant-numeric: lining-nums tabular-nums;
	color: #031619;
}

.rvb-ind .rvb-ind__total-txt {
	max-width: 5.5em;
	text-align: center;
	font-family: 'Raleway', 'Segoe UI', system-ui, sans-serif;
	font-size: clamp(0.5rem, 0.75vw, 0.625rem);
	font-weight: 600;
	line-height: 1.5;
	letter-spacing: 0.22em;
	text-transform: uppercase;
	color: #48595d;
}

/* ---------- Tabla ---------- */

.rvb-ind .rvb-ind__lista {
	margin: 0;
	padding: 0;
	list-style: none;
	border-bottom: 1px solid #ececec;
}

.rvb-ind .rvb-ind__fila {
	display: grid;
	grid-template-columns: 14px minmax(0, 1fr) clamp(80px, 12vw, 120px) clamp(36px, 5vw, 56px) clamp(52px, 7vw, 72px);
	align-items: center;
	gap: 0 clamp(10px, 1.6vw, 18px);
	margin: 0;
	padding: clamp(12px, 1.5vw, 16px) 0;
	border-top: 1px solid #ececec;
	list-style: none;
	font-size: clamp(0.8125rem, 1.1vw, 0.9375rem);
	line-height: 1.3;
	color: #353534;
	transition: background-color 0.25s ease;
}

.rvb-ind .rvb-ind__fila:first-child {
	border-top: 0;
}

@media (hover: hover) {
	.rvb-ind .rvb-ind__fila:hover {
		background: #f7faf8;
	}
}

.rvb-ind .rvb-ind__punto {
	display: block;
	width: 11px;
	height: 11px;
	border-radius: 50%;
	background: var(--c, #155c53);
}

.rvb-ind .rvb-ind__barra {
	display: block;
	height: 5px;
	border-radius: 3px;
	background: #e6e6e6;
	overflow: hidden;
}

.rvb-ind .rvb-ind__relleno {
	display: block;
	width: calc(var(--w, 0.5) * 100%);
	height: 100%;
	border-radius: 3px;
	background: var(--c, #155c53);
	transform-origin: left center;
}

.rvb-ind .rvb-ind__cant,
.rvb-ind .rvb-ind__pct {
	text-align: right;
	font-variant-numeric: lining-nums tabular-nums;
}

/* Escritorio: la dona se queda fija mientras se recorre la tabla */
@media (min-width: 861px) {
	.rvb-ind .rvb-ind__grafica {
		position: sticky;
		top: calc(var(--rvb-header, 0px) + 24px);
	}
}

/* ---------- Móvil y tablet ---------- */

@media (max-width: 860px) {
	.rvb-ind .rvb-ind__cuerpo {
		grid-template-columns: 1fr;
	}

	.rvb-ind .rvb-ind__grafica {
		display: flex;
		flex-direction: column;
		align-items: center;
	}

	.rvb-ind .rvb-ind__dona {
		max-width: 300px;
	}
}

@media (max-width: 560px) {
	.rvb-ind .rvb-ind__fila {
		grid-template-columns: 14px minmax(0, 1fr) 36px 56px;
		grid-template-areas:
			'punto nombre cant pct'
			'. barra barra barra';
		row-gap: 8px;
	}

	.rvb-ind .rvb-ind__punto { grid-area: punto; }
	.rvb-ind .rvb-ind__nombre { grid-area: nombre; }
	.rvb-ind .rvb-ind__cant { grid-area: cant; }
	.rvb-ind .rvb-ind__pct { grid-area: pct; }
	.rvb-ind .rvb-ind__barra { grid-area: barra; }
}

@media (prefers-reduced-motion: reduce) {
	.rvb-ind .rvb-ind__seg,
	.rvb-ind .rvb-ind__fila {
		transition: none;
	}
}
