/* ==========================================================================
   Calcula tu Indemnización — estilos base
   Colores y medidas sacados del Figma (WEB CTI).
   ========================================================================== */

@font-face {
	font-family: "Montserrat";
	src: url("../fonts/montserrat-var.woff2") format("woff2");
	font-weight: 100 900;
	font-style: normal;
	font-display: swap;
}

:root {
	/* Color */
	--azul: #2899bf;          /* primario: botones claros, selección */
	--azul-oscuro: #054b63;   /* titulares de la calculadora, botón principal */
	--azul-claro: #dff3f9;    /* opción seleccionada */
	--cielo: #8bc7de;         /* fondo del hero mientras carga la foto */
	--fondo-suave: #edf4f5;
	--blanco: #fcfcfc;
	--borde: #dde5e8;
	--gris: #e7e7e7;
	--verde: #00b67a;        /* botón final de la calculadora */
	--texto: #054b63;

	/* Tipografía */
	--fuente: "Montserrat", system-ui, -apple-system, "Segoe UI", sans-serif;

	/* Medidas */
	--ancho: 1316px;
	--margen: clamp(20px, 4.3vw, 62px);
	--radio: 10px;
	--radio-tarjeta: 20px;
	--alto-cabecera: 92px;
}

/* Reset mínimo */
*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
	margin: 0;
	font-family: var(--fuente);
	font-size: 16px;
	line-height: 1.5;
	color: var(--texto);
	background: var(--blanco);
	-webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
button { font: inherit; color: inherit; }

:focus-visible { outline: 2px solid var(--azul); outline-offset: 3px; }

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

.screen-reader-text {
	position: absolute !important;
	width: 1px; height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	white-space: nowrap;
}

.saltar {
	position: absolute;
	left: 12px; top: -60px;
	z-index: 100;
	padding: 10px 16px;
	background: var(--azul-oscuro);
	color: var(--blanco);
	border-radius: var(--radio);
}
.saltar:focus { top: 12px; }

.contenedor {
	width: 100%;
	max-width: calc(var(--ancho) + var(--margen) * 2);
	margin-inline: auto;
	padding-inline: var(--margen);
}

/* Botones */
.boton {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 12px;
	padding: 12px 18px;
	border: 0;
	border-radius: 999px;
	font-size: 13px;
	font-weight: 600;
	line-height: 19.5px;
	text-decoration: none;
	cursor: pointer;
	transition: background-color .2s, color .2s;
}
.boton--claro { background: var(--blanco); color: var(--azul); }
.boton--claro:hover { background: var(--azul-claro); }

.boton--principal {
	width: 100%;
	min-height: 56px;
	border-radius: 64px;
	background: var(--azul-oscuro);
	color: var(--blanco);
	font-size: 16px;
	font-weight: 700;
	line-height: 24px;
	letter-spacing: .06em;
	text-transform: uppercase;
}
.boton--principal:hover { background: #043a4d; }
.boton--exito { background: var(--verde); }
.boton--exito:hover { background: #009a67; }

/* ==========================================================================
   Cabecera
   ========================================================================== */

.cabecera {
	position: relative;
	z-index: 20;
	background: var(--azul-oscuro);
	color: var(--blanco);
}
.cabecera--sobre-hero {
	position: absolute;
	inset: 0 0 auto;
	background: transparent;
}
.admin-bar .cabecera--sobre-hero { top: 32px; }

.cabecera__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	max-width: calc(var(--ancho) + var(--margen) * 2);
	height: var(--alto-cabecera);
	margin-inline: auto;
	padding-inline: var(--margen);
}

.cabecera__logo { display: block; text-decoration: none; flex-shrink: 0; }
.cabecera__logo img { width: 231px; height: auto; }
.cabecera__logo-texto { font-size: 17px; font-weight: 500; }
.cabecera__logo-texto strong { font-weight: 700; }

.nav {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex: 1;
	gap: 24px;
}
.nav__lista {
	display: flex;
	gap: 27px;
	margin-inline: auto;
}
.nav__lista a {
	position: relative;
	font-size: 13px;
	font-weight: 500;
	line-height: 19.5px;
	text-decoration: none;
}
/* Subrayado que crece al pasar el ratón, como en el Figma (línea de 1px a 26px) */
.nav__lista a::after {
	content: "";
	position: absolute;
	left: 0; top: 26.5px;
	width: 0; height: 1px;
	background: currentColor;
	transition: width .25s;
}
.nav__lista a:hover::after,
.nav__lista .current-menu-item a::after { width: 100%; }

.cabecera__acciones { display: flex; align-items: center; gap: 18px; }

.cabecera__telefono {
	display: flex;
	align-items: center;
	gap: 9px;
	text-decoration: none;
}
.cabecera__telefono span { display: flex; flex-direction: column; }
.cabecera__telefono small { font-size: 9px; font-weight: 500; line-height: 13.5px; opacity: .82; }
.cabecera__telefono strong { font-size: 13px; font-weight: 700; line-height: 19.5px; }

.cabecera__toggle { display: none; }

/* Menú móvil */
@media (max-width: 1023px) {
	:root { --alto-cabecera: 64px; }

	.cabecera__toggle {
		display: grid;
		place-items: center;
		width: 44px; height: 44px;
		margin-right: -10px;
		background: none;
		border: 0;
		cursor: pointer;
	}
	.cabecera__toggle-barra,
	.cabecera__toggle-barra::before,
	.cabecera__toggle-barra::after {
		display: block;
		width: 22px; height: 2px;
		background: currentColor;
		border-radius: 2px;
		transition: transform .2s, opacity .2s;
	}
	.cabecera__toggle-barra { position: relative; }
	.cabecera__toggle-barra::before,
	.cabecera__toggle-barra::after { content: ""; position: absolute; left: 0; }
	.cabecera__toggle-barra::before { top: -7px; }
	.cabecera__toggle-barra::after { top: 7px; }

	.cabecera__toggle[aria-expanded="true"] .cabecera__toggle-barra { background: transparent; }
	.cabecera__toggle[aria-expanded="true"] .cabecera__toggle-barra::before { transform: translateY(7px) rotate(45deg); }
	.cabecera__toggle[aria-expanded="true"] .cabecera__toggle-barra::after { transform: translateY(-7px) rotate(-45deg); }

	.cabecera__logo img { width: 180px; }

	.nav {
		position: absolute;
		inset: var(--alto-cabecera) 0 auto;
		flex-direction: column;
		align-items: stretch;
		gap: 24px;
		padding: 24px var(--margen) 32px;
		background: var(--azul-oscuro);
		box-shadow: 0 12px 24px rgba(5, 75, 99, .25);
	}
	.nav:not(.is-abierto) { display: none; }

	.nav__lista { flex-direction: column; gap: 0; margin: 0; }
	.nav__lista a { display: block; padding: 12px 0; font-size: 16px; }
	.nav__lista a::after { display: none; }

	.cabecera__acciones { flex-direction: column; align-items: stretch; }
	.cabecera__acciones .boton { padding-block: 14px; font-size: 15px; }
}

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
	position: relative;
	display: flex;
	align-items: center;
	align-items: flex-start; /* arriba, para que la tarjeta no salte al cambiar de paso */
	min-height: max(903px, 100svh);
	padding-block: calc(var(--alto-cabecera) + 164px) 110px;
	background: var(--cielo);
	color: var(--blanco);
	overflow: hidden;
}
.hero__fondo,
.hero__fondo img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
}
.hero__fondo img { object-fit: cover; object-position: 50% 50%; }

.hero__inner {
	position: relative;
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 40px;
}

.hero__texto { max-width: 493px; margin-top: 68px; }

@media (min-width: 1200px) {
	/* En el Figma la tarjeta acaba 56px antes que el botón de la cabecera */
	.hero__inner { padding-right: calc(var(--margen) + 56px); }
}
.hero__titulo {
	font-size: clamp(42px, 4.47vw, 64.3px);
	font-weight: 700;
	line-height: .98;
	letter-spacing: -0.055em;
}
.hero__subtitulo {
	max-width: 420px;
	margin-top: 16px;
	font-size: clamp(18px, 1.67vw, 24px);
	font-weight: 500;
	line-height: 1.333;
	letter-spacing: -0.0686em;
}

.hero__valoraciones {
	display: flex;
	gap: 26px;
	margin-top: 40px;
}
.hero__valoraciones li { display: flex; flex-direction: column; gap: 6.5px; }
.hero__valoraciones img { height: 31px; width: auto; }
.hero__valoraciones span { font-size: 17.2px; line-height: 1.2; }
.hero__valoracion-marca { font-size: 20px; line-height: 31px; }

.hero__calculadora { width: 380px; flex-shrink: 0; }

.hero__desliza {
	position: absolute;
	left: 50%;
	bottom: 27px;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 7px;
	transform: translateX(-50%);
	font-size: 9px;
	line-height: 13.5px;
	text-decoration: none;
	white-space: nowrap;
}
.hero__raton {
	position: relative;
	width: 16px; height: 24px;
	border: 1px solid currentColor;
	border-radius: 10px;
}
.hero__raton span {
	position: absolute;
	left: 6px; top: 6px;
	width: 2px; height: 5px;
	background: currentColor;
	border-radius: 3px;
	animation: raton 1.8s ease-in-out infinite;
}
@keyframes raton {
	0%   { transform: translateY(0); opacity: 1; }
	70%  { transform: translateY(7px); opacity: 0; }
	100% { transform: translateY(0); opacity: 0; }
}

@media (max-width: 1023px) {
	.hero {
		min-height: 0;
		padding-block: calc(var(--alto-cabecera) + 32px) 56px;
	}
	.hero__texto { margin-top: 0; }
	.hero__fondo img { object-position: 50% 15%; }
	/* Oscurecemos un poco la parte de arriba para que el texto blanco se lea sobre la foto */
	.hero::before {
		content: "";
		position: absolute;
		inset: 0;
		z-index: 1;
		background: linear-gradient(180deg, rgba(5, 75, 99, .55) 0%, rgba(5, 75, 99, 0) 45%);
	}
	.hero__inner { z-index: 2; flex-direction: column; align-items: stretch; gap: 32px; }
	.hero__calculadora { width: 100%; max-width: 420px; margin-inline: auto; }
	.hero__valoraciones { margin-top: 24px; }
	.hero__desliza { display: none; }
}

/* ==========================================================================
   Calculadora
   ========================================================================== */

.calc {
	padding: 24px 20px;
	background: var(--blanco);
	border: 1px solid var(--gris);
	border-radius: var(--radio-tarjeta);
	box-shadow: 0 4px 12px rgba(5, 75, 99, .08), 0 6px 5px rgba(0, 0, 0, .08);
	color: var(--azul-oscuro);
	scroll-margin-top: calc(var(--alto-cabecera) + 16px);
}

.calc__progreso { display: flex; justify-content: center; gap: 8px; }
.calc__punto {
	width: 8px; height: 8px;
	border-radius: 999px;
	background: var(--gris);
	transition: width .25s, background-color .25s;
}
.calc__punto.is-hecho { background: var(--azul); }
.calc__punto.is-actual { width: 24px; background: var(--azul); }

.calc__titulo {
	display: flex;
	flex-direction: column;
	padding-top: 19.5px;
	margin-bottom: 12px;
	font-size: 21.4px;
	line-height: 25.7px;
	text-align: center;
}
.calc__titulo strong { font-weight: 700; }
.calc__titulo span { font-weight: 400; }

.calc__paso {
	min-width: 0;
	margin: 0;
	padding: 0;
	border: 0;
}
.calc__paso[hidden] { display: none; }

.calc__pregunta {
	display: block;
	padding: 7.8px 0 9.7px;
	font-size: 13.6px;
	font-weight: 600;
	line-height: 20.5px;
}
.calc__pregunta:focus { outline: none; }

.calc__opciones { display: flex; flex-direction: column; gap: 9.7px; }

.opcion {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: space-between;
	min-height: 52.6px;
	padding: 0 15.6px;
	background: var(--blanco);
	border: 1px solid var(--borde);
	border-radius: var(--radio);
	font-size: 15.6px;
	line-height: 23.4px;
	cursor: pointer;
	transition: border-color .15s, background-color .15s;
}
.opcion:hover { border-color: var(--azul); }
.opcion input { position: absolute; opacity: 0; pointer-events: none; }
.opcion__check { width: 17.5px; height: 17.5px; visibility: hidden; }
.opcion:has(input:checked) {
	background: var(--azul-claro);
	border-color: var(--azul);
	box-shadow: inset 0 0 0 1px var(--azul); /* borde de 2px sin mover el contenido */
	font-weight: 600;
}
.opcion:has(input:checked) .opcion__check { visibility: visible; }
.opcion:has(input:focus-visible) { outline: 2px solid var(--azul); outline-offset: 3px; }

/* Contadores de días */
.calc__contadores { margin-top: 4px; }
.calc__contadores[hidden] { display: none; }
.contador__caja {
	display: flex;
	align-items: center;
	height: 52.6px;
	padding: 0 6px 0 15.6px;
	border: 1px solid var(--borde);
	border-radius: var(--radio);
}
.contador__caja:focus-within { border-color: var(--azul); }
.contador__caja input {
	flex: 1;
	min-width: 0;
	padding: 0;
	border: 0;
	background: none;
	font: inherit;
	font-size: 15.6px;
	color: inherit;
	-moz-appearance: textfield;
}
.contador__caja input:focus { outline: none; }
.contador__caja input::-webkit-inner-spin-button,
.contador__caja input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.contador__boton {
	width: 36px; height: 40px;
	padding: 0;
	border: 0;
	border-radius: 8px;
	background: none;
	font-size: 20px;
	font-weight: 500;
	cursor: pointer;
}
.contador__boton:hover { background: var(--fondo-suave); }

/* Campos de texto */
.campo {
	width: 100%;
	height: 54px;
	padding: 0 16px;
	background: var(--blanco);
	border: 1px solid var(--borde);
	border-radius: var(--radio);
	font: inherit;
	font-size: 15.6px;
	color: var(--azul-oscuro);
}
.campo::placeholder { color: rgba(54, 61, 63, .5); font-size: 14px; }
.campo:focus { outline: none; border-color: var(--azul); box-shadow: 0 0 0 1px var(--azul); }
.campo[aria-invalid="true"] { border-color: #c62d2d; box-shadow: 0 0 0 1px #c62d2d; }
.campo--select {
	appearance: none;
	padding-right: 44px;
	background: var(--blanco) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%23054b63' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 1.5l5 5 5-5'/%3E%3C/svg%3E") right 16px center no-repeat;
	cursor: pointer;
}
.campo--select:invalid { color: rgba(54, 61, 63, .5); }
.campo--select option { color: var(--azul-oscuro); }
.campo[type="search"]::-webkit-search-cancel-button { display: none; }

/* Lesiones */
.lesiones { display: flex; flex-direction: column; gap: 10px; }
.lesiones__elegidas,
.lesiones__sugerencias { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.lesiones__elegidas:empty,
.lesiones__sugerencias:empty { display: none; }

.chip {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	min-height: 36px;
	padding: 6px 12px 6px 16px;
	border: 1px solid transparent;
	border-radius: 12px;
	background: #f0f3f5;
	font-size: 13px;
	font-weight: 500;
	line-height: 19.5px;
	text-align: left;
	cursor: pointer;
}
.chip:hover { border-color: var(--borde); }
.chip--elegida {
	border-color: var(--azul);
	border-radius: 14px;
	background: var(--azul-claro);
	font-weight: 600;
}
.chip--elegida img { width: 11px; height: 11px; }

.calc__enlace {
	align-self: flex-start;
	margin-top: 4px;
	padding: 4px 0;
	border: 0;
	background: none;
	font-size: 13.6px;
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 3px;
	cursor: pointer;
}
.calc__enlace[aria-pressed="true"] { color: var(--azul); }
.lesiones__vacio { font-size: 13px; color: rgba(54, 61, 63, .7); }

/* Datos de contacto */
.calc__paso--datos { display: flex; flex-direction: column; gap: 10px; padding-top: 8px; }
.calc__paso--datos[hidden] { display: none; }
.calc__etiqueta {
	font-size: 12px;
	font-weight: 700;
	line-height: 26.4px;
	letter-spacing: 2px;
	text-transform: uppercase;
}
.calc__privacidad {
	display: flex;
	gap: 10px;
	margin-top: 14px;
	font-size: 13px;
	line-height: 18.2px;
	cursor: pointer;
}
.calc__privacidad input {
	flex-shrink: 0;
	width: 18px; height: 18px;
	margin: 0;
	accent-color: var(--azul);
}
.calc__privacidad a { color: var(--azul); }

.calc__trampa { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Errores y resultado */
.calc__error {
	margin-top: 12px;
	padding: 10px 12px;
	border-radius: 8px;
	background: #fdeeee;
	color: #a32424;
	font-size: 13px;
	line-height: 1.4;
}
.calc__error[hidden] { display: none; }

.calc__resultado { padding-top: 12px; text-align: center; }
.calc__resultado[hidden] { display: none; }
.calc__resultado:focus { outline: none; }
.calc__resultado-titulo { font-size: 18px; font-weight: 700; }
.calc__resultado-importe { margin-top: 8px; font-size: 36px; font-weight: 700; color: var(--azul); }
.calc__resultado-texto { margin: 8px 0 24px; font-size: 14px; line-height: 1.5; }

/* Botones */
.calc__acciones { display: flex; flex-direction: column; gap: 12px; padding-top: 24px; }
.calc__acciones [hidden] { display: none; }
.calc__atras {
	padding: 6px;
	border: 0;
	background: none;
	font-size: 14px;
	font-weight: 500;
	line-height: 21px;
	cursor: pointer;
}
.calc__atras:hover { text-decoration: underline; }

.calc.is-enviando [data-enviar] { opacity: .7; cursor: progress; }
.calc.is-terminado .calc__acciones,
.calc.is-terminado .calc__progreso { display: none; }

/* ==========================================================================
   Pie y páginas genéricas
   ========================================================================== */

.pie {
	padding-block: 40px;
	background: var(--azul-oscuro);
	color: var(--blanco);
	font-size: 14px;
}

.contenido-generico { padding-block: 64px; max-width: 800px; }
.contenido-generico h1 { margin-bottom: 24px; font-size: 36px; }
