<!-- Enhanced Header -->
<header class="auth-header">
    <div class="header-content">
        <!-- Logo -->
        <a href="/lead-management/public/" class="logo">
            <div class="logo-icon">
                <svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
                    <path d="M16 2L20 10L28 12L20 14L16 22L12 14L4 12L12 10L16 2Z" fill="currentColor" />
                    <path d="M6 20L10 24L8 30L16 26L24 30L22 24L26 20L22 18L16 22L10 18L6 20Z" fill="currentColor" />
                </svg>
            </div>
            <span>LeadIntelligence AI</span>
        </a>

        <!-- Navigation -->
        <nav class="nav-links">
            <a href="/lead-management/public/#features" class="nav-link">Features</a>
            <a href="/lead-management/public/#pricing" class="nav-link">Pricing</a>
            <a href="/lead-management/public/#about" class="nav-link">About</a>
            <a href="#" class="nav-link">Docs</a>

            <?php
            $isLoggedIn = isset($_SESSION['user_id']) && !empty($_SESSION['user_id']);
            $userName = htmlspecialchars($_SESSION['user_name'] ?? 'User');
            ?>

            <?php if ($isLoggedIn): ?>
                <!-- User Menu -->
                <div class="user-menu">
                    <span class="user-greeting">Welcome, <?= $userName ?></span>
                    <a href="/lead-management/public/app" class="btn-primary">
                        Dashboard
                    </a>
                    <a href="/lead-management/public/logout" class="btn-outline">
                        Logout
                    </a>
                </div>
            <?php else: ?>
                <!-- Auth Links -->
                <a href="/lead-management/public/login" class="nav-link">Sign In</a>
                <a href="/lead-management/public/register" class="btn-primary">
                    Get Started Free
                </a>
            <?php endif; ?>
        </nav>

        <!-- Mobile Menu Button -->
        <button class="mobile-menu-btn" id="mobileMenuBtn">
            <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
                <path d="M3 12H21" stroke="currentColor" stroke-width="2" stroke-linecap="round" />
                <path d="M3 6H21" stroke="currentColor" stroke-width="2" stroke-linecap="round" />
                <path d="M3 18H21" stroke="currentColor" stroke-width="2" stroke-linecap="round" />
            </svg>
        </button>
    </div>

    <!-- Mobile Menu -->
    <div class="mobile-menu" id="mobileMenu">
        <div class="mobile-menu-content">
            <a href="/lead-management/public/#features" class="mobile-nav-link">Features</a>
            <a href="/lead-management/public/#pricing" class="mobile-nav-link">Pricing</a>
            <a href="/lead-management/public/#about" class="mobile-nav-link">About</a>
            <a href="#" class="mobile-nav-link">Documentation</a>

            <div class="mobile-auth-links">
                <?php if ($isLoggedIn): ?>
                    <a href="/lead-management/public/app" class="mobile-nav-link mobile-nav-primary">
                        Dashboard
                    </a>
                    <a href="/lead-management/public/logout" class="mobile-nav-link">
                        Logout
                    </a>
                <?php else: ?>
                    <a href="/lead-management/public/login" class="mobile-nav-link">Sign In</a>
                    <a href="/lead-management/public/register" class="mobile-nav-link mobile-nav-primary">
                        Get Started Free
                    </a>
                <?php endif; ?>
            </div>
        </div>
    </div>
    <link rel="stylesheet" href="/lead-management/public/assets/css/main.css">

</header>