<?php
error_reporting(E_ALL);
ini_set('display_errors', 1);
require_once 'config.php';
require_once 'classes/Security.php';
require_once 'Database.php';

$pageTitle = 'DDES-Exchange Pro - Secure P2P Cryptocurrency Trading Platform';
$pageDescription = 'Trade cryptocurrencies peer-to-peer with escrow protection. Secure Bitcoin, Ethereum, and altcoin trading with KYC verification, real-time prices, and 24/7 support.';

// Get cryptocurrency prices for display
$db = new Database();
$db->query("SELECT symbol, name, current_price FROM cryptocurrencies WHERE is_active = 1 AND to_display = 'Yes' ORDER BY symbol");
$cryptocurrencies = $db->resultSet();
?>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title><?php echo isset($pageTitle) ? $pageTitle : $defaultTitle; ?></title>
    
    <!-- SEO Meta Tags -->
    <meta name="description" content="<?php echo isset($pageDescription) ? $pageDescription : $defaultDescription; ?>">
    <meta name="keywords" content="cryptocurrency exchange, bitcoin trading, ethereum, P2P trading, crypto exchange, blockchain, digital currency, secure trading, escrow, KYC verification, professional trading">
    <meta name="author" content="DDES-Exchange Pro">
    <meta name="robots" content="index, follow">
    <link rel="canonical" href="<?php echo SITE_URL . $_SERVER['REQUEST_URI']; ?>">
    
    <!-- Open Graph Meta Tags -->
    <meta property="og:title" content="<?php echo isset($pageTitle) ? $pageTitle : 'DDES-Exchange - Professional Cryptocurrency Trading'; ?>">
    <meta property="og:description" content="<?php echo isset($pageDescription) ? $pageDescription : 'Professional cryptocurrency exchange with secure P2P trading and escrow protection.'; ?>">
    <meta property="og:type" content="website">
    <meta property="og:url" content="<?php echo SITE_URL . $_SERVER['REQUEST_URI']; ?>">
    <meta property="og:image" content="<?php echo SITE_URL; ?>/assets/images/og-image.jpg">
    <meta property="og:site_name" content="CryptoExchange Pro">
    
    <!-- Twitter Card Meta Tags -->
    <meta name="twitter:card" content="summary_large_image">
    <meta name="twitter:title" content="<?php echo isset($pageTitle) ? $pageTitle : 'CryptoExchange Pro'; ?>">
    <meta name="twitter:description" content="<?php echo isset($pageDescription) ? $pageDescription : 'Professional cryptocurrency exchange with secure P2P trading.'; ?>">
    <meta name="twitter:image" content="<?php echo SITE_URL; ?>/assets/images/twitter-card.jpg">
    
    <!-- Favicon -->
    <link rel="icon" type="image/x-icon" href="/assets/images/favicon.ico">
    <link rel="apple-touch-icon" sizes="180x180" href="/assets/images/apple-touch-icon.png">
    
    <!-- Security Headers -->
    <!-- <meta http-equiv="Content-Security-Policy" content="default-src 'self'; script-src 'self' 'unsafe-inline' https://cdn.jsdelivr.net https://cdnjs.cloudflare.com; style-src 'self' 'unsafe-inline' https://fonts.googleapis.com https://cdnjs.cloudflare.com; img-src 'self' data: https:; font-src 'self' https://fonts.gstatic.com https://cdnjs.cloudflare.com; connect-src 'self';"> -->
    <meta name="csrf-token" content="<?php echo Security::generateCSRFToken(); ?>">
    
    <!-- CSS -->
    <link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css" rel="stylesheet">
    <script src="https://cdn.tailwindcss.com"></script>
    <link href="assets/css/style.css" rel="stylesheet">
    <!-- Include Google Font -->
    <link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&display=swap" rel="stylesheet">
    
    <!-- Structured Data -->
    <?php
    $schemaData = [
        "@context" => "https://schema.org",
        "@type" => "FinancialService",
        "name" => "CryptoExchange Pro",
        "description" => "Professional cryptocurrency exchange platform with P2P trading and escrow protection",
        "url" => SITE_URL,
        "logo" => SITE_URL . "/assets/images/logo.png",
        "sameAs" => [
            "https://twitter.com/cryptoexchangepro",
            "https://facebook.com/cryptoexchangepro"
        ],
        "contactPoint" => [
            "@type" => "ContactPoint",
            "telephone" => "+1-555-CRYPTO",
            "contactType" => "customer service",
            "availableLanguage" => "English"
        ],
        "address" => [
            "@type" => "PostalAddress",
            "addressCountry" => "US"
        ]
    ];
    ?>

    <script type="application/ld+json">
    <?= json_encode($schemaData, JSON_UNESCAPED_SLASHES | JSON_PRETTY_PRINT); ?>
    </script>
</head>
<body class="">
  <?php include_once('includes/navbar.php'); ?> 

<main>
    <!-- Hero Section -->
    <section class="relative overflow-hidden bg-gradient-to-br from-[#faf5ff] via-[#fdfbff] to-[#f7f3ff] text-gray-900 pt-10 pb-28 font-[Inter,sans-serif]">
    <!-- Soft Gradient Lights -->
    <div class="absolute inset-0 overflow-hidden">
        <div class="absolute top-0 left-0 w-80 h-80 bg-purple-300/30 rounded-full blur-3xl opacity-40 animate-pulse"></div>
        <div class="absolute bottom-0 right-0 w-[450px] h-[450px] bg-fuchsia-200/30 rounded-full blur-3xl opacity-40 animate-pulse-slow"></div>
    </div>

    <div class="relative z-10 max-w-7xl mx-auto px-6 lg:px-8">
        <div class="grid grid-cols-1 lg:grid-cols-2 gap-14 items-center">

        <!-- Left Section -->
        <div class="animate-fadeIn space-y-6">
            <h1 class="text-4xl sm:text-5xl lg:text-6xl font-extrabold leading-tight tracking-tight">
            Trade Cryptocurrencies <br />
            <span class="text-yellow-400 drop-shadow-lg">Securely & Confidently</span>
            </h1>

            <p class="text-lg sm:text-xl text-gray-600 leading-relaxed max-w-lg">
            Experience the future of trading with <span class="text-yellow-600 font-semibold">P2P Escrow Protection</span>, advanced 
            <span class="text-purple-600 font-semibold">KYC verification</span>, and lightning-fast transactions. 
            </p>

            <div class="pt-6 flex flex-col sm:flex-row gap-4">
            <?php if (!Security::isAuthenticated()): ?>
                <a href="register.php"
                class="bg-purple-600 hover:bg-purple-700 text-white px-8 py-3 rounded-xl font-medium text-base shadow-md transition-all transform hover:scale-105 flex items-center justify-center">
                <i class="fas fa-user-plus mr-2"></i> Start Trading Now
                </a>
                <a href="knowledge.php"
                class="border border-purple-600 text-purple-600 hover:bg-purple-50 px-8 py-3 rounded-xl font-medium text-base transition-all transform hover:scale-105 flex items-center justify-center">
                <i class="fas fa-book mr-2"></i> Learn More
                </a>
            <?php else: ?>
                <a href="trading.php"
                class="bg-purple-600 hover:bg-purple-700 text-white px-8 py-3 rounded-xl font-medium text-base shadow-md transition-all transform hover:scale-105 flex items-center justify-center">
                <i class="fas fa-exchange-alt mr-2"></i> Start Trading
                </a>
                <a href="dashboard.php"
                class="border border-purple-600 text-purple-600 hover:bg-purple-50 px-8 py-3 rounded-xl font-medium text-base transition-all transform hover:scale-105 flex items-center justify-center">
                <i class="fas fa-tachometer-alt mr-2"></i> Dashboard
                </a>
            <?php endif; ?>
            </div>
        </div>

        <!-- Right Section -->
        <div class="animate-fadeIn">
            <div class="bg-white/60 backdrop-blur-xl border border-white/40 rounded-2xl p-8 shadow-xl hover:shadow-purple-200/60 transition-all duration-500">
            <div class="flex items-center justify-between mb-6">
                <h3 class="text-xl sm:text-2xl font-semibold text-gray-800">
                <i class="fas fa-chart-line mr-2 text-purple-600"></i> Live Market Prices
                </h3>
                <div class="flex items-center animate-pulse-slow">
                <span class="bg-green-500 w-3 h-3 rounded-full mr-2"></span>
                <span class="text-sm text-gray-500">Live</span>
                </div>
            </div>

            <!-- Crypto List -->
            <div class="space-y-4">
                <?php foreach ($cryptocurrencies as $crypto): ?>
                <div
                    class="flex items-center justify-between p-4 bg-white/50 hover:bg-white/70 transition-all duration-200 rounded-xl group border border-gray-100 shadow-sm">
                    <div class="flex items-center">
                    <div
                        class="w-12 h-12 bg-gradient-to-br from-purple-500 to-indigo-500 rounded-full flex items-center justify-center text-white font-bold text-lg mr-4 shadow-md">
                        <?php echo substr($crypto['symbol'], 0, 1); ?>
                    </div>
                    <div>
                        <div class="font-semibold text-gray-900 text-base group-hover:text-purple-600 transition">
                        <?php echo $crypto['symbol']; ?>
                        </div>
                        <div class="text-sm text-gray-500">
                        <?php echo $crypto['name']; ?>
                        </div>
                    </div>
                    </div>

                    <div class="text-right">
                    <div class="text-lg sm:text-xl font-semibold text-purple-600" id="price-<?php echo $crypto['symbol']; ?>">
                        $<?php echo number_format($crypto['current_price'], 8); ?>
                    </div>
                    <div class="text-sm text-green-500 flex items-center justify-end">
                        <i class="fas fa-arrow-up mr-1"></i> +2.5%
                    </div>
                    </div>
                </div>
                <?php endforeach; ?>
            </div>
            </div>
        </div>

        </div>
    </div>
    </section>


    <!-- How It Works Section (with Device Preview) -->
    <section class="py-24 bg-white relative overflow-hidden">
        <div class="container mx-auto px-6 lg:px-12 flex flex-col lg:flex-row items-center gap-16">
            
            <!-- Left: Phone Mockup -->
            <div class="flex-1 flex justify-center">
            <img src="assets/images/background-ng-v4.webp" alt="Crypto Wallet App" class="max-w-xs md:max-w-sm lg:max-w-md drop-shadow-2xl">
            </div>

            <!-- Right: Steps -->
            <div class="flex-1 space-y-8">
            <h2 class="text-4xl font-extrabold text-gray-800 mb-6">
                Get started in <span class="text-transparent bg-clip-text bg-gradient-to-r from-purple-600 to-blue-600">4 easy steps</span>
            </h2>
            <p class="text-gray-600 text-lg leading-relaxed">
                Easily fund your cryptocurrency wallet and start trading securely with DDES-Exchange.
            </p>

            <ul class="space-y-6">
                <li class="flex items-start gap-4">
                <div class="w-10 h-10 flex items-center justify-center rounded-full bg-gradient-to-r from-blue-500 to-blue-600 text-white font-bold">1</div>
                <div>
                    <h4 class="font-bold text-gray-800">Sign Up & Verify your Account</h4>
                    <p class="text-gray-500">Create your account and complete KYC verification for secure trading with higher limits.</p>
                </div>
                </li>
                <li class="flex items-start gap-4">
                <div class="w-10 h-10 flex items-center justify-center rounded-full bg-gradient-to-r from-green-500 to-green-600 text-white font-bold">2</div>
                <div>
                    <h4 class="font-bold text-gray-800">Fund Your Wallet</h4>
                    <p class="text-gray-500">Add cryptocurrency to your secure wallet to start trading with our supported currencies.</p>
                </div>
                </li>
                <li class="flex items-start gap-4">
                <div class="w-10 h-10 flex items-center justify-center rounded-full bg-gradient-to-r from-purple-500 to-indigo-600 text-white font-bold">3</div>
                <div>
                    <h4 class="font-bold text-gray-800">Start Trading</h4>
                    <p class="text-gray-500">Browse available trades or create your own sell orders with competitive pricing. </p>
                </div>
                </li>
                <li class="flex items-start gap-4">
                <div class="w-10 h-10 flex items-center justify-center rounded-full bg-gradient-to-r from-orange-500 to-indigo-600 text-white font-bold">4</div>
                <div>
                    <h4 class="font-bold text-gray-800">Secure Exchange</h4>
                    <p class="text-gray-500">Complete trades safely with our escrow protection system and automated dispute resolution.</p>
                </div>
                </li>
            </ul>

            <a href="register.php" class="inline-block mt-8 bg-purple-600 hover:bg-purple-700 text-white px-8 py-4 rounded-xl font-semibold text-lg transition-all duration-300 shadow-lg hover:shadow-2xl">
                Get Started
            </a>
            </div>
        </div>
    </section>

    <!-- Features Section -->
    <!-- <section class="py-20 bg-gray-50">
        <div class="container mx-auto px-4">
            <div class="text-center mb-16">
                <h2 class="text-4xl font-bold text-gray-800 mb-4">Why Choose CryptoExchange Pro?</h2>
                <p class="text-xl text-gray-600 max-w-3xl mx-auto">
                    Experience the future of cryptocurrency trading with our advanced features and unmatched security
                </p>
            </div>
            
            <div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8">
                <div class="bg-white rounded-2xl p-8 shadow-xl hover:shadow-2xl transition-all duration-300 transform hover:-translate-y-2 card-hover">
                    <div class="w-16 h-16 bg-gradient-to-r from-blue-500 to-blue-600 rounded-2xl flex items-center justify-center mb-6">
                        <i class="fas fa-shield-alt text-2xl text-white"></i>
                    </div>
                    <h3 class="text-2xl font-bold text-gray-800 mb-4">Maximum Security</h3>
                    <p class="text-gray-600 leading-relaxed">
                        Advanced security measures including 2FA, cold storage, SSL encryption, 
                        and comprehensive KYC verification to protect your assets.
                    </p>
                </div>
                
                <div class="bg-white rounded-2xl p-8 shadow-xl hover:shadow-2xl transition-all duration-300 transform hover:-translate-y-2 card-hover">
                    <div class="w-16 h-16 bg-gradient-to-r from-green-500 to-green-600 rounded-2xl flex items-center justify-center mb-6">
                        <i class="fas fa-handshake text-2xl text-white"></i>
                    </div>
                    <h3 class="text-2xl font-bold text-gray-800 mb-4">P2P Trading</h3>
                    <p class="text-gray-600 leading-relaxed">
                        Trade directly with other users through our secure P2P platform 
                        with built-in escrow protection and automated dispute resolution.
                    </p>
                </div>
                
                <div class="bg-white rounded-2xl p-8 shadow-xl hover:shadow-2xl transition-all duration-300 transform hover:-translate-y-2 card-hover">
                    <div class="w-16 h-16 bg-gradient-to-r from-yellow-500 to-orange-500 rounded-2xl flex items-center justify-center mb-6">
                        <i class="fas fa-clock text-2xl text-white"></i>
                    </div>
                    <h3 class="text-2xl font-bold text-gray-800 mb-4">Real-time Trading</h3>
                    <p class="text-gray-600 leading-relaxed">
                        Live market data, instant order matching, automatic trade timeout protection, 
                        and real-time price updates for seamless trading experience.
                    </p>
                </div>
                
                <div class="bg-white rounded-2xl p-8 shadow-xl hover:shadow-2xl transition-all duration-300 transform hover:-translate-y-2 card-hover">
                    <div class="w-16 h-16 bg-gradient-to-r from-purple-500 to-purple-600 rounded-2xl flex items-center justify-center mb-6">
                        <i class="fas fa-id-card text-2xl text-white"></i>
                    </div>
                    <h3 class="text-2xl font-bold text-gray-800 mb-4">KYC Verification</h3>
                    <p class="text-gray-600 leading-relaxed">
                        International standard KYC verification with multiple levels, 
                        document verification, and progressive trading limits.
                    </p>
                </div>
                
                <div class="bg-white rounded-2xl p-8 shadow-xl hover:shadow-2xl transition-all duration-300 transform hover:-translate-y-2 card-hover">
                    <div class="w-16 h-16 bg-gradient-to-r from-red-500 to-red-600 rounded-2xl flex items-center justify-center mb-6">
                        <i class="fas fa-wallet text-2xl text-white"></i>
                    </div>
                    <h3 class="text-2xl font-bold text-gray-800 mb-4">Multi-Currency Wallet</h3>
                    <p class="text-gray-600 leading-relaxed">
                        Secure wallets for multiple cryptocurrencies with real-time balance tracking, 
                        transaction history, and portfolio management tools.
                    </p>
                </div>
                
                <div class="bg-white rounded-2xl p-8 shadow-xl hover:shadow-2xl transition-all duration-300 transform hover:-translate-y-2 card-hover">
                    <div class="w-16 h-16 bg-gradient-to-r from-indigo-500 to-indigo-600 rounded-2xl flex items-center justify-center mb-6">
                        <i class="fas fa-headset text-2xl text-white"></i>
                    </div>
                    <h3 class="text-2xl font-bold text-gray-800 mb-4">24/7 Support</h3>
                    <p class="text-gray-600 leading-relaxed">
                        Round-the-clock customer support, comprehensive knowledge base, 
                        and dedicated account managers for premium users.
                    </p>
                </div>
            </div>
        </div>
    </section> -->

    

<!-- Benefits Section -->
    <section class="py-24 bg-gradient-to-b from-purple-50 via-white to-purple-100">
    <div class="container mx-auto px-6 lg:px-12 flex flex-col-reverse lg:flex-row items-center gap-16">
        
        <!-- Left: Text -->
        <div class="flex-1">
        <h5 class="uppercase tracking-widest text-purple-600 font-semibold mb-3">Benefits</h5>
        <h2 class="text-4xl font-extrabold text-gray-800 mb-6">
            We make <span class="text-transparent bg-clip-text bg-gradient-to-r from-purple-600 to-blue-600">international transactions</span> easy
        </h2>
        <p class="text-gray-600 text-lg leading-relaxed mb-6">
            One wallet for crypto and fiat. Send, receive, and convert Bitcoin in one tap — 
            no verification stress or hidden fees.
        </p>
        <ul class="space-y-4 text-gray-700">
            <li class="flex items-center gap-3">
            <i class="fas fa-check-circle text-purple-500"></i> One-tap Bitcoin transactions
            </li>
            <li class="flex items-center gap-3">
            <i class="fas fa-check-circle text-purple-500"></i> Zero-hassle verification
            </li>
            <li class="flex items-center gap-3">
            <i class="fas fa-check-circle text-purple-500"></i> Cross-border fiat + crypto support
            </li>
        </ul>
        </div>

        <!-- Right: 3D Illustration -->
        <div class="flex-1 flex justify-center">
        <img src="assets/images/background-ng-v4.webp" alt="Crypto Wallet Illustration" class="max-w-md lg:max-w-lg drop-shadow-xl">
        </div>
    </div>
    </section>

<!-- Testimonials Section -->
    <!-- <section class="py-24 bg-white">
    <div class="container mx-auto px-6 lg:px-12 text-center">
        <h5 class="uppercase tracking-widest text-gray-500 mb-2">Testimonials</h5>
        <h2 class="text-4xl font-extrabold text-gray-800 mb-4">
        What our customers are saying
        </h2>

        <div class="flex justify-center gap-4 mb-8">
        <img src="img/appstore.svg" class="h-8" alt="App Store">
        <img src="img/googleplay.svg" class="h-8" alt="Google Play">
        </div>
        <p class="text-gray-600 mb-12">4.8/5 rating from over <strong>10,000+</strong> verified users</p>

        <div class="grid grid-cols-1 md:grid-cols-3 gap-10">
        <div class="bg-gray-50 p-8 rounded-2xl shadow-md hover:shadow-xl transition-all duration-300 text-left">
            <p class="text-gray-600 italic mb-6">
            “This is the best alternative for global payments. I can relocate and still use it seamlessly anywhere.”
            </p>
            <div class="flex items-center gap-4">
            <img src="img/user1.jpg" class="w-12 h-12 rounded-full object-cover">
            <div>
                <h4 class="font-bold text-gray-800">Dian Victor</h4>
                <p class="text-sm text-gray-500">Business Retailer</p>
            </div>
            </div>
        </div>

        <div class="bg-gray-50 p-8 rounded-2xl shadow-md hover:shadow-xl transition-all duration-300 text-left">
            <p class="text-gray-600 italic mb-6">
            “Been here for 4 years now. Withdrawal is fast and service is excellent. CryptoExchange Pro keeps improving.”
            </p>
            <div class="flex items-center gap-4">
            <img src="img/user2.jpg" class="w-12 h-12 rounded-full object-cover">
            <div>
                <h4 class="font-bold text-gray-800">Oladele Damilare</h4>
                <p class="text-sm text-gray-500">Public Worker</p>
            </div>
            </div>
        </div>

        <div class="bg-gray-50 p-8 rounded-2xl shadow-md hover:shadow-xl transition-all duration-300 text-left">
            <p class="text-gray-600 italic mb-6">
            “I recommend this app for anyone trading crypto. It's super reliable and withdrawals are instant.”
            </p>
            <div class="flex items-center gap-4">
            <img src="img/user3.jpg" class="w-12 h-12 rounded-full object-cover">
            <div>
                <h4 class="font-bold text-gray-800">Ajobade Femi</h4>
                <p class="text-sm text-gray-500">Student Trader</p>
            </div>
            </div>
        </div>
        </div>
    </div>
    </section> -->

    <!-- Why Choose Us Section -->
    <!-- <section class="py-24 bg-gradient-to-b from-gray-50 via-white to-gray-100 relative overflow-hidden">
        
        <div class="absolute inset-0 -z-10 opacity-10 bg-[radial-gradient(circle_at_top_left,_#60A5FA_0%,_transparent_50%),radial-gradient(circle_at_bottom_right,_#8B5CF6_0%,_transparent_50%)]"></div>

        <div class="container mx-auto px-6 lg:px-12">
           
            <div class="text-center mb-20">
                <h2 class="text-4xl font-extrabold text-gray-800 mb-6">
                    Why Choose <span class="text-transparent bg-clip-text bg-gradient-to-r from-purple-600 to-blue-600">DDES-Exchange </span> ?
                </h2>
                <p class="text-lg lg:text-xl text-gray-600 max-w-3xl mx-auto leading-relaxed">
                    Experience the next generation of cryptocurrency trading — where speed, security, and simplicity meet.
                </p>
            </div>

            
            <div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-10">
                
                <div class="group bg-white rounded-3xl p-8 shadow-lg hover:shadow-2xl transition-all duration-300 hover:-translate-y-3 border border-transparent hover:border-blue-500/20">
                    <div class="w-16 h-16 bg-gradient-to-r from-blue-500 to-blue-600 rounded-2xl flex items-center justify-center mb-6 shadow-lg group-hover:scale-110 transform transition">
                        <i class="fas fa-shield-alt text-2xl text-white"></i>
                    </div>
                    <h3 class="text-2xl font-bold text-gray-800 mb-3">Maximum Security</h3>
                    <p class="text-gray-600 leading-relaxed">
                        Bank-grade encryption, 2FA, cold storage, and AI threat monitoring keep your assets safe 24/7.
                    </p>
                </div>

                
                <div class="group bg-white rounded-3xl p-8 shadow-lg hover:shadow-2xl transition-all duration-300 hover:-translate-y-3 border border-transparent hover:border-green-500/20">
                    <div class="w-16 h-16 bg-gradient-to-r from-green-500 to-green-600 rounded-2xl flex items-center justify-center mb-6 shadow-lg group-hover:scale-110 transform transition">
                        <i class="fas fa-handshake text-2xl text-white"></i>
                    </div>
                    <h3 class="text-2xl font-bold text-gray-800 mb-3">P2P Trading</h3>
                    <p class="text-gray-600 leading-relaxed">
                        Trade directly with others through a secure P2P system featuring built-in escrow and dispute resolution.
                    </p>
                </div>

               
                <div class="group bg-white rounded-3xl p-8 shadow-lg hover:shadow-2xl transition-all duration-300 hover:-translate-y-3 border border-transparent hover:border-yellow-500/20">
                    <div class="w-16 h-16 bg-gradient-to-r from-yellow-500 to-orange-500 rounded-2xl flex items-center justify-center mb-6 shadow-lg group-hover:scale-110 transform transition">
                        <i class="fas fa-clock text-2xl text-white"></i>
                    </div>
                    <h3 class="text-2xl font-bold text-gray-800 mb-3">Real-Time Trading</h3>
                    <p class="text-gray-600 leading-relaxed">
                        Instant order matching, live price feeds, and automatic protection ensure seamless trading.
                    </p>
                </div>

               
                <div class="group bg-white rounded-3xl p-8 shadow-lg hover:shadow-2xl transition-all duration-300 hover:-translate-y-3 border border-transparent hover:border-purple-500/20">
                    <div class="w-16 h-16 bg-gradient-to-r from-purple-500 to-purple-600 rounded-2xl flex items-center justify-center mb-6 shadow-lg group-hover:scale-110 transform transition">
                        <i class="fas fa-id-card text-2xl text-white"></i>
                    </div>
                    <h3 class="text-2xl font-bold text-gray-800 mb-3">KYC Verification</h3>
                    <p class="text-gray-600 leading-relaxed">
                        Multi-level verification ensures compliance while maintaining quick account activation.
                    </p>
                </div>

                
                <div class="group bg-white rounded-3xl p-8 shadow-lg hover:shadow-2xl transition-all duration-300 hover:-translate-y-3 border border-transparent hover:border-red-500/20">
                    <div class="w-16 h-16 bg-gradient-to-r from-red-500 to-red-600 rounded-2xl flex items-center justify-center mb-6 shadow-lg group-hover:scale-110 transform transition">
                        <i class="fas fa-wallet text-2xl text-white"></i>
                    </div>
                    <h3 class="text-2xl font-bold text-gray-800 mb-3">Multi-Currency Wallet</h3>
                    <p class="text-gray-600 leading-relaxed">
                        Manage all your crypto assets from one intuitive dashboard — secure, fast, and transparent.
                    </p>
                </div>

                
                <div class="group bg-white rounded-3xl p-8 shadow-lg hover:shadow-2xl transition-all duration-300 hover:-translate-y-3 border border-transparent hover:border-indigo-500/20">
                    <div class="w-16 h-16 bg-gradient-to-r from-indigo-500 to-indigo-600 rounded-2xl flex items-center justify-center mb-6 shadow-lg group-hover:scale-110 transform transition">
                        <i class="fas fa-headset text-2xl text-white"></i>
                    </div>
                    <h3 class="text-2xl font-bold text-gray-800 mb-3">24/7 Support</h3>
                    <p class="text-gray-600 leading-relaxed">
                        Our expert support team is always online — ready to assist with trades, wallets, and accounts.
                    </p>
                </div>
            </div>
        </div>
    </section> -->


    <!-- Statistics Section -->
    <section class="py-20 bg-gradient-to-r from-blue-600 to-purple-600 text-white">
        <div class="container mx-auto px-4">
            <div class="grid grid-cols-2 md:grid-cols-4 gap-8 text-center">
                <div class="animate-fadeInUp">
                    <div class="text-5xl font-bold mb-2">8+</div>
                    <p class="text-blue-200">Cryptocurrencies</p>
                </div>
                <div class="animate-fadeInUp">
                    <div class="text-5xl font-bold mb-2">24/7</div>
                    <p class="text-blue-200">Customer Support</p>
                </div>
                <div class="animate-fadeInUp">
                    <div class="text-5xl font-bold mb-2">99.9%</div>
                    <p class="text-blue-200">Uptime</p>
                </div>
                <div class="animate-fadeInUp">
                    <div class="text-5xl font-bold mb-2">SSL</div>
                    <p class="text-blue-200">Encrypted</p>
                </div>
            </div>
        </div>
    </section>
    

    <!-- CTA Section -->
    <!-- <section class="py-20 bg-gradient-to-r from-gray-900 to-gray-800 text-white">
        <div class="container mx-auto px-4 text-center">
            <h2 class="text-4xl font-bold mb-6">Ready to Start Trading?</h2>
            <p class="text-xl text-gray-300 mb-8 max-w-2xl mx-auto">
                Join thousands of traders who trust CryptoExchange Pro for secure, 
                reliable cryptocurrency trading with escrow protection.
            </p>
            <?php if (!Security::isAuthenticated()): ?>
            <div class="flex flex-col sm:flex-row gap-4 justify-center">
                <a href="register.php" class="bg-blue-600 hover:bg-blue-700 text-white px-8 py-4 rounded-lg font-bold text-lg transition-all duration-300 transform hover:scale-105 shadow-lg">
                    <i class="fas fa-user-plus mr-2"></i>Create Free Account
                </a>
                <a href="knowledge.php" class="border-2 border-gray-400 text-gray-300 hover:bg-gray-700 hover:text-white px-8 py-4 rounded-lg font-bold text-lg transition-all duration-300">
                    <i class="fas fa-book mr-2"></i>Learn More
                </a>
            </div>
            <?php else: ?>
            <a href="trading.php" class="bg-blue-600 hover:bg-blue-700 text-white px-8 py-4 rounded-lg font-bold text-lg transition-all duration-300 transform hover:scale-105 shadow-lg inline-block">
                <i class="fas fa-exchange-alt mr-2"></i>Start Trading Now
            </a>
            <?php endif; ?>
        </div>
    </section> -->
    <!-- CTA Section -->
    <section class="bg-purple-50 py-16">
    <div class="container mx-auto px-6 lg:px-12">
        <div class="relative bg-white/50 backdrop-blur-xl rounded-3xl overflow-hidden shadow-md flex flex-col lg:flex-row items-center justify-between p-10 lg:p-16">

        <!-- Left Text Content -->
        <div class="flex-1 text-center lg:text-left space-y-6">
            <h2 class="text-3xl lg:text-4xl font-extrabold text-gray-900 leading-snug">
            Join the most trusted exchange with
            <span class="text-purple-600">6M+ Nigerian active users!</span>
            </h2>
            <p class="text-gray-600 text-lg max-w-md mx-auto lg:mx-0">
            Experience the fastest crypto transactions and unbeatable local support for Nigerian traders.
            </p>

            <?php if (!Security::isAuthenticated()): ?>
            <a href="register.php"
            class="inline-block bg-purple-600 hover:bg-purple-700 text-white font-semibold px-8 py-4 rounded-xl shadow-lg transition-all duration-300 transform hover:scale-105">
            Sign up now
            </a>
            <?php else: ?>
            <a href="trading.php"
            class="inline-block bg-purple-600 hover:bg-purple-700 text-white font-semibold px-8 py-4 rounded-xl shadow-lg transition-all duration-300 transform hover:scale-105">
            Go to Dashboard
            </a>
            <?php endif; ?>
        </div>

        <!-- Right Image with Flag and Coins -->
        <div class="flex-1 relative mt-12 lg:mt-0 flex justify-center">
            <img src="assets/images/happy-user.png" alt="Happy User" class="max-w-xs md:max-w-sm lg:max-w-md relative z-10">

            <!-- Nigerian Flag -->
            <img src="assets/images/nigerian-flag.webp" alt="Nigerian Flag"
                class="absolute top-0 right-8 w-24 md:w-32 lg:w-40 opacity-90 z-0 animate-wave">

            <!-- Floating Coin Icons -->
            <div class="absolute top-10 right-20 w-10 h-10 bg-yellow-400 text-white rounded-full flex items-center justify-center font-bold shadow-lg animate-bounce">
            ₿
            </div>
            <div class="absolute bottom-10 right-12 w-10 h-10 bg-teal-500 text-white rounded-full flex items-center justify-center font-bold shadow-lg animate-pulse">
            ₦
            </div>
        </div>

        </div>
    </div>
    </section>

    <!-- Optional small animation -->
    <style>
    @keyframes wave {
    0%, 100% { transform: rotate(0deg); }
    50% { transform: rotate(2deg); }
    }
    .animate-wave {
    animation: wave 3s ease-in-out infinite;
    }
    </style>

</main>

<!-- Live Chat Widget -->
<div id="liveChatWidget" class="fixed bottom-6 right-6 z-50">
    <button onclick="toggleChat()" class="bg-blue-600 hover:bg-blue-700 text-white w-16 h-16 rounded-full shadow-lg flex items-center justify-center transition-all duration-300 transform hover:scale-110">
        <i class="fas fa-comments text-xl"></i>
    </button>
</div>

<script>
function toggleChat() {
    alert('Live chat feature coming soon! For now, please contact us through our support center.');
}

// Add scroll animations
window.addEventListener('scroll', () => {
    const elements = document.querySelectorAll('.animate-fadeInUp');
    elements.forEach(element => {
        const elementTop = element.getBoundingClientRect().top;
        const elementVisible = 150;
        
        if (elementTop < window.innerHeight - elementVisible) {
            element.classList.add('opacity-100');
            element.classList.remove('opacity-0');
        }
    });
});

// Initialize animations
document.addEventListener('DOMContentLoaded', () => {
    const elements = document.querySelectorAll('.animate-fadeInUp');
    elements.forEach(element => {
        element.classList.add('opacity-0', 'transform', 'translate-y-8', 'transition-all', 'duration-1000');
    });
});
</script>

<?php include 'includes/footer.php'; ?>