// Copia reducida de assets/js/main.js del tema Next (solo funcionalidades básicas usadas en landing)
document.addEventListener('DOMContentLoaded', function(){
  // simple scroll to top button if exists
  var scrollBtn = document.querySelector('.scroll-up');
  if(scrollBtn){
    window.addEventListener('scroll', function(){
      if(window.scrollY > 50) scrollBtn.classList.add('active-scroll'); else scrollBtn.classList.remove('active-scroll');
    });
    scrollBtn.addEventListener('click', function(e){ e.preventDefault(); window.scrollTo({top:0,behavior:'smooth'});});
  }

  // initialize simple counters
  document.querySelectorAll('.count').forEach(function(el){
    var val = +el.textContent || 0;
    el.textContent = val;
  });

});
