
document.addEventListener('DOMContentLoaded', () => {
    const navLinks = document.querySelectorAll('.nav-link');

    navLinks.forEach(link => {
        if (link.hash !== '') {
            link.addEventListener('click', function(e) {
                e.preventDefault();

                const targetElement = document.querySelector(this.hash);

                if(targetElement) {
                    targetElement.scrollIntoView({
                        behavior: 'smooth'
                    });
                }
            });
        }
    });
});
