
.infraestructura-fotos {
    width: 100%;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 50px 20px;
}

.sec-fotos {
    display: grid;
    grid-template-columns: repeat(4, 1fr);  /* Mostrar 4 imágenes en fila */
    gap: 10px;
}

.contenedor-infra-fotos img {
    width: 100%;
    transition: transform 0.3s ease;  /* Añadir efecto de zoom */
    border-radius: 20px;
}

.contenedor-infra-fotos img:hover {
    transform: scale(1.05);  /* Zoom al pasar el cursor */
}

.foto-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 8px;
}

.foto-item h3 {
    font-size: 18px;
    color: white;
    margin-bottom: 10px;
    text-align: center;
    background: #0fa759;
    padding: 10px 40px;
    border-radius: 20px;
}


.lightbox-image {
    max-width: 80%;
    max-height: 80%;
    border-radius: 10px;
    transition: opacity 0.5s ease-in-out;
}

.fade {
    opacity: 0;
    animation: fadeIn 0.5s forwards;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}


#lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
    z-index: 1000;
}

#lightbox.active {
    opacity: 1;
    visibility: visible;
}

.collage-container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.main-image {
    width: 40%; /* Tamaño más grande para la imagen principal */
    margin-bottom: 15px;
    border-radius: 10px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.main-image:hover {
    transform: scale(1.05);
}

.small-images-container {
    display: flex;
    gap: 10px; /* Separación entre las imágenes pequeñas */
}

.small-image {
    width: 300px; /* Tamaño más pequeño para las imágenes secundarias */
    cursor: pointer;
    transition: transform 0.3s ease;
}

.small-image:hover {
    transform: scale(1.05);
}

.full-image {
    max-width: 80%;
    max-height: 80%;
    border-radius: 10px;
}

.close-button {
    position: absolute;
    top: 20px;
    right: 20px;
    color: white;
    font-size: 2em;
    cursor: pointer;
}


@media (max-width: 1200px) {
    .sec-fotos {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .sec-fotos {
        grid-template-columns: repeat(2, 1fr);
    }
    .foto-item h3 {
        font-size: 16px;
        padding: 8px 30px;
    }

    .small-images-container{
        flex-direction: column;
        align-items: center;
    }
}

@media (max-width: 480px) {
    .sec-fotos {
        grid-template-columns: 1fr;
    }
    .foto-item h3 {
        font-size: 14px;
        padding: 6px 20px;
    }
}



@media (max-width: 768px) {
    #lightbox img {
        max-width: 80%;
        max-height: 80%;
    }
    #lightbox .close {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    #lightbox img {
        max-width: 70%;
        max-height: 70%;
    }
    #lightbox .close {
        font-size: 1.2rem;
    }
}
