/* --- ESTILOS PÁGINA ACROBACIAS (Versión Bandera) --- */

/* =========================================
   1. HERO & INTRO
   ========================================= */


/* 1. HERO PEQUEÑO (Cabecera de sección) */
/* A diferencia del Home, aquí el banner es más corto */
.small-hero {
    position: relative;
    height: 40vh;           /* Altura reducida */
    min-height: 300px;
    background-color: var(--ea-blue);
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hero-media { 
    position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 0; 
}
.hero-media img { 
    width: 100%; height: 100%; object-fit: cover; filter: brightness(0.5); 
}

.hero-content { position: relative; z-index: 1; color: white; }
.hero-content h1 { font-size: 3rem; margin-bottom: 0.5rem; }


/* 2. CAJA DESTACADA */
.intro-section { padding: 4rem 0; }

.mission-box {
    background-color: white;
    padding: 3rem;
    border-left: 5px solid var(--ea-yellow); /* Borde lateral amarillo */
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    max-width: 900px;
    margin: 0 auto;
    border-radius: 0 8px 8px 0;
}

.mission-label {
    text-transform: uppercase; 
    color: var(--ea-red); 
    font-weight: 700; 
    font-size: 0.85rem; 
    letter-spacing: 1px; 
    display: block; 
    margin-bottom: 0.5rem;
}

.lead-text { 
    font-size: 1.25rem; 
    color: var(--ea-blue); 
    margin-bottom: 1.5rem; 
}

.hero-section.hero-tall {
    padding: 0; margin: 0; height: auto;
    background-color: #000;
}

.hero-tall .hero-media img {
    display: block; width: 100%; height: 85vh;
    object-fit: cover; object-position: center center;
}

.intro-overlap {
    position: relative; margin-top: -10rem; z-index: 20;
    padding-top: 0; padding-bottom: 2rem;
}

.intro-card {
    background-color: #ffffff;
    max-width: 900px; margin: 0 auto; padding: 3.5rem;
    text-align: center;
    box-shadow: 0 -20px 40px rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    border-left: 6px solid var(--aspa-yellow, #FFC400);
}

.intro-card h1 {
    font-size: 2.8rem; color: var(--aspa-blue, #183860);
    margin-bottom: 1.5rem; font-weight: 800;
}

.intro-lead {
    font-size: 1.25rem; color: #444; line-height: 1.7;
}

/* =========================================
   2. BLOQUES DE MANIOBRAS (Fondo Blanco)
   ========================================= */
.maneuvers-section {
    padding: 3rem 0 5rem 0;
    background-color: #ffffff;
}

.maneuvers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.maneuver-card {
    background: #ffffff;
    padding: 2.5rem 1.5rem;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 5px 20px rgba(0,0,0,0.06);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-top: 4px solid var(--aspa-red, #C60B1E); /* Detalle rojo */
    border-left: 1px solid #f0f0f0;
    border-right: 1px solid #f0f0f0;
    border-bottom: 1px solid #f0f0f0;
}

.maneuver-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.12);
}

.icon-box {
    font-size: 3rem; margin-bottom: 1.5rem; display: inline-block;
}

.maneuver-card h3 {
    color: var(--aspa-blue, #183860);
    font-size: 1.3rem; margin-bottom: 1rem; font-weight: 700;
}

.maneuver-card p {
    color: #555; font-size: 1rem; line-height: 1.6;
}

/* =========================================
   3. GALERÍAS CORPORATIVAS (Rojo y Amarillo)
   ========================================= */
.gallery-section { padding: 5rem 0; }
.section-header { text-align: center; max-width: 700px; margin: 0 auto 4rem auto; }
.section-header p { font-size: 1.2rem; margin-top: 1rem; }

/* --- GALERÍA 1: ROJO ASPA --- */
.section-red { 
    background-color: var(--aspa-red, #C60B1E); 
    color: white; 
}
.section-red .section-title { color: white !important; }
.section-red p { color: rgba(255, 255, 255, 0.9); }

/* --- GALERÍA 2: AMARILLO ASPA --- */
.section-yellow {
    background-color: var(--aspa-yellow, #FFC400);
    color: var(--aspa-blue, #183860); /* Texto Azul sobre Amarillo para leerse bien */
}
.section-yellow .section-title { color: var(--aspa-blue, #183860) !important; }
.section-yellow p { color: var(--aspa-blue, #183860); font-weight: 500; opacity: 0.9; }

/* Grid Mosaico */
.mosaic-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    grid-auto-flow: dense;
    gap: 1.5rem;
}

.gallery-item {
    margin: 0; position: relative;
    border-radius: 12px; overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2); /* Sombra un poco más fuerte para resaltar sobre colores */
    background: #000; aspect-ratio: 4/3;
    cursor: zoom-in;
}

.gallery-item img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

/* ACCESIBILIDAD: Indicador de Foco (Teclado) */
/* En el fondo ROJO, el borde amarillo se ve bien */
.section-red .gallery-item img:focus {
    outline: 4px solid var(--aspa-yellow, #FFC400);
    outline-offset: -4px;
}
/* En el fondo AMARILLO, el borde amarillo no se ve -> Usamos Azul */
.section-yellow .gallery-item img:focus {
    outline: 4px solid var(--aspa-blue, #183860);
    outline-offset: -4px;
}

/* Tamaños Especiales */
.item-large { grid-column: span 2; grid-row: span 2; }
.item-wide { grid-column: span 2; aspect-ratio: 2/1; }
.item-tall { grid-row: span 2; aspect-ratio: 2/3; }

/* Hover y Pie de foto */
.gallery-item figcaption {
    position: absolute; bottom: 0; left: 0; width: 100%;
    padding: 1.5rem;
    background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
    color: white; font-weight: 600; font-size: 1.1rem;
    opacity: 0; transform: translateY(20px);
    transition: all 0.4s ease;
    pointer-events: none;
}

.gallery-item:hover img { transform: scale(1.05); opacity: 1; }
.gallery-item:hover figcaption { opacity: 1; transform: translateY(0); }

/* =========================================
   4. LIGHTBOX
   ========================================= */
.lightbox-modal {
    display: none; position: fixed; z-index: 10000;
    left: 0; top: 0; width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(5px);
    justify-content: center; align-items: center; flex-direction: column;
}

.lightbox-content {
    max-width: 90%; max-height: 80vh;
    border-radius: 4px; box-shadow: 0 0 50px rgba(0,0,0,0.5);
    animation: zoomIn 0.3s ease; object-fit: contain;
}

@keyframes zoomIn {
    from { transform: scale(0.95); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

#captionText {
    color: #ccc; margin-top: 1rem; font-size: 1.1rem;
    text-align: center; font-family: 'Archivo', sans-serif;
}

.close-btn {
    position: absolute; top: 20px; right: 30px;
    background: none; border: none;
    color: white; font-size: 3rem; cursor: pointer;
    line-height: 1; transition: color 0.3s;
}
.close-btn:hover, .close-btn:focus { color: var(--aspa-yellow, #FFC400); outline: none; }

/* =========================================
   5. ANIMACIÓN SCROLL
   ========================================= */
.reveal-on-scroll { opacity: 0; transform: translateY(30px); transition: all 0.8s ease-out; }
.reveal-on-scroll.is-visible { opacity: 1; transform: translateY(0); }

/* RESPONSIVE */
@media (max-width: 768px) {
    .hero-tall .hero-media img { height: 60vh; }
    .intro-overlap { margin-top: -4rem; padding: 0 1rem 1rem 1rem; }
    .intro-card { padding: 2rem; }
    .intro-card h1 { font-size: 2rem; }
    .maneuvers-grid { grid-template-columns: 1fr; }
    .mosaic-grid { grid-template-columns: 1fr; }
    .item-large, .item-wide, .item-tall { grid-column: auto; grid-row: auto; aspect-ratio: 4/3; }
}