// Direction A — "Heritage Mill"
// Editorial / agricultural: cream paper, deep forest green, Newsreader serif
// display, Schibsted Grotesk body, JetBrains Mono labels. Big numbered
// sections, hairline rules, generous whitespace, no fake imagery.

const { useState, useMemo, useEffect, Fragment } = React;

const A_COLORS = {
  cream: '#f4ecd8',
  paper: '#f7f1de',
  ink: '#15201a',
  green: '#0e3826',
  greenDeep: '#082018',
  rust: '#a85a32',
  rule: 'rgba(21,32,26,0.18)',
  ruleSoft: 'rgba(21,32,26,0.10)',
  muted: 'rgba(21,32,26,0.62)'
};

const A_FONTS = {
  serif: '"Newsreader", "Amiri", Georgia, serif',
  sans: '"Schibsted Grotesk", "Tajawal", -apple-system, system-ui, sans-serif',
  mono: '"JetBrains Mono", "DM Mono", ui-monospace, monospace'
};

// ────────────────────────────────────────────────────────────────────
// Helpers
// ────────────────────────────────────────────────────────────────────

function A_Rule({ color = A_COLORS.rule, style }) {
  return <div style={{ height: 1, background: color, width: '100%', ...style }} />;
}

function A_Eyebrow({ children, ar }) {
  return (
    <div style={{
      fontFamily: ar ? A_FONTS.sans : A_FONTS.mono,
      fontSize: 12,
      letterSpacing: ar ? '0.04em' : '0.18em',
      textTransform: ar ? 'none' : 'uppercase',
      color: A_COLORS.green,
      fontWeight: 500
    }}>{children}</div>);

}

function A_MonoLabel({ children, ar, style }) {
  return (
    <span style={{
      fontFamily: ar ? A_FONTS.sans : A_FONTS.mono,
      fontSize: 11,
      letterSpacing: ar ? 0 : '0.14em',
      textTransform: ar ? 'none' : 'uppercase',
      color: A_COLORS.muted,
      ...style
    }}>{children}</span>);

}

// ────────────────────────────────────────────────────────────────────
// Header
// ────────────────────────────────────────────────────────────────────

function A_Header({ t, lang, setLang, ar, setCat }) {
  const [menuOpen, setMenuOpen] = useState(false);
  const [navOpen, setNavOpen] = useState(false);
  const mobileLinks = [['about', t.nav.about], ['products', t.nav.products], ['trust', t.nav.trust], ['contact', t.nav.contact]];
  return (
    <header className="a-hd" style={{
      position: 'sticky', top: 0, zIndex: 80,
      background: A_COLORS.paper,
      borderBottom: `1px solid ${A_COLORS.rule}`,
      padding: '20px 56px'
    }}>
      <div style={{ display: 'flex', alignItems: 'center', gap: 24 }}>
        {/* Interlock logo */}
        <window.JahizLogo markSize={30} wordSize={19} stacked={true} />

        <nav className="a-nav" style={{
          display: 'flex', gap: 28, marginInlineStart: 56, alignItems: 'center',
          fontFamily: A_FONTS.sans, fontSize: 14, color: A_COLORS.ink
        }}>
          {Object.entries(t.nav).filter(([k]) => k !== 'sourcing' && k !== 'quote').map(([k, v]) => {
            if (k === 'products') {
              return (
                <div key={k} style={{ position: 'relative' }}
                onMouseEnter={() => setMenuOpen(true)} onMouseLeave={() => setMenuOpen(false)}>
                  <a href="#products" style={{
                    color: A_COLORS.ink, textDecoration: 'none',
                    display: 'inline-flex', alignItems: 'center', gap: 6
                  }}>
                    {v}
                    <span style={{ fontSize: 9, opacity: 0.55, transform: menuOpen ? 'rotate(180deg)' : 'none', transition: 'transform .2s' }}>▾</span>
                  </a>
                  {menuOpen &&
                  <div style={{
                    position: 'absolute', top: '100%', insetInlineStart: 0, marginTop: 6,
                    background: A_COLORS.paper, border: `1px solid ${A_COLORS.rule}`,
                    borderRadius: 4, boxShadow: '0 12px 32px rgba(8,32,24,0.16)',
                    minWidth: 210, padding: 6, zIndex: 30
                  }}>
                      {[['feed', t.cat_feed, t.cat_feed_sub], ['bedding', t.cat_bedding, t.cat_bedding_sub]].map(([c, label, sub]) =>
                    <a key={c} href="#products" onClick={() => {setCat(c);setMenuOpen(false);}}
                    style={{ display: 'block', padding: '10px 12px', borderRadius: 3, textDecoration: 'none', color: A_COLORS.ink, transition: 'background .12s' }}
                    onMouseEnter={(e) => e.currentTarget.style.background = A_COLORS.cream}
                    onMouseLeave={(e) => e.currentTarget.style.background = 'transparent'}>
                          <div style={{ fontFamily: A_FONTS.sans, fontSize: 14, fontWeight: 500 }}>{label}</div>
                          <div style={{ fontFamily: ar ? A_FONTS.sans : A_FONTS.mono, fontSize: 10.5, color: A_COLORS.muted, marginTop: 3, letterSpacing: ar ? 0 : '0.04em' }}>{sub}</div>
                        </a>
                    )}
                    </div>
                  }
                </div>);

            }
            return <a key={k} href={`#${k}`} style={{ color: A_COLORS.ink, textDecoration: 'none' }}>{v}</a>;
          })}
        </nav>

        <div style={{ marginInlineStart: 'auto', display: 'flex', alignItems: 'center', gap: 14 }}>
          {/* Tap-to-call — discreet, present at all times */}
          <a href="tel:+971543888660" className="a-tel" style={{
            display: 'inline-flex', alignItems: 'center', gap: 7,
            fontFamily: A_FONTS.sans, fontSize: 13, color: A_COLORS.ink,
            textDecoration: 'none', whiteSpace: 'nowrap'
          }}
          onMouseEnter={(e) => e.currentTarget.style.color = A_COLORS.green}
          onMouseLeave={(e) => e.currentTarget.style.color = A_COLORS.ink}>
            <svg width="14" height="14" 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.36 1.9.7 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.34 1.85.57 2.81.7A2 2 0 0 1 22 16.92z"></path>
            </svg>
            <span style={{ direction: 'ltr' }}>+971 54 388 8660</span>
          </a>
          <span className="a-div" style={{ width: 1, height: 22, background: A_COLORS.rule }}></span>
          {/* Lang toggle */}
          <div style={{
            display: 'flex', border: `1px solid ${A_COLORS.rule}`, borderRadius: 999,
            fontFamily: A_FONTS.mono, fontSize: 11, overflow: 'hidden'
          }}>
            {['en', 'ar'].map((l) =>
            <button key={l} onClick={() => setLang(l)} style={{
              padding: '6px 14px', border: 'none', cursor: 'pointer',
              background: lang === l ? A_COLORS.green : 'transparent',
              color: lang === l ? A_COLORS.cream : A_COLORS.ink,
              fontFamily: 'inherit', letterSpacing: '0.1em',
              textTransform: 'uppercase'
            }}>{l}</button>
            )}
          </div>
          <a href="#quote" className="a-quote-btn" style={{
            padding: '10px 18px', background: A_COLORS.ink, color: A_COLORS.cream,
            fontFamily: A_FONTS.sans, fontSize: 13, fontWeight: 500,
            textDecoration: 'none', borderRadius: 2,
            display: 'inline-flex', alignItems: 'center', gap: 8
          }}>
            {t.nav.quote}
            <span style={{ display: 'inline-block', transform: ar ? 'scaleX(-1)' : 'none' }}>→</span>
          </a>
          {/* Hamburger — mobile only */}
          <button className="a-burger" onClick={() => setNavOpen((o) => !o)} aria-label={navOpen ? 'Close menu' : 'Open menu'} aria-expanded={navOpen} style={{
            display: 'none', alignItems: 'center', justifyContent: 'center',
            width: 42, height: 42, border: `1px solid ${A_COLORS.rule}`, borderRadius: 7,
            background: 'transparent', cursor: 'pointer', color: A_COLORS.ink, padding: 0
          }}>
            <svg width="21" height="21" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.9" strokeLinecap="round">
              {navOpen ?
              <g><line x1="6" y1="6" x2="18" y2="18"></line><line x1="18" y1="6" x2="6" y2="18"></line></g> :
              <g><line x1="3" y1="7" x2="21" y2="7"></line><line x1="3" y1="12" x2="21" y2="12"></line><line x1="3" y1="17" x2="21" y2="17"></line></g>}
            </svg>
          </button>
        </div>
      </div>

      {/* Mobile dropdown menu */}
      {navOpen &&
      <div className="a-mobile-menu" style={{
        marginTop: 14, paddingTop: 12, borderTop: `1px solid ${A_COLORS.rule}`,
        display: 'flex', flexDirection: 'column'
      }}>
          {mobileLinks.map(([k, v]) =>
        <a key={k} href={`#${k}`} onClick={() => setNavOpen(false)} style={{
          padding: '13px 4px', textDecoration: 'none', color: A_COLORS.ink,
          fontFamily: A_FONTS.serif, fontSize: 22, fontWeight: 400,
          borderBottom: `1px solid ${A_COLORS.ruleSoft}`
        }}>{v}</a>
        )}
          <a href="#quote" onClick={() => setNavOpen(false)} style={{
          marginTop: 16, padding: '14px 18px', background: A_COLORS.ink, color: A_COLORS.cream,
          fontFamily: A_FONTS.sans, fontSize: 15, fontWeight: 500, textDecoration: 'none',
          borderRadius: 2, textAlign: 'center'
        }}>{t.nav.quote}</a>
          <a href="tel:+971543888660" onClick={() => setNavOpen(false)} style={{
          marginTop: 10, padding: '4px', textDecoration: 'none', color: A_COLORS.green,
          fontFamily: A_FONTS.sans, fontSize: 14, display: 'inline-flex', alignItems: 'center', gap: 8, justifyContent: 'center'
        }}>
            <svg width="15" height="15" 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.36 1.9.7 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.34 1.85.57 2.81.7A2 2 0 0 1 22 16.92z"></path></svg>
            <span style={{ direction: 'ltr' }}>+971 54 388 8660</span>
          </a>
        </div>
      }
    </header>);

}

// ────────────────────────────────────────────────────────────────────
// Hero
// ────────────────────────────────────────────────────────────────────

function A_Hero({ t, ar, wordColors }) {
  // Highlighted Arabic line (index 0) is split into per-word spans so each
  // word can be coloured independently via the Tweaks panel. Falls back to
  // the brand green when no wordColors are supplied (e.g. on the live site).
  const arWordColor = (wi) => (wordColors && wordColors[wi]) || A_COLORS.green;
  return (
    <section style={{
      background: A_COLORS.cream, position: 'relative'
    }}>
      {/* Image hero block — light wash so the deep-green serif sits on top.
                   In Arabic (RTL) the text moves to the right, so the wash + photo
                   mirror horizontally to keep the cream wash behind the text. */}
      <div className="a-hero-pad" style={{
        position: 'relative',
        minHeight: 680,
        padding: '88px 56px 72px',
        overflow: 'hidden'
      }}>
        <div aria-hidden="true" style={{
          position: 'absolute', inset: 0,
          transform: ar ? 'scaleX(-1)' : 'none'
        }}>
          {/* Hay photo */}
          <div style={{
            position: 'absolute', inset: 0,
            backgroundImage: `url("assets/hero-hay.png")`,
            backgroundSize: 'cover',
            backgroundPosition: 'center'
          }} />
          {/* Cream wash on top so the deep-green serif stays legible */}
          <div style={{
            position: 'absolute', inset: 0,
            backgroundImage: `linear-gradient(95deg, rgba(244,236,216,0.92) 0%, rgba(244,236,216,0.78) 38%, rgba(244,236,216,0.28) 62%, rgba(244,236,216,0.10) 100%)`
          }} />
        </div>
        <div style={{ position: 'relative', maxWidth: 1100 }}>
          <A_Eyebrow ar={ar}>{t.hero_eyebrow}</A_Eyebrow>

          <h1 className="a-hero-h1" style={{
            fontFamily: A_FONTS.serif,
            fontSize: 124, lineHeight: 0.96, letterSpacing: '-0.025em',
            color: A_COLORS.green, margin: '24px 0 0',
            fontWeight: 400, position: 'relative'
          }}>
            {t.hero_title_a.map((line, i) =>
            <span key={i} style={{ display: 'block' }}>
                {i === 1 && !ar && <span style={{ ...{ fontStyle: 'italic', color: A_COLORS.rust }, color: "rgb(201, 162, 75)" }}>{line.split(' ')[0]} </span>}
                {i === 1 && !ar ? line.split(' ').slice(1).join(' ') :
              i === 0 && ar ? <span style={{ fontStyle: 'italic', fontFamily: "\"Architects Daughter\"" }}>{line.split(' ').map((w, wi, arr) =>
                <span key={wi} style={{ color: arWordColor(wi) }}>{w}{wi < arr.length - 1 ? ' ' : ''}</span>
              )}</span> : line
              }
              </span>
            )}
          </h1>

          <div className="a-hero-grid" style={{
            marginTop: 56, display: 'grid',
            gridTemplateColumns: '1fr auto', gap: 56, alignItems: 'end'
          }}>
            <p style={{
              fontFamily: A_FONTS.sans, fontSize: 19, lineHeight: 1.55,
              color: A_COLORS.ink, maxWidth: 560, margin: 0
            }}>{t.hero_sub}</p>

            <div className="a-hero-cta" style={{ display: 'flex', gap: 12 }}>
              <a href="#quote" style={{
                padding: '16px 26px', background: A_COLORS.green, color: A_COLORS.cream,
                fontFamily: A_FONTS.sans, fontSize: 14, fontWeight: 500,
                textDecoration: 'none', borderRadius: 2, letterSpacing: '0.01em'
              }}>{t.hero_cta1}</a>
              <a href="#products" style={{
                padding: '16px 26px', background: A_COLORS.paper, color: A_COLORS.ink,
                fontFamily: A_FONTS.sans, fontSize: 14, fontWeight: 500,
                textDecoration: 'none', borderRadius: 2,
                border: `1px solid ${A_COLORS.rule}`
              }}>{t.hero_cta2}</a>
            </div>
          </div>
        </div>
      </div>

      {/* Stat strip — sits on cream paper below the image */}
      <div className="a-stat-pad" style={{ padding: '32px 56px 64px', background: A_COLORS.cream }}>
        <div style={{ borderTop: `1px solid ${A_COLORS.rule}`, paddingTop: 32 }}>
          <div className="a-stat-grid" style={{ display: 'grid', gridTemplateColumns: 'repeat(4, 1fr)', gap: 32 }}>
            {[
            [t.stat1_n, t.stat1_l],
            [t.stat2_n, t.stat2_l],
            [t.stat3_n, t.stat3_l],
            [t.stat4_n, t.stat4_l]].
            map(([n, l], i) =>
            <div key={i}>
                <div className="a-stat-n" style={{
                fontFamily: A_FONTS.serif, fontSize: 56, lineHeight: 1,
                color: A_COLORS.green, letterSpacing: '-0.02em', fontWeight: 400
              }}>{n}</div>
                <A_MonoLabel ar={ar} style={{ display: 'block', marginTop: 12 }}>{l}</A_MonoLabel>
              </div>
            )}
          </div>
        </div>
      </div>
    </section>);

}

// ────────────────────────────────────────────────────────────────────
// Products
// ────────────────────────────────────────────────────────────────────

function A_ProductCard({ p, lang, ar }) {
  const name = p[`name_${lang}`];
  return (
    <article style={{ display: 'flex', flexDirection: 'column' }}>
      <img
        src={`assets/products/${p.id}.png`}
        alt={name}
        loading="lazy"
        className="a-prod-img"
        style={{
          display: 'block', width: '100%', height: 280, objectFit: 'cover',
          border: `1px solid ${A_COLORS.rule}`, borderRadius: 3,
          background: A_COLORS.paper
        }} />
      <div style={{
        display: 'flex', alignItems: 'baseline', gap: 14,
        paddingTop: 16, marginTop: 14, borderTop: `1px solid ${A_COLORS.rule}`
      }}>
        <span style={{
          fontFamily: A_FONTS.mono, fontSize: 11, color: A_COLORS.muted,
          letterSpacing: '0.12em', flex: 'none'
        }}>{p.code}</span>
        <h3 style={{
          fontFamily: A_FONTS.serif, fontSize: 27, color: A_COLORS.ink,
          letterSpacing: '-0.015em', fontWeight: 400, lineHeight: 1.05, margin: 0
        }}>{name}</h3>
      </div>
      <p className="a-prod-blurb" style={{
        fontFamily: A_FONTS.sans, fontSize: 14, lineHeight: 1.6,
        color: A_COLORS.muted, margin: '12px 0 0', textWrap: 'pretty'
      }}>{p[`blurb_${lang}`]}</p>
    </article>);

}

function A_Products({ t, lang, ar, cat, setCat }) {
  const items = window.JAHIZ_PRODUCTS.filter((p) => p.cat === cat);
  const catSub = cat === 'feed' ? t.cat_feed_sub : t.cat_bedding_sub;
  return (
    <section id="products" className="a-sec" style={{ background: A_COLORS.paper, padding: '96px 56px' }}>
      <div className="a-split" style={{
        display: 'grid', gridTemplateColumns: '1fr 1.4fr', gap: 64,
        alignItems: 'baseline', marginBottom: 40
      }}>
        <div>
          <A_Eyebrow ar={ar}>{t.products_eyebrow}</A_Eyebrow>
          <p style={{
            marginTop: 24, fontFamily: A_FONTS.sans, fontSize: 15,
            color: A_COLORS.muted, lineHeight: 1.55, maxWidth: 320
          }}>{t.products_sub}</p>
        </div>
        <h2 className="a-h2" style={{
          fontFamily: A_FONTS.serif, fontSize: 64, lineHeight: 1.02,
          color: A_COLORS.ink, margin: 0, letterSpacing: '-0.02em', fontWeight: 400
        }}>{t.products_title_a}</h2>
      </div>

      {/* Category toggle — Animal Feed / Bedding */}
      <div style={{ display: 'flex', alignItems: 'center', gap: 22, marginBottom: 40, flexWrap: 'wrap' }}>
        <div style={{ display: 'flex', border: `1px solid ${A_COLORS.green}`, borderRadius: 999, overflow: 'hidden' }}>
          {[['feed', t.cat_feed], ['bedding', t.cat_bedding]].map(([c, label]) =>
          <button key={c} onClick={() => setCat(c)} style={{
            padding: '12px 32px', border: 'none', cursor: 'pointer',
            background: cat === c ? A_COLORS.green : 'transparent',
            color: cat === c ? A_COLORS.cream : A_COLORS.green,
            fontFamily: A_FONTS.sans, fontSize: 14, fontWeight: 500, letterSpacing: '0.01em'
          }}>{label}</button>
          )}
        </div>
        <A_MonoLabel ar={ar}>{catSub} · {items.length}</A_MonoLabel>
      </div>

      <div className="a-prod-grid" style={{
        display: 'grid', gridTemplateColumns: 'repeat(3, 1fr)',
        gap: '36px 28px', borderTop: `1px solid ${A_COLORS.ink}`, paddingTop: 40
      }}>
        {items.map((p) =>
        <A_ProductCard key={p.id} p={p} lang={lang} ar={ar} />
        )}
      </div>
    </section>);

}

// ────────────────────────────────────────────────────────────────────
// About
// ────────────────────────────────────────────────────────────────────

function A_About({ t, ar }) {
  return (
    <section id="about" className="a-sec" style={{
      background: A_COLORS.green, color: A_COLORS.cream,
      padding: '112px 56px', position: 'relative', overflow: 'hidden'
    }}>
      <div style={{
        position: 'absolute', inset: 0, opacity: 0.06, pointerEvents: 'none',
        backgroundImage: `repeating-linear-gradient(90deg, ${A_COLORS.cream} 0 1px, transparent 1px 18px),
                          repeating-linear-gradient(0deg, ${A_COLORS.cream} 0 1px, transparent 1px 18px)`
      }} />
      <div className="a-split" style={{ display: 'grid', gridTemplateColumns: '1fr 1.6fr', gap: 64, position: 'relative' }}>
        <div>
          <A_Eyebrow ar={ar}><span style={{ color: A_COLORS.cream }}>{t.about_eyebrow}</span></A_Eyebrow>
          <h2 className="a-h2" style={{
            fontFamily: A_FONTS.serif, fontSize: 72, lineHeight: 1.0,
            margin: '32px 0 0', letterSpacing: '-0.02em', fontWeight: 400,
            color: A_COLORS.cream
          }}>{t.about_title_a}</h2>
        </div>
        <div>
          <p className="a-about-body" style={{
            fontFamily: A_FONTS.serif, fontSize: 26, lineHeight: 1.45,
            margin: 0, color: A_COLORS.cream, fontWeight: 300,
            fontStyle: 'italic'
          }}>{t.about_body}</p>

          {/* Mark detail */}
          <div style={{ marginTop: 56, display: 'flex', alignItems: 'center', gap: 18, opacity: 0.85 }}>
            <window.JahizMark size={36} onDark={true} />
            <div style={{ fontFamily: A_FONTS.mono, fontSize: 11, letterSpacing: '0.18em', textTransform: 'uppercase', opacity: 0.85 }}>
              JahizLink Trading · Abu Dhabi
            </div>
          </div>
        </div>
      </div>
    </section>);

}

// ────────────────────────────────────────────────────────────────────
// Sourcing
// ────────────────────────────────────────────────────────────────────

function A_Sourcing({ t, ar }) {
  const steps = [
  [t.step1_t, t.step1_b],
  [t.step2_t, t.step2_b],
  [t.step3_t, t.step3_b],
  [t.step4_t, t.step4_b]];

  return (
    <section id="sourcing" style={{ background: A_COLORS.paper, padding: '112px 56px' }}>
      <div style={{
        display: 'grid', gridTemplateColumns: '1fr 1.4fr', gap: 64,
        alignItems: 'baseline', marginBottom: 64
      }}>
        <A_Eyebrow ar={ar}>{t.sourcing_eyebrow}</A_Eyebrow>
        <h2 style={{
          fontFamily: A_FONTS.serif, fontSize: 56, lineHeight: 1.05,
          color: A_COLORS.ink, margin: 0, letterSpacing: '-0.02em', fontWeight: 400,
          maxWidth: 720
        }}>{t.sourcing_title_a}</h2>
      </div>

      <div style={{ display: 'grid', gridTemplateColumns: 'repeat(4, 1fr)', gap: 0 }}>
        {steps.map(([title, body], i) =>
        <div key={i} style={{
          padding: '32px 28px 32px 0',
          borderInlineStart: i === 0 ? 'none' : `1px solid ${A_COLORS.rule}`,
          paddingInlineStart: i === 0 ? 0 : 28,
          position: 'relative'
        }}>
            <div style={{
            fontFamily: A_FONTS.serif, fontStyle: 'italic',
            fontSize: 56, color: A_COLORS.rust, lineHeight: 1,
            fontWeight: 400
          }}>0{i + 1}</div>
            <h3 style={{
            fontFamily: A_FONTS.serif, fontSize: 24, lineHeight: 1.2,
            color: A_COLORS.ink, margin: '28px 0 12px', fontWeight: 500,
            letterSpacing: '-0.01em'
          }}>{title}</h3>
            <p style={{
            fontFamily: A_FONTS.sans, fontSize: 14, lineHeight: 1.55,
            color: A_COLORS.muted, margin: 0
          }}>{body}</p>
          </div>
        )}
      </div>
    </section>);

}

// ────────────────────────────────────────────────────────────────────
// Trust
// ────────────────────────────────────────────────────────────────────

function A_Trust({ t, ar }) {
  const clients = t.clients;

  return (
    <section id="trust" className="a-sec" style={{ background: A_COLORS.cream, padding: '112px 56px' }}>
      <div className="a-split" style={{ display: 'grid', gridTemplateColumns: '1fr 1.4fr', gap: 64, marginBottom: 72 }}>
        <A_Eyebrow ar={ar}>{t.trust_eyebrow}</A_Eyebrow>
        <div>
          <h2 className="a-h2" style={{
            fontFamily: A_FONTS.serif, fontSize: 56, lineHeight: 1.05,
            color: A_COLORS.ink, margin: 0, letterSpacing: '-0.02em', fontWeight: 400,
            maxWidth: 760
          }}>{t.trust_title_a}</h2>
          <p style={{
            fontFamily: A_FONTS.sans, fontSize: 17, lineHeight: 1.6,
            color: A_COLORS.muted, margin: '28px 0 0', maxWidth: 620
          }}>{t.trust_intro}</p>
        </div>
      </div>

      {/* Trusted-by client showcase */}
      <div style={{ borderTop: `1px solid ${A_COLORS.rule}`, paddingTop: 40 }}>
        <A_MonoLabel ar={ar}>{t.trusted_label}</A_MonoLabel>
        <div className="a-clients" style={{
          marginTop: 28, display: 'grid',
          gridTemplateColumns: 'repeat(3, 1fr)', gap: 0
        }}>
          {clients.map((name, i) =>
          <div key={i} style={{
            padding: '36px 40px',
            borderInlineStart: i === 0 ? 'none' : `1px solid ${A_COLORS.ruleSoft}`,
            display: 'flex', alignItems: 'center', minHeight: 132
          }}>
              <div style={{
              fontFamily: A_FONTS.serif, fontSize: 27, lineHeight: 1.18,
              color: A_COLORS.green, fontWeight: 400, letterSpacing: '-0.01em',
              textWrap: 'balance'
            }}>{name}</div>
            </div>
          )}
        </div>
      </div>
    </section>);

}

// ────────────────────────────────────────────────────────────────────
// Quote form
// ────────────────────────────────────────────────────────────────────

function A_Quote({ t, lang, ar }) {
  const [sent, setSent] = useState(false);
  const [sending, setSending] = useState(false);
  const [error, setError] = useState(false);
  const [form, setForm] = useState({ name: '', company: '', email: '', phone: '', product: '', qty: '', notes: '' });
  const setF = (k, v) => setForm((s) => ({ ...s, [k]: v }));

  // ───────────────────────────────────────────────────────────────────
  // Quote form delivery via Web3Forms → emails submissions to info@JahizLink.com
  // SETUP: get a free access key at https://web3forms.com (enter info@JahizLink.com),
  // then paste it below. Until a real key is set, the form shows a friendly notice.
  const WEB3FORMS_ACCESS_KEY = '36c48956-12ee-440d-9fa5-1e3e5eb0a4e1';
  // ───────────────────────────────────────────────────────────────────
  const submit = async (e) => {
    e.preventDefault();
    setError(false);
    if (!WEB3FORMS_ACCESS_KEY || WEB3FORMS_ACCESS_KEY.indexOf('PASTE_') === 0) {
      setError(true);
      return;
    }
    setSending(true);
    try {
      const prod = window.JAHIZ_PRODUCTS.find((p) => p.id === form.product);
      const res = await fetch('https://api.web3forms.com/submit', {
        method: 'POST',
        headers: { 'Content-Type': 'application/json', 'Accept': 'application/json' },
        body: JSON.stringify({
          access_key: WEB3FORMS_ACCESS_KEY,
          subject: 'New quote request — JahizLink',
          from_name: 'JahizLink Website',
          name: form.name,
          company: form.company,
          email: form.email,
          phone: form.phone,
          product: prod ? prod.name_en : form.product,
          quantity: form.qty,
          notes: form.notes
        })
      });
      const data = await res.json();
      if (data && data.success) {
        setSent(true);
      } else {
        setError(true);
      }
    } catch (err) {
      setError(true);
    } finally {
      setSending(false);
    }
  };

  const input = {
    width: '100%', background: 'transparent', border: 'none',
    borderBottom: `1px solid ${A_COLORS.rule}`,
    padding: '12px 0', fontSize: 16, color: A_COLORS.ink,
    fontFamily: A_FONTS.sans, outline: 'none',
    textAlign: ar ? 'right' : 'left'
  };

  return (
    <section id="quote" className="a-sec" style={{ background: A_COLORS.paper, padding: '112px 56px' }}>
      <div className="a-split" style={{ display: 'grid', gridTemplateColumns: '1fr 1.4fr', gap: 64 }}>
        <div>
          <A_Eyebrow ar={ar}>{t.quote_eyebrow}</A_Eyebrow>
          <h2 className="a-h2" style={{
            fontFamily: A_FONTS.serif, fontSize: 52, lineHeight: 1.05,
            color: A_COLORS.ink, margin: '28px 0 24px', letterSpacing: '-0.02em', fontWeight: 400
          }}>{t.quote_title_a}</h2>
          <p style={{
            fontFamily: A_FONTS.sans, fontSize: 15, lineHeight: 1.55,
            color: A_COLORS.muted, margin: 0, maxWidth: 320
          }}>{t.quote_sub}</p>

          <div style={{
            marginTop: 64, padding: 24, border: `1px solid ${A_COLORS.rule}`,
            background: A_COLORS.cream, borderRadius: 2
          }}>
            <A_MonoLabel ar={ar}>{ar ? 'اتصال · واتساب' : 'Call / WhatsApp'}</A_MonoLabel>
            <div style={{ fontFamily: A_FONTS.serif, fontSize: 22, color: A_COLORS.ink, marginTop: 8, direction: 'ltr', textAlign: ar ? 'right' : 'left' }}>
              +971 54 388 8660
            </div>
            <div style={{ fontFamily: A_FONTS.sans, fontSize: 13, color: A_COLORS.muted, marginTop: 6, direction: 'ltr', textAlign: ar ? 'right' : 'left' }}>
              info@JahizLink.com
            </div>
          </div>
        </div>

        <div>
          {sent ?
          <div style={{
            padding: 56, background: A_COLORS.green, color: A_COLORS.cream,
            borderRadius: 2, minHeight: 420,
            display: 'flex', flexDirection: 'column', justifyContent: 'center'
          }}>
              <div style={{
              fontFamily: A_FONTS.serif, fontStyle: 'italic',
              fontSize: 96, lineHeight: 1, color: A_COLORS.rust
            }}>✓</div>
              <h3 style={{
              fontFamily: A_FONTS.serif, fontSize: 44, margin: '24px 0 16px',
              letterSpacing: '-0.02em', fontWeight: 400
            }}>{t.f_sent_t}</h3>
              <p style={{
              fontFamily: A_FONTS.sans, fontSize: 16, lineHeight: 1.55,
              opacity: 0.85, margin: 0, maxWidth: 480
            }}>{t.f_sent_b}</p>
              <button onClick={() => {setSent(false);setForm({ name: '', company: '', email: '', phone: '', product: '', qty: '', notes: '' });}} style={{
              marginTop: 32, alignSelf: 'flex-start',
              background: 'transparent', border: `1px solid ${A_COLORS.cream}`,
              color: A_COLORS.cream, padding: '12px 22px', cursor: 'pointer',
              fontFamily: A_FONTS.sans, fontSize: 13, borderRadius: 2
            }}>{ar ? 'إرسال طلب آخر' : 'Send another'}</button>
            </div> :

          <form onSubmit={submit} className="a-form" style={{
            display: 'grid', gridTemplateColumns: '1fr 1fr', gap: '8px 24px'
          }}>
              <div><A_MonoLabel ar={ar}>{t.f_name}</A_MonoLabel>
                <input style={input} value={form.name} onChange={(e) => setF('name', e.target.value)} required /></div>
              <div><A_MonoLabel ar={ar}>{t.f_company}</A_MonoLabel>
                <input style={input} value={form.company} onChange={(e) => setF('company', e.target.value)} /></div>
              <div><A_MonoLabel ar={ar}>{t.f_email}</A_MonoLabel>
                <input type="email" style={input} value={form.email} onChange={(e) => setF('email', e.target.value)} required /></div>
              <div><A_MonoLabel ar={ar}>{t.f_phone}</A_MonoLabel>
                <input style={input} value={form.phone} onChange={(e) => setF('phone', e.target.value)} /></div>
              <div><A_MonoLabel ar={ar}>{t.f_product}</A_MonoLabel>
                <select style={input} value={form.product} onChange={(e) => setF('product', e.target.value)} required>
                  <option value="">{t.f_pick}</option>
                  {window.JAHIZ_PRODUCTS.map((p) =>
                <option key={p.id} value={p.id}>{p[`name_${lang}`]}</option>
                )}
                </select></div>
              <div><A_MonoLabel ar={ar}>{t.f_qty}</A_MonoLabel>
                <input style={input} placeholder={t.f_qty_ph} value={form.qty} onChange={(e) => setF('qty', e.target.value)} /></div>
              <div style={{ gridColumn: '1 / -1' }}><A_MonoLabel ar={ar}>{t.f_notes}</A_MonoLabel>
                <textarea style={{ ...input, minHeight: 80, resize: 'vertical' }} value={form.notes} onChange={(e) => setF('notes', e.target.value)} /></div>

              {error &&
            <div style={{ gridColumn: '1 / -1', marginTop: 8, color: A_COLORS.rust, fontFamily: A_FONTS.sans, fontSize: 13 }}>
                {ar ? 'تعذّر الإرسال. حاول مجدداً أو راسلنا على info@JahizLink.com.' : 'Could not send. Please try again, or email info@JahizLink.com.'}
              </div>
            }
              <button type="submit" disabled={sending} style={{
              gridColumn: '1 / -1', marginTop: 28,
              padding: '18px 28px', background: A_COLORS.ink, color: A_COLORS.cream,
              fontFamily: A_FONTS.sans, fontSize: 14, fontWeight: 500,
              border: 'none', borderRadius: 2, cursor: sending ? 'wait' : 'pointer', letterSpacing: '0.02em',
              opacity: sending ? 0.7 : 1,
              display: 'inline-flex', alignItems: 'center', justifyContent: 'space-between'
            }}>
                <span>{sending ? ar ? 'جارٍ الإرسال…' : 'Sending…' : t.f_send}</span>
                <span style={{ transform: ar ? 'scaleX(-1)' : 'none' }}>→</span>
              </button>
            </form>
          }
        </div>
      </div>
    </section>);

}

// ────────────────────────────────────────────────────────────────────
// Contact + Footer
// ────────────────────────────────────────────────────────────────────

function A_Contact({ t, ar }) {
  return (
    <section id="contact" className="a-sec" style={{
      background: A_COLORS.greenDeep, color: A_COLORS.cream,
      padding: '112px 56px'
    }}>
      <A_Eyebrow ar={ar}><span style={{ color: A_COLORS.cream, opacity: 0.7 }}>{t.contact_eyebrow}</span></A_Eyebrow>
      <h2 className="a-h2" style={{
        fontFamily: A_FONTS.serif, fontSize: 96, lineHeight: 1.0,
        margin: '24px 0 64px', letterSpacing: '-0.025em', fontWeight: 400,
        color: A_COLORS.cream
      }}>{t.contact_title_a}</h2>

      <div className="a-contact-grid" style={{ display: 'grid', gridTemplateColumns: 'repeat(4, 1fr)', gap: 32, borderTop: `1px solid rgba(244,236,216,0.2)`, paddingTop: 32 }}>
        {[
        [t.c_email, 'info@JahizLink.com'],
        [t.c_phone, '+971 54 388 8660'],
        [t.c_addr, t.addr],
        [t.c_hours, t.hours]].
        map(([k, v], i) =>
        <div key={i}>
            <A_MonoLabel ar={ar} style={{ color: 'rgba(244,236,216,0.55)' }}>{k}</A_MonoLabel>
            <div style={{
            marginTop: 12, fontFamily: A_FONTS.sans, fontSize: 15,
            lineHeight: 1.5, whiteSpace: 'pre-line',
            direction: i === 1 ? 'ltr' : ar ? 'rtl' : 'ltr',
            textAlign: ar ? 'right' : 'left'
          }}>{v}</div>
          </div>
        )}
      </div>

      <a href="https://wa.me/971543888660" style={{
        marginTop: 56, display: 'inline-flex', alignItems: 'center', gap: 10,
        padding: '16px 24px', background: A_COLORS.cream, color: A_COLORS.greenDeep,
        fontFamily: A_FONTS.sans, fontSize: 14, fontWeight: 500,
        textDecoration: 'none', borderRadius: 2
      }}>
        <span style={{
          width: 8, height: 8, borderRadius: '50%', background: '#3aaa56',
          display: 'inline-block'
        }} />
        {t.wa_cta}
      </a>
    </section>);

}

function A_Footer({ t, ar }) {
  return (
    <footer className="a-foot" style={{
      background: A_COLORS.greenDeep, color: 'rgba(244,236,216,0.55)',
      padding: '32px 56px', borderTop: `1px solid rgba(244,236,216,0.12)`,
      display: 'flex', justifyContent: 'space-between', alignItems: 'center',
      fontFamily: A_FONTS.mono, fontSize: 11, letterSpacing: '0.1em'
    }}>
      <span style={{ display: 'flex', alignItems: 'center', gap: 14 }}>
        <window.JahizMark size={24} onDark={true} />
        {t.footer_rights}
      </span>
      <span style={{ display: 'flex', alignItems: 'center', gap: 24 }}>
        <span style={{ display: 'flex', alignItems: 'center', gap: 14 }}>
          <a href="https://instagram.com/jahizlink" target="_blank" rel="noopener noreferrer" aria-label="Instagram"
          style={{ display: 'flex', color: 'rgba(244,236,216,0.62)', transition: 'color 0.2s' }}
          onMouseEnter={(e) => e.currentTarget.style.color = A_COLORS.cream}
          onMouseLeave={(e) => e.currentTarget.style.color = 'rgba(244,236,216,0.62)'}>
            <svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.6" strokeLinecap="round" strokeLinejoin="round">
              <rect x="2" y="2" width="20" height="20" rx="5" ry="5"></rect>
              <path d="M16 11.37A4 4 0 1 1 12.63 8 4 4 0 0 1 16 11.37z"></path>
              <line x1="17.5" y1="6.5" x2="17.51" y2="6.5"></line>
            </svg>
          </a>
          <a href="https://linkedin.com/company/jahizlink" target="_blank" rel="noopener noreferrer" aria-label="LinkedIn"
          style={{ display: 'flex', color: 'rgba(244,236,216,0.62)', transition: 'color 0.2s' }}
          onMouseEnter={(e) => e.currentTarget.style.color = A_COLORS.cream}
          onMouseLeave={(e) => e.currentTarget.style.color = 'rgba(244,236,216,0.62)'}>
            <svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.6" strokeLinecap="round" strokeLinejoin="round">
              <path d="M16 8a6 6 0 0 1 6 6v7h-4v-7a2 2 0 0 0-2-2 2 2 0 0 0-2 2v7h-4v-7a6 6 0 0 1 6-6z"></path>
              <rect x="2" y="9" width="4" height="12"></rect>
              <circle cx="4" cy="4" r="2"></circle>
            </svg>
          </a>
        </span>
        <span style={{ fontFamily: A_FONTS.serif, fontStyle: 'italic', fontSize: 14, letterSpacing: 0 }}>{t.footer_tag}</span>
      </span>
    </footer>);

}

// ────────────────────────────────────────────────────────────────────
// Composition
// ────────────────────────────────────────────────────────────────────

function A_FloatingWhatsApp({ t, ar, narrow }) {
  const [show, setShow] = useState(false);
  useEffect(() => {
    const reveal = () => setShow(true);
    // Reveal once the user scrolls past a bit of the page. Use capture-phase
    // so it fires whether the scroll happens on window or an inner container
    // (e.g. when embedded inside a pan/zoom canvas).
    const onScroll = (e) => {
      const top = e.target && (e.target.scrollTop ?? e.target.scrollY) ||
      window.scrollY || (
      document.scrollingElement ? document.scrollingElement.scrollTop : 0);
      if (top > 360) reveal();
    };
    window.addEventListener('scroll', onScroll, true);
    // Fallback: always surface it shortly after load so it's never stuck hidden.
    const timer = setTimeout(reveal, 2600);
    return () => {
      window.removeEventListener('scroll', onScroll, true);
      clearTimeout(timer);
    };
  }, []);
  const label = ar ? 'تواصل عبر واتساب' : 'Chat on WhatsApp';
  return (
    <a
      href="https://wa.me/971543888660"
      target="_blank"
      rel="noopener noreferrer"
      aria-label={label}
      className="a-floating-wa"
      style={{
        position: 'fixed', bottom: 24, insetInlineEnd: narrow ? 16 : 28, zIndex: 91,
        display: 'inline-flex', alignItems: 'center', gap: narrow ? 0 : 11,
        padding: narrow ? '14px' : '13px 20px 13px 15px',
        background: '#1f7a4d', color: '#fff',
        fontFamily: A_FONTS.sans, fontSize: 14.5, fontWeight: 500,
        textDecoration: 'none', borderRadius: 999,
        boxShadow: '0 8px 24px rgba(16,64,40,0.32)',
        opacity: show ? 1 : 0,
        transform: show ? 'translateY(0)' : 'translateY(14px)',
        pointerEvents: show ? 'auto' : 'none',
        transition: 'opacity .3s ease, transform .3s ease, background .2s'
      }}
      onMouseEnter={(e) => e.currentTarget.style.background = '#1a6841'}
      onMouseLeave={(e) => e.currentTarget.style.background = '#1f7a4d'}>
      <svg width="22" height="22" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true">
        <path d="M17.47 14.38c-.3-.15-1.76-.87-2.03-.97-.27-.1-.47-.15-.67.15-.2.3-.77.96-.95 1.16-.17.2-.35.22-.65.07-.3-.15-1.26-.46-2.4-1.48-.89-.79-1.49-1.77-1.66-2.07-.17-.3-.02-.46.13-.61.13-.13.3-.35.45-.52.15-.17.2-.3.3-.5.1-.2.05-.37-.02-.52-.07-.15-.67-1.62-.92-2.22-.24-.58-.49-.5-.67-.51l-.57-.01c-.2 0-.52.07-.79.37-.27.3-1.04 1.01-1.04 2.47 0 1.46 1.06 2.87 1.21 3.07.15.2 2.09 3.2 5.07 4.49.71.31 1.26.49 1.69.62.71.23 1.36.2 1.87.12.57-.08 1.76-.72 2.01-1.42.25-.69.25-1.29.17-1.42-.07-.13-.27-.2-.57-.35zM12.04 2C6.58 2 2.13 6.45 2.13 11.91c0 1.75.46 3.45 1.32 4.95L2 22l5.25-1.38c1.45.79 3.08 1.21 4.79 1.21 5.46 0 9.91-4.45 9.91-9.91C21.95 6.45 17.5 2 12.04 2z"></path>
      </svg>
      <span className="a-wa-label">{narrow ? '' : label}</span>
    </a>);

}

// Sticky tap-to-call — mobile only (desktop keeps the header tap-to-call).
function A_FloatingCall({ t, ar, narrow }) {
  if (!narrow) return null;
  const label = ar ? 'اتصل بنا' : 'Call us';
  return (
    <a
      href="tel:+971543888660"
      aria-label={`${label} +971 54 388 8660`}
      style={{
        position: 'fixed', bottom: 24, insetInlineStart: 16, zIndex: 91,
        display: 'inline-flex', alignItems: 'center', gap: 9,
        padding: '13px 18px 13px 14px',
        background: A_COLORS.green, color: '#fff',
        fontFamily: A_FONTS.sans, fontSize: 14.5, fontWeight: 600,
        textDecoration: 'none', borderRadius: 999,
        boxShadow: '0 8px 24px rgba(16,64,40,0.32)'
      }}>
      <svg width="19" height="19" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.9" strokeLinecap="round" strokeLinejoin="round" aria-hidden="true">
        <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.36 1.9.7 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.34 1.85.57 2.81.7A2 2 0 0 1 22 16.92z"></path>
      </svg>
      <span style={{ direction: 'ltr' }}>+971 54 388 8660</span>
    </a>);

}

const A_RESPONSIVE_CSS = `
.a-content { container-type: inline-size; }
@container (max-width: 760px) {
  .a-hd { padding: 14px 18px !important; gap: 12px !important; }
  .a-nav { display: none !important; }
  .a-tel { display: none !important; }
  .a-div { display: none !important; }

  .a-hero-pad { min-height: 0 !important; padding: 36px 18px 32px !important; }
  .a-hero-h1 { font-size: 46px !important; line-height: 0.99 !important; }
  .a-hero-grid { grid-template-columns: 1fr !important; gap: 26px !important; margin-top: 30px !important; align-items: start !important; }
  .a-hero-cta { flex-wrap: wrap !important; }
  .a-hero-cta > a { flex: 1 1 140px !important; text-align: center !important; }
  .a-stat-pad { padding: 0 18px 44px !important; }
  .a-stat-grid { grid-template-columns: 1fr 1fr !important; gap: 26px 20px !important; }
  .a-stat-n { font-size: 38px !important; }

  .a-sec { padding: 52px 18px !important; }
  .a-split { grid-template-columns: 1fr !important; gap: 22px !important; margin-bottom: 28px !important; }
  .a-h2 { font-size: 34px !important; line-height: 1.08 !important; }
  .a-about-body { font-size: 19px !important; line-height: 1.5 !important; }
  .a-prod-grid { grid-template-columns: 1fr 1fr !important; gap: 28px 16px !important; padding-top: 28px !important; }
  .a-prod-img { height: 142px !important; }
  .a-prod-grid h3 { font-size: 19px !important; }
  .a-prod-grid article > div { padding-top: 11px !important; margin-top: 10px !important; gap: 9px !important; }
  .a-prod-blurb { font-size: 12.5px !important; line-height: 1.45 !important; margin-top: 8px !important; display: -webkit-box !important; -webkit-line-clamp: 3 !important; -webkit-box-orient: vertical !important; overflow: hidden !important; }
  .a-clients { grid-template-columns: 1fr !important; }
  .a-clients > div { border-inline-start: none !important; border-top: 1px solid rgba(21,32,26,0.10) !important; min-height: 0 !important; padding: 20px 0 !important; }
  .a-form { grid-template-columns: 1fr !important; }
  .a-contact-grid { grid-template-columns: 1fr !important; gap: 26px !important; }
  .a-foot { flex-direction: column !important; align-items: flex-start !important; gap: 16px !important; padding: 26px 18px !important; }

  /* Hamburger menu */
  .a-burger { display: inline-flex !important; }
  .a-quote-btn { display: none !important; }
  .a-mobile-menu { display: flex !important; }
}
@container (min-width: 761px) {
  .a-mobile-menu { display: none !important; }
}
`;

function DirectionA({ lang, setLang, wordColors }) {
  const ar = lang === 'ar';
  const t = window.JAHIZ_I18N[lang];
  const [cat, setCat] = useState('feed');
  const rootRef = React.useRef(null);
  const [narrow, setNarrow] = useState(false);
  useEffect(() => {
    const measure = () => {
      const w = rootRef.current ? rootRef.current.offsetWidth : 0;
      if (w) setNarrow(w < 760);
    };
    measure();
    const r1 = requestAnimationFrame(measure);
    const t1 = setTimeout(measure, 300);
    window.addEventListener('resize', measure);
    return () => {
      cancelAnimationFrame(r1);
      clearTimeout(t1);
      window.removeEventListener('resize', measure);
    };
  }, []);
  return (
    <div ref={rootRef} dir={t.dir} style={{
      background: A_COLORS.paper, color: A_COLORS.ink,
      fontFamily: A_FONTS.sans, width: '100%'
    }}>
      <style>{A_RESPONSIVE_CSS}</style>
      <div className="a-content">
        <A_Header t={t} lang={lang} setLang={setLang} ar={ar} setCat={setCat} />
        <A_Hero t={t} ar={ar} wordColors={wordColors} />
        <A_About t={t} ar={ar} />
        <A_Products t={t} lang={lang} ar={ar} cat={cat} setCat={setCat} />
        <A_Trust t={t} ar={ar} />
        <A_Quote t={t} lang={lang} ar={ar} />
        <A_Contact t={t} ar={ar} />
        <A_Footer t={t} ar={ar} />
      </div>
      <A_FloatingCall t={t} ar={ar} narrow={narrow} />
      <A_FloatingWhatsApp t={t} ar={ar} narrow={narrow} />
    </div>);

}

window.DirectionA = DirectionA;