// Smooth scrolling for anchor links document.querySelectorAll('a[href^="#"]').forEach(anchor => { anchor.addEventListener('click', function (e) { e.preventDefault(); const target = document.querySelector(this.getAttribute('href')); if (target) { window.scrollTo({ top: target.offsetTop, behavior: 'smooth' }); } }); }); // Form submission handling document.addEventListener('DOMContentLoaded', function() { const forms = document.querySelectorAll('form'); forms.forEach(form => { form.addEventListener('submit', function(e) { e.preventDefault(); const email = this.querySelector('input[type="email"]').value; if (email && validateEmail