.video-gallery-section {
    padding: 4rem 2rem;
    background: #fff;
}

.section-subtitle {
    text-align: center;
    color: #666;
    font-size: 1.2rem;
    margin-bottom: 3rem;
}

.video-slider {
    position: relative;
    max-width: 1800px;
    margin: 0 auto;
    padding: 0;
    overflow: hidden;
}

.video-slider-container {
    display: flex;
    gap: 24px;
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
    scroll-snap-type: x proximity;
    padding: 0;
    margin: 1rem 0;
}

.video-slider-container::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

.video-slide {
    scroll-snap-align: start;
    scroll-snap-stop: always;
    flex: 0 0 288px; /* Half of 576px to maintain aspect ratio */
    transition: transform 0.3s ease;
}

.video-card {
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    aspect-ratio: 9/16;
    width: 100%;
    background: #000;
}

.video-card:hover {
    transform: translateY(-5px);
}

.video-card video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
    background: #000;
}

.video-card:hover video {
    transform: scale(1.05);
}


.slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    z-index: 2;
    transition: all 0.3s ease;
}

.slider-arrow:hover {
    background: white;
    transform: translateY(-50%) scale(1.1);
}

.slider-arrow.prev {
    left: 15px;
}

.slider-arrow.next {
    right: 15px;
}

.slider-arrow i {
    color: #8B4513;
    font-size: 1.2rem;
}

.play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    pointer-events: none;
}

.play-overlay i {
    color: white;
    font-size: 3rem;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
    opacity: 0.9;
}

/* Modal Styles */
.video-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.video-modal.active {
    display: flex;
    opacity: 1;
}

.modal-content {
    position: relative;
    width: calc(100% - 30px);
    max-width: 576px;
    margin: auto;
    background: #000;
    border-radius: 16px;
    overflow: hidden;
    aspect-ratio: 9/16;
}

.close-modal {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 10;
    padding: 0.5rem;
    transition: transform 0.3s ease;
}

.close-modal:hover {
    transform: scale(1.1);
}

.video-container {
    position: relative;
    padding-top: 177.78%; /* 9:16 Aspect Ratio */
}

.video-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #111;
}

.video-element {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Custom Video Controls */
.custom-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1rem;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    display: flex;
    align-items: center;
    gap: 1rem;
}

.play-pause, .fullscreen {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 0.5rem;
    transition: transform 0.3s ease;
}

.play-pause:hover, .fullscreen:hover {
    transform: scale(1.1);
}

.progress-bar {
    flex: 1;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    cursor: pointer;
}

.progress {
    height: 100%;
    background: #8B4513;
    border-radius: 2px;
    width: 0%;
    transition: width 0.1s linear;
}

/* Loading State */
.loading {
    position: relative;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: #8B4513;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Responsive Design */
@media screen and (min-width: 1400px) {
    .video-slider-container {
        margin: 1rem calc(50% - 624px); /* Center 4 videos: (288px * 4 + 24px * 3) / 2 = 624px */
        padding: 0 15px;
    }
}

@media screen and (min-width: 1200px) and (max-width: 1399px) {
    .video-slider-container {
        margin: 1rem calc(50% - 456px); /* Center 3 videos: (288px * 3 + 24px * 2) / 2 = 456px */
        padding: 0 15px;
    }
}

@media screen and (min-width: 768px) and (max-width: 1199px) {
    .video-slider-container {
        margin: 1rem calc(50% - 300px); /* Center 2 videos */
        padding: 0 15px;
    }
}

@media screen and (max-width: 767px) {
    .video-gallery-section {
        padding: 2rem 0;
    }
    
    .video-slider-container {
        margin: 1rem 32px;
        padding: 0;
    }
    
    .video-slide {
        flex: 0 0 calc(100vw - 64px);
        max-width: 365px;
    }
    
    .slider-arrow {
        width: 35px;
        height: 35px;
    }
}
