// --- SISTEMA DE NEWS TICKER DINÁMICO ---
let currentHeadlineIndex = 0;

function initNewsTicker() {
    const newsContent = document.getElementById('news-content');
    // Copiar y barajar el array de titulares (Fisher-Yates)
    const shuffled = [...headlines];
    for (let i = shuffled.length - 1; i > 0; i--) {
        const j = Math.floor(Math.random() * (i + 1));
        [shuffled[i], shuffled[j]] = [shuffled[j], shuffled[i]];
    }
    newsContent.textContent = shuffled.join(' | ');
}
