document.addEventListener('DOMContentLoaded', function() {
    // Mobile menu toggle
    const mobileMenuBtn = document.querySelector('.mobile-menu-btn');
    const mainNav = document.querySelector('.main-nav');
    const authButtons = document.querySelector('.auth-buttons');

    mobileMenuBtn.addEventListener('click', function() {
        mainNav.classList.toggle('show');
        authButtons.classList.toggle('show');
    });

    // Tool card click handlers
    const toolCards = document.querySelectorAll('.tool-card');
    
    toolCards.forEach(card => {
        card.addEventListener('click', function() {
            const toolName = this.querySelector('h3').textContent;
            alert(`You clicked on ${toolName}. This would navigate to the tool page in a real implementation.`);
            // In a real implementation, you would navigate to the tool page:
            // window.location.href = `${toolName.toLowerCase().replace(/ /g, '-')}.html`;
        });
    });

    // Hero section button
    const heroBtn = document.querySelector('.hero .btn-primary');
    heroBtn.addEventListener('click', function() {
        alert('This would open a file selector for PDF merging in a real implementation.');
    });

    // Login/Signup buttons
    const loginBtn = document.querySelector('.btn-login');
    const signupBtn = document.querySelector('.auth-buttons .btn-primary');

    loginBtn.addEventListener('click', function() {
        alert('Login modal would appear here.');
    });

    signupBtn.addEventListener('click', function() {
        alert('Signup modal would appear here.');
    });
});