/* Portrait Video Gallery Styles */

.pvg-video-gallery {
    width: 100%;
    margin: 40px 0;
    overflow: hidden;
}

/* Desktop: slider with 4 visible items */
.pvg-video-container {
    display: flex;
    flex-direction: row;
    gap: 30px;
    width: 100%;
    overflow: hidden;
}

.pvg-video-item {
    position: relative;
    width: 100%;
    flex: 0 0 calc((100% - 90px) / 4); /* 4 columns with 30px gaps */
}

.pvg-video-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 9 / 16;
    background: #000;
    border-radius: 24px;
    overflow: hidden;
    padding: 24px;
}

.pvg-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    cursor: pointer;
}

/* Play button styling */
.pvg-play-button {
    position: absolute;
    bottom: 24px;
    left: 24px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 10;
    padding: 0;
    width: 48px;
    height: 48px;
    transition: transform 0.2s ease, opacity 0.2s ease;
    outline: none;
}

.pvg-play-button:hover {
    transform: scale(1.1);
}

.pvg-play-button:active {
    transform: scale(0.95);
}

.pvg-play-icon {
    width: 100%;
    height: 100%;
    display: block;
}

/* Tablet: 3 columns */
@media screen and (max-width: 1200px) {
    .pvg-video-container {
        gap: 30px;
    }
    .pvg-video-item {
        flex: 0 0 calc((100% - 60px) / 3);
    }
}

/* Mobile: Horizontal slider with 1.5 visible slides */
@media screen and (max-width: 768px) {
    .pvg-video-gallery {
        margin: 20px 0;
        width: 100%;
        overflow: visible;
    }
    
    .pvg-video-container {
        padding: 0;
        margin: 0;
    }
    
    .pvg-video-item {
        flex: 0 0 calc((100% - 30px) / 1.5); /* 1.5 slides visible with 30px gap */
        scroll-snap-align: start;
        min-width: 0;
    }
    
    .pvg-video-wrapper {
        border-radius: 24px;
    }
    
    .pvg-play-button {
        width: 48px;
        height: 48px;
        bottom: 24px;
        left: 24px;
    }
}

/* Small mobile devices */
@media screen and (max-width: 480px) {
    .pvg-video-item {
        flex: 0 0 calc((100% - 30px) / 1.5); /* 1.5 slides visible with 30px gap */
    }
    
    .pvg-play-button {
        width: 48px;
        height: 48px;
        bottom: 24px;
        left: 24px;
    }
}

/* Loading state */
.pvg-video-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.2) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    animation: loading 1.5s infinite;
    pointer-events: none;
    opacity: 0;
}

.pvg-video:not([src]) + .pvg-video-wrapper::before {
    opacity: 1;
}

@keyframes loading {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

/* Smooth transitions */
.pvg-video-wrapper,
.pvg-video,
.pvg-play-button {
    transition: all 0.3s ease;
}

/* Navigation buttons */
.pvg-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
}

.pvg-nav-btn {
    width: 48px;
    height: 48px;
    background: transparent;
    border: none;
    padding: 0;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.pvg-nav-btn img {
    width: 100%;
    height: 100%;
    display: block;
}

.pvg-nav-btn.disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.pvg-nav-btn:not(.disabled):hover {
    opacity: 0.7;
}

/* Focus styles for accessibility */
.pvg-play-button:focus-visible {
    outline: 3px solid #4A90E2;
    outline-offset: 4px;
    border-radius: 50%;
}

.pvg-video:focus-visible {
    outline: 3px solid #4A90E2;
    outline-offset: 2px;
}

