/* Inner pages: Services, Booking, Locations, Contact */
(function () {
  const { Button, Badge, Card, SectionHeading, Input, Select } = window.KhandelwalGasDesignSystem_68d8db;
  const ff = (hi) => (hi ? 'var(--font-hindi)' : 'var(--font-body)');

  function PageHeader({ t, eyebrow, title, sub }) {
    const hi = t.dir === 'hi';
    return (
      <div style={{ background: 'var(--navy-700)', padding: 'var(--space-8) 0' }}>
        <div className="kg-container kg-container--wide">
          <SectionHeading light eyebrow={eyebrow} title={title} description={sub} />
        </div>
      </div>
    );
  }

  /* ---------- SERVICES ---------- */
  function ServicesPage({ t, setPage }) {
    const s = t.services, hi = t.dir === 'hi';
    const I = window.KG_INFO;
    const detail = hi
      ? [['14.2 किग्रा', '5 किग्रा', 'डबल-सिलेंडर कनेक्शन'], ['19 किग्रा', '47.5 किग्रा', 'मासिक अनुबंध'], ['थोक आपूर्ति', 'पाइप गैस सिस्टम', 'समर्पित प्रबंधक'], ['ISI रेगुलेटर', 'सुरक्षा पाइप', 'हॉटप्लेट और चूल्हे']]
      : [['14.2 kg refill', '5 kg small pack', 'Double-cylinder connection'], ['19 kg cylinder', '47.5 kg cylinder', 'Monthly contracts'], ['Bulk supply', 'Reticulated piped gas', 'Dedicated account manager'], ['ISI regulators', 'Safety hoses', 'Hotplates & stoves']];
    // primary action per service: domestic/commercial → book a refill; industrial → enquiry; accessories → call
    const action = hi
      ? [['रिफिल बुक करें', 'book'], ['रिफिल बुक करें', 'book'], ['पूछताछ करें', 'contact'], ['अभी कॉल करें', 'call']]
      : [['Book a refill', 'book'], ['Book a refill', 'book'], ['Make an enquiry', 'contact'], ['Call to order', 'call']];
    return (
      <main>
        <PageHeader t={t} eyebrow={s.eyebrow} title={s.title} sub={s.sub} />
        <section style={{ padding: 'var(--space-9) 0' }}>
          <div className="kg-container kg-container--wide" style={{ display: 'grid', gridTemplateColumns: '1fr 1fr', gap: 'var(--space-6)' }}>
            {s.items.map((it, i) => (
              <Card key={i} accentTop={i === 0} style={{ display: 'flex', gap: 'var(--space-5)' }}>
                <div style={{ width: 58, height: 58, flex: 'none', borderRadius: 'var(--radius-md)', background: 'var(--orange-50)', display: 'flex', alignItems: 'center', justifyContent: 'center' }}>
                  <i data-lucide={it.icon} style={{ width: 28, height: 28, color: 'var(--orange-600)' }}></i>
                </div>
                <div style={{ flex: 1 }}>
                  <div style={{ display: 'flex', alignItems: 'center', gap: 8 }}>
                    <h3 style={{ font: 'var(--text-h3)', fontFamily: ff(hi), color: 'var(--navy-700)' }}>{it.title}</h3>
                    {it.tag && <Badge tone="accent" solid>{it.tag}</Badge>}
                  </div>
                  <p style={{ fontSize: 'var(--fs-sm)', color: 'var(--ink-500)', lineHeight: 1.6, margin: '8px 0 14px', fontFamily: ff(hi) }}>{it.desc}</p>
                  <ul style={{ listStyle: 'none', padding: 0, margin: 0, display: 'flex', flexDirection: 'column', gap: 8 }}>
                    {detail[i].map((d, j) => (
                      <li key={j} style={{ display: 'flex', gap: 8, alignItems: 'center', fontSize: 'var(--fs-sm)', color: 'var(--ink-700)', fontFamily: ff(hi) }}>
                        <i data-lucide="check" style={{ width: 15, height: 15, color: 'var(--orange-600)', flex: 'none' }}></i>{d}
                      </li>
                    ))}
                  </ul>
                  <div style={{ marginTop: 18 }}>
                    {action[i][1] === 'call' ? (
                      <Button variant="outline" size="sm" as="a" href={'tel:' + I.phoneRaw}>{action[i][0]}</Button>
                    ) : (
                      <Button variant="outline" size="sm" onClick={() => setPage(action[i][1])}>{action[i][0]}</Button>
                    )}
                  </div>
                </div>
              </Card>
            ))}
          </div>
        </section>
        {/* closing CTA */}
        <section style={{ padding: '0 0 var(--space-9)' }}>
          <div className="kg-container kg-container--wide">
            <div style={{ background: 'var(--navy-700)', borderRadius: 'var(--radius-xl)', padding: 'var(--space-8)', display: 'flex', justifyContent: 'space-between', alignItems: 'center', gap: 'var(--space-6)', flexWrap: 'wrap', position: 'relative', overflow: 'hidden' }}>
              <div style={{ position: 'absolute', right: -30, top: -30, width: 200, height: 200, borderRadius: '50%', background: 'radial-gradient(circle, rgba(194,94,44,0.4), transparent 70%)' }}></div>
              <div style={{ position: 'relative' }}>
                <h2 style={{ font: 'var(--text-h2)', fontFamily: hi ? 'var(--font-hindi)' : 'var(--font-display)', color: '#fff', margin: 0, maxWidth: 560 }}>{hi ? 'अपनी गैस की ज़रूरत बताएँ' : 'Tell us what you need'}</h2>
                <p style={{ color: 'var(--text-on-dark-muted)', marginTop: 10, marginBottom: 0, fontFamily: ff(hi) }}>{hi ? 'रिफिल बुक करें या हमें सीधे कॉल करें — हम बाकी संभाल लेंगे।' : 'Book a refill or call us directly — we’ll handle the rest.'}</p>
              </div>
              <div style={{ position: 'relative', display: 'flex', gap: 12, flex: 'none', flexWrap: 'wrap' }}>
                <Button variant="accent" size="lg" onClick={() => setPage('book')}>{t.cta_book}</Button>
                <Button variant="outline" size="lg" as="a" href={'tel:' + I.phoneRaw} style={{ color: '#fff', borderColor: 'rgba(255,255,255,0.4)' }} iconLeft={<i data-lucide="phone" style={{ width: 17, height: 17 }}></i>}>{t.cta_call}</Button>
              </div>
            </div>
          </div>
        </section>
      </main>
    );
  }

  /* ---------- BOOKING ---------- */
  function BookingPage({ t }) {
    const b = t.book, hi = t.dir === 'hi';
    const [done, setDone] = React.useState(false);
    return (
      <main>
        <PageHeader t={t} eyebrow={b.eyebrow} title={b.title} sub={b.sub} />
        <section style={{ padding: 'var(--space-9) 0' }}>
          <div className="kg-container" style={{ maxWidth: 760 }}>
            <Card accentTop padded>
              {done ? (
                <div style={{ textAlign: 'center', padding: 'var(--space-7) 0' }}>
                  <div style={{ width: 64, height: 64, margin: '0 auto 18px', borderRadius: '50%', background: 'var(--success-100)', display: 'flex', alignItems: 'center', justifyContent: 'center' }}>
                    <i data-lucide="check-circle-2" style={{ width: 34, height: 34, color: 'var(--success-600)' }}></i>
                  </div>
                  <h3 style={{ font: 'var(--text-h3)', fontFamily: ff(hi), color: 'var(--navy-700)' }}>{hi ? 'बुकिंग प्राप्त हुई' : 'Booking received'}</h3>
                  <p style={{ color: 'var(--ink-500)', marginTop: 8, fontFamily: ff(hi) }}>{b.done}</p>
                  <div style={{ marginTop: 22 }}><Button variant="outline" onClick={() => setDone(false)}>{hi ? 'नई बुकिंग' : 'New booking'}</Button></div>
                </div>
              ) : (
                <form onSubmit={(e) => { e.preventDefault(); setDone(true); }}>
                  <div style={{ display: 'grid', gridTemplateColumns: '1fr 1fr', gap: 'var(--space-5)' }}>
                    <Input label={b.f_mobile} prefix="+91" placeholder="98765 43210" required />
                    <Input label={b.f_consumer} placeholder="HP1234567" />
                    <Select label={b.f_type} required>
                      <option>{hi ? 'घरेलू 14.2 किग्रा' : 'Domestic 14.2 kg'}</option>
                      <option>{hi ? 'घरेलू 5 किग्रा' : 'Domestic 5 kg'}</option>
                      <option>{hi ? 'व्यावसायिक 19 किग्रा' : 'Commercial 19 kg'}</option>
                      <option>{hi ? 'व्यावसायिक 47.5 किग्रा' : 'Commercial 47.5 kg'}</option>
                    </Select>
                    <Input label={b.f_pin} placeholder="302003" hint={hi ? 'जयपुर सेवा क्षेत्र' : 'Jaipur service area'} required />
                  </div>
                  <div style={{ marginTop: 'var(--space-5)' }}>
                    <span style={{ font: 'var(--fw-medium) var(--fs-sm)/1.3 var(--font-body)', fontFamily: ff(hi), color: 'var(--navy-700)', display: 'block', marginBottom: 10 }}>{b.f_pay}</span>
                    <div style={{ display: 'flex', gap: 12 }}>
                      {[b.pay_prepaid, b.pay_cod].map((p, i) => (
                        <label key={i} style={{ flex: 1, display: 'flex', alignItems: 'center', gap: 10, padding: '13px 16px', border: '1.5px solid var(--line-200)', borderRadius: 'var(--radius-md)', cursor: 'pointer', fontFamily: ff(hi), fontSize: 'var(--fs-sm)', fontWeight: 600, color: 'var(--navy-700)' }}>
                          <input type="radio" name="pay" defaultChecked={i === 0} style={{ accentColor: 'var(--orange-600)' }} />{p}
                        </label>
                      ))}
                    </div>
                  </div>
                  <div style={{ marginTop: 'var(--space-6)' }}>
                    <Button variant="accent" size="lg" block type="submit">{b.submit}</Button>
                  </div>
                </form>
              )}
            </Card>
          </div>
        </section>
      </main>
    );
  }

  /* ---------- LOCATIONS ---------- */
  function LocationsPage({ t }) {
    const l = t.locations, I = window.KG_INFO, hi = t.dir === 'hi';
    return (
      <main>
        <PageHeader t={t} eyebrow={l.eyebrow} title={l.title} sub={l.sub} />
        <section style={{ padding: 'var(--space-9) 0' }}>
          <div className="kg-container kg-container--wide" style={{ display: 'grid', gridTemplateColumns: '1fr 1.1fr', gap: 'var(--space-7)' }}>
            <div style={{ display: 'flex', flexDirection: 'column', gap: 'var(--space-5)' }}>
              {[[l.agency, I.address, 'map-pin'], [l.godown, hi ? 'औद्योगिक क्षेत्र, जयपुर' : 'Industrial Area, Jaipur', 'warehouse']].map(([title, addr, icon], i) => (
                <Card key={i} style={{ display: 'flex', gap: 16 }}>
                  <div style={{ width: 46, height: 46, flex: 'none', borderRadius: 'var(--radius-md)', background: 'var(--navy-50)', display: 'flex', alignItems: 'center', justifyContent: 'center' }}>
                    <i data-lucide={icon} style={{ width: 22, height: 22, color: 'var(--navy-700)' }}></i>
                  </div>
                  <div>
                    <h3 style={{ font: 'var(--text-h4)', fontFamily: ff(hi), color: 'var(--navy-700)' }}>{title}</h3>
                    <p style={{ fontSize: 'var(--fs-sm)', color: 'var(--ink-500)', marginTop: 6, fontFamily: ff(hi), lineHeight: 1.6 }}>{addr}</p>
                    <p style={{ fontSize: 'var(--fs-sm)', color: 'var(--ink-700)', marginTop: 8, display: 'flex', alignItems: 'center', gap: 7, fontFamily: ff(hi) }}><i data-lucide="clock" style={{ width: 15, height: 15, color: 'var(--orange-600)' }}></i>{l.hours}</p>
                  </div>
                </Card>
              ))}
              <Card style={{ display: 'flex', gap: 16, alignItems: 'center', background: 'var(--orange-50)', border: '1px solid var(--orange-200)' }}>
                <i data-lucide="phone-call" style={{ width: 24, height: 24, color: 'var(--orange-600)', flex: 'none' }}></i>
                <div>
                  <div style={{ fontSize: 'var(--fs-sm)', color: 'var(--ink-500)', fontFamily: ff(hi) }}>{hi ? 'डिलीवरी हेल्पलाइन' : 'Delivery helpline'}</div>
                  <a href={'tel:' + I.phoneRaw} style={{ font: 'var(--text-h4)', color: 'var(--navy-700)' }}>{I.phone}</a>
                </div>
              </Card>
            </div>
            {/* map */}
            <div style={{ borderRadius: 'var(--radius-xl)', overflow: 'hidden', border: '1px solid var(--line-200)', boxShadow: 'var(--shadow-sm)', minHeight: 420, position: 'relative', background: 'var(--navy-50)' }}>
              <iframe title="map" src="https://www.openstreetmap.org/export/embed.html?bbox=75.80%2C26.90%2C75.84%2C26.93&layer=mapnik&marker=26.9165,75.8235" style={{ width: '100%', height: '100%', border: 0, position: 'absolute', inset: 0 }}></iframe>
              <div style={{ position: 'absolute', left: 18, bottom: 18, background: 'var(--white)', borderRadius: 'var(--radius-md)', padding: '12px 16px', boxShadow: 'var(--shadow-md)', display: 'flex', alignItems: 'center', gap: 10 }}>
                <i data-lucide="map-pin" style={{ width: 18, height: 18, color: 'var(--orange-600)' }}></i>
                <span style={{ fontSize: 'var(--fs-sm)', fontWeight: 600, color: 'var(--navy-700)', fontFamily: ff(hi) }}>{hi ? 'सांगानेरी गेट, जयपुर' : 'Sanganeri Gate, Jaipur'}</span>
              </div>
            </div>
          </div>
        </section>
      </main>
    );
  }

  /* ---------- CONTACT (incl. locations) ---------- */
  function ContactPage({ t }) {
    const c = t.contact, l = t.locations, I = window.KG_INFO, hi = t.dir === 'hi';
    const methods = [
      [c.call, I.phone, 'phone', 'tel:' + I.phoneRaw, hi ? 'सोम–शनि · सुबह 9 – शाम 7' : 'Mon–Sat · 9 AM – 7 PM'],
      [c.email, I.email, 'mail', 'mailto:' + I.email, hi ? 'हम 24 घंटे में जवाब देते हैं' : 'We reply within 24 hours'],
    ];
    return (
      <main>
        <PageHeader t={t} eyebrow={t.nav.contact} title={c.title} sub={I.address} />
        <section style={{ padding: 'var(--space-9) 0' }}>
          <div className="kg-container kg-container--wide" style={{ display: 'grid', gridTemplateColumns: '1fr 1.1fr', gap: 'var(--space-7)', alignItems: 'start' }}>
            {/* left: ways to reach us */}
            <div style={{ display: 'flex', flexDirection: 'column', gap: 'var(--space-5)' }}>
              {methods.map(([label, val, icon, href, hint], i) => (
                <a key={i} href={href} style={{ textDecoration: 'none' }}>
                  <Card hover style={{ display: 'flex', gap: 16, alignItems: 'center' }}>
                    <div style={{ width: 52, height: 52, flex: 'none', borderRadius: 'var(--radius-md)', background: 'var(--orange-50)', display: 'flex', alignItems: 'center', justifyContent: 'center' }}>
                      <i data-lucide={icon} style={{ width: 24, height: 24, color: 'var(--orange-600)' }}></i>
                    </div>
                    <div>
                      <div style={{ fontSize: 'var(--fs-xs)', textTransform: 'uppercase', letterSpacing: 'var(--ls-wide)', color: 'var(--ink-400)', fontWeight: 600, fontFamily: ff(hi) }}>{label}</div>
                      <div style={{ font: 'var(--text-h4)', color: 'var(--navy-700)', margin: '3px 0 2px' }}>{val}</div>
                      <div style={{ fontSize: 'var(--fs-sm)', color: 'var(--ink-500)', fontFamily: ff(hi) }}>{hint}</div>
                    </div>
                  </Card>
                </a>
              ))}
              {/* main agency / address */}
              <Card style={{ display: 'flex', gap: 16 }}>
                <div style={{ width: 52, height: 52, flex: 'none', borderRadius: 'var(--radius-md)', background: 'var(--navy-50)', display: 'flex', alignItems: 'center', justifyContent: 'center' }}>
                  <i data-lucide="map-pin" style={{ width: 24, height: 24, color: 'var(--navy-700)' }}></i>
                </div>
                <div>
                  <div style={{ fontSize: 'var(--fs-xs)', textTransform: 'uppercase', letterSpacing: 'var(--ls-wide)', color: 'var(--ink-400)', fontWeight: 600, fontFamily: ff(hi) }}>{l.agency}</div>
                  <p style={{ fontSize: 'var(--fs-md)', color: 'var(--navy-700)', fontWeight: 500, margin: '4px 0 0', lineHeight: 1.5, fontFamily: ff(hi) }}>{I.address}</p>
                  <p style={{ fontSize: 'var(--fs-sm)', color: 'var(--ink-700)', marginTop: 8, display: 'flex', alignItems: 'center', gap: 7, fontFamily: ff(hi) }}><i data-lucide="clock" style={{ width: 15, height: 15, color: 'var(--orange-600)' }}></i>{l.hours}</p>
                </div>
              </Card>
            </div>
            {/* right: map */}
            <div style={{ borderRadius: 'var(--radius-xl)', overflow: 'hidden', border: '1px solid var(--line-200)', boxShadow: 'var(--shadow-sm)', minHeight: 440, position: 'relative', background: 'var(--navy-50)' }}>
              <iframe title="map" src="https://www.openstreetmap.org/export/embed.html?bbox=75.80%2C26.90%2C75.84%2C26.93&layer=mapnik&marker=26.9165,75.8235" style={{ width: '100%', height: '100%', border: 0, position: 'absolute', inset: 0 }}></iframe>
              <div style={{ position: 'absolute', left: 18, bottom: 18, background: 'var(--white)', borderRadius: 'var(--radius-md)', padding: '12px 16px', boxShadow: 'var(--shadow-md)', display: 'flex', alignItems: 'center', gap: 10 }}>
                <i data-lucide="map-pin" style={{ width: 18, height: 18, color: 'var(--orange-600)' }}></i>
                <span style={{ fontSize: 'var(--fs-sm)', fontWeight: 600, color: 'var(--navy-700)', fontFamily: ff(hi) }}>{hi ? 'सांगानेरी गेट, जयपुर' : 'Sanganeri Gate, Jaipur'}</span>
              </div>
            </div>
          </div>
        </section>
      </main>
    );
  }

  /* ---------- NEW CONNECTION ---------- */
  function ConnectionPage({ t }) {
    const c = t.connection, hi = t.dir === 'hi';
    const [done, setDone] = React.useState(false);
    return (
      <main>
        <PageHeader t={t} eyebrow={c.eyebrow} title={c.title} sub={c.sub} />
        <section style={{ padding: 'var(--space-9) 0' }}>
          <div className="kg-container kg-container--wide" style={{ display: 'grid', gridTemplateColumns: '1.4fr 1fr', gap: 'var(--space-7)', alignItems: 'start' }}>
            <Card accentTop padded>
              {done ? (
                <div style={{ textAlign: 'center', padding: 'var(--space-7) 0' }}>
                  <div style={{ width: 64, height: 64, margin: '0 auto 18px', borderRadius: '50%', background: 'var(--success-100)', display: 'flex', alignItems: 'center', justifyContent: 'center' }}>
                    <i data-lucide="check-circle-2" style={{ width: 34, height: 34, color: 'var(--success-600)' }}></i>
                  </div>
                  <h3 style={{ font: 'var(--text-h3)', fontFamily: ff(hi), color: 'var(--navy-700)' }}>{hi ? 'आवेदन प्राप्त' : 'Application received'}</h3>
                  <p style={{ color: 'var(--ink-500)', marginTop: 8, fontFamily: ff(hi) }}>{c.done}</p>
                  <div style={{ marginTop: 22 }}><Button variant="outline" onClick={() => setDone(false)}>{hi ? 'नया आवेदन' : 'New application'}</Button></div>
                </div>
              ) : (
                <form onSubmit={(e) => { e.preventDefault(); setDone(true); }}>
                  <div style={{ display: 'grid', gridTemplateColumns: '1fr 1fr', gap: 'var(--space-5)' }}>
                    <Input label={c.f_name} placeholder={hi ? 'पूरा नाम' : 'Your full name'} required />
                    <Input label={c.f_mobile} prefix="+91" placeholder="98765 43210" required />
                  </div>
                  <div style={{ marginTop: 'var(--space-5)' }}>
                    <Select label={c.f_sector} required>
                      {c.sectors.map((o, i) => <option key={i}>{o}</option>)}
                    </Select>
                  </div>
                  <div style={{ marginTop: 'var(--space-5)', display: 'flex', flexDirection: 'column', gap: 6 }}>
                    <label style={{ font: 'var(--fw-medium) var(--fs-sm)/1.3 var(--font-body)', fontFamily: ff(hi), color: 'var(--navy-700)' }}>{c.f_address}</label>
                    <textarea rows={3} placeholder={hi ? 'घर / प्रतिष्ठान का पता' : 'House / establishment address'} style={{ border: '1.5px solid var(--line-200)', borderRadius: 'var(--radius-md)', padding: '12px 14px', font: 'var(--text-body-base)', fontFamily: ff(hi), color: 'var(--ink-900)', resize: 'vertical', outline: 'none' }} />
                  </div>
                  <label style={{ display: 'flex', gap: 10, alignItems: 'flex-start', marginTop: 'var(--space-5)', fontSize: 'var(--fs-sm)', color: 'var(--ink-700)', fontFamily: ff(hi), cursor: 'pointer' }}>
                    <input type="checkbox" defaultChecked style={{ accentColor: 'var(--orange-600)', marginTop: 3 }} />{c.f_kyc}
                  </label>
                  <div style={{ marginTop: 'var(--space-6)' }}>
                    <Button variant="accent" size="lg" block type="submit">{c.submit}</Button>
                  </div>
                </form>
              )}
            </Card>
            <Card style={{ background: 'var(--navy-700)' }}>
              <h3 style={{ font: 'var(--text-h4)', fontFamily: ff(hi), color: 'var(--text-on-dark)' }}>{c.need_title}</h3>
              <ul style={{ listStyle: 'none', padding: 0, margin: '18px 0 0', display: 'flex', flexDirection: 'column', gap: 14 }}>
                {c.need.map((n, i) => (
                  <li key={i} style={{ display: 'flex', gap: 11, alignItems: 'center', color: 'var(--text-on-dark)', fontSize: 'var(--fs-sm)', fontFamily: ff(hi) }}>
                    <span style={{ width: 24, height: 24, flex: 'none', borderRadius: '50%', background: 'rgba(255,255,255,0.1)', display: 'flex', alignItems: 'center', justifyContent: 'center' }}>
                      <i data-lucide="check" style={{ width: 14, height: 14, color: 'var(--orange-400)' }}></i>
                    </span>{n}
                  </li>
                ))}
              </ul>
              <div style={{ marginTop: 22, paddingTop: 18, borderTop: '1px solid rgba(255,255,255,0.12)', display: 'flex', alignItems: 'center', gap: 10 }}>
                <i data-lucide="phone" style={{ width: 18, height: 18, color: 'var(--orange-400)' }}></i>
                <a href={'tel:' + window.KG_INFO.phoneRaw} style={{ color: 'var(--text-on-dark)', fontWeight: 600 }}>{window.KG_INFO.phone}</a>
              </div>
            </Card>
          </div>
        </section>
      </main>
    );
  }

  /* ---------- SUPPORT / COMPLAINTS ---------- */
  function SupportPage({ t }) {
    const sp = t.support, hi = t.dir === 'hi';
    const [done, setDone] = React.useState(false);
    return (
      <main>
        <PageHeader t={t} eyebrow={sp.eyebrow} title={sp.title} sub={sp.sub} />
        <section style={{ padding: 'var(--space-9) 0' }}>
          <div className="kg-container kg-container--wide">
            <div style={{ display: 'flex', gap: 14, alignItems: 'center', background: 'var(--danger-100)', border: '1px solid #F0C8C2', borderRadius: 'var(--radius-md)', padding: '16px 20px', marginBottom: 'var(--space-7)' }}>
              <i data-lucide="alert-triangle" style={{ width: 22, height: 22, color: 'var(--danger-600)', flex: 'none' }}></i>
              <span style={{ fontSize: 'var(--fs-sm)', color: 'var(--danger-600)', fontWeight: 600, fontFamily: ff(hi) }}>{sp.emergency}</span>
              <a href={'tel:' + window.KG_INFO.phoneRaw} style={{ marginLeft: 'auto', flex: 'none' }}><Button variant="primary" size="sm" iconLeft={<i data-lucide="phone" style={{ width: 15, height: 15 }}></i>}>{window.KG_INFO.phone}</Button></a>
            </div>
            <div style={{ display: 'grid', gridTemplateColumns: '1.4fr 1fr', gap: 'var(--space-7)', alignItems: 'start' }}>
              <Card accentTop padded>
                {done ? (
                  <div style={{ textAlign: 'center', padding: 'var(--space-7) 0' }}>
                    <div style={{ width: 64, height: 64, margin: '0 auto 18px', borderRadius: '50%', background: 'var(--success-100)', display: 'flex', alignItems: 'center', justifyContent: 'center' }}>
                      <i data-lucide="check-circle-2" style={{ width: 34, height: 34, color: 'var(--success-600)' }}></i>
                    </div>
                    <h3 style={{ font: 'var(--text-h3)', fontFamily: ff(hi), color: 'var(--navy-700)' }}>{hi ? 'धन्यवाद' : 'Thank you'}</h3>
                    <p style={{ color: 'var(--ink-500)', marginTop: 8, fontFamily: ff(hi) }}>{sp.done}</p>
                    <div style={{ marginTop: 22 }}><Button variant="outline" onClick={() => setDone(false)}>{hi ? 'नया अनुरोध' : 'New request'}</Button></div>
                  </div>
                ) : (
                  <form onSubmit={(e) => { e.preventDefault(); setDone(true); }}>
                    <div style={{ display: 'grid', gridTemplateColumns: '1fr 1fr', gap: 'var(--space-5)' }}>
                      <Select label={sp.f_type} required>
                        {sp.types.map((o, i) => <option key={i}>{o}</option>)}
                      </Select>
                      <Input label={sp.f_consumer} prefix="+91" placeholder="98765 43210" />
                    </div>
                    <div style={{ marginTop: 'var(--space-5)', display: 'flex', flexDirection: 'column', gap: 6 }}>
                      <label style={{ font: 'var(--fw-medium) var(--fs-sm)/1.3 var(--font-body)', fontFamily: ff(hi), color: 'var(--navy-700)' }}>{sp.f_message}</label>
                      <textarea rows={4} placeholder={hi ? 'अपना संदेश यहाँ लिखें…' : 'Write your message here…'} style={{ border: '1.5px solid var(--line-200)', borderRadius: 'var(--radius-md)', padding: '12px 14px', font: 'var(--text-body-base)', fontFamily: ff(hi), color: 'var(--ink-900)', resize: 'vertical', outline: 'none' }} />
                    </div>
                    <div style={{ marginTop: 'var(--space-6)' }}>
                      <Button variant="accent" size="lg" block type="submit">{sp.submit}</Button>
                    </div>
                  </form>
                )}
              </Card>
              <Card style={{ display: 'flex', flexDirection: 'column', gap: 16 }}>
                {[[t.contact.call, window.KG_INFO.phone, 'phone', 'tel:' + window.KG_INFO.phoneRaw], [t.contact.email, window.KG_INFO.email, 'mail', 'mailto:' + window.KG_INFO.email]].map(([label, val, icon, href], i) => (
                  <a key={i} href={href} style={{ display: 'flex', gap: 13, alignItems: 'center', textDecoration: 'none' }}>
                    <div style={{ width: 44, height: 44, flex: 'none', borderRadius: 'var(--radius-md)', background: 'var(--orange-50)', display: 'flex', alignItems: 'center', justifyContent: 'center' }}>
                      <i data-lucide={icon} style={{ width: 20, height: 20, color: 'var(--orange-600)' }}></i>
                    </div>
                    <div>
                      <div style={{ fontSize: 'var(--fs-xs)', textTransform: 'uppercase', letterSpacing: 'var(--ls-wide)', color: 'var(--ink-400)', fontWeight: 600, fontFamily: ff(hi) }}>{label}</div>
                      <div style={{ fontSize: 'var(--fs-md)', color: 'var(--navy-700)', fontWeight: 600 }}>{val}</div>
                    </div>
                  </a>
                ))}
              </Card>
            </div>
          </div>
        </section>
      </main>
    );
  }

  window.KGServicesPage = ServicesPage;
  window.KGBookingPage = BookingPage;
  window.KGLocationsPage = LocationsPage;
  window.KGContactPage = ContactPage;
  window.KGConnectionPage = ConnectionPage;
  window.KGSupportPage = SupportPage;
})();
