/* ============================================
   ESTILOS PARA VIDEOS DENTRO DE RECUADROS
   Todos los videos van dentro de .card.video-card
   ============================================ */

/* Estilos base para video-card */
.card.video-card {
    padding: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
    /* Resetear altura heredada de .card */
    height: auto !important;
    min-height: auto !important;
    /* Por defecto, usar 100% de ancho (móviles y tablets) */
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    grid-column: span 1;
}

/* Wrapper del video con aspect ratio responsive */
.card.video-card .video-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 aspect ratio por defecto */
    height: 0;
    border-radius: 8px;
    overflow: hidden;
    background: #000;
}

/* Aspect ratios específicos */
.card.video-card.aspect-16-9 .video-wrapper {
    padding-bottom: 56.25%; /* 16:9 */
}

.card.video-card.aspect-4-3 .video-wrapper {
    padding-bottom: 75%; /* 4:3 */
}

.card.video-card.aspect-1-1 .video-wrapper {
    padding-bottom: 100%; /* 1:1 */
}

.card.video-card.aspect-21-9 .video-wrapper {
    padding-bottom: 42.857%; /* 21:9 */
}

/* Thumbnail del video */
.card.video-card .video-thumbnail {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    cursor: pointer;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.card.video-card .video-thumbnail:hover {
    opacity: 0.9;
}

/* Botón de play */
.card.video-card .video-play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: rgba(46, 139, 87, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    z-index: 2;
}

.card.video-card .video-play-button:hover {
    background: rgba(46, 139, 87, 1);
    transform: translate(-50%, -50%) scale(1.1);
}

.card.video-card .video-play-button::before {
    content: '';
    width: 0;
    height: 0;
    border-left: 20px solid white;
    border-top: 12px solid transparent;
    border-bottom: 12px solid transparent;
    margin-left: 4px;
}

/* Elemento video */
.card.video-card video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ============================================
   MEDIA QUERIES RESPONSIVE
   ============================================ */

/* Pantallas menores a 1024px (incluye tablets y móviles Samsung) */
@media (max-width: 1023px) {
    .card.video-card {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        grid-column: span 1;
    }
    
    .card.video-card .video-play-button {
        width: 55px;
        height: 55px;
    }
    
    .card.video-card .video-play-button::before {
        border-left-width: 18px;
        border-top-width: 11px;
        border-bottom-width: 11px;
    }
}

/* Tablets y pantallas medianas */
@media (max-width: 768px) {
    .card.video-card {
        width: 100% !important;
        margin: 0 !important;
        grid-column: span 1;
    }
    
    .card.video-card .video-play-button {
        width: 50px;
        height: 50px;
    }
    
    .card.video-card .video-play-button::before {
        border-left-width: 16px;
        border-top-width: 10px;
        border-bottom-width: 10px;
    }
}

/* Pantallas móviles estrechas */
@media (max-width: 540px) {
    .card.video-card {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        grid-column: span 1;
        padding: 0 !important;
    }
    
    .card.video-card .video-play-button {
        width: 45px;
        height: 45px;
    }
    
    .card.video-card .video-play-button::before {
        border-left-width: 14px;
        border-top-width: 8px;
        border-bottom-width: 8px;
        margin-left: 3px;
    }
}

/* Pantallas grandes - video ocupa 2 columnas */
@media (min-width: 1024px) {
    .card.video-card {
        width: calc(100% + 40px) !important;
        margin: 0 -20px !important;
        grid-column: span 2;
    }
}

/* ============================================
   SOPORTE PARA TEMAS OSCUROS
   ============================================ */

[data-theme="dark"] .card.video-card .video-wrapper {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

[data-theme="mc"] .card.video-card .video-wrapper {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}
