cludes(query.toLowerCase())
        );

        matches.forEach(match => {
            const listItem = document.createElement("li");
            listItem.textContent = match.name;
            listItem.addEventListener("click", () => {
                window.location.href = match.href;
            });
            autocompleteList.appendChild(listItem);
        });

        autocompleteList.style.display = matches.length ? "block" : "none";
    }

    function highlightItem(index) {
        const items = aut