ndicator.classList.toggle('active', index === currentSlide);
            });
        }

        function moveSlide(n) {
            currentSlide = (currentSlide + n + totalSlides) % totalSlides;
            updateCarousel();
        }

        function goToSlide(n) {
            currentSlide = n;
            updateCarousel();
        }

        // Auto-advance slides every 5 seconds
        setInterval(() => moveSlide(1), 5000);
    </script>
</body>
</html>