jQuery(document).ready(function($) {
$(document).on('click', '.close-popup', function(event) {
event.preventDefault();
// Close the popup
elementorProFrontend.modules.popup.closePopup({}, event);
// Scroll to the #form anchor after a short delay
setTimeout(function() {
$('html, body').animate({
scrollTop: $('#form').offset().top
}, 800);
}, 300); // adjust delay if needed to match popup close animation
});
});