/* ==============================================
   🎬 VIDEO-LIMITE.CSS - 100% ISOLADO
   Prefixo vl- em TUDO, sem conflito
   Desktop: video/video.mp4  (1100 x 619)
   Mobile:  video/video2.mp4 (vertical)
   ============================================== */

.vl-section {
    width: 100%;
    max-width: 1100px;
    margin: 60px auto;
    padding: 0 20px;
    position: relative;
    z-index: 10;
    animation: vl-fadeIn 1s ease;
}

@keyframes vl-fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 🔥 TÍTULO */
.vl-title {
    text-align: center;
    margin-bottom: 30px;
    padding: 0 20px;
}

.vl-title h2 {
    color: #fff;
    font-size: 42px;
    font-weight: 700;
    margin: 0 0 12px 0;
    background: linear-gradient(90deg, #fff, #f0f0f0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}

.vl-title p {
    color: #888;
    font-size: 18px;
    font-weight: 400;
    margin: 0;
}

/* 🔥 WRAPPER - CONTAINER DO VÍDEO */
.vl-wrapper {
    position: relative;
    width: 100%;
    /* 🔥 RESERVA O ESPAÇO 1100x619 PRA NÃO PULAR LAYOUT NO LAZY */
    aspect-ratio: 1100 / 619;
    overflow: hidden;
    background: #000;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

/* 🔥 FALLBACK pra navegador que não suporta aspect-ratio:
   trava a altura via padding (619/1100 = 56.27%) - NUNCA colapsa no scroll */
@supports not (aspect-ratio: 1 / 1) {
    .vl-wrapper {
        height: 0;
        padding-top: 56.27%;
    }
    .vl-wrapper > * {
        position: absolute;
        top: 0;
        left: 0;
    }
}

/* 🔥 VÍDEO DESKTOP */
.vl-video-desktop {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
}

.vl-video-mobile {
    display: none;
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
}

/* 🔥 MOBILE - TROCA O VÍDEO */
@media (max-width: 768px) {
    .vl-section {
        margin-top: 40px;
        margin-bottom: 40px;
        padding: 0;
        max-width: 100%;
    }

    .vl-title {
        margin-bottom: 20px;
        padding: 0 15px;
    }

    .vl-title h2 {
        font-size: 28px;
    }

    .vl-title p {
        font-size: 15px;
    }

    .vl-wrapper {
        border-radius: 0;
        /* Mobile pode ter outra proporção (vertical) */
        aspect-ratio: 9 / 16;
    }

    /* Fallback mobile (16/9 = 177.77%) */
    @supports not (aspect-ratio: 1 / 1) {
        .vl-wrapper {
            padding-top: 177.77%;
        }
    }

    .vl-video-desktop {
        display: none;
    }

    .vl-video-mobile {
        display: block;
    }
}

/* 🔥 OVERLAY COM THUMBNAIL EM LOOP */
.vl-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 15;
    background: rgba(0,0,0,0.3);
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.vl-overlay.vl-hidden {
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
}

/* 🔥 THUMBNAIL - VÍDEO EM LOOP NO FUNDO */
.vl-thumb-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}

/* FALLBACK - imagem se o vídeo thumb não carregar */
.vl-thumb-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('video-limite.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 0;
}

/* 🔥 BOTÃO PLAY */
.vl-play-btn {
    position: relative;
    z-index: 20;
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, rgba(255, 71, 87, 0.9), rgba(204, 0, 0, 0.9));
    border: 3px solid rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.4s ease;
    backdrop-filter: blur(20px);
    animation: vl-pulse 2.5s infinite;
}

@keyframes vl-pulse {
    0%, 100% { 
        transform: scale(1);
        box-shadow: 0 8px 32px rgba(255, 71, 87, 0.4), 0 0 0 0 rgba(255, 71, 87, 0.4);
    }
    50% { 
        transform: scale(1.05);
        box-shadow: 0 12px 40px rgba(255, 71, 87, 0.6), 0 0 0 20px rgba(255, 71, 87, 0);
    }
}

.vl-play-btn:hover {
    transform: scale(1.15);
    background: linear-gradient(135deg, rgba(255, 71, 87, 1), rgba(204, 0, 0, 1));
}

.vl-play-icon {
    width: 0;
    height: 0;
    border-left: 20px solid white;
    border-top: 12px solid transparent;
    border-bottom: 12px solid transparent;
    margin-left: 4px;
}

/* 🔥 MOBILE AJUSTES */
@media (max-width: 768px) {
    .vl-play-btn {
        width: 60px;
        height: 60px;
        animation: none;
    }
    
    .vl-play-icon {
        border-left-width: 16px;
        border-top-width: 10px;
        border-bottom-width: 10px;
    }

    .vl-overlay {
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }
}

/* 🔥 LANDSCAPE NO MOBILE */
@media (max-width: 900px) and (orientation: landscape) {
    .vl-section {
        margin-top: 0;
    }
}
