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

export const metadata: Metadata = {
  title: "GDPR Compliance — AutoJobs",
  description: "AutoJobs GDPR compliance guide. Your rights under the General Data Protection Regulation and how we protect your personal data.",
}

export default function GDPRPage() {
  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">
        <div className="inline-block px-3 py-1 rounded-full bg-purple-500/20 border border-purple-500/30 text-purple-300 text-sm mb-6">
          European Union Rights
        </div>
        
        <h1 className="text-3xl font-bold text-white mb-4">GDPR Compliance</h1>
        <p className="text-slate-500 mb-8">General Data Protection Regulation — Effective since May 25, 2018</p>
        
        <div className="space-y-8">
          <section>
            <h2 className="text-xl font-semibold text-white mb-3">Your Rights Under GDPR</h2>
            <p>As an EU/EEA resident, you have specific rights regarding your personal data. AutoJobs (operated by HostPioneers) fully complies with GDPR requirements.</p>
          </section>
          
          <section className="bg-slate-800/50 rounded-2xl p-6 border border-slate-700">
            <h3 className="text-lg font-semibold text-white mb-4">Your Rights</h3>
            <div className="grid gap-4">
              {[
                { right: "Right of Access (Art. 15)", desc: "Request a copy of all personal data we hold about you. We provide this within 30 days at no charge." },
                { right: "Right to Rectification (Art. 16)", desc: "Correct any inaccurate or incomplete personal data. Update your profile anytime in your dashboard." },
                { right: "Right to Erasure (Art. 17)", desc: "Request deletion of your personal data (\"right to be forgotten\"). We process these requests within 30 days." },
                { right: "Right to Restrict Processing (Art. 18)", desc: "Request that we limit how we use your data while disputes about accuracy are resolved." },
                { right: "Right to Data Portability (Art. 20)", desc: "Receive your data in a structured, machine-readable format (JSON/CSV). Export anytime from your dashboard." },
                { right: "Right to Object (Art. 21)", desc: "Object to processing based on legitimate interests. We will cease such processing unless we have compelling grounds." },
                { right: "Rights Related to Automated Decision-Making (Art. 22)", desc: "Not be subject to solely automated decisions that significantly affect you. AI customization is advisory — you approve all submissions." },
              ].map((item) => (
                <div key={item.right} className="border-b border-slate-700 pb-3 last:border-0">
                  <h4 className="text-white font-medium mb-1">{item.right}</h4>
                  <p className="text-sm">{item.desc}</p>
                </div>
              ))}
            </div>
          </section>
          
          <section>
            <h2 className="text-xl font-semibold text-white mb-3">Data We Collect</h2>
            <table className="w-full text-sm">
              <thead>
                <tr className="text-left text-slate-400 border-b border-slate-700">
                  <th className="pb-2">Data Category</th>
                  <th className="pb-2">Purpose</th>
                  <th className="pb-2">Legal Basis</th>
                </tr>
              </thead>
              <tbody className="text-slate-300">
                <tr className="border-b border-slate-800"><td className="py-2">Name, Email</td><td>Account creation</td><td>Contract performance</td></tr>
                <tr className="border-b border-slate-800"><td className="py-2">Resume content</td><td>AI customization</td><td>Consent</td></tr>
                <tr className="border-b border-slate-800"><td className="py-2">LinkedIn data</td><td>Import profiles</td><td>Consent</td></tr>
                <tr className="border-b border-slate-800"><td className="py-2">Job preferences</td><td>Job matching</td><td>Consent</td></tr>
                <tr className="border-b border-slate-800"><td className="py-2">Usage data</td><td>Service improvement</td><td>Legitimate interest</td></tr>
                <tr className="border-b border-slate-800"><td className="py-2">Payment info</td><td>Stripe processing</td><td>Contract performance</td></tr>
              </tbody>
            </table>
          </section>
          
          <section>
            <h2 className="text-xl font-semibold text-white mb-3">Data Transfers Outside EU</h2>
            <p>Some data processors (AI providers, Stripe) may process data outside the EU/EEA. We ensure appropriate safeguards via Standard Contractual Clauses (SCCs) or adequacy decisions. You can request details of safeguards in place.</p>
          </section>
          
          <section>
            <h2 className="text-xl font-semibold text-white mb-3">Data Protection Officer</h2>
            <p>Contact our Data Protection Officer:<br/>
            Email: <a href="mailto:dpo@hostpioneers.com" className="text-blue-400 hover:underline">dpo@hostpioneers.com</a><br/>
            Response: Within 72 hours for urgent matters, 30 days standard.</p>
          </section>
          
          <section>
            <h2 className="text-xl font-semibold text-white mb-3">Supervisory Authority</h2>
            <p>You have the right to lodge a complaint with your local data protection authority. In Spain, contact:</p>
            <p className="mt-2">
              <strong className="text-white">Agencia Española de Protección de Datos (AEPD)</strong><br/>
              <a href="https://www.aepd.es" className="text-blue-400 hover:underline">www.aepd.es</a><br/>
              +34 901 100 099
            </p>
          </section>
          
          <section className="bg-slate-800/50 rounded-2xl p-6 border border-slate-700">
            <h3 className="text-lg font-semibold text-white mb-3">Exercise Your Rights</h3>
            <p className="mb-4">To exercise any GDPR right:</p>
            <ol className="list-decimal pl-6 space-y-2 text-sm">
              <li>Email <a href="mailto:privacy@hostpioneers.com" className="text-blue-400 hover:underline">privacy@hostpioneers.com</a> with your request</li>
              <li>Include your account email and a copy of ID for verification</li>
              <li>We respond within 30 days (extended to 90 days for complex requests)</li>
            </ol>
          </section>
          
          <section>
            <h2 className="text-xl font-semibold text-white mb-3">Consent Management</h2>
            <p>You can withdraw consent anytime in your dashboard under Settings → Privacy. Withdrawal does not affect processing before withdrawal. We re-request consent annually for active accounts.</p>
          </section>
        </div>
      </main>
    </div>
  )
}