/* Main Gallery Section on Page */
.video-gallery-container {
    width: 100%;
    padding: 0 0 24px 0;
    overflow: hidden;
}

.video-section-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    padding: 0 24px;
    color: var(--text-primary);
}

/* Video Tabs */
.video-tabs {
    display: flex;
    gap: 12px;
    padding: 0 24px;
    margin-bottom: 20px;
    overflow-x: auto;
    scrollbar-width: none;
    /* Hide scrollbar Firefox */
}

.video-tabs::-webkit-scrollbar {
    display: none;
    /* Hide scrollbar Chrome/Safari */
}

.video-tab-btn {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 6px;
}

.video-tab-btn svg {
    flex-shrink: 0;
}

.video-tab-btn.active {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Inline Swiper (The Small Gallery) */
.gallery-swiper {
    width: 100%;
    padding: 0 24px 20px !important;
    overflow: visible !important;
}

.gallery-slide {
    width: 140px;
    /* Small fixed width for gallery items */
    height: 140px;
    /* Square(ish) or portrait aspect */
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    transition: transform 0.2s;
    cursor: pointer;
}

.gallery-slide:active {
    transform: scale(0.95);
}

/* Thumbnails (Images or Iframes acting as thumbs) */
.gallery-thumb-content {
    width: 100%;
    height: 100%;
    pointer-events: none;
    /* Disable interaction in gallery view */
    position: relative;
}

/* Vertical / Reel Slide variant */
.gallery-slide.is-reel-thumb {
    width: 100px;
    /* Slimmer width for vertical */
    height: 180px;
    /* Taller height (9:16 approx) */
}

.gallery-thumb-content iframe,
.gallery-thumb-content img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border: 0;
}

/* Play Icon Overlay for Thumbnail */
.gallery-play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 28px !important;
    /* Reduced from 40px */
    height: 28px !important;
    /* Reduced from 40px */
    background: rgba(0, 0, 0, 0.6);
    border-radius: 50%;
    display: flex;
    /* Restored */
    align-items: center;
    justify-content: center;
    color: white;
    z-index: 10;
    backdrop-filter: blur(4px);
}

/* Fallback: Revert to standard cropping (inherit from general rule) but ensure pointer events off */
.gallery-slide.has-native-player .instagram-embed-iframe {
    width: 180% !important;
    height: calc(100% + 120px) !important;
    top: -60px !important;
    left: -40% !important;
    pointer-events: none !important;
}

/* Temporarily hide custom icon for fallback since we use native player */
.gallery-slide.has-native-player .gallery-play-icon {
    display: none !important;
}

.gallery-play-icon svg {
    width: 14px !important;
    /* Reduced from 20px */
    height: 14px !important;
    /* Reduced from 20px */
    fill: currentColor;
    margin-left: 2px;
    /* Visual centering adjustment for play triangle */
}


/* FULLSCREEN MODAL OVERLAY */
.fs-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    display: none;
    /* Hidden by default */
    flex-direction: column;
    opacity: 0;
    transition: opacity 0.3s;
}

.fs-modal.active {
    display: flex;
    opacity: 1;
}

.fs-header {
    position: absolute;
    top: 5px;
    right: 0;
    height: 60px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 0 20px;
    z-index: 100;
}

.fs-close-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s;
}

.fs-close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Fullscreen Swiper */
.fs-swiper {
    width: 100%;
    flex: 1;
    /* Take remaining space */
    padding-bottom: 40px;
}

.fs-swiper-wrapper {
    align-items: center;
}

.fs-slide {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fs-video-container {
    width: 100%;
    max-width: 800px;
    aspect-ratio: 16 / 9;
    background: black;
    position: relative;
    border-radius: 8px;
    overflow: hidden;
}

/* Vertical video adjustment in fullscreen */
.fs-slide.is-fs-vertical .fs-video-container {
    aspect-ratio: 9 / 16;
    max-width: 400px;
    /* Limit width of vertical videos */
    max-height: 80vh;
}

.fs-video-container iframe {
    position: absolute;
    /* Essential for cropping offsets to work */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* Instagram specific container to crop UI elements (logo, text, buttons) */
/* General (Fullscreen/Large) */
.instagram-embed-iframe {
    width: calc(100% + 170px) !important;
    height: calc(100% + 450px) !important;
    top: -60px !important;
    left: -85px !important;
    border: none;
    background: black;
}

/* Thumbnail specific override - hides Instagram branding */
.gallery-slide .instagram-embed-iframe {
    width: 220% !important;
    height: calc(100% + 200px) !important;
    top: -80px !important;
    left: -60% !important;
}

/* YouTube Shorts - crop header/footer bars */
/* General (Fullscreen/Large) */
.youtube-shorts-embed-iframe {
    width: calc(100% + 100px) !important;
    height: calc(100% + 180px) !important;
    top: -50px !important;
    left: -50px !important;
    border: none;
    background: black;
}

/* Thumbnail specific for YouTube Shorts */
.gallery-slide .youtube-shorts-embed-iframe {
    width: 140% !important;
    height: calc(100% + 80px) !important;
    top: -40px !important;
    left: -20% !important;
}

/* Facebook Reels - show full video */
/* General (Fullscreen/Large) */
.facebook-embed-iframe {
    width: 100% !important;
    height: 100% !important;
    top: 0 !important;
    left: 0 !important;
    border: none;
    background: black;
}

/* Thumbnail specific for Facebook Reels */
.gallery-slide .facebook-embed-iframe {
    width: 100% !important;
    height: 100% !important;
    top: 0 !important;
    left: 0 !important;
    pointer-events: none !important;
}

/* Navigation Arrows (Custom styled) */
.fs-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 50;
    transition: all 0.2s;
    backdrop-filter: blur(10px);
}

.fs-nav-btn:hover {
    background: var(--accent);
    color: black;
}

.fs-prev {
    left: 20px;
}

.fs-next {
    right: 20px;
}

.fs-nav-btn.swiper-button-disabled {
    opacity: 0.3;
    cursor: default;
    pointer-events: none;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .fs-nav-btn {
        width: 36px;
        height: 36px;
        background: rgba(0, 0, 0, 0.5);
    }
}