document.addEventListener("DOMContentLoaded", function () {
    const menuToggle = document.getElementById("menuShowBar");
    const navbar = document.getElementById("navbarMenu");
    menuToggle.addEventListener("click", function () {
        if (menuToggle.classList.contains("fa-bars")) {
            navbar.classList.add("active");
            menuToggle.classList.remove("fa-bars");
            menuToggle.classList.add("fa-xmark");
        } else {
            navbar.classList.remove("active");
            menuToggle.classList.remove("fa-xmark");
            menuToggle.classList.add("fa-bars");
        }
    });

    const minusIcons = document.querySelectorAll(".fa-circle-minus");
    minusIcons.forEach((icon) => {
        icon.addEventListener("click", function () {
            const targetId = this.getAttribute("data-id");

            const targetElement = document.getElementById(targetId);

            if (targetElement) {
                targetElement.style.display = "none";
            }
        });
    });
});
