/* Product Video Gallery Frontend Styles - Instagram Reels Style */
.bone-appetit-video-gallery-wrapper {
    margin: 30px 0;
    position: relative;
}

.video-gallery-heading {
    font-size: 24px;
    font-weight: 700;
    color: #2b2b2b;
    margin: 0 0 20px 0;
    text-align: center;
    position: relative;
    padding-bottom: 15px;
}

.video-gallery-heading::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #ff6b35, #ff8f00);
    border-radius: 2px;
}

.bone-appetit-video-gallery {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 10px 5px;
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: #ff6b35 #fff3e0;
}

.bone-appetit-video-gallery::-webkit-scrollbar {
    height: 6px;
}

.bone-appetit-video-gallery::-webkit-scrollbar-track {
    background: #fff3e0;
    border-radius: 3px;
}

.bone-appetit-video-gallery::-webkit-scrollbar-thumb {
    background: #ff6b35;
    border-radius: 3px;
}

.bone-appetit-video-gallery::-webkit-scrollbar-thumb:hover {
    background: #ff8f00;
}

.video-thumbnail-wrapper {
    flex-shrink: 0;
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.video-thumbnail-wrapper:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.25);
}

.video-thumbnail-wrapper a {
    display: block;
    text-decoration: none;
    color: inherit;
}

.video-thumbnail {
    position: relative;
    width: 180px;
    height: 320px;
    background: linear-gradient(45deg, #2b2b2b, #1a1a1a);
    overflow: hidden;
    border-radius: 16px;
}

.video-poster,
.video-preview {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.video-thumbnail-wrapper:hover .video-poster,
.video-thumbnail-wrapper:hover .video-preview {
    transform: scale(1.05);
}

.video-play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 16px;
}

.video-thumbnail-wrapper:hover .video-play-overlay {
    opacity: 1;
}

.play-icon {
    width: 64px;
    height: 64px;
    color: white;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
    transition: transform 0.2s ease;
}

.video-thumbnail-wrapper:hover .play-icon {
    transform: scale(1.1);
}

.video-title {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    color: white;
    padding: 20px 15px 15px;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    border-radius: 0 0 16px 16px;
    line-height: 1.3;
}

/* GLightbox video customizations */
.glightbox-video .gvideo-wrapper {
    max-width: 90vw;
    max-height: 90vh;
}

.glightbox-video video {
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

/* Custom lightbox overlay styling - complete override */
.glightbox-overlay,
.goverlay,
.glightbox-open .glightbox-overlay,
body .glightbox-overlay {
    background: rgba(255, 255, 255, 0.3) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
}

/* Override all media queries for overlay */
@media (min-width: 1px) {
    .goverlay,
    .glightbox-overlay {
        background: rgba(255, 255, 255, 0.3) !important;
        backdrop-filter: blur(10px) !important;
        -webkit-backdrop-filter: blur(10px) !important;
    }
}

@media (min-width: 769px) {
    .goverlay,
    .glightbox-overlay {
        background: rgba(255, 255, 255, 0.3) !important;
        backdrop-filter: blur(10px) !important;
        -webkit-backdrop-filter: blur(10px) !important;
    }
}

/* Ensure video content is properly positioned */
.glightbox-container .glightbox-content {
    background: transparent !important;
}

/* Force override any dark backgrounds */
.glightbox-container {
    background: rgba(255, 255, 255, 0.3) !important;
}

/* Additional overrides */
div[class*="glightbox"] div[class*="overlay"] {
    background: rgba(255, 255, 255, 0.3) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
}

/* Mobile Responsive Design */
@media (max-width: 768px) {
    .video-gallery-heading {
        font-size: 20px;
        margin-bottom: 15px;
    }
    
    .bone-appetit-video-gallery {
        gap: 12px;
        padding: 8px 3px;
    }
    
    .video-thumbnail {
        width: 140px;
        height: 250px;
    }
    
    .play-icon {
        width: 48px;
        height: 48px;
    }
    
    .video-title {
        font-size: 12px;
        padding: 15px 12px 12px;
    }
}

@media (max-width: 480px) {
    .video-thumbnail {
        width: 120px;
        height: 210px;
    }
    
    .play-icon {
        width: 40px;
        height: 40px;
    }
    
    .video-title {
        font-size: 11px;
        padding: 12px 10px 10px;
    }
}

/* Loading Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.bone-appetit-video-gallery-wrapper {
    animation: fadeInUp 0.6s ease-out;
}

.video-thumbnail-wrapper {
    animation: fadeInUp 0.6s ease-out;
    animation-fill-mode: both;
}

.video-thumbnail-wrapper:nth-child(1) { animation-delay: 0.1s; }
.video-thumbnail-wrapper:nth-child(2) { animation-delay: 0.2s; }
.video-thumbnail-wrapper:nth-child(3) { animation-delay: 0.3s; }
.video-thumbnail-wrapper:nth-child(4) { animation-delay: 0.4s; }
.video-thumbnail-wrapper:nth-child(5) { animation-delay: 0.5s; }

/* Focus states for accessibility */
.video-thumbnail-wrapper a:focus {
    outline: 3px solid #ff6b35;
    outline-offset: 3px;
}

.video-thumbnail-wrapper a:focus .video-play-overlay {
    opacity: 1;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .video-play-overlay {
        background: rgba(0, 0, 0, 0.8);
    }
    
    .video-title {
        background: linear-gradient(transparent, rgba(0, 0, 0, 0.95));
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .video-thumbnail-wrapper,
    .video-poster,
    .video-preview,
    .video-play-overlay,
    .play-icon {
        transition: none;
    }
    
    .bone-appetit-video-gallery-wrapper,
    .video-thumbnail-wrapper {
        animation: none;
    }
    
    .video-thumbnail-wrapper:hover {
        transform: none;
    }
}

/* =======================
   AUTOPLAY VIDEO SECTION
   ======================= */

.bone-appetit-autoplay-video-wrapper {
    /* margin: 40px 0; */
    /* position: relative; */
    /* background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%); */
    /* border-radius: 16px; */
    /* padding: 20px; */
    /* box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08); */
}

.autoplay-video-heading {
    font-size: 20px;
    font-weight: 600;
    color: #2b2b2b;
    margin: 0 0 16px 0;
    text-align: center;
}

.bone-appetit-autoplay-video-container {
    position: relative;
    width: 100%;
    /* max-width: 800px; */
    margin: 0 auto;
    /* border-radius: 12px; */
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.bone-appetit-autoplay-video {
    width: 100%;
    height: auto;
    display: block;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.bone-appetit-autoplay-video:hover {
    transform: scale(1.02);
}

.autoplay-video-description {
    margin-top: 16px;
    font-size: 14px;
    color: #6c757d;
    text-align: center;
    line-height: 1.5;
}

/* Play button overlay for autoplay video */
.autoplay-play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    background: rgba(255, 107, 53, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(255, 107, 53, 0.3);
}

.autoplay-play-overlay:hover {
    background: rgba(255, 107, 53, 1);
    transform: translate(-50%, -50%) scale(1.1);
    box-shadow: 0 12px 40px rgba(255, 107, 53, 0.4);
}

.autoplay-play-overlay .play-icon {
    width: 28px;
    height: 28px;
    color: white;
    margin-left: 4px; /* Optical centering */
}

/* Video playing state */
.bone-appetit-autoplay-video-wrapper.playing .autoplay-play-overlay {
    opacity: 0;
    visibility: hidden;
}

/* Responsive design */
@media (max-width: 768px) {
    .bone-appetit-autoplay-video-wrapper {
        margin: 30px 0;
        padding: 16px;
        border-radius: 12px;
    }
    
    .autoplay-video-heading {
        font-size: 18px;
        margin-bottom: 12px;
    }
    
    .bone-appetit-autoplay-video-container {
        border-radius: 8px;
    }
    
    .autoplay-play-overlay {
        width: 60px;
        height: 60px;
    }
    
    .autoplay-play-overlay .play-icon {
        width: 20px;
        height: 20px;
    }
    
    .autoplay-video-description {
        font-size: 13px;
        margin-top: 12px;
    }
}

@media (max-width: 480px) {
    .bone-appetit-autoplay-video-wrapper {
        margin: 20px 0;
        padding: 12px;
    }
    
    .autoplay-video-heading {
        font-size: 16px;
    }
    
    .autoplay-play-overlay {
        width: 50px;
        height: 50px;
    }
    
    .autoplay-play-overlay .play-icon {
        width: 18px;
        height: 18px;
    }
}

/* Sound Toggle Styles */
.autoplay-sound-toggle {
    position: absolute;
    bottom: 20px;
    left: 20px;
    display: flex !important;
    align-items: center;
    gap: 8px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 12px 16px;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    font-size: 14px;
    font-weight: 500;
    z-index: 10;
}

.autoplay-sound-toggle:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.sound-icon-wrapper {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sound-icon-wrapper svg,
.sound-icon {
    width: 100%;
    height: 100%;
    color: white;
    transition: transform 0.3s ease;
}

/* Animated pulse for sound icon */
.autoplay-sound-toggle .sound-icon-wrapper {
    animation: soundPulse 2s ease-in-out infinite;
}

@keyframes soundPulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

/* Different animations for muted vs unmuted states */
.autoplay-sound-toggle.sound-on .sound-icon-wrapper {
    animation: soundWave 1.5s ease-in-out infinite;
}

@keyframes soundWave {
    0%, 100% {
        transform: scale(1) rotate(0deg);
    }
    25% {
        transform: scale(1.05) rotate(-2deg);
    }
    75% {
        transform: scale(1.05) rotate(2deg);
    }
}

.autoplay-sound-toggle.sound-off .sound-icon-wrapper {
    animation: soundMuted 2s ease-in-out infinite;
}

@keyframes soundMuted {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.sound-toggle-text {
    font-size: 14px;
    line-height: 1.2;
    user-select: none;
}

/* Responsive adjustments for sound toggle */
@media (max-width: 768px) {
    .autoplay-sound-toggle {
        bottom: 15px;
        left: 15px;
        padding: 10px 14px;
        font-size: 13px;
        border-radius: 20px;
    }
    
    .sound-icon-wrapper {
        width: 18px;
        height: 18px;
    }
}

@media (max-width: 480px) {
    .autoplay-sound-toggle {
        bottom: 10px;
        left: 10px;
        padding: 8px 12px;
        font-size: 12px;
        gap: 6px;
    }
    
    .sound-icon-wrapper {
        width: 16px;
        height: 16px;
    }
}

/* Homepage Video Specific Styles */
.bone-appetit-homepage-video-wrapper {
    margin: 60px 0;
    background: transparent;
    position: relative;
    z-index: 1;
}

.homepage-video-container {
    position: relative;
}

.homepage-sound-toggle {
    position: absolute !important;
    bottom: 20px !important;
    left: 20px !important;
    z-index: 10 !important;
}

.homepage-video-heading {
    font-size: 28px;
    font-weight: 700;
    color: #2b2b2b;
    margin: 0 0 30px 0;
    text-align: center;
    position: relative;
    padding-bottom: 20px;
}

.homepage-video-heading::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, #ff6b35, #ff8f00);
    border-radius: 2px;
}

.homepage-video-container {
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.12);
    border-radius: 0;
}

.homepage-video-description {
    margin-top: 20px;
    font-size: 16px;
    color: #555;
    text-align: center;
    line-height: 1.6;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* Homepage responsive adjustments */
@media (max-width: 768px) {
    .bone-appetit-homepage-video-wrapper {
        margin: 40px 0;
    }
    
    .homepage-video-heading {
        font-size: 24px;
        margin-bottom: 20px;
        padding-bottom: 15px;
    }
    
    .homepage-video-heading::after {
        width: 60px;
        height: 3px;
    }
    
    .homepage-video-description {
        font-size: 15px;
        margin-top: 15px;
        padding: 0 15px;
    }
}

@media (max-width: 480px) {
    .bone-appetit-homepage-video-wrapper {
        margin: 30px 0;
    }
    
    .homepage-video-heading {
        font-size: 20px;
        margin-bottom: 15px;
    }
    
    .homepage-video-description {
        font-size: 14px;
        padding: 0 10px;
    }
}

/* Reduced motion support for autoplay video */
@media (prefers-reduced-motion: reduce) {
    .bone-appetit-autoplay-video,
    .autoplay-play-overlay,
    .autoplay-play-overlay .play-icon,
    .autoplay-sound-toggle,
    .sound-icon-wrapper svg,
    .sound-icon {
        transition: none;
        animation: none;
    }
    
    .bone-appetit-autoplay-video:hover {
        transform: none;
    }
    
    .autoplay-play-overlay:hover {
        transform: translate(-50%, -50%);
    }
    
    .autoplay-sound-toggle:hover {
        transform: none;
    }
}