﻿/* Container principal do vídeo */
.video-wrapper {
    position: relative;
    width: 100%;
    /* Aspect ratio 16:9 modern way */
    aspect-ratio: 16 / 9;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    cursor: pointer;
    overflow: hidden;
    border-radius: 0.5rem; /* Opcional */
}

/* Overlay escuro (o div .after original) */
.video-overlay {
    position: absolute;
    inset: 0; /* top/right/bottom/left: 0 */
    background-color: rgba(0, 0, 0, 0.3);
    transition: background-color 0.3s ease;
    z-index: 10;
}

.video-wrapper:hover .video-overlay {
    background-color: rgba(0, 0, 0, 0.1);
}

/* Botão de Play */
.play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 4rem; /* Ajuste conforme necessário */
    color: white;
    z-index: 20;
    transition: transform 0.2s ease;
    user-select: none;
}

.video-wrapper:hover .play-button {
    transform: translate(-50%, -50%) scale(1.1);
}

/* Iframe (escondido inicialmente) */
.youtube-iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 5;
    display: none; /* Escondido até clicar */
}

/* Estado Ativo (quando o vídeo está tocando) */
.video-wrapper.is-playing .youtube-iframe {
    display: block;
    z-index: 30;
}

.video-wrapper.is-playing .play-button,
.video-wrapper.is-playing .video-overlay {
    display: none;
}
