"use client";
import Link from "next/link";
import React from "react";

export default function PrivacyPolicyPage() {
  return (
    <div className="min-h-screen bg-gray-50 py-10 px-4">
      <div className="max-w-4xl mx-auto bg-white p-8 rounded-lg shadow">
        {/* Breadcrumb */}
        <div className="text-sm text-gray-500 mb-4">
          <Link href="/">Home</Link> <span className="mx-2">/</span> Privacy Policy
        </div>

        <h1 className="text-3xl font-bold mb-2 text-gray-800 text-center">
          Privacy Policy
        </h1>
        <p className="text-center text-gray-500 text-sm mb-8">Effective Date: 2022-06-28 · Last Updated: 2025-01-01</p>

        {/* Introduction */}
        <p className="text-gray-700 mb-6">
          This Privacy Policy describes how <strong>UniversitiesPage</strong> ("we", "us", or "our") collects, uses,
          stores, and shares your information when you use our website at{" "}
          <a href="https://universitiespage.com" className="text-teal-600 hover:underline">
            https://universitiespage.com
          </a>{" "}
          (the "Service"). By using our Service, you agree to the collection and use of information in accordance with
          this policy.
        </p>

        {/* ── GOOGLE USER DATA ── */}
        <h2 className="text-2xl font-semibold mb-2 text-gray-800">Google User Data</h2>

        <h3 className="text-xl font-semibold mb-1 text-gray-700">Data We Access</h3>
        <p className="text-gray-700 mb-3">
          When you choose to sign in with Google, our application requests access to the following Google account data:
        </p>
        <ul className="list-disc list-inside text-gray-700 space-y-1 mb-4">
          <li><strong>Email address</strong> – to identify your account and communicate with you.</li>
          <li><strong>Basic profile information</strong> (name and profile picture) – to personalise your experience on our platform.</li>
        </ul>
        <p className="text-gray-700 mb-6">
          We do not request access to your Google Drive, Gmail, Calendar, Contacts, or any other Google service beyond
          the basic profile and email scopes listed above.
        </p>

        <h3 className="text-xl font-semibold mb-1 text-gray-700">How We Use Google User Data</h3>
        <p className="text-gray-700 mb-3">
          The Google user data we access is used exclusively for the following purposes:
        </p>
        <ul className="list-disc list-inside text-gray-700 space-y-1 mb-4">
          <li>To create and authenticate your account on UniversitiesPage.</li>
          <li>To display your name and profile picture within the Service.</li>
          <li>To send you service-related communications such as account notifications.</li>
        </ul>
        <p className="text-gray-700 mb-6">
          We do <strong>not</strong> sell, rent, or share your Google user data with third parties for advertising or
          marketing purposes. We do not use Google user data to serve you targeted advertisements.
        </p>

        <h3 className="text-xl font-semibold mb-1 text-gray-700">Data Storage &amp; Retention</h3>
        <p className="text-gray-700 mb-6">
          Google user data is stored securely on our servers. We retain your data only for as long as your account is
          active or as needed to provide the Service. If you delete your account, we will delete or anonymise your
          personal information within 30 days, unless we are required to retain it by law.
        </p>

        <h3 className="text-xl font-semibold mb-1 text-gray-700">Compliance with Google API Services User Data Policy</h3>
        <p className="text-gray-700 mb-6">
          Our use and transfer of information received from Google APIs adheres to the{" "}
          <a
            href="https://developers.google.com/terms/api-services-user-data-policy"
            target="_blank"
            rel="noopener noreferrer"
            className="text-teal-600 hover:underline"
          >
            Google API Services User Data Policy
          </a>
          , including the Limited Use requirements.
        </p>

        {/* ── GENERAL DATA COLLECTION ── */}
        <h2 className="text-2xl font-semibold mb-2 text-gray-800">Information We Collect</h2>
        <p className="text-gray-700 mb-3">
          In addition to Google user data, we may collect the following information:
        </p>
        <ul className="list-disc list-inside text-gray-700 space-y-1 mb-6">
          <li><strong>Usage data</strong> – pages visited, time spent, browser type, and IP address, collected automatically via cookies and analytics tools.</li>
          <li><strong>User-provided data</strong> – any information you voluntarily submit through forms or account settings.</li>
        </ul>

        {/* Service Providers */}
        <h2 className="text-2xl font-semibold mb-2 text-gray-800">Service Providers</h2>
        <p className="text-gray-700 mb-4">
          We may employ third-party companies and individuals to facilitate our Service for the following reasons:
        </p>
        <ul className="list-disc list-inside text-gray-700 space-y-1 mb-4">
          <li>To provide the Service on our behalf;</li>
          <li>To perform Service-related services; or</li>
          <li>To assist us in analyzing how our Service is used.</li>
        </ul>
        <p className="text-gray-700 mb-6">
          These third parties have access to your Personal Information only to perform the tasks assigned to them on our
          behalf and are obligated not to disclose or use the information for any other purpose.
        </p>

        {/* Security */}
        <h2 className="text-2xl font-semibold mb-2 text-gray-800">Security</h2>
        <p className="text-gray-700 mb-6">
          We value your trust in providing us with your Personal Information and strive to use commercially acceptable
          means of protecting it. However, no method of transmission over the internet or method of electronic storage
          is 100% secure and reliable, and we cannot guarantee its absolute security.
        </p>

        {/* Links */}
        <h2 className="text-2xl font-semibold mb-2 text-gray-800">Links To Other Sites</h2>
        <p className="text-gray-700 mb-6">
          This Service may contain links to other sites. If you click on a third-party link, you will be directed to
          that site. Note that these external sites are not operated by us. We strongly advise you to review the Privacy
          Policy of these websites. We have no control over and assume no responsibility for the content, privacy
          policies, or practices of any third-party sites or services.
        </p>

        {/* Children's Privacy */}
        <h2 className="text-2xl font-semibold mb-2 text-gray-800">Children's Privacy</h2>
        <p className="text-gray-700 mb-6">
          This Service does not address anyone under the age of 18. We do not knowingly collect personally identifiable
          information from children under 18 years of age. If we discover that a child under 18 has provided us with
          personal information, we will immediately delete it from our servers. If you are a parent or guardian and
          believe your child has provided us with personal information, please contact us so we can take the necessary
          action.
        </p>

        {/* Your Rights */}
        <h2 className="text-2xl font-semibold mb-2 text-gray-800">Your Rights</h2>
        <p className="text-gray-700 mb-6">
          You have the right to access, correct, or delete the personal information we hold about you at any time. You
          may also revoke your Google account permissions at any time via your{" "}
          <a
            href="https://myaccount.google.com/permissions"
            target="_blank"
            rel="noopener noreferrer"
            className="text-teal-600 hover:underline"
          >
            Google Account settings
          </a>
          . To exercise any of these rights, please contact us using the details below.
        </p>

        {/* Changes */}
        <h2 className="text-2xl font-semibold mb-2 text-gray-800">Changes To This Privacy Policy</h2>
        <p className="text-gray-700 mb-6">
          We may update our Privacy Policy from time to time. You are advised to review this page periodically for any
          changes. We will notify you of any changes by posting the new Privacy Policy on this page.
          <br />
          This policy is effective as of <strong>2022-06-28</strong> and was last updated on{" "}
          <strong>2025-01-01</strong>.
        </p>

        {/* Contact */}
        <h2 className="text-2xl font-semibold mb-2 text-gray-800">Contact Us</h2>
        <p className="text-gray-700">
          If you have any questions or suggestions about our Privacy Policy, do not hesitate to contact us at{" "}
          <a href="mailto:info@universitiespage.com" className="text-teal-600 hover:underline">
            info@universitiespage.com
          </a>.
        </p>
      </div>
    </div>
  );
}