// kgb-site.jsx — Kish Golden Bridge · bilingual (FA-RTL default / EN) homepage
(function () {
  const { t, Photo, Ic, HormuzMap } = window.KGB;
  const { useState, useEffect } = React;
  const { fonts, Wrap, Eyebrow, Nav, Footer } = window.KGBLayout;

  // ---------- Route map (graphical) ----------
  function RouteMap({ nodes, lang, f }) {
    return (
      <svg viewBox="0 0 560 440" style={{ width: '100%', height: '100%', display: 'block' }}>
        <defs>
          <radialGradient id="cmGlow" cx="50%" cy="42%" r="60%">
            <stop offset="0%" stopColor="#15304D" stopOpacity="0.9" />
            <stop offset="100%" stopColor="#07182C" stopOpacity="0" />
          </radialGradient>
          <linearGradient id="cmRoute" x1="0" y1="0" x2="1" y2="1">
            <stop offset="0%" stopColor="#E7CE8A" /><stop offset="100%" stopColor="#C9A24A" />
          </linearGradient>
        </defs>
        <rect width="560" height="440" fill="url(#cmGlow)" />
        {[60, 130, 200, 270, 340, 410].map((y) => <line key={'h' + y} x1="20" y1={y} x2="540" y2={y} stroke="rgba(231,206,138,0.07)" />)}
        {[70, 160, 250, 340, 430, 520].map((x) => <line key={'v' + x} x1={x} y1="30" x2={x} y2="420" stroke="rgba(231,206,138,0.07)" />)}
        <path d="M40 90 Q140 40 250 80 T520 70 L540 30 L20 30 Z" fill="rgba(21,48,77,0.45)" />
        <path d="M30 400 Q160 360 300 392 T545 380 L545 420 L20 420 Z" fill="rgba(21,48,77,0.45)" />
        <path d="M90 350 C 190 300, 200 180, 320 170 S 470 130, 500 95" fill="none" stroke="url(#cmRoute)" strokeWidth="2.5" strokeLinecap="round" strokeDasharray="7 9" style={{ strokeDashoffset: 320, animation: 'kgbDash 9s linear infinite' }} />
        {[[90, 350], [320, 170], [500, 95]].map(([x, y], i) => (
          <g key={i}>
            <circle cx={x} cy={y} r="11" fill="#C9A24A" opacity="0.18" style={{ transformOrigin: `${x}px ${y}px`, animation: 'kgbPulse 2.6s ease-in-out infinite' }} />
            <circle cx={x} cy={y} r="4.5" fill="#E7CE8A" />
            <text x={x + (lang === 'fa' ? -14 : 14)} y={y + 4} textAnchor={lang === 'fa' ? 'end' : 'start'} fill="rgba(244,241,234,0.72)" fontFamily={f.label} fontSize="12">{nodes[i]}</text>
          </g>
        ))}
        <g style={{ animation: 'kgbFloat 3s ease-in-out infinite' }}>
          <circle cx="220" cy="232" r="16" fill="none" stroke="#E7CE8A" strokeWidth="1.5" opacity="0.5" />
          <circle cx="220" cy="232" r="6" fill="#E7CE8A" />
        </g>
      </svg>
    );
  }

  // ---------- Hero (image-embedded) ----------
  function Hero({ c, lang, f, rtl }) {
    return (
      <div style={{ position: 'relative', overflow: 'hidden', borderBottom: `1px solid ${t.line}` }}>
        {/* bg image */}
        <div style={{ position: 'absolute', inset: 0 }}>
          <Photo dark labelAlign="br" label={c.hero.img} src="assets/img/hanis-profile.jpg" pos="center 52%" h="100%" style={{ position: 'absolute', inset: 0 }}
            accent={`linear-gradient(${rtl ? '270deg' : '90deg'}, rgba(7,24,44,0.96) 0%, rgba(7,24,44,0.78) 42%, rgba(7,24,44,0.30) 100%)`} />
        </div>
        <Wrap style={{ position: 'relative', paddingTop: 96, paddingBottom: 84, minHeight: 600, display: 'flex', flexDirection: 'column', justifyContent: 'center' }}>
          <div style={{ maxWidth: 660 }}>
            <Eyebrow f={f} lang={lang} dot>{c.hero.live}</Eyebrow>
            <h1 style={{ fontFamily: f.head, fontSize: lang === 'fa' ? 56 : 62, fontWeight: lang === 'fa' ? 800 : 600, lineHeight: lang === 'fa' ? 1.25 : 1.06, margin: '22px 0 0', color: t.cloud, letterSpacing: '-0.01em' }}>
              {c.hero.h1a}<br /><span style={{ color: t.gold }}>{c.hero.h1b}</span>
            </h1>
            <p style={{ fontFamily: f.body, fontSize: 18, lineHeight: lang === 'fa' ? 2 : 1.62, color: 'rgba(244,241,234,0.78)', marginTop: 24, maxWidth: 540 }}>{c.hero.sub}</p>
            <div style={{ display: 'flex', gap: 14, marginTop: 36, flexWrap: 'wrap' }}>
              <span style={{ background: t.gold, color: t.navy900, fontFamily: f.body, fontWeight: 700, fontSize: 15.5, padding: '15px 28px', borderRadius: 3, display: 'inline-flex', alignItems: 'center', gap: 10, cursor: 'pointer', whiteSpace: 'nowrap' }}>{c.hero.cta1}<Ic name="arrow" size={18} style={rtl ? { transform: 'scaleX(-1)' } : null} /></span>
              <span style={{ border: '1px solid rgba(244,241,234,0.4)', color: t.cloud, fontFamily: f.body, fontWeight: 600, fontSize: 15.5, padding: '15px 28px', borderRadius: 3, cursor: 'pointer', whiteSpace: 'nowrap' }}>{c.hero.cta2}</span>
            </div>
            {/* glass tracker */}
            <div style={{ marginTop: 40, background: 'rgba(255,255,255,0.05)', border: `1px solid ${t.line}`, borderRadius: 5, padding: 18, backdropFilter: 'blur(8px)', maxWidth: 520 }}>
              <div style={{ fontFamily: f.label, fontSize: lang === 'fa' ? 12.5 : 10.5, letterSpacing: lang === 'fa' ? '0' : '0.14em', textTransform: lang === 'fa' ? 'none' : 'uppercase', color: 'rgba(244,241,234,0.6)', marginBottom: 12 }}>{c.hero.track}</div>
              <div style={{ display: 'flex', gap: 10 }}>
                <div style={{ flex: 1, height: 48, borderRadius: 4, background: 'rgba(7,24,44,0.55)', border: `1px solid ${t.line}`, display: 'flex', alignItems: 'center', padding: '0 14px', color: 'rgba(244,241,234,0.5)', fontFamily: f.body, fontSize: 14 }}>{c.hero.trackPh}</div>
                <span style={{ background: t.gold, color: t.navy900, fontFamily: f.body, fontWeight: 700, fontSize: 14.5, padding: '0 24px', borderRadius: 4, display: 'inline-flex', alignItems: 'center', gap: 8, cursor: 'pointer' }}>{c.hero.trackBtn}<Ic name="compass" size={17} /></span>
              </div>
            </div>
          </div>
        </Wrap>
      </div>
    );
  }

  // ---------- Live ops + route map ----------
  function Ops({ c, lang, f }) {
    const o = c.ops;
    return (
      <div style={{ borderBottom: `1px solid ${t.line}`, background: 'rgba(7,24,44,0.5)' }}>
        <Wrap style={{ display: 'flex', alignItems: 'stretch', gap: 56, padding: '64px 48px', flexWrap: 'wrap' }}>
          <div style={{ flex: '1 1 360px', display: 'flex', flexDirection: 'column', justifyContent: 'center' }}>
            <Eyebrow f={f} lang={lang} color={t.goldLt}>{o.tag}</Eyebrow>
            <h2 style={{ fontFamily: f.head, fontSize: lang === 'fa' ? 38 : 42, fontWeight: lang === 'fa' ? 800 : 600, color: t.cloud, margin: '16px 0 0', letterSpacing: '-0.01em' }}>{o.title}</h2>
            <p style={{ fontFamily: f.body, fontSize: 16.5, lineHeight: lang === 'fa' ? 2 : 1.65, color: 'rgba(244,241,234,0.72)', marginTop: 18, maxWidth: 460 }}>{o.desc}</p>
            {/* status card */}
            <div style={{ marginTop: 28, background: 'rgba(255,255,255,0.04)', border: `1px solid ${t.line}`, borderRadius: 6, padding: '18px 22px', maxWidth: 380 }}>
              <div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center', marginBottom: 12 }}>
                <span style={{ fontFamily: f.head, fontSize: 20, fontWeight: 700, color: t.cloud, whiteSpace: 'nowrap' }}>{o.vessel}</span>
                <span style={{ fontFamily: f.label, fontSize: 11, color: '#5fbf8f', border: '1px solid rgba(95,191,143,0.4)', padding: '4px 9px', borderRadius: 4 }}>{o.status}</span>
              </div>
              {o.rows.map(([a, b], i) => (
                <div key={i} style={{ display: 'flex', justifyContent: 'space-between', fontFamily: f.body, fontSize: 13.5, padding: '6px 0', borderTop: i ? `1px solid ${t.line}` : 'none', color: 'rgba(244,241,234,0.72)' }}>
                  <span>{a}</span><span style={{ color: t.goldLt, direction: 'ltr' }}>{b}</span>
                </div>
              ))}
            </div>
          </div>
          <div style={{ flex: '1 1 420px', minHeight: 420, position: 'relative', background: 'rgba(7,24,44,0.55)', border: `1px solid ${t.line}`, borderRadius: 8, overflow: 'hidden' }}>
            <HormuzMap lang={lang} />
            {/* live badge */}
            <div style={{ position: 'absolute', top: 16, insetInlineStart: 16, display: 'inline-flex', alignItems: 'center', gap: 9, background: 'rgba(7,24,44,0.82)', border: `1px solid ${t.line}`, borderRadius: 6, padding: '8px 13px', backdropFilter: 'blur(6px)', fontFamily: f.label, fontSize: lang === 'fa' ? 12.5 : 10.5, letterSpacing: lang === 'fa' ? '0' : '0.1em', color: t.cloud }}>
              <span style={{ width: 8, height: 8, borderRadius: 9, background: '#5fbf8f', boxShadow: '0 0 0 4px rgba(95,191,143,0.18)', animation: 'kgbPulse 2s ease-in-out infinite' }} />
              {o.mapBadge}
            </div>
            {/* AIS legend */}
            <div style={{ position: 'absolute', bottom: 16, insetInlineStart: 16, display: 'flex', gap: 16, flexWrap: 'wrap', background: 'rgba(7,24,44,0.82)', border: `1px solid ${t.line}`, borderRadius: 6, padding: '10px 14px', backdropFilter: 'blur(6px)' }}>
              {o.legend.map(([lbl, clr], i) => (
                <span key={i} style={{ display: 'inline-flex', alignItems: 'center', gap: 7, fontFamily: f.label, fontSize: lang === 'fa' ? 12 : 10, color: 'rgba(244,241,234,0.78)' }}>
                  <span style={{ width: 0, height: 0, borderLeft: '5px solid transparent', borderRight: '5px solid transparent', borderBottom: `9px solid ${clr}` }} />{lbl}
                </span>
              ))}
            </div>
          </div>
        </Wrap>
      </div>
    );
  }

  // ---------- Stats ----------
  function Stats({ c, lang, f }) {
    return (
      <Wrap style={{ display: 'flex', flexWrap: 'wrap', borderBottom: `1px solid ${t.line}` }}>
        {c.stats.map(([a, b], i) => (
          <div key={i} style={{ flex: '1 1 200px', padding: '44px 36px', borderInlineStart: i ? `1px solid ${t.line}` : 'none' }}>
            <div style={{ fontFamily: f.num, fontSize: lang === 'fa' ? 44 : 50, fontWeight: lang === 'fa' ? 800 : 600, color: t.gold, lineHeight: 1, direction: 'ltr', textAlign: lang === 'fa' ? 'right' : 'left' }}>{a}</div>
            <div style={{ fontFamily: f.body, fontSize: 14.5, color: 'rgba(244,241,234,0.7)', marginTop: 14 }}>{b}</div>
          </div>
        ))}
      </Wrap>
    );
  }

  // ---------- Services (image-embedded cards) ----------
  function Services({ c, lang, f, rtl }) {
    const s = c.services;
    const svcPhotos = ['assets/img/profile-bow.jpg', 'assets/img/deck-cargo.jpg', 'assets/img/kish-vessel.jpg', 'assets/img/deck-bow.jpg', 'assets/img/profile-stern.jpg', 'assets/img/bridge-crew.jpg'];
    return (
      <Wrap style={{ padding: '84px 48px 90px', borderBottom: `1px solid ${t.line}` }}>
        <div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'flex-end', marginBottom: 44, flexWrap: 'wrap', gap: 16 }}>
          <div>
            <Eyebrow f={f} lang={lang}>{s.tag}</Eyebrow>
            <h2 style={{ fontFamily: f.head, fontSize: lang === 'fa' ? 40 : 44, fontWeight: lang === 'fa' ? 800 : 600, color: t.cloud, margin: '14px 0 0', letterSpacing: '-0.01em' }}>{s.title}</h2>
          </div>
          <span style={{ fontFamily: f.body, fontSize: 15, fontWeight: 600, color: t.goldLt, display: 'inline-flex', alignItems: 'center', gap: 8, cursor: 'pointer' }}>{s.all}<Ic name="arrow" size={17} style={rtl ? { transform: 'scaleX(-1)' } : null} /></span>
        </div>
        <div style={{ display: 'grid', gridTemplateColumns: 'repeat(3,1fr)', gap: 18 }}>
          {s.items.map((it, i) => (
            <div key={i} className="kgb-card" style={{ background: 'rgba(255,255,255,0.03)', border: `1px solid ${t.line}`, borderRadius: 8, overflow: 'hidden', transition: 'transform .25s, border-color .25s' }}>
              <div style={{ position: 'relative' }}>
                <Photo dark label={it.img} src={svcPhotos[i]} h={150} />
                <div style={{ position: 'absolute', top: 14, insetInlineStart: 14, width: 44, height: 44, borderRadius: 4, background: 'rgba(7,24,44,0.85)', border: `1px solid ${t.line}`, display: 'flex', alignItems: 'center', justifyContent: 'center', color: t.goldLt, backdropFilter: 'blur(4px)' }}>
                  <Ic name={it.ic} size={23} stroke={1.5} />
                </div>
              </div>
              <div style={{ padding: '22px 24px 28px' }}>
                <div style={{ fontFamily: f.head, fontSize: 21, fontWeight: 700, color: t.cloud, marginBottom: 9 }}>{it.t}</div>
                <div style={{ fontFamily: f.body, fontSize: 14.5, lineHeight: lang === 'fa' ? 1.95 : 1.6, color: 'rgba(244,241,234,0.64)' }}>{it.d}</div>
              </div>
            </div>
          ))}
        </div>
      </Wrap>
    );
  }

  // ---------- Fleet feature + cards ----------
  function Fleet({ c, lang, f, rtl }) {
    const fl = c.fleet;
    return (
      <Wrap style={{ padding: '84px 48px 90px', borderBottom: `1px solid ${t.line}` }}>
        <div style={{ display: 'flex', gap: 0, border: `1px solid ${t.line}`, borderRadius: 10, overflow: 'hidden', flexWrap: 'wrap' }}>
          <div style={{ flex: '1 1 480px', minHeight: 420, position: 'relative' }}>
            <Photo dark label={fl.img} src="assets/img/hanis-kish.jpg" pos="center 55%" h="100%" style={{ position: 'absolute', inset: 0, minHeight: 420 }} />
          </div>
          <div style={{ flex: '1 1 420px', padding: '56px 52px', background: 'rgba(255,255,255,0.03)', display: 'flex', flexDirection: 'column', justifyContent: 'center' }}>
            <Eyebrow f={f} lang={lang}>{fl.tag}</Eyebrow>
            <h3 style={{ fontFamily: f.head, fontSize: lang === 'fa' ? 36 : 40, fontWeight: lang === 'fa' ? 800 : 600, color: t.cloud, margin: '14px 0 0' }}>{fl.title}</h3>
            <p style={{ fontFamily: f.body, fontSize: 16, lineHeight: lang === 'fa' ? 2 : 1.62, color: 'rgba(244,241,234,0.7)', marginTop: 16, maxWidth: 440 }}>{fl.desc}</p>
            <div style={{ display: 'grid', gridTemplateColumns: 'repeat(2,1fr)', gap: 24, marginTop: 30, maxWidth: 380 }}>
              {fl.specs.map(([a, b], i) => (
                <div key={i}>
                  <div style={{ fontFamily: f.num, fontSize: 24, fontWeight: 700, color: t.goldLt, direction: 'ltr', textAlign: lang === 'fa' ? 'right' : 'left' }}>{a}</div>
                  <div style={{ fontFamily: f.label, fontSize: lang === 'fa' ? 12.5 : 10.5, letterSpacing: lang === 'fa' ? '0' : '0.12em', textTransform: lang === 'fa' ? 'none' : 'uppercase', color: 'rgba(244,241,234,0.55)', marginTop: 5 }}>{b}</div>
                </div>
              ))}
            </div>
            <span style={{ marginTop: 32, fontFamily: f.body, fontSize: 15, fontWeight: 600, color: t.goldLt, display: 'inline-flex', alignItems: 'center', gap: 8, cursor: 'pointer' }}>{fl.more}<Ic name="arrow" size={17} style={rtl ? { transform: 'scaleX(-1)' } : null} /></span>
          </div>
        </div>
        {/* other vessels */}
        <div style={{ fontFamily: f.label, fontSize: lang === 'fa' ? 14 : 12, fontWeight: 600, letterSpacing: f.ls, textTransform: lang === 'fa' ? 'none' : 'uppercase', color: 'rgba(244,241,234,0.55)', margin: '46px 0 18px' }}>{fl.othersTitle}</div>
        <div style={{ display: 'grid', gridTemplateColumns: 'repeat(3,1fr)', gap: 18 }}>
          {fl.cards.map((v, i) => (
            <div key={i} style={{ border: `1px solid ${t.line}`, borderRadius: 8, overflow: 'hidden', background: 'rgba(255,255,255,0.02)' }}>
              <Photo dark label={v.img} src={['assets/img/deck-aerial.jpg', 'assets/img/deck-bow.jpg', 'assets/img/deck-cargo.jpg'][i]} pos="center" h={170} />
              <div style={{ padding: '18px 22px 22px', display: 'flex', justifyContent: 'space-between', alignItems: 'center' }}>
                <div>
                  <div style={{ fontFamily: f.head, fontSize: 18, fontWeight: 700, color: t.cloud, whiteSpace: 'nowrap' }}>{v.n}</div>
                  <div style={{ fontFamily: f.body, fontSize: 13.5, color: 'rgba(244,241,234,0.6)', marginTop: 3 }}>{v.t}</div>
                </div>
                <Ic name="arrow" size={18} color={t.goldLt} style={rtl ? { transform: 'scaleX(-1)' } : null} />
              </div>
            </div>
          ))}
        </div>
      </Wrap>
    );
  }

  // ---------- Full-bleed quote band ----------
  function QuoteBand({ c, lang, f }) {
    return (
      <div style={{ position: 'relative', overflow: 'hidden', borderBottom: `1px solid ${t.line}` }}>
        <Photo dark labelAlign="br" label={c.quote.img} src="assets/img/hanis-bridge.jpg" pos="center 30%" h={360} style={{ position: 'absolute', inset: 0 }}
          accent="linear-gradient(180deg, rgba(7,24,44,0.78), rgba(7,24,44,0.88))" />
        <Wrap style={{ position: 'relative', padding: '88px 48px', textAlign: 'center' }}>
          <div style={{ maxWidth: 880, margin: '0 auto' }}>
            <Ic name="anchor" size={34} color={t.gold} style={{ marginBottom: 22 }} />
            <div style={{ fontFamily: f.head, fontSize: lang === 'fa' ? 34 : 38, fontWeight: lang === 'fa' ? 700 : 500, lineHeight: lang === 'fa' ? 1.7 : 1.3, color: t.cloud, letterSpacing: '-0.01em' }}>{c.quote.text}</div>
            <div style={{ fontFamily: f.label, fontSize: 14, color: t.goldLt, marginTop: 22, letterSpacing: lang === 'fa' ? '0' : '0.08em' }}>{c.quote.by}</div>
          </div>
        </Wrap>
      </div>
    );
  }

  // ---------- Gallery ----------
  function Gallery({ c, lang, f, rtl }) {
    const g = c.gallery;
    const spans = [[2, 2], [1, 1], [1, 1], [1, 1], [1, 1], [2, 1]];
    const galPhotos = ['assets/img/deck-cargo.jpg', 'assets/img/bridge-logo.jpg', 'assets/img/profile-stern.jpg', 'assets/img/profile-bow.jpg', 'assets/img/hanis-kish.jpg', 'assets/img/bridge-crew.jpg'];
    const galPos = ['center', 'center', 'center', 'center', 'center 55%', 'center'];
    return (
      <Wrap style={{ padding: '84px 48px 90px', borderBottom: `1px solid ${t.line}` }}>
        <div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'flex-end', marginBottom: 36, flexWrap: 'wrap', gap: 16 }}>
          <div>
            <Eyebrow f={f} lang={lang}>{g.tag}</Eyebrow>
            <h2 style={{ fontFamily: f.head, fontSize: lang === 'fa' ? 40 : 44, fontWeight: lang === 'fa' ? 800 : 600, color: t.cloud, margin: '14px 0 0' }}>{g.title}</h2>
          </div>
          <span style={{ fontFamily: f.body, fontSize: 15, fontWeight: 600, color: t.goldLt, display: 'inline-flex', alignItems: 'center', gap: 8, cursor: 'pointer' }}>{g.view}<Ic name="arrow" size={17} style={rtl ? { transform: 'scaleX(-1)' } : null} /></span>
        </div>
        <div style={{ display: 'grid', gridTemplateColumns: 'repeat(4, 1fr)', gridAutoRows: 150, gap: 14 }}>
          {g.labels.map((l, i) => (
            <div key={i} style={{ gridColumn: `span ${spans[i][0]}`, gridRow: `span ${spans[i][1]}`, borderRadius: 8, overflow: 'hidden', border: `1px solid ${t.line}` }}>
              <Photo dark label={l} src={galPhotos[i]} pos={galPos[i] || 'center'} h="100%" style={{ minHeight: '100%' }} />
            </div>
          ))}
        </div>
      </Wrap>
    );
  }

  // ---------- Clients + testimonial ----------
  function Clients({ c, lang, f }) {
    return (
      <Wrap style={{ padding: '70px 48px 84px', borderBottom: `1px solid ${t.line}` }}>
        <div style={{ textAlign: 'center' }}>
          <Eyebrow f={f} lang={lang} color="rgba(244,241,234,0.55)">{c.clients.tag}</Eyebrow>
        </div>
        <div style={{ display: 'flex', justifyContent: 'center', alignItems: 'center', gap: 48, flexWrap: 'wrap', margin: '28px 0 56px', opacity: 0.6 }}>
          {c.clients.items.map((n, i) => (
            <div key={i} style={{ display: 'flex', alignItems: 'center', gap: 10, fontFamily: f.label, fontSize: lang === 'fa' ? 15 : 13, fontWeight: 600, letterSpacing: lang === 'fa' ? '0' : '0.06em', color: 'rgba(244,241,234,0.7)' }}>
              <span style={{ width: 28, height: 28, borderRadius: 6, background: 'rgba(231,206,138,0.12)', display: 'inline-flex', alignItems: 'center', justifyContent: 'center', color: t.goldLt }}><Ic name="globe" size={16} /></span>
              {n}
            </div>
          ))}
        </div>
        <div style={{ maxWidth: 860, margin: '0 auto', textAlign: 'center' }}>
          <div style={{ fontFamily: f.head, fontSize: lang === 'fa' ? 26 : 30, fontWeight: lang === 'fa' ? 600 : 500, lineHeight: lang === 'fa' ? 1.8 : 1.4, color: t.cloud }}>{c.testimonial.q}</div>
          <div style={{ fontFamily: f.label, fontSize: 13.5, color: t.goldLt, marginTop: 22, letterSpacing: lang === 'fa' ? '0' : '0.06em' }}>{c.testimonial.who}</div>
        </div>
      </Wrap>
    );
  }

  // ---------- Contact CTA ----------
  function Contact({ c, lang, f, rtl }) {
    const k = c.contact;
    const inp = { height: 50, borderRadius: 4, background: 'rgba(7,24,44,0.5)', border: `1px solid ${t.line}`, padding: '0 16px', color: t.cloud, fontFamily: f.body, fontSize: 14.5, outline: 'none' };
    return (
      <div style={{ background: 'rgba(255,255,255,0.03)', borderBottom: `1px solid ${t.line}` }}>
        <Wrap style={{ padding: '76px 48px', display: 'flex', gap: 64, flexWrap: 'wrap', alignItems: 'center' }}>
          <div style={{ flex: '1 1 360px' }}>
            <h3 style={{ fontFamily: f.head, fontSize: lang === 'fa' ? 38 : 42, fontWeight: lang === 'fa' ? 800 : 600, color: t.cloud, margin: 0, lineHeight: lang === 'fa' ? 1.4 : 1.12, letterSpacing: '-0.01em' }}>{k.title}</h3>
            <p style={{ fontFamily: f.body, fontSize: 17, color: 'rgba(244,241,234,0.72)', marginTop: 16, lineHeight: lang === 'fa' ? 2 : 1.6 }}>{k.sub}</p>
            <div style={{ fontFamily: f.label, fontSize: lang === 'fa' ? 14 : 12, color: 'rgba(244,241,234,0.55)', marginTop: 24 }}>{k.or} · <span style={{ color: t.goldLt, direction: 'ltr', display: 'inline-block' }}>{c.top.phone}</span></div>
          </div>
          <div style={{ flex: '1 1 380px', display: 'flex', flexDirection: 'column', gap: 12 }}>
            <div style={{ display: 'flex', gap: 12 }}>
              <input placeholder={k.name} style={{ ...inp, flex: 1 }} />
              <input placeholder={k.company} style={{ ...inp, flex: 1 }} />
            </div>
            <textarea placeholder={k.need} rows={3} style={{ ...inp, height: 'auto', padding: '14px 16px', resize: 'none' }} />
            <span style={{ background: t.gold, color: t.navy900, fontFamily: f.body, fontWeight: 700, fontSize: 15.5, padding: '15px 0', borderRadius: 4, textAlign: 'center', cursor: 'pointer', display: 'inline-flex', justifyContent: 'center', alignItems: 'center', gap: 9 }}>{k.send}<Ic name="arrow" size={18} style={rtl ? { transform: 'scaleX(-1)' } : null} /></span>
          </div>
        </Wrap>
      </div>
    );
  }

  // ---------- App ----------
  function App() {
    const [lang, setLang] = useState(() => localStorage.getItem('kgb-lang') || 'fa');
    useEffect(() => { localStorage.setItem('kgb-lang', lang); }, [lang]);
    const c = window.KGBC[lang];
    const f = fonts(lang);
    const rtl = lang === 'fa';
    return (
      <div className="kgb" dir={c.dir} style={{ fontFamily: f.body, background: t.navy900, color: t.cloud, minHeight: '100vh' }}>
        <Nav c={c} lang={lang} setLang={setLang} f={f} current={0} />
        <Hero c={c} lang={lang} f={f} rtl={rtl} />
        <Ops c={c} lang={lang} f={f} />
        <Stats c={c} lang={lang} f={f} />
        <Services c={c} lang={lang} f={f} rtl={rtl} />
        <Fleet c={c} lang={lang} f={f} rtl={rtl} />
        <QuoteBand c={c} lang={lang} f={f} />
        <Gallery c={c} lang={lang} f={f} rtl={rtl} />
        <Clients c={c} lang={lang} f={f} />
        <Contact c={c} lang={lang} f={f} rtl={rtl} />
        <Footer c={c} lang={lang} f={f} />
      </div>
    );
  }

  window.KGBApp = App;
})();
