/*
Theme Name: Hello Elementor Child · AFSEC
Template: hello-elementor
Version: 1.0.0
Text Domain: hello-elementor-child
Description: Child theme de AFSEC. Los colores y tipografías viven en el Kit de Elementor (Site Settings); aquí solo va CSS mínimo que use esos tokens.
*/

/* Resaltado amarillo bajo una palabra del título (se usa con <span class="afsec-resaltado">). */
.afsec-resaltado {
	background: linear-gradient(transparent 62%, var(--e-global-color-accent) 62%);
	padding: 0 4px;
}

/* Tarjeta de logo de aliado (Loop Item): si el aliado tiene logo (imagen destacada) se oculta el nombre;
   si no tiene, el nombre se muestra dentro de un recuadro punteado como marcador. */
.afsec-logo-card:has(img) .afsec-logo-card__nombre { display: none; }
.afsec-logo-card:not(:has(img)) { border-style: dashed !important; border-color: var(--e-global-color-afsec_lila_borde) !important; }

/* Enlaces de texto (títulos con enlace, "Conoce… →"): responden al puntero con un subrayado que se dibuja. */
.elementor-widget-heading .elementor-heading-title a {
	background-image: linear-gradient(currentColor, currentColor);
	background-size: 0 1.5px;
	background-position: 0 100%;
	background-repeat: no-repeat;
	transition: background-size .25s ease, color .2s ease;
}
.elementor-widget-heading .elementor-heading-title a:hover,
.elementor-widget-heading .elementor-heading-title a:focus-visible { background-size: 100% 1.5px; }

/* Objetivos táctiles de 44 px en móvil (listas y enlaces sueltos del header y footer marcados con .afsec-tap). */
@media (max-width: 767px) {
	.afsec-tap .elementor-icon-list-item > a,
	.afsec-tap .elementor-icon-list-item > .elementor-icon-list-text,
	.afsec-tap .elementor-heading-title a { display: inline-flex; align-items: center; min-height: 44px; }
	.afsec-tap .elementor-icon-list-items { gap: 0; }
}

@media (prefers-reduced-motion: reduce) {
	.elementor-widget-heading .elementor-heading-title a { transition: none; }
}

/* Entrada del hero, una sola vez al cargar. Solo CSS: si un script falla, el contenido igual se ve. */
@keyframes afsec-enter { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.afsec-enter { animation: afsec-enter .6s cubic-bezier(.2,.7,.2,1) both; }
.afsec-enter--2 { animation-delay: .08s; }
.afsec-enter--3 { animation-delay: .16s; }
.afsec-enter--4 { animation-delay: .24s; }
.afsec-enter--5 { animation-delay: .32s; }
@media (prefers-reduced-motion: reduce) { .afsec-enter { animation: none; } }

/* Barra de eventos del header: el punto amarillo y el texto comparten la misma línea central. */
.afsec-bar__texto p { margin: 0; }
.afsec-bar__punto .elementor-icon-wrapper,
.afsec-bar__punto .elementor-icon { display: flex; line-height: 1; }

/* Tarjeta de aliado (Loop Item): con logo se ve el logo sobre blanco; sin logo, las siglas sobre lila. */
.afsec-aliado-logo:has(img) { background-color: #fff !important; }
.afsec-aliado-logo:has(img) .afsec-aliado-siglas { display: none; }
.afsec-aliado-logo:not(:has(img)) .elementor-widget-theme-post-featured-image { display: none; }

/* Línea del tiempo (Nested Carousel en Quiénes somos): flechas como botones redondos amarillos. */
.afsec-timeline .elementor-swiper-button {
	width: 48px; height: 48px; border-radius: 50%;
	display: inline-flex; align-items: center; justify-content: center;
	background: var(--e-global-color-accent);
	transition: transform .15s ease, background-color .2s ease;
}
.afsec-timeline .elementor-swiper-button:hover { transform: translateY(-2px); background: var(--e-global-color-afsec_amarillo_cl); }
.afsec-timeline .elementor-swiper-button:active { transform: translateY(0) scale(.96); }
.afsec-timeline .elementor-swiper-button.swiper-button-disabled { opacity: .35; }
.afsec-timeline .swiper-pagination-fraction { width: auto; }
@media (max-width: 767px) {
	.afsec-timeline__pista .elementor-heading-title { font-size: 11px !important; }
}
/* Navegación agrupada abajo a la izquierda: ← 1 / 6 → (como la referencia). */
.afsec-timeline .elementor-swiper-button-prev,
.afsec-timeline .elementor-swiper-button-next,
.afsec-timeline .swiper-pagination-fraction { top: auto !important; bottom: 0 !important; right: auto !important; transform: none; }
.afsec-timeline .elementor-swiper-button-prev { left: 0 !important; }
.afsec-timeline .swiper-pagination-fraction { left: 48px !important; width: 88px !important; line-height: 48px; text-align: center; }
.afsec-timeline .elementor-swiper-button-next { left: 136px !important; }
.afsec-timeline .swiper-pagination-fraction { transform: translateY(-48px) !important; }

/* Caja de herramientas: tarjetas que responden al puntero. */
.afsec-card-link, .afsec-card-herramienta { transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease; }
.afsec-card-link:hover, .afsec-card-link:focus-visible,
.e-loop-item:hover .afsec-card-herramienta {
	transform: translateY(-2px);
	border-color: var(--e-global-color-afsec_lila_borde) !important;
	box-shadow: 0 12px 30px rgba(31, 20, 51, .08);
}
@media (prefers-reduced-motion: reduce) { .afsec-card-link, .afsec-card-herramienta { transition: none; } }
/* Submenú del header: ancho suficiente para "Caja de herramientas" y esquinas redondeadas. */
.elementor-nav-menu--main .sub-menu { min-width: 220px !important; overflow: hidden; }

/* Tarjeta de persona (Comité de Liderazgo y Equipo en Quiénes somos): foto 4:5 con esquinas de 24 px.
   Sin foto, el mismo recuadro lila con las iniciales. Encuadre por persona con --arriba. */
.afsec-persona__foto img,
.e-con.afsec-persona__foto {
	width: 100%;
	height: auto;
	aspect-ratio: 4 / 5;
	object-fit: cover;
	border-radius: 24px;
}
.afsec-persona__foto img { display: block; }
.afsec-persona__foto--arriba img { object-position: center 12%; }
.e-con.afsec-persona__foto { display: flex; justify-content: center; align-items: center; }
