// LoperBoys Website - JavaScript

document.addEventListener('DOMContentLoaded', function() {
    // Smooth scrolling for navigation links
    document.querySelectorAll('a[href^="#"]').forEach(anchor => {
        anchor.addEventListener('click', function(e) {
            e.preventDefault();
            const target = document.querySelector(this.getAttribute('href'));
            if (target) {
                target.scrollIntoView({
                    behavior: 'smooth',
                    block: 'start'
                });
            }
        });
    });

    // Navbar scroll effect
    const navbar = document.querySelector('.navbar');
    if (navbar) {
        window.addEventListener('scroll', function() {
            if (window.scrollY > 50) {
                navbar.style.boxShadow = '0 4px 12px rgba(0,0,0,0.2)';
            } else {
                navbar.style.boxShadow = '0 4px 12px rgba(0,0,0,0.15)';
            }
        });
    }

    // Add current year to footer
    const footer = document.querySelector('.footer p');
    if (footer) {
        const currentYear = new Date().getFullYear();
        footer.textContent = `© ${currentYear} LoperBoys. All rights reserved.`;
    }

    // Console message for fun
    console.log('%c🔨 LoperBoys - Local Services 🔨', 'color: #2E5BBA; font-size: 20px; font-weight: bold;');
    console.log('%cHard Work. Honest Prices. Local Service.', 'color: #4a4a4a; font-size: 12px;');
    console.log('%cContact: 220-200-4022', 'color: #4a4a4a; font-size: 12px;');
});
