/* =========================================
   REGAL GALLERY PAGE
========================================= */

.gallery-page {
    width: 100%;
    background: #090b0e;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

.gallery-section {
    width: 100%;
    max-width: 1316px;
    margin: 0 auto;
    padding: 22px 22px 70px;
}

/* 4 IMAGES PER ROW */
.gallery-grid {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin: 0;
    padding: 0;
}

.gallery-item {
    width: 100%;
    height: 330px;
    overflow: hidden;
    cursor: pointer;
    position: relative;
    background: #111;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    transition: transform .6s cubic-bezier(.2,.7,.2,1);
}

.gallery-item:hover img {
    transform: scale(1.06);
}


/* =========================================
   REMOVE OLD SPECIAL SPANS
========================================= */

.gallery-large,
.gallery-wide,
.gallery-tall {
    grid-column: span 1;
    grid-row: span 1;
}


/* =========================================
   LIGHTBOX
========================================= */

.gallery-lightbox {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,.96);
    z-index: 99999;

    display: flex;
    align-items: center;
    justify-content: center;

    opacity: 0;
    visibility: hidden;
    pointer-events: none;

    transition: opacity .3s ease,
                visibility .3s ease;
}

.gallery-lightbox.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.gallery-lightbox-bg {
    position: absolute;
    inset: 0;
}

.gallery-popup-image {
    position: relative;
    z-index: 2;

    width: min(1100px, 82vw);
    height: min(780px, 82vh);

    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-popup-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}


/* CLOSE */

.gallery-close,
.gallery-prev,
.gallery-next {
    position: absolute;
    z-index: 5;

    width: 48px;
    height: 48px;

    border: 1px solid rgba(255,255,255,.25);
    background: rgba(0,0,0,.65);
    color: #fff;

    display: flex;
    align-items: center;
    justify-content: center;

    cursor: pointer;

    transition: .3s ease;
}

.gallery-close:hover,
.gallery-prev:hover,
.gallery-next:hover {
    background: #ed2d35;
    border-color: #ed2d35;
}

.gallery-close {
    top: 25px;
    right: 25px;
}

.gallery-prev {
    left: 25px;
    top: 50%;
    transform: translateY(-50%);
}

.gallery-next {
    right: 25px;
    top: 50%;
    transform: translateY(-50%);
}

body.gallery-popup-open {
    overflow: hidden;
}


/* =========================================
   TABLET
========================================= */

@media (max-width: 1000px) {

    .gallery-section {
        padding: 18px 18px 60px;
    }

    .gallery-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .gallery-item {
        height: 300px;
    }
}


/* =========================================
   MOBILE
========================================= */

@media (max-width: 700px) {

    .gallery-section {
        padding: 12px 14px 45px;
    }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 6px;
    }

    .gallery-item {
        height: 250px;
    }

    .gallery-popup-image {
        width: 92vw;
        height: 75vh;
    }

    .gallery-close {
        top: 15px;
        right: 15px;
    }

    .gallery-prev {
        left: 10px;
    }

    .gallery-next {
        right: 10px;
    }
}


/* =========================================
   SMALL MOBILE
========================================= */

@media (max-width: 480px) {

    .gallery-section {
        padding: 8px 10px 35px;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 6px;
    }

    .gallery-item {
        height: 300px;
    }
}
.gallery-section {
    width: 100%;
    max-width: 1316px;
    margin: 0 auto;
    padding: 150px 22px 70px;
}
@media (max-width: 1000px) {
    .gallery-section {
        padding: 85px 18px 60px;
    }
}

@media (max-width: 700px) {
    .gallery-section {
        padding: 75px 14px 45px;
    }
}

@media (max-width: 480px) {
    .gallery-section {
        padding: 70px 10px 35px;
    }
}