/* ===== Efectos NH ===== */

/* --- Comparador antes/después ---
   En Elementor: contenedor con la clase nh-antes-despues, 2 imágenes (antes, después)
   y 2 párrafos opcionales (etiquetas). Variables: --nh-ad-inicio (0-100), --nh-ad-radio. */
.nh-antes-despues.is-ready {
	display: block;
	position: relative;
	padding: 0;
	overflow: hidden;
	border-radius: var(--nh-ad-radio, 20px);
	touch-action: pan-y;
	cursor: ew-resize;
	user-select: none;
	-webkit-user-select: none;
	isolation: isolate;
}
.nh-antes-despues.is-ready > img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: 0;
	pointer-events: none;
	-webkit-user-drag: none;
}
.nh-antes-despues.is-ready > .nh-ad-antes {
	position: absolute;
	inset: 0;
	z-index: 1;
	clip-path: inset(0 calc(100% - var(--nh-ad-pos, 50%)) 0 0);
}
.nh-antes-despues.is-ready > .nh-ad-etiqueta {
	position: absolute;
	top: 1.25rem;
	z-index: 2;
	margin: 0;
	padding: .5rem 1.1rem;
	border-radius: 999px;
	background: rgba(20, 26, 6, .72);
	color: #fff;
	font-size: 14px;
	font-weight: 500;
	line-height: 1.3;
	pointer-events: none;
	transition: opacity .25s;
}
.nh-antes-despues.is-ready > .nh-ad-etiqueta--antes { left: 1.25rem; }
.nh-antes-despues.is-ready > .nh-ad-etiqueta--despues { right: 1.25rem; background: #7B9325; }
.nh-antes-despues > .nh-ad-barra {
	position: absolute;
	top: 0;
	bottom: 0;
	left: var(--nh-ad-pos, 50%);
	z-index: 3;
	width: 3px;
	margin-left: -1.5px;
	background: #fff;
	box-shadow: 0 0 12px rgba(0, 0, 0, .35);
	outline: none;
}
.nh-antes-despues > .nh-ad-barra > span {
	position: absolute;
	top: 50%;
	left: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 56px;
	height: 56px;
	border-radius: 50%;
	background: #fff;
	color: #38470F;
	box-shadow: 0 6px 20px rgba(0, 0, 0, .3);
	transform: translate(-50%, -50%);
	transition: transform .25s, background-color .25s, color .25s;
}
.nh-antes-despues > .nh-ad-barra svg { width: 30px; height: 30px; }
.nh-antes-despues:hover > .nh-ad-barra > span,
.nh-antes-despues.is-dragging > .nh-ad-barra > span {
	background: #7B9325;
	color: #fff;
	transform: translate(-50%, -50%) scale(1.08);
}
.nh-antes-despues > .nh-ad-barra:focus-visible > span { box-shadow: 0 0 0 4px #7B9325; }

/* --- Slide continuo ---
   Variables: --nh-marquee-velocidad (px/s), --nh-marquee-ancho, --nh-marquee-hueco, --nh-marquee-radio.
   Clase repetida: Elementor fija overflow en .e-con y max-width/border-radius en .elementor img. */
.nh-marquee.nh-marquee {
	overflow: hidden;
	-webkit-mask-image: linear-gradient(90deg, transparent 0, #000 5%, #000 95%, transparent 100%);
	mask-image: linear-gradient(90deg, transparent 0, #000 5%, #000 95%, transparent 100%);
}
.nh-marquee.nh-marquee img {
	flex: 0 0 auto;
	width: var(--nh-marquee-ancho, 360px);
	max-width: none;
	height: auto;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	border-radius: var(--nh-marquee-radio, 20px);
}
.nh-marquee__track,
.nh-marquee__grupo { display: flex; flex: 0 0 auto; }
.nh-marquee__track {
	width: max-content;
	will-change: transform;
	animation: nh-marquee var(--nh-marquee-dur, 60s) linear infinite;
	animation-play-state: paused;
}
.nh-marquee__track.is-running { animation-play-state: running; }
.nh-marquee__grupo {
	gap: var(--nh-marquee-hueco, 24px);
	padding-right: var(--nh-marquee-hueco, 24px);
}
@keyframes nh-marquee {
	to { transform: translate3d(calc(-1 * var(--nh-marquee-paso, 50%)), 0, 0); }
}

/* --- Acento en títulos: las palabras en negrita van en degradado --- */
.nh-acento strong { font-weight: inherit; color: var(--nh-acento-2, #7B9325); }
.nh-acento strong .nh-reveal__i {
	background: linear-gradient(90deg, var(--nh-acento-1, #38470F), var(--nh-acento-2, #7B9325));
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
	padding-bottom: .12em;
	margin-bottom: -.12em;
}

/* --- Título que encoge al quedar tapado por la sección siguiente ---
   Variables: --nh-encoge-escala (0.8), --nh-encoge-opacidad (0.5). */
.nh-encoge { transform-origin: left center; will-change: scale, opacity; }

@media (max-width: 767px) {
	.nh-marquee { --nh-marquee-ancho: 240px !important; --nh-marquee-hueco: 16px !important; }
	.nh-antes-despues > .nh-ad-barra > span { width: 46px; height: 46px; }
	.nh-antes-despues.is-ready > .nh-ad-etiqueta { top: .85rem; font-size: 12px; padding: .4rem .8rem; }
	.nh-antes-despues.is-ready > .nh-ad-etiqueta--antes { left: .85rem; }
	.nh-antes-despues.is-ready > .nh-ad-etiqueta--despues { right: .85rem; }
}

@media (prefers-reduced-motion: reduce) {
	.nh-marquee.nh-marquee { overflow-x: auto; }
	.nh-marquee__track { animation: none; }
}

/* En el editor de Elementor se ven las imágenes sueltas, para poder cambiarlas. */
.elementor-editor-active .nh-marquee.nh-marquee { overflow-x: auto; }
