/* ================= CUSTOM VIDEO PLAYER ================= */

.custom-video-wrapper{
    position: relative;
    width: 100%;
    line-height: 0; /* evita espacio fantasma bajo el video */
    cursor: pointer;
}

.custom-video-wrapper video{
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    /* Oculta cualquier UI nativa residual en navegadores que la muestren */
    pointer-events: none;
}

/* Quita controles nativos en WebKit por si el navegador los re-inyecta */
.custom-video-wrapper video::-webkit-media-controls{
    display: none !important;
}

.video-toggle-btn{
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 68px;
    height: 68px;
    border-radius: 50%;
    background-color: rgba(45, 71, 84, 0.85);
    border: 2px solid rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 1;
    transition: opacity 0.25s ease, transform 0.2s ease, background-color 0.2s ease;
    z-index: 5;
}

.video-toggle-btn:hover{
    background-color: rgba(76, 122, 144, 0.95);
    transform: translate(-50%, -50%) scale(1.06);
}

.video-toggle-btn svg{
    width: 26px;
    height: 26px;
    fill: #ffffff;
}

.video-toggle-btn .icon-play{
    display: block;
    margin-left: 3px; /* óptica: centra visualmente el triángulo de play */
}

.video-toggle-btn .icon-pause{
    display: none;
}

/* Estado: video reproduciéndose */
.custom-video-wrapper.is-playing .video-toggle-btn .icon-play{
    display: none;
}

.custom-video-wrapper.is-playing .video-toggle-btn .icon-pause{
    display: block;
}

/* Mientras reproduce, el botón se atenúa y solo aparece al pasar el mouse
   (en mobile se mantiene siempre visible pero discreto) */
.custom-video-wrapper.is-playing .video-toggle-btn{
    opacity: 0;
}

.custom-video-wrapper.is-playing:hover .video-toggle-btn{
    opacity: 1;
}

@media (max-width: 768px){
    .custom-video-wrapper.is-playing .video-toggle-btn{
        opacity: 0.55;
    }

    .video-toggle-btn{
        width: 56px;
        height: 56px;
    }

    .video-toggle-btn svg{
        width: 22px;
        height: 22px;
    }
}