/* =========================================================
   Shoka Theme - WordPress Classic Gallery
   ========================================================= */

/* ---------------------------------------------------------
   Gallery Container
   --------------------------------------------------------- */

.gallery {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    width: 100%;
    margin: 2rem 0;
    padding: 0;
    clear: both;
}


/* ---------------------------------------------------------
   Gallery Item
   --------------------------------------------------------- */

.gallery .gallery-item {
    width: 100% !important;
    aspect-ratio: 1 / 1;
    margin: 0 !important;
    padding: 0;
    float: none !important;
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    cursor: zoom-in;
}


/* ---------------------------------------------------------
   Gallery Image Wrapper
   --------------------------------------------------------- */

.gallery .gallery-icon {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
    line-height: 0;
}


/* ---------------------------------------------------------
   Gallery Images
   --------------------------------------------------------- */

.gallery .gallery-icon img {
    display: block;
    width: 100%;
    height: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 8px;

    object-fit: cover;
    object-position: center;

    transition: transform 0.3s ease;
}


/* ---------------------------------------------------------
   Hover
   --------------------------------------------------------- */

.gallery .gallery-item:hover .gallery-icon img {
    transform: scale(1.025);
}


/* ---------------------------------------------------------
   Caption
   --------------------------------------------------------- */

.gallery .gallery-caption {
    margin: 8px 0 0;
    padding: 0;
    font-size: 0.85rem;
    line-height: 1.7;
    text-align: center;
}


/* ---------------------------------------------------------
   Tablet
   --------------------------------------------------------- */

@media (max-width: 991.98px) {

    .gallery {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 10px;
    }

}


/* ---------------------------------------------------------
   Mobile
   --------------------------------------------------------- */

@media (max-width: 575.98px) {

    .gallery {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
        margin: 1.5rem 0;
    }

    .gallery .gallery-item,
    .gallery .gallery-icon,
    .gallery .gallery-icon img {
        border-radius: 6px;
    }

}


/* ---------------------------------------------------------
   Very Small Screens
   --------------------------------------------------------- */

@media (max-width: 359.98px) {

    .gallery {
        gap: 6px;
    }

}




/* =========================================================
   Shoka Lightbox
   ========================================================= */

.shoka-lightbox {
    position: fixed;
    inset: 0;
    z-index: 99999;

    display: none;

    direction: rtl;

    opacity: 0;
    visibility: hidden;

    transition:
        opacity 0.25s ease,
        visibility 0.25s ease;
}

.shoka-lightbox.is-open {
    display: block;
    opacity: 1;
    visibility: visible;
}


/* ---------------------------------------------------------
   Backdrop
   --------------------------------------------------------- */

.shoka-lightbox-backdrop {
    position: absolute;
    inset: 0;

    background: rgba(8, 8, 8, 0.96);

    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}


/* ---------------------------------------------------------
   Content
   --------------------------------------------------------- */

.shoka-lightbox-content {
    position: relative;
    z-index: 2;

    width: 100%;
    height: 100%;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 55px 80px;
}


/* ---------------------------------------------------------
   Image Wrapper
   --------------------------------------------------------- */

.shoka-lightbox-image-wrapper {
    position: relative;

    display: flex;
    align-items: center;
    justify-content: center;

    width: 100%;
    height: 100%;

    touch-action: pan-y;
}


/* ---------------------------------------------------------
   Lightbox Image
   --------------------------------------------------------- */

.shoka-lightbox-image {
    display: block;

    max-width: 100%;
    max-height: 88vh;

    width: auto;
    height: auto;

    object-fit: contain;

    border-radius: 3px;

    box-shadow:
        0 20px 70px rgba(0, 0, 0, 0.45);

    opacity: 0;

    transform: scale(0.985);

    transition:
        opacity 0.22s ease,
        transform 0.22s ease;
}

.shoka-lightbox-image.is-loaded {
    opacity: 1;
    transform: scale(1);
}


/* ---------------------------------------------------------
   General Buttons
   --------------------------------------------------------- */

.shoka-lightbox-close,
.shoka-lightbox-prev,
.shoka-lightbox-next {

    position: absolute;
    z-index: 5;

    display: flex;
    align-items: center;
    justify-content: center;

    width: 42px;
    height: 42px;

    padding: 0;

    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 50%;

    color: rgba(255, 255, 255, 0.88);

    background: rgba(255, 255, 255, 0.07);

    cursor: pointer;

    transition:
        background-color 0.2s ease,
        border-color 0.2s ease,
        color 0.2s ease,
        transform 0.2s ease;
}


.shoka-lightbox-close:hover,
.shoka-lightbox-prev:hover,
.shoka-lightbox-next:hover {

    color: #fff;

    background: rgba(255, 255, 255, 0.16);

    border-color: rgba(255, 255, 255, 0.25);
}


/* ---------------------------------------------------------
   Close Button
   --------------------------------------------------------- */

.shoka-lightbox-close {

    top: 18px;
    right: 18px;

    font-size: 16px;
}


/* ---------------------------------------------------------
   Previous
   --------------------------------------------------------- */

.shoka-lightbox-prev {

    right: 18px;
    top: 50%;

    transform: translateY(-50%);

    font-size: 21px;
}


.shoka-lightbox-prev:hover {

    transform:
        translateY(-50%)
        scale(1.06);
}


/* ---------------------------------------------------------
   Next
   --------------------------------------------------------- */

.shoka-lightbox-next {

    left: 18px;
    top: 50%;

    transform: translateY(-50%);

    font-size: 21px;
}


.shoka-lightbox-next:hover {

    transform:
        translateY(-50%)
        scale(1.06);
}


/* ---------------------------------------------------------
   Counter
   --------------------------------------------------------- */

.shoka-lightbox-counter {

    position: absolute;

    left: 50%;
    bottom: 16px;

    transform: translateX(-50%);

    z-index: 5;

    padding: 6px 11px;

    border-radius: 20px;

    color: rgba(255, 255, 255, 0.72);

    background: rgba(0, 0, 0, 0.35);

    font-size: 12px;
    line-height: 1;

    direction: ltr;

    user-select: none;
}


/* ---------------------------------------------------------
   Focus
   --------------------------------------------------------- */

.shoka-lightbox-close:focus-visible,
.shoka-lightbox-prev:focus-visible,
.shoka-lightbox-next:focus-visible {

    outline: 2px solid rgba(255, 255, 255, 0.65);
    outline-offset: 3px;
}


/* ---------------------------------------------------------
   Mobile
   --------------------------------------------------------- */

@media (max-width: 767.98px) {

    .shoka-lightbox-content {

        padding:
            55px
            48px
            48px;
    }


    .shoka-lightbox-image {

        max-width: 100%;
        max-height: 82vh;

        box-shadow:
            0 15px 45px rgba(0, 0, 0, 0.4);
    }


    .shoka-lightbox-close,
    .shoka-lightbox-prev,
    .shoka-lightbox-next {

        width: 38px;
        height: 38px;

        border-color:
            rgba(255, 255, 255, 0.10);

        background:
            rgba(255, 255, 255, 0.06);
    }


    .shoka-lightbox-close {

        top: 10px;
        right: 10px;

        font-size: 14px;
    }


    .shoka-lightbox-prev {

        right: 7px;

        font-size: 18px;
    }


    .shoka-lightbox-next {

        left: 7px;

        font-size: 18px;
    }


    .shoka-lightbox-counter {

        bottom: 10px;

        font-size: 11px;
    }

}


/* ---------------------------------------------------------
   Very Small Screens
   --------------------------------------------------------- */

@media (max-width: 359.98px) {

    .shoka-lightbox-content {

        padding-left: 42px;
        padding-right: 42px;
    }


    .shoka-lightbox-prev {

        right: 4px;
    }


    .shoka-lightbox-next {

        left: 4px;
    }

}