
$(document).ready(function () {
  // Efecto scroll fade-in
  $(window).on('scroll', function () {
    $('.fade-in').each(function () {
      const top = $(this).offset().top;
      const scroll = $(window).scrollTop() + $(window).height();
      if (scroll > top) {
        $(this).addClass('visible');
      }
    });
  });

  // Scroll suave para links internos
  $('a[href^="#"]').on('click', function (e) {
    e.preventDefault();
    let target = $(this).attr('href');
    $('html, body').animate({ scrollTop: $(target).offset().top - 50 }, 600);
  });

  // Efecto hover animado en botones
  $('.btn').hover(
    function () {
      $(this).css({ transform: 'scale(1.05)', transition: '0.2s' });
    },
    function () {
      $(this).css({ transform: 'scale(1)', transition: '0.2s' });
    }
  );
});
