/* Hero slider — sustituye a Slider Revolution 6.1.8 (rejilla original 1240x600) */

.hs {
	position: relative;
	overflow: hidden;
	/* --u ≈ 1px de la rejilla original de 1240px; escala de forma continua */
	--u: calc(min(100vw, 1240px) / 1240);
	--hs-fade: 1000ms;
	height: calc(600 * var(--u));
	background: #0c0c0c;
}

.hs-slide {
	position: absolute;
	inset: 0;
	opacity: 0;
	visibility: hidden;
	transition: opacity var(--hs-fade) ease, visibility 0s linear var(--hs-fade);
}

.hs-slide.is-active {
	opacity: 1;
	visibility: visible;
	transition: opacity var(--hs-fade) ease, visibility 0s;
	z-index: 1;
}

/* Fondo a sangre; el LQIP evita el flash en blanco mientras carga */
.hs-bg {
	position: absolute;
	inset: 0;
	background-size: cover;
	background-position: center;
}

.hs-bg img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

/* Rejilla centrada de 1240x600 donde se posicionan las capas */
.hs-grid {
	position: absolute;
	top: 0;
	left: 50%;
	width: calc(1240 * var(--u));
	height: calc(600 * var(--u));
	transform: translateX(-50%);
	z-index: 2;
}

.hs-layer {
	position: absolute;
	box-sizing: content-box;
	margin: 0;
	color: #fff;
	opacity: 0;
}

.hs-mask {
	overflow: hidden;
}

.hs-mask > span {
	display: block;
}

/* ---------- Slide 1 ---------- */

.hs-s1-title {
	left: calc(157 * var(--u));
	top: calc(54 * var(--u));
	width: calc(908 * var(--u));
	padding: calc(5 * var(--u)) 0;
	background-color: #018fa3;
	font-family: Roboto, sans-serif;
	font-size: calc(36 * var(--u));
	line-height: calc(40 * var(--u));
	letter-spacing: calc(1 * var(--u));
	font-weight: 500;
}

.hs-s1-text {
	left: calc(155 * var(--u));
	top: calc(104 * var(--u));
	width: calc(633 * var(--u));
	height: calc(134 * var(--u));
	padding: calc(5 * var(--u));
	background-color: rgba(12, 12, 12, 0.54);
	font-family: Roboto, sans-serif;
	font-size: calc(17 * var(--u));
	line-height: calc(20 * var(--u));
}

/* ---------- Slide 2 ---------- */

.hs-s2-title {
	left: calc(9 * var(--u));
	top: calc(125 * var(--u));
	font-family: Asap, sans-serif;
	font-size: calc(55 * var(--u));
	line-height: calc(60 * var(--u));
	font-weight: 600;
}

.hs-s2-text {
	left: calc(12 * var(--u));
	top: calc(187 * var(--u));
	font-family: "Open Sans", sans-serif;
	font-size: calc(16 * var(--u));
	line-height: calc(60 * var(--u));
	font-weight: 600;
	text-align: center;
}

.hs-s2-btn {
	left: calc(153 * var(--u));
	top: calc(272 * var(--u));
	font-family: Asap, sans-serif;
	font-size: calc(16 * var(--u));
	line-height: calc(22 * var(--u));
	color: rgba(255, 110, 64, 1);
}

/* ---------- Animaciones de entrada ---------- */

@keyframes hs-fade-in {
	from { opacity: 0; }
	to   { opacity: 1; }
}

@keyframes hs-scale-in {
	from { opacity: 0; transform: scale(0.9); }
	to   { opacity: 1; transform: scale(1); }
}

@keyframes hs-rise-in {
	from { transform: translateY(100%); }
	to   { transform: translateY(0); }
}

/* Slide 1: fundido, arranque 710ms / 490ms */
.is-active .hs-s1-title,
.is-active .hs-s1-text {
	animation: hs-fade-in 490ms ease 710ms both;
}

/* Slide 2: Power4.easeInOut, arranque 500ms / 2000ms */
.is-active .hs-s2-title {
	animation: hs-scale-in 2000ms cubic-bezier(0.86, 0, 0.07, 1) 500ms both;
}

.is-active .hs-s2-text,
.is-active .hs-s2-btn {
	opacity: 1;
}

.is-active .hs-s2-text > span,
.is-active .hs-s2-btn > span {
	animation: hs-rise-in 2000ms cubic-bezier(0.86, 0, 0.07, 1) 500ms both;
}

.hs-s2-text > span,
.hs-s2-btn > span {
	transform: translateY(100%);
}

/* ---------- Animaciones de salida ---------- */

@keyframes hs-fade-out {
	to { opacity: 0; }
}

@keyframes hs-leave-up {
	to { transform: translateY(175%); }
}

.is-leaving .hs-s1-title,
.is-leaving .hs-s1-text {
	animation: hs-fade-out 500ms ease both;
}

.is-leaving .hs-s2-title,
.is-leaving .hs-s2-text > span,
.is-leaving .hs-s2-btn > span {
	animation: hs-leave-up 1000ms cubic-bezier(0.645, 0.045, 0.355, 1) both;
}

/* ---------- Flechas (equivalente al estilo "uranus") ---------- */

.hs .hs-arrow {
	position: absolute;
	top: 50%;
	width: 50px;
	height: 50px;
	margin-top: -25px;
	padding: 0;
	border: 0;
	/* el tema fuerza background-color en button con !important */
	background: none !important;
	border-radius: 0;
	box-shadow: none;
	color: #fff;
	cursor: pointer;
	opacity: 0;
	transition: opacity 0.3s;
	z-index: 3;
}

.hs-arrow svg {
	width: 100%;
	height: 100%;
	display: block;
}

.hs-prev { left: 30px; }
.hs-next { right: 30px; }

.hs:hover .hs-arrow,
.hs-arrow:focus-visible {
	opacity: 1;
}

.hs-arrow:hover {
	opacity: 0.75;
}

/* Oculta las flechas en táctil/móvil, como hacía hide_onmobile */
@media (max-width: 778px), (hover: none) {
	.hs-arrow { display: none; }
}

/* ---------- Barra de progreso ---------- */

.hs-progress {
	position: absolute;
	left: 0;
	bottom: 0;
	width: 100%;
	height: 5px;
	background: rgba(0, 0, 0, 0.15);
	z-index: 3;
}

.hs-progress i {
	display: block;
	height: 100%;
	width: 0;
	background: #018fa3;
}

/* ---------- Móvil ----------
   Por debajo de 778px la rejilla de 1240px dejaría el texto a ~11px (el slider
   original directamente ocultaba las capas). Se pasa a un apilado legible. */

@media (max-width: 778px) {
	.hs {
		display: grid;
		height: auto;
		min-height: 320px;
	}

	.hs-slide {
		position: relative;
		inset: auto;
		grid-area: 1 / 1;
	}

	.hs-bg::after {
		content: "";
		position: absolute;
		inset: 0;
		background: linear-gradient(180deg, rgba(0, 0, 0, 0.45), rgba(0, 0, 0, 0.3));
	}

	.hs-grid {
		position: relative;
		left: auto;
		width: 100%;
		height: auto;
		padding: 36px 22px 46px;
		box-sizing: border-box;
		transform: none;
	}

	.hs-layer {
		position: relative;
		left: auto;
		top: auto;
		width: auto;
		height: auto;
		max-width: 100%;
		letter-spacing: normal;
	}

	.hs-s1-title {
		padding: 8px 10px;
		font-size: 20px;
		line-height: 26px;
	}

	.hs-s1-text {
		margin-top: 6px;
		padding: 10px;
		font-size: 14px;
		line-height: 20px;
	}

	.hs-s2-title {
		font-size: 28px;
		line-height: 34px;
	}

	.hs-s2-text {
		margin-top: 10px;
		font-size: 14px;
		line-height: 22px;
		text-align: left;
	}

	.hs-s2-btn {
		margin-top: 20px;
		font-size: 16px;
		line-height: 22px;
	}
}

/* ---------- Accesibilidad ---------- */

@media (prefers-reduced-motion: reduce) {
	.hs-slide { transition: none; }

	.is-active .hs-s1-title,
	.is-active .hs-s1-text,
	.is-active .hs-s2-title,
	.is-active .hs-s2-text > span,
	.is-active .hs-s2-btn > span,
	.is-leaving .hs-s1-title,
	.is-leaving .hs-s1-text,
	.is-leaving .hs-s2-title,
	.is-leaving .hs-s2-text > span,
	.is-leaving .hs-s2-btn > span {
		animation: none;
	}

	.hs-layer { opacity: 1; }
	.hs-s2-text > span,
	.hs-s2-btn > span { transform: none; }

	.hs-progress { display: none; }
}

/* Sin JS: muestra el primer slide completo */
.hs.no-js .hs-slide:first-child {
	opacity: 1;
	visibility: visible;
}

.hs.no-js .hs-layer,
.hs.no-js .hs-s2-text > span,
.hs.no-js .hs-s2-btn > span {
	opacity: 1;
	transform: none;
	animation: none;
}

.hs.no-js .hs-arrow,
.hs.no-js .hs-progress {
	display: none;
}
