class CustomTestimonials extends HTMLElement { connectedCallback() { this.attachShadow({ mode: 'open' }); this.shadowRoot.innerHTML = `

"The personalized nutrition plan transformed my relationship with food. I've lost 30 pounds and have more energy than I've had in years. The team at WellnessWave truly cares about your success."

Jennifer K.

Jennifer K.

Lost 30 lbs in 6 months

"As a busy professional, I struggled to maintain a healthy lifestyle. The fitness program designed for my schedule helped me build strength and reduce stress. I'm now in the best shape of my life!"

Michael T.

Michael T.

Corporate Executive

"The mental wellness coaching helped me develop tools to manage anxiety and improve my sleep. The mindfulness techniques are now part of my daily routine. I feel more balanced and in control."

Sophia L.

Sophia L.

Teacher

`; // Slider functionality const container = this.shadowRoot.getElementById('testimonial-container'); const dots = this.shadowRoot.querySelectorAll('.slider-dot'); const prevBtn = this.shadowRoot.getElementById('prev-btn'); const nextBtn = this.shadowRoot.getElementById('next-btn'); let currentIndex = 0; const totalSlides = dots.length; const updateSlider = () => { container.style.transform = `translateX(-${currentIndex * 100}%)`; // Update dots dots.forEach((dot, index) => { if (index === currentIndex) { dot.classList.add('active'); } else { dot.classList.remove('active'); } }); }; const nextSlide = () => { currentIndex = (currentIndex + 1) % totalSlides; updateSlider(); }; const prevSlide = () => { currentIndex = (currentIndex - 1 + totalSlides) % totalSlides; updateSlider(); }; // Event listeners nextBtn.addEventListener('click', nextSlide); prevBtn.addEventListener('click', prevSlide); dots.forEach(dot => { dot.addEventListener('click', () => { currentIndex = parseInt(dot.getAttribute('data-index')); updateSlider(); }); }); // Auto-advance slider setInterval(nextSlide, 5000); // Initialize Feather icons feather.replace(); } } customElements.define('custom-testimonials', CustomTestimonials);