const accTitles = document.querySelectorAll('.accordion-title'); accTitles.forEach(title => { title.addEventListener('click', () => { accTitles.forEach(otherTitle => { if (otherTitle !== title) { otherTitle.classList.remove('active'); otherTitle.nextElementSibling.style.display = 'none'; } }); const content = title.nextElementSibling; const isOpen = content.style.display === 'block'; title.classList.toggle('active'); content.style.display = isOpen ? 'none' : 'block'; }); }); const slides = document.querySelectorAll('.slide'); let currentIndex = 0; function nextSlide() { if (slides.length === 0) return; slides[currentIndex].classList.remove('active'); currentIndex = (currentIndex + 1) % slides.length; slides[currentIndex].classList.add('active'); } if (slides.length > 0) { slides[currentIndex].classList.add('active'); setInterval(nextSlide, 10000); }