<script>
        document.addEventListener("DOMContentLoaded", function () {
            const elementos = document.querySelectorAll(".title-hover, .text-hover");
            const footer = document.querySelector("footer");

            function verificarScroll() {
                const alturaTela = window.innerHeight;

                elementos.forEach(elemento => {
                    const posicaoTop = elemento.getBoundingClientRect().top;
                    if (posicaoTop < alturaTela * 0.85) {
                        elemento.classList.add("aparecer");
                    }
                });

                if (footer) {
                    const posicaoFooter = footer.getBoundingClientRect().top;
                    const alturaBody = document.body.getBoundingClientRect().height;

    if (posicaoFooter < alturaTela || window.scrollY + alturaTela >= alturaBody - 50) {
                        footer.classList.add("aparecer");
                    }
                }
            }

            window.addEventListener("scroll", verificarScroll);
            verificarScroll();
        });
    </script>
    <script src="{{ asset('carnaval-2025-angra/assets/js/confetes.js') }}"></script>
    <script src="{{ asset('carnaval-2025-angra/assets/js/script.js') }}"></script>