#!/bin/bash
cd /app/multipage-build

# Create FAQs page
cat > faqs.html << 'EOF'
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>FAQs - Uni Flow Grants</title>
    <script src="https://cdn.tailwindcss.com"></script>
    <style>
        body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif; }
        .active-link { color: #0EA5B8; }
    </style>
</head>
<body class="min-h-screen flex flex-col">
    <header class="bg-white shadow-sm sticky top-0 z-50">
        <div class="container mx-auto px-4 py-4">
            <div class="flex items-center justify-between">
                <a href="index.html" class="flex items-center">
                    <div class="w-12 h-12 bg-cyan-500 rounded-full flex items-center justify-center">
                        <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 40 40" class="w-8 h-8">
                            <circle cx="20" cy="20" r="18" fill="white" />
                            <path d="M20 8 L28 24 L20 20 L12 24 Z" fill="#0EA5B8" />
                            <ellipse cx="20" cy="26" rx="8" ry="2" fill="#0EA5B8" />
                        </svg>
                    </div>
                    <span class="ml-2 text-sm font-semibold text-gray-700">Uni Flow Grants</span>
                </a>
                <nav class="hidden lg:flex space-x-8">
                    <a href="index.html" class="text-sm font-medium text-gray-700 hover:text-cyan-500">Home</a>
                    <a href="about.html" class="text-sm font-medium text-gray-700 hover:text-cyan-500">About</a>
                    <a href="how-it-works.html" class="text-sm font-medium text-gray-700 hover:text-cyan-500">How It Works</a>
                    <a href="faqs.html" class="active-link text-sm font-medium">Browse FAQs</a>
                    <a href="testimonials.html" class="text-sm font-medium text-gray-700 hover:text-cyan-500">Testimonials</a>
                    <a href="check-eligibility.html" class="text-sm font-medium text-gray-700 hover:text-cyan-500">Check Eligibility</a>
                    <a href="contact-support.html" class="text-sm font-medium text-gray-700 hover:text-cyan-500">Contact Support</a>
                    <a href="verification.html" class="text-sm font-medium text-gray-700 hover:text-cyan-500">Verification</a>
                    <a href="login.html" class="bg-cyan-500 hover:bg-cyan-600 text-white px-4 py-2 text-sm rounded-lg">Sign In</a>
                </nav>
            </div>
        </div>
    </header>
    <main class="flex-grow">
        <section class="py-20">
            <div class="container mx-auto px-4">
                <div class="max-w-4xl mx-auto">
                    <h1 class="text-4xl md:text-5xl font-bold mb-4 text-center text-gray-900">Frequently Asked Questions</h1>
                    <p class="text-lg text-gray-600 mb-12 text-center">Find answers to common questions about Uni Flow Grants</p>
                    
                    <div class="space-y-4">
                        <details class="border border-gray-200 rounded-lg p-6">
                            <summary class="font-semibold text-gray-900 cursor-pointer">Who is eligible for Uni Flow Grants?</summary>
                            <p class="mt-4 text-gray-700">Individuals, families, community organizations, and small to medium enterprises (SMEs) affected by COVID-19, Omicron, conflicts (such as Ukraine and Gaza), economic instability, and recessions are eligible to apply for matching grants ranging from $5,000 to $1 million.</p>
                        </details>
                        
                        <details class="border border-gray-200 rounded-lg p-6">
                            <summary class="font-semibold text-gray-900 cursor-pointer">How long does it take to receive funds?</summary>
                            <p class="mt-4 text-gray-700">Once your application is approved, funds are disbursed within 3 to 24 hours. Our fast-track verification system ensures rapid processing for qualified applicants.</p>
                        </details>
                        
                        <details class="border border-gray-200 rounded-lg p-6">
                            <summary class="font-semibold text-gray-900 cursor-pointer">What documents do I need to submit?</summary>
                            <p class="mt-4 text-gray-700">You will need to upload a valid government-issued ID, Social Security Number (SSN) or equivalent, and photos or documentation of your project or hardship circumstances.</p>
                        </details>
                        
                        <details class="border border-gray-200 rounded-lg p-6">
                            <summary class="font-semibold text-gray-900 cursor-pointer">Is there an application fee?</summary>
                            <p class="mt-4 text-gray-700">No, there is absolutely no application fee. Uni Flow Grants is a UN-backed program designed to provide free emergency relief funding to those in need.</p>
                        </details>
                    </div>
                </div>
            </div>
        </section>
    </main>
    <footer class="bg-gray-50 border-t border-gray-200">
        <div class="container mx-auto px-4 py-8">
            <div class="flex flex-wrap justify-center gap-6 mb-6">
                <a href="index.html" class="text-sm text-gray-600 hover:text-cyan-500">Home</a>
                <a href="about.html" class="text-sm text-gray-600 hover:text-cyan-500">About</a>
                <a href="how-it-works.html" class="text-sm text-gray-600 hover:text-cyan-500">How It Works</a>
                <a href="faqs.html" class="text-sm text-gray-600 hover:text-cyan-500">Browse FAQs</a>
                <a href="testimonials.html" class="text-sm text-gray-600 hover:text-cyan-500">Testimonials</a>
                <a href="check-eligibility.html" class="text-sm text-gray-600 hover:text-cyan-500">Check Eligibility</a>
                <a href="contact-support.html" class="text-sm text-gray-600 hover:text-cyan-500">Contact Support</a>
                <a href="verification.html" class="text-sm text-gray-600 hover:text-cyan-500">Verification</a>
            </div>
            <div class="text-center text-sm text-gray-500">© 2025 Uni Flow Grants. All Rights Reserved.</div>
        </div>
    </footer>
</body>
</html>
EOF

# Create Testimonials page
cat > testimonials.html << 'EOF'
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Testimonials - Uni Flow Grants</title>
    <script src="https://cdn.tailwindcss.com"></script>
    <style>
        body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif; }
        .active-link { color: #0EA5B8; }
    </style>
</head>
<body class="min-h-screen flex flex-col">
    <header class="bg-white shadow-sm sticky top-0 z-50">
        <div class="container mx-auto px-4 py-4">
            <div class="flex items-center justify-between">
                <a href="index.html" class="flex items-center">
                    <div class="w-12 h-12 bg-cyan-500 rounded-full flex items-center justify-center">
                        <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 40 40" class="w-8 h-8">
                            <circle cx="20" cy="20" r="18" fill="white" />
                            <path d="M20 8 L28 24 L20 20 L12 24 Z" fill="#0EA5B8" />
                            <ellipse cx="20" cy="26" rx="8" ry="2" fill="#0EA5B8" />
                        </svg>
                    </div>
                    <span class="ml-2 text-sm font-semibold text-gray-700">Uni Flow Grants</span>
                </a>
                <nav class="hidden lg:flex space-x-8">
                    <a href="index.html" class="text-sm font-medium text-gray-700 hover:text-cyan-500">Home</a>
                    <a href="about.html" class="text-sm font-medium text-gray-700 hover:text-cyan-500">About</a>
                    <a href="how-it-works.html" class="text-sm font-medium text-gray-700 hover:text-cyan-500">How It Works</a>
                    <a href="faqs.html" class="text-sm font-medium text-gray-700 hover:text-cyan-500">Browse FAQs</a>
                    <a href="testimonials.html" class="active-link text-sm font-medium">Testimonials</a>
                    <a href="check-eligibility.html" class="text-sm font-medium text-gray-700 hover:text-cyan-500">Check Eligibility</a>
                    <a href="contact-support.html" class="text-sm font-medium text-gray-700 hover:text-cyan-500">Contact Support</a>
                    <a href="verification.html" class="text-sm font-medium text-gray-700 hover:text-cyan-500">Verification</a>
                    <a href="login.html" class="bg-cyan-500 hover:bg-cyan-600 text-white px-4 py-2 text-sm rounded-lg">Sign In</a>
                </nav>
            </div>
        </div>
    </header>
    <main class="flex-grow">
        <section class="py-20">
            <div class="container mx-auto px-4">
                <div class="max-w-6xl mx-auto">
                    <h1 class="text-4xl md:text-5xl font-bold mb-4 text-center text-gray-900">Success Stories</h1>
                    <p class="text-lg text-gray-600 mb-16 text-center max-w-3xl mx-auto">Read how Uni Flow Grants has helped individuals, families, and organizations worldwide overcome financial hardships</p>
                    
                    <div class="grid md:grid-cols-2 gap-8">
                        <div class="bg-white border border-gray-200 rounded-lg p-8 shadow-sm">
                            <div class="flex gap-1 mb-4">
                                <span class="text-yellow-400">★★★★★</span>
                            </div>
                            <p class="text-gray-700 mb-6 leading-relaxed italic">"The Uni Flow Grant saved my family's small restaurant during the pandemic. We received funds within 18 hours and were able to keep our employees. The process was straightforward and professional."</p>
                            <div class="border-t border-gray-200 pt-4">
                                <p class="font-bold text-gray-900">Maria Rodriguez</p>
                                <p class="text-sm text-gray-600">Madrid, Spain</p>
                                <p class="text-sm text-cyan-600 font-semibold mt-1">Grant Received: $15,000</p>
                            </div>
                        </div>

                        <div class="bg-white border border-gray-200 rounded-lg p-8 shadow-sm">
                            <div class="flex gap-1 mb-4">
                                <span class="text-yellow-400">★★★★★</span>
                            </div>
                            <p class="text-gray-700 mb-6 leading-relaxed italic">"I lost my job due to economic downturn and was struggling to pay rent. The verification process was quick, and I received my grant in less than a day. This program is a lifesaver."</p>
                            <div class="border-t border-gray-200 pt-4">
                                <p class="font-bold text-gray-900">James Peterson</p>
                                <p class="text-sm text-gray-600">Detroit, USA</p>
                                <p class="text-sm text-cyan-600 font-semibold mt-1">Grant Received: $8,500</p>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </section>
    </main>
    <footer class="bg-gray-50 border-t border-gray-200">
        <div class="container mx-auto px-4 py-8">
            <div class="flex flex-wrap justify-center gap-6 mb-6">
                <a href="index.html" class="text-sm text-gray-600 hover:text-cyan-500">Home</a>
                <a href="about.html" class="text-sm text-gray-600 hover:text-cyan-500">About</a>
                <a href="how-it-works.html" class="text-sm text-gray-600 hover:text-cyan-500">How It Works</a>
                <a href="faqs.html" class="text-sm text-gray-600 hover:text-cyan-500">Browse FAQs</a>
                <a href="testimonials.html" class="text-sm text-gray-600 hover:text-cyan-500">Testimonials</a>
                <a href="check-eligibility.html" class="text-sm text-gray-600 hover:text-cyan-500">Check Eligibility</a>
                <a href="contact-support.html" class="text-sm text-gray-600 hover:text-cyan-500">Contact Support</a>
                <a href="verification.html" class="text-sm text-gray-600 hover:text-cyan-500">Verification</a>
            </div>
            <div class="text-center text-sm text-gray-500">© 2025 Uni Flow Grants. All Rights Reserved.</div>
        </div>
    </footer>
</body>
</html>
EOF

# Create login page
cat > login.html << 'EOF'
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Login - Uni Flow Grants</title>
    <script src="https://cdn.tailwindcss.com"></script>
</head>
<body class="min-h-screen bg-gray-50 flex items-center justify-center py-12 px-4">
    <div class="max-w-md w-full">
        <div class="bg-white rounded-lg shadow-md p-8">
            <div class="text-center mb-8">
                <h1 class="text-3xl font-bold text-gray-900 mb-2">Welcome Back</h1>
                <p class="text-gray-600">Sign in to your Uni Flow Grants account</p>
            </div>
            <form action="dashboard.html" method="get">
                <div class="space-y-6">
                    <div>
                        <label for="email" class="block text-sm font-medium text-gray-700 mb-1">Email Address</label>
                        <input type="email" id="email" required class="w-full px-4 py-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-cyan-500 focus:border-transparent" placeholder="your.email@example.com">
                    </div>
                    <div>
                        <label for="password" class="block text-sm font-medium text-gray-700 mb-1">Password</label>
                        <input type="password" id="password" required class="w-full px-4 py-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-cyan-500 focus:border-transparent" placeholder="Enter your password">
                    </div>
                    <button type="submit" class="w-full bg-cyan-500 hover:bg-cyan-600 text-white py-3 text-lg font-semibold rounded-lg">Sign In</button>
                </div>
            </form>
            <div class="mt-6 text-center">
                <a href="index.html" class="text-sm text-cyan-500 hover:text-cyan-600">Back to Home</a>
            </div>
        </div>
    </div>
</body>
</html>
EOF

# Create signup page (hidden)
cat > signup.html << 'EOF'
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Sign Up - Uni Flow Grants</title>
    <script src="https://cdn.tailwindcss.com"></script>
</head>
<body class="min-h-screen bg-gray-50 flex items-center justify-center py-12 px-4">
    <div class="max-w-md w-full">
        <div class="bg-white rounded-lg shadow-md p-8">
            <div class="text-center mb-8">
                <h1 class="text-3xl font-bold text-gray-900 mb-2">Create Account</h1>
                <p class="text-gray-600">Join Uni Flow Grants today</p>
            </div>
            <form action="dashboard.html" method="get">
                <div class="space-y-6">
                    <div>
                        <label for="fullname" class="block text-sm font-medium text-gray-700 mb-1">Full Name</label>
                        <input type="text" id="fullname" required class="w-full px-4 py-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-cyan-500">
                    </div>
                    <div>
                        <label for="email" class="block text-sm font-medium text-gray-700 mb-1">Email Address</label>
                        <input type="email" id="email" required class="w-full px-4 py-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-cyan-500">
                    </div>
                    <div>
                        <label for="password" class="block text-sm font-medium text-gray-700 mb-1">Password</label>
                        <input type="password" id="password" required class="w-full px-4 py-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-cyan-500">
                    </div>
                    <button type="submit" class="w-full bg-cyan-500 hover:bg-cyan-600 text-white py-3 text-lg font-semibold rounded-lg">Sign Up</button>
                </div>
            </form>
            <div class="mt-6 text-center">
                <a href="login.html" class="text-sm text-cyan-500 hover:text-cyan-600">Already have an account? Sign in</a>
            </div>
        </div>
    </div>
</body>
</html>
EOF

# Create dashboard page
cat > dashboard.html << 'EOF'
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Dashboard - Uni Flow Grants</title>
    <script src="https://cdn.tailwindcss.com"></script>
</head>
<body class="min-h-screen bg-gray-50">
    <div class="container mx-auto px-4 py-12">
        <div class="max-w-6xl mx-auto">
            <div class="flex justify-between items-center mb-8">
                <div>
                    <h1 class="text-3xl font-bold text-gray-900 mb-2">Welcome, User!</h1>
                    <p class="text-gray-600">user@example.com</p>
                </div>
                <a href="index.html" class="bg-cyan-500 hover:bg-cyan-600 text-white px-6 py-2 rounded-lg">Logout</a>
            </div>
            
            <div class="grid md:grid-cols-3 gap-6 mb-8">
                <div class="bg-white rounded-lg shadow-md p-6 border-t-4 border-cyan-500">
                    <p class="text-sm text-gray-600 mb-1">Account Status</p>
                    <p class="text-2xl font-bold text-gray-900">Active</p>
                </div>
                <div class="bg-white rounded-lg shadow-md p-6 border-t-4 border-blue-500">
                    <p class="text-sm text-gray-600 mb-1">Applications</p>
                    <p class="text-2xl font-bold text-gray-900">0</p>
                </div>
                <div class="bg-white rounded-lg shadow-md p-6 border-t-4 border-green-500">
                    <p class="text-sm text-gray-600 mb-1">Approved Grants</p>
                    <p class="text-2xl font-bold text-gray-900">$0</p>
                </div>
            </div>
            
            <div class="bg-white rounded-lg shadow-md p-8">
                <h2 class="text-2xl font-bold text-gray-900 mb-6">Quick Actions</h2>
                <div class="grid md:grid-cols-2 gap-4">
                    <a href="check-eligibility.html" class="bg-cyan-500 hover:bg-cyan-600 text-white text-center py-6 text-lg font-semibold rounded-lg">Check Eligibility</a>
                    <a href="contact-support.html" class="border-2 border-cyan-500 text-cyan-600 hover:bg-cyan-50 text-center py-6 text-lg font-semibold rounded-lg">Contact Support</a>
                </div>
            </div>
        </div>
    </div>
</body>
</html>
EOF

# Create .htaccess
cat > .htaccess << 'EOF'
# Simple .htaccess for multi-page static website
# Enable error documents
ErrorDocument 404 /index.html

# Prevent directory browsing
Options -Indexes

# Set default charset
AddDefaultCharset UTF-8

# Cache static assets
<IfModule mod_expires.c>
  ExpiresActive On
  ExpiresByType text/html "access plus 0 seconds"
  ExpiresByType text/css "access plus 1 month"
  ExpiresByType text/javascript "access plus 1 month"
  ExpiresByType application/javascript "access plus 1 month"
</IfModule>

# Compress text files
<IfModule mod_deflate.c>
  AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css text/javascript application/javascript
</IfModule>
EOF

echo "All pages created successfully!"
ls -lh
