/* === WRAPPER GENERAL === */

.bne-breaking-news-wrapper {
    width: 100%;
    overflow: hidden;
    box-sizing: border-box;
    font-family: inherit; /* Hereda del tema */
}

/* Contenedor interno: label + ticker */
.bne-breaking-news-inner {
    display: flex;
    align-items: center;
    gap: 10px;
    background-color: #111111;
    padding: 8px 16px;
    box-sizing: border-box;
    width: 100%;
    min-height: 48px;
}

/* Label (Breaking News) */
.bne-breaking-news-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 3px;
    background-color: #e63946;
    flex-shrink: 0;
}

/* === CÍRCULOS ANIMADOS DEL LABEL === */

.bne-label-dots {
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

.bne-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: #ffffff;
    opacity: 0.3;
    animation: bne-dot-pulse 1.2s infinite ease-in-out;
}

/* Desfase para el efecto "lucecitas" */
.bne-dot-1 {
    animation-delay: 0s;
}

.bne-dot-2 {
    animation-delay: 0.2s;
}

.bne-dot-3 {
    animation-delay: 0.4s;
}

/* Texto del label ("Breaking News", "Importante", etc.) */
.bne-label-text {
    font-size: 13px; /* Base, luego se puede sobreescribir desde Elementor */
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #ffffff;
    white-space: nowrap;
}

/* === TICKER (LISTA DE NOTICIAS) === */

.bne-breaking-news-ticker {
    overflow: hidden;
    position: relative;
    flex: 1 1 auto;
    min-width: 0; /* Importante para que flex deje comprimir el contenido en pantallas pequeñas */
}

/* Lista que se desplaza en horizontal */
.bne-breaking-news-items {
    display: inline-flex;
    align-items: center;
    gap: 30px;
    list-style: none;
    margin: 0;
    padding: 0;
    animation: bne-ticker-scroll 30s linear infinite;
    will-change: transform;
}

/* Cada item: thumb + texto */
.bne-breaking-news-item {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
}

/* Miniatura de la imagen destacada */
.bne-breaking-news-thumb {
    width: 40px;
    height: 40px;
    overflow: hidden;
    border-radius: 4px;
    flex-shrink: 0;
}

.bne-breaking-news-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Texto del post (título + fecha) */
.bne-breaking-news-text {
    display: inline-flex;
    align-items: baseline;
    gap: 8px;
}

/* Título de la noticia */
.bne-breaking-news-item a {
    text-decoration: none;
    font-size: 14px; /* base, modificable con tipografía de Elementor */
    color: #ffffff;
    font-weight: 500;
}

.bne-breaking-news-item a:hover {
    text-decoration: underline;
}

/* Fecha de la noticia (si está activada) */
.bne-breaking-news-date {
    font-size: 12px; /* base, modificable con tipografía de Elementor */
    color: #cccccc;
}

/* === SEPARADOR ENTRE NOTICIAS === */

.bne-breaking-news-separator {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 6px;
    font-size: 14px;
    color: #999999; /* Se puede sobrescribir desde Elementor */
    white-space: nowrap;
}

/* === ANIMACIONES === */

/* Lúcencitas (círculos) del label */
@keyframes bne-dot-pulse {
    0% {
        transform: scale(1);
        opacity: 0.3;
    }
    50% {
        transform: scale(1.6);
        opacity: 1;
    }
    100% {
        transform: scale(1);
        opacity: 0.3;
    }
}

/* Marquee horizontal */
@keyframes bne-ticker-scroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-100%);
    }
}

/* Pausa la animación al poner el cursor encima */
.bne-breaking-news-ticker:hover .bne-breaking-news-items {
    animation-play-state: paused;
}

/* === RESPONSIVO === */

/* Tablets y pantallas medianas */
@media (max-width: 1024px) {
    .bne-breaking-news-inner {
        padding: 6px 12px;
        gap: 8px;
    }

    .bne-breaking-news-items {
        gap: 24px;
    }

    .bne-breaking-news-thumb {
        width: 36px;
        height: 36px;
    }

    .bne-breaking-news-separator {
        padding: 0 5px;
        font-size: 13px;
    }
}

/* Móviles */
@media (max-width: 768px) {
    .bne-breaking-news-inner {
        padding: 6px 10px;
        gap: 6px;
    }

    .bne-label-text {
        font-size: 11px; /* Se puede sobreescribir con la tipografía responsiva de Elementor */
    }

    .bne-breaking-news-item a {
        font-size: 13px; /* base móvil, Elementor puede cambiarla */
    }

    .bne-breaking-news-date {
        font-size: 11px;
    }

    .bne-breaking-news-thumb {
        width: 32px;
        height: 32px;
    }

    .bne-breaking-news-items {
        gap: 18px;
    }

    .bne-breaking-news-separator {
        padding: 0 4px;
        font-size: 12px;
    }
}

/* Pantallas muy pequeñas (por si acaso) */
@media (max-width: 480px) {
    .bne-breaking-news-inner {
        padding: 4px 8px;
    }

    .bne-breaking-news-label {
        padding: 4px 8px;
    }

    .bne-label-text {
        font-size: 10px;
    }

    .bne-breaking-news-item a {
        font-size: 12px;
    }

    .bne-breaking-news-thumb {
        width: 28px;
        height: 28px;
    }

    .bne-breaking-news-separator {
        padding: 0 3px;
        font-size: 11px;
    }
}
