document.addEventListener('DOMContentLoaded', function () {
    const creative_designer_button = document.querySelector('.scroll-top-button');
    const creative_designer_link = document.querySelector('.scroll-top-button a');

    // Show/Hide button on scroll
    window.addEventListener('scroll', function () {
        if (document.documentElement.scrollTop > 100) {
            creative_designer_button.style.display = "block";
        } else {
            creative_designer_button.style.display = "none";
        }
    });

    // Scroll to top on click
    if (creative_designer_link) {
        creative_designer_link.addEventListener('click', function (creative_designer_event) {
            creative_designer_event.preventDefault();
            window.scrollTo({
                top: 0,
                behavior: 'smooth'
            });
        });
    }

});