/* Módulo 6: Videos - Swiffy Slider Horizontal */
.modulo-6 {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    border: 1px solid #e5e5e5;
}

.modulo-6-header {
    background: #353535;
    color: white;
    padding: 12px 30px;
    position: relative;
    overflow: hidden;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.modulo-6-header::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 150px;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1));
}

.modulo-6-titulo {
    font-size: 1.7rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 15px;
    margin: 0;
}

.modulo-6-titulo img {
    height: 40px;
    width: auto;
    border-radius: 6px;
}

.modulo-6-titulo i {
    font-size: 1.8rem;
    opacity: 0.9;
}

.modulo-6-boton {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    padding: 9px 19px;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    position: relative;
    z-index: 2;
}

.modulo-6-boton:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.videos-slider-container {
    padding: 30px;
}

.swiffy-slider {
    position: relative;
}

/* Contenedor principal con grid para igualar alturas */
.slider-container {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: calc(33.333% - 20px);
    gap: 20px;
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 10px 5px;
    margin: -10px -5px;
}

.slider-container::-webkit-scrollbar {
    display: none;
}

.slider-container li {
    list-style: none;
    display: flex;
}

/* Tarjeta de video con altura igualada dinámicamente */
.video-item-slider {
    background: white;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    border: 1px solid var(--color-borde);
    overflow: hidden;
    /* La altura se iguala automáticamente por el grid */
}

.video-item-slider:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.video-thumbnail-slider {
    position: relative;
    height: 180px;
    overflow: hidden;
    flex-shrink: 0;
}

.video-thumbnail-slider img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.video-item-slider:hover .video-thumbnail-slider img {
    transform: scale(1.05);
}

.video-play-slider {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    background: rgba(217, 0, 0, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: white;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.video-item-slider:hover .video-play-slider {
    background: rgba(255, 0, 0, 0.95);
    transform: translate(-50%, -50%) scale(1.1);
}

.video-duracion-slider {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* Contenido flexible sin restricciones de altura */
.video-contenido-slider {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
}

.video-contenido-slider::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0px;
    right: 0px;
    height: 2px;
    background: linear-gradient(90deg, var(--color-principal), transparent);
    border-radius: 1px;
}

/* Título y descripción sin límites de líneas */
.video-titulo-slider {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--color-secundario);
    line-height: 1.4;
    margin-bottom: 12px;
    /* Sin límite de líneas - el texto fluye naturalmente */
}

.video-descripcion-slider {
    font-size: 0.9rem;
    line-height: 1.5;
    color: #666;
    margin-bottom: 15px;
    flex: 1;
    /* Sin límite de líneas - el texto fluye naturalmente */
}

/* Meta siempre en la parte inferior */
.video-meta-slider {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: #888;
    padding-top: 15px;
    border-top: 1px solid var(--color-borde);
    margin-top: auto;
    flex-shrink: 0;
}

/* Flechas del slider */
.slider-nav {
    width: 60px;
    height: 60px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    -webkit-filter: drop-shadow(0 0 .5rem rgba(0, 0, 0, 0)) !important;
}

.slider-nav::before {
    content: '';
    width: 12px;
    height: 12px;
    border: 2px solid var(--color-principal);
    border-bottom: none;
    border-right: none;
    transform: rotate(-45deg);
    transition: all 0.3s ease;
}

.slider-nav.slider-nav-next::before {
    transform: rotate(135deg);
}

.slider-nav:hover::before {
    border-color: white;
}

.slider-nav:first-child {
    left: -30px;
}

.slider-nav.slider-nav-next {
    right: -30px;
}

/* Modal */
.video-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 3000;
    backdrop-filter: blur(10px);
}

.video-modal.active {
    display: flex;
}

.video-modal-contenido {
    position: relative;
    width: 90%;
    max-width: 900px;
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.video-modal-iframe {
    width: 100%;
    height: 500px;
    border: none;
    background: #000;
}

.video-modal-cerrar {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 45px;
    height: 45px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 2;
}

.video-modal-cerrar:hover {
    background: var(--color-principal);
    transform: scale(1.1);
}

/* Responsive */
@media (max-width: 992px) {
    .slider-container {
        grid-auto-columns: calc(50% - 20px);
    }
}

@media (max-width: 768px) {
    .modulo-6 {
        overflow: hidden;
    }
    .modulo-6-header {
        padding: 20px;
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .modulo-6-titulo {
        font-size: 1.6rem;
    }

    .modulo-6-titulo img {
        height: 35px;
    }

    .videos-slider-container {
        padding: 20px;
    }

    .slider-container {
        grid-auto-columns: calc(100% - 20px);
    }

    .slider-nav {
        width: 50px;
        height: 50px;
    }

    .slider-nav:first-child {
        left: 0;
    }

    .slider-nav.slider-nav-next {
        right: 0;
    }
}

@media (max-width: 480px) {
    .modulo-6-titulo {
        font-size: 1.2rem;
        gap: 10px;
    }

    .modulo-6-titulo img {
        height: 30px;
    }

    .modulo-6-boton {
        padding: 10px 20px;
        font-size: 0.85rem;
        width: 100%;
        justify-content: center;
    }

    .video-contenido-slider {
        padding: 15px;
    }

    .video-contenido-slider::before {
        left: 15px;
        right: 15px;
    }

    .video-titulo-slider {
        font-size: 1rem;
    }

    .video-modal-iframe {
        height: 300px;
    }

    .video-modal-contenido {
        width: 95%;
    }

    .video-meta-slider {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }

    .slider-nav {
        width: 45px;
        height: 45px;
        /* display: none; */
    }

    .slider-nav.mobile-visible {
        display: flex;
    }
}

.slider-nav {
    -webkit-filter: drop-shadow(0 0 .5rem rgba(0, 0, 0, 0)) !important;
}

.slider-nav.fa-icons::before {
    content: none;
}

.slider-nav.fa-icons i {
    font-size: 2rem;
    color: var(--color-principal);
    transition: all 0.3s ease;
}

/* PS Clips se reproduce directamente dentro del home. */
.modulo-noticias-videos .video-thumbnail-slider .noticia-video-home {position:relative;width:100%;height:100%;}
.modulo-noticias-videos .video-thumbnail-slider iframe {position:absolute;inset:0;width:100%;height:100%;border:0;}
.modulo-noticias-videos .video-item-slider {cursor:default;}
