/* Masonry image gallery styling */
.gallery {
    display: flex;
    flex-direction: column;
    align-items: center;
}

    .gallery .images {
        max-width: 100%;
        list-style: none;
        padding: 0;
    }

        .gallery .images .img {
            cursor: pointer;
            border-radius: 4px;
            float: left;
        }

        .gallery .images img {
            width: 100%;
            border: solid 4px #fff;
            width: 100%;
            height: 100%;
        }

        .gallery .images .img:hover img {
            /* transform: scale(1.05); */
            border: solid 4px #fff;
            box-shadow: 0px 0px 10px 10px rgba(0,0,0,0.1);
            transition: all 0.2s ease;
        }

/* Image lightbox styling */
.lightbox {
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    z-index: 5;
    position: fixed;
    visibility: hidden;
    background: rgba(0,0,0,0.65);
}

    .lightbox.show {
        visibility: visible;
    }

    .lightbox .wrapper {
        position: fixed;
        left: 50%;
        top: 35%;
        /* width: 100%; */
        padding: 20px;
        max-width: 850px;
        background: #fff;
        border-radius: 6px;
        opacity: 0;
        pointer-events: none;
        transform: translate(-50%, -50%) scale(0.9);
        transition: transform 0.1s ease;
    }

    .lightbox.show .wrapper {
        opacity: 1;
        pointer-events: auto;
        transform: translate(-50%, -50%) scale(1);
    }

.wrapper :where(header, .details) {
    display: flex;
    align-items: center;
}

.wrapper header {
    justify-content: space-between;
}

header .details i {
    font-size: 1.7rem;
}

header .details span {
    font-size: 1.2rem;
    margin-left: 10px;
}

header .buttons i {
    height: 30px;
    width: 30px;
    cursor: pointer;
    display: inline-block;
    color: #fff;
    /* margin-left: 10px; */
    background: #6C757D;
    font-size: 1.25rem;
    line-height: 30px;
    text-align: center;
    border-radius: 4px;
    transition: 0.2s ease;
}

    header .buttons i:hover {
        background: #5f666d;
    }

.wrapper .preview-img {
    display: flex;
    justify-content: center;
    margin-top: 25px;
}

.preview-img .img {
    max-height: 65vh;
}

.preview-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

{
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: none;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.lightbox.show {
    display: flex;
}

.lightbox img {
    max-width: 100%;
    max-height: 100%;
}

.prev-btn, .next-btn, .close-icon {
    position: absolute;
    background: rgba(256, 256, 256, 0.3);
    border: none;
    font-size: 2rem;
    color: white;
    cursor: pointer;
    top: 45%;
    height: 15%;
    width: 15%;
}

.prev-btn {
    left: 20px;
}

.next-btn {
    right: 20px;
}

.close-icon {
    top: 5px;
    right: 5px;
}
/* Responsive media query code */
@media screen and (max-width: 688px) {
    .lightbox .wrapper {
        padding: 12px;
        max-width: calc(100% - 26px);
    }

    .wrapper .preview-img {
        margin-top: 15px;
    }

    .gallery .images {
        max-width: 100%;
        padding: 0 13px;
        margin-top: 20px;
    }
}
