/**
 * Tests de bienestar — estilos.
 * Tokens copiados de `_build/parts.js` (C y F). Si allí cambia la paleta, aquí también.
 * Todo vive bajo `.is-tests` para no pisar nada de Breakdance.
 */

.is-tests {
	--t-bg: #F0EFEC;
	--t-soft: #E7E9E0;
	--t-sand: #E4DBD2;
	--t-sage: #979D88;
	--t-green: #5F6E4E;
	--t-deep: #3D4634;
	--t-text: #2C2621;
	--t-soft2: #5E5A50;
	--t-line: #D6D4CA;
	--t-lineCard: #D8D8CE;
	--t-clay: #BCA38F;
	--t-display: 'Cormorant Garamond', Georgia, serif;
	--t-body: 'Quicksand', system-ui, -apple-system, 'Segoe UI', sans-serif;
	--t-rad: 20px;

	width: 100%;
	max-width: 900px;
	margin: 0 auto;
	font-family: var(--t-body);
	color: var(--t-text);
	/* El cuestionario cambia de alto entre preguntas; sin esto la página pega saltos. */
	min-height: 460px;
	/* Al cambiar de pantalla el JS recoloca el scroll, y la barra fija de navegación tapa lo de
	   arriba del bloque. Se le deja su altura de margen. */
	scroll-margin-top: 96px;
}

.is-tests *,
.is-tests *::before,
.is-tests *::after {
	box-sizing: border-box;
}

/* Las pantallas que no tocan se ocultan con `hidden`, pero cada una trae su propio `display`
   y una declaración de display gana siempre al `display:none` del user-agent. Sin esto se ven
   las cuatro a la vez. */
.is-tests [hidden] {
	display: none !important;
}

/* ─────────────────────────────────────────────────────────────── tipografía */

.is-tests .is-tests__h {
	font-family: var(--t-display);
	font-weight: 400;
	font-size: 34px;
	line-height: 1.2;
	color: var(--t-deep);
	margin: 0;
}

.is-tests__sub {
	font-size: 17px;
	line-height: 1.65;
	color: var(--t-soft2);
	margin: 0;
}

/* ──────────────────────────────────────────────────── panel (aviso y resultado) */

.is-tests__panel {
	background: #FFFFFF;
	border: 1px solid var(--t-lineCard);
	border-radius: var(--t-rad);
	padding: 44px 48px;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 20px;
	text-align: center;
}

.is-tests__sello {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 56px;
	height: 56px;
	border-radius: 100px;
	background: var(--t-soft);
	color: var(--t-green);
}

.is-tests__sello svg {
	width: 24px;
	height: 24px;
}

.is-tests__lista {
	margin: 0;
	padding: 0;
	list-style: none;
	text-align: left;
	display: flex;
	flex-direction: column;
	gap: 14px;
	max-width: 620px;
}

.is-tests__lista li {
	position: relative;
	padding-left: 26px;
	font-size: 16px;
	line-height: 1.7;
	color: var(--t-soft2);
}

.is-tests__lista li::before {
	content: '';
	position: absolute;
	left: 0;
	top: 10px;
	width: 8px;
	height: 8px;
	border-radius: 100px;
	background: var(--t-sage);
}

.is-tests__lista strong {
	color: var(--t-text);
	font-weight: 600;
}

/* El párrafo de entrada del aviso, sobre la lista. */
.is-tests__intro {
	max-width: 620px;
}

/* La casilla: área de pulsación grande, que en móvil se falla mucho. */
.is-tests__check {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	max-width: 620px;
	padding: 16px 20px;
	border-radius: 14px;
	background: var(--t-soft);
	font-size: 16px;
	line-height: 1.55;
	color: var(--t-text);
	text-align: left;
	cursor: pointer;
}

.is-tests__check input {
	flex: 0 0 auto;
	width: 20px;
	height: 20px;
	margin: 2px 0 0;
	accent-color: var(--t-green);
	cursor: pointer;
}

/* ────────────────────────────────────────────────────────────────── botones */

.is-tests .is-tests__btn {
	font-family: var(--t-body);
	font-size: 17px;
	font-weight: 600;
	line-height: 1;
	color: var(--t-bg);
	background: var(--t-green);
	border: 1px solid var(--t-green);
	border-radius: 100px;
	padding: 18px 34px;
	cursor: pointer;
	transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease;
}

.is-tests .is-tests__btn:hover:not(:disabled) {
	transform: translateY(-2px);
	box-shadow: 0 10px 22px rgba(61, 70, 52, .18);
}

.is-tests .is-tests__btn:disabled {
	background: var(--t-sage);
	border-color: var(--t-sage);
	opacity: .55;
	cursor: not-allowed;
}

.is-tests .is-tests__btn--ghost {
	color: var(--t-green);
	background: transparent;
	border-color: var(--t-green);
}

.is-tests .is-tests__btn--ghost:hover {
	background: var(--t-soft);
}

/* Foco visible en todo lo pulsable: se navega con teclado más de lo que parece. */
.is-tests button:focus-visible,
.is-tests input:focus-visible,
.is-tests a:focus-visible {
	outline: 3px solid var(--t-green);
	outline-offset: 3px;
}

/* ──────────────────────────────────────────────────────────────── selector */

.is-tests__selector {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 12px;
	text-align: center;
}

.is-tests__selector .is-tests__sub {
	margin-bottom: 14px;
	max-width: 620px;
}

.is-tests__rejilla {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	align-items: stretch;
	gap: 20px;
	width: 100%;
}

.is-tests__tarjeta {
	/* Tres por fila: el 33% menos los dos huecos que le tocan a cada una. */
	flex: 0 1 calc(33.333% - 14px);
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	padding: 30px 22px 26px;
	background: #FFFFFF;
	border: 1px solid var(--t-lineCard);
	border-radius: var(--t-rad);
	text-align: center;
	cursor: pointer;
	font-family: var(--t-body);
	transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.is-tests__tarjeta:hover {
	transform: translateY(-4px);
	border-color: var(--t-sage);
	box-shadow: 0 14px 30px rgba(61, 70, 52, .12);
}

.is-tests__icono {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 52px;
	height: 52px;
	margin-bottom: 4px;
	border-radius: 100px;
	background: var(--t-soft);
	color: var(--t-green);
}

.is-tests__icono svg {
	width: 22px;
	height: 22px;
}

.is-tests__area {
	font-family: var(--t-display);
	font-size: 26px;
	line-height: 1.2;
	color: var(--t-deep);
}

.is-tests__gancho {
	font-size: 15px;
	line-height: 1.5;
	font-style: italic;
	color: var(--t-soft2);
}

.is-tests__claves {
	font-size: 14px;
	font-weight: 600;
	line-height: 1.4;
	color: var(--t-green);
}

.is-tests__meta {
	font-size: 14px;
	color: var(--t-sage);
}

/* ─────────────────────────────────────────────────────────── cuestionario */

.is-tests__quiz {
	background: #FFFFFF;
	border: 1px solid var(--t-lineCard);
	border-radius: var(--t-rad);
	padding: 34px 48px 40px;
}

.is-tests__barra {
	display: flex;
	align-items: center;
	gap: 16px;
	margin-bottom: 30px;
}

.is-tests__pista {
	flex: 1 1 auto;
	height: 6px;
	border-radius: 100px;
	background: var(--t-soft);
	overflow: hidden;
}

.is-tests__avance {
	display: block;
	height: 100%;
	border-radius: 100px;
	background: var(--t-green);
	transition: width .3s ease;
}

.is-tests__cuenta {
	flex: 0 0 auto;
	font-size: 14px;
	font-weight: 600;
	color: var(--t-sage);
	letter-spacing: .4px;
}

.is-tests__badge {
	display: inline-block;
	padding: 7px 16px;
	border-radius: 100px;
	background: var(--t-soft);
	font-size: 14px;
	font-weight: 600;
	letter-spacing: 1.6px;
	text-transform: uppercase;
	color: var(--t-green);
}

.is-tests__contexto {
	margin: 16px 0 6px;
	font-size: 16px;
	line-height: 1.6;
	color: var(--t-soft2);
}

.is-tests .is-tests__pregunta {
	font-family: var(--t-display);
	font-weight: 400;
	font-size: 32px;
	line-height: 1.25;
	color: var(--t-deep);
	margin: 0 0 26px;
}

.is-tests__opciones {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.is-tests__opcion {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
	width: 100%;
	padding: 17px 24px;
	background: var(--t-bg);
	border: 1px solid var(--t-line);
	border-radius: 14px;
	font-family: var(--t-body);
	font-size: 17px;
	color: var(--t-text);
	text-align: left;
	cursor: pointer;
	transition: background-color .16s ease, border-color .16s ease, transform .16s ease;
}

.is-tests__opcion:hover {
	background: var(--t-soft);
	border-color: var(--t-sage);
	transform: translateX(3px);
}

/* La marca del valor elegido: se ve al volver atrás. */
.is-tests__opcion[aria-pressed='true'] {
	background: var(--t-soft);
	border-color: var(--t-green);
	font-weight: 600;
}

.is-tests__opcion[aria-pressed='true']::after {
	content: '✓';
	color: var(--t-green);
	font-weight: 700;
}

.is-tests__pie {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	margin-top: 26px;
	padding-top: 20px;
	border-top: 1px solid var(--t-line);
}

.is-tests__atras {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	background: none;
	border: 0;
	padding: 6px 2px;
	font-family: var(--t-body);
	font-size: 15px;
	color: var(--t-soft2);
	cursor: pointer;
}

.is-tests__atras:hover {
	color: var(--t-green);
}

.is-tests__atras svg {
	width: 13px;
	height: 13px;
}

.is-tests__salir {
	background: none;
	border: 0;
	padding: 6px 2px;
	font-family: var(--t-body);
	font-size: 15px;
	color: var(--t-sage);
	text-decoration: underline;
	cursor: pointer;
}

.is-tests__salir:hover {
	color: var(--t-green);
}

/* ───────────────────────────────────────────────────────────────── resultado */

.is-tests__marcador {
	display: flex;
	align-items: baseline;
	gap: 4px;
	font-family: var(--t-display);
	color: var(--t-deep);
}

.is-tests__puntos {
	font-size: 66px;
	line-height: 1;
}

.is-tests__sobre {
	font-size: 26px;
	color: var(--t-sage);
}

.is-tests .is-tests__nivel {
	font-family: var(--t-display);
	font-size: 30px;
	line-height: 1.25;
	color: var(--t-green);
	margin: 0;
}

.is-tests__texto {
	max-width: 620px;
	font-size: 17px;
	line-height: 1.75;
	color: var(--t-soft2);
	margin: 0;
}

/* Escala visual de los tramos: dónde cae la puntuación dentro del total. */
.is-tests__tramos {
	width: 100%;
	max-width: 620px;
	display: flex;
	gap: 4px;
	margin: 4px 0 2px;
}

.is-tests__tramo {
	flex: 1 1 0;
	height: 8px;
	border-radius: 100px;
	background: var(--t-soft);
}

.is-tests__tramo--activo {
	background: var(--t-green);
}

.is-tests__nota {
	max-width: 620px;
	font-size: 15px;
	line-height: 1.6;
	color: var(--t-sage);
	margin: 0;
}

/* Aviso de crisis. Es lo único de toda la web que se sale de la paleta a propósito:
   tiene que leerse distinto de todo lo demás. */
.is-tests__crisis {
	width: 100%;
	max-width: 620px;
	display: flex;
	gap: 14px;
	padding: 20px 22px;
	border-radius: 14px;
	background: #F6EFE7;
	border: 1px solid var(--t-clay);
	text-align: left;
}

.is-tests__crisis svg {
	flex: 0 0 auto;
	width: 20px;
	height: 20px;
	margin-top: 3px;
	color: #A9683C;
}

.is-tests__crisis p {
	margin: 0;
	font-size: 16px;
	line-height: 1.65;
	color: var(--t-text);
}

.is-tests__crisis strong {
	font-weight: 700;
}

.is-tests .is-tests__crisis a {
	color: #8C5227;
	font-weight: 600;
}

.is-tests__acciones {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 14px;
	margin-top: 6px;
}

.is-tests .is-tests__acciones .is-tests__btn {
	text-decoration: none;
	display: inline-flex;
	align-items: center;
	gap: 10px;
}

.is-tests__acciones .is-tests__btn svg {
	width: 17px;
	height: 17px;
}

.is-tests .is-tests__wa {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-size: 16px;
	color: var(--t-soft2);
	text-decoration: underline;
}

.is-tests__wa svg {
	width: 15px;
	height: 15px;
	color: var(--t-green);
}

.is-tests__otro {
	background: none;
	border: 0;
	padding: 4px;
	font-family: var(--t-body);
	font-size: 15px;
	color: var(--t-sage);
	text-decoration: underline;
	cursor: pointer;
}

.is-tests__otro:hover {
	color: var(--t-green);
}

/* ────────────────────────────────────────────────────────────────── noscript */

.is-tests__noscript {
	background: #FFFFFF;
	border: 1px solid var(--t-lineCard);
	border-radius: var(--t-rad);
	padding: 32px 36px;
	font-size: 16px;
	line-height: 1.7;
	color: var(--t-soft2);
}

.is-tests .is-tests__noscript h4 {
	font-family: var(--t-display);
	font-weight: 400;
	font-size: 24px;
	color: var(--t-deep);
	margin: 26px 0 6px;
}

/* ───────────────────────────────────────────────────────────────── responsive */

@media (max-width: 1024px) {
	.is-tests__tarjeta {
		flex-basis: calc(50% - 10px);
	}
}

@media (max-width: 767px) {
	.is-tests {
		min-height: 420px;
	}

	.is-tests__panel,
	.is-tests__quiz {
		padding: 30px 22px 34px;
		border-radius: 16px;
	}

	.is-tests__h {
		font-size: 28px;
	}

	.is-tests__rejilla {
		gap: 14px;
	}

	/* En móvil la tarjeta se lee mejor en fila que apilada: ocupa la mitad de alto. */
	.is-tests__tarjeta {
		flex-basis: 100%;
		flex-direction: row;
		align-items: center;
		text-align: left;
		gap: 16px;
		padding: 18px 20px;
		flex-wrap: wrap;
	}

	.is-tests__icono {
		width: 44px;
		height: 44px;
		margin-bottom: 0;
	}

	.is-tests__area {
		font-size: 23px;
	}

	.is-tests__gancho,
	.is-tests__claves {
		flex: 1 1 100%;
	}

	.is-tests__meta {
		flex: 1 1 100%;
	}

	.is-tests__pregunta {
		font-size: 25px;
	}

	.is-tests__opcion {
		padding: 15px 18px;
		font-size: 16px;
	}

	.is-tests__puntos {
		font-size: 54px;
	}

	.is-tests__nivel {
		font-size: 25px;
	}

	.is-tests__acciones {
		flex-direction: column;
		width: 100%;
	}

	.is-tests__acciones .is-tests__btn {
		width: 100%;
		justify-content: center;
	}
}

/* Quien haya pedido menos movimiento en su sistema, que no lo tenga. */
@media (prefers-reduced-motion: reduce) {
	.is-tests * {
		transition: none !important;
		animation: none !important;
	}
}
