/* --- ESTILOS DEL CARRUSEL --- */
.video-carousel-container {
    padding: 20px;
    max-width: 1200px; 
    margin: 0 auto;
}

.carousel-wrapper {
    position: relative;
}

.carousel-track {
    display: flex;
    overflow-x: hidden; 
    scroll-behavior: smooth; 
    gap: 20px; 
    padding: 10px 0;
}

/* TAMAÑO FIJO REQUERIDO: 230x408px */
.video-card {
    width: 230px; 
    height: 408px;
    flex-shrink: 0; 
    border: none;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2); 
    cursor: pointer; 
    transition: box-shadow 0.3s;
    position: relative; 
    background-color: #000; 
}

.video-card:hover {
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

.video-thumbnail-wrapper {
    position: relative;
    width: 100%;
    height: 100%; 
    overflow: hidden;
}

.video-thumbnail-wrapper img {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover; /* La imagen cubre la caja (230x408) */
    transition: transform 0.3s;
}

.video-card:hover .video-thumbnail-wrapper img {
    transform: scale(1.05);
}

/* TÍTULO SUPERPUESTO */
.video-card h3 {
    position: absolute;
    bottom: 0;
    width: 100%;
    padding: 20px 10px 10px 10px; 
    margin: 0;
    text-align: left;
    color: white;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0) 100%);
    font-size: 0.9em;
    font-weight: 500;
    line-height: 1.3;
    box-sizing: border-box;
    z-index: 5;
}

/* Icono de Play */
.play-icon-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 30px;
    color: white;
    background: rgba(0, 0, 0, 0.4);
    border: 2px solid #3e8786;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    justify-content: center;
    align-items: center;
    pointer-events: none; 
    z-index: 5;
    transition: background 0.3s;
}

.video-card:hover .play-icon-overlay {
    background: #6f9ba0c2; 
}

/* Botones de navegación Cuadrados, Redondeados, Flecha Grande) */
.nav-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.6); 
    color: white;
    border: none;
    
    width: 35px; 
    height: 45px;
    padding: 0; 
    
    cursor: pointer;
    z-index: 10;
    
    /* Bordes redondeados sutiles */
    border-radius: 8px; 
    
    /* Flecha más grande y centrada */
    font-size: 30px; 
    line-height: 45px; /* Centra verticalmente el texto/flecha */
    text-align: center; /* Centra horizontalmente el texto/flecha */
    
    transition: background 0.3s;
}

.nav-button:hover {
    background: rgba(0, 0, 0, 0.9);
}

.prev-btn { left: 0; }
.next-btn { right: 0; }

/* --- ESTILOS LIGHTBOX (CORREGIDOS PARA PANTALLA COMPLETA) --- */
.mcv-lightbox-overlay {
	max-width: 100% !important;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 99999;
    display: none; 
    justify-content: center; 
    align-items: center;   
}

.mcv-lightbox-content {
    
    position: static; 
    max-width: none;
    max-height: none;
}

.mcv-lightbox-close {
   
    position: fixed;
    top: 20px;
    right: 20px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 100003;
    line-height: 1; 
}

/* --- ESTILOS DE NAVEGACIÓN DENTRO DEL LIGHTBOX --- */
.mcv-lightbox-nav {
   
    position: fixed;
    top: 70%;
    transform: translateY(-50%);
    
  
    background: rgba(255, 255, 255, 0.1); 
    color: white;
    border: none;
    
    width: 40px; /* Tamaño del botón */
    height: 60px;
    padding: 0;
    cursor: pointer;
    z-index: 100002; /* Alto Z-Index */
    
    /* Flecha más grande y centrada */
    font-size: 40px; 
    line-height: 60px; 
    text-align: center; 
    
    border-radius: 10%; /* Circular */
    transition: background 0.3s;
}

.mcv-lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.3); /* Se hace más sólido al pasar el ratón */
}

/* Posicionamiento en los lados del Viewport */
.mcv-prev-video { 
    left: 40px; /* Separado del borde del viewport */
}
.mcv-next-video { 
    right: 40px; /* Separado del borde del viewport */
}

/* Adaptación a dispositivos móviles para que los botones queden dentro del viewport */
@media (max-width: 900px) {
    .mcv-prev-video { 
        left: 5px; /* Más cerca del borde en móviles */
    }
    .mcv-next-video { 
        right: 5px;
    }
}


/* ------------------------------------------------------------- */
/* --- CONTENEDOR DEL REPRODUCTOR (Manejo de Aspecto Dinámico y CENTRADO) --- */
/* ------------------------------------------------------------- */
#mcv-video-player-container {
    position: relative;
    /* CLAVE PARA EL CENTRADO HORIZONTAL */
    margin: 0 auto;
}

/* --- ESTILO 16:9 (Vídeo Horizontal Normal) --- */
.aspect-16-9 {
    width: 98vw; 
    /* Aumentado a 1000px en escritorio */
    max-width: 1000px; 
    padding-bottom: 55.125vw; /* (9/16) * 98vw (Móvil/Medio) */
}
/* Ajuste de escritorio (> 800px): AUMENTADO */
@media (min-width: 801px) {
    .aspect-16-9 {
        width: 1000px;
        padding-bottom: 562.5px; /* (9/16)*1000px */
    }
}


/* --- NUEVO ESTILO 9:16 (YouTube Shorts - Vertical) --- */
.aspect-9-16 {
    /* AUMENTADO: Limitamos el ancho a 400px o 90% del viewport para el aspecto vertical */
    width: 400px; 
    max-width: 90vw;
    
    /* padding-bottom (Altura) = (16 / 9) * Ancho. 16/9 ≈ 177.77% */
    padding-bottom: 177.77%; 
}
/* Adaptación a móviles: Si el dispositivo es muy pequeño, usamos el 95% del ancho */
@media (max-width: 400px) {
    .aspect-9-16 {
        width: 95vw;
        padding-bottom: 168.88%; /* (16/9)*95% */
    }
}
/* ------------------------------------------------------------- */


#mcv-video-player-container iframe {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
}