   const topMenu = document.getElementById("topmenu"); // Replace with your top menu's ID
    if (topMenu) {
        const topMenuHeight = topMenu.offsetHeight; // Dynamically get the top menu height
        document.documentElement.style.setProperty('--top-menu-height', `${topMenuHeight}px`);
    }
}

window.addEventListener("DOMContentLoaded", adjustOutputOffset);
window.addEventListener("resize", adjustOutputOffset);

// Prevent flickering on page navigation
window.addEventListener("beforeunload", () => 