import Link from "next/link"
import type { Metadata } from "next"

export const metadata: Metadata = {
  title: "Privacy Policy — AutoJobs",
  description: "AutoJobs privacy policy. Learn how we collect, use, and protect your personal data in compliance with GDPR and global privacy regulations.",
}

export default function PrivacyPage() {
  return (
    <div className="min-h-screen bg-slate-900">
      <nav className="flex justify-between items-center px-6 py-5 max-w-4xl mx-auto">
        <Link href="/autojobs" className="text-2xl font-bold text-white">
          Auto<span className="text-blue-400">Jobs</span>
        </Link>
        <Link href="/autojobs" className="text-slate-400 hover:text-white transition text-sm">
          ← Back to Home
        </Link>
      </nav>
      
      <main className="max-w-3xl mx-auto px-6 py-12 text-slate-300 leading-relaxed">
        <h1 className="text-3xl font-bold text-white mb-8">Privacy Policy</h1>
        <p className="text-sm text-slate-500 mb-8">Last updated: April 13, 2026</p>
        
        <div className="space-y-8">
          <section>
            <h2 className="text-xl font-semibold text-white mb-3">1. Information We Collect</h2>
            <p>We collect information you provide directly: name, email address, resume content, LinkedIn profile data (when you connect via OAuth), job preferences, and payment information (processed securely via Stripe). We also collect usage data including job applications made, AI customizations used, and API calls.</p>
          </section>
          
          <section>
            <h2 className="text-xl font-semibold text-white mb-3">2. How We Use Your Data</h2>
            <ul className="list-disc pl-6 space-y-2">
              <li>Provide AI-powered job application services</li>
              <li>Customize your resume and generate cover letters</li>
              <li>Track your job application history</li>
              <li>Process payments via Stripe</li>
              <li>Send service-related notifications</li>
              <li>Improve our services</li>
            </ul>
          </section>
          
          <section>
            <h2 className="text-xl font-semibold text-white mb-3">3. Data Retention</h2>
            <p>We retain your data for the duration of your subscription plus 30 days after cancellation. Financial records are retained for 7 years per tax regulations. You may request deletion at any time — we process within 30 days.</p>
          </section>
          
          <section>
            <h2 className="text-xl font-semibold text-white mb-3">4. Your Rights (GDPR)</h2>
            <p>Under GDPR, you have the right to: <strong className="text-white">Access</strong> your data, <strong className="text-white">Rectify</strong> inaccuracies, <strong className="text-white">Erase</strong> ("right to be forgotten"), <strong className="text-white">Restrict</strong> processing, <strong className="text-white">Port</strong> your data, and <strong className="text-white">Object</strong> to processing. Contact privacy@hostpioneers.com to exercise these rights.</p>
          </section>
          
          <section>
            <h2 className="text-xl font-semibold text-white mb-3">5. Cookies</h2>
            <p>We use essential cookies for authentication and session management. Optional analytics cookies help us understand usage patterns. You can disable non-essential cookies in your browser settings.</p>
          </section>
          
          <section>
            <h2 className="text-xl font-semibold text-white mb-3">6. Third Parties</h2>
            <ul className="list-disc pl-6 space-y-2">
              <li><strong className="text-white">Stripe:</strong> Payment processing. Their privacy policy applies.</li>
              <li><strong className="text-white">LinkedIn:</strong> OAuth login. Their privacy policy applies.</li>
              <li><strong className="text-white">AI Providers:</strong> Resume customization via API. Data is not stored by AI providers.</li>
            </ul>
          </section>
          
          <section>
            <h2 className="text-xl font-semibold text-white mb-3">7. Data Security</h2>
            <p>We use encryption (TLS 1.3), secure servers, access controls, and regular security audits. No method is 100% secure — we commit to industry-standard protections.</p>
          </section>
          
          <section>
            <h2 className="text-xl font-semibold text-white mb-3">8. Contact</h2>
            <p>Data Controller: HostPioneers, Benalmádena, Málaga, Spain<br/>
            Email: <a href="mailto:privacy@hostpioneers.com" className="text-blue-400 hover:underline">privacy@hostpioneers.com</a><br/>
            Response time: Within 30 days</p>
          </section>
        </div>
      </main>
    </div>
  )
}