/*Fullscreen gallery css*/

.museum-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .82);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity .25s;
    z-index: 999999;
    touch-action: none;
    overscroll-behavior: contain;
    touch-action: none;
}

.museum-lightbox.open {
    opacity: 1;
    visibility: visible;
}

.museum-lightbox-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
    width: 80vw;
    padding: 32px 0;

    .gallery-image {
        display: flex;
        flex-direction: column;
        justify-content: center;
        width: 100%;
        height: 100%;
    }
}

.gallery-image {
    overflow: hidden;

    img {
        width: 100%;
    }
}

.museum-lightbox-track {

    display: flex;

    height: 100%;

    transition: transform .35s ease;

}

.museum-lightbox-image {

    flex: 0 0 100%;

    width: 100%;

    height: 100%;

    object-fit: contain;

}

.museum-lightbox-image {
    max-width: 92vw;
    max-height: 88vh;
    object-fit: contain;
    pointer-events: none;
    user-select: none;

    opacity: 1;
    transition: opacity .25s ease;
}

.museum-lightbox-image.fade-out {
    opacity: 0;
}

.museum-lightbox-counter {
    color: #fff;
    margin-top: 15px;
    font-size: 16px;
    letter-spacing: .5px;
}

.museum-lightbox-close,
.museum-lightbox-prev,
.museum-lightbox-next {
    position: absolute;
    border: none;
    background: rgba(255, 255, 255, .12);
    color: #fff;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    cursor: pointer;
    transition: all .2s;
    font-size: 24px;
    z-index: 100000;
    transition: all 0.3s;

    i {
        margin: 0px 0 0 -6px;
    }
}

.museum-lightbox-close:hover,
.museum-lightbox-prev:hover,
.museum-lightbox-next:hover {
    background: rgba(255, 255, 255, .25);
    color: var(--primary-orange);
}

.museum-lightbox-close {
    top: 30px;
    right: 30px;
    /* font-size: 18px; */
}

.museum-lightbox-prev {
    left: 30px;
    top: 50%;
    transform: translateY(-50%);
}

.museum-lightbox-next {
    right: 30px;
    top: 50%;
    transform: translateY(-50%);
}

.museum-gallery {
    h2 {
        text-align: center;
        color: var(--primary-orange);
        font-size: 40px;
        font-weight: 700;
        width: 100%;
    }
}

.museum-gallery-button {
    align-self: center;
    width: fit-content;
    text-align: center !important;
    background: var(--primary-orange);
    color: var(--primary-dark-blue);
    font-weight: 700;
    font-size: 14px;
    text-decoration: none;
    padding: 12px 40px !important;
    border-radius: 12px;
    transition: .25s;
}

.museum-gallery-button:hover {
    background: #f27b1d;
}

.museum-gallery::before {
    background: #FFF0E5D6;
}

.museum-gallery .wp-block-gallery {
    display: grid;
    grid-template-columns: 1.2fr 1.2fr 1.2fr;
    grid-template-rows: repeat(2, 220px);
    gap: 18px;
}

.museum-gallery .wp-block-image {
    width: 100% !important;
}

.museum-gallery .wp-block-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0 32px;
}

@media (max-width:768px) {
    .wp-block-gallery {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        width: 100vw;
        overflow-y: scroll;
        gap: 16px;
        margin-left: -16px !important;
        margin-right: -16px !important;
        padding-bottom: 8px;

        .wp-block-image {
            min-width: 75vw !important;
            aspect-ratio: 4/3 !important;
        }
    }

    .museum-gallery {
        margin-left: -8px;
        margin-right: -8px;
        padding: 32px 19px;
        max-width: calc(100vw - 18px);
    }

    .museum-lightbox {
        background: rgb(0, 0, 0);
    }

    .museum-lightbox-prev,
    .museum-lightbox-next {
        width: 46px;
        height: 46px;
        font-size: 22px;
        top: 90%;
    }

    .museum-lightbox-content {
        width: 100%;

        .museum-lightbox-image {
            width: 100%;
            height: 100%;
            object-fit: contain;
            max-height: 90vh;
            max-width: 100vw;
            user-select: auto;
        }
    }

}