<?php

// Start session securely

// Redirect authenticated users
// Get page name safely


// Generate CSRF token for form submissions
?>

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>LoanApprovalPredction</title>
    <link rel="icon" href="images/Approval.png" type="image/png">
    <link rel="stylesheet" href="CSS/style.css">
    <script src="https://cdn.tailwindcss.com"></script>
    <style>
        /* Custom animations */
        .fade-in {
            animation: fadeIn 1s ease-in-out;
        }
        @keyframes fadeIn {
            from { opacity: 0; transform: translateY(20px); }
            to { opacity: 1; transform: translateY(0); }
        }
        .hero-bg {
            background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('images/society.jpg');
            background-size: cover;
            background-position: center;
        }
        .btn-primary {
            transition: background-color 0.3s ease, transform 0.2s ease;
        }
        .btn-primary:hover {
            background-color: #1e40af;
            transform: translateY(-2px);
        }
    </style>
</head>
<body class="bg-gray-100 min-h-screen flex flex-col font-sans">
    <!-- Header and Navbar -->
    <header class="bg-gradient-to-r from-blue-600 to-indigo-600 text-white shadow-lg">
        <nav class="container mx-auto px-4 py-4 flex justify-between items-center">
            <div class="flex items-center">
                <img src="images/Approval.png" alt="LoanApprovalPredction Logo" class="h-20 mr-2">
            </div>
            <div class="space-x-4">
                <a href="/LoanApprovalPredction/login.php" class="btn-primary px-4 py-2 bg-blue-600 text-white rounded-lg hover:bg-blue-700">Login</a>
                <a href="/LoanApprovalPredction/register.php" class="btn-primary px-4 py-2 bg-white text-blue-600 rounded-lg hover:bg-gray-100 border border-blue-600">Register</a>
            </div>
        </nav>
    </header>

    <!-- Hero Section -->
    <section class="hero-bg text-white py-20 text-center">
        <div class="container mx-auto px-4 fade-in">
            <h2 class="text-4xl md:text-5xl font-bold mb-4">Welcome to LoanApprovalPredction</h2>
            <p class="text-lg md:text-xl mb-8 max-w-2xl mx-auto">Join our platform to get approved! LoanApprovalPrediction is dedicated to improving your loan process through smart technology and speed..</p>
            <div class="space-x-4">
                <a href="/LoanApprovalPredction/login.php" class="btn-primary inline-block px-6 py-3 bg-blue-600 text-white rounded-lg text-lg">Sign In</a>
                <a href="/LoanApprovalPredction/register.php" class="btn-primary inline-block px-6 py-3 bg-white text-blue-600 rounded-lg text-lg border border-blue-600">Join Now</a>
            </div>
        </div>
    </section>

    <!-- About Section -->
    <section class="py-12 bg-white">
        <div class="container mx-auto px-4 text-center">
            <h3 class="text-3xl font-bold text-gray-800 mb-6 fade-in">About LoanApprovalPredction</h3>
            <p class="text-gray-600 max-w-3xl mx-auto mb-8">LoanApprovalPrediction is a data-driven system focused on enhancing the efficiency and security of our lending process. From streamlining application reviews to ensuring consistent decision-making, we bring clarity and reliability to financial access.</p>
            <a href="#learn-more" class="text-blue-600 hover:underline">Learn More</a>
        </div>
    </section>

    <!-- Call to Action Section -->
    <section class="py-12 bg-gray-50 text-center">
        <div class="container mx-auto px-4 fade-in">
            <h3 class="text-2xl font-bold text-gray-800 mb-4">Get Involved Today!</h3>
            <p class="text-gray-600 mb-6">Sign up or log in to start</p>
            <div class="space-x-4">
                <a href="/LoanApprovalPredction/login.php" class="btn-primary inline-block px-6 py-3 bg-blue-600 text-white rounded-lg">Login</a>
                <a href="/LoanApprovalPredction/register.php" class="btn-primary inline-block px-6 py-3 bg-white text-blue-600 rounded-lg border border-blue-600">Register</a>
            </div>
        </div>
    </section>

    <!-- Footer -->
    <footer class="bg-gray-800 text-white text-center p-6">
        <p>© <?php echo date('Y'); ?> LoanApprovalPredction. All rights reserved.</p>
        <div class="mt-2">
            <a href="#privacy" class="text-gray-300 hover:text-white mx-2">Privacy Policy</a>
            <a href="#terms" class="text-gray-300 hover:text-white mx-2">Terms of Service</a>
            <a href="#contact" class="text-gray-300 hover:text-white mx-2">Contact Us</a>
        </div>
    </footer>
</body>
</html>