<?php $lang=stb_lang(); $B='/NewSite'; $fa=$lang==='fa'; 
$login_label_url = $lang==='fa' ? 'https://crm.stbbrokers.com/fa':'https://crm.stbbrokers.com/';
$register_label_url = $lang==='fa' ? 'https://crm.stbbrokers.com/fa/register':'https://crm.stbbrokers.com/register/';

?>
<style>
/* ══════════════════════════════════════════════════════════════
   EXECUTION & SPREADS — Futuristic Animated
══════════════════════════════════════════════════════════════ */
.ex-rev{opacity:0;transform:translateY(28px);transition:opacity .7s cubic-bezier(.16,1,.3,1),transform .7s cubic-bezier(.16,1,.3,1)}
.ex-rev.vis{opacity:1;transform:none}
.ex-rev.d1{transition-delay:.12s}.ex-rev.d2{transition-delay:.24s}.ex-rev.d3{transition-delay:.36s}

/* Hero */
.ex-hero-bg{position:absolute;inset:0;
  background:radial-gradient(ellipse 70% 50% at 50% -10%,rgba(20,224,163,.1),transparent),
  radial-gradient(ellipse 40% 40% at 85% 80%,rgba(200,16,46,.06),transparent),
  repeating-linear-gradient(0deg,transparent,transparent 59px,rgba(20,224,163,.015) 60px),
  repeating-linear-gradient(90deg,transparent,transparent 59px,rgba(20,224,163,.015) 60px)}
.ex-particles{position:absolute;inset:0;overflow:hidden;pointer-events:none;z-index:0}
.ex-particle{position:absolute;width:2px;height:2px;background:rgba(20,224,163,.3);border-radius:50%;animation:ex-float linear infinite}
@keyframes ex-float{0%{transform:translateY(0);opacity:0}10%{opacity:1}90%{opacity:1}100%{transform:translateY(-100vh);opacity:0}}

/* ── Execution Flow Widget ── */
.ex-flow{border-radius:20px;overflow:hidden;background:linear-gradient(160deg,#080a0f,#0c0e14);
  border:1px solid rgba(255,255,255,.07);margin-bottom:56px;position:relative}
.ex-flow::before{content:'';position:absolute;inset:0;
  background:radial-gradient(ellipse 50% 40% at 20% 0%,rgba(20,224,163,.04),transparent);pointer-events:none}
.ex-flow::after{content:'';position:absolute;top:0;left:0;right:0;height:1px;
  background:linear-gradient(90deg,transparent,rgba(20,224,163,.4),transparent);animation:ex-sweep 4s linear infinite}
@keyframes ex-sweep{0%,100%{opacity:.3}50%{opacity:1}}
.ex-flow-inner{display:grid;grid-template-columns:1fr 1fr;gap:0;position:relative;z-index:1}
@media(max-width:800px){.ex-flow-inner{grid-template-columns:1fr}}
.ex-flow-text{padding:44px 36px;display:flex;flex-direction:column;justify-content:center}
@media(max-width:800px){.ex-flow-text{padding:28px 20px}}
.ex-flow-kicker{font-size:10px;font-weight:700;letter-spacing:.15em;text-transform:uppercase;
  color:rgba(20,224,163,.7);margin-bottom:12px;display:flex;align-items:center;gap:8px}
.ex-flow-kicker::before{content:'';width:6px;height:6px;border-radius:50%;background:#14e0a3;
  box-shadow:0 0 8px #14e0a3;animation:ex-dot 2s infinite}
@keyframes ex-dot{0%,100%{box-shadow:0 0 4px #14e0a3}50%{box-shadow:0 0 14px rgba(20,224,163,.6)}}
.ex-flow-title{font-size:26px;font-weight:800;color:#fff;margin-bottom:10px;line-height:1.2}
@media(max-width:560px){.ex-flow-title{font-size:20px}}
.ex-flow-title em{font-style:normal;color:#14e0a3}
.ex-flow-desc{font-size:13.5px;color:rgba(255,255,255,.4);line-height:1.7;margin-bottom:24px}
.ex-flow-steps{display:flex;flex-direction:column;gap:10px}
.ex-flow-step{display:flex;align-items:center;gap:12px;padding:10px 14px;border-radius:10px;
  background:rgba(255,255,255,.025);border:1px solid rgba(255,255,255,.05);transition:all .2s}
.ex-flow-step:hover{border-color:rgba(20,224,163,.2);background:rgba(20,224,163,.03)}
.ex-flow-step-num{width:28px;height:28px;border-radius:7px;background:rgba(20,224,163,.08);
  border:1px solid rgba(20,224,163,.15);display:flex;align-items:center;justify-content:center;
  font-size:11px;font-weight:800;color:#14e0a3;flex-shrink:0}
.ex-flow-step-text{font-size:13px;color:rgba(255,255,255,.55)}
.ex-flow-step-text strong{color:#fff}
.ex-flow-canvas{position:relative;min-height:380px;border-left:1px solid rgba(255,255,255,.06)}
@media(max-width:800px){.ex-flow-canvas{min-height:260px;border-left:none;border-top:1px solid rgba(255,255,255,.06)}}
#ex-flow-cvs{width:100%;height:100%;display:block}

/* ── Spread Comparison Cards ── */
.ex-spreads{display:grid;grid-template-columns:repeat(3,1fr);gap:14px;margin-bottom:56px}
@media(max-width:800px){.ex-spreads{grid-template-columns:repeat(2,1fr)}}
@media(max-width:500px){.ex-spreads{grid-template-columns:1fr}}
.ex-spread-card{background:#0a0c10;border:1px solid rgba(255,255,255,.06);border-radius:16px;
  padding:24px;text-align:center;position:relative;overflow:hidden;transition:all .3s}
.ex-spread-card::before{content:'';position:absolute;top:0;left:0;right:0;height:2px;
  background:var(--ec,#14e0a3);transform:scaleX(0);transform-origin:center;transition:transform .4s cubic-bezier(.16,1,.3,1)}
.ex-spread-card:hover{border-color:rgba(255,255,255,.12);transform:translateY(-3px);box-shadow:0 16px 40px rgba(0,0,0,.4)}
.ex-spread-card:hover::before{transform:scaleX(1)}
.ex-spread-pair{font-size:12px;font-weight:700;color:rgba(255,255,255,.5);letter-spacing:.06em;margin-bottom:12px}
.ex-spread-val{font-size:36px;font-weight:800;color:#fff;line-height:1;margin-bottom:4px}
.ex-spread-val em{font-style:normal;font-size:.4em;color:var(--ec,#14e0a3);vertical-align:super}
.ex-spread-label{font-size:11px;color:rgba(255,255,255,.3);margin-bottom:14px}
.ex-spread-bar{height:4px;border-radius:2px;background:rgba(255,255,255,.06);overflow:hidden}
.ex-spread-fill{height:100%;border-radius:2px;background:var(--ec,#14e0a3);transition:width 1.2s cubic-bezier(.16,1,.3,1);width:0;box-shadow:0 0 8px var(--ec)}

/* ── Detailed Spread Table ── */
.ex-widget{border-radius:20px;overflow:hidden;background:linear-gradient(160deg,#080a0f,#0c0e14);
  border:1px solid rgba(255,255,255,.07);margin-bottom:56px;position:relative}
.ex-widget::after{content:'';position:absolute;top:0;left:0;right:0;height:1px;
  background:linear-gradient(90deg,transparent,rgba(200,16,46,.3),transparent)}
.ex-widget-bar{display:flex;align-items:center;justify-content:space-between;
  padding:18px 28px;border-bottom:1px solid rgba(255,255,255,.06);position:relative;z-index:2}
@media(max-width:600px){.ex-widget-bar{padding:14px 16px;flex-wrap:wrap;gap:10px}}
.ex-widget-title{font-size:13px;font-weight:700;color:rgba(255,255,255,.5);
  display:flex;align-items:center;gap:8px}
.ex-widget-title::before{content:'';width:6px;height:6px;border-radius:50%;background:#C8102E;
  box-shadow:0 0 8px rgba(200,16,46,.5);animation:ex-rdot 2s infinite}
@keyframes ex-rdot{0%,100%{box-shadow:0 0 4px rgba(200,16,46,.3)}50%{box-shadow:0 0 14px rgba(200,16,46,.7)}}
.ex-widget-badge{font-size:11px;font-weight:700;padding:5px 12px;border-radius:8px;
  background:rgba(200,16,46,.06);border:1px solid rgba(200,16,46,.15);color:#C8102E}
.ex-tbl-wrap{overflow-x:auto;-webkit-overflow-scrolling:touch;position:relative;z-index:1}
.ex-tbl{width:100%;border-collapse:collapse;min-width:600px}
.ex-tbl th{padding:12px 24px;font-size:9.5px;font-weight:700;letter-spacing:.12em;text-transform:uppercase;
  color:rgba(255,255,255,.2);background:rgba(255,255,255,.02);border-bottom:1px solid rgba(255,255,255,.06);text-align:left}
.ex-tbl td{padding:12px 24px;font-size:13px;color:rgba(255,255,255,.5);
  border-bottom:1px solid rgba(255,255,255,.035);transition:all .15s}
.ex-tbl td:first-child{font-weight:700;color:#fff;font-family:'SF Mono',monospace;font-size:12.5px}
.ex-tbl tr:last-child td{border-bottom:none}
.ex-tbl tbody tr{cursor:default;transition:background .15s}
.ex-tbl tbody tr:hover td{background:rgba(200,16,46,.03);color:rgba(255,255,255,.75)}
.ex-tbl .grn{color:#14e0a3;font-weight:700}
.ex-tbl .red{color:#C8102E;font-weight:700}
.ex-tbl tbody tr{opacity:0;animation:ex-row .3s ease-out forwards}
@keyframes ex-row{to{opacity:1}}
@media(max-width:700px){.ex-scroll-hint{display:block;text-align:center;font-size:11px;color:rgba(255,255,255,.2);padding:6px}}

/* ── Advantages Grid ── */
.ex-adv-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:14px;margin-bottom:56px}
@media(max-width:700px){.ex-adv-grid{grid-template-columns:1fr}}
.ex-adv{background:#0a0c10;border:1px solid rgba(255,255,255,.06);border-radius:14px;
  padding:24px;display:flex;gap:16px;transition:all .25s;position:relative;overflow:hidden}
.ex-adv::before{content:'';position:absolute;left:0;top:0;bottom:0;width:3px;
  background:var(--ac,#14e0a3);opacity:0;transition:opacity .25s}
.ex-adv:hover{border-color:rgba(255,255,255,.12);background:#0d0f14}
.ex-adv:hover::before{opacity:1}
.ex-adv-icon{width:40px;height:40px;border-radius:10px;flex-shrink:0;
  background:rgba(255,255,255,.03);border:1px solid rgba(255,255,255,.07);
  display:flex;align-items:center;justify-content:center}
.ex-adv-icon svg{stroke:var(--ac,#14e0a3);fill:none;width:18px;height:18px}
.ex-adv-title{font-size:14px;font-weight:700;color:#fff;margin-bottom:5px}
.ex-adv-desc{font-size:12.5px;color:rgba(255,255,255,.4);line-height:1.6}

/* Mobile */
@media(max-width:560px){
  .ip-hero-stats{gap:20px}
  .ip-hero-ctas{flex-direction:column}
  .ip-hero-ctas a{text-align:center;justify-content:center}
  .ex-adv{flex-direction:column;gap:12px}
  .ex-spread-val{font-size:28px}
}
</style>

<article class="ip-page">
<!-- ═══ HERO ═══ -->
<div class="ip-hero" style="position:relative;overflow:hidden">
  <div class="ex-hero-bg"></div>
  <div class="ip-hero-glow"></div>
  <div class="ex-particles" id="ex-particles"></div>
  <div class="ip-container" style="position:relative;z-index:1">
    <nav class="ip-breadcrumb">
      <a href="<?php echo stb_url($B.'/'); ?>"><?php echo $fa?'خانه':'Home';?></a>
      <span class="ip-breadcrumb-sep">›</span>
      <span><?php echo $fa?'اجرا و اسپرد':'Execution & Spreads';?></span>
    </nav>
    <div class="ip-kicker"><span class="ip-kicker-dot"></span><?php echo $fa?'بروکر STB':'STB BROKER';?></div>
    <h1 class="ip-h1"><?php echo $fa?'برتری در <em>اجرا</em>':'<em>Execution</em> Excellence';?></h1>
    <p class="ip-hero-desc"><?php echo $fa?'STB از مدل NDD STP/ECN استفاده می‌کند — سفارش‌های شما مستقیماً به بازار ارسال می‌شوند. بدون دخالت در قیمت، بدون دستکاری.':'STB uses a No Dealing Desk (NDD) STP/ECN model — your orders go directly to the market with zero interference, zero manipulation.';?></p>
    <div class="ip-hero-stats">
      <div><div class="ip-stat-val">0.125<em>s</em></div><div class="ip-stat-lbl"><?php echo $fa?'میانگین اجرا':'Avg Execution';?></div></div>
      <div><div class="ip-stat-val">0.0<em>pip</em></div><div class="ip-stat-lbl"><?php echo $fa?'حداقل اسپرد':'Min Spread';?></div></div>
      <div><div class="ip-stat-val">NDD</div><div class="ip-stat-lbl"><?php echo $fa?'مدل اجرا':'Execution Model';?></div></div>
      <div><div class="ip-stat-val">STP/ECN</div><div class="ip-stat-lbl"><?php echo $fa?'مسیر سفارش':'Order Routing';?></div></div>
    </div>
    <div class="ip-hero-ctas">
      <a href="<?php echo esc_html($register_label_url);?>" class="ip-btn-red"><?php echo $fa?'شروع معامله':'Start Trading';?> <svg viewBox="0 0 24 24"><path d="M5 12h14M12 5l7 7-7 7" stroke-width="2" stroke-linecap="round"/></svg></a>
      <a href="<?php echo stb_url($B.'/trading-accounts/'); ?>" class="ip-btn-ghost"><?php echo $fa?'مشاهده حساب‌ها':'View Accounts';?></a>
    </div>
  </div>
</div>

<!-- ═══ EXECUTION FLOW ═══ -->
<section class="ip-section">
  <div class="ip-container">
    <h2 class="ip-section-title ex-rev"><?php echo $fa?'مسیر <em>اجرای سفارش</em>':'Order <em>Execution Flow</em>';?></h2>
    <p class="ip-section-desc ex-rev d1"><?php echo $fa?'هر سفارش از طریق پل نقدینگی NDD ما به صورت مستقیم به تأمین‌کنندگان سطح ۱ ارسال می‌شود.':'Every order is routed directly to Tier-1 liquidity providers through our NDD bridge.';?></p>
    <div class="ex-flow ex-rev d2">
      <div class="ex-flow-inner">
        <div class="ex-flow-text">
          <div class="ex-flow-kicker"><?php echo $fa?'معماری اجرای سفارش':'EXECUTION ARCHITECTURE';?></div>
          <h3 class="ex-flow-title"><?php echo $fa?'از کلیک تا <em>اجرا</em>':'From Click to <em>Fill</em>';?></h3>
          <p class="ex-flow-desc"><?php echo $fa?'سفارش شما در میلی‌ثانیه از طریق زیرساخت NDD ما پردازش می‌شود. بدون دستکاری، بدون قیمت‌های مجدد':'Your order is processed in milliseconds through our NDD infrastructure. No dealing desk, no requotes.';?></p>
          <div class="ex-flow-steps">
            <?php $steps = $fa ? [
              ['1','<strong>ثبت سفارش</strong> — شما روی خرید یا فروش در MT5 کلیک می‌کنید'],
              ['2','<strong>پردازش NDD</strong> — سفارش بدون دخالت به پل نقدینگی ارسال می‌شود'],
              ['3','<strong>تجمیع نقدینگی</strong> — بهترین قیمت از بین چندین LP انتخاب می‌شود'],
              ['4','<strong>اجرای بازار</strong> — سفارش با بهترین قیمت موجود پر می‌شود'],
              ['5','<strong>تأیید</strong> — نتیجه در کمتر از ۰.۱۲۵ ثانیه به MT5 برمی‌گردد'],
            ] : [
              ['1','<strong>Order Placed</strong> — You click Buy or Sell in MT5'],
              ['2','<strong>NDD Processing</strong> — Order sent to liquidity bridge with zero interference'],
              ['3','<strong>Liquidity Aggregation</strong> — Best price selected from multiple LPs'],
              ['4','<strong>Market Execution</strong> — Order filled at best available price'],
              ['5','<strong>Confirmation</strong> — Result returned to MT5 in under 0.125 seconds'],
            ];
            foreach($steps as $s): ?>
            <div class="ex-flow-step">
              <div class="ex-flow-step-num"><?php echo $s[0]; ?></div>
              <div class="ex-flow-step-text"><?php echo $s[1]; ?></div>
            </div>
            <?php endforeach; ?>
          </div>
        </div>
        <div class="ex-flow-canvas"><canvas id="ex-flow-cvs"></canvas></div>
      </div>
    </div>
  </div>
</section>

<!-- ═══ SPREAD HIGHLIGHTS ═══ -->
<section class="ip-section alt">
  <div class="ip-container">
    <h2 class="ip-section-title ex-rev"><?php echo $fa?'اسپردهای <em>رقابتی</em>':'Competitive <em>Spreads</em>';?></h2>
    <p class="ip-section-desc ex-rev d1"><?php echo $fa?'اسپردهای خام از ۰.۰ پیپ در حساب‌های  Prime. بدون هیچ‌گونه اضافه‌کاری پنهان':'Raw spreads from 0.0 pips on Prime accounts. No hidden markups.';?></p>
    <div class="ex-spreads ex-rev d2" id="ex-spreads">
      <?php $spreads = [
        ['EUR/USD','0.0','pips','#14e0a3',8],
        ['GBP/USD','0.2','pips','#14e0a3',15],
        ['XAU/USD','0.15','','#C8102E',12],
        ['NAS 100','0.5','pts','#C8102E',20],
        ['BTC/USD','30','','#14e0a3',25],
        ['USD/JPY','0.1','pips','#14e0a3',10],
      ];
      foreach($spreads as $sp): ?>
      <div class="ex-spread-card" style="--ec:<?php echo $sp[3]; ?>">
        <div class="ex-spread-pair"><?php echo $sp[0]; ?></div>
        <div class="ex-spread-val"><?php echo $sp[1]; ?><em><?php echo $sp[2]; ?></em></div>
        <div class="ex-spread-label"><?php echo $fa?'حداقل اسپرد':'Min Spread';?></div>
        <div class="ex-spread-bar"><div class="ex-spread-fill" data-w="<?php echo $sp[4]; ?>%"></div></div>
      </div>
      <?php endforeach; ?>
    </div>
  </div>
</section>

<!-- ═══ SPREAD TABLE ═══ -->
<section class="ip-section">
  <div class="ip-container">
    <div class="ex-widget ex-rev">
      <div class="ex-widget-bar">
        <div class="ex-widget-title"><?php echo $fa?'جدول اسپرد و کمیسیون':'SPREAD & COMMISSION TABLE';?></div>
        <div class="ex-widget-badge"><?php echo $fa?'حساب Prime':'Prime Account';?></div>
      </div>
      <div class="ex-tbl-wrap">
        <table class="ex-tbl">
          <thead><tr>
            <th><?php echo $fa?'نماد':'Symbol';?></th>
            <th><?php echo $fa?'اسپرد معمول':'Typical Spread';?></th>
            <th><?php echo $fa?'کمیسیون':'Commission';?></th>
            <th><?php echo $fa?'مدل اجرا':'Execution';?></th>
            <th><?php echo $fa?'سواپ':'Swap';?></th>
          </tr></thead>
          <tbody>
            <?php $rows = $fa ? [
              ['EUR/USD','۰.۰ – ۰.۳ پیپ','$6/لات RT','مارکت NDD','بله'],
              ['GBP/USD','۰.۲ – ۰.۵ پیپ','$6/لات RT','مارکت NDD','بله'],
              ['USD/JPY','۰.۱ – ۰.۴ پیپ','$6/لات RT','مارکت NDD','بله'],
              ['AUD/USD','۰.۳ – ۰.۶ پیپ','$6/لات RT','مارکت NDD','بله'],
              ['XAU/USD','۰.۱۵ – ۰.۳۵','$6/لات RT','مارکت NDD','بله'],
              ['XAG/USD','۰.۰۲ – ۰.۰۴','$6/لات RT','مارکت NDD','بله'],
              ['WTI Oil','۰.۰۳ – ۰.۰۵','$6/لات RT','مارکت NDD','بله'],
              ['S&P 500','۰.۳ – ۰.۸ پوینت','$6/لات RT','مارکت NDD','—'],
              ['NAS 100','۰.۵ – ۱.۵ پوینت','$6/لات RT','مارکت NDD','—'],
              ['BTC/USD','۳۰ – ۵۰','0.03%','مارکت NDD','درصدی'],
              ['ETH/USD','۲.۰ – ۴.۰','0.03%','مارکت NDD','درصدی'],
              ['Apple','۰.۲۰ – ۰.۴۰','0.03%/سهم','مارکت','بله'],
            ] : [
              ['EUR/USD','0.0 – 0.3 pips','$6/lot RT','Market NDD','Points'],
              ['GBP/USD','0.2 – 0.5 pips','$6/lot RT','Market NDD','Points'],
              ['USD/JPY','0.1 – 0.4 pips','$6/lot RT','Market NDD','Points'],
              ['AUD/USD','0.3 – 0.6 pips','$6/lot RT','Market NDD','Points'],
              ['XAU/USD','0.15 – 0.35','$6/lot RT','Market NDD','Points'],
              ['XAG/USD','0.02 – 0.04','$6/lot RT','Market NDD','Points'],
              ['WTI Oil','0.03 – 0.05','$6/lot RT','Market NDD','Points'],
              ['S&P 500','0.3 – 0.8 pts','$6/lot RT','Market NDD','—'],
              ['NAS 100','0.5 – 1.5 pts','$6/lot RT','Market NDD','—'],
              ['BTC/USD','30 – 50','0.03%','Market NDD','Percentage'],
              ['ETH/USD','2.0 – 4.0','0.03%','Market NDD','Percentage'],
              ['Apple','0.20 – 0.40','0.03%/share','Market','Points'],
            ];
            foreach($rows as $i=>$r): ?>
            <tr style="animation-delay:<?php echo $i*0.04; ?>s">
              <td><?php echo $r[0]; ?></td>
              <td class="grn"><?php echo $r[1]; ?></td>
              <td><?php echo $r[2]; ?></td>
              <td><?php echo $r[3]; ?></td>
              <td><?php echo $r[4]; ?></td>
            </tr>
            <?php endforeach; ?>
          </tbody>
        </table>
      </div>
    </div>
  </div>
</section>

<!-- ═══ ADVANTAGES ═══ -->
<section class="ip-section alt">
  <div class="ip-container">
    <h2 class="ip-section-title ex-rev"><?php echo $fa?'مزایای اجرای <em>STB</em>':'STB Execution <em>Advantages</em>';?></h2>
    <div class="ex-adv-grid ex-rev d1">
      <?php $advs = $fa ? [
        ['#14e0a3','<path d="M13 2L3 14h9l-1 8 10-12h-9l1-8z" stroke-width="1.5" stroke-linecap="round"/>',
         'بدون قیمت مجدد','سفارشات شما همیشه با بهترین قیمت بازار پر می‌شوند. هیچ‌گاه قیمت مجدد نخواهید داشت'],
        ['#C8102E','<path d="M22 12h-4l-3 9L9 3l-3 9H2" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>',
         'لغزش حداقلی','زیرساخت بهینه‌شده برای لغزش نزدیک به صفر حتی در زمان نوسانات بالا.'],
        ['#14e0a3','<path d="M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z" stroke-width="1.5"/>',
         'نقدینگی Tier-1','نقدینگی از بانک‌ها و مؤسسات مالی بزرگ جهانی تجمیع می‌شود.'],
        ['#C8102E','<circle cx="12" cy="12" r="10" stroke-width="1.5"/><path d="M12 8v4l3 3" stroke-width="1.5" stroke-linecap="round"/>',
         'شفافیت کامل','هیچ دخالتی در قیمت وجود ندارد. مدل NDD تضمین می‌کند سفارش‌ها بدون واسطه پر شوند.'],
      ] : [
        ['#14e0a3','<path d="M13 2L3 14h9l-1 8 10-12h-9l1-8z" stroke-width="1.5" stroke-linecap="round"/>',
         'Zero Requotes','Your orders are always filled at the best available market price. You\'ll never be requoted.'],
        ['#C8102E','<path d="M22 12h-4l-3 9L9 3l-3 9H2" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>',
         'Minimal Slippage','Infrastructure optimized for near-zero slippage even during high volatility.'],
        ['#14e0a3','<path d="M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z" stroke-width="1.5"/>',
         'Tier-1 Liquidity','Liquidity aggregated from major global banks and financial institutions.'],
        ['#C8102E','<circle cx="12" cy="12" r="10" stroke-width="1.5"/><path d="M12 8v4l3 3" stroke-width="1.5" stroke-linecap="round"/>',
         'Full Transparency','No price interference. NDD model ensures orders are filled without intermediaries.'],
      ];
      foreach($advs as $a): ?>
      <div class="ex-adv" style="--ac:<?php echo $a[0]; ?>">
        <div class="ex-adv-icon"><svg viewBox="0 0 24 24"><?php echo $a[1]; ?></svg></div>
        <div><div class="ex-adv-title"><?php echo $a[2]; ?></div><div class="ex-adv-desc"><?php echo $a[3]; ?></div></div>
      </div>
      <?php endforeach; ?>
    </div>
  </div>
</section>

<!-- ═══ CTA ═══ -->
<section class="ip-section">
  <div class="ip-container">
    <div class="ip-cta-strip ex-rev">
      <div class="ip-cta-strip-text">
        <h3><?php echo $fa?'آماده تجربه اجرای حرفه‌ای هستید؟':'Ready for professional execution?';?></h3>
        <p><?php echo $fa?'حساب خود را باز کنید. اسپرد از ۰.۰ پیپ، اجرای NDD، بدون ریکوت.':'Open your account. Spreads from 0.0 pips, NDD execution, zero requotes.';?></p>
      </div>
      <div class="ip-cta-strip-btns">
        <a href="<?php echo esc_html($register_label_url);?>" class="ip-btn-red"><?php echo $fa?'افتتاح حساب':'Open Account';?></a>
        <a href="<?php echo stb_url($B.'/contact/'); ?>" class="ip-btn-ghost"><?php echo $fa?'تماس با ما':'Contact Us';?></a>
      </div>
    </div>
  </div>
</section>
</article>

<script>
(function(){
  /* Scroll reveal */
  var obs=new IntersectionObserver(function(e){e.forEach(function(en){if(en.isIntersecting){en.target.classList.add('vis');obs.unobserve(en.target)}})},{threshold:.1});
  document.querySelectorAll('.ex-rev').forEach(function(el){obs.observe(el)});

  /* Particles */
  var pc=document.getElementById('ex-particles');
  if(pc){for(var i=0;i<15;i++){var p=document.createElement('div');p.className='ex-particle';
    p.style.left=Math.random()*100+'%';p.style.top=Math.random()*100+'%';
    p.style.animationDuration=(4+Math.random()*6)+'s';p.style.animationDelay=Math.random()*5+'s';
    p.style.width=p.style.height=(1+Math.random()*2)+'px';pc.appendChild(p);}}

  /* Spread bars animate on scroll */
  var spObs=new IntersectionObserver(function(e){e.forEach(function(en){if(en.isIntersecting){
    en.target.querySelectorAll('.ex-spread-fill').forEach(function(f){f.style.width=f.dataset.w});
    spObs.unobserve(en.target);
  }})},{threshold:.3});
  var spEl=document.getElementById('ex-spreads');if(spEl)spObs.observe(spEl);

  /* Execution flow canvas — order routing visualization */
  var c=document.getElementById('ex-flow-cvs');
  if(!c)return;
  var ctx=c.getContext('2d'),dpr=window.devicePixelRatio||1,t=0;
  var animId=null, isVisible=false;
  var observer = new IntersectionObserver(function(entries){
    entries.forEach(function(entry){
      isVisible = entry.isIntersecting;
      if(isVisible){
        if(!animId) animId = requestAnimationFrame(draw);
      } else {
        if(animId) {
          cancelAnimationFrame(animId);
          animId = null;
        }
      }
    });
  }, {threshold:0.01});
  function resize(){var r=c.parentElement.getBoundingClientRect();c.width=r.width*dpr;c.height=r.height*dpr;c.style.width=r.width+'px';c.style.height=r.height+'px';ctx.setTransform(dpr,0,0,dpr,0,0)}
  resize();window.addEventListener('resize',resize);
  observer.observe(c);

  var nodes=[
    {x:.15,y:.2,label:'MT5',color:'#C8102E',r:8},
    {x:.5,y:.15,label:'NDD',color:'#14e0a3',r:10},
    {x:.5,y:.5,label:'LP',color:'#14e0a3',r:12},
    {x:.5,y:.85,label:'AGG',color:'#14e0a3',r:10},
    {x:.85,y:.5,label:'MKT',color:'#C8102E',r:8},
    {x:.15,y:.8,label:'YOU',color:'#fff',r:6},
  ];
  var links=[[5,0],[0,1],[1,2],[2,3],[1,4],[3,4]];
  var packets=[];

  function spawnPacket(){
    var path=links[Math.floor(Math.random()*links.length)];
    packets.push({from:path[0],to:path[1],t:0,speed:.008+Math.random()*.008,
      color:Math.random()>.5?'rgba(20,224,163,':'rgba(200,16,46,'});
  }

  function draw(){
    var w=c.width/dpr,h=c.height/dpr;ctx.clearRect(0,0,w,h);
    // Grid
    ctx.strokeStyle='rgba(255,255,255,.015)';ctx.lineWidth=.5;
    for(var gy=0;gy<h;gy+=25){ctx.beginPath();ctx.moveTo(0,gy);ctx.lineTo(w,gy);ctx.stroke()}
    for(var gx=0;gx<w;gx+=25){ctx.beginPath();ctx.moveTo(gx,0);ctx.lineTo(gx,h);ctx.stroke()}
    // Links
    links.forEach(function(l){
      var a=nodes[l[0]],b=nodes[l[1]];
      ctx.beginPath();ctx.moveTo(a.x*w,a.y*h);ctx.lineTo(b.x*w,b.y*h);
      ctx.strokeStyle='rgba(255,255,255,.06)';ctx.lineWidth=1;ctx.stroke();
    });
    // Nodes
    nodes.forEach(function(n){
      var x=n.x*w,y=n.y*h;
      var g=ctx.createRadialGradient(x,y,0,x,y,n.r*3);
      g.addColorStop(0,n.color+'22');g.addColorStop(1,'transparent');
      ctx.fillStyle=g;ctx.fillRect(x-n.r*3,y-n.r*3,n.r*6,n.r*6);
      ctx.beginPath();ctx.arc(x,y,n.r,0,Math.PI*2);
      ctx.fillStyle=n.color+'44';ctx.fill();
      ctx.beginPath();ctx.arc(x,y,n.r*.5,0,Math.PI*2);ctx.fillStyle=n.color+'88';ctx.fill();
      ctx.font='600 8px system-ui';ctx.fillStyle='rgba(255,255,255,.4)';ctx.textAlign='center';
      ctx.fillText(n.label,x,y+n.r+12);
    });
    // Packets
    packets.forEach(function(p){
      p.t+=p.speed;if(p.t>1)p.t=0;
      var a=nodes[p.from],b=nodes[p.to];
      var x=a.x*w+(b.x*w-a.x*w)*p.t;
      var y=a.y*h+(b.y*h-a.y*h)*p.t;
      ctx.beginPath();ctx.arc(x,y,3,0,Math.PI*2);
      ctx.fillStyle=p.color+'0.7)';ctx.fill();
      var g2=ctx.createRadialGradient(x,y,0,x,y,10);
      g2.addColorStop(0,p.color+'0.2)');g2.addColorStop(1,'transparent');
      ctx.fillStyle=g2;ctx.fillRect(x-10,y-10,20,20);
    });
    if(packets.length<12&&Math.random()<0.03)spawnPacket();
    t++;
    if(!isVisible){
      animId = null;
      return;
    }
    animId = requestAnimationFrame(draw);
  }
})();
</script>
