/*
 * Tarjetas Nexa
 *
 * Reune el CSS que antes estaba repartido entre los widgets HTML de cada pagina,
 * el CSS adicional del Personalizador (hover-slider, content-item, btn-blanco-no-el,
 * tags-dos-formas, hover-slider-nav...) y el CSS personalizado de las paginas
 * Como trabajamos y Laboratorio de experiencias. Las clases son propias (ntj-*)
 * para no mezclarse con esas reglas viejas.
 *
 * Las medidas que cambian por widget llegan como variables desde el HTML:
 * --ntj-activa, --ntj-inactiva, --ntj-alto(-tablet/-movil), --ntj-espacio-titulo,
 * --ntj-min-texto y, por tarjeta, --ntj-ancho-dibujo, --ntj-ancho-texto,
 * --ntj-ancho-entregamos. --ntj-indice lo maneja el JS (carrusel en celular).
 */

.ntj {
	--ntj-activa: 70%;
	--ntj-inactiva: 30%;
	--ntj-alto: 316px;
	--ntj-espacio: 10px;
	--ntj-espacio-titulo: 16px;
	--ntj-min-texto: 0px;
	--ntj-indice: 0;
	/* Equivale a "power3.out" de GSAP, que usaban los scripts anteriores. */
	--ntj-curva: cubic-bezier(0.215, 0.61, 0.355, 1);

	position: relative;
	width: 100%;
}

.ntj--recortar,
.ntj--recortar .ntj-pista {
	overflow: hidden;
}


/* =========================================
   PISTA Y TARJETAS
========================================= */

.ntj-pista {
	display: flex;
	gap: var(--ntj-espacio);
	width: 100%;
	height: var(--ntj-alto);
}

.ntj-tarjeta {
	position: relative;
	flex: 0 0 var(--ntj-inactiva);
	min-width: 0;
	height: 100%;
	overflow: hidden;
	transition: flex-basis 0.5s var(--ntj-curva);
}

.ntj-tarjeta.is-activa {
	flex-basis: var(--ntj-activa);
	box-shadow: 0 0 6.3px 0 rgba(253, 253, 253, 0.61);
	border-radius: 10px;
}

.ntj[data-ntj-activar="clic"] .ntj-tarjeta:not(.is-activa) {
	cursor: pointer;
}

.ntj-caja {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	overflow: hidden;
}


/* =========================================
   IMAGEN Y VIDEO (diseno "debajo")
   Con ".ntj" adelante para ganarle a ".elementor img" (height:auto; border-radius:0).
========================================= */

.ntj .ntj-imagen {
	display: block;
	width: 100%;
	height: 100%;
	max-width: 100%;
	object-fit: cover;
	border-radius: 10px;
	filter:
		brightness(0.65)
		contrast(0.9)
		saturate(0.35)
		sepia(0.25)
		hue-rotate(-8deg);
	transition: filter 0.4s ease, opacity 0.5s ease;
}

.ntj .ntj-tarjeta.is-activa .ntj-imagen {
	filter: none;
}

/* Con video: la imagen es la portada y el video aparece en la tarjeta activa. */
.ntj .ntj-tarjeta--video .ntj-imagen,
.ntj .ntj-video {
	position: absolute;
	inset: 0;
}

.ntj .ntj-tarjeta--video .ntj-imagen {
	z-index: 1;
}

.ntj .ntj-video {
	display: block;
	width: 100%;
	height: 100%;
	max-width: 100%;
	object-fit: cover;
	opacity: 0;
	z-index: 2;
	pointer-events: none;
	transition: opacity 0.5s ease;
}

.ntj .ntj-tarjeta--video.is-activa .ntj-imagen {
	opacity: 0;
}

.ntj .ntj-tarjeta--video.is-activa .ntj-video {
	opacity: 1;
}


/* =========================================
   CONTENIDO DEBAJO DE LAS TARJETAS
========================================= */

.ntj-contenido {
	width: 100%;
	margin-top: 30px;
	color: #fff;
}

.ntj-item {
	display: none;
	flex-direction: column;
	gap: var(--ntj-espacio-titulo);
	min-height: var(--ntj-min-texto);
}

.ntj-item.is-activa {
	display: flex;
	animation: ntj-aparecer 0.6s cubic-bezier(0.4, 0, 0.2, 1) both;
}

@keyframes ntj-aparecer {
	from {
		opacity: 0;
	}

	to {
		opacity: 1;
	}
}

.ntj-item h3,
.ntj-item p {
	margin: 0;
}

/* Texto y boton en la misma fila (Inicio). */
.ntj-fila {
	display: flex;
	gap: 40px;
	justify-content: space-between;
}

/* Etiquetas y boton en la misma fila; el texto va arriba (Hardware Phygital). */
.ntj-fila--etiquetas {
	gap: 0;
	margin-top: 6px;
}

.ntj-etiquetas {
	display: flex;
	gap: 10px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.ntj-etiqueta {
	display: block;
	margin: 0;
	padding: 8px 10px;
	border: 1px solid #fafafa;
	border-radius: 100px;
	color: #F4F4F4;
	font-size: 16px;
	font-weight: 700;
	line-height: 20px;
}

.ntj-etiqueta--destacada {
	background: #E53A05;
	border-color: #E53A05;
}


/* =========================================
   BOTON (antes a.btn-blanco-no-el)
========================================= */

a.ntj-boton {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	gap: 10px;
	max-width: max-content;
	padding: 8px 16px;
	border: 1px solid #0F09071A;
	border-radius: 100px;
	background: #fafafa;
	box-shadow: 0 -2px 4.4px 4px #d9d9d9ba inset;
	color: #0F0907;
	font-size: 14px;
	font-weight: 600;
	line-height: 20px;
	text-align: center;
	text-transform: uppercase;
	transition: box-shadow 0.6s, background 0.3s ease-in-out;
}

a.ntj-boton:hover {
	background: #E53A05;
	box-shadow:
		0 0 4px 2px rgba(177, 177, 177, 0.40),
		0 2px 9.4px 5px #FF6535 inset;
	color: #fafafa;
	transition: box-shadow 0s, background 0.3s ease-in-out;
}

a.ntj-boton svg {
	width: 24px;
	height: 24px;
}

a.ntj-boton:hover svg path {
	stroke: #fafafa;
}


/* =========================================
   FLECHAS (antes .hover-slider-nav)
========================================= */

.ntj-flechas {
	display: flex;
	gap: 10px;
	justify-content: flex-end;
}

.ntj-flecha {
	position: relative;
	z-index: 2 !important;
	overflow: hidden;
	padding: 8px 16px;
	border-style: var(--arrow-normal-border-type);
	border-radius: 100px;
	background-color: #02010100 !important;
	box-shadow:
		inset 0 1px 0 rgba(255, 255, 255, 0.25),
		inset 0 -1px 0 rgba(255, 255, 255, 0.325);
	color: var(--arrow-normal-color, hsla(0, 0%, 93.3%, 0.9)) !important;
	font-size: var(--arrow-size, 25px) !important;
	cursor: pointer;
	backdrop-filter: blur(30px) !important;
	-webkit-backdrop-filter: blur(32px) !important;
	transition-duration: 0.25s !important;
}

.ntj-flecha:hover,
.ntj-flecha:focus-visible {
	background: #E53A05 !important;
	box-shadow:
		0 0 4px 2px rgba(177, 177, 177, 0.40),
		0 2px 9.4px 5px #FF6535 inset !important;
	transition: background 0.3s ease-in-out;
}

/* Animacion de las flechas (botones del carrusel y del contenido). */
.ntj-flecha svg,
.ntj-flecha svg path,
a.ntj-boton svg,
a.ntj-boton svg path {
	transition: all 0.3s ease-in-out;
}

.ntj-flecha--siguiente svg path:first-child,
a.ntj-boton svg path:first-child {
	transform-origin: 17px 12px !important;
	transition: transform 0.35s ease !important;
}

.ntj-flecha--anterior svg path:first-child {
	transform-origin: 5px 0 !important;
	transition: transform 0.35s ease !important;
}

.ntj-flecha:hover svg path:first-child,
a.ntj-boton:hover svg path:first-child {
	transform: scaleX(1.4);
}

.ntj-flecha--anterior:hover svg {
	transform: translateX(-2px);
}

.ntj-flecha--siguiente:hover svg,
a.ntj-boton:hover svg {
	transform: translateX(2px);
}


/* =========================================
   CONTENIDO DENTRO DE LA TARJETA (Como trabajamos)
========================================= */

.ntj--dentro .ntj-caja {
	flex-direction: column;
	justify-content: flex-start;
	align-items: flex-start;
	gap: 14px;
	padding: 16px;
	overflow: visible;
	border: 1px solid rgba(244, 244, 244, 0.10);
	border-radius: 10px;
	background: rgba(18, 13, 12, 0.70);
	color: #fafafa;
}

.ntj--dentro .ntj-tarjeta.is-activa .ntj-caja {
	min-height: var(--ntj-alto);
	background: linear-gradient(83deg, #120D0C -7.25%, #680800 16.4%, #B01401 38.73%, #D93E00 78.15%, #DF824E 100%);
}

.ntj-numero {
	margin: 0;
	font-size: 48px;
	font-weight: 700;
	line-height: 52px;
}

.ntj .ntj-dibujo {
	position: absolute;
	top: 0;
	right: 0;
	width: 0;
	height: 0;
	border-radius: 10px;
	object-fit: cover;
	object-position: left center;
}

.ntj .ntj-tarjeta.is-activa .ntj-dibujo {
	width: 100%;
	height: 100%;
	max-width: var(--ntj-ancho-dibujo, 415px);
}

/* El dibujo de tablet y celular solo se muestra en el carrusel deslizable. */
.ntj .ntj-dibujo-movil {
	display: none;
}

/* El detalle aparece cuando la tarjeta termina de crecer. */
.ntj-detalle {
	display: flex;
	flex-direction: column;
	gap: 16px;
	max-width: var(--ntj-ancho-texto, 65%);
	height: 0;
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transform: translateY(12px);
	transition:
		opacity 0.35s ease,
		transform 0.35s ease,
		visibility 0s linear 0.35s;
}

.ntj-tarjeta.is-activa .ntj-detalle {
	height: auto;
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
	transform: none;
	transition:
		opacity 0.4s var(--ntj-curva) 0.5s,
		transform 0.4s var(--ntj-curva) 0.5s,
		visibility 0s 0.5s;
}

.ntj-cabecera {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.ntj-cabecera h3,
.ntj-cabecera p {
	margin: 0;
}

.ntj-cabecera h3 {
	text-transform: uppercase;
}

.ntj-cabecera p {
	font-weight: 700;
}

.ntj-hacemos,
.ntj-entregamos {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.ntj-rotulo {
	margin: 0;
	font-size: 10px;
	font-weight: 300;
	line-height: 12px;
}

.ntj-hacemos ul {
	margin: 0;
	padding-left: 40px;
}

.ntj-hacemos li,
.ntj-entregamos-texto {
	font-size: var(--e-global-typography-8d111a4-font-size, 14px);
	font-weight: var(--e-global-typography-8d111a4-font-weight, 300);
	text-transform: var(--e-global-typography-8d111a4-text-transform, none);
	line-height: var(--e-global-typography-8d111a4-line-height, 18px);
}

.ntj-entregamos-texto {
	margin: 0;
	max-width: var(--ntj-ancho-entregamos, 82%);
}


/* =========================================
   TABLET Y CELULAR
========================================= */

@media (max-width: 1024px) {

	.ntj-ocultar-movil {
		display: none !important;
	}

	.ntj-flechas {
		justify-content: space-between;
	}

	.ntj .solo-desk {
		display: none;
	}

	/*
	 * Carrusel deslizable: una tarjeta por vez y las flechas la cambian.
	 * La tarjeta mide el ancho menos lo que asoma la siguiente.
	 */
	.ntj--movil-carrusel {
		--ntj-espacio-actual: var(--ntj-espacio-tablet, var(--ntj-espacio));
		--ntj-asomar-actual: var(--ntj-asomar-tablet, 0px);
		overflow: hidden;
	}

	.ntj--movil-carrusel .ntj-pista {
		gap: var(--ntj-espacio-actual);
		height: var(--ntj-alto-tablet, var(--ntj-alto));
		overflow: visible;
		transform: translateX(calc(var(--ntj-indice) * -1 * (100% - var(--ntj-asomar-actual) + var(--ntj-espacio-actual))));
		transition: transform 0.5s var(--ntj-curva);
		touch-action: pan-y;
	}

	.ntj--movil-carrusel .ntj-tarjeta,
	.ntj--movil-carrusel .ntj-tarjeta.is-activa {
		flex: 0 0 calc(100% - var(--ntj-asomar-actual));
		width: calc(100% - var(--ntj-asomar-actual));
		transition: none;
	}

	.ntj--movil-carrusel .ntj-item {
		padding: 0 16px;
	}

	.ntj--movil-carrusel .ntj-fila:not(.ntj-fila--etiquetas) {
		flex-direction: column;
		gap: 16px;
		margin-top: 16px;
	}

	.ntj--movil-carrusel .ntj-fila a.ntj-boton {
		max-width: 100%;
	}

	.ntj--movil-carrusel .ntj-fila--etiquetas {
		flex-direction: column;
		gap: 16px;
	}

	.ntj--movil-carrusel .ntj-etiquetas {
		flex-wrap: wrap;
	}

	/*
	 * Contenido dentro de la tarjeta, copiado del carrusel de Elementor Pro que
	 * Como trabajamos usaba en tablet y celular: todas las tarjetas como activas
	 * (degradado y texto visibles), cada una con su alto (el alto del widget es
	 * el minimo) y el dibujo de tablet y celular abajo a la derecha.
	 */
	.ntj--movil-carrusel.ntj--dentro .ntj-tarjeta {
		--ntj-alto-actual: var(--ntj-alto-tablet, var(--ntj-alto));
		--ntj-cabecera-actual: var(--ntj-cabecera-tablet, 100%);
		--ntj-lista-actual: var(--ntj-lista-tablet, 100%);
		--ntj-cierre-actual: var(--ntj-cierre-tablet, 100%);
	}

	.ntj--movil-carrusel.ntj--dentro .ntj-pista {
		align-items: flex-start;
		height: auto;
	}

	.ntj--movil-carrusel.ntj--dentro .ntj-tarjeta {
		height: auto;
		box-shadow: none;
	}

	.ntj--movil-carrusel.ntj--dentro .ntj-tarjeta .ntj-caja {
		min-height: var(--ntj-alto-actual);
		gap: 16px;
		padding: 20px;
		border: 0;
		color: #F4F4F4;
		background: linear-gradient(83deg, #120D0C -7.25%, #680800 16.4%, #B01401 38.73%, #D93E00 78.15%, #DF824E 100%);
	}

	.ntj--movil-carrusel.ntj--dentro .ntj-dibujo {
		display: none;
	}

	.ntj--movil-carrusel.ntj--dentro .ntj-dibujo-movil {
		display: block;
		position: absolute;
		inset: 0;
		width: 100%;
		height: 100%;
		max-width: none;
		border-radius: 10px;
		object-fit: contain;
		object-position: right bottom;
		pointer-events: none;
	}

	.ntj--movil-carrusel.ntj--dentro .ntj-numero {
		position: relative;
		z-index: 1;
		font-size: 28px;
		line-height: 32px;
	}

	.ntj--movil-carrusel.ntj--dentro .ntj-detalle {
		position: relative;
		z-index: 1;
		width: 100%;
		max-width: 100%;
		height: auto;
		opacity: 1;
		visibility: visible;
		pointer-events: auto;
		transform: none;
		transition: none;
	}

	.ntj--movil-carrusel.ntj--dentro .ntj-cabecera {
		width: var(--ntj-cabecera-actual);
		gap: 8px;
	}

	.ntj--movil-carrusel.ntj--dentro .ntj-cabecera h3 {
		font-size: 20px;
		line-height: 24px;
	}

	.ntj--movil-carrusel.ntj--dentro .ntj-hacemos,
	.ntj--movil-carrusel.ntj--dentro .ntj-entregamos {
		gap: 6px;
	}

	.ntj--movil-carrusel.ntj--dentro .ntj-hacemos {
		width: var(--ntj-lista-actual);
	}

	.ntj--movil-carrusel.ntj--dentro .ntj-entregamos {
		width: var(--ntj-cierre-actual);
	}

	.ntj--movil-carrusel.ntj--dentro .ntj-entregamos-texto {
		max-width: none;
	}

	.ntj--movil-carrusel.ntj--dentro .ntj-hacemos ul {
		padding-left: 16px;
	}
}

@media (min-width: 768px) and (max-width: 1024px) {

	.ntj--movil-carrusel.ntj--dentro .ntj-hacemos li,
	.ntj--movil-carrusel.ntj--dentro .ntj-entregamos-texto {
		font-size: 14px;
		line-height: 17px;
	}
}

@media (max-width: 767px) {

	.ntj--movil-carrusel {
		--ntj-espacio-actual: var(--ntj-espacio-movil, var(--ntj-espacio));
		--ntj-asomar-actual: var(--ntj-asomar-movil, 0px);
	}

	.ntj--movil-carrusel .ntj-pista {
		height: var(--ntj-alto-movil, var(--ntj-alto-tablet, var(--ntj-alto)));
	}

	.ntj--movil-carrusel.ntj--dentro .ntj-tarjeta {
		--ntj-alto-actual: var(--ntj-alto-movil, var(--ntj-alto-tablet, var(--ntj-alto)));
		--ntj-cabecera-actual: var(--ntj-cabecera-movil, 100%);
		--ntj-lista-actual: var(--ntj-lista-movil, 100%);
		--ntj-cierre-actual: var(--ntj-cierre-movil, 100%);
	}

	.ntj--movil-carrusel.ntj--dentro .ntj-pista {
		height: auto;
	}
}

@media (prefers-reduced-motion: reduce) {

	.ntj *,
	.ntj-flechas * {
		transition: none !important;
		animation: none !important;
	}
}
