// AirStep — Podiatrist directory section
// Add new entries to PODIATRIST_DIRECTORY. Each entry can have any subset of fields;
// missing fields are simply not rendered.

const PODIATRIST_DIRECTORY = [
  {
    region: "KwaZulu-Natal",
    entries: [
      {
        name: "Dr Anette Thompson",
        credentials: "PhD Clinical Medicine (UKZN) · MSc & BSc Podiatry (UJ)",
        practice: "Drs Anette Thompson & Associates (ATA Podiatrists)",
        role: "Clinical Director — Podiatric Medicine · Netcare Umhlanga Hospital Diabetes & Endocrinology Centre",
        focus: ["Diabetic foot", "Custom orthotics", "Wound care", "Biomechanics"],
        phone: "031 201 9907",
        phoneTel: "+27312019907",
        address: "Suite 102, 1st Floor, Umhlanga Medical Centre, 321 Umhlanga Rocks Drive, Umhlanga, 4319",
        city: "Umhlanga · Durban",
        maps: "Umhlanga Medical Centre, 321 Umhlanga Rocks Drive, Umhlanga",
      },
      {
        name: "Ms Serisha Neerachand",
        credentials: "PASA-registered podiatrist · 18+ years in practice",
        practice: "Serisha Neerachand Podiatrist",
        role: "General & diabetic foot care",
        focus: ["Diabetic foot", "General podiatry", "Custom orthotics"],
        phone: "079 738 3143",
        phoneTel: "+27797383143",
        address: "Delamore Medical Centre, 4A Delamore Road, Hilldene, Hillcrest, 3610",
        city: "Hillcrest · Durban",
        maps: "Delamore Medical Centre, 4A Delamore Road, Hilldene, Hillcrest",
      },
      {
        name: "Alisha Lalbeharie",
        credentials: "BTech Podiatry (UJ) · PG Dip Metabolic Medicine (Univ. South Wales) · KZN Chair, PASA",
        practice: "Foot Motion Podiatry · Essen Medical Centre, Ladysmith",
        role: "Award-winning podiatrist · special interest in diabetic lower-limb management. Monthly satellite practices in Newcastle, Estcourt & Vryheid.",
        focus: ["Diabetic foot", "Wound care", "3D custom orthotics", "Metabolic medicine"],
        phone: "036 631 0671",
        phoneTel: "+27366310671",
        email: "alishalalbeharie4@gmail.com",
        website: "https://www.footmotionpodiatry.co.za",
        websiteLabel: "footmotionpodiatry.co.za",
        address: "Essen Medical Centre, Ladysmith, KwaZulu-Natal",
        city: "Ladysmith · Northern KZN",
        maps: "Essen Medical Centre, Ladysmith, KwaZulu-Natal",
      },
      {
        name: "Nelfrie Kemp",
        credentials: "PASA-registered podiatrist",
        practice: "Nelfrie Kemp Podiatrist (with Claire Thango)",
        role: "Holistic team practice on the KZN North Coast. Second consulting room at Medstone Medical Centre, Umhlanga Ridge.",
        focus: ["Diabetic foot", "Custom orthotics", "Biomechanics", "Nail surgery"],
        phone: "031 941 1997",
        phoneTel: "+27319411997",
        website: "https://nelfriekemp.co.za",
        websiteLabel: "nelfriekemp.co.za",
        address: "Office 5, 1st Floor, Warne House, Garlicke Drive, Ballito, 4420",
        city: "Ballito · North Coast",
        maps: "Warne House, Garlicke Drive, Ballito",
      },
      {
        name: "Eva Mackenzie",
        credentials: "PASA-registered podiatrist · branches in Pietermaritzburg, Hilton & Howick",
        practice: "Eva Mackenzie Podiatrist",
        role: "Diabetic foot care, biomechanics & custom orthotics across the KZN Midlands.",
        focus: ["Diabetic foot", "Custom orthotics", "Biomechanics", "General podiatry"],
        phone: "033 342 5994",
        phoneTel: "+27333425994",
        address: "274 Prince Alfred Street, Pietermaritzburg, 3201",
        city: "Pietermaritzburg · KZN Midlands",
        maps: "274 Prince Alfred Street, Pietermaritzburg",
      },
      {
        name: "Noel Nagiah",
        discipline: "Orthotist & Prosthetist",
        credentials: "HPCSA-licensed Medical Orthotist & Prosthetist · authorised Airstep stockist",
        practice: "Noel Nagiah Medical Orthotist & Prosthetist",
        role: "Custom orthoses, surgical shoes, and full prosthetic treatment plans for all levels of amputation — works alongside surgeons, podiatrists, and physiotherapists.",
        focus: ["Custom orthoses", "Diabetic surgical shoes", "Prosthetics", "Post-amputation"],
        phone: "031 566 5450",
        phoneTel: "+27315665450",
        website: "https://noelnagiah.co.za",
        websiteLabel: "noelnagiah.co.za",
        address: "Shop 146, Ridgeton Towers, 6 Aurora Drive, Umhlanga Ridge, Umhlanga, 4319",
        city: "Umhlanga · Durban",
        maps: "Ridgeton Towers, 6 Aurora Drive, Umhlanga Ridge, Umhlanga",
      },
    ],
  },
  {
    region: "Gauteng",
    entries: [
      {
        name: "Anthony Svensson",
        credentials: "PASA-registered podiatrist",
        practice: "NHC Health Centre · Northcliff",
        role: "Special interest in diabetic foot care",
        focus: ["Diabetic foot", "Wound care", "General podiatry"],
        phone: "011 214 9050",
        phoneTel: "+27112149050",
        email: "asvensson@nhcltd.com",
        address: "NHC Health Centre, Cnr Beyers Naude & Waugh Avenue, Northcliff, Johannesburg, 2115",
        city: "Northcliff · Johannesburg",
        maps: "NHC Health Centre, Cnr Beyers Naude & Waugh Avenue, Northcliff, Johannesburg",
      },
      {
        name: "Nikita Sahadew",
        credentials: "HPCSA-registered · BTech Podiatry · MSc Medical Science · PhD candidate (diabetic foot)",
        practice: "PodMed Clinical Podiatry",
        role: "Founder of PodMed. Published research in the SA Medical Journal and the Journal of Endocrinology, Metabolism & Diabetes of South Africa.",
        focus: ["Diabetic foot", "Wound care", "Custom orthotics", "Laser & gait analysis"],
        phone: "061 656 1159",
        phoneTel: "+27616561159",
        website: "https://podmed.co.za",
        websiteLabel: "podmed.co.za",
        address: "BluBird Shopping Centre, Cnr Atholl Oaklands Road & Fort Street, Birnam, Johannesburg, 2196",
        city: "Birnam · Johannesburg",
        maps: "BluBird Shopping Centre, Atholl Oaklands Road & Fort Street, Birnam, Johannesburg",
      },
      {
        name: "Pieter Roos",
        credentials: "Bachelor's in Podiatry (Wits, 1989) · 30+ years in practice",
        practice: "Fix Your Feet — Pieter Roos Podiatrist",
        role: "Passion for diabetic foot care, developed over 10 years' international experience. Saturday & home-visit appointments available.",
        focus: ["Diabetic foot care & education", "Wound care", "Biomechanics", "Nail surgery"],
        phone: "076 791 4512",
        phoneTel: "+27767914512",
        website: "https://www.fixurfeet.co.za",
        websiteLabel: "fixurfeet.co.za",
        address: "Health-Worx Medical Centre, Raslouw Lifestyle Centre (opp Mall @ Reds), Centurion, 0157",
        city: "Centurion · Pretoria",
        maps: "Raslouw Lifestyle Centre, Centurion, 0157",
      },
      {
        name: "Woudie-Marie du Plessis",
        credentials: "PASA-registered podiatrist",
        practice: "Woudie du Plessis Podiatry Practice",
        role: "General podiatry with a focus on the diabetic foot and biomechanics. Vaal Triangle.",
        focus: ["Diabetic foot", "Biomechanics", "Custom orthotics", "General podiatry"],
        phone: "016 428 5354",
        phoneTel: "+27164285354",
        address: "2 Brink Street, Duncanville, Vereeniging, 1939",
        city: "Vereeniging · Vaal Triangle",
        maps: "2 Brink Street, Duncanville, Vereeniging",
      },
      {
        name: "Humaira Ismail",
        credentials: "BTech Podiatry (UJ, 2016) · PASA Best Student & UJ Top Achiever",
        practice: "Humaira Ismail Podiatrist",
        role: "Special interest in diabetic foot management and wound care.",
        focus: ["Diabetic foot", "Wound care", "Custom orthotics", "Nail surgery"],
        phone: "010 592 0000",
        phoneTel: "+27105920000",
        email: "ihumairah@yahoo.com",
        website: "https://ihumairah.wixsite.com/hipod",
        websiteLabel: "hipod (Humaira Ismail)",
        address: "257 Jan Smuts Avenue, Dunkeld West, Randburg, 2196",
        city: "Dunkeld West · Randburg",
        maps: "257 Jan Smuts Avenue, Dunkeld West, Randburg",
      },
    ],
  },
  {
    region: "Botswana",
    entries: [
      {
        name: "Mohammed Zaid Kadwa",
        credentials: "BTech Podiatry (UJ, 2013) · PG Dip Diabetes (Univ. South Wales, 2015) · BHPC-registered",
        practice: "Podiatry Africa",
        role: "The only BHPC-registered podiatrist practising in Botswana. Special interest in diabetic foot care; previously served at Rahima Moosa Mother & Child Hospital, Johannesburg.",
        focus: ["Diabetic foot", "Custom orthotics", "Computerised gait analysis", "Sports podiatry"],
        phone: "+267 3904219",
        phoneTel: "+2673904219",
        email: "info@podiatryafrica.com",
        website: "https://podiatryafrica.com",
        websiteLabel: "podiatryafrica.com",
        address: "Plot 50360, Medswana House, Samora Machel Drive, Showgrounds, Gaborone, Botswana",
        city: "Gaborone · Botswana",
        maps: "Medswana House, Samora Machel Drive, Gaborone",
      },
    ],
  },
];

const PodIcon = {
  phone: () => (
    <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.8" strokeLinecap="round" strokeLinejoin="round">
      <path d="M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72c.13.96.37 1.9.72 2.81a2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45c.91.35 1.85.59 2.81.72A2 2 0 0 1 22 16.92z"/>
    </svg>
  ),
  pin: () => (
    <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.8" strokeLinecap="round" strokeLinejoin="round">
      <path d="M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0 1 18 0z"/>
      <circle cx="12" cy="10" r="3"/>
    </svg>
  ),
  mail: () => (
    <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.8" strokeLinecap="round" strokeLinejoin="round">
      <path d="M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z"/>
      <polyline points="22,6 12,13 2,6"/>
    </svg>
  ),
  ext: () => (
    <svg width="13" height="13" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round">
      <path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"/>
      <polyline points="15 3 21 3 21 9"/>
      <line x1="10" y1="14" x2="21" y2="3"/>
    </svg>
  ),
  chev: () => (
    <svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round">
      <polyline points="6 9 12 15 18 9"/>
    </svg>
  ),
};

const POD_PROVIDES = [
  { t: "Routine screenings", b: "Annual at minimum — more often if you are high-risk. Monofilament & vibration tests detect neuropathy before you can." },
  { t: "Custom orthotics", b: "Made to your foot's shape and pressure pattern. Fits inside Airstep's extra depth." },
  { t: "Wound & ulcer care", b: "Active wound management, debridement, offloading — the difference between healing and amputation." },
  { t: "Vascular checks", b: "Pulse, capillary refill, and Doppler assessments to catch circulation problems early." },
];

const PodCard = ({ p }) => (
  <article className="pod-card">
    <header className="pod-card-head">
      <div>
        <h4 className="pod-card-name">{p.name}</h4>
        {p.credentials && <div className="pod-card-creds">{p.credentials}</div>}
      </div>
      <span className={`pod-card-discipline ${p.discipline && p.discipline !== "Podiatrist" ? "alt" : ""}`}>
        {p.discipline || "Podiatrist"}
      </span>
    </header>

    {p.practice && <div className="pod-card-practice">{p.practice}</div>}

    {Array.isArray(p.focus) && p.focus.length > 0 && (
      <div className="pod-card-focus">
        {p.focus.map((f, i) => <span key={i} className="pod-chip">{f}</span>)}
      </div>
    )}

    {(p.phone || p.email) && (
      <div className="pod-card-contact">
        {p.phone && (
          <a className="pod-contact-row" href={`tel:${p.phoneTel || p.phone.replace(/\s+/g, "")}`}>
            <span className="pod-contact-ic"><PodIcon.phone/></span>
            <span>{p.phone}</span>
          </a>
        )}
        {p.email && (
          <a className="pod-contact-row" href={`mailto:${p.email}`}>
            <span className="pod-contact-ic"><PodIcon.mail/></span>
            <span>{p.email}</span>
          </a>
        )}
      </div>
    )}
  </article>
);

const PodRegion = ({ region, entries, open, onToggle }) => (
  <div className={`pod-region ${open ? "open" : ""}`}>
    <button className="pod-region-head" onClick={onToggle} aria-expanded={open}>
      <span className="pod-region-name">{region}</span>
      <span className="pod-region-count">{entries.length} listed</span>
      <span className="pod-region-chev"><PodIcon.chev/></span>
    </button>
    <div className="pod-region-body" hidden={!open}>
      {entries.map((p, i) => <PodCard key={i} p={p}/>)}
    </div>
  </div>
);

const Podiatrists = () => {
  const [openIdx, setOpenIdx] = React.useState(-1);

  return (
    <section className="podiatrists" id="podiatrists">
      <div className="container">
        <div className="pod-head">
          <span className="eyebrow">Your care team</span>
          <h2 className="pod-h">
            Airstep works best <em>alongside&nbsp;a&nbsp;podiatrist.</em>
          </h2>
          <p className="pod-lede">
            The shoe is one part of diabetic foot care. A diabetic-trained podiatrist is the
            other &mdash; performing routine screenings, fitting custom orthotics, managing
            wounds, and checking circulation before small problems become serious ones.
            Every specialist listed here has experience fitting Airstep shoes.
            Find a specialist near you below.
          </p>
        </div>

        <div className="pod-provides">
          <div className="pod-provides-label">What a diabetic podiatrist provides</div>
          <div className="pod-provides-grid">
            {POD_PROVIDES.map((it, i) => (
              <div key={i} className="pod-provides-item">
                <span className="pod-provides-n">{String(i+1).padStart(2,"0")}</span>
                <div>
                  <h5>{it.t}</h5>
                  <p>{it.b}</p>
                </div>
              </div>
            ))}
          </div>
        </div>

        <div className="pod-directory">
          <div className="pod-directory-head">
            <h3>Find a specialist near you</h3>
            <span className="pod-directory-note">
              {PODIATRIST_DIRECTORY.reduce((s, r) => s + r.entries.length, 0)} specialists across {PODIATRIST_DIRECTORY.length} regions · more being added
            </span>
          </div>
          <div className="pod-regions">
            {PODIATRIST_DIRECTORY.map((r, i) => (
              <PodRegion
                key={r.region}
                region={r.region}
                entries={r.entries}
                open={openIdx === i}
                onToggle={() => setOpenIdx(openIdx === i ? -1 : i)}/>
            ))}
          </div>
        </div>

        <div className="pod-cadence">
          <div className="pod-cadence-eyebrow">How often should you see one?</div>
          <div className="pod-cadence-row">
            <div className="pod-cadence-card">
              <div className="pod-cadence-freq">Annually</div>
              <div className="pod-cadence-who">If you have diabetes and no foot complications</div>
            </div>
            <div className="pod-cadence-card">
              <div className="pod-cadence-freq">Every 3–6 months</div>
              <div className="pod-cadence-who">If you have neuropathy, deformities, or a history of ulcers</div>
            </div>
            <div className="pod-cadence-card">
              <div className="pod-cadence-freq">Every 1–3 months</div>
              <div className="pod-cadence-who">If you have an active ulcer, post-amputation, or peripheral vascular disease</div>
            </div>
          </div>
          <p className="pod-cadence-foot">
            Based on IWGDF risk-stratification guidelines. Your podiatrist or doctor will set your specific cadence.
          </p>
        </div>

        <div className="pod-add-yours">
          <div>
            <strong>Are you a podiatrist or orthotist?</strong> To be listed here or to stock
            Airstep, <a href="wholesale-application.html">open a wholesale account</a> or email{" "}
            <a href="mailto:info@diabeticshoes.co.za">info@diabeticshoes.co.za</a>.
          </div>
          <div>
            <strong>Can't find someone in your area?</strong> The Podiatry Association of South Africa keeps a
            national register — <a href="https://podiatrist.co.za/podiatrists/" target="_blank" rel="noopener noreferrer">podiatrist.co.za <PodIcon.ext/></a>
          </div>
        </div>
      </div>
    </section>
  );
};

window.Podiatrists = Podiatrists;
