/* =====================================================================
   Footer nuevo · Figma "AVisual Pro Web" 1720:113 (frame 1512 px)
   Tramos: ≥1520 Figma · 1280–1519 portátil (MacBook Air/Pro) · 1024–1279 · 768–1023 · <768 · <380
   ===================================================================== */
.avp-ft {
	--ft-azul: #00b6ed; --ft-texto: #1b1b1b; --ft-fondo: #dcdcdc;
	--ft-pad-x: max(clamp(20px, 2.65vw, 40px), calc((100% - 1840px) / 2));
	background: var(--ft-fondo); color: var(--ft-texto);
	font-family: 'Red Hat Display', sans-serif;
	-webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility;
	padding: 50px var(--ft-pad-x) calc(25px + env(safe-area-inset-bottom, 0px));
	display: flex; flex-direction: column; gap: 40px;
}
.avp-ft *, .avp-ft *::before, .avp-ft *::after { box-sizing: border-box; }
.avp-ft p, .avp-ft ul { margin: 0; padding: 0; }
.avp-ft ul { list-style: none; }
.avp-ft a { -webkit-tap-highlight-color: transparent; }
.avp-ft a:focus-visible { outline: 2px solid var(--ft-azul); outline-offset: 3px; border-radius: 2px; }

/* Recorte de texto como en Figma (cap / alphabetic) */
.avp-ft__title, .avp-ft__city, .avp-ft__text, .avp-ft__link, .avp-ft__lang-item {
	line-height: normal;
	text-box-trim: trim-both; text-box-edge: cap alphabetic; text-box: trim-both cap alphabetic;
}
/* Navegadores sin recorte (Firefox): aproximación para mantener el ritmo vertical */
@supports not (text-box-trim: trim-both) {
	.avp-ft__title, .avp-ft__city, .avp-ft__text, .avp-ft__link, .avp-ft__lang-item { line-height: 1; margin-block: -0.12em; }
	.avp-ft__text--wrap { line-height: 1.3; margin-block: -0.2em; }
}

/* ---------- Figma (≥ 1520 px): 5 columnas repartidas ---------- */
.avp-ft__top { display: flex; justify-content: space-between; gap: clamp(40px, 4.2vw, 76px); align-items: flex-start; }
.avp-ft__col { display: flex; flex-direction: column; gap: 28px; align-items: flex-start; flex-shrink: 0; min-width: 0; }
.avp-ft__col--sedes { width: 262px; }
.avp-ft__col--news { flex: 0 0 366px; width: 366px; gap: 40px; align-self: stretch; }

/* ---------- Tipografía ---------- */
.avp-ft__title { font-weight: 800; font-size: 16px; color: var(--ft-azul); text-transform: uppercase; white-space: nowrap; }
.avp-ft__city { font-weight: 700; font-size: 14px; text-transform: uppercase; white-space: nowrap; }
.avp-ft__text, .avp-ft__link { font-weight: 400; font-size: 14px; color: var(--ft-texto); white-space: nowrap; text-decoration: none; }
.avp-ft__text--wrap { white-space: normal; }

/* Enlaces: hover azul + negrita (Figma "Footer Link" / Variant2). La negrita se simula con sombra para no mover el texto */
.avp-ft__link { display: inline-block; transition: color .2s ease, text-shadow .2s ease; }
.avp-ft__list .avp-ft__link { display: block; }
.avp-ft__link:hover, .avp-ft__link:focus-visible { color: var(--ft-azul); text-shadow: 0 0 .55px currentColor, 0 0 .55px currentColor; }

/* ---------- Sedes ---------- */
.avp-ft__sedes { display: flex; flex-direction: column; gap: 30px; width: 100%; }
.avp-ft__sede { display: flex; flex-direction: column; gap: 16px; width: 100%; }
.avp-ft__sede--horario { gap: 14px; }
.avp-ft__lines { display: flex; flex-direction: column; gap: 14px; }
.avp-ft__row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 8px; }
.avp-ft__dot { display: block; width: 3px; height: 3px; border-radius: 10px; background: var(--ft-texto); flex-shrink: 0; }
.avp-ft .cofuscado { direction: rtl; unicode-bidi: bidi-override; }

.avp-ft__list { display: flex; flex-direction: column; gap: 20px; width: 100%; }

/* ---------- Mantente al día ---------- */
.avp-ft__news { display: flex; flex-direction: column; gap: 28px; width: 100%; }
.avp-ft__news-body { display: flex; flex-direction: column; gap: 20px; width: 100%; }

/* Newsletter (Gravity Forms): píldora con email + botón */
.avp-ft__form { width: 100%; }
.avp-ft .avp-ft__form .gform_wrapper { margin: 0 !important; padding: 0 !important; }
.avp-ft .avp-ft__form .gform_wrapper form { position: relative; margin: 0; }
.avp-ft .avp-ft__form .gform_heading,
.avp-ft .avp-ft__form .gform_validation_errors { display: none !important; }
.avp-ft .avp-ft__form .gform_fields { display: flex !important; flex-direction: column; gap: 12px !important; grid-row-gap: 12px !important; }
.avp-ft .avp-ft__form .gfield { margin: 0 !important; padding: 0 !important; }
.avp-ft .avp-ft__form .gfield--type-email > legend,
.avp-ft .avp-ft__form .gfield--type-email .gfield_label,
.avp-ft .avp-ft__form .gfield--type-email .gform-field-label,
.avp-ft .avp-ft__form .gfield--type-consent > legend { position: absolute !important; width: 1px !important; height: 1px !important; overflow: hidden !important; clip: rect(0 0 0 0) !important; white-space: nowrap !important; padding: 0 !important; margin: 0 !important; border: 0 !important; }
.avp-ft .avp-ft__form .gfield--type-captcha { position: absolute !important; height: 0 !important; overflow: hidden !important; }
.avp-ft .avp-ft__form .gform_wrapper input[type="email"] {
	width: 100% !important; height: 44px !important; min-height: 0 !important; margin: 0 !important;
	padding: 6px 130px 6px 18px !important; border: 1px solid var(--ft-texto) !important; border-radius: 60px !important;
	background: transparent !important; box-shadow: none !important; outline: none !important;
	font: 400 14px/normal 'Red Hat Display', sans-serif !important; color: var(--ft-texto) !important;
	transition: border-color .2s ease;
}
.avp-ft .avp-ft__form .gform_wrapper input[type="email"]::placeholder { color: var(--ft-texto) !important; opacity: 1 !important; }
.avp-ft .avp-ft__form .gform_wrapper input[type="email"]:focus { border-color: var(--ft-azul) !important; }
.avp-ft .avp-ft__form .gform_wrapper .gform_footer { position: absolute !important; top: 6px; right: 6px; margin: 0 !important; padding: 0 !important; display: block !important; }
.avp-ft .avp-ft__form .gform_wrapper .gform_footer .gform_button {
	height: 32px !important; min-height: 0 !important; margin: 0 !important; padding: 0 20px !important;
	border: 0 !important; border-radius: 60px !important; background: var(--ft-azul) !important; color: var(--ft-texto) !important;
	box-shadow: none !important; cursor: pointer; white-space: nowrap;
	font: 500 14px/32px 'Red Hat Display', sans-serif !important; transition: background-color .2s ease, color .2s ease;
}
.avp-ft .avp-ft__form .gform_wrapper .gform_footer .gform_button:hover,
.avp-ft .avp-ft__form .gform_wrapper .gform_footer .gform_button:focus-visible { background: var(--ft-texto) !important; color: #fff !important; }
.avp-ft .avp-ft__form .gfield--type-consent .ginput_container_consent { display: flex; align-items: flex-start; gap: 8px; }
.avp-ft .avp-ft__form .gfield--type-consent input[type="checkbox"] { width: 14px !important; height: 14px !important; margin: 1px 0 0 !important; flex-shrink: 0; accent-color: var(--ft-azul); }
.avp-ft .avp-ft__form .gfield--type-consent label,
.avp-ft .avp-ft__form .gfield--type-consent .gform-field-label__text { font: 400 11px/1.4 'Red Hat Display', sans-serif !important; color: var(--ft-texto) !important; margin: 0 !important; }
.avp-ft .avp-ft__form .gfield--type-consent a { color: var(--ft-texto); text-decoration: underline; }
.avp-ft .avp-ft__form .gfield_validation_message,
.avp-ft .avp-ft__form .validation_message { font: 400 11px/1.3 'Red Hat Display', sans-serif !important; margin: 4px 0 0 18px !important; padding: 0 !important; background: none !important; border: 0 !important; }
.avp-ft .avp-ft__form .gform_confirmation_message { font: 400 14px/1.4 'Red Hat Display', sans-serif; color: var(--ft-texto); }

/* ---------- Idioma y redes ---------- */
.avp-ft__meta { display: flex; align-items: center; justify-content: space-between; gap: 24px; width: 100%; }
.avp-ft__lang { display: flex; align-items: center; gap: 8px; }
.avp-ft__lang-item { font-size: 15px; font-weight: 400; text-transform: uppercase; color: var(--ft-texto); text-decoration: none; transition: color .2s ease; }
.avp-ft__lang-item.is-active { font-weight: 900; }
.avp-ft__lang-item:hover { color: var(--ft-azul); }
.avp-ft__lang-sep { width: 1px; align-self: stretch; background: var(--ft-texto); }
.avp-ft__social { display: flex; align-items: center; gap: 16px; }
.avp-ft__social a { display: block; line-height: 0; transition: opacity .2s ease; }
.avp-ft__social a:hover { opacity: .7; }
.avp-ft__social img { display: block; height: 22px; width: auto; }

/* ---------- Logo a todo el ancho (857,1 + 60 + 516,1) y legal ---------- */
.avp-ft__bottom { display: flex; flex-direction: column; gap: 30px; width: 100%; }
.avp-ft__logo { display: flex; justify-content: space-between; align-items: flex-start; width: 100%; }
.avp-ft .avp-ft__logo img { display: block; height: auto; max-width: none; flex: none; }
.avp-ft .avp-ft__logo .avp-ft__logo-avisual { width: 59.81%; }
.avp-ft .avp-ft__logo .avp-ft__logo-pro { width: 36.01%; }
.avp-ft__legal { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; width: 100%; }
.avp-ft__legal-links { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 8px; }

/* ---------- Portátil: MacBook Air / Pro 13-14", 1366, 1440 (1280–1519 px) ---------- */
@media (min-width: 1280px) and (max-width: 1519px) {
	.avp-ft__top { gap: 40px; }
	.avp-ft__col--sedes { width: 240px; }
	.avp-ft__col--news { flex: 1 1 0; width: auto; min-width: 280px; max-width: 366px; }
}

/* ---------- Portátil pequeño / tablet horizontal (1024–1279 px) ---------- */
@media (max-width: 1279px) {
	.avp-ft__top {
		display: grid; gap: 48px 40px;
		grid-template-columns: 240px repeat(3, minmax(0, 1fr));
		grid-template-areas: "sedes pro ayuda eco" "news news news news";
	}
	.avp-ft__col--sedes { grid-area: sedes; width: auto; }
	.avp-ft__col--pro { grid-area: pro; }
	.avp-ft__col--ayuda { grid-area: ayuda; }
	.avp-ft__col--eco { grid-area: eco; }
	.avp-ft__col--news {
		grid-area: news; width: auto; flex: none; max-width: none;
		display: grid; grid-template-columns: minmax(0, 460px) auto; justify-content: space-between; align-items: end; gap: 32px 40px;
	}
	.avp-ft__meta { width: auto; justify-content: flex-end; gap: 40px; }
}

/* ---------- Tablet vertical (768–1023 px) ---------- */
@media (max-width: 1023px) {
	.avp-ft { padding-top: 44px; gap: 36px; }
	.avp-ft__top {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		grid-template-areas: "sedes pro ayuda" "eco news news";
		gap: 44px 32px;
	}
	.avp-ft__col--news { display: flex; flex-direction: column; gap: 32px; }
	.avp-ft__meta { width: 100%; justify-content: space-between; gap: 24px; }
	.avp-ft__text, .avp-ft__link { white-space: normal; }
}

/* ---------- Móvil (< 768 px) ---------- */
@media (max-width: 767px) {
	.avp-ft { padding-top: 40px; gap: 32px; padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px)); } /* sitio para el botón flotante "¿Tienes dudas?" */
	.avp-ft__top {
		grid-template-columns: minmax(0, 1fr);
		grid-template-areas: "sedes" "pro" "ayuda" "eco" "news";
		gap: 40px;
	}
	.avp-ft__col { gap: 24px; }
	.avp-ft__list { gap: 18px; }
	.avp-ft__list .avp-ft__link, .avp-ft__row .avp-ft__link { padding-block: 6px; margin-block: -6px; } /* zona táctil */
	.avp-ft__social { gap: 14px; }
	.avp-ft__social a { padding: 6px; margin: -6px; }
	.avp-ft__meta { flex-wrap: wrap; row-gap: 20px; }
	.avp-ft__bottom { gap: 24px; }
	.avp-ft__legal { gap: 16px; }
	}

/* ---------- Móvil pequeño (< 380 px) ---------- */
@media (max-width: 379px) {
	.avp-ft__top { grid-template-columns: 1fr; grid-template-areas: "sedes" "pro" "ayuda" "eco" "news"; gap: 36px; }
	.avp-ft__social { gap: 12px; }
}

@media (prefers-reduced-motion: reduce) {
	.avp-ft *, .avp-ft *::before, .avp-ft *::after { transition: none !important; }
}

/* ---------- reCAPTCHA: segell amagat (només visual) + avís obligatori de Google ---------- */
.grecaptcha-badge { visibility: hidden !important; }
.avp-ft__recaptcha { font-size: 11px; line-height: 1.4; color: var(--ft-texto); margin-top: -8px !important; }
.avp-ft__recaptcha a { color: var(--ft-texto); text-decoration: underline; }
.avp-ft__recaptcha a:hover { color: var(--ft-azul); }

/* Logo grande enlazado a la home */
a.avp-ft__logo { text-decoration: none; transition: opacity .2s ease; }
a.avp-ft__logo:hover { opacity: .85; }
