/* Video Gallery Section Styles */
.video-gallery-section {
    padding: 80px 0;
    background: #f8f9fa; /* Sleek light grey background as requested */
    color: #1a1a24;
    font-family: 'Outfit', 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.self_container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Grid Layout */
.video-gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 35px;
}

/* Video Card Container (Light Theme) */
.galleryvideo {
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.05);
    position: relative;
    border: 1px solid rgba(0, 0, 0, 0.04);
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), box-shadow 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.galleryvideo:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(24, 119, 242, 0.12); /* Sleek Facebook hover glow */
    border-color: rgba(24, 119, 242, 0.15);
}

/* Video Thumbnail Aspect Container */
.video-thumbnail {
    position: relative;
    cursor: pointer;
    background: #eef1f6;
    width: 100%;
    height: 0;
    overflow: hidden;
}

.video-thumbnail img.video-thumb-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.galleryvideo:hover .video-thumb-img {
    transform: scale(1.06);
}

/* Play Button Overlay */
.play-button-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.05);
    z-index: 2;
    transition: background-color 0.3s ease;
}

.galleryvideo:hover .play-button-overlay {
    background: rgba(0, 0, 0, 0.02);
}

/* Glowing Glassmorphic Play Button */
.play-button {
    width: 70px;
    height: 70px;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.play-button i {
    color: #ff0055; /* Vibrant primary brand pink-red */
    font-size: 22px;
    margin-left: 4px;
    transition: transform 0.3s ease, color 0.3s ease;
}

.galleryvideo:hover .play-button {
    background: #ff0055;
    border-color: #ff0055;
    transform: scale(1.12);
    box-shadow: 0 0 25px rgba(255, 0, 85, 0.4);
}

.galleryvideo:hover .play-button i {
    color: #ffffff;
    transform: scale(1.05);
}

/* Modern Light Video Brand Badge */
.video-badge {
    position: absolute;
    bottom: 15px;
    left: 15px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #333344;
    padding: 6px 14px;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.3px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.04);
    z-index: 3;
    pointer-events: none;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: background 0.3s, border-color 0.3s;
}

.galleryvideo:hover .video-badge {
    background: #ffffff;
    border-color: rgba(0, 0, 0, 0.12);
}

.video-badge i {
    font-size: 14px;
}

.video-badge .fa-youtube { color: #ff0000; }
.video-badge .fa-vimeo-v { color: #1ab7ea; }
.video-badge .fa-facebook-f { color: #1877f2; }
.video-badge .fa-video { color: #00b875; }

/* Video Player Layer */
.video-player {
    position: relative;
    width: 100%;
    background: #000;
    overflow: hidden;
}

.video-player iframe,
.video-player video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    z-index: 1;
}

/* active player center overlay controls (no cross button) */
.video-active-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 5;
    pointer-events: none; /* Clicks pass straight through the overlay to hit the player underneath */
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    transition: background-color 0.35s cubic-bezier(0.165, 0.84, 0.44, 1);
}

/* Dim video player frame on hover to show pause indicator */
.galleryvideo:hover .video-active-overlay {
    background-color: rgba(0, 0, 0, 0.35);
}

/* Play/Pause center overlay button toggle */
.video-active-overlay .pause-button {
    pointer-events: none; /* Disable click capture while invisible so native play button can be clicked */
    opacity: 0;
    transform: scale(0.8);
    width: 70px;
    height: 70px;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: all 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.galleryvideo:hover .video-active-overlay .pause-button {
    pointer-events: auto; /* Enable click capture ONLY when hovered (visible) to trigger pause/close */
    opacity: 1;
    transform: scale(1);
}

.video-active-overlay .pause-button i {
    color: #ff0055;
    font-size: 22px;
    transition: transform 0.3s;
}

.video-active-overlay .pause-button:hover {
    background: #ff0055;
    border-color: #ff0055;
    transform: scale(1.12);
    box-shadow: 0 0 25px rgba(255, 0, 85, 0.5);
}

.video-active-overlay .pause-button:hover i {
    color: #ffffff;
    transform: scale(1.05);
}

/* Responsive Breakpoints */
@media (max-width: 992px) {
    .video-gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }
}

@media (max-width: 650px) {
    .video-gallery-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .video-gallery-section {
        padding: 50px 0;
    }
    
    .play-button, .video-active-overlay .pause-button {
        width: 60px;
        height: 60px;
    }
    
    .play-button i, .video-active-overlay .pause-button i {
        font-size: 18px;
    }
}

/* Layout support for vertical videos (Facebook Reels) */
.galleryvideo[data-video-type="facebook_reel"] {
    max-width: 380px;
    margin: 0 auto;
    width: 100%;
}
