/* =========================================
   MODUŁ: FILM POJEDYNCZY (WIDEO) - DARK PREMIUM
   ========================================= */

.article-video {
    background-color: #0d0e12; /* Mroczne tło Premium (MATARI) */
    padding: 60px 20px;
    width: 100%;
    font-family: 'Inter', 'Roboto', 'Arial', sans-serif;
    border-top: 1px solid rgba(212, 175, 55, 0.1);
}

.article-video-title {
    font-size: clamp(1.8rem, 5vw, 2.5rem);
    font-weight: 800;
    color: #ffffff;
    margin: 0 auto 40px;
    text-align: center;
    letter-spacing: 0.5px;
    max-width: 1200px;
}

/* Siatka dla filmów - Zoptymalizowana pod pojedynczy kinowy player */
.article-video .videos-grid {
    display: flex; /* Zmienione na flex, by łatwo wyśrodkować 1 film */
    justify-content: center;
    max-width: 1000px; /* Szerokość optymalna dla pojedynczego kina */
    margin: 0 auto 40px; /* Odstęp z dołu przed przyciskiem CTA */
}

/* Pojedynczy box z wideo */
.article-video .video-container {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9; /* Standardowy kinowy wymiar, brak ucinania dla wideo */
    background-color: #161920; 
    border-radius: 12px; /* Lekko zaokrąglone rogi Premium */
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 10px 40px rgba(0,0,0,0.6);
    /* Subtelny obrys (szkło premium) */
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: transform 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease;
}

/* Efekt najazdu na główny kontener (lifting Premium) */
.article-video .video-container:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 50px rgba(212, 175, 55, 0.15); /* Złota poświata z tyłu */
    border-color: rgba(212, 175, 55, 0.3);
}

/* Plakat / Okładka zdjęcia przed kliknięciem */
.article-video .video-poster {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
    filter: brightness(0.85); /* Lekko przyciemniony w standardzie */
    transition: transform 0.6s cubic-bezier(0.25, 0.8, 0.25, 1), filter 0.6s ease;
}

/* Efekt najazdu - lekkie powiększenie zdjęcia (Kinowe doświadczenie) */
.article-video .video-container:hover .video-poster {
    transform: scale(1.05);
    filter: brightness(0.6); /* Mocniej przyciemniamy przy hover, by ikona play wyszła do przodu */
}

/* Wstrzyknięty iframe Vimeo lub lokalne wideo */
.article-video .video-container iframe,
.article-video .video-container video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    z-index: 5;
    background: #000;
}

/* Przycisk Play w Stylu Glassmorphism */
.article-video .play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(22, 25, 32, 0.5); /* Szkło */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(212, 175, 55, 0.5); /* Złota ramka */
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
}

/* Trójkąt Złoty (Play) */
.article-video .play-button::before {
    content: '';
    display: block;
    width: 0;
    height: 0;
    border-left: 24px solid #d4af37;
    border-top: 15px solid transparent;
    border-bottom: 15px solid transparent;
    margin-left: 6px; 
    transition: border-left-color 0.3s ease;
}

/* Po najechaniu przycisk powiększa się i świeci */
.article-video .video-container:hover .play-button {
    background: #d4af37;
    transform: translate(-50%, -50%) scale(1.1);
    box-shadow: 0 0 30px rgba(212, 175, 55, 0.6);
}

.article-video .video-container:hover .play-button::before {
    border-left-color: #0d0e12; /* Czarny trójkąt na złotym tle */
}

/* Kontener dla przycisku CTA pod filmem */
.article-button-container {
    display: flex;
    justify-content: center;
    width: 100%;
    margin-top: 20px;
}

/* =========================================
   LIGHTBOX (Kinowe Zaciemnienie Ekranu po kliknięciu)
   ========================================= */

.video-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.video-lightbox.is-active {
    opacity: 1;
    pointer-events: auto;
}

.video-lightbox-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(13, 14, 18, 0.95); /* Bardzo ciemne szkło */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.video-lightbox-content {
    position: relative;
    width: 90%;
    max-width: 1200px;
    z-index: 2;
    aspect-ratio: 16 / 9;
    box-shadow: 0 20px 60px rgba(0,0,0,0.8);
    border-radius: 8px;
    overflow: visible; /* Żeby X mógł wyjść poza obrys */
    background: #000;
}

.video-lightbox-iframe-wrapper {
    width: 100%;
    height: 100%;
    border-radius: 8px;
    overflow: hidden;
}

.video-lightbox-iframe-wrapper iframe,
.video-lightbox-iframe-wrapper video {
    width: 100%;
    height: 100%;
    border: none;
    object-fit: contain; /* Gwarancja dla wideo lokalnego */
}

.video-lightbox-close {
    position: absolute;
    top: -45px;
    right: 0;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 40px;
    line-height: 1;
    cursor: pointer;
    transition: color 0.3s ease, transform 0.3s ease;
}

.video-lightbox-close:hover {
    color: #d4af37;
    transform: scale(1.1);
}

/* Responsywność dla pojedynczego filmu */
@media (max-width: 768px) {
    .article-video {
        padding: 40px 15px;
    }
    
    .article-video-title {
        font-size: clamp(1.4rem, 4vw, 2rem);
        margin-bottom: 25px;
    }

    .article-video .play-button {
        width: 60px;
        height: 60px;
    }

    .article-video .play-button::before {
        border-left: 18px solid #d4af37;
        border-top: 10px solid transparent;
        border-bottom: 10px solid transparent;
        margin-left: 5px; 
    }

    /* Lightbox mobile */
    .video-lightbox-content {
        width: 100%;
        border-radius: 0;
    }
    .video-lightbox-iframe-wrapper {
        border-radius: 0;
    }
    .video-lightbox-close {
        top: 10px;
        right: 10px;
        z-index: 10;
        background: rgba(0,0,0,0.5);
        border-radius: 50%;
        width: 40px;
        height: 40px;
        font-size: 30px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
}
