<?php $lang=stb_lang(); $B='/NewSite'; $f=$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>
/* ══════════════════════════════════════════════════════════════
   MARKETS PAGE v2 — Based on old site structure, futuristic
══════════════════════════════════════════════════════════════ */
.mk-rev{opacity:0;transform:translateY(28px);transition:opacity .7s cubic-bezier(.16,1,.3,1),transform .7s cubic-bezier(.16,1,.3,1)}
.mk-rev.vis{opacity:1;transform:none}
.mk-rev.d1{transition-delay:.12s}.mk-rev.d2{transition-delay:.24s}.mk-rev.d3{transition-delay:.36s}.mk-rev.d4{transition-delay:.48s}

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

/* ══ S1: MULTI-ASSET CFD TRADING — 5 Asset Cards ══ */
.mk-ma-grid{display:grid;grid-template-columns:repeat(5,1fr);gap:14px;margin-bottom:56px}
@media(max-width:1000px){.mk-ma-grid{grid-template-columns:repeat(3,1fr)}}
@media(max-width:600px){.mk-ma-grid{grid-template-columns:repeat(2,1fr)}}
@media(max-width:400px){.mk-ma-grid{grid-template-columns:1fr}}

.mk-ma-card{background:#0a0c10;border:1px solid rgba(255,255,255,.06);border-radius:16px;
  padding:28px 22px;position:relative;overflow:hidden;transition:all .3s;cursor:default;
  display:flex;flex-direction:column}
.mk-ma-card::before{content:'';position:absolute;top:0;left:0;right:0;height:2px;
  background:var(--ac,#C8102E);transform:scaleX(0);transform-origin:left;
  transition:transform .4s cubic-bezier(.16,1,.3,1)}
.mk-ma-card:hover{border-color:rgba(255,255,255,.14);transform:translateY(-4px);
  box-shadow:0 16px 48px rgba(0,0,0,.4)}
.mk-ma-card:hover::before{transform:scaleX(1)}
/* Animated glow orb */
.mk-ma-card::after{content:'';position:absolute;top:-30px;right:-30px;width:80px;height:80px;
  border-radius:50%;background:radial-gradient(circle,var(--ac)22,transparent 70%);
  opacity:0;transition:opacity .35s;pointer-events:none}
.mk-ma-card:hover::after{opacity:1}

.mk-ma-icon{width:52px;height:52px;border-radius:13px;margin-bottom:18px;
  background:rgba(255,255,255,.03);border:1px solid rgba(255,255,255,.07);
  display:flex;align-items:center;justify-content:center;
  transition:background .25s,border-color .25s}
.mk-ma-card:hover .mk-ma-icon{background:var(--ac)11;border-color:var(--ac)33}
.mk-ma-icon svg{stroke:var(--ac,#C8102E);fill:none;width:24px;height:24px}
.mk-ma-name{font-size:18px;font-weight:800;color:#fff;margin-bottom:8px}
.mk-ma-desc{font-size:13px;color:rgba(255,255,255,.4);line-height:1.65;flex:1}
.mk-ma-foot{margin-top:16px;padding-top:14px;border-top:1px solid rgba(255,255,255,.05);
  display:flex;align-items:center;justify-content:space-between}
.mk-ma-count{font-size:22px;font-weight:800;color:var(--ac,#C8102E)}
.mk-ma-count-label{font-size:10px;color:rgba(255,255,255,.3);text-transform:uppercase;letter-spacing:.08em;font-weight:600}
.mk-ma-arrow{width:28px;height:28px;border-radius:7px;background:rgba(255,255,255,.04);
  border:1px solid rgba(255,255,255,.08);display:flex;align-items:center;justify-content:center;
  transition:all .2s}
.mk-ma-card:hover .mk-ma-arrow{background:var(--ac)15;border-color:var(--ac)33}
.mk-ma-arrow svg{width:12px;height:12px;stroke:rgba(255,255,255,.4);fill:none;transition:stroke .2s}
.mk-ma-card:hover .mk-ma-arrow svg{stroke:#fff}

/* ══ S2: WHY TRADE STB — 4 Feature Cards ══ */
.mk-wt-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:16px;margin-bottom:56px}
@media(max-width:700px){.mk-wt-grid{grid-template-columns:1fr}}

.mk-wt-card{background:#0a0c10;border:1px solid rgba(255,255,255,.06);border-radius:16px;
  padding:28px;display:flex;gap:20px;transition:all .25s;position:relative;overflow:hidden}
.mk-wt-card::before{content:'';position:absolute;left:0;top:0;bottom:0;width:3px;
  background:var(--wc,#C8102E);opacity:0;transition:opacity .25s}
.mk-wt-card:hover{border-color:rgba(255,255,255,.12);background:#0d0f14}
.mk-wt-card:hover::before{opacity:1}
.mk-wt-icon{width:48px;height:48px;border-radius:12px;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;
  transition:background .2s}
.mk-wt-card:hover .mk-wt-icon{background:var(--wc)10}
.mk-wt-icon svg{stroke:var(--wc,#C8102E);fill:none;width:22px;height:22px}
.mk-wt-title{font-size:16px;font-weight:700;color:#fff;margin-bottom:6px}
.mk-wt-desc{font-size:13.5px;color:rgba(255,255,255,.4);line-height:1.65}

/* ══ S3: SYMBOL SPECIFICATIONS — Futuristic v2 ══ */
.mk-sym{position:relative;border-radius:20px;overflow:hidden;
  background:linear-gradient(160deg,#080a0f,#0c0e14);
  border:1px solid rgba(255,255,255,.07);margin-bottom:56px}
.mk-sym::before{content:'';position:absolute;inset:0;
  background:radial-gradient(ellipse 60% 40% at 20% 0%,rgba(200,16,46,.04),transparent),
  radial-gradient(ellipse 40% 40% at 80% 100%,rgba(20,224,163,.03),transparent);pointer-events:none}
/* Top sweep line */
.mk-sym::after{content:'';position:absolute;top:0;left:0;right:0;height:1px;
  background:linear-gradient(90deg,transparent,rgba(200,16,46,.4),transparent);
  animation:mk-sym-sweep 5s linear infinite}
@keyframes mk-sym-sweep{0%{opacity:.3}50%{opacity:1}100%{opacity:.3}}

/* Header bar */
.mk-sym-bar{display:flex;align-items:center;justify-content:space-between;gap:16px;
  padding:20px 28px;border-bottom:1px solid rgba(255,255,255,.06);position:relative;z-index:2;flex-wrap:wrap}
@media(max-width:600px){.mk-sym-bar{padding:16px 18px;gap:10px}}
.mk-sym-title-sm{font-size:13px;font-weight:700;color:rgba(255,255,255,.5);
  display:flex;align-items:center;gap:8px;letter-spacing:.04em}
.mk-sym-title-sm::before{content:'';width:6px;height:6px;border-radius:50%;
  background:#C8102E;box-shadow:0 0 8px rgba(200,16,46,.5);animation:mk-sym-dot 2s infinite}
@keyframes mk-sym-dot{0%,100%{box-shadow:0 0 4px rgba(200,16,46,.4)}50%{box-shadow:0 0 14px rgba(200,16,46,.7)}}
.mk-sym-search{position:relative;width:220px}
@media(max-width:600px){.mk-sym-search{width:100%;order:10}}
.mk-sym-search input{width:100%;padding:8px 12px 8px 34px;border-radius:8px;font-size:12.5px;font-weight:500;
  background:rgba(255,255,255,.04);border:1px solid rgba(255,255,255,.08);color:#fff;outline:none;transition:all .2s}
.mk-sym-search input::placeholder{color:rgba(255,255,255,.2)}
.mk-sym-search input:focus{border-color:rgba(200,16,46,.4);background:rgba(255,255,255,.06);
  box-shadow:0 0 20px rgba(200,16,46,.08)}
.mk-sym-search svg{position:absolute;left:10px;top:50%;transform:translateY(-50%);
  width:13px;height:13px;stroke:rgba(255,255,255,.2);fill:none;pointer-events:none}

/* Tabs inside widget */
.mk-sym-tabs{display:flex;gap:4px;padding:14px 28px;overflow-x:auto;-webkit-overflow-scrolling:touch;
  border-bottom:1px solid rgba(255,255,255,.05);position:relative;z-index:2;scrollbar-width:none}
.mk-sym-tabs::-webkit-scrollbar{display:none}
@media(max-width:600px){.mk-sym-tabs{padding:10px 14px;gap:3px}}
.mk-sym-tab{padding:7px 14px;border-radius:8px;font-size:11.5px;font-weight:700;
  background:transparent;border:1px solid transparent;
  color:rgba(255,255,255,.35);cursor:pointer;transition:all .2s;white-space:nowrap;
  display:flex;align-items:center;gap:5px;flex-shrink:0}
.mk-sym-tab:hover{color:rgba(255,255,255,.7);background:rgba(255,255,255,.04)}
.mk-sym-tab.active{background:rgba(200,16,46,.1);border-color:rgba(200,16,46,.25);color:#fff}
.mk-sym-badge{font-size:8.5px;padding:1px 5px;border-radius:4px;
  background:rgba(255,255,255,.05);color:rgba(255,255,255,.25);font-weight:700;min-width:16px;text-align:center}
.mk-sym-tab.active .mk-sym-badge{background:rgba(200,16,46,.15);color:rgba(200,16,46,.65)}

/* Table area */
.mk-sym-panel{display:none}
.mk-sym-panel.active{display:block}
.mk-sym-tbl-wrap{position:relative;z-index:1;min-height:420px}
.mk-sym-tbl{width:100%;border-collapse:collapse}
.mk-sym-tbl th{padding:10px 28px;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,.05);
  text-align:left;position:sticky;top:0;z-index:3}
@media(max-width:600px){.mk-sym-tbl th{padding:8px 14px;font-size:8.5px}}
.mk-sym-tbl td{padding:0 28px;font-size:13px;color:rgba(255,255,255,.5);height:44px;
  border-bottom:1px solid rgba(255,255,255,.03);transition:background .15s,color .15s}
@media(max-width:600px){.mk-sym-tbl td{padding:0 14px;font-size:12px;height:40px}}
.mk-sym-tbl td:first-child{font-weight:700;color:rgba(255,255,255,.85);font-family:'SF Mono',monospace;font-size:12.5px;letter-spacing:.02em}
.mk-sym-tbl td:nth-child(2){color:rgba(255,255,255,.35);font-size:12px;max-width:220px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.mk-sym-tbl tr:last-child td{border-bottom:none}
.mk-sym-tbl tbody tr{transition:all .15s;cursor:default}
.mk-sym-tbl tbody tr:hover td{background:rgba(200,16,46,.04);color:rgba(255,255,255,.8)}
.mk-sym-tbl tbody tr:hover td:first-child{color:#fff}
/* Row entrance animation */
.mk-sym-tbl tbody tr{opacity:0;transform:translateY(6px);animation:mk-row-pop .25s ease-out forwards}
@keyframes mk-row-pop{to{opacity:1;transform:none}}
.mk-sym-tbl tr.mk-hidden{display:none}

/* Hide desc column on very small screens */
@media(max-width:480px){.mk-sym-tbl th:nth-child(2),.mk-sym-tbl td:nth-child(2){display:none}}

/* ── Pagination ── */
.mk-sym-pager{display:flex;align-items:center;justify-content:center;gap:4px;
  padding:16px 28px;border-top:1px solid rgba(255,255,255,.05);position:relative;z-index:2}
.mk-sym-pg{width:32px;height:32px;border-radius:8px;display:flex;align-items:center;justify-content:center;
  font-size:12px;font-weight:700;color:rgba(255,255,255,.35);
  background:transparent;border:1px solid transparent;cursor:pointer;transition:all .2s}
.mk-sym-pg:hover{color:rgba(255,255,255,.7);background:rgba(255,255,255,.04);border-color:rgba(255,255,255,.1)}
.mk-sym-pg.active{background:rgba(200,16,46,.12);border-color:rgba(200,16,46,.3);color:#fff;
  box-shadow:0 0 12px rgba(200,16,46,.15)}
.mk-sym-pg.arr{color:rgba(255,255,255,.25)}
.mk-sym-pg.arr:hover{color:#fff}
.mk-sym-pg.arr svg{width:14px;height:14px;stroke:currentColor;fill:none}
.mk-sym-pg.disabled{opacity:.2;pointer-events:none}
/* Page info */
.mk-sym-info{font-size:11px;color:rgba(255,255,255,.2);text-align:center;padding:0 28px 16px;position:relative;z-index:2}
.mk-sym-info em{font-style:normal;color:rgba(255,255,255,.4);font-weight:600}
/* No results */
.mk-sym-empty{padding:60px 28px;text-align:center;color:rgba(255,255,255,.2);font-size:14px;display:none}
.mk-sym-empty.show{display:block}

/* ══ S4: MARKET CONDITIONS AT A GLANCE — 4 Cards ══ */
.mk-mc-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:14px;margin-bottom:56px}
@media(max-width:800px){.mk-mc-grid{grid-template-columns:repeat(2,1fr)}}
@media(max-width:450px){.mk-mc-grid{grid-template-columns:1fr}}
.mk-mc-card{background:#0a0c10;border:1px solid rgba(255,255,255,.06);border-radius:14px;
  padding:24px;text-align:center;position:relative;overflow:hidden;transition:all .25s}
.mk-mc-card::before{content:'';position:absolute;inset:0;
  background:radial-gradient(circle at 50% 0%,var(--mc)08,transparent 65%);
  opacity:0;transition:opacity .3s;pointer-events:none}
.mk-mc-card:hover{border-color:rgba(255,255,255,.12);transform:translateY(-3px)}
.mk-mc-card:hover::before{opacity:1}
.mk-mc-icon{width:44px;height:44px;border-radius:11px;margin:0 auto 14px;
  background:rgba(255,255,255,.03);border:1px solid rgba(255,255,255,.07);
  display:flex;align-items:center;justify-content:center}
.mk-mc-icon svg{stroke:var(--mc,#C8102E);fill:none;width:20px;height:20px}
.mk-mc-val{font-size:26px;font-weight:800;color:#fff;margin-bottom:4px;line-height:1}
.mk-mc-val em{font-style:normal;font-size:.55em;color:var(--mc,#C8102E);vertical-align:super}
.mk-mc-label{font-size:12px;font-weight:700;color:rgba(255,255,255,.6);margin-bottom:4px}
.mk-mc-sub{font-size:11px;color:rgba(255,255,255,.3);line-height:1.5}

/* ══ S5: HOW TO START — 3 Steps ══ */
.mk-steps{display:grid;grid-template-columns:repeat(3,1fr);gap:0;margin-bottom:56px;position:relative;
  background:#0a0c10;border:1px solid rgba(255,255,255,.07);border-radius:16px;overflow:hidden}
@media(max-width:700px){.mk-steps{grid-template-columns:1fr}}
.mk-step{padding:32px 28px;position:relative;border-right:1px solid rgba(255,255,255,.05);
  transition:background .25s}
.mk-step:last-child{border-right:none}
@media(max-width:700px){.mk-step{border-right:none;border-bottom:1px solid rgba(255,255,255,.05)}.mk-step:last-child{border-bottom:none}}
.mk-step:hover{background:rgba(200,16,46,.03)}
.mk-step-num{font-size:40px;font-weight:800;color:rgba(200,16,46,.15);line-height:1;margin-bottom:14px;
  font-variant-numeric:tabular-nums;transition:color .25s}
.mk-step:hover .mk-step-num{color:rgba(200,16,46,.35)}
.mk-step-title{font-size:16px;font-weight:700;color:#fff;margin-bottom:8px}
.mk-step-desc{font-size:13px;color:rgba(255,255,255,.4);line-height:1.6}
/* Connecting arrow */
.mk-step::after{content:'';position:absolute;right:-8px;top:50%;transform:translateY(-50%);
  width:0;height:0;border-top:8px solid transparent;border-bottom:8px solid transparent;
  border-left:8px solid rgba(200,16,46,.15);z-index:2}
.mk-step:last-child::after{display:none}
@media(max-width:700px){.mk-step::after{display:none}}
body.rtl .mk-step::after{right:auto;left:-8px;border-left:none;border-right:8px solid rgba(200,16,46,.15)}

/* ══ Mobile fixes ══ */
@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}
  .mk-wt-card{flex-direction:column;gap:14px}
}
</style>

<article class="ip-page">
<!-- ═══ HERO ═══ -->
<div class="ip-hero" style="position:relative;overflow:hidden">
  <div class="mk-hero-bg"></div>
  <div class="ip-hero-glow"></div>
  <div class="mk-particles" id="mk-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 $f?'خانه':'Home';?></a>
      <span class="ip-breadcrumb-sep">›</span>
      <span><?php echo $f?'بازارها':'Markets';?></span>
    </nav>
    <div class="ip-kicker"><span class="ip-kicker-dot"></span><?php echo $f?'بروکر STB':'STB BROKER';?></div>
    <h1 class="ip-h1"><?php echo $f?'یک پلتفرم، <em>بازارهای جهانی</em>':'One Platform, <em>Global Markets</em>';?></h1>
    <p class="ip-hero-desc"><?php echo $f?'دسترسی به ۳۵۰+ ابزار CFD در فارکس، شاخص‌ها، کالاها، کریپتو و سهام — همه با نقدینگی عمیق و اجرای فوق‌سریع STB.':'Access 350+ CFD instruments across Forex, Indices, Commodities, Cryptos, and Shares — all backed by STB\'s deep liquidity and ultra-fast execution.';?></p>
    <div class="ip-hero-stats">
      <div><div class="ip-stat-val">350<em>+</em></div><div class="ip-stat-lbl"><?php echo $f?'ابزار CFD':'CFD Instruments';?></div></div>
      <div><div class="ip-stat-val">6</div><div class="ip-stat-lbl"><?php echo $f?'کلاس دارایی':'Asset Classes';?></div></div>
      <div><div class="ip-stat-val">0.0<em>pip</em></div><div class="ip-stat-lbl"><?php echo $f?'اسپرد':'Spread';?></div></div>
      <div><div class="ip-stat-val">0.125<em>s</em></div><div class="ip-stat-lbl"><?php echo $f?'اجرا':'Execution';?></div></div>
    </div>
    <div class="ip-hero-ctas">
      <a href="<?php echo esc_html($register_label_url);?>" class="ip-btn-red"><?php echo $f?'شروع معامله':'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 $f?'مشاهده حساب‌ها':'View Accounts';?></a>
    </div>
  </div>
</div>

<!-- ═══ S1: MULTI-ASSET CFD TRADING ═══ -->
<section class="ip-section">
  <div class="ip-container">
    <h2 class="ip-section-title mk-rev"><?php echo $f?'معاملات CFD <em>چند دارایی</em>':'Multi-Asset <em>CFD Trading</em>';?></h2>
    <p class="ip-section-desc mk-rev d1"><?php echo $f?'کلاس‌های اصلی دارایی را مرور کنید و مشخصات هر بازار را بررسی کنید.':'Browse our core asset classes and dive deeper into symbol specifications for each market.';?></p>

    <div class="mk-ma-grid mk-rev d2">
      <?php $assets = $f ? [
        ['#C8102E','<path d="M3 3v18h18" stroke-width="1.5"/><polyline points="7 16 11 10 15 14 19 7" stroke-width="1.5"/>',
         'فارکس','نقدشونده‌ترین بازار جهان با اسپرد از ۰.۰ پیپ و نقدینگی عمیق از تأمین‌کنندگان سطح ۱.','60+','جفت‌ارز'],
        ['#C8102E','<polyline points="22 12 18 12 15 21 9 3 6 12 2 12" stroke-width="1.8" stroke-linecap="round"/>',
         'شاخص‌ها','معامله شاخص‌های US30، NAS100، DAX40 و بیشتر. نوسان بالا و قیمت‌گذاری شفاف.','10+','شاخص'],
        ['#14e0a3','<circle cx="12" cy="12" r="5" stroke-width="1.5"/><path d="M12 1v4M12 19v4M4.22 4.22l2.83 2.83M16.95 16.95l2.83 2.83M1 12h4M19 12h4" stroke-width="1.5"/>',
         'کالاها','طلا، نقره، نفت و سایر کالاهای کلیدی بدون مالکیت فیزیکی.','5+','ابزار'],
        ['#14e0a3','<path d="M12 2L2 7l10 5 10-5-10-5zM2 17l10 5 10-5M2 12l10 5 10-5" stroke-width="1.5"/>',
         'ارز دیجیتال','دسترسی به CFD‌های ارز دیجیتال محبوب با شرایط رقابتی، اجرای سریع و بدون ریسک کیف پول','50+','CFD'],
        ['#C8102E','<rect x="2" y="3" width="20" height="14" rx="2" stroke-width="1.5"/><path d="M8 21h8M12 17v4" stroke-width="1.5" stroke-linecap="round"/>',
         'سهام','معامله سهام جهانی و برندهای بزرگ از طریق CFD — خرید یا فروش با اهرم انعطاف‌پذیر','200+','سهم'],
      ] : [
        ['#C8102E','<path d="M3 3v18h18" stroke-width="1.5"/><polyline points="7 16 11 10 15 14 19 7" stroke-width="1.5"/>',
         'Forex','Trade the world\'s most liquid instruments with spreads from 0.0 pips and deep-tier liquidity.','60+','Pairs'],
        ['#C8102E','<polyline points="22 12 18 12 15 21 9 3 6 12 2 12" stroke-width="1.8" stroke-linecap="round"/>',
         'Indices','Speculate on major indices like US30, NAS100, DAX40 and more. High volatility, clean pricing.','10+','Indices'],
        ['#14e0a3','<circle cx="12" cy="12" r="5" stroke-width="1.5"/><path d="M12 1v4M12 19v4M4.22 4.22l2.83 2.83M16.95 16.95l2.83 2.83M1 12h4M19 12h4" stroke-width="1.5"/>',
         'Commodities','Trade Gold, Silver, Oil and other key commodities without owning physical assets.','5+','Instruments'],
        ['#14e0a3','<path d="M12 2L2 7l10 5 10-5-10-5zM2 17l10 5 10-5M2 12l10 5 10-5" stroke-width="1.5"/>',
         'Crypto','Access popular cryptocurrency CFDs with competitive conditions, tight execution, and no wallet risk.','50+','CFDs'],
        ['#C8102E','<rect x="2" y="3" width="20" height="14" rx="2" stroke-width="1.5"/><path d="M8 21h8M12 17v4" stroke-width="1.5" stroke-linecap="round"/>',
         'Equities','Trade global shares and major brands via CFDs — long or short with flexible leverage.','200+','Stocks'],
      ];
      foreach($assets as $i=>$a): ?>
      <div class="mk-ma-card" style="--ac:<?php echo $a[0]; ?>">
        <div class="mk-ma-icon"><svg viewBox="0 0 24 24"><?php echo $a[1]; ?></svg></div>
        <div class="mk-ma-name"><?php echo $a[2]; ?></div>
        <div class="mk-ma-desc"><?php echo $a[3]; ?></div>
        <div class="mk-ma-foot">
          <div><div class="mk-ma-count"><?php echo $a[4]; ?></div><div class="mk-ma-count-label"><?php echo $a[5]; ?></div></div>
          <div class="mk-ma-arrow"><svg viewBox="0 0 24 24"><path d="M5 12h14M12 5l7 7-7 7" stroke-width="2" stroke-linecap="round"/></svg></div>
        </div>
      </div>
      <?php endforeach; ?>
    </div>
  </div>
</section>

<!-- ═══ S2: WHY TRADE STB MARKETS ═══ -->
<section class="ip-section alt">
  <div class="ip-container">
    <h2 class="ip-section-title mk-rev"><?php echo $f?'چرا <em>بازارهای STB</em> ؟':'Why Trade <em>STB Markets</em>';?></h2>
    <p class="ip-section-desc mk-rev d1"><?php echo $f?'شرایط سازمانی ساخته‌شده برای معامله‌گران فعال و سرمایه‌گذاران بلندمدت.':'Institutional-grade conditions built for both active traders and long-term investors.';?></p>

    <div class="mk-wt-grid mk-rev d2">
      <?php $whys = $f ? [
        ['#C8102E','<path d="M13 2L3 14h9l-1 8 10-12h-9l1-8z" stroke-width="1.5" stroke-linecap="round"/>',
         'اسپرد فوق‌پایین و اجرای سریع','اسپرد از ۰.۰ پیپ و سرعت اجرای میانگین ۰.۱۲۵ ثانیه در تمام بازارهای اصلی.'],
        ['#14e0a3','<path d="M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z" stroke-width="1.5"/>',
         'نقدینگی عمیق','STB نقدینگی را از تأمین‌کنندگان سطح ۱ جمع‌آوری می‌کند و قیمت‌گذاری قابل اعتماد و اجرای پایدار ارائه می‌دهد.'],
        ['#C8102E','<path d="M3 3v18h18" stroke-width="1.5"/><polyline points="7 16 11 10 15 14 19 7" stroke-width="1.5"/>',
         'ابزارهای پیشرفته MT5','دسترسی به ۲۱ تایم‌فریم، معاملات الگوریتمی (EA)، عمق بازار و پشتیبانی کامل از موبایل و دسکتاپ.'],
        ['#14e0a3','<circle cx="12" cy="12" r="10" stroke-width="1.5"/><path d="M12 8v4l3 3" stroke-width="1.5" stroke-linecap="round"/>',
         'محیط معاملاتی امن و مورد اعتماد','وجوه مشتریان در حساب‌های جداگانه نگهداری می‌شود. محافظت از موجودی منفی به صورت استاندارد.'],
      ] : [
        ['#C8102E','<path d="M13 2L3 14h9l-1 8 10-12h-9l1-8z" stroke-width="1.5" stroke-linecap="round"/>',
         'Ultra-Low Spreads & Fast Execution','Spreads as low as 0.0 pips and execution speeds averaging 0.125 sec across major markets.'],
        ['#14e0a3','<path d="M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z" stroke-width="1.5"/>',
         'Deep Liquidity Pool','STB aggregates liquidity from top-tier providers for reliable pricing and stable execution.'],
        ['#C8102E','<path d="M3 3v18h18" stroke-width="1.5"/><polyline points="7 16 11 10 15 14 19 7" stroke-width="1.5"/>',
         'Advanced Trading Tools on MT5','Access 21 timeframes, algorithmic trading (EAs), market depth, and full mobile & desktop support.'],
        ['#14e0a3','<circle cx="12" cy="12" r="10" stroke-width="1.5"/><path d="M12 8v4l3 3" stroke-width="1.5" stroke-linecap="round"/>',
         'Secure & Trusted Environment','Client funds held in segregated accounts with Negative Balance Protection as standard.'],
      ];
      foreach($whys as $w): ?>
      <div class="mk-wt-card" style="--wc:<?php echo $w[0]; ?>">
        <div class="mk-wt-icon"><svg viewBox="0 0 24 24"><?php echo $w[1]; ?></svg></div>
        <div><div class="mk-wt-title"><?php echo $w[2]; ?></div><div class="mk-wt-desc"><?php echo $w[3]; ?></div></div>
      </div>
      <?php endforeach; ?>
    </div>
  </div>
</section>

<!-- ═══ S3: SYMBOL SPECIFICATIONS — Futuristic v2 ═══ -->
<section class="ip-section">
  <div class="ip-container">
    <h2 class="ip-section-title mk-rev"><?php echo $f?' مشخصات <em>نمادها</em>':'Symbol <em>Specifications</em>';?></h2>
    <p class="ip-section-desc mk-rev d1"><?php echo $f?'مشخصات قرارداد دقیق برای هر کلاس دارایی. مقادیر پیشنهادی هستند و ممکن است در حساب‌های زنده متغیر باشند':'Detailed contract specifications across every asset class. Values are indicative and may vary on live accounts.';?></p>

    <?php include __DIR__ . '/symbols-data.php'; ?>
    <?php
    $sym_tab_meta = $f ? [
      'forex'=>['فارکس',70],'indices'=>['شاخص‌ها',13],
      'commodities'=>['کالاها',11],'crypto'=>['کریپتو',57],'us_shares'=>['سهام آمریکا',128],
      'eu_shares'=>['سهام اروپا',27],'asian_shares'=>['سهام آسیا',57],'spot'=>['اسپات',8],
    ] : [
      'forex'=>['Forex',70],'indices'=>['Indices',13],
      'commodities'=>['Commodities',11],'crypto'=>['Crypto',57],'us_shares'=>['US Shares',128],
      'eu_shares'=>['EU Shares',27],'asian_shares'=>['Asian Shares',57],'spot'=>['Spot',8],
    ];
    $sym_h = $f ? ['نماد','توضیحات','اعشار','حجم قرارداد'] : ['Symbol','Description','Digits','Contract Size'];
    ?>

    <div class="mk-sym mk-rev d2" id="mk-sym-widget">
      <!-- Top bar -->
      <div class="mk-sym-bar">
        <div class="mk-sym-title-sm"><?php echo $f?'مشخصات قرارداد':'CONTRACT SPECS';?></div>
        <div class="mk-sym-search">
          <svg viewBox="0 0 24 24"><circle cx="11" cy="11" r="8" stroke-width="2"/><path d="M21 21l-4.35-4.35" stroke-width="2" stroke-linecap="round"/></svg>
          <input type="text" id="mk-sym-search" placeholder="<?php echo $f?'جستجوی نماد...':'Search symbol...'; ?>" autocomplete="off">
        </div>
      </div>

      <!-- Tabs -->
      <div class="mk-sym-tabs" id="mk-sym-tabs">
        <?php $first=true; foreach($sym_tab_meta as $key=>$meta): ?>
        <div class="mk-sym-tab<?php echo $first?' active':''; ?>" data-panel="<?php echo $key; ?>">
          <?php echo $meta[0]; ?><span class="mk-sym-badge"><?php echo $meta[1]; ?></span>
        </div>
        <?php $first=false; endforeach; ?>
      </div>

      <!-- Panels -->
      <?php $first=true; foreach($stb_symbols as $key=>$rows): ?>
      <div class="mk-sym-panel<?php echo $first?' active':''; ?>" data-key="<?php echo $key; ?>">
        <div class="mk-sym-tbl-wrap">
          <table class="mk-sym-tbl">
            <thead><tr>
              <?php foreach($sym_h as $h): ?><th><?php echo $h; ?></th><?php endforeach; ?>
              <?php if($key==='spot'): ?><th><?php echo $f?'حداقل':'Min Vol';?></th><th><?php echo $f?'حداکثر':'Max Vol';?></th><?php endif; ?>
            </tr></thead>
            <tbody>
              <?php foreach($rows as $ri=>$r): ?>
              <tr data-sym="<?php echo strtolower($r[0].' '.$r[1]); ?>">
                <td><?php echo htmlspecialchars($r[0]); ?></td>
                <td><?php echo htmlspecialchars($r[1]); ?></td>
                <td><?php echo $r[2]; ?></td>
                <td><?php echo number_format((float)$r[3]); ?></td>
                <?php if($key==='spot' && isset($r[4])): ?><td><?php echo $r[4]; ?></td><td><?php echo $r[5]; ?></td><?php endif; ?>
              </tr>
              <?php endforeach; ?>
            </tbody>
          </table>
        </div>
        <div class="mk-sym-empty"><?php echo $f?'نتیجه‌ای یافت نشد':'No results found';?></div>
        <div class="mk-sym-pager"></div>
        <div class="mk-sym-info"></div>
      </div>
      <?php $first=false; endforeach; ?>
    </div>
  </div>
</section>

<!-- ═══ S4: MARKET CONDITIONS AT A GLANCE ═══ -->
<section class="ip-section alt">
  <div class="ip-container">
    <h2 class="ip-section-title mk-rev"><?php echo $f?'شرایط بازار <em>در یک نگاه</em>':'Market Conditions <em>at a Glance</em>';?></h2>
    <p class="ip-section-desc mk-rev d1"><?php echo $f?'شرایط اصلی معاملاتی در تمام بازارهای STB':'Core trading conditions across all STB markets.';?></p>

    <div class="mk-mc-grid mk-rev d2">
      <?php $mcs = $f ? [
        ['#C8102E','<path d="M22 12h-4l-3 9L9 3l-3 9H2" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>',
         '1:400','حداکثر اهرم','بسته به کلاس دارایی و نوع حساب'],
        ['#14e0a3','<path d="M3 3v18h18" stroke-width="1.5"/><polyline points="7 16 11 10 15 14 19 7" stroke-width="1.5"/>',
         '0.01','حداقل لات','شروع کوچک در اکثر ابزارها'],
        ['#C8102E','<path d="M13 2L3 14h9l-1 8 10-12h-9l1-8z" stroke-width="1.5" stroke-linecap="round"/>',
         '0.0<em>pip</em>','اسپرد پویا','روی جفت‌ارزهای اصلی فارکس'],
        ['#14e0a3','<circle cx="12" cy="12" r="10" stroke-width="1.5"/><path d="M12 8v4l3 3" stroke-width="1.5" stroke-linecap="round"/>',
         'Market','مدل اجرا','شفافیت کامل و لغزش حداقلی'],
      ] : [
        ['#C8102E','<path d="M22 12h-4l-3 9L9 3l-3 9H2" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>',
         '1:400','Leverage','Depending on asset class and account type'],
        ['#14e0a3','<path d="M3 3v18h18" stroke-width="1.5"/><polyline points="7 16 11 10 15 14 19 7" stroke-width="1.5"/>',
         '0.01','Minimum Lot Size','Start small across most instruments'],
        ['#C8102E','<path d="M13 2L3 14h9l-1 8 10-12h-9l1-8z" stroke-width="1.5" stroke-linecap="round"/>',
         '0.0<em>pip</em>','Dynamic Spreads','On major FX pairs'],
        ['#14e0a3','<circle cx="12" cy="12" r="10" stroke-width="1.5"/><path d="M12 8v4l3 3" stroke-width="1.5" stroke-linecap="round"/>',
         'Market','Execution Model','Full transparency & minimal slippage'],
      ];
      foreach($mcs as $m): ?>
      <div class="mk-mc-card" style="--mc:<?php echo $m[0]; ?>">
        <div class="mk-mc-icon"><svg viewBox="0 0 24 24"><?php echo $m[1]; ?></svg></div>
        <div class="mk-mc-val"><?php echo $m[2]; ?></div>
        <div class="mk-mc-label"><?php echo $m[3]; ?></div>
        <div class="mk-mc-sub"><?php echo $m[4]; ?></div>
      </div>
      <?php endforeach; ?>
    </div>
  </div>
</section>

<!-- ═══ S5: HOW TO START TRADING ═══ -->
<section class="ip-section">
  <div class="ip-container">
    <h2 class="ip-section-title mk-rev"><?php echo $f?'نحوه <em>شروع معامله</em>':'How to <em>Start Trading</em>';?></h2>
    <p class="ip-section-desc mk-rev d1"><?php echo $f?'سه مرحله ساده از ثبت‌نام تا معامله واقعی در بازارهای جهانی.':'A simple three-step flow from registration to live trading on global markets.';?></p>

    <div class="mk-steps mk-rev d2">
      <?php $steps = $f ? [
        ['01','افتتاح حساب','در چند دقیقه با فرآیند ساده در STB  ثبت‌نام کرده و حساب باز کنید.'],
        ['02','شارژ کیف پول','با گزینه‌های متنوع واریز، حساب خود را فوری شارژ کنید.'],
        ['03','معاملات در بازارهای جهانی','دسترسی به بیش از 350 بازار در MT5 با شرایط حرفه‌ای'],
      ] : [
        ['01','Open Your Account','Register with STB in minutes with simple onboarding.'],
        ['02','Fund Your Wallet','Use flexible deposit options with instant funding.'],
        ['03','Trade Global Markets','Access 350+ markets on MT5 with professional conditions.'],
      ];
      foreach($steps as $s): ?>
      <div class="mk-step">
        <div class="mk-step-num"><?php echo $s[0]; ?></div>
        <div class="mk-step-title"><?php echo $s[1]; ?></div>
        <div class="mk-step-desc"><?php echo $s[2]; ?></div>
      </div>
      <?php endforeach; ?>
    </div>
  </div>
</section>

<!-- ═══ CTA ═══ -->
<section class="ip-section alt">
  <div class="ip-container">
    <div class="ip-cta-strip mk-rev">
      <div class="ip-cta-strip-text">
        <h3><?php echo $f?'آماده شروع سفر معاملاتی خود هستید؟':'Ready to start your trading journey?';?></h3>
        <p><?php echo $f?'معامله‌گران سراسر جهان را با ابزارها و پشتیبانی لازم برای موفقیت توانمند می‌کنیم.':'Empowering traders worldwide with the tools and support needed for success.';?></p>
      </div>
      <div class="ip-cta-strip-btns">
        <a href="<?php echo esc_html($register_label_url);?>" class="ip-btn-red"><?php echo $f?'افتتاح حساب':'Open Account';?></a>
        <a href="<?php echo stb_url($B.'/contact/'); ?>" class="ip-btn-ghost"><?php echo $f?'تماس با ما':'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('.mk-rev').forEach(function(el){obs.observe(el)});

  /* ── Hero Particles ── */
  var pc=document.getElementById('mk-particles');
  if(pc){for(var i=0;i<18;i++){var p=document.createElement('div');p.className='mk-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);}}

  /* ══ Symbol Widget — Tabs + Pagination + Search ══ */
  var SYM_PER_PAGE=12;
  function symInit(){
    var widget=document.getElementById('mk-sym-widget');if(!widget)return;
    // Tab click
    widget.querySelectorAll('.mk-sym-tab').forEach(function(tab){
      tab.addEventListener('click',function(){
        widget.querySelectorAll('.mk-sym-tab').forEach(function(t){t.classList.remove('active')});
        widget.querySelectorAll('.mk-sym-panel').forEach(function(p){p.classList.remove('active')});
        tab.classList.add('active');
        var key=tab.dataset.panel;
        var panel=widget.querySelector('.mk-sym-panel[data-key="'+key+'"]');
        if(panel)panel.classList.add('active');
        var si=document.getElementById('mk-sym-search');if(si)si.value='';
        symPaginate(panel,1,false);
      });
    });
    // Search
    var si=document.getElementById('mk-sym-search');
    if(si)si.addEventListener('input',function(){
      var panel=widget.querySelector('.mk-sym-panel.active');
      if(panel)symPaginate(panel,1,true);
    });
    // Init first panel
    var first=widget.querySelector('.mk-sym-panel.active');
    if(first)symPaginate(first,1,false);
  }

  function symPaginate(panel,page,isSearch){
    var si=document.getElementById('mk-sym-search');
    var q=si?si.value.toLowerCase().trim():'';
    var allRows=panel.querySelectorAll('tbody tr');
    var visible=[];
    allRows.forEach(function(tr){
      var match=!q||tr.getAttribute('data-sym').indexOf(q)!==-1;
      if(match)visible.push(tr);
    });
    var total=visible.length;
    var pages=Math.max(1,Math.ceil(total/SYM_PER_PAGE));
    if(page>pages)page=pages;
    var start=(page-1)*SYM_PER_PAGE;
    var end=start+SYM_PER_PAGE;
    // Hide all, show page
    allRows.forEach(function(tr){tr.classList.add('mk-hidden');tr.style.animation='none'});
    visible.forEach(function(tr,i){
      if(i>=start&&i<end){
        tr.classList.remove('mk-hidden');
        tr.offsetHeight;
        tr.style.animation='mk-row-pop .25s ease-out '+(i-start)*0.04+'s forwards';
      }
    });
    // Empty state
    var empty=panel.querySelector('.mk-sym-empty');
    if(empty){empty.classList.toggle('show',total===0)}
    // Info
    var info=panel.querySelector('.mk-sym-info');
    if(info&&total>0){
      var s=start+1,e=Math.min(end,total);
      info.innerHTML='<em>'+s+'–'+e+'</em> of <em>'+total+'</em> symbols';
    }else if(info){info.innerHTML=''}
    // Build pager
    var pager=panel.querySelector('.mk-sym-pager');
    if(!pager||pages<=1){if(pager)pager.innerHTML='';return}
    var html='';
    // Prev arrow
    html+='<div class="mk-sym-pg arr'+(page<=1?' disabled':'')+'" data-p="'+(page-1)+'"><svg viewBox="0 0 24 24"><path d="M15 18l-6-6 6-6" stroke-width="2" stroke-linecap="round"/></svg></div>';
    // Page buttons - show max 7
    var pStart=Math.max(1,page-3),pEnd=Math.min(pages,pStart+6);
    if(pEnd-pStart<6)pStart=Math.max(1,pEnd-6);
    if(pStart>1)html+='<div class="mk-sym-pg" data-p="1">1</div><div class="mk-sym-pg disabled">…</div>';
    for(var p=pStart;p<=pEnd;p++){
      html+='<div class="mk-sym-pg'+(p===page?' active':'')+'" data-p="'+p+'">'+p+'</div>';
    }
    if(pEnd<pages)html+='<div class="mk-sym-pg disabled">…</div><div class="mk-sym-pg" data-p="'+pages+'">'+pages+'</div>';
    // Next arrow
    html+='<div class="mk-sym-pg arr'+(page>=pages?' disabled':'')+'" data-p="'+(page+1)+'"><svg viewBox="0 0 24 24"><path d="M9 18l6-6-6-6" stroke-width="2" stroke-linecap="round"/></svg></div>';
    pager.innerHTML=html;
    // Bind pager clicks
    pager.querySelectorAll('.mk-sym-pg:not(.disabled)').forEach(function(btn){
      btn.addEventListener('click',function(){
        symPaginate(panel,parseInt(this.dataset.p),false);
      });
    });
  }
  symInit();

})();
</script>
