/* Video Projects Section Styles */

.video-projects-content {
    width: 100%;
    max-width: 100%;
    margin: 0;
}

/* Video Grid - Desktop: 4 columns */
.video-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

/* Individual video item */
.video-item {
    display: flex;
    flex-direction: column;
}

/* Video thumbnail - 9:16 portrait */
.video-thumbnail {
    position: relative;
    aspect-ratio: 9/16;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    background: #111;
}

.video-thumbnail video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Play button overlay */
.video-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 56px;
    height: 56px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
    pointer-events: none;
}

.video-play-btn svg {
    width: 20px;
    height: 20px;
}

.video-thumbnail:hover .video-play-btn {
    background: rgba(0, 0, 0, 0.65);
}

/* Story content under thumbnails */
.video-item .story-content h2 {
    margin-top: 16px;
    margin-bottom: 8px;
    transition: color 0.3s ease;
    cursor: pointer;
}

.video-item:hover .story-content h2 {
    color: var(--link-hover-color);
}

/* Video Lightbox */
.video-lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.66);
    z-index: 10000;
    align-items: center;
    justify-content: center;
}

.video-lightbox.active {
    display: flex;
}

.video-lightbox-player {
    max-height: 85vh;
    max-width: 90vw;
    border-radius: 8px;
}

.video-lightbox-close {
    position: absolute;
    top: 24px;
    left: 24px;
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
    padding: 8px;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.video-lightbox-close:hover {
    opacity: 1;
}

/* Dark mode lightbox */
@media (prefers-color-scheme: dark) {
    .video-lightbox {
        background: rgba(0, 0, 0, 0.66);
    }
}

/* Tablet + Mobile: horizontal scroller */
@media (max-width: 1200px) {
    .video-projects-content {
        overflow: visible;
    }

    .video-grid {
        display: flex;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x mandatory;
        scrollbar-width: thin;
        gap: 16px;
        padding-bottom: 1rem;
        margin-right: -2vw;
    }

    .video-grid::-webkit-scrollbar {
        height: 8px;
    }

    .video-grid::-webkit-scrollbar-track {
        background: #f1f1f1;
        border-radius: 4px;
    }

    .video-grid::-webkit-scrollbar-thumb {
        background: #c1c1c1;
        border-radius: 4px;
    }

    .video-grid::-webkit-scrollbar-thumb:hover {
        background: #a1a1a1;
    }

    .video-item {
        flex: 0 0 250px;
        scroll-snap-align: start;
    }

    .video-item:last-child {
        margin-right: 2vw;
    }
}

/* Mobile Responsive - See breakpoint reference in base-sections.css */
@media (max-width: 768px), ((max-width: 1200px) and (max-height: 768px)) {
    .video-grid {
        margin-right: -4vw;
    }

    .video-item {
        flex: 0 0 200px;
    }

    .video-item:last-child {
        margin-right: 4vw;
    }

    .video-item .story-content h2 {
        margin-top: 12px;
        margin-bottom: 6px;
    }

    .video-play-btn {
        width: 44px;
        height: 44px;
    }

    .video-play-btn svg {
        width: 16px;
        height: 16px;
    }

    .video-lightbox-close {
        top: 16px;
        left: 16px;
    }
}

/* Small Mobile Responsive - See breakpoint reference in base-sections.css */
@media (max-width: 480px), ((max-width: 1200px) and (max-height: 480px)) {
    .video-item {
        flex: 0 0 170px;
    }
}
