import React from "react";
import type { Metadata } from "next";
import Header from "@/components/Header";
import Footer from "@/components/Footer";

export const metadata: Metadata = {
  title: "Privacy Policy — BroadcastBeat",
  description: "BroadcastBeat Privacy Policy — how we collect, use, and protect your personal information. GDPR and CCPA compliant.",
  alternates: {
    canonical: "/privacy",
  },
};

export default function PrivacyPage() {
  return (
    <div className="min-h-screen bg-background">
      <Header />
      <div className="bg-[#111] border-b border-[#222] py-8">
        <div className="max-w-container mx-auto px-4">
          <h1 className="font-heading text-white text-3xl font-bold">Privacy Policy</h1>
          <p className="text-[#888] font-body text-sm mt-2">Last updated: April 2026 — Relevant Media Properties, LLC</p>
        </div>
      </div>
      <main id="main-content" className="max-w-container mx-auto px-4 py-10">
        <div className="max-w-3xl space-y-8 font-body text-[#aaa] leading-relaxed">

          <section aria-labelledby="section-intro">
            <p id="section-intro">
              This Privacy Policy describes how <strong className="text-[#e0e0e0]">Relevant Media Properties, LLC</strong> ("we," "us," or "our"), publisher of BroadcastBeat, AV Beat, Backlot Beat, and BroadcastEngineering.com, collects, uses, and shares information about you when you use our websites and services. We are committed to protecting your privacy and complying with applicable data protection laws including GDPR and CCPA.
            </p>
          </section>

          <section aria-labelledby="section-1">
            <h2 id="section-1" className="font-heading text-[#e0e0e0] text-xl font-bold mb-3">1. Information We Collect</h2>
            <h3 className="font-heading text-[#ccc] text-base font-semibold mb-2">Information You Provide</h3>
            <p>We collect information you provide directly to us, such as when you subscribe to our newsletter, create an account, post in our forum, or contact us. This may include your name, email address, username, and professional information.</p>
            <h3 className="font-heading text-[#ccc] text-base font-semibold mb-2 mt-4">Information Collected Automatically</h3>
            <p className="mt-2">We also collect information automatically when you use our sites, including:</p>
            <ul className="list-disc list-inside mt-2 space-y-1 text-[#999]">
              <li>IP address and approximate geographic location</li>
              <li>Browser type, version, and operating system</li>
              <li>Pages visited, time spent, and referring URLs</li>
              <li>Device identifiers and cookie data</li>
              <li>Interaction data (clicks, scrolls, video plays)</li>
            </ul>
            <h3 className="font-heading text-[#ccc] text-base font-semibold mb-2 mt-4">Cookies and Tracking Technologies</h3>
            <p className="mt-2">We use cookies, web beacons, and similar tracking technologies. You can control cookie preferences through our cookie consent banner or your browser settings. Essential cookies required for site functionality cannot be disabled.</p>
          </section>

          <section aria-labelledby="section-2">
            <h2 id="section-2" className="font-heading text-[#e0e0e0] text-xl font-bold mb-3">2. How We Use Your Information</h2>
            <p>We use the information we collect to:</p>
            <ul className="list-disc list-inside mt-2 space-y-1 text-[#999]">
              <li>Provide, maintain, and improve our editorial content and services</li>
              <li>Send newsletters and editorial content you have subscribed to</li>
              <li>Respond to your comments, questions, and support requests</li>
              <li>Analyze usage patterns to improve site performance and content</li>
              <li>Serve relevant advertising through our ad operations platform</li>
              <li>Detect and prevent fraud, abuse, and security incidents</li>
              <li>Comply with legal obligations</li>
            </ul>
            <p className="mt-3"><strong className="text-[#ccc]">Legal basis (GDPR):</strong> We process your data based on consent (newsletter subscriptions, analytics cookies), legitimate interests (site security, fraud prevention), and contractual necessity (account management).</p>
          </section>

          <section aria-labelledby="section-3">
            <h2 id="section-3" className="font-heading text-[#e0e0e0] text-xl font-bold mb-3">3. Information Sharing</h2>
            <p>We do not sell your personal information. We may share information with:</p>
            <ul className="list-disc list-inside mt-2 space-y-1 text-[#999]">
              <li><strong className="text-[#ccc]">Service providers</strong> who assist in operating our websites (hosting, email delivery, analytics)</li>
              <li><strong className="text-[#ccc]">Advertising partners</strong> for serving and measuring ad campaigns (subject to your consent)</li>
              <li><strong className="text-[#ccc]">Legal authorities</strong> when required by law or to protect our rights</li>
              <li><strong className="text-[#ccc]">Business successors</strong> in the event of a merger, acquisition, or sale of assets</li>
            </ul>
          </section>

          <section aria-labelledby="section-4">
            <h2 id="section-4" className="font-heading text-[#e0e0e0] text-xl font-bold mb-3">4. Cookies Policy</h2>
            <p>We use the following categories of cookies:</p>
            <div className="mt-3 space-y-3">
              <div className="bg-[#1a1a1a] border border-[#2a2a2a] rounded p-3">
                <p className="font-bold text-[#ccc] text-sm">Essential Cookies</p>
                <p className="text-sm mt-1">Required for the website to function. Cannot be disabled. Includes session management and security tokens.</p>
              </div>
              <div className="bg-[#1a1a1a] border border-[#2a2a2a] rounded p-3">
                <p className="font-bold text-[#ccc] text-sm">Analytics Cookies</p>
                <p className="text-sm mt-1">Help us understand how visitors interact with our site (Google Analytics). Requires your consent.</p>
              </div>
              <div className="bg-[#1a1a1a] border border-[#2a2a2a] rounded p-3">
                <p className="font-bold text-[#ccc] text-sm">Advertising Cookies</p>
                <p className="text-sm mt-1">Used to serve relevant ads and measure campaign performance. Requires your consent.</p>
              </div>
            </div>
          </section>

          <section aria-labelledby="section-5">
            <h2 id="section-5" className="font-heading text-[#e0e0e0] text-xl font-bold mb-3">5. Your Rights</h2>
            <p>Depending on your location, you may have the following rights regarding your personal data:</p>
            <ul className="list-disc list-inside mt-2 space-y-1 text-[#999]">
              <li><strong className="text-[#ccc]">Access:</strong> Request a copy of the personal data we hold about you</li>
              <li><strong className="text-[#ccc]">Correction:</strong> Request correction of inaccurate or incomplete data</li>
              <li><strong className="text-[#ccc]">Deletion:</strong> Request deletion of your personal data ("right to be forgotten")</li>
              <li><strong className="text-[#ccc]">Portability:</strong> Receive your data in a structured, machine-readable format</li>
              <li><strong className="text-[#ccc]">Opt-out (CCPA):</strong> California residents may opt out of the sale of personal information</li>
              <li><strong className="text-[#ccc]">Unsubscribe:</strong> Opt out of marketing emails at any time via the unsubscribe link</li>
            </ul>
            <p className="mt-3">To exercise any of these rights, contact us at <a href="mailto:privacy@broadcastbeat.com" className="text-[#3b82f6] underline hover:text-blue-400 transition-colors">privacy@broadcastbeat.com</a>. We will respond within 30 days.</p>
          </section>

          <section aria-labelledby="section-6">
            <h2 id="section-6" className="font-heading text-[#e0e0e0] text-xl font-bold mb-3">6. Data Retention</h2>
            <p>We retain personal data for as long as necessary to provide our services and comply with legal obligations. Newsletter subscriber data is retained until you unsubscribe. Account data is retained for the life of your account plus 90 days after deletion.</p>
          </section>

          <section aria-labelledby="section-7">
            <h2 id="section-7" className="font-heading text-[#e0e0e0] text-xl font-bold mb-3">7. Children's Privacy</h2>
            <p>Our services are not directed to children under 13 years of age. We do not knowingly collect personal information from children under 13. If you believe we have inadvertently collected such information, please contact us immediately.</p>
          </section>

          <section aria-labelledby="section-8">
            <h2 id="section-8" className="font-heading text-[#e0e0e0] text-xl font-bold mb-3">8. Changes to This Policy</h2>
            <p>We may update this Privacy Policy from time to time. We will notify you of significant changes by posting a notice on our website or sending an email to newsletter subscribers. Your continued use of our services after changes take effect constitutes acceptance of the updated policy.</p>
          </section>

          <section aria-labelledby="section-9">
            <h2 id="section-9" className="font-heading text-[#e0e0e0] text-xl font-bold mb-3">9. Contact Us</h2>
            <p>For privacy-related questions, data requests, or to report a concern:</p>
            <address className="not-italic mt-3 space-y-1 text-[#999]">
              <p><strong className="text-[#ccc]">Relevant Media Properties, LLC</strong></p>
              <p>Privacy Officer</p>
              <p>Email: <a href="mailto:privacy@broadcastbeat.com" className="text-[#3b82f6] underline hover:text-blue-400 transition-colors">privacy@broadcastbeat.com</a></p>
            </address>
          </section>

        </div>
      </main>
      <Footer />
    </div>
  );
}
