/* =========================================
   GALLERY SECTION
   ========================================= */

.gallery-section {
    background: #f8f8f8;
    padding: 75px 0 80px;
}

.gallery-container {
    width: min(1000px, calc(100% - 36px));
    margin: 0 auto;
}




/* =========================================
   GALLERY WRAPPER
   ========================================= */

.gallery-wrapper {
    position: relative;

    display: flex;
    align-items: center;
}


/* =========================================
   SCROLLABLE IMAGE TRACK
   ========================================= */

.gallery-track {

    display: flex;

    gap: 18px;

    width: 100%;

    overflow-x: auto;
    overflow-y: hidden;

    scroll-behavior: smooth;

    scroll-snap-type: x mandatory;

    padding: 8px 5px 18px;

    cursor: grab;

    scrollbar-width: thin;
    scrollbar-color: #c92d2d #eeeeee;
}


/* Chrome / Edge / Safari */

.gallery-track::-webkit-scrollbar {
    height: 5px;
}

.gallery-track::-webkit-scrollbar-track {
    background: #eeeeee;

    border-radius: 10px;
}

.gallery-track::-webkit-scrollbar-thumb {
    background: #c92d2d;

    border-radius: 10px;
}


/* =========================================
   GALLERY ITEM
   ========================================= */

.gallery-item {

    flex: 0 0 255px;

    height: 190px;

    overflow: hidden;

    border-radius: 8px;

    background: #ffffff;

    scroll-snap-align: start;

    box-shadow:
        0 4px 15px rgba(0, 0, 0, 0.07);

    transition:
        transform 0.3s ease,
        box-shadow 0.3s ease;
}


.gallery-item:hover {

    transform: translateY(-5px);

    box-shadow:
        0 12px 25px rgba(0, 0, 0, 0.12);
}


/* =========================================
   GALLERY IMAGE
   ========================================= */

.gallery-item img {

    width: 100%;
    height: 100%;

    display: block;

    object-fit: cover;

    transition:
        transform 0.45s ease;
}


.gallery-item:hover img {

    transform: scale(1.06);
}


/* =========================================
   LEFT / RIGHT BUTTONS
   ========================================= */

.gallery-arrow {

    position: absolute;

    top: 50%;

    transform: translateY(-50%);

    z-index: 5;

    width: 38px;
    height: 38px;

    border: none;

    border-radius: 50%;

    background: #c92d2d;

    color: #ffffff;

    font-size: 17px;

    display: flex;

    align-items: center;
    justify-content: center;

    cursor: pointer;

    box-shadow:
        0 5px 15px rgba(0, 0, 0, 0.18);

    transition:
        background 0.25s ease,
        transform 0.25s ease;
}


.gallery-arrow:hover {

    background: #a92125;

    transform:
        translateY(-50%)
        scale(1.08);
}


.gallery-prev {
    left: -19px;
}


.gallery-next {
    right: -19px;
}


/* =========================================
   SCROLL INDICATOR
   ========================================= */

.gallery-scroll-indicator {

    display: flex;

    justify-content: center;

    gap: 6px;

    margin-top: 18px;
}


.gallery-scroll-indicator span {

    width: 7px;
    height: 7px;

    border-radius: 50%;

    background: #d8d8d8;

    transition:
        width 0.3s ease,
        background 0.3s ease;
}


.gallery-scroll-indicator span.active {

    width: 22px;

    border-radius: 10px;

    background: #c92d2d;
}


/* =========================================
   LIGHTBOX
   ========================================= */

.gallery-lightbox {

    position: fixed;

    inset: 0;

    z-index: 9999;

    display: none;

    align-items: center;
    justify-content: center;

    background:
        rgba(0, 0, 0, 0.88);

    padding: 30px;
}


.gallery-lightbox.active {

    display: flex;
}


.gallery-lightbox img {

    max-width: 90vw;
    max-height: 85vh;

    object-fit: contain;

    border-radius: 5px;

    box-shadow:
        0 15px 50px rgba(0, 0, 0, 0.4);
}


/* =========================================
   LIGHTBOX BUTTONS
   ========================================= */

.lightbox-close {

    position: absolute;

    top: 20px;
    right: 30px;

    width: 42px;
    height: 42px;

    border: none;

    background: #c92d2d;

    color: #ffffff;

    border-radius: 50%;

    font-size: 28px;

    line-height: 1;

    cursor: pointer;
}


.lightbox-prev,
.lightbox-next {

    position: absolute;

    top: 50%;

    transform: translateY(-50%);

    width: 45px;
    height: 45px;

    border: none;

    border-radius: 50%;

    background: #c92d2d;

    color: #ffffff;

    font-size: 20px;

    cursor: pointer;

    transition: background 0.2s ease;
}


.lightbox-prev:hover,
.lightbox-next:hover,
.lightbox-close:hover {

    background: #a92125;
}


.lightbox-prev {
    left: 30px;
}


.lightbox-next {
    right: 30px;
}


/* =========================================
   TABLET
   ========================================= */

@media (max-width: 900px) {

    .gallery-section {
        padding: 65px 0;
    }

    .gallery-item {

        flex: 0 0 230px;

        height: 175px;
    }

}


/* =========================================
   MOBILE
   ========================================= */

@media (max-width: 650px) {

    .gallery-section {
        padding: 55px 0;
    }

    .gallery-heading {
        margin-bottom: 25px;
    }

    .gallery-heading h2 {
        font-size: 24px;
    }

    .gallery-heading p {
        font-size: 11px;
    }

    .gallery-track {

        gap: 12px;

        padding-left: 2px;
        padding-right: 2px;

        scrollbar-width: none;
    }

    .gallery-track::-webkit-scrollbar {
        display: none;
    }

    .gallery-item {

        flex: 0 0 78vw;

        height: 220px;

        border-radius: 7px;
    }


    .gallery-arrow {

        width: 34px;
        height: 34px;

        font-size: 15px;
    }

    .gallery-prev {
        left: 8px;
    }

    .gallery-next {
        right: 8px;
    }


    .gallery-lightbox {
        padding: 15px;
    }

    .gallery-lightbox img {
        max-width: 95vw;
        max-height: 75vh;
    }

    .lightbox-prev {
        left: 12px;
    }

    .lightbox-next {
        right: 12px;
    }

    .lightbox-close {
        top: 12px;
        right: 12px;
    }

}


/* =========================================
   SMALL MOBILE
   ========================================= */

@media (max-width: 400px) {

    .gallery-item {

        flex: 0 0 84vw;

        height: 205px;
    }

}