Saltar al contenido

Protección Digital Infantil: Guía para Padres

Guía Interactiva: Niños en la Era Digital

Guía Digital para Padres

Índice

Navegando el Mundo Digital con Nuestros Hijos

La tecnología es una parte inevitable de la vida de nuestros hijos. Esta guía interactiva está diseñada para ayudarte a comprender los desafíos y a encontrar estrategias efectivas para asegurar su bienestar en la era digital.

Información basada en análisis de reportes sobre bienestar digital infantil (2025). Esta es una herramienta educativa, no un sustituto de consejo profesional.

`).join(''); } if (modal) modal.style.display = 'flex'; }function closeModal() { if (modal) modal.style.display = 'none'; } // This event listener should be attached once the modal is guaranteed to be in DOM // window.addEventListener('click', (event) => { // if (event.target == modal) { // closeModal(); // } // });let cyberbullyingChartInstance, mentalHealthChartInstance;function renderCharts() { const cyberbullyingCtx = document.getElementById('cyberbullyingChart').getContext('2d'); if(cyberbullyingChartInstance) cyberbullyingChartInstance.destroy(); cyberbullyingChartInstance = new Chart(cyberbullyingCtx, { type: 'doughnut', data: { labels: ['Afectados', 'No Afectados'], datasets: [{ data: [1, 2], backgroundColor: ['#0891b2', '#a5f3fc'], borderColor: ['#ffffff'], borderWidth: 2 }] }, options: { responsive: true, maintainAspectRatio: false, plugins: { legend: { position: 'bottom' }, tooltip: { callbacks: { label: function(context) { return `1 de cada 3 jóvenes`; } } } } } });const mentalHealthCtx = document.getElementById('mentalHealthChart').getContext('2d'); if(mentalHealthChartInstance) mentalHealthChartInstance.destroy(); mentalHealthChartInstance = new Chart(mentalHealthCtx, { type: 'bar', data: { labels: ['Bajo (<2h)', 'Medio (3-6h)', 'Alto (>7h)'], datasets: [{ label: 'Riesgo Relativo', data: [1, 1.5, 2], backgroundColor: ['#a5f3fc', '#67e8f9', '#0891b2'], }] }, options: { responsive: true, maintainAspectRatio: false, scales: { y: { beginAtZero: true, ticks: { callback: function(value) { return value + 'x'; } } } }, plugins: { legend: { display: false }, tooltip: { callbacks: { label: function(context) { return `Riesgo multiplicado por ${context.raw}`; } } } } } }); } const ageTabs = document.querySelectorAll('.age-tab'); const ageGuideContent = document.getElementById('age-guide-content');function updateAgeGuide(age) { const guideData = appData.ageGuidelines[age]; ageGuideContent.innerHTML = `

${guideData.title}

    ${guideData.recommendations.map(r => `
  • ${r}
  • `).join('')}
`; ageGuideContent.classList.add('section-fade-in'); setTimeout(()=> ageGuideContent.classList.remove('section-fade-in'), 500);ageTabs.forEach(tab => { const isSelected = tab.dataset.age === age; tab.classList.toggle('text-cyan-600', isSelected); tab.classList.toggle('border-cyan-600', isSelected); tab.classList.toggle('text-gray-500', !isSelected); tab.classList.toggle('border-transparent', !isSelected); }); }ageTabs.forEach(tab => { tab.addEventListener('click', () => updateAgeGuide(tab.dataset.age)); });const solutionsAccordion = document.getElementById('solutions-accordion'); appData.solutions.forEach((solution, index) => { const item = document.createElement('div'); item.className = 'bg-white rounded-xl shadow-lg overflow-hidden'; item.innerHTML = ` `; solutionsAccordion.appendChild(item); });solutionsAccordion.addEventListener('click', (e) => { const header = e.target.closest('.accordion-header'); if (!header) return;const content = header.nextElementSibling; const icon = header.querySelector('.transform'); content.classList.toggle('hidden'); icon.textContent = content.classList.contains('hidden') ? '+' : '−'; icon.classList.toggle('rotate-180', !content.classList.contains('hidden')); });window.onload = () => { // Initialize elements after the entire window has loaded riskCardsContainer = document.getElementById('risk-cards-container'); modal = document.getElementById('risk-modal');// Populate risk cards and assign click handlers appData.risks.forEach(risk => { const card = document.createElement('div'); card.className = `p-6 rounded-xl shadow-lg flex flex-col items-center text-center cursor-pointer transition duration-300 transform hover:scale-105 ${risk.color}`; card.onclick = () => openModal(risk.id); card.innerHTML = ` ${risk.icon}

${risk.title}

`; if (riskCardsContainer) { // Ensure container exists before appending riskCardsContainer.appendChild(card); } });// Attach the click listener for the modal background if (modal) { // Ensure modal exists before attaching listener window.addEventListener('click', (event) => { if (event.target === modal) { closeModal(); } }); }showSection('inicio'); updateAgeGuide('0-2'); };

Configurar cookies