/* Toldos para hostelería: empezar por lo que le pasa a la terraza. */

::selection {
	background: var(--tn-azul);
	color: var(--tn-blanco);
}

/* ── Entrada ─────────────────────────────────────── */
.tn-host-intro {
	padding: 56px 0 64px;
	background: var(--tn-gris);
}

.tn-host-intro__rejilla {
	display: grid;
	grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
	gap: 56px;
	align-items: start;
}

.tn-host-intro__texto {
	padding-top: 24px;
	position: sticky;
	top: calc(var(--tn-cabecera) + 24px);
}

/* ── Problemas ───────────────────────────────────── */
.tn-problemas__pregunta {
	font-weight: 800;
	font-size: 1.25rem;
	line-height: 1.2;
	letter-spacing: -0.01em;
	color: var(--tn-azul-noche);
	margin: 0 0 14px;
}

.tn-problemas__lista {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 14px;
}

.tn-problema {
	position: relative;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	aspect-ratio: 4 / 5;
	padding: 16px;
	border-radius: var(--tn-radio);
	overflow: hidden;
	isolation: isolate;
	color: var(--tn-blanco);
	text-decoration: none;
	background: var(--tn-azul-noche);
	box-shadow: var(--tn-sombra);
	outline: 3px solid transparent;
	outline-offset: 3px;
	transition: transform 160ms var(--tn-ease-out), outline-color 150ms ease;
	-webkit-tap-highlight-color: transparent;
}

.tn-problema__foto {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	z-index: -2;
	transform: scale(var(--tn-zoom, 1));
	transform-origin: 50% 100%;
	transition: transform 260ms var(--tn-ease-out);
}

.tn-problema::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background: linear-gradient(180deg, rgba(4, 54, 94, 0.05) 25%, rgba(4, 54, 94, 0.92) 100%);
}

.tn-problema__texto {
	font-weight: 800;
	font-size: clamp(1.05rem, 1.55vw, 1.3rem);
	line-height: 1.15;
	text-wrap: balance;
}

.tn-problema__toldo {
	display: flex;
	align-items: center;
	gap: 6px;
	min-width: 0;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	margin-top: 8px;
	font-size: 0.8125rem;
	font-weight: 600;
	line-height: 1.3;
	color: rgba(255, 255, 255, 0.86);
}

.tn-problema:active {
	transform: scale(0.97);
}

.tn-problema:focus-visible {
	outline-color: var(--tn-azul);
}

.tn-problema[aria-current="true"] {
	outline-color: var(--tn-rojo);
}

.tn-problema[aria-current="true"] .tn-problema__toldo::before {
	content: "";
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--tn-rojo);
	box-shadow: 0 0 0 2px var(--tn-blanco);
}

@media (hover: hover) and (pointer: fine) {
	.tn-problema:hover {
		color: var(--tn-blanco);
	}

	.tn-problema:hover .tn-problema__foto {
		transform: scale(calc(var(--tn-zoom, 1) * 1.04));
	}
}

/* ── Respuestas ──────────────────────────────────── */
.tn-respuestas {
	padding: 72px 0 88px;
}

.tn-respuestas__cabeza {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 16px 32px;
	margin-bottom: 32px;
}

.tn-respuestas__titulo {
	outline: none;
	margin: 0;
}

/* Fila de casos: cambiar de respuesta sin volver a las tarjetas. Sin JS son anclas. */
.tn-casos {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.tn-caso {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 48px;
	padding: 0 18px;
	border: 1.5px solid var(--tn-linea);
	border-radius: 999px;
	background: var(--tn-blanco);
	color: var(--tn-azul-noche);
	font-weight: 600;
	font-size: 0.9375rem;
	text-decoration: none;
	transition: transform 160ms var(--tn-ease-out), border-color 150ms ease, background-color 150ms ease, color 150ms ease;
	-webkit-tap-highlight-color: transparent;
}

.tn-caso:active {
	transform: scale(0.97);
}

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

.tn-caso[aria-current="true"] {
	background: var(--tn-azul-noche);
	border-color: var(--tn-azul-noche);
	color: var(--tn-blanco);
}

.tn-caso[aria-current="true"]::before {
	content: "";
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--tn-rojo);
	box-shadow: 0 0 0 2px var(--tn-blanco);
}

@media (hover: hover) and (pointer: fine) {
	.tn-caso:not([aria-current="true"]):hover {
		border-color: var(--tn-azul);
		color: var(--tn-azul);
	}
}

/* Sin JS la fila no hace falta: se leen todas las respuestas. */
.tn-host:not(.tn-host--js) .tn-casos {
	display: none;
}

.tn-respuesta {
	display: grid;
	grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
	gap: 48px;
	align-items: center;
}

/* Sin JS se leen todas seguidas, separadas por una línea. */
.tn-respuesta + .tn-respuesta {
	margin-top: 56px;
	padding-top: 56px;
	border-top: 1px solid var(--tn-linea);
}

/* Con JS se ve solo la elegida. */
.tn-host--js .tn-respuesta + .tn-respuesta {
	margin-top: 0;
	padding-top: 0;
	border-top: 0;
}

.tn-respuesta[hidden] {
	display: none;
}

.tn-respuesta.tn-entra {
	animation: tn-respuesta-entra 220ms var(--tn-ease-out);
}

@keyframes tn-respuesta-entra {
	from {
		opacity: 0;
		transform: translateY(8px);
		filter: blur(2px);
	}
}

.tn-respuesta__foto {
	position: relative;
	margin: 0;
}

.tn-respuesta__imagen {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 3 / 2;
	object-fit: cover;
	border-radius: var(--tn-radio);
	background: var(--tn-gris);
	box-shadow: 0 24px 48px -24px rgba(4, 54, 94, 0.45);
	transition: opacity 180ms ease;
}

.tn-respuesta__imagen.tn-cargando {
	opacity: 0.4;
}

.tn-respuesta__miniaturas {
	list-style: none;
	margin: 0;
	padding: 0;
	position: absolute;
	left: 12px;
	bottom: 12px;
	display: flex;
	gap: 8px;
}

.tn-miniatura {
	display: block;
	width: 64px;
	height: 48px;
	padding: 0;
	border: 2px solid var(--tn-blanco);
	border-radius: 6px;
	overflow: hidden;
	cursor: pointer;
	background: var(--tn-gris);
	box-shadow: 0 4px 12px -2px rgba(0, 0, 0, 0.35);
	outline: 2px solid transparent;
	outline-offset: 1px;
	opacity: 0.85;
	transition: opacity 150ms ease, outline-color 150ms ease, transform 160ms var(--tn-ease-out);
}

.tn-miniatura img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.tn-miniatura[aria-pressed="true"] {
	opacity: 1;
	outline-color: var(--tn-azul);
}

.tn-miniatura:active {
	transform: scale(0.95);
}

@media (hover: hover) and (pointer: fine) {
	.tn-miniatura:hover {
		opacity: 1;
	}
}

.tn-respuesta__foto figcaption {
	position: absolute;
	left: 12px;
	bottom: 12px;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 6px 12px;
	border-radius: 999px;
	background: rgba(4, 54, 94, 0.88);
	color: var(--tn-blanco);
	font-size: 0.8125rem;
	font-weight: 600;
	line-height: 1.3;
}

.tn-respuesta__toldo {
	font-weight: 800;
	font-size: clamp(1.5rem, 2.4vw, 2rem);
	line-height: 1.15;
	letter-spacing: -0.015em;
	color: var(--tn-azul-noche);
	margin: 0 0 8px;
	text-wrap: balance;
}

.tn-respuesta__problema {
	display: inline-block;
	font-size: 0.8125rem;
	font-weight: 600;
	color: var(--tn-azul);
	background: var(--tn-azul-claro);
	padding: 4px 10px;
	border-radius: 999px;
	margin: 0 0 18px;
}

.tn-respuesta__texto p {
	margin: 0 0 16px;
	max-width: 58ch;
	text-wrap: pretty;
}

.tn-respuesta__texto > p:not([class]) {
	color: var(--tn-tinta);
}

.tn-respuesta__ademas {
	color: var(--tn-tinta-2);
	padding-top: 16px;
	border-top: 1px solid var(--tn-linea);
}

.tn-respuesta__acciones {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 24px;
	padding-top: 4px;
}

/* ── Obras: banda oscura ─────────────────────────── */
.tn-obras {
	background: var(--tn-azul-noche);
	color: rgba(255, 255, 255, 0.86);
	padding: 80px 0;
}

.tn-obras .tn-titulo-2 {
	color: var(--tn-blanco);
}

.tn-obras__rejilla {
	display: grid;
	grid-template-columns: minmax(0, 6fr) minmax(0, 6fr);
	gap: 56px;
	align-items: center;
}

.tn-obras__foto {
	margin: 0;
}

.tn-obras__foto img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	border-radius: var(--tn-radio);
	box-shadow: 0 24px 48px -24px rgba(0, 0, 0, 0.55);
}

.tn-obras__texto > p {
	max-width: 52ch;
	margin: 0 0 1.25rem;
}

.tn-obras__lista {
	list-style: none;
	margin: 0;
	padding: 0;
}

.tn-obras__lista li {
	padding: 12px 0 12px 28px;
	position: relative;
	border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.tn-obras__lista li::before {
	content: "";
	position: absolute;
	left: 2px;
	top: 1.15em;
	width: 12px;
	height: 6px;
	border-left: 2px solid var(--tn-ambar);
	border-bottom: 2px solid var(--tn-ambar);
	transform: rotate(-45deg);
}

.tn-obras__lista strong {
	color: var(--tn-blanco);
	font-weight: 700;
}

/* ── Cómo trabajamos ─────────────────────────────── */
.tn-host-pasos {
	background: var(--tn-gris);
	padding: 80px 0 88px;
}

.tn-host-pasos__rejilla {
	display: grid;
	grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
	gap: 56px;
	align-items: start;
}

.tn-host-pasos__intro {
	color: var(--tn-tinta-2);
	max-width: 40ch;
	margin: 0;
}

.tn-host-pasos__lista {
	list-style: none;
	margin: 0;
	padding: 0;
}

.tn-host-pasos__lista li {
	display: grid;
	grid-template-columns: 48px 1fr;
	gap: 16px;
	align-items: baseline;
	padding: 18px 0;
	border-top: 1px solid var(--tn-linea);
	color: var(--tn-tinta-2);
}

.tn-host-pasos__lista li:last-child {
	border-bottom: 1px solid var(--tn-linea);
}

.tn-host-pasos__lista strong {
	color: var(--tn-azul-noche);
}

.tn-host-pasos__lista a {
	color: var(--tn-azul);
	font-weight: 700;
	text-decoration-thickness: 1.5px;
	text-underline-offset: 4px;
	text-decoration-color: rgba(8, 90, 157, 0.35);
}

.tn-host-pasos__num {
	font-family: var(--tn-cifra);
	font-weight: 600;
	font-size: 2rem;
	line-height: 1;
	font-variant-numeric: tabular-nums;
	color: var(--tn-azul);
}

/* ── Preguntas ───────────────────────────────────── */
.tn-host-faq {
	padding: 80px 0 88px;
}

.tn-host-faq__caja {
	max-width: 840px;
}

.tn-host-faq__lista {
	margin-top: 24px;
	border-bottom: 1px solid var(--tn-linea);
}

.tn-pregunta {
	border-top: 1px solid var(--tn-linea);
}

.tn-pregunta summary {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	padding: 20px 0;
	min-height: 52px;
	font-weight: 700;
	font-size: 1.1rem;
	line-height: 1.35;
	color: var(--tn-azul-noche);
	cursor: pointer;
	list-style: none;
}

.tn-pregunta summary::-webkit-details-marker {
	display: none;
}

.tn-pregunta summary:focus-visible {
	outline: 2px solid var(--tn-azul);
	outline-offset: 2px;
	border-radius: 4px;
}

.tn-pregunta__signo {
	flex-shrink: 0;
	color: var(--tn-azul);
	transition: transform 200ms var(--tn-ease-out);
}

.tn-pregunta[open] .tn-pregunta__signo {
	transform: rotate(45deg);
}

.tn-pregunta p {
	margin: 0 0 22px;
	max-width: 65ch;
	color: var(--tn-tinta-2);
}

@media (hover: hover) and (pointer: fine) {
	.tn-pregunta summary:hover {
		color: var(--tn-azul);
	}
}

/* ── Móvil y tableta ─────────────────────────────── */
@media (max-width: 1024px) {
	.tn-host-intro__rejilla,
	.tn-respuesta,
	.tn-obras__rejilla,
	.tn-host-pasos__rejilla {
		grid-template-columns: 1fr;
		gap: 32px;
	}

	.tn-host-intro__texto {
		position: static;
		padding-top: 0;
	}

}

@media (max-width: 720px) {
	.tn-host-intro {
		padding: 32px 0 40px;
	}

	.tn-problemas__lista {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 10px;
	}

	.tn-problema {
		aspect-ratio: 1 / 1;
		padding: 12px;
	}

	.tn-problema__toldo {
		display: none;
	}

	.tn-respuestas,
	.tn-host-pasos,
	.tn-host-faq {
		padding: 48px 0 56px;
	}

	.tn-obras {
		padding: 56px 0;
	}


	.tn-acciones .tn-boton {
		flex: 1 1 100%;
	}
}

@media (prefers-reduced-motion: reduce) {
	.tn-problema,
	.tn-problema__foto,
	.tn-caso,
	.tn-miniatura,
	.tn-respuesta__imagen,
	.tn-pregunta__signo {
		transition: none;
	}

	.tn-respuesta.tn-entra {
		animation: none;
	}
}

.tn-respuesta__toldo:focus {
	outline: none;
}
