/* Contenedor principal */
.wp-marquee {
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    overflow: hidden;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    background-color: transparent;
    --marquee-speed: 30s;
    /* Variable CSS para velocidad dinámica */
    padding: 0 20px;
    min-height: 40px;
}

.wp-marquee-empty {
    width: 100%;
    padding: 20px;
    text-align: center;
    color: #999;
    background-color: #f5f5f5;
    border-radius: 4px;
    font-style: italic;
}

/* Contenido de la marquesina */
.marquee-content {
    display: flex;
    white-space: nowrap;
    will-change: transform;
    margin: 0;
    padding: 0 30px;
    justify-content: center;
    align-items: center;
    list-style: none;
}

/* Items de la marquesina */
.marquee-item {
    display: inline-block;
    padding: 0 15px;
    white-space: nowrap;
    margin: 0;
    flex-shrink: 0;
    text-align: center;
    font-size: inherit;
    color: inherit;
    list-style: none;
}

/* ========================================
   ANIMACIONES DINÁMICAS CON CSS VARIABLES
   ======================================== */

/* Movimiento de izquierda a derecha */
.wp-marquee[data-direction="left"] .marquee-content {
    animation: marquee-left var(--marquee-speed) linear infinite;
}

/* Movimiento de derecha a izquierda */
.wp-marquee[data-direction="right"] .marquee-content {
    animation: marquee-right var(--marquee-speed) linear infinite;
}

/* ========================================
   KEYFRAMES - Movimiento de izquierda a derecha
   ======================================== */

@keyframes marquee-left {
    0% {
        transform: translateX(100%);
    }

    100% {
        transform: translateX(-100%);
    }
}

/* ========================================
   KEYFRAMES - Movimiento de derecha a izquierda
   ======================================== */

@keyframes marquee-right {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100%);
    }
}

/* ========================================
   Pausa al pasar el mouse
   ======================================== */

.wp-marquee[data-pause="true"]:hover .marquee-content {
    animation-play-state: paused;
    cursor: pointer;
}

/* ========================================
   Efecto visual al pasar el mouse
   ======================================== */

.wp-marquee[data-pause="true"]:hover {
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.1);
}

/* ========================================
   Diseño responsive
   ======================================== */

/* Tabletas y pantallas medianas */
@media (max-width: 768px) {
    .wp-marquee {
        min-height: 35px;
        --marquee-speed: 25s;
    }

    .marquee-item {
        padding: 0 10px;
        font-size: 0.95em;
    }
}

/* Móviles */
@media (max-width: 480px) {
    .wp-marquee {
        min-height: 30px;
        --marquee-speed: 20s;
    }

    .marquee-item {
        padding: 0 8px;
        font-size: 0.85em;
    }
}

/* Pantallas grandes (desktop) */
@media (min-width: 1200px) {
    .wp-marquee {
        --marquee-speed: 35s;
    }

    .marquee-item {
        padding: 0 20px;
    }
}
}