/* HFL Accesibilidad — ver docs/DOCUMENTACION.md */

/* ---------- Enlace «Saltar al contenido principal» (WCAG 2.4.1) ---------- */
.hfl-skip-link {
	position: absolute;
	left: -9999px;
	top: 0;
	z-index: 1000001;
	padding: 12px 20px;
	background: #0b1d3a;
	color: #fff !important;
	font-weight: 700;
	text-decoration: underline;
	border-radius: 0 0 8px 0;
}

.hfl-skip-link:focus {
	left: 0;
	outline: 3px solid #fff;
	outline-offset: -6px;
}

#main-content:focus {
	outline: none;
}

/* ---------- Foco visible (WCAG 2.4.7) ---------- */
html body a:focus-visible,
html body button:focus-visible,
html body input:focus-visible,
html body select:focus-visible,
html body textarea:focus-visible,
html body summary:focus-visible,
html body [tabindex]:focus-visible,
html body [role="button"]:focus-visible {
	outline: 3px solid #0b1d3a !important;
	outline-offset: 2px !important;
	box-shadow: 0 0 0 5px #fff !important;
}

/* ---------- Submenús del menú principal con teclado (WCAG 2.1.1) ---------- */
#top-menu li:focus-within > .sub-menu,
.et_pb_menu li:focus-within > .sub-menu {
	visibility: visible;
	opacity: 1;
	z-index: 9999;
}

/* ---------- Desplegables de Divi con nivel de encabezado h2 ----------
   Se mantienen las medidas visuales que tenían como h5. */
.et_pb_accordion h2.et_pb_toggle_title,
.et_pb_toggle h2.et_pb_toggle_title {
	font-size: 16px;
	line-height: 1em;
}

/* Clase para texto solo visible para lectores de pantalla. */
.hfl-sr-only {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* ---------- Formularios (Contact Form 7): contraste de texto y bordes (WCAG 1.4.3 / 1.4.11) ---------- */
.wpcf7 input[type="text"],
.wpcf7 input[type="email"],
.wpcf7 input[type="tel"],
.wpcf7 textarea,
.wpcf7 select {
	color: #333 !important;
	border-color: #767676 !important;
}

.wpcf7 input::placeholder,
.wpcf7 textarea::placeholder {
	color: #707070 !important;
	opacity: 1;
}

/* ---------- Pie de página global (Theme Builder, layout ID 18) ----------
   Contenido: carteles NextGenerationEU + línea de copyright, créditos y enlaces legales. */
.hfl-footer,
.hfl-footer .et_pb_text,
.hfl-footer p {
	color: #fff;
}

.hfl-footer .et_pb_row {
	width: 90%;
	max-width: 1180px;
}

.hfl-footer a {
	color: #fff !important;
	text-decoration: underline;
	text-underline-offset: 3px;
}

.hfl-footer a:hover,
.hfl-footer a:focus {
	text-decoration-thickness: 2px;
}

.hfl-footer__eu-imgs img {
	border-radius: 6px;
	background: #fff;
}

.hfl-footer__bottom {
	border-top: 1px solid rgba(255, 255, 255, .4);
}

.hfl-footer__bottom .et_pb_text_inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 8px 24px;
	font-size: 14px;
	line-height: 1.6;
}

.hfl-footer__bottom p.hfl-footer__credits {
	margin: 0;
	padding: 0;
}

.hfl-footer__legal ul {
	display: flex;
	flex-wrap: wrap;
	margin: 0;
	padding: 0 !important;
	list-style: none;
}

.hfl-footer__legal li {
	margin: 0;
	padding: 0 12px;
	list-style: none;
}

.hfl-footer__legal li:first-child {
	padding-left: 0;
}

.hfl-footer__legal li + li {
	border-left: 1px solid rgba(255, 255, 255, .6);
}

@media (max-width: 980px) {
	.hfl-footer__eu-imgs .et_pb_column {
		margin-bottom: 16px !important;
	}
	.hfl-footer__eu-imgs .et_pb_image,
	.hfl-footer__eu-imgs .et_pb_image_wrap {
		text-align: center;
		margin-left: auto !important;
		margin-right: auto !important;
	}
}

@media (max-width: 767px) {
	.hfl-footer__bottom .et_pb_text_inner {
		flex-direction: column;
		text-align: center;
	}
	.hfl-footer__legal ul {
		justify-content: center;
		gap: 6px 20px;
	}
	.hfl-footer__legal li,
	.hfl-footer__legal li:first-child {
		padding: 0;
	}
	.hfl-footer__legal li + li {
		border-left: 0;
	}
}

/* ---------- Botón dentro del título de los desplegables ---------- */
.hfl-toggle-btn {
	display: block;
	cursor: pointer;
}

/* ---------- Ampliación de imágenes .img-lightbox (sustituye al fragmento WPCode 392) ---------- */
.img-lightbox {
	cursor: zoom-in;
}

#lightbox-overlay-custom {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: none;
	align-items: center;
	justify-content: center;
	padding: 24px;
	background: rgba(0, 0, 0, .85);
}

#lightbox-overlay-custom.active {
	display: flex;
}

#lightbox-overlay-custom[hidden] {
	display: none;
}

#lightbox-content-custom {
	max-width: 95%;
	max-height: 95%;
	text-align: center;
}

#lightbox-overlay-custom img {
	display: block;
	width: 900px;
	max-width: 95vw;
	max-height: 82vh;
	height: auto;
	margin: 0 auto;
	border-radius: 8px;
}

#lightbox-title-custom {
	max-width: 900px;
	margin-top: 14px;
	color: #fff;
	font-size: 16px;
	line-height: 1.4;
}

#lightbox-close-custom {
	position: absolute;
	top: 16px;
	right: 24px;
	z-index: 1000000;
	width: 48px;
	height: 48px;
	padding: 0;
	border: 0;
	background: transparent;
	color: #fff;
	font-size: 42px;
	line-height: 1;
	cursor: pointer;
}
