.gallery {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.gallery__item {
    overflow: hidden;
    border-radius: 8px;
    cursor: pointer;
}

.gallery__img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    aspect-ratio: 4 / 3;
    transition: transform 0.3s ease;
}

.gallery__img:hover {
    transform: scale(1.05);
}

.gallery-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(153, 153, 153, 0.85) !important;
        /* gris medio */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 999;
}

.gallery-lightbox.hidden {
    display: none;
}

.gallery-lightbox__modal {
    max-width: 95%;
    max-height: 95%;
}

.gallery-lightbox__img-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-lightbox__img {
    width: 100%;
    max-width: 90vw;
    max-height: 80vh;
    object-fit: contain;
    display: block;
    margin: auto;
    border: 5px solid black;
    border-radius: 8px;
}

.gallery-lightbox__control {
    position: absolute;
    cursor: pointer;
    user-select: none;
    z-index: 2;
}

.icon-back,
.icon-next {
    color: white;
    font-size: 2rem;
    background: none;
    padding: 0;
    border: none;
    text-shadow: 0 0 4px black;
}

.icon-back {
    left: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
}

.icon-next {
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
}

.icon-close {
    top: 0.5rem;
    right: 0.5rem;
    width: 32px;
    height: 32px;
    background-color: black;
    color: white;
    border-radius: 50%;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 4px rgba(255, 255, 255, 0.3);
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .gallery {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .gallery {
        grid-template-columns: 1fr;
    }

    .gallery-lightbox__img {
        border: 5px solid white;
    }
}