document.addEventListener('DOMContentLoaded', () => {
    // Target the native Bricks header wrapper
    const header = document.getElementById('brx-header'); 
    if (!header) return;

    const updateHeaderHeight = () => {
        const headerHeight = header.offsetHeight;
        // This creates a live variable called --header-height we can use in CSS!
        document.documentElement.style.setProperty('--header-height', `${headerHeight}px`);
    };

    // Run immediately, and re-run if the user resizes their screen or rotates their phone
    updateHeaderHeight();
    window.addEventListener('resize', updateHeaderHeight);
    window.addEventListener('orientationchange', updateHeaderHeight);
});

Industry: Büros & Öffentliche Räume