import React from "react";
import { motion } from "framer-motion";
import { FiCheckCircle } from "react-icons/fi";
import styles from '../styles/TermsOfWebsite.module.css'; // Use the same styling as TermsOfSale


export default function WebsiteTerms() {
  const sections = [
    {
      id: 1,
      title: "Acceptance of Terms",
      content: (
        <p>
          By accessing and using this website ("Site"), operated by <b>Dattatray Corporation</b> (Brand: <b>Sanjaya</b>) ("Company"), you ("User") agree to comply with and be bound by these Terms and Conditions ("Terms"). If you do not agree, please refrain from using this Site.
        </p>
      )
    },
    {
      id: 2,
      title: "Use of the Site",
      content: (
        <>
          <p><b>Eligibility:</b> Users must be at least 18 years old to use this Site.</p>
          <p className="mt-2"><b>User Conduct:</b></p>
          <ul className="list-disc list-inside space-y-1 mt-2">
            <li>Use the Site unlawfully or in violation of any laws.</li>
            <li>Transmit harmful, offensive, or malicious content.</li>
            <li>Access unauthorized parts of the Site or networks.</li>
            <li>Introduce viruses or malware.</li>
            <li>Disrupt the Site’s functionality.</li>
          </ul>
        </>
      )
    },
    {
      id: 3,
      title: "Intellectual Property Rights",
      content: (
        <p>
          All content on this Site, including text, graphics, logos, images, and software, is owned by the Company and protected by copyright, trademark, and other laws. Unauthorized use is prohibited.
        </p>
      )
    },
    {
      id: 4,
      title: "Product Information and Disclaimer",
      content: (
        <p>
          The Company strives to provide accurate information but does not guarantee completeness or reliability. Users are responsible for verifying details before relying on them.
        </p>
      )
    },
    {
      id: 5,
      title: "Limitation of Liability",
      content: (
        <p>
          The Company is not liable for damages arising from your use or inability to use the Site, even if informed of potential issues.
        </p>
      )
    },
    {
      id: 6,
      title: "External Links",
      content: (
        <p>
          The Site may link to third-party websites. The Company does not control or endorse them, and accessing such sites is at your own risk.
        </p>
      )
    },
    {
      id: 7,
      title: "User Accounts",
      content: (
        <p>
          You are responsible for your account information and activity. The Company may suspend or terminate your account for misuse or violations.
        </p>
      )
    },
    {
      id: 8,
      title: "User Contributions",
      content: (
        <p>
          By submitting content, you grant the Company rights to use and distribute your contributions. You represent that you have the necessary rights and that your content is lawful.
        </p>
      )
    },
    {
      id: 9,
      title: "Privacy Policy",
      content: (
        <p>
          Your use of the Site is governed by the Company's Privacy Policy describing how your personal data is collected and protected.
        </p>
      )
    },
    {
      id: 10,
      title: "Modifications to the Site and Terms",
      content: (
        <p>
          The Company may update the Site or Terms at any time. Continued use after updates implies acceptance.
        </p>
      )
    },
    {
      id: 11,
      title: "Termination",
      content: (
        <p>
          The Company may terminate your access without notice for violating these Terms or harmful behavior.
        </p>
      )
    },
    {
      id: 12,
      title: "Governing Law",
      content: (
        <p>
          These Terms are governed by the laws of Maharashtra, India. Disputes shall be resolved in Nashik courts.
        </p>
      )
    },
    {
      id: 13,
      title: "Indemnification",
      content: (
        <p>
          You agree to indemnify and hold harmless the Company from claims, damages, or losses arising from your use of the Site or violation of these Terms.
        </p>
      )
    },
    {
      id: 14,
      title: "Severability",
      content: (
        <p>
          If any part of these Terms is found unenforceable, the rest remains valid and in force.
        </p>
      )
    },
    {
      id: 15,
      title: "Entire Agreement",
      content: (
        <p>
          These Terms, along with the Privacy Policy, form the entire agreement between you and the Company.
        </p>
      )
    },
    {
      id: 16,
      title: "Contact Information",
      content: (
        <ul className="list-disc list-inside space-y-1 mt-2">
          <li><b>Dattatray Corporation</b></li>
          <li>Brand: <b>Sanjaya</b></li>
          <li>Address: 4, Mohiniraj, Next to TJSB, Dr. Munje Marg, Near ABB Circle, Mahatma Nagar, Nashik – 422007, Maharashtra, India.</li>
          <li>Email: <a href="mailto:info@sanjaya.com" className="text-green-600 hover:underline">info@sanjaya.com</a></li>
          <li>Website: <a href="https://www.sanjaya.com" className="text-green-600 hover:underline">www.sanjaya.com</a></li>
        </ul>
      )
    },
  ];

  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}>Website Terms & Conditions</h1>

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