document.addEventListener("DOMContentLoaded", function() { function handleScrollReveal() { const elements = document.querySelectorAll('.reveal, .reveal-transitionx'); const windowHeight = window.innerHeight; elements.forEach(el => { const elementTop = el.getBoundingClientRect().top; if (elementTop < windowHeight) { if (el.classList.contains('reveal')) { el.classList.add('show'); } if (el.classList.contains('reveal-transitionx')) { el.classList.add('showx'); } } }); } window.addEventListener('scroll', handleScrollReveal); handleScrollReveal(); if (typeof ScrollReveal !== "undefined") { ScrollReveal().reveal('.imagem-scroll', { duration: 1000, origin: 'bottom', distance: '100px', easing: 'ease-in-out', opacity: 1, reset: false }); } // Efeito de mudança de cor ao passar o mouse const texto = document.getElementById("meuTexto"); if (texto) { texto.addEventListener("mouseenter", () => { texto.style.backgroundColor = "#ffcc00"; }); texto.addEventListener("mouseleave", () => { texto.style.backgroundColor = "transparent"; }); } });