function toggleFaq(element) {
  const allItems = document.querySelectorAll(".faq-accordion-item");
  const answer = element.querySelector(".faq-answer-text");
  const arrow = element.querySelector(".arrow-icon");

  allItems.forEach((item) => {
    if (item !== element) {
      item.classList.remove("faq-active-card");
      item.querySelector(".faq-answer-text").classList.add("hidden");
      item.querySelector(".arrow-icon").src =
        "https://img.icons8.com/ios-glyphs/30/BDBDBD/sort-down.png";
    }
  });

  if (answer.classList.contains("hidden")) {
    answer.classList.remove("hidden");
    element.classList.add("faq-active-card");
    arrow.src = "https://img.icons8.com/ios-glyphs/30/BDBDBD/sort-up.png";
  } else {
    answer.classList.add("hidden");
    element.classList.remove("faq-active-card");
    arrow.src = "https://img.icons8.com/ios-glyphs/30/BDBDBD/sort-down.png";
  }
}
