.gallery-area{ padding: 80px 0px 50px 0px;}
.gallery-grid > div {
    margin-bottom: 30px;
}

.gallery-thumb {
    width: 100%;
    height: 280px;
    border: 0;
    padding: 0;
    cursor: pointer;
    overflow: hidden;
    background: #000;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.12);
    position: relative;
}

.gallery-thumb::after {
    content: "View Image";
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.45);
    color: #ffffff;
    font-size: 18px;
    font-weight: 600;
    opacity: 0;
    transition: 0.3s ease;
}

.gallery-thumb:hover::after {
    opacity: 1;
}

.gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.35s ease;
}

.gallery-thumb:hover img {
    transform: scale(1.08);
}

.gallery-popup {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 25px;
}

.gallery-popup.active {
    display: flex;
}

.gallery-popup-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.82);
}

.gallery-popup-content {
    position: relative;
    z-index: 2;
    max-width: 980px;
    width: 100%;
    background: #ffffff;
    padding: 12px;
    box-shadow: 0 20px 70px rgba(0, 0, 0, 0.45);
    animation: galleryZoom 0.25s ease;
}

.gallery-popup-content img {
    width: 100%;
    max-height: 78vh;
    object-fit: contain;
    display: block;
    background: #111111;
}

.gallery-popup-content h4 {
    margin: 15px 10px 5px;
    color: #222222;
    font-size: 22px;
    text-align: center;
}

.gallery-popup-close {
    position: absolute;
    top: -18px;
    right: -18px;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 50%;
    background: #f4b000;
    color: #ffffff;
    font-size: 32px;
    line-height: 40px;
    cursor: pointer;
    z-index: 3;
}

body.gallery-popup-open {
    overflow: hidden;
}

@keyframes galleryZoom {
    from {
        transform: scale(0.92);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

@media only screen and (max-width: 767px) {
    .gallery-thumb {
        height: 230px;
    }

    .gallery-popup {
        padding: 15px;
    }

    .gallery-popup-close {
        top: -14px;
        right: -10px;
    }
}
