.filmstrip-wrapper {
    position: relative;
    width: 100%;
}

.filmstrip-container {
    overflow: hidden;
    width: 100%;
    padding: 60px 0;
    perspective: 1200px; /* Crea la profundidad 3D */
    display: flex;
    align-items: center;
}

.filmstrip-track {
    display: flex;
    gap: 30px;
    width: max-content;
    /* Animación lineal infinita. El tiempo define la velocidad */
    animation: scrollFilmstrip 30s linear infinite; 
    transform-style: preserve-3d;
    transform: rotateY(15deg) rotateX(5deg); /* Inclinación 3D tipo Slider Revolution */
}

/* Pausa por CSS y por clase inyectada en JS */
.filmstrip-track:hover,
.filmstrip-track.is-paused {
    animation-play-state: paused !important;
}

@keyframes scrollFilmstrip {
    0% { transform: translateX(0) rotateY(15deg) rotateX(5deg); }
    100% { transform: translateX(calc(-50% - 15px)) rotateY(15deg) rotateX(5deg); }
}

.filmstrip-slide {
    width: 320px;
    height: 450px;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
    transition: transform 0.4s ease;
}

.filmstrip-slide:hover {
    transform: scale(1.05) translateZ(30px);
}

.filmstrip-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.filmstrip-caption {
    position: absolute;
    bottom: 25px;
    left: 20px;
    right: 20px;
    font-size: 1.2rem;
    font-weight: 700;
    text-shadow: 2px 2px 5px rgba(0,0,0,0.8);
    color: #fff; /* Valor por defecto, Elementor puede sobreescribirlo */
}

/* --- LIGHTBOX (Pantalla completa) --- */
.filmstrip-lightbox {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    background: rgba(0,0,0,0.92);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 999999;
}

.filmstrip-lightbox-img {
    max-width: 90vw;
    max-height: 90vh;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
    object-fit: contain;
}

.filmstrip-close {
    position: absolute;
    top: 30px; right: 40px;
    color: #ffffff;
    font-size: 50px;
    cursor: pointer;
    transition: color 0.3s ease;
}

.filmstrip-close:hover {
    color: #ff3333;
}

/* --- RESPONSIVE / MÓVILES --- */
@media (max-width: 768px) {
    .filmstrip-slide { 
        width: 240px; 
        height: 350px; 
    }
    .filmstrip-track { 
        /* En móviles quitamos la inclinación 3D agresiva para mejor usabilidad y legibilidad */
        transform: rotateY(0deg) rotateX(0deg); 
        animation: scrollFilmstripMobile 20s linear infinite; 
    }
    @keyframes scrollFilmstripMobile {
        0% { transform: translateX(0); }
        100% { transform: translateX(calc(-50% - 15px)); }
    }
}