/* RESET Y FONDO FIJO */
.ejecucion-page {
    width: 100%;
    margin: 0;
    padding: 0;
    position: relative;
    background: url('../images/fondo-ejecucion.png') no-repeat center center;
    background-attachment: fixed;
    background-size: cover;
}

/* CAPA OSCURA GENERAL */
.ejecucion-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(30, 30, 30, 0.7); 
    z-index: 1;
    pointer-events: none;
}

/* SECCIONES (100vh para ocupar una pantalla exacta) */
.ejecucion-seccion {
    position: relative;
    z-index: 2;
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 100px 20px 60px 20px;
    box-sizing: border-box;
}

/* CONTENEDOR PRINCIPAL */
.ejecucion-container {
    width: 100%;
    max-width: 1200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 40px;
}

/* En la segunda sección no hay título, forzamos el centrado absoluto */
.centrado-perfecto {
    height: 100%;
    justify-content: center;
}

/* TÍTULOS */
.ejecucion-titulos {
    text-align: center;
    width: 100%;
}

.ejecucion-titulos h1 {
    color: #ffffff;
    font-size: 42px;
    font-weight: 700;
    margin-bottom: 10px;
    font-family: 'Roboto', sans-serif;
}

.ejecucion-titulos h2 {
    color: #ffffff;
    font-size: 20px;
    font-weight: 400;
    margin-bottom: 0;
    font-family: 'Roboto', sans-serif;
}

/* GRID DE TARJETAS (Cajas Blancas) */
.grid-proyectos {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3 columnas del mismo tamaño */
    gap: 30px;
    width: 100%;
}

/* ESTILO DE CADA TARJETA */
.tarjeta-proyecto {
    background-color: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease;
}

.tarjeta-proyecto:hover {
    transform: translateY(-10px);
}

.tarjeta-proyecto img {
    width: 100%;
    height: 250px; /* Fija la altura de todas las fotos para que se vean uniformes */
    object-fit: cover;
    display: block;
}

.tarjeta-info {
    padding: 25px 20px;
    text-align: center;
    flex-grow: 1; /* Permite que las cajas blancas se estiren igual si una tiene más texto */
    display: flex;
    flex-direction: column;
}

.tarjeta-info h3 {
    color: #001A51;
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 15px;
    font-family: 'Roboto', sans-serif;
}

.tarjeta-info p {
    color: #333333;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 0;
    font-family: 'Roboto', sans-serif;
}

/* ANIMACIÓN REVEAL */
.reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s ease-out;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* RESPONSIVE (Móviles y Tablets) */
@media screen and (max-width: 992px) {
    .grid-proyectos {
        grid-template-columns: repeat(2, 1fr); /* 2 columnas en tablets */
    }
}

@media screen and (max-width: 768px) {
    .grid-proyectos {
        grid-template-columns: 1fr; /* 1 columna en celulares */
    }
    
    .ejecucion-titulos h1 {
        font-size: 32px;
    }
}