/* ¿Qué necesito hoy? – estilos base. Todo lo editable se maneja con variables. */
.qnh {
	--qnh-circle: #6a1fa0;
	--qnh-ar: 1.15;
	--qnh-tile-size: 76px;
	--qnh-tile-radius: 28%;
	--qnh-tile-a: #22c47a;
	--qnh-tile-b: #0a8f55;
	--qnh-icon: #ffffff;
	--qnh-icon-scale: .64;
	--qnh-gap: 16px;
	--qnh-per-view: 4;
	width: 100%;
	box-sizing: border-box;
	padding-left: 40px;
	padding-right: 40px;
}

.qnh *,
.qnh *::before,
.qnh *::after {
	box-sizing: border-box;
}

/* Ancho completo: sale del contenedor y va de borde a borde de la ventana */
.qnh--full {
	width: 100vw;
	max-width: 100vw;
	position: relative;
	left: 50%;
	margin-left: -50vw;
}

/* Evita la barra de scroll horizontal que puede generar 100vw */
body:has(.qnh--full) {
	overflow-x: clip;
}

.qnh-inner {
	width: 100%;
	max-width: 100%;
	margin-left: auto;
	margin-right: auto;
}

.qnh-title {
	margin: 0 0 32px;
	text-align: center;
	color: #1f2a37;
	font-size: clamp(28px, 4vw, 44px);
	font-weight: 500;
	line-height: 1.15;
}

.qnh-body {
	display: flex;
	align-items: center;
	gap: 32px;
}

/* ---------- Foto ---------- */
.qnh-photo {
	position: relative;
	flex: 0 0 auto;
	width: 24%;
	max-width: 380px;
}

.qnh-photo--cutout {
	aspect-ratio: 1 / var(--qnh-ar);
}

.qnh-photo--cutout .qnh-circle {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	aspect-ratio: 1;
	border-radius: 50%;
	background: var(--qnh-circle);
}

.qnh-photo--cutout .qnh-img {
	position: relative;
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
	object-position: center bottom;
	/* Recorta lo que sobresale por los costados y abajo, deja libre arriba */
	clip-path: inset(-100% 0 0 0 round 0 0 50% 50% / 0 0 calc(50% / var(--qnh-ar)) calc(50% / var(--qnh-ar)));
}

.qnh-photo--circle {
	aspect-ratio: 1;
	border-radius: 50%;
	overflow: hidden;
	background: var(--qnh-circle);
}

.qnh-photo--circle .qnh-img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* ---------- Tarjeta ---------- */
.qnh-card {
	position: relative;
	flex: 1 1 auto;
	min-width: 0;
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 28px 16px;
	background: #fff;
	border-radius: 24px;
	box-shadow: 0 6px 30px rgba(16, 24, 40, .08);
}

.qnh-track {
	flex: 1 1 auto;
	min-width: 0;
	display: flex;
	gap: var(--qnh-gap);
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	scrollbar-width: none;
	-webkit-overflow-scrolling: touch;
}

.qnh-track::-webkit-scrollbar {
	display: none;
}

/* Si caben todos, se centran */
.qnh-track.is-static {
	justify-content: center;
}

.qnh-item {
	flex: 0 0 calc((100% - (var(--qnh-per-view) - 1) * var(--qnh-gap)) / var(--qnh-per-view));
	scroll-snap-align: start;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 12px;
	padding: 4px 2px;
	text-align: center;
	text-decoration: none;
	color: inherit;
	border-radius: 12px;
}

.qnh-item:focus-visible {
	outline: 2px solid var(--qnh-tile-b);
	outline-offset: 2px;
}

.qnh-tile {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	width: var(--qnh-tile-size);
	height: var(--qnh-tile-size);
	border-radius: var(--qnh-tile-radius);
	background: linear-gradient(160deg, var(--qnh-tile-a), var(--qnh-tile-b));
	color: var(--qnh-icon);
	box-shadow: 0 6px 14px rgba(10, 143, 85, .25), inset 0 1px 0 rgba(255, 255, 255, .25);
	overflow: hidden;
	transition: transform .2s ease, box-shadow .2s ease;
}

/* Brillo sutil como en la referencia */
.qnh-tile::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(255, 255, 255, .18), rgba(255, 255, 255, 0) 55%);
	pointer-events: none;
}

.qnh-item:hover .qnh-tile,
.qnh-item:focus-visible .qnh-tile {
	transform: translateY(-4px);
	box-shadow: 0 10px 20px rgba(10, 143, 85, .3), inset 0 1px 0 rgba(255, 255, 255, .25);
}

.qnh-tile svg,
.qnh-tile i,
.qnh-tile img {
	position: relative;
	z-index: 1;
	width: calc(var(--qnh-tile-size) * var(--qnh-icon-scale));
	height: calc(var(--qnh-tile-size) * var(--qnh-icon-scale));
	font-size: calc(var(--qnh-tile-size) * var(--qnh-icon-scale));
	line-height: 1;
	object-fit: contain;
}

.qnh-tile svg {
	fill: currentColor;
}

.qnh-tile .qnh-svg {
	fill: none;
}

.qnh-label {
	font-size: 14px;
	line-height: 1.3;
	color: #1f2a37;
	transition: color .2s ease;
}

/* ---------- Flechas ---------- */
.qnh-arrow {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	padding: 0;
	margin: 0;
	border: 0;
	background: transparent;
	color: #b8bec7;
	cursor: pointer;
	border-radius: 50%;
	transition: color .2s ease, opacity .2s ease;
}

.qnh-arrow svg {
	width: 24px;
	height: 24px;
}

.qnh-arrow:not(:disabled):hover {
	color: #4b5563;
}

.qnh-arrow:disabled {
	opacity: .35;
	cursor: default;
}

.qnh-arrow.is-hidden {
	visibility: hidden;
}

/* ---------- Responsive ---------- */
/* Valores por defecto; los de Elementor tienen más especificidad y los reemplazan */
@media (max-width: 1024px) {
	.qnh { --qnh-per-view: 3; }
}
@media (max-width: 767px) {
	.qnh { --qnh-per-view: 2; }
}

@media (max-width: 767px) {
	.qnh-body {
		flex-direction: column;
	}

	.qnh-photo {
		width: 60%;
		max-width: 240px;
	}

	.qnh-card {
		width: 100%;
		padding: 20px 8px;
	}
}
