function ReviewsPage(){
  const [f,setF]=React.useState('all');
  const filters=[['all','All reviews'],['root-canal','Root canal'],['braces','Braces'],['aligners','Clear aligners'],['cosmetic','Cosmetic & surgery']];
  const list=f==='all'?SP_REVIEWS:SP_REVIEWS.filter(r=>r.tags.indexOf(f)>-1);
  return <React.Fragment>
    <SPHead active="Reviews"/>
    <main>
    <section className="sp-decor sp-decor-mark sp-decor-arcs" style={{background:'var(--wash-premium)',borderBottom:'1px solid var(--border-gold)',overflow:'hidden',padding:'clamp(40px,5vw,64px) 0'}}>
      <div className="sp-wrap sp-grid-2" style={{alignItems:'center'}}>
        <div className="sp-stack" style={{gap:20,alignItems:'flex-start'}}>
          <span className="sp-eyebrow" style={{color:'var(--text-gold)'}}>Patient stories</span>
          <span className="sp-hr-gold" style={{width:64,background:'linear-gradient(90deg,var(--gold-500),var(--gold-300))'}}/>
          <h1 className="sp-display" style={{fontSize:'clamp(30px,4.4vw,56px)'}}>What our patients wrote, unedited.</h1>
          <p className="sp-lead" style={{maxWidth:520}}>Every review below is reproduced as it was left on our Google profile, with the doctor’s own reply where one was given. Nothing has been rewritten into marketing copy.</p>
          <div className="sp-row" style={{gap:12}}>
            <a className="sp-plain" href={SP_CLINIC.google} target="_blank" rel="noopener"><Button size="lg" variant="accent" iconRight="arrow-right">Read them on Google</Button></a>
            <CallBtns/>
          </div>
        </div>
        <Card padding={30} style={{display:'flex',flexDirection:'column',gap:18}}>
          <span className="sp-row" style={{gap:9}}><GoogleG size={20}/><span className="sp-eyebrow">Google ratings</span></span>
          {SP_BRANCHES.map(b=><a key={b.id} className="sp-plain" href={b.google||SP_CLINIC.google} target="_blank" rel="noopener"
            style={{display:'flex',alignItems:'baseline',justifyContent:'space-between',gap:16,borderBottom:'1px solid var(--border-hairline)',paddingBottom:14}}>
            <span className="sp-stack" style={{gap:4}}>
              <span style={{fontFamily:'var(--font-display)',fontWeight:800,fontSize:38,letterSpacing:'-.02em',color:'var(--text-heading)',lineHeight:1}}>{b.rating}★</span>
              <span className="sp-data">{b.name} branch · {b.reviews}</span>
            </span>
            <Icon name="arrow-right" size={18} color="var(--brand-primary)"/>
          </a>)}
          <span className="sp-body" style={{fontSize:14}}>Each branch has its own Google listing — tap a rating to read the reviews there.</span>
        </Card>
      </div>
    </section>

    <section className="sp-sec" style={{background:'var(--surface-page)'}}>
      <div className="sp-wrap sp-stack" style={{gap:30}}>
        <div className="sp-row" style={{gap:8,justifyContent:'center'}}>
          {filters.map(([id,l])=><Tag key={id} selected={f===id} onClick={()=>setF(id)}>{l}</Tag>)}
        </div>
        <div className="sp-stack" style={{gap:22,maxWidth:920,margin:'0 auto',width:'100%'}}>
          {list.map((r,i)=><Reveal key={r.name+i} delay={(i%3)*60}><ReviewCard r={r}/></Reveal>)}
        </div>
      </div>
    </section>

    <section className="sp-sec" style={{background:'var(--wash-premium)',borderTop:'1px solid var(--border-gold)'}}>
      <div className="sp-wrap sp-stack" style={{gap:28}}>
        <Reveal><SectionHeading rule size="md" eyebrow="The work behind them" title="See the results these patients describe"/></Reveal>
        <div className="sp-grid-3">
          {SP_CASELIST.filter(c=>c.no==='07'||c.no==='05'||c.no==='08').map((c,i)=><Reveal key={c.no} delay={i*70}><Case id={c.panels[0].id}/></Reveal>)}
        </div>
        <div style={{display:'flex',justifyContent:'center'}}><a className="sp-plain" href="/smile-gallery-before-after-powai"><Button variant="emerald" iconRight="arrow-right">Full smile gallery</Button></a></div>
      </div>
    </section>

    <CTABand title="Be the next review."/>
    </main>
    <SPFooter/>
  </React.Fragment>;
}
ReactDOM.createRoot(document.getElementById('root')).render(<ReviewsPage/>);
