

.gallery {
    column-count: 3; /* Número de columnas estilo Pinterest */
    column-gap: 15px;
    width: 90%;
    max-width: 2000px;
    margin: 20px auto;
}

.gallery-item {
    margin-bottom: 15px;
    break-inside: avoid; /* Evita que las imágenes se rompan entre columnas */
}

.gallery-item img {
    width: 100%;
    height: auto;
    display: block;
    cursor: pointer;
    border-radius: 8px;
}

.modal {
    display: none; /* Oculto por defecto */
    position: fixed;
    z-index: 1000;
    padding-top: 60px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.9);
    
}

.modal-content {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 700px;
    border-radius: 8px;
}


.close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
}

.close:hover,
.close:focus {
    color: #bbb;
    text-decoration: none;
    cursor: pointer;
}

.prev, .next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    width: auto;
    padding: 16px;
    color: white;
    font-weight: bold;
    font-size: 20px;
    transition: 0.6s ease;
    user-select: none;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.5);
}

.prev {
    left: 10px;
}

.next {
    right: 10px;
}

.prev:hover, .next:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

@media screen and (max-width: 768px) {
    .gallery {
        column-count: 2;
    }
}

@media screen and (max-width: 480px) {
    .gallery {
        column-count: 1;
    }
}
