/**
 * Legacy Real Estate Theme - Main JavaScript
 * Handles theme interactive functionality
 */

// Faq
document.addEventListener("DOMContentLoaded", function () {
  const legacy_real_estate_game_details = document.querySelectorAll(".faq-btm-title");

  legacy_real_estate_game_details.forEach((targetDetail) => {
    targetDetail.addEventListener("toggle", () => {
      if (targetDetail.open) {
        legacy_real_estate_game_details.forEach((legacy_real_estate_game_detail) => {
          if (legacy_real_estate_game_detail !== targetDetail) {
            legacy_real_estate_game_detail.removeAttribute("open");
          }
        });
      }
    });
  });
});