.container {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

.galeria {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    width: 95%;
    margin: auto;
    grid-gap: 10px;
    padding: 40px 0;
    overflow: hidden;
}

.galeria-img {
    width: 100%;
    vertical-align: top;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.galeria a:hover .galeria-img {
    transform: rotate(5deg) scale(1.1);
}

.light-box {
    position: fixed;
    top: 0;
    left: 0;
    background: rgba(0, 0, 0, .5);
    transition: transform .3s ease-in-out;
    width: 100%;
    height: 100vh;
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    transform: scale(0);
}

.light-box img {
    width: 35vw;
    max-height: 80vh;
}

.light-box:target {
    transform: scale(1);
}

.close {
    display: block;
    position: absolute;
    top: 70px;
    right: 10px;
    background: #b3b6b7;
    color: #fff;
    text-decoration: none;
    width: 40px;
    height: 40px;
    text-align: center;
    line-height: 40px;
    border-radius: 50%;
}

.next {
    display: block;
    background: #b3b6b7;
    color: #fff;
    height: 30px;
    width: 30px;
    line-height: 30px;
    text-decoration: none;
    text-align: center;
}

.pagination .page-item.active .page-link {
    background-color: #000;
    border-color: #000;
}

@media screen and (max-width: 400px) {
    .galeria {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
    .close {
        top: 20px;
        right: 20px;
    }
}
