<script>
/*مخفی و نمایش اطلاعات*/
document.addEventListener("DOMContentLoaded", function() {
  var button = document.querySelector(".sigmaweb-support-button");
  var supportBox = document.querySelector(".sigmaweb-support-box");

  button.addEventListener("click", function() {
    var icon = this.querySelector("i");
    if (icon.classList.contains("fa-phone")) {
      icon.classList.remove("fa-phone");
      icon.classList.add("fa-times");
    } else {
      icon.classList.remove("fa-times");
      icon.classList.add("fa-phone");
    }

    this.classList.toggle("active");
    supportBox.classList.toggle("active");
  });
});

/*انبمیشن باکس شدو دکمه*/
document.addEventListener("DOMContentLoaded", function () {
    const btn = document.querySelector('.sigmaweb-support-button .elementor-widget-container');

    btn.addEventListener("mouseenter", function () {
      btn.classList.remove("hover"); // حذف کلاس برای ریست انیمیشن
      void btn.offsetWidth; // ترفند برای ری‌تریگر انیمیشن
      btn.classList.add("hover");
    });

    btn.addEventListener("mouseleave", function () {
      btn.classList.remove("hover");
      void btn.offsetWidth;
      btn.classList.add("hover");
      
      setTimeout(() => {
        btn.classList.remove("hover");
      }, 1000); // مدت زمان انیمیشن
    });
})
</script>