import React from "react";
import { motion } from "framer-motion";
import { 
  FaInfoCircle, 
  FaLock, 
  FaFileAlt, 
  FaCookieBite, 
  FaExclamationTriangle, 
  FaUsers, 
  FaGlobe, 
  FaEdit 
} from "react-icons/fa";
import styles from "../styles/PrivacyPolicy.module.css";

export default function PrivacyPolicy() {
  const sections = [
    {
      id: 1,
      title: "Introduction",
      icon: <FaInfoCircle className={styles.sectionIcon} />,
      content: (
        <p>
          Dattatray Corporation (Brand: <b>Sanjaya</b>) ("Company," "we," "us," or "our") is committed to protecting your privacy. This Privacy Policy outlines how we collect, use, disclose, and safeguard your information when you visit our website <a href="https://www.sanjaya.com">www.sanjaya.com</a> ("Site") or engage with our services.
        </p>
      )
    },
    {
      id: 2,
      title: "Information We Collect",
      icon: <FaFileAlt className={styles.sectionIcon} />,
      content: (
        <ul>
          <li><b>Personal Information:</b> Name, email, phone, postal address, etc.</li>
          <li><b>Non-Personal Information:</b> Browser type, IP, device info, browsing behavior.</li>
        </ul>
      )
    },
    {
      id: 3,
      title: "How We Use Your Information",
      icon: <FaLock className={styles.sectionIcon} />,
      content: (
        <ul>
          <li>Providing, operating, and maintaining our services</li>
          <li>Improving and personalizing our services</li>
          <li>Communicating with you (support, updates, etc.)</li>
          <li>Processing transactions</li>
          <li>Developing new features</li>
          <li>Sending promotional communications</li>
          <li>Preventing fraudulent or unauthorized activities</li>
        </ul>
      )
    },
    {
      id: 4,
      title: "Sharing Your Information",
      icon: <FaUsers className={styles.sectionIcon} />,
      content: (
        <ul>
          <li><b>Service Providers:</b> for operations and support</li>
          <li><b>Legal Requirements:</b> when required by law</li>
          <li><b>Business Transfers:</b> mergers or acquisitions</li>
        </ul>
      )
    },
    {
      id: 5,
      title: "Cookies & Tracking",
      icon: <FaCookieBite className={styles.sectionIcon} />,
      content: <p>We use cookies to enhance your browsing experience. Disabling cookies may affect site features.</p>
    },
    {
      id: 6,
      title: "Data Security",
      icon: <FaExclamationTriangle className={styles.sectionIcon} />,
      content: <p>We apply strict security measures to protect your information, but no method is 100% secure.</p>
    },
    {
      id: 7,
      title: "Your Data Protection Rights",
      icon: <FaLock className={styles.sectionIcon} />,
      content: (
        <ul>
          <li><b>Access</b> – Request copies of your personal data.</li>
          <li><b>Rectification</b> – Correct inaccurate data.</li>
          <li><b>Erasure</b> – Delete data under certain conditions.</li>
          <li><b>Restrict Processing</b> – Limit use of your data.</li>
          <li><b>Object</b> – Object to processing.</li>
          <li><b>Data Portability</b> – Transfer your data.</li>
        </ul>
      )
    },
    {
      id: 8,
      title: "Third-Party Links",
      icon: <FaGlobe className={styles.sectionIcon} />,
      content: <p>Our Site may contain links to third-party websites. We are not responsible for their privacy practices or content.</p>
    },
    {
      id: 9,
      title: "Children's Privacy",
      icon: <FaUsers className={styles.sectionIcon} />,
      content: <p>We do not knowingly collect data from individuals under 18 years old. If found, it will be deleted immediately.</p>
    },
    {
      id: 10,
      title: "Changes to This Policy",
      icon: <FaEdit className={styles.sectionIcon} />,
      content: <p>We may update this Privacy Policy periodically. Any changes will be posted on this page with a new effective date.</p>
    },
  ];

  return (
    <div className={styles.container}>
      <motion.div
        initial={{ opacity: 0, y: 20 }}
        animate={{ opacity: 1, y: 0 }}
        transition={{ duration: 0.6 }}
        className={styles.card}
      >
        <h1 className={styles.heading}>Privacy Policy</h1>

        {sections.map((section) => (
          <section key={section.id} className={styles.section}>
            <div className={styles.sectionHeader}>
              {section.icon}
              <h2 className={styles.sectionTitle}>{section.title}</h2>
            </div>
            <div className={styles.sectionContent}>{section.content}</div>
          </section>
        ))}
      </motion.div>
    </div>
  );
}
