/* =========================================================
   Nexo Speakers — CSS de las tarjetas, grid y slider
   Paleta de marca: navy #010532 · naranja #ef5a25 · crema #f5f0e8
   Tipografia base: Bebas Neue (nombre) · DM Sans (cargo/descripcion)
   Las propiedades de tipografia del nombre/cargo se dejan como
   valores directos (no CSS vars) a proposito: los controles de
   Elementor (Group_Control_Typography) generan reglas que apuntan
   directo a estas clases y necesitan poder pisarlas por cascada.
   ========================================================= */

:root {
	--ns-navy: #010532;
	--ns-orange: #ef5a25;
	--ns-cream: #f5f0e8;
	--ns-photo-bg: #dedad0;
}

.nexo-speakers-grid,
.nexo-speakers-slider {
	box-sizing: border-box;
}
.nexo-speakers-grid *,
.nexo-speakers-slider * {
	box-sizing: border-box;
}

/* ---------- Tarjeta ---------- */

.nexo-speaker-card {
	display: block;
	color: var(--ns-navy);
	background: transparent;
	/* CRÍTICO: sin esto, un nombre largo sin wrap (ver .name-words más abajo)
	   fuerza esta columna del grid a ser más ancha que las demás -- ya paso
	   una vez que esta linea se perdio en una reescritura y el bug volvio. */
	min-width: 0;
}

.nexo-speaker-card__media {
	position: relative;
	aspect-ratio: 4 / 5;
	overflow: hidden;
	background: var(--ns-photo-bg);
	cursor: default;
}
.nexo-speaker-card__media[role="button"] {
	cursor: pointer;
}
.nexo-speaker-card__media:focus-visible {
	outline: 2px solid var(--ns-orange);
	outline-offset: 3px;
}

.nexo-speaker-card__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.nexo-speaker-card__placeholder {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	color: rgba(1, 5, 50, 0.38);
}
.nexo-speaker-card__placeholder svg {
	width: 34%;
	height: 34%;
	max-width: 110px;
	max-height: 110px;
}

/* ---- panel de descripcion: vidrio sobre la foto, con spotlight que sigue el mouse ---- */

.nexo-speaker-card__desc {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	padding: 26px;
	background: rgba(1, 5, 50, 0.46);
	-webkit-backdrop-filter: blur(18px) saturate(150%);
	backdrop-filter: blur(18px) saturate(150%);
	border: 1px solid rgba(245, 240, 232, 0.14);
	opacity: 0;
	transform: scale(1.035);
	pointer-events: none;
	transition: opacity 0.5s ease, transform 0.5s ease;
	--spot-x: 50%;
	--spot-y: 40%;
}
.nexo-speaker-card__desc::before {
	content: "";
	position: absolute;
	inset: 0;
	pointer-events: none;
	background: radial-gradient(circle 220px at var(--spot-x) var(--spot-y), rgba(245, 240, 232, 0.16), transparent 70%);
	opacity: 0;
	transition: opacity 0.4s ease;
}
@media (hover: hover) {
	.nexo-speaker-card__media:hover .nexo-speaker-card__desc {
		opacity: 1;
		transform: scale(1);
		pointer-events: auto;
	}
}
.nexo-speaker-card__media:focus-visible .nexo-speaker-card__desc,
.nexo-speaker-card__media.is-active .nexo-speaker-card__desc {
	opacity: 1;
	transform: scale(1);
	pointer-events: auto;
}
.nexo-speaker-card__desc:hover::before {
	opacity: 1;
}
.nexo-speaker-card__desc-body {
	position: relative;
	max-height: 100%;
	overflow-y: auto;
}
.nexo-speaker-card__desc-body p {
	margin: 0 0 12px;
	font-family: "DM Sans", sans-serif;
	font-weight: 400;
	font-size: 1.05rem;
	line-height: 1.6;
	color: var(--ns-cream);
}
.nexo-speaker-card__desc-body p:last-child {
	margin-bottom: 0;
}

.nexo-speaker-card__flag {
	position: absolute;
	right: 18px;
	bottom: 18px;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	overflow: hidden;
	border: 2px solid #fff;
	box-sizing: border-box;
	z-index: 2;
	display: block;
}
.nexo-speaker-card__flag svg {
	width: 100%;
	height: 100%;
	display: block;
}
@media (max-width: 600px) {
	.nexo-speaker-card__flag {
		width: 34px;
		height: 34px;
		right: 12px;
		bottom: 12px;
	}
}

.nexo-speaker-card__info {
	padding: 14px 0 0;
}

.nexo-speaker-card__name-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
}

.nexo-speaker-card__name {
	margin: 0;
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
	min-width: 0;
	font-family: "Bebas Neue", Impact, sans-serif;
	font-weight: 400;
	font-size: 1.6rem;
	text-transform: uppercase;
	letter-spacing: 0.01em;
	line-height: 1.05;
}
.nexo-speaker-card__name-words {
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.nexo-speaker-card__nombre {
	color: var(--ns-navy);
}
.nexo-speaker-card__apellido {
	color: var(--ns-orange);
}

.nexo-speaker-card__arrow {
	flex: none;
	width: 1.2rem;
	height: 1.2rem;
	color: var(--ns-arrow-color, var(--ns-navy));
	transition: color 0.3s ease;
}
.nexo-speaker-card__arrow svg {
	width: 100%;
	height: 100%;
	display: block;
}
.nexo-speaker-card:hover .nexo-speaker-card__arrow {
	color: var(--ns-orange);
}

.nexo-speaker-card__role {
	margin: 6px 0 0;
	font-family: "DM Sans", sans-serif;
	font-weight: 400;
	font-size: 0.9rem;
	line-height: 1.35;
	color: rgba(1, 5, 50, 0.6);
}

@media (prefers-reduced-motion: reduce) {
	.nexo-speaker-card__desc,
	.nexo-speaker-card__arrow,
	.nexo-speakers-slider__track {
		transition: none !important;
	}
}

/* Tamaños por breakpoint de dispositivo (no vw): un vw fijo no sabe cuántas
   columnas eligió el usuario en el widget, así que en grids de 5-6 columnas
   el texto podía verse desproporcionado. Esto es predecible sin importar
   la cantidad de columnas. */
@media (max-width: 1024px) {
	.nexo-speaker-card__name {
		font-size: 1.4rem;
	}
	.nexo-speaker-card__desc-body p {
		font-size: 1rem;
	}
}
@media (max-width: 600px) {
	.nexo-speaker-card__name {
		font-size: 1.25rem;
	}
	.nexo-speaker-card__desc-body p {
		font-size: 0.92rem;
	}
	.nexo-speaker-card__desc {
		padding: 18px;
	}
}

/* ---------- Grid ---------- */

.nexo-speakers-grid {
	display: grid;
	grid-template-columns: repeat(var(--ns-grid-columns, 4), 1fr);
	gap: var(--ns-grid-gap, 24px);
}
/* Los valores por breakpoint (4 desktop / 2 tablet / 1 mobile) los define el
   responsive control "Columnas" del widget en Elementor -- no se hardcodean
   aquí para no competir con los breakpoints reales que configuró el sitio. */

/* ---------- Slider (autoplay por pasos + dots, sin padding lateral) ---------- */

.nexo-speakers-slider {
	position: relative;
	--ns-slides-visible: 4;
	padding: 0;
}
/* Igual que en el grid: 4/2/1 por breakpoint lo define el responsive control
   "Tarjetas visibles" del widget, no un media query fijo aquí. */
.nexo-speakers-slider__viewport {
	overflow: hidden;
}
.nexo-speakers-slider__track {
	display: flex;
	gap: 24px;
	will-change: transform;
	cursor: grab;
}
.nexo-speakers-slider__track.is-animating {
	transition: transform 0.6s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.nexo-speakers-slider__track:active {
	cursor: grabbing;
}
.nexo-speakers-slider__slide {
	flex: 0 0 calc((100% - (var(--ns-slides-visible) - 1) * 24px) / var(--ns-slides-visible));
	min-width: 0;
}
.nexo-speakers-slider__dots {
	display: flex;
	justify-content: center;
	gap: 8px;
	margin-top: 28px;
}
.nexo-speakers-slider__dots button {
	width: 8px;
	height: 8px;
	padding: 0;
	border: none;
	border-radius: 0;
	background: rgba(1, 5, 50, 0.2);
	cursor: pointer;
}
.nexo-speakers-slider__dots button.is-active {
	width: 22px;
	background: var(--ns-orange);
}

/* ---- tarjeta CTA "Ver más speakers" (última slide, opcional) ---- */

.nexo-speakers-cta-card {
	height: 100%;
	min-height: 260px;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 16px;
	text-align: center;
	text-decoration: none;
	color: var(--ns-navy);
	padding: 24px;
	background: rgba(1, 5, 50, 0.06);
	-webkit-backdrop-filter: blur(10px);
	backdrop-filter: blur(10px);
	transition: background 0.3s ease;
}
.nexo-speakers-cta-card:hover {
	background: rgba(1, 5, 50, 0.1);
}
.nexo-speakers-cta-card:focus-visible {
	outline: 2px solid var(--ns-orange);
	outline-offset: 3px;
}
.nexo-speakers-cta-card__icon {
	flex: none;
	width: 52px;
	height: 52px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--ns-navy);
	color: var(--ns-cream);
	transition: background 0.3s ease;
}
.nexo-speakers-cta-card__icon svg {
	width: 22px;
	height: 22px;
}
.nexo-speakers-cta-card:hover .nexo-speakers-cta-card__icon {
	background: var(--ns-orange);
}
.nexo-speakers-cta-card__label {
	font-family: "Bebas Neue", Impact, sans-serif;
	font-size: 1.3rem;
	text-transform: uppercase;
	letter-spacing: 0.02em;
	line-height: 1.2;
}
@media (max-width: 600px) {
	.nexo-speakers-cta-card {
		min-height: 200px;
		gap: 12px;
	}
	.nexo-speakers-cta-card__icon {
		width: 44px;
		height: 44px;
	}
	.nexo-speakers-cta-card__label {
		font-size: 1.1rem;
	}
}

.nexo-speakers-slider__nav {
	position: absolute;
	top: 40%;
	transform: translateY(-50%);
	width: 40px;
	height: 40px;
	padding: 0;
	border: none;
	border-radius: 50%;
	background: transparent;
	color: var(--ns-navy);
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	z-index: 3;
	transition: color 0.25s ease;
}
.nexo-speakers-slider__nav svg {
	width: 22px;
	height: 22px;
	display: block;
}
.nexo-speakers-slider__nav:hover {
	color: var(--ns-orange);
}
.nexo-speakers-slider__nav--prev {
	left: -56px;
}
.nexo-speakers-slider__nav--next {
	right: -56px;
}
.nexo-speakers-slider__nav[disabled] {
	opacity: 0;
	pointer-events: none;
}
@media (max-width: 1024px) {
	.nexo-speakers-slider__nav--prev {
		left: -40px;
	}
	.nexo-speakers-slider__nav--next {
		right: -40px;
	}
}
@media (max-width: 600px) {
	/* En mobile el peek (ver --ns-slides-visible más abajo) ya comunica que
	   hay más ponentes, así que las flechas se ocultan del todo ahí. */
	.nexo-speakers-slider__nav {
		display: none;
	}
}

/* =========================================================
   Popup — aparece como overlay fijo a los segundos, con título,
   hasta 3 ponentes y un botón. Cierra con la X, el fondo, o Escape.
   Todo el dimensionamiento vertical usa vh (no scroll nunca): si la
   pantalla es baja, las fotos y espaciados se achican solos.
   ========================================================= */

.nexo-popup {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.45s cubic-bezier(0.16, 1, 0.3, 1), visibility 0s linear 0.45s;
}
.nexo-popup.is-visible {
	opacity: 1;
	visibility: visible;
	transition: opacity 0.45s cubic-bezier(0.16, 1, 0.3, 1), visibility 0s linear 0s;
}
.nexo-popup__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(1, 5, 50, 0.72);
	-webkit-backdrop-filter: blur(4px);
	backdrop-filter: blur(4px);
}
.nexo-popup__box {
	position: relative;
	background: var(--ns-cream);
	border-radius: 28px;
	padding: clamp(22px, 4.5vh, 46px) clamp(24px, 4.5vw, 64px);
	max-width: 900px;
	width: 100%;
	max-height: calc(100vh - 40px);
	overflow: hidden;
	display: flex;
	flex-direction: column;
	justify-content: center;
	text-align: center;
	opacity: 0;
	transform: scale(0.94) translateY(14px);
	transition: opacity 0.45s cubic-bezier(0.16, 1, 0.3, 1), transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}
.nexo-popup.is-visible .nexo-popup__box {
	opacity: 1;
	transform: scale(1) translateY(0);
}
@media (prefers-reduced-motion: reduce) {
	.nexo-popup,
	.nexo-popup__box {
		transition: none;
	}
}

.nexo-popup__close {
	position: absolute;
	top: 16px;
	right: 16px;
	width: 38px;
	height: 38px;
	border-radius: 50%;
	border: none;
	background: rgba(1, 5, 50, 0.06);
	color: var(--ns-navy);
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: background 0.2s ease, color 0.2s ease;
}
.nexo-popup__close svg {
	width: 16px;
	height: 16px;
}
.nexo-popup__close:hover {
	background: var(--ns-orange);
	color: #fff;
}

.nexo-popup__title {
	font-family: "Bebas Neue", Impact, sans-serif;
	font-weight: 400;
	font-size: clamp(1.5rem, 2vw + 3.5vh, 3rem);
	color: var(--ns-navy);
	margin: 0 0 clamp(14px, 3vh, 32px);
	letter-spacing: 0.01em;
	line-height: 1.1;
	flex-shrink: 0;
}

.nexo-popup__speakers {
	display: flex;
	justify-content: center;
	align-items: flex-start;
	gap: clamp(10px, 2.5vw, 22px);
	flex-wrap: wrap;
	margin-bottom: clamp(16px, 3vh, 36px);
	min-height: 0;
}
.nexo-popup-speaker {
	flex: 0 0 auto;
	max-width: 210px;
	min-width: 0;
	text-align: center;
}
.nexo-popup-speaker .nexo-speaker-card__media {
	position: relative;
	height: clamp(64px, 22vh, 220px);
	width: auto;
	aspect-ratio: 4 / 5;
	overflow: hidden;
	border-radius: 14px;
	background: var(--ns-photo-bg);
	margin: 0 auto;
}
.nexo-popup-speaker .nexo-speaker-card__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}
.nexo-popup-speaker .nexo-speaker-card__placeholder {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	color: rgba(1, 5, 50, 0.38);
}
.nexo-popup-speaker .nexo-speaker-card__placeholder svg {
	width: 34%;
	height: 34%;
	max-width: 64px;
	max-height: 64px;
}
.nexo-popup-speaker .nexo-speaker-card__flag {
	position: absolute;
	right: 9px;
	bottom: 9px;
	width: 30px;
	height: 30px;
	border-radius: 50%;
	overflow: hidden;
	border: 2px solid #fff;
}
.nexo-popup-speaker .nexo-speaker-card__info {
	padding: clamp(6px, 1.5vh, 12px) 0 0;
}
.nexo-popup-speaker .nexo-speaker-card__name {
	margin: 0;
	font-family: "Bebas Neue", Impact, sans-serif;
	font-weight: 400;
	font-size: clamp(0.85rem, 2vh, 1.2rem);
	line-height: 1.1;
	text-transform: uppercase;
	display: flex;
	justify-content: center;
	gap: 5px;
	flex-wrap: wrap;
}
.nexo-popup-speaker .nexo-speaker-card__name-words {
	white-space: normal;
	overflow-wrap: break-word;
}
.nexo-popup-speaker .nexo-speaker-card__nombre {
	color: var(--ns-navy);
}
.nexo-popup-speaker .nexo-speaker-card__apellido {
	color: var(--ns-orange);
}
.nexo-popup-speaker .nexo-speaker-card__role {
	margin: 4px 0 0;
	font-family: "DM Sans", sans-serif;
	font-size: clamp(0.7rem, 1.6vh, 0.88rem);
	color: rgba(1, 5, 50, 0.6);
	line-height: 1.3;
	max-height: 2.8em;
	overflow: hidden;
}

.nexo-popup__button {
	display: inline-flex;
	align-items: center;
	background: var(--ns-orange);
	color: #fff;
	font-family: "DM Sans", sans-serif;
	font-weight: 700;
	font-size: clamp(0.85rem, 1.8vh, 1rem);
	padding: clamp(10px, 2.2vh, 15px) clamp(22px, 4vw, 32px);
	border-radius: 999px;
	text-decoration: none;
	transition: background 0.3s ease, transform 0.15s ease;
	flex-shrink: 0;
}
.nexo-popup__button:hover {
	background: var(--ns-navy);
}
.nexo-popup__button:active {
	transform: scale(0.96);
}

.nexo-popup__remember {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	margin-top: 12px;
	font-family: "DM Sans", sans-serif;
	font-size: 0.82rem;
	color: rgba(1, 5, 50, 0.6);
	cursor: pointer;
	user-select: none;
	flex-shrink: 0;
}
.nexo-popup__remember-checkbox {
	width: 16px;
	height: 16px;
	accent-color: var(--ns-orange);
	cursor: pointer;
	flex: none;
}

@media (max-width: 600px) {
	.nexo-popup__box {
		padding: clamp(20px, 4vh, 34px) 18px;
		border-radius: 20px;
	}
	.nexo-popup__speakers {
		gap: 12px;
		flex-wrap: nowrap;
	}
	.nexo-popup-speaker {
		flex: 0 0 calc((100% - 2 * 12px) / 3);
		max-width: none;
		min-width: 0;
	}
	.nexo-popup-speaker .nexo-speaker-card__media {
		width: 100%;
		height: auto;
		max-height: clamp(64px, 20vh, 180px);
	}
	.nexo-popup-speaker .nexo-speaker-card__name {
		font-size: 0.82rem;
		gap: 3px;
	}
	.nexo-popup-speaker .nexo-speaker-card__flag {
		width: 22px;
		height: 22px;
		right: 6px;
		bottom: 6px;
	}
	.nexo-popup-speaker .nexo-speaker-card__role {
		display: none; /* poco espacio en mobile manteniendo las 3 en fila horizontal */
	}
}
