<?php 
// Include DB mainly to prevent header errors if it checks for connection
// We use include_once to avoid errors if this page is triggered weirdly
include_once 'db_connect.php'; 
?>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Page Not Found | Aastha Padghan Hospital</title>
    <script src="https://cdn.tailwindcss.com"></script>
    <link href="https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;700&display=swap" rel="stylesheet">
    <style>body { font-family: 'Poppins', sans-serif; }</style>
</head>
<body class="bg-gray-50 text-gray-800 flex flex-col min-h-screen">

    <?php 
    if(file_exists('includes/header.php')) {
        include 'includes/header.php'; 
    } 
    ?>

    <div class="flex-grow flex items-center justify-center p-6">
        <div class="text-center max-w-lg mx-auto">
            <div class="text-9xl font-bold text-teal-100 mb-4">404</div>
            <h1 class="text-3xl font-bold text-teal-800 mb-4">Oops! Page Not Found</h1>
            <p class="text-gray-600 mb-8">
                The page you are looking for might have been removed, had its name changed, or is temporarily unavailable.
            </p>
            <a href="/index.php" class="bg-teal-600 text-white px-8 py-3 rounded-full font-bold hover:bg-teal-700 transition shadow-lg inline-flex items-center gap-2">
                <svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6"></path></svg>
                Return to Homepage
            </a>
        </div>
    </div>

    <?php 
    if(file_exists('includes/footer.php')) {
        include 'includes/footer.php'; 
    } 
    ?>

</body>
</html>