document.addEventListener('DOMContentLoaded', function() { // FAQ Toggle Functionality document.querySelectorAll('.faq-question').forEach(question => { question.addEventListener('click', () => { const answer = question.nextElementSibling; const icon = question.querySelector('i'); // Toggle active class on answer answer.classList.toggle('active'); // Rotate icon if (answer.classList.contains('active')) { icon.style.transform = 'rotate(180deg)'; } else { icon.style.transform = 'rotate(0deg)'; } // Close other open FAQs (optional) document.querySelectorAll('.faq-answer').forEach(otherAnswer => { if (otherAnswer !== answer && otherAnswer.classList.contains('active')) { otherAnswer.classList.remove('active'); const otherIcon = otherAnswer.previousElementSibling.querySelector('i'); otherIcon.style.transform = 'rotate(0deg)'; } }); }); }); // Smooth scrolling for navigation links document.querySelectorAll('a[href^="#"]').forEach(anchor => { anchor.addEventListener('click', function(e) { e.preventDefault(); const targetId = this.getAttribute('href'); if(targetId === '#') return; const targetElement = document.querySelector(targetId); if(targetElement) { window.scrollTo({ top: targetElement.offsetTop - 80, behavior: 'smooth' }); } }); }); // CTA button interactions document.querySelectorAll('.cta-button').forEach(button => { button.addEventListener('click', function() { alert('Thank you for your interest in Thinkio! Our team will contact you shortly.'); }); }); });