/* ==========================================================================
   Aiseguros Footer — pie de página
   Referencia: docs/referencias/footer.png — bloque oscuro redondeado con
   4 columnas, marca gigante centrada y barra inferior (© · redes · legales).
   ========================================================================== */

/* El contenedor del tema envuelve al bloque navy y llega hasta el final de la
   página. Se pinta con el mismo tono medio que la sección del formulario para
   que el tramo de cierre sea continuo: sin este fondo, el margen que rodea al
   bloque redondeado dejaba ver el fondo del `body` y se notaba el corte. */
#colophon {
	background-color: var(--aiseguros-color-surface-mid, #cae7f7);
}

.aiseg-foot {
	position: relative;
	overflow: hidden;
	margin: 0 var(--aiseg-foot-inset, clamp(0px, 1.4vw, 22px)) var(--aiseg-foot-inset, clamp(0px, 1.4vw, 22px));
	border-radius: var(--aiseguros-border-radius-lg, 28px);
	background-color: var(--aiseguros-color-dark, #04304a);
	color: var(--aiseguros-color-white, #FFFFFF);
	padding: clamp(48px, 6vw, 76px) 0 24px;
	font-family: 'Mona Sans', var(--aiseguros-font-body, sans-serif);
}

/* Textura de líneas diagonales (izquierda) + glow inferior: evitan que el
   bloque oscuro quede plano. */
.aiseg-foot::before {
	content: '';
	position: absolute;
	inset: 0;
	background: repeating-linear-gradient(
		115deg,
		transparent 0 46px,
		rgba(255, 255, 255, 0.022) 46px 47px
	);
	pointer-events: none;
}

.aiseg-foot::after {
	content: '';
	position: absolute;
	left: 50%;
	bottom: -320px;
	width: 900px;
	height: 620px;
	transform: translateX(-50%);
	background: radial-gradient(ellipse at center, rgba(74, 179, 231, 0.30) 0%, rgba(74, 179, 231, 0) 68%);
	pointer-events: none;
}

.aiseg-foot__inner {
	position: relative;
	z-index: 1;
	max-width: 1280px;
	margin: 0 auto;
	padding: 0 32px;
}

/* ==========================================================================
   Fila superior — 4 columnas
   ========================================================================== */

.aiseg-foot__top {
	display: grid;
	grid-template-columns: 1.25fr 1fr 1fr 1.15fr;
	gap: clamp(28px, 4vw, 56px);
	padding-bottom: clamp(32px, 4vw, 48px);
}

.aiseg-foot__col-title {
	font-size: 1.06rem;
	font-weight: 700;
	letter-spacing: -0.01em;
	color: var(--aiseguros-color-white, #FFFFFF);
	margin: 0 0 22px;
}

/* ---------- Columna de marca ---------- */

.aiseg-foot__lead {
	font-size: clamp(1.3rem, 2vw, 1.6rem);
	line-height: 1.22;
	letter-spacing: -0.02em;
	font-weight: 700;
	margin: 0 0 16px;
}

.aiseg-foot__text {
	font-size: 0.95rem;
	line-height: 1.62;
	color: rgba(255, 255, 255, 0.68);
	margin: 0 0 24px;
	max-width: 330px;
}

.aiseg-foot__cta {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	background-color: var(--aiseguros-color-accent, #079239);
	color: var(--aiseguros-color-white, #FFFFFF);
	padding: 6px 6px 6px 22px;
	border-radius: 999px;
	font-size: 14.5px;
	font-weight: 600;
	line-height: 1;
	text-decoration: none;
	white-space: nowrap;
	transition: transform 0.3s ease;
}

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

.aiseg-foot__cta-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	background-color: rgba(255, 255, 255, 0.16);
	flex-shrink: 0;
}

.aiseg-foot__cta-icon i {
	font-size: 13px;
	transform: rotate(-45deg);
	transition: transform 0.3s ease;
}

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

/* ---------- Columnas de enlaces ---------- */

.aiseg-foot__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 13px;
}

.aiseg-foot__list a {
	font-size: 0.95rem;
	color: rgba(255, 255, 255, 0.72);
	text-decoration: none;
	transition: color 0.25s ease, padding-left 0.25s ease;
}

.aiseg-foot__list a:hover,
.aiseg-foot__list a:focus-visible {
	color: var(--aiseguros-color-secondary, #4ab3e7);
	padding-left: 4px;
}

/* ---------- Columna de contacto ---------- */

.aiseg-foot__contact {
	display: flex;
	flex-direction: column;
	gap: 14px;
	font-size: 0.95rem;
	line-height: 1.55;
	color: rgba(255, 255, 255, 0.72);
}

.aiseg-foot__contact a {
	color: inherit;
	text-decoration: none;
	transition: color 0.25s ease;
}

.aiseg-foot__contact a:hover {
	color: var(--aiseguros-color-secondary, #4ab3e7);
}

.aiseg-foot__contact strong {
	color: var(--aiseguros-color-white, #FFFFFF);
	font-weight: 600;
}

.aiseg-foot__contact-row {
	display: flex;
	align-items: flex-start;
	gap: 10px;
}

.aiseg-foot__contact-row i,
.aiseg-foot__contact-row svg {
	width: 1em;
	height: 1em;
	margin-top: 0.25em;
	flex-shrink: 0;
	color: var(--aiseguros-color-secondary, #4ab3e7);
	fill: currentColor;
}

/* ==========================================================================
   Marca gigante centrada
   ========================================================================== */

.aiseg-foot__wordmark {
	display: flex;
	justify-content: center;
	padding: clamp(16px, 3vw, 36px) 0 clamp(28px, 4vw, 52px);
}

.aiseg-foot__wordmark img {
	width: clamp(170px, 24vw, 330px);
	height: auto;
	/* El logo es a color sobre fondo transparente: lo pasamos a blanco. */
	filter: brightness(0) invert(1);
	opacity: 0.96;
}

/* ==========================================================================
   Barra inferior
   ========================================================================== */

.aiseg-foot__bottom {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	flex-wrap: wrap;
	padding-top: 22px;
	border-top: 1px dashed rgba(255, 255, 255, 0.18);
	font-size: 0.9rem;
	color: rgba(255, 255, 255, 0.62);
}

.aiseg-foot__copy strong {
	color: var(--aiseguros-color-white, #FFFFFF);
	font-weight: 600;
}

.aiseg-foot__social {
	display: flex;
	align-items: center;
	gap: 10px;
}

.aiseg-foot__social a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	border-radius: 50%;
	background-color: rgba(255, 255, 255, 0.10);
	color: rgba(255, 255, 255, 0.82);
	font-size: 14px;
	text-decoration: none;
	transition: background-color 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.aiseg-foot__social a:hover {
	background-color: var(--aiseguros-color-secondary, #4ab3e7);
	color: var(--aiseguros-color-white, #FFFFFF);
	transform: translateY(-2px);
}

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

.aiseg-foot__legal {
	display: flex;
	align-items: center;
	gap: 14px;
}

.aiseg-foot__legal a {
	color: rgba(255, 255, 255, 0.72);
	text-decoration: none;
	transition: color 0.25s ease;
}

.aiseg-foot__legal a:hover {
	color: var(--aiseguros-color-secondary, #4ab3e7);
}

.aiseg-foot__legal span {
	color: rgba(255, 255, 255, 0.28);
}

/* ==========================================================================
   Botón "volver arriba" — FIJO en todo el sitio
   Se renderiza fuera de .aiseg-foot (que tiene overflow:hidden) para que el
   position:fixed no quede recortado. El JS le pone .is-visible al bajar.
   ========================================================================== */

.aiseg-totop {
	position: fixed;
	right: clamp(16px, 2.2vw, 30px);
	bottom: clamp(16px, 2.2vw, 30px);
	z-index: 9998;
	width: 46px;
	height: 46px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	background-color: var(--aiseguros-color-primary, #075685);
	color: var(--aiseguros-color-white, #FFFFFF);
	text-decoration: none;
	box-shadow: 0 10px 26px rgba(4, 48, 74, 0.30);
	/* Oculto hasta que hay scroll. */
	opacity: 0;
	visibility: hidden;
	transform: translateY(12px);
	pointer-events: none;
	transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease,
		background-color 0.25s ease;
}

.aiseg-totop.is-visible {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
	pointer-events: auto;
}

.aiseg-totop:hover {
	background-color: var(--aiseguros-color-secondary, #4ab3e7);
	color: var(--aiseguros-color-white, #FFFFFF);
	transform: translateY(-3px);
}

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

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

@media (max-width: 1024px) {
	.aiseg-foot__top {
		grid-template-columns: repeat(2, 1fr);
		gap: 36px;
	}
}

@media (max-width: 600px) {
	.aiseg-foot {
		margin: 0;
		border-radius: 0;
	}

	.aiseg-foot__inner {
		padding: 0 20px;
	}

	.aiseg-foot__top {
		grid-template-columns: 1fr;
		gap: 30px;
	}

	.aiseg-foot__text {
		max-width: none;
	}

	.aiseg-foot__bottom {
		flex-direction: column;
		align-items: flex-start;
		gap: 16px;
	}

	.aiseg-totop {
		right: 14px;
		bottom: 14px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.aiseg-foot__cta,
	.aiseg-foot__cta-icon i,
	.aiseg-foot__list a,
	.aiseg-foot__social a,
	.aiseg-totop {
		transition: none !important;
	}
}

/* ==========================================================================
   Firma del estudio
   ========================================================================== */

.aiseg-foot__credito {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	color: rgba(255, 255, 255, 0.42);
	font-size: 0.78rem;
	letter-spacing: 0.01em;
	text-decoration: none;
	transition: color var(--aiseg-dur-base, 300ms) var(--aiseg-ease-out, ease);
}

a.aiseg-foot__credito:hover,
a.aiseg-foot__credito:focus-visible {
	color: rgba(255, 255, 255, 0.85);
}

/* ⚠️ Va con el ancestro delante a propósito: `.elementor img` (0-1-1) fuerza
   `border-radius: 0` y le ganaba a la clase suelta (0-1-0). */
.aiseg-foot .aiseg-foot__credito-logo {
	width: 20px;
	height: 20px;
	border-radius: 5px;
	/* Apagado en reposo para que el crédito no compite con la marca del
	   cliente; recupera su color al pasar por encima. */
	opacity: 0.65;
	transition: opacity var(--aiseg-dur-base, 300ms) var(--aiseg-ease-out, ease);
}

a.aiseg-foot__credito:hover .aiseg-foot__credito-logo,
a.aiseg-foot__credito:focus-visible .aiseg-foot__credito-logo {
	opacity: 1;
}

.aiseg-foot__credito-nombre {
	font-weight: 600;
	color: rgba(255, 255, 255, 0.62);
}

a.aiseg-foot__credito:hover .aiseg-foot__credito-nombre,
a.aiseg-foot__credito:focus-visible .aiseg-foot__credito-nombre {
	color: var(--aiseguros-color-white, #FFFFFF);
}

@media (max-width: 800px) {
	/*
	 * En una columna, `space-between` deja cada bloque pegado a un lado y se lee
	 * desalineado. Todo centrado y apilado: es lo único que ordena bien cuatro
	 * elementos de anchos muy distintos.
	 */
	.aiseg-foot__bottom {
		flex-direction: column;
		justify-content: center;
		text-align: center;
		gap: 18px;
	}

	.aiseg-foot__copy,
	.aiseg-foot__legal {
		width: 100%;
	}

	.aiseg-foot__social {
		justify-content: center;
		width: 100%;
	}

	.aiseg-foot__legal {
		display: flex;
		flex-wrap: wrap;
		align-items: center;
		justify-content: center;
		gap: 8px;
	}

	/* `width: 100%` es lo que da margen donde centrar: siendo `inline-flex` se
	   ajustaba al contenido y el `justify-content` no tenía nada que repartir. */
	.aiseg-foot__credito {
		width: 100%;
		justify-content: center;
		font-size: 0.74rem;
	}
}
