File size: 1,769 Bytes
13cedfa
daf841f
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
13cedfa
daf841f
 
 
 
 
 
 
 
 
 
 
 
 
 
 
13cedfa
daf841f
 
 
 
 
 
 
 
 
 
13cedfa
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
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.');
    });
  });
});