/* =========================================================================
   FOTON — Hero Slider
   Sistema blanco y negro estricto.
   Tipografía: solo las variables globales de Divi. Sin letter-spacing
   en botones.
   ========================================================================= */

.fth-hero {
	--fth-black:    #000000;
	--fth-white:    #ffffff;
	--fth-gray-500: #6B6B6B;
	--fth-gray-200: #E5E5E5;

	--fth-radius: 999px;

	--fth-pad-x: clamp(20px, 6vw, 96px);
	--fth-ui-h:  76px;

	position: relative;
	width: 100%;
	height: var(--fth-hero-h, 72vh);
	min-height: 520px;
	max-height: 860px;
	overflow: hidden;
	background: var(--fth-black);
	isolation: isolate;
}

.fth-hero__track {
	position: absolute;
	inset: 0;
}


/* -------------------------------------------------------------------------
   Slides
   Se muestran con opacity + visibility, nunca con display,
   o las animaciones de entrada no disparan.
   ---------------------------------------------------------------------- */

.fth-hero__slide {
	position: absolute;
	inset: 0;
	opacity: 0;
	visibility: hidden;
	transition: opacity .7s ease, visibility 0s linear .7s;
	z-index: 1;
}

.fth-hero__slide.is-active,
.fth-hero__slide.is-entering {
	opacity: 1;
	visibility: visible;
	transition: opacity .7s ease, visibility 0s;
	z-index: 2;
}

.fth-hero__slide.is-leaving {
	z-index: 1;
}


/* -------------------------------------------------------------------------
   Media
   El video es una sola capa en todos los breakpoints: object-fit lo
   recorta al formato vertical en mobile.
   ---------------------------------------------------------------------- */

.fth-hero__media {
	position: absolute;
	inset: 0;
	background-position: center;
	background-size: cover;
	background-repeat: no-repeat;
}

.fth-hero__media--empty {
	background-color: #111111;
}

.fth-hero__media--full {
	display: block;
}

.fth-hero__video {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
	display: block;
}

.fth-hero__media.fth-hero__media--mobile  { display: none; }
.fth-hero__media.fth-hero__media--desktop { display: block; }

.fth-hero__overlay {
	position: absolute;
	inset: 0;
	background: var(--fth-black);
	pointer-events: none;
}

/* Degradado de legibilidad en la base. Sostiene el texto, no decora.
   En slides de solo media no aparece: si la pieza es cerrada,
   oscurecerle el pie es ensuciarla. */
.fth-hero__slide:not(.is-mediaonly)::after {
	content: '';
	position: absolute;
	inset: auto 0 0 0;
	height: 62%;
	background: linear-gradient(to top, rgba(0,0,0,.72), rgba(0,0,0,0));
	pointer-events: none;
}

.fth-hero__slide.is-dark:not(.is-mediaonly)::after {
	background: linear-gradient(to top, rgba(255,255,255,.72), rgba(255,255,255,0));
}


/* -------------------------------------------------------------------------
   Contenido
   Sin etiquetas h1–h6: la jerarquía es visual, el SEO lo maneja el resto
   de la página.
   ---------------------------------------------------------------------- */

.fth-hero__inner {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: flex-end;
	padding: 0 var(--fth-pad-x) calc(var(--fth-ui-h) + 24px);
	z-index: 3;
}

.fth-hero__slide.is-align-center .fth-hero__inner {
	align-items: center;
	justify-content: center;
	padding-bottom: var(--fth-ui-h);
	text-align: center;
}

.fth-hero__content {
	max-width: 640px;
	color: var(--fth-white);
}

.fth-hero__slide.is-dark .fth-hero__content {
	color: var(--fth-black);
}

.fth-hero__eyebrow {
	display: block;
	font-family: var(--et_global_body_font), sans-serif;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: inherit;
	opacity: .72;
	margin-bottom: 14px;
}

.fth-hero__title {
	display: block;
	font-family: var(--et_global_heading_font, 'Geist'), sans-serif;
	font-weight: 500;
	font-size: clamp(2rem, 4.2vw, 3.75rem);
	line-height: 1.04;
	letter-spacing: -0.035em;
	white-space: nowrap;
	color: inherit;
	margin: 0;
}

.fth-hero__desc {
	font-family: var(--et_global_body_font), sans-serif;
	font-size: clamp(.95rem, 1.15vw, 1.0625rem);
	line-height: 1.55;
	max-width: 46ch;
	margin: 18px 0 0;
	color: inherit;
	opacity: .88;
}

.fth-hero__slide.is-align-center .fth-hero__desc {
	margin-left: auto;
	margin-right: auto;
}

.fth-hero__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin-top: 32px;
}

.fth-hero__slide.is-align-center .fth-hero__actions {
	justify-content: center;
}


/* -------------------------------------------------------------------------
   Botones
   Píldora, sin letter-spacing. Primario blanco con letra negra,
   invertido sobre media clara.
   ---------------------------------------------------------------------- */

.fth-hero__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 52px;
	padding: 0 34px;
	border: 1px solid transparent;
	border-radius: var(--fth-radius);
	font-family: var(--et_global_body_font), sans-serif;
	font-size: 14px;
	font-weight: 600;
	letter-spacing: normal;
	text-decoration: none;
	cursor: pointer;
	transition: background-color .22s ease, border-color .22s ease, color .22s ease, opacity .22s ease;
}

.fth-hero__btn--primary {
	background: var(--fth-white);
	border-color: var(--fth-white);
	color: var(--fth-black);
}

.fth-hero__btn--primary:hover,
.fth-hero__btn--primary:focus-visible {
	background: var(--fth-gray-200);
	border-color: var(--fth-gray-200);
	color: var(--fth-black);
}

.fth-hero__slide.is-dark .fth-hero__btn--primary {
	background: var(--fth-black);
	border-color: var(--fth-black);
	color: var(--fth-white);
}

.fth-hero__slide.is-dark .fth-hero__btn--primary:hover,
.fth-hero__slide.is-dark .fth-hero__btn--primary:focus-visible {
	background: #1a1a1a;
	border-color: #1a1a1a;
	color: var(--fth-white);
}

.fth-hero__btn--ghost {
	background: transparent;
	border-color: rgba(255, 255, 255, .55);
	color: var(--fth-white);
}

.fth-hero__btn--ghost:hover,
.fth-hero__btn--ghost:focus-visible {
	background: var(--fth-white);
	border-color: var(--fth-white);
	color: var(--fth-black);
}

.fth-hero__slide.is-dark .fth-hero__btn--ghost {
	border-color: rgba(0, 0, 0, .45);
	color: var(--fth-black);
}

.fth-hero__slide.is-dark .fth-hero__btn--ghost:hover,
.fth-hero__slide.is-dark .fth-hero__btn--ghost:focus-visible {
	background: var(--fth-black);
	border-color: var(--fth-black);
	color: var(--fth-white);
}

.fth-hero__btn--text {
	background: transparent;
	padding: 0 0 3px;
	min-height: 0;
	color: inherit;
	border: 0;
	border-bottom: 1px solid currentColor;
	border-radius: 0;
	align-self: center;
}

.fth-hero__btn--text:hover,
.fth-hero__btn--text:focus-visible {
	opacity: .7;
	color: inherit;
}


/* -------------------------------------------------------------------------
   Flechas — circulares, centradas a los costados
   ---------------------------------------------------------------------- */

.fth-hero__arrow {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 52px;
	height: 52px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	appearance: none;
	background: rgba(255, 255, 255, .12);
	border: 1px solid rgba(255, 255, 255, .38);
	border-radius: 50%;
	color: var(--fth-white);
	cursor: pointer;
	z-index: 5;
	backdrop-filter: blur(6px);
	-webkit-backdrop-filter: blur(6px);
	transition: background-color .22s ease, border-color .22s ease, color .22s ease;
}

.fth-hero__arrow--prev { left: clamp(12px, 2.4vw, 34px); }
.fth-hero__arrow--next { right: clamp(12px, 2.4vw, 34px); }

.fth-hero__arrow:hover,
.fth-hero__arrow:focus-visible {
	background: var(--fth-white);
	border-color: var(--fth-white);
	color: var(--fth-black);
}

.fth-hero__arrow svg {
	width: 18px;
	height: 18px;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.6;
	stroke-linecap: round;
	stroke-linejoin: round;
}

/* Los controles viven fuera de los slides, así que no heredan su color.
   El JS pone .is-ui-dark en el contenedor cuando el slide activo
   lleva texto oscuro. */
.fth-hero.is-ui-dark .fth-hero__arrow {
	background: rgba(0, 0, 0, .10);
	border-color: rgba(0, 0, 0, .32);
	color: var(--fth-black);
}

.fth-hero.is-ui-dark .fth-hero__arrow:hover,
.fth-hero.is-ui-dark .fth-hero__arrow:focus-visible {
	background: var(--fth-black);
	border-color: var(--fth-black);
	color: var(--fth-white);
}


/* -------------------------------------------------------------------------
   Paginación — barras de 80px
   El relleno del dot activo marca el avance del autoplay.
   ---------------------------------------------------------------------- */

.fth-hero__index {
	position: absolute;
	left: 50%;
	transform: translateX(-50%);
	bottom: 30px;
	display: flex;
	align-items: center;
	gap: 10px;
	z-index: 5;
}

.fth-hero__dot {
	position: relative;
	appearance: none;
	width: 80px;
	height: 3px;
	padding: 0;
	border: 0;
	border-radius: 2px;
	background: rgba(255, 255, 255, .32);
	cursor: pointer;
	overflow: hidden;
	transition: background-color .22s ease;
}

/* Área táctil real sin engordar la barra */
.fth-hero__dot::before {
	content: '';
	position: absolute;
	inset: -14px 0;
}

.fth-hero__dot::after {
	content: '';
	position: absolute;
	inset: 0 auto 0 0;
	width: 0;
	background: var(--fth-white);
	border-radius: 2px;
}

.fth-hero__dot:hover {
	background: rgba(255, 255, 255, .55);
}

.fth-hero__dot.is-active::after {
	width: 100%;
}

/* Con autoplay activo, el relleno acompaña el temporizador */
.fth-hero[data-autoplay]:not([data-autoplay="0"]) .fth-hero__dot.is-active::after {
	width: 0;
	animation: fth-fill var(--fth-autoplay, 7000ms) linear forwards;
}

.fth-hero.is-paused .fth-hero__dot.is-active::after {
	animation-play-state: paused;
}

@keyframes fth-fill {
	to { width: 100%; }
}

.fth-hero.is-ui-dark .fth-hero__dot { background: rgba(0, 0, 0, .26); }
.fth-hero.is-ui-dark .fth-hero__dot:hover { background: rgba(0, 0, 0, .45); }
.fth-hero.is-ui-dark .fth-hero__dot::after { background: var(--fth-black); }

.fth-hero :focus-visible {
	outline: 2px solid var(--fth-white);
	outline-offset: 3px;
}

.fth-hero.is-ui-dark :focus-visible {
	outline-color: var(--fth-black);
}


/* -------------------------------------------------------------------------
   Entrada del contenido
   Un solo gesto escalonado y corto. El movimiento solo marca
   el cambio de slide.
   ---------------------------------------------------------------------- */

.fth-hero__eyebrow,
.fth-hero__title,
.fth-hero__desc,
.fth-hero__actions {
	opacity: 0;
	transform: translateY(22px);
}

.fth-hero__slide.is-active .fth-hero__eyebrow,
.fth-hero__slide.is-entering .fth-hero__eyebrow {
	animation: fth-up .7s cubic-bezier(.16, 1, .3, 1) .25s forwards;
}

.fth-hero__slide.is-active .fth-hero__title,
.fth-hero__slide.is-entering .fth-hero__title {
	animation: fth-up .7s cubic-bezier(.16, 1, .3, 1) .34s forwards;
}

.fth-hero__slide.is-active .fth-hero__desc,
.fth-hero__slide.is-entering .fth-hero__desc {
	animation: fth-up .7s cubic-bezier(.16, 1, .3, 1) .43s forwards;
}

.fth-hero__slide.is-active .fth-hero__actions,
.fth-hero__slide.is-entering .fth-hero__actions {
	animation: fth-up .7s cubic-bezier(.16, 1, .3, 1) .52s forwards;
}

@keyframes fth-up {
	to { opacity: 1; transform: translateY(0); }
}


/* -------------------------------------------------------------------------
   Mobile
   Las flechas se mantienen, más pequeñas y pegadas al borde.
   ---------------------------------------------------------------------- */

@media (max-width: 980px) {
	.fth-hero__title { font-size: clamp(1.75rem, 5vw, 2.5rem); }
	.fth-hero__arrow { width: 46px; height: 46px; }
}

@media (max-width: 770px) {

	.fth-hero {
		--fth-ui-h: 60px;
		height: calc(100vw * 8 / 5);   /* vertical 5:8 */
		min-height: 0;
		max-height: 100svh;
	}

	.fth-hero__media.fth-hero__media--desktop { display: none; }
	.fth-hero__media.fth-hero__media--mobile  { display: block; }

	.fth-hero__inner {
		padding-bottom: calc(var(--fth-ui-h) + 16px);
	}

	.fth-hero__title {
		white-space: normal;           /* en mobile sí puede romper */
		font-size: clamp(1.6rem, 7.6vw, 2.25rem);
	}

	.fth-hero__desc {
		font-size: .95rem;
		margin-top: 14px;
	}

	.fth-hero__actions {
		margin-top: 24px;
		gap: 10px;
	}

	.fth-hero__btn {
		min-height: 48px;
		padding: 0 26px;
		font-size: 13px;
	}

	.fth-hero__arrow {
		width: 40px;
		height: 40px;
	}

	.fth-hero__arrow svg {
		width: 15px;
		height: 15px;
	}

	.fth-hero__arrow--prev { left: 10px; }
	.fth-hero__arrow--next { right: 10px; }

	.fth-hero__index {
		bottom: 22px;
		gap: 8px;
	}

	.fth-hero__dot { width: 48px; }
}

@media (max-width: 420px) {
	.fth-hero__dot { width: 34px; }
	.fth-hero__arrow { width: 36px; height: 36px; }
}


/* -------------------------------------------------------------------------
   Movimiento reducido
   ---------------------------------------------------------------------- */

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

	.fth-hero__slide { transition: opacity .01ms; }

	.fth-hero__eyebrow,
	.fth-hero__title,
	.fth-hero__desc,
	.fth-hero__actions {
		opacity: 1;
		transform: none;
		animation: none !important;
	}

	.fth-hero__dot.is-active::after {
		width: 100% !important;
		animation: none !important;
	}
}
