// Scroll effect for the navbar document.addEventListener('DOMContentLoaded', () => { const nav = document.getElementById('mainNav'); const brandText = document.getElementById('brandText'); const navLinks = document.querySelectorAll('.nav-link'); window.addEventListener('scroll', () => { if (window.scrollY > 50) { nav?.classList.add('scrolled', 'navbar-light'); nav?.classList.remove('navbar-dark'); brandText?.classList.add('text-success'); brandText?.style.setProperty('color', '#0d5b40', 'important'); } else { nav?.classList.remove('scrolled', 'navbar-light'); nav?.classList.add('navbar-dark'); brandText?.style.setProperty('color', 'white', 'important'); } }); // Handle initial state for mobile if (window.innerWidth < 992) { brandText?.style.setProperty('color', '#0d5b40', 'important'); } });