import Layout from "@/components/layout/Layout";
import Link from "next/link";

export const metadata = {
  title: "Privacy Policy | Rapha Rehab",
  description:
    "Read how Rapha Rehab Physiotherapy & Massage Therapy Clinic collects, uses, stores, and protects personal information.",
};

const policySections = [
  {
    title: "Information We Collect",
    body: "We may collect the following types of information:",
    groups: [
      {
        title: "Personal Information",
        items: [
          "Full name",
          "Phone number",
          "Email address",
          "Postal code",
          "Appointment preferences",
          "Health-related information voluntarily submitted through forms",
          "Insurance information provided during appointments",
        ],
      },
      {
        title: "Website Usage Information",
        body: "When you visit our website, we may automatically collect:",
        items: [
          "IP address",
          "Browser type",
          "Device information",
          "Pages visited",
          "Date and time of visit",
          "Website interaction data",
        ],
      },
    ],
  },
  {
    title: "How We Collect Information",
    body: "We collect information when you:",
    items: [
      "Fill out a contact form",
      "Request an appointment",
      "Submit a consultation request",
      "Call our clinic",
      "Send an email inquiry",
      "Interact with our Facebook, Instagram, or Google advertisements",
      "Subscribe to newsletters or promotions",
      "Visit our website",
    ],
  },
  {
    title: "How We Use Your Information",
    body: "We may use your information to:",
    items: [
      "Schedule and manage appointments",
      "Respond to inquiries",
      "Provide physiotherapy, massage therapy, chiropractic, acupuncture, and rehabilitation services",
      "Verify insurance coverage",
      "Improve our website and services",
      "Send appointment reminders",
      "Provide clinic updates and promotional offers",
      "Comply with legal and regulatory requirements",
    ],
  },
  {
    title: "Facebook & Meta Advertising",
    body: "We may use Facebook Pixel, Meta Conversion API, and similar tracking technologies to measure advertising performance, understand visitor behavior, improve user experience, and deliver relevant advertisements.",
    groups: [
      {
        body: "These technologies may collect information such as:",
        items: [
          "Pages viewed",
          "Time spent on the website",
          "Device information",
          "Browser information",
        ],
      },
    ],
    footer:
      "You can manage your advertising preferences through your Facebook account settings.",
  },
  {
    title: "Cookies",
    body: "Our website uses cookies and similar technologies to improve your browsing experience.",
    groups: [
      {
        body: "Cookies help us:",
        items: [
          "Analyze website traffic",
          "Remember user preferences",
          "Improve website functionality",
          "Measure advertising effectiveness",
        ],
      },
    ],
    footer: "You may disable cookies through your browser settings at any time.",
  },
  {
    title: "Information Sharing",
    body: "We do not sell, rent, or trade your personal information.",
    groups: [
      {
        body: "We may share information only with:",
        items: [
          "Healthcare practitioners involved in your treatment",
          "Insurance providers, when authorized",
          "Website and technology service providers",
          "Legal or regulatory authorities when required by law",
        ],
      },
    ],
    footer:
      "All third-party service providers are required to maintain confidentiality and protect your information.",
  },
  {
    title: "Data Security",
    body: "We implement reasonable administrative, technical, and physical safeguards to protect your information from:",
    items: [
      "Unauthorized access",
      "Disclosure",
      "Alteration",
      "Misuse",
      "Loss",
    ],
    footer:
      "While we strive to protect your information, no method of internet transmission is completely secure.",
  },
  {
    title: "Data Retention",
    body: "We retain personal information only as long as necessary to:",
    items: [
      "Provide healthcare services",
      "Maintain patient records",
      "Meet legal, regulatory, and professional obligations",
    ],
  },
  {
    title: "Third-Party Websites",
    body: "Our website may contain links to third-party websites. We are not responsible for the privacy practices of external websites. We encourage users to review the privacy policies of any website they visit.",
  },
  {
    title: "Your Privacy Rights",
    body: "You may request to:",
    items: [
      "Access your personal information",
      "Correct inaccurate information",
      "Withdraw marketing consent",
      "Request deletion of information where legally permitted",
    ],
    footer: "To exercise these rights, please contact us using the information below.",
  },
  {
    title: "Children's Privacy",
    body: "Our website is not intended for children under the age of 13. We do not knowingly collect personal information from children without parental consent.",
  },
  {
    title: "Changes to This Privacy Policy",
    body: "We may update this Privacy Policy periodically. Any changes will be posted on this page with an updated revision date.",
  },
];

const privacyListStyle = {
  marginTop: "20px",
};

const contactListStyle = {
  listStyle: "none",
  marginTop: "20px",
  paddingLeft: 0,
};

const contactListItemStyle = {
  alignItems: "center",
  display: "flex",
  gap: "14px",
  marginBottom: "17px",
};

const contactIconStyle = {
  alignItems: "center",
  background: "#ffe6e6",
  borderRadius: "50%",
  color: "var(--theme-color)",
  display: "inline-flex",
  flexShrink: 0,
  fontSize: "14px",
  height: "30px",
  justifyContent: "center",
  width: "30px",
};

function BulletList({ items }) {
  if (!items?.length) {
    return null;
  }

  return (
    <ul className="list-style-one clearfix mb_20" style={privacyListStyle}>
      {items.map((item) => (
        <li key={item}>{item}</li>
      ))}
    </ul>
  );
}

export default function PrivacyPolicyPage() {
  return (
    <Layout
      headerStyle={1}
      footerStyle={2}
      breadcrumbTitle="Privacy Policy"
      bannerImage="/assets/images/privacy-policy/privacy-policy-banner.png"
    >
      <section className="sidebar-page-container pt_90 pb_90">
        <div className="auto-container">
          <div className="row clearfix justify-content-center">
            <div className="col-lg-10 col-md-12 col-sm-12 content-side">
              <div className="blog-details-content">
                <div className="content-one">
                  <div className="sec-title mb_30">
                    <span className="sub-title">Last Updated: June 2026</span>
                    <h2>
                      Privacy Policy for Rapha Rehab Physiotherapy & Massage
                      Therapy Clinic
                    </h2>
                  </div>
                  <p>
                    At Rapha Rehab Physiotherapy & Massage Therapy Clinic
                    ("Rapha Rehab", "we", "our", or "us"), we respect your
                    privacy and are committed to protecting the personal
                    information you provide through our website, online forms,
                    social media advertisements, phone calls, and clinic
                    services.
                  </p>
                  <p>
                    This Privacy Policy explains how we collect, use, store, and
                    protect your information when you visit our website or
                    interact with our services.
                  </p>
                </div>

                <div className="content-one mt_40">
                  {policySections.map((section) => (
                    <div className="mb_35" key={section.title}>
                      <h3 className="mb_15">{section.title}</h3>
                      {section.body && <p>{section.body}</p>}
                      <BulletList items={section.items} />

                      {section.groups?.map((group, index) => (
                        <div key={`${section.title}-${index}`} className="mt_20">
                          {group.title && <h4 className="mb_10">{group.title}</h4>}
                          {group.body && <p>{group.body}</p>}
                          <BulletList items={group.items} />
                        </div>
                      ))}

                      {section.footer && <p>{section.footer}</p>}
                    </div>
                  ))}

                  <div className="mb_0">
                    <h3 className="mb_15">Contact Us</h3>
                    <p>Rapha Rehab Physiotherapy & Massage Therapy Clinic</p>
                    <ul className="clearfix mb_20" style={contactListStyle}>
                      <li style={contactListItemStyle}>
                        <span style={contactIconStyle}>
                          <i className="fas fa-map-marker-alt"></i>
                        </span>
                        Address: Etobicoke, Ontario, Canada
                      </li>
                      <li style={contactListItemStyle}>
                        <span style={contactIconStyle}>
                          <i className="icon-2"></i>
                        </span>
                        Phone:{" "}
                        <Link href="tel:647-722-3434">647-722-3434</Link>
                      </li>
                      <li style={contactListItemStyle}>
                        <span style={contactIconStyle}>
                          <i className="fas fa-globe"></i>
                        </span>
                        Website:{" "}
                        <Link href="https://rapharehab.ca/">
                          Rapha Rehab Physiotherapy & Massage Therapy Clinic
                        </Link>
                      </li>
                      <li style={contactListItemStyle}>
                        <span style={contactIconStyle}>
                          <i className="icon-26"></i>
                        </span>
                        Email:{" "}
                        <Link href="mailto:bloor@rapharehab.ca">
                          bloor@rapharehab.ca
                        </Link>
                      </li>
                    </ul>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </section>
    </Layout>
  );
}
