/* ==========================================================================
   Aiseguros Hero — slider full-bleed (imagen a sangre + texto sobrepuesto)
   Referencia Bexon. Header transparente encima (ver widget-menu.css).
   ========================================================================== */

.aiseg-hero {
	position: relative;
	width: 100%;
	min-height: 100vh;
	overflow: hidden;
	font-family: 'Mona Sans', var(--aiseguros-font-body, sans-serif);
	background-color: var(--aiseguros-color-dark, #04304a);
}

/* ---------- Diapositivas (crossfade) ---------- */

.aiseg-hero__slides {
	position: absolute;
	inset: 0;
}

.aiseg-hero__slide {
	position: absolute;
	inset: 0;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.9s ease, visibility 0.9s ease;
}

.aiseg-hero__slide.is-active {
	opacity: 1;
	visibility: visible;
}

.aiseg-hero__bg {
	position: absolute;
	inset: 0;
	background-size: cover;
	background-position: center;
	/* Zoom lento (Ken Burns) en la diapositiva activa. */
	transform: scale(1.05);
	transition: transform 8s ease-out;
}

.aiseg-hero__slide.is-active .aiseg-hero__bg {
	transform: scale(1);
}

/* Degradado oscuro: intenso a la izquierda, se abre a la derecha,
   para que el texto sobrepuesto sea legible. */
.aiseg-hero__overlay {
	position: absolute;
	inset: 0;
	background:
		linear-gradient(90deg, rgba(4, 48, 74, 0.92) 0%, rgba(4, 48, 74, 0.72) 32%, rgba(4, 48, 74, 0.35) 62%, rgba(4, 48, 74, 0.15) 100%),
		linear-gradient(0deg, rgba(4, 48, 74, 0.55) 0%, rgba(4, 48, 74, 0) 45%);
}

/* ---------- Contenido sobrepuesto ---------- */

.aiseg-hero__inner {
	position: relative;
	z-index: 2;
	max-width: 1280px;
	margin: 0 auto;
	/*
	 * ⚠️ El relleno superior reserva el alto de la cabecera, que en la portada
	 * va FIJA sobre el hero. Sin él, al centrar verticalmente en una pantalla
	 * baja el título sube por debajo del menú: pasaba a 600-670px de alto, que
	 * es lo que deja un móvil con las barras del navegador a la vista, y en
	 * horizontal. El ancho no tenía nada que ver.
	 *
	 * Se reserva de más y no de menos: sobrar aire arriba no se nota, que el
	 * titular quede tapado sí.
	 */
	padding: 190px 32px 32px;
	min-height: 100vh;
	display: flex;
	align-items: center;
}

.aiseg-hero__content {
	max-width: 640px;
	/* Entrada suave al activarse la diapositiva. */
	opacity: 0;
	transform: translateY(24px);
	transition: opacity 0.7s ease 0.25s, transform 0.7s ease 0.25s;
}

.aiseg-hero__slide.is-active .aiseg-hero__content {
	opacity: 1;
	transform: translateY(0);
}

.aiseg-hero__title {
	font-size: clamp(2.6rem, 6vw, 4.6rem);
	line-height: 1.04;
	letter-spacing: -0.02em;
	font-weight: 800;
	color: var(--aiseguros-color-white, #FFFFFF);
	margin: 0 0 22px;
}

.aiseg-hero__title-accent {
	color: var(--aiseguros-color-secondary, #4ab3e7);
}

.aiseg-hero__subtitle {
	font-size: clamp(1.02rem, 1.4vw, 1.2rem);
	line-height: 1.6;
	color: rgba(255, 255, 255, 0.82);
	max-width: 520px;
	margin: 0 0 34px;
}

/* Botón CTA (pill verde + círculo oscuro con flecha giratoria) */
.aiseg-hero__cta {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	background-color: var(--aiseguros-color-accent, #079239);
	color: var(--aiseguros-color-white, #FFFFFF);
	padding: 7px 7px 7px 26px;
	border-radius: 999px;
	font-size: 15px;
	font-weight: 600;
	letter-spacing: -0.01em;
	line-height: 1;
	text-decoration: none;
	white-space: nowrap;
	transition: background-color 0.3s ease, transform 0.3s ease;
}

.aiseg-hero__cta:hover {
	color: var(--aiseguros-color-white, #FFFFFF);
	transform: translateY(-2px);
}

.aiseg-hero__cta-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 42px;
	height: 42px;
	border-radius: 50%;
	background-color: var(--aiseguros-color-dark, #04304a);
	flex-shrink: 0;
}

.aiseg-hero__cta-icon i {
	color: var(--aiseguros-color-white, #FFFFFF);
	font-size: 14px;
	transform: rotate(-45deg);
	transition: transform 0.3s ease;
}

.aiseg-hero__cta:hover .aiseg-hero__cta-icon i {
	transform: rotate(0deg);
}

/* ---------- Flechas ---------- */

.aiseg-hero__arrow {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 3;
	width: 52px;
	height: 52px;
	/* Detrás del texto en el orden de pintado no basta: lo que hay que evitar
	   es que se solapen. Ver el bloque de 1200px más abajo. */
	border-radius: 50%;
	border: 1px solid rgba(255, 255, 255, 0.35);
	background-color: rgba(255, 255, 255, 0.08);
	-webkit-backdrop-filter: blur(6px);
	backdrop-filter: blur(6px);
	color: var(--aiseguros-color-white, #FFFFFF);
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 16px;
	transition: background-color 0.25s ease, border-color 0.25s ease;
}

.aiseg-hero__arrow:hover {
	background-color: var(--aiseguros-color-secondary, #4ab3e7);
	border-color: var(--aiseguros-color-secondary, #4ab3e7);
}

.aiseg-hero__arrow--prev {
	left: 26px;
}

.aiseg-hero__arrow--next {
	right: 26px;
}

.aiseg-hero__arrow i,
.aiseg-hero__arrow svg {
	width: 1em;
	height: 1em;
	fill: currentColor;
}

/* ---------- Miniaturas ---------- */

.aiseg-hero__thumbs {
	position: absolute;
	z-index: 3;
	left: 50%;
	bottom: 34px;
	transform: translateX(-50%);
	display: flex;
	gap: 12px;
}

.aiseg-hero__thumb {
	width: 74px;
	height: 52px;
	padding: 0;
	border: 2px solid rgba(255, 255, 255, 0.4);
	border-radius: 10px;
	overflow: hidden;
	cursor: pointer;
	background: none;
	opacity: 0.6;
	transition: opacity 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}

.aiseg-hero__thumb span {
	display: block;
	width: 100%;
	height: 100%;
	background-size: cover;
	background-position: center;
}

.aiseg-hero__thumb:hover {
	opacity: 1;
}

.aiseg-hero__thumb.is-active {
	opacity: 1;
	border-color: var(--aiseguros-color-secondary, #4ab3e7);
	transform: translateY(-3px);
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 782px) {
	.aiseg-hero {
		min-height: 88vh;
	}

	.aiseg-hero__inner {
		min-height: 88vh;
		padding: 96px 24px 120px;
		align-items: center;
	}

	.aiseg-hero__overlay {
		background:
			linear-gradient(90deg, rgba(4, 48, 74, 0.85) 0%, rgba(4, 48, 74, 0.55) 100%),
			linear-gradient(0deg, rgba(4, 48, 74, 0.7) 0%, rgba(4, 48, 74, 0.1) 55%);
	}

	.aiseg-hero__arrow {
		display: none;
	}

	.aiseg-hero__thumbs {
		bottom: 22px;
		gap: 8px;
	}

	.aiseg-hero__thumb {
		width: 54px;
		height: 38px;
	}
}

@media (max-width: 480px) {
	.aiseg-hero__cta {
		width: 100%;
		justify-content: center;
	}
}

@media (prefers-reduced-motion: reduce) {
	.aiseg-hero__slide,
	.aiseg-hero__bg,
	.aiseg-hero__content,
	.aiseg-hero__cta,
	.aiseg-hero__cta-icon i {
		transition: none !important;
	}

	.aiseg-hero__bg {
		transform: none !important;
	}
}

/* ==========================================================================
   Ajustes por alto y por ancho de pantalla
   ========================================================================== */

/*
 * Las flechas se retiran por debajo de 1200px. A partir de ahí el texto ocupa
 * casi todo el ancho y se solapaban con el titular (46px medidos entre 800 y
 * 1100). No se pierde navegación: las miniaturas de abajo hacen lo mismo y el
 * pase avanza solo.
 */
/*
 * Las flechas van pegadas al borde de la pantalla, pero el texto vive en una
 * columna centrada de 1280px. Cuando la ventana se acerca a esos 1280 el margen
 * lateral desaparece y la flecha se planta encima del párrafo: medido, 46px de
 * solape a 1280 y sólo 34px de holgura a 1440.
 *
 * Se muestran a partir de 1500px, que es donde sobra sitio de verdad. Por
 * debajo navegan las miniaturas de abajo, y el pase avanza solo.
 */
@media (max-width: 1499px) {
	.aiseg-hero__arrow {
		display: none;
	}
}

/* Cabecera más baja: el relleno reservado se ajusta para no dejar un hueco. */
@media (max-width: 800px) {
	.aiseg-hero__inner {
		padding-top: 140px;
	}
}

@media (max-width: 480px) {
	.aiseg-hero__inner {
		padding-top: 132px;
	}
}

/*
 * Pantallas BAJAS: en horizontal o con las barras del navegador comiendo alto,
 * `100vh` deja el hero más alto que la pantalla y hay que bajar el titular.
 */
@media (max-height: 700px) {
	.aiseg-hero__inner {
		min-height: 0;
		padding-bottom: 90px;
	}

	.aiseg-hero__title {
		font-size: clamp(2rem, 5vw, 3rem);
	}
}

/*
 * MÓVIL EN HORIZONTAL (~390-430px de alto). Es el caso más apretado del sitio:
 * la cabecera se come 111px y quedan unos 270 para titular, bajada y botón.
 *
 * Medido antes: las miniaturas se montaban 48px sobre la bajada y el botón
 * caía 52px por debajo del borde inferior.
 */
@media (max-height: 500px) and (orientation: landscape) {
	.aiseg-hero__inner {
		padding-top: 124px;
		padding-bottom: 24px;
	}

	.aiseg-hero__title {
		font-size: 1.7rem;
		margin-bottom: 10px;
	}

	.aiseg-hero__subtitle {
		font-size: 0.92rem;
		line-height: 1.45;
		margin-bottom: 16px;
	}

	/* Las miniaturas se retiran: se montaban sobre el texto y el pase avanza
	   solo, así que no se pierde navegación. */
	.aiseg-hero__thumbs {
		display: none;
	}
}
