<script>
document.addEventListener('DOMContentLoaded', () => {
const init = () => {
const secondSection = document.querySelector('section[data-section-id="67439b88189710215d1906a8"]');
const body = document.body;
const header = document.querySelector('header');
if (!secondSection || !body || !header) {
console.log('Required elements not found, retrying...');
setTimeout(init, 100); // Retry after 100ms
return;
}
const observer = new IntersectionObserver((entries) => {
entries.forEach(entry => {
if (entry.isIntersecting) {
body.classList.add('scroll-past');
} else {
body.classList.remove('scroll-past');
}
});
}, {
threshold: 0,
rootMargin: '-10% 0px 0px 0px' // Trigger slightly before element enters viewport
});
observer.observe(secondSection);
console.log('Scroll handler initialized');
};
// Start initialization
init();
});
</script>
<style>
body.scroll-past div#block-yui_3_17_2_1_1732903410979_5229 {
display: none !important;
}
</style>