Spaces:
Running
Running
| document.addEventListener('DOMContentLoaded', () => { | |
| // Initialize animations | |
| const elements = document.querySelectorAll('.float-animation'); | |
| elements.forEach((el, index) => { | |
| el.style.animationDelay = `${index * 0.2}s`; | |
| }); | |
| // Culture grid interaction | |
| const cultureItems = document.querySelectorAll('.culture-item'); | |
| cultureItems.forEach(item => { | |
| item.addEventListener('mouseenter', () => { | |
| const overlay = item.querySelector('.culture-overlay'); | |
| if (overlay) { | |
| overlay.classList.remove('opacity-0'); | |
| overlay.classList.add('opacity-100'); | |
| } | |
| }); | |
| item.addEventListener('mouseleave', () => { | |
| const overlay = item.querySelector('.culture-overlay'); | |
| if (overlay) { | |
| overlay.classList.remove('opacity-100'); | |
| overlay.classList.add('opacity-0'); | |
| } | |
| }); | |
| }); | |
| // Responsive adjustments | |
| function handleResize() { | |
| const vh = window.innerHeight * 0.01; | |
| document.documentElement.style.setProperty('--vh', `${vh}px`); | |
| } | |
| window.addEventListener('resize', handleResize); | |
| handleResize(); | |
| }); | |