.image_video_galleries_section{margin-bottom: clamp(60px, -8.38px + 8.92vw, 120px);}
.image_video_galleries_section .container{max-width: 1664px;}
.image-video-galleries-content{max-width: 810px;margin: clamp(-109px, 249.44px + -25.85vw, -15px) auto 0;position: relative;}
.galleries-hero-caption h1 span{font-size: var(--font-size-48);}
.image-video-galleries-bg-text {
    font-family: "Neue Montreal";
    font-size: clamp(45px, -128.90px + 22.67vw, 252px);
    font-style: normal;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0;
    text-transform: uppercase;
    opacity: 0.5;
    background: linear-gradient(180deg, #FFF 41.33%, rgba(232, 234, 233, 0.00) 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-align: right;
    position: relative;
    right: -15px;
}
.image_video_galleries_section.back-left .back-left-container{padding-bottom: 380px;}
.image-video-galleries-content .h2{font-size: var(--font-size-48);color: var(--color-primary);margin-bottom: clamp(25px, 11.32px + 1.78vw, 37px);}

/* MP4 Video Popup Styling */
.mp4-video-popup {
    position: relative;
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    background: #000;
    line-height: 0;
    pointer-events: auto;
}

.mp4-video-popup video {
    width: 100%;
    height: auto;
    max-height: 65vh;
    display: block;
    pointer-events: auto;
}

/* Ensure popup is centered */
.mfp-video-popup .mfp-content {
    width: 100%;
    max-width: 900px;
}

/* Close button positioning */
.mfp-video-popup .mfp-close {
    color: #fff !important;
    right: -15px;
    top: -40px;
    pointer-events: auto;
    z-index: 9999;
}

/* Fade animation */
.mfp-fade.mfp-bg {
    opacity: 0;
    transition: all 0.3s ease-out;
}
.mfp-fade.mfp-bg.mfp-ready {
    opacity: 0.8;
}
.mfp-fade.mfp-bg.mfp-removing {
    opacity: 0;
}

.mfp-fade.mfp-wrap .mfp-content {
    opacity: 0;
    transition: all 0.3s ease-out;
}
.mfp-fade.mfp-wrap.mfp-ready .mfp-content {
    opacity: 1;
}
.mfp-fade.mfp-wrap.mfp-removing .mfp-content {
    opacity: 0;
}


@media (max-width: 1200px) {
    .image_video_galleries_section.back-left .back-left-container{padding-top: 30px;}
    .image-video-galleries-bg-text{text-align: center;right: 0;}
}

.image-video-galleries-wrap {margin-top: -339px;position: relative;}
.load-more-btn {display: none;}

.gallery-tabs {display: flex;gap: 0px 105px;margin-bottom: clamp(50px, 15.81px + 4.46vw, 80px);justify-content: center;}
.gallery-tab {background: none;border: none;padding: 0;font-size: 24px;font-weight: 400;color: #000;cursor: pointer;position: relative;padding: 0 38px 38px;}
.gallery-tab.active {color: #000;}
.gallery-tab.active::after {content: '';position: absolute;left: 0;bottom: 0px;width: 100%;height: 3px;background: #000;}
.gallery-grid {display: flex;flex-wrap: wrap; gap: 20px 0px;margin-inline: -10px;justify-content: center;}
.gallery-item.video{width: 33.33%;}
.gallery-item.image{width: 25%;}
.gallery-item{padding-inline: 10px;}
.gallery-item img {width: 100%;display: block;}
.video-thumb {position: relative;}
.load-more-btn {margin: 80px auto 0;display: block;background: #1f3d2b;color: #fff;padding: 22px 61px;border: none;cursor: pointer;font-size: 18px;font-weight: 700;text-transform: uppercase;}
.play-button{position: absolute;top: 50%;left: 50%;transform: translate(-50%, -50%);width: 96px;height: 96px;background-color: rgba(255, 255, 255, 0.2);border-radius: 50%;display: flex;align-items: center;justify-content: center;}
.play-button span{width: 70px;height: 70px;background-color: rgba(255, 255, 255, 1);border-radius: 50%;display: flex;align-items: center;justify-content: center;transition: transform 0.3s;z-index: 1;padding-left: 7px;}

.gallery-item.image.image-large{width: 50%;}
.gallery-item.image .popup-image {cursor: pointer;overflow: hidden;display: block;width: 100%;height: 337px;position: relative;}
.gallery-item.image img {display: block;transition: transform 0.3s;position: absolute;inset: 0;width: 100%;height: 100%;object-fit: cover;object-position: 50% 20%;}
.gallery-item.image:hover img{transform: scale(1.05);}

.gallery-grid .gallery-item.video .video-thumb{width: 100%;height: 316px;position: relative;overflow: hidden;}
.video-thumb a.popup-video{display: block;width: 100%;height: 100%;}
.video-thumb a.popup-video img{display: block;transition: transform 0.3s;position: absolute;inset: 0;width: 100%;height: 100%;object-fit: cover;}
.video-thumb a.popup-video:hover img{transform: scale(1.05);}
.mfp-bg{z-index: 99999 !important;opacity: .9 !important;background: #000 !important;}
.mfp-wrap{z-index: 99999 !important;}

@media (max-width: 1199px) {
    .gallery-item.image .popup-image{height: 240px;}
}

@media (max-width: 1023px) {
.gallery-item.video{width: 50%;}
.gallery-tab {padding: 0 28px 28px;}
}

@media (max-width: 991px) {
.gallery-item.image {width: 33.33%;}
.gallery-item.image.image-large{width: 33.33%;}
.mfp-container {padding-left: 15px !important;padding-right: 15px !important;}
}

@media (max-width: 767px) {
.gallery-grid .gallery-item.video .video-thumb{height: 200px;}
.gallery-item.image .popup-image {height: 180px;}
.gallery-tabs{gap: 0px 55px;}
.play-button{width: 56px;height: 56px;}
.play-button span{width: 40px;height: 40px;}
.image_video_galleries_section.back-left{background-color: unset;} 
.image_video_galleries_section.back-left .back-left-container{background: var(--color-secondary);}
.image_video_galleries_section.back-left .back-left-container::before{display: inline-block;background: var(--color-secondary);}
.back-left .back-left-container::after {content: "";position: absolute;left: 100%;top: 0;bottom: 0px;width: 100vw;height: 100%;display: inline-block;background: var(--color-secondary);}
.load-more-btn{margin-top: 50px;}
}

@media (max-width: 480px) {
.gallery-grid .gallery-item.video .video-thumb{height: 170px;}
.gallery-item.image .popup-image {height: 150px;}
.gallery-tabs{gap: 0px 30px;}
.gallery-tab{padding: 0 20px 20px;font-size: 20px;}
.gallery-item.image {width: 50%;}
.gallery-item.image.image-large{width: 50%;}
}

