.filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 35px;
}

.filters button {
    border: none;
    background:none; 
    cursor: pointer;
 }

.filters button:hover,
.filters button.active {
    
    color: #fff;
}

.gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

.gallery-item {
    display: block;
    overflow: hidden;
    border-radius: 10px;
    cursor: pointer;
}

.gallery-item img {
    width: 100%;
    height: 280px;
    display: block;
    object-fit: cover;
    transition: transform .4s ease;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

/* Mobile */
@media (max-width: 991px) {
    .gallery {
        grid-template-columns: repeat(2, 1fr);
    }

    .gallery-item img {
        height: 240px;
    }
}

@media (max-width: 575px) {
    .gallery_section {
        padding: 40px 0;
    }

    .filters {
        gap: 7px;
        margin-bottom: 25px;
    }

     
    .gallery {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .gallery-item {
        border-radius: 7px;
    }

    .gallery-item img {
        height: 170px;
    }
}


/* =========================
   DYNAMIC LIGHTBOX
========================= */

.dynamic-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .96);
    z-index: 99999;

    display: flex;
    align-items: center;
    justify-content: center;

    opacity: 0;
    visibility: hidden;
    transition: opacity .25s ease;
}

.dynamic-lightbox.show {
    opacity: 1;
    visibility: visible;
}

.dynamic-lightbox-image {
    max-width: 90vw;
    max-height: 88vh;
    width: auto;
    height: auto;
    object-fit: contain;
    user-select: none;
    -webkit-user-drag: none;
}

.dynamic-lightbox-close,
.dynamic-lightbox-prev,
.dynamic-lightbox-next {
    position: absolute;
    z-index: 2;

    border: 0;
    background: rgba(255,255,255,.12);
    color: #fff;

    width: 50px;
    height: 50px;

    border-radius: 50%;

    display: flex;
    align-items: center;
    justify-content: center;

    cursor: pointer;

    font-size: 30px;
    line-height: 1;

    transition: background .2s ease;
}

.dynamic-lightbox-close:hover,
.dynamic-lightbox-prev:hover,
.dynamic-lightbox-next:hover {
    background: #008aab;
}

.dynamic-lightbox-close {
    top: 25px;
    right: 25px;
    font-size: 34px;
}

.dynamic-lightbox-prev {
    left: 25px;
    top: 50%;
    transform: translateY(-50%);
}

.dynamic-lightbox-next {
    right: 25px;
    top: 50%;
    transform: translateY(-50%);
}

.dynamic-lightbox-counter {
    position: absolute;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%);

    color: #fff;
    font-size: 14px;
}

/* Mobile Lightbox */
@media (max-width: 575px) {

    .dynamic-lightbox-image {
        max-width: 94vw;
        max-height: 82vh;
    }

    .dynamic-lightbox-close,
    .dynamic-lightbox-prev,
    .dynamic-lightbox-next {
        width: 42px;
        height: 42px;
        font-size: 24px;
    }

    .dynamic-lightbox-close {
        top: 15px;
        right: 15px;
    }

    .dynamic-lightbox-prev {
        left: 10px;
    }

    .dynamic-lightbox-next {
        right: 10px;
    }

    .dynamic-lightbox-counter {
        bottom: 15px;
    }
}

body.lightbox-open {
    overflow: hidden;
}