/*
document.addEventListener("DOMContentLoaded", function () {
    const backToTopBtn = document.getElementById("backToTopBtn");

    window.addEventListener("scroll", function () {
        if (window.scrollY > 800) {
            backToTopBtn.classList.remove("hidden");
        } else {
            backToTopBtn.classList.add("hidden");
        }
    });
});
*/

function toggleNav() {
	var element = document.getElementById("menuDrawer");
	element.classList.toggle("sidenav-expand");
	
	var element = document.getElementById("mobileMenu");
	element.classList.toggle("visible");
}

function toggleSearch() {
	var element = document.getElementById("searchDrawer");
	element.classList.toggle("sidenav-expand");
}

function handleSearchKeyDown(event) {
    if (event.key === 'Enter') {
      toggleSearch();
    }
  }
  