Changed around line 1
+ document.addEventListener('DOMContentLoaded', () => {
+ // Smooth scrolling for anchor links
+ document.querySelectorAll('a[href^="#"]').forEach(anchor => {
+ anchor.addEventListener('click', function (e) {
+ e.preventDefault();
+ document.querySelector(this.getAttribute('href')).scrollIntoView({
+ behavior: 'smooth'
+ });
+ });
+ });
+
+ // Add animation to strategy cards on scroll
+ const observer = new IntersectionObserver((entries) => {
+ entries.forEach(entry => {
+ if (entry.isIntersecting) {
+ entry.target.style.opacity = '1';
+ entry.target.style.transform = 'translateY(0)';
+ }
+ });
+ }, {
+ threshold: 0.1
+ });
+
+ document.querySelectorAll('.strategy-card').forEach(card => {
+ card.style.opacity = '0';
+ card.style.transform = 'translateY(20px)';
+ card.style.transition = 'opacity 0.5s, transform 0.5s';
+ observer.observe(card);
+ });
+
+ // Mobile menu toggle functionality
+ let isMenuOpen = false;
+ const createMobileMenu = () => {
+ if (window.innerWidth <= 768 && !isMenuOpen) {
+ const mobileMenuBtn = document.createElement('button');
+ mobileMenuBtn.innerHTML = '☰';
+ mobileMenuBtn.className = 'mobile-menu-btn';
+ document.querySelector('nav').prepend(mobileMenuBtn);
+
+ mobileMenuBtn.addEventListener('click', () => {
+ const navLinks = document.querySelector('.nav-links');
+ navLinks.style.display = navLinks.style.display === 'flex' ? 'none' : 'flex';
+ });
+
+ isMenuOpen = true;
+ }
+ };
+
+ createMobileMenu();
+ window.addEventListener('resize', createMobileMenu);
+ });