import { useTranslation } from "react-i18next";
import Navbar from "../Components/Navbar/Navbar";
import Footer from "../Components/Footer/Footer";

const TOS = () => {
     const { t } = useTranslation("TOS")
    
  return (
    <div className="min-h-screen font-inter">
      <Navbar />
      <div className="container mx-auto px-4 py-20 flex flex-col min-h-[70vh]">
        <h1 className="text-4xl md:text-5xl font-extrabold gold-text text-center mb-6 tracking-wide animate-fadein">{t("tos.pageTitle")}</h1>
        <p className="mb-2 text-white text-sm text-center animate-fadein">{t("tos.lastUpdated")}</p>
        <p className="mb-10 text-white text-base text-center animate-fadein">{t("tos.introText")}</p>
        <div className="w-full max-w-5xl mx-auto">
          
          <h2 className="text-xl font-bold mb-3 gold-text text-left">{t("tos.tos1.title")}</h2>
          {t("tos.tos1.desc").split("\n\n").map((paragraph, index) => (
            <p key={index} className="mb-4 text-white text-base text-left">{paragraph.split("\n").map((line, index) => (
              <span key={index}>{line}<br/></span>
            ))}</p>
          ))}
          <h2 className="text-xl font-bold mb-3 gold-text text-left">{t("tos.tos2.title")}</h2>
          {t("tos.tos2.desc").split("\n\n").map((paragraph, index) => (
            <p key={index} className="mb-4 text-white text-base text-left">{paragraph.split("\n").map((line, index) => (
              <span key={index}>{line}<br/></span>
            ))}</p>
          ))}
          <h2 className="text-xl font-bold mb-3 gold-text text-left">{t("tos.tos3.title")}</h2>
          {t("tos.tos3.desc").split("\n\n").map((paragraph, index) => (
            <p key={index} className="mb-4 text-white text-base text-left">{paragraph.split("\n").map((line, index) => (
              <span key={index}>{line}<br/></span>
            ))}</p>
          ))}
          <h2 className="text-xl font-bold mb-3 gold-text text-left">{t("tos.tos4.title")}</h2>
          {t("tos.tos4.desc").split("\n\n").map((paragraph, index) => (
            <p key={index} className="mb-4 text-white text-base text-left">{paragraph.split("\n").map((line, index) => (
              <span key={index}>{line}<br/></span>
            ))}</p>
          ))}
          <h2 className="text-xl font-bold mb-3 gold-text text-left">{t("tos.tos5.title")}</h2>
          {t("tos.tos5.desc").split("\n\n").map((paragraph, index) => (
            <p key={index} className="mb-4 text-white text-base text-left">{paragraph.split("\n").map((line, index) => (
              <span key={index}>{line}<br/></span>
            ))}</p>
          ))}
          <h2 className="text-xl font-bold mb-3 gold-text text-left">{t("tos.tos6.title")}</h2>
          {t("tos.tos6.desc").split("\n\n").map((paragraph, index) => (
            <p key={index} className="mb-4 text-white text-base text-left">{paragraph.split("\n").map((line, index) => (
              <span key={index}>{line}<br/></span>
            ))}</p>
          ))}
        </div>
      </div>
      <Footer/>
    </div>
  );
};

export default TOS;