<?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>
/* ══════════════════════════════════════════════════════════════
   BRAND AMBASSADOR — Futuristic Animated
══════════════════════════════════════════════════════════════ */
.am-rev{opacity:0;transform:translateY(28px);transition:opacity .7s cubic-bezier(.16,1,.3,1),transform .7s cubic-bezier(.16,1,.3,1)}
.am-rev.vis{opacity:1;transform:none}
.am-rev.d1{transition-delay:.12s}.am-rev.d2{transition-delay:.24s}.am-rev.d3{transition-delay:.36s}

/* Hero */
.am-hero-bg{position:absolute;inset:0;
  background:radial-gradient(ellipse 70% 50% at 50% -10%,rgba(200,16,46,.15),transparent),
  radial-gradient(ellipse 40% 40% at 80% 90%,rgba(20,224,163,.08),transparent)}
.am-hero-grid{position:absolute;inset:0;
  background-image:linear-gradient(rgba(200,16,46,.02) 1px,transparent 1px),linear-gradient(90deg,rgba(200,16,46,.02) 1px,transparent 1px);
  background-size:50px 50px;mask-image:radial-gradient(ellipse 60% 60% at 50% 50%,black 20%,transparent 75%);
  animation:am-drift 20s linear infinite;pointer-events:none}
@keyframes am-drift{0%{transform:translate(0,0)}100%{transform:translate(50px,50px)}}
.am-hero-rings{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);pointer-events:none}
.am-ring{position:absolute;border-radius:50%;border:1px solid;top:50%;left:50%;transform:translate(-50%,-50%)}
.am-ring-1{width:250px;height:250px;border-color:rgba(200,16,46,.08);animation:am-spin 25s linear infinite}
.am-ring-2{width:400px;height:400px;border-color:rgba(20,224,163,.05);animation:am-spin 35s linear infinite reverse}
@keyframes am-spin{to{transform:translate(-50%,-50%) rotate(360deg)}}
.am-ring::after{content:'';position:absolute;width:6px;height:6px;border-radius:50%;top:-3px;left:50%}
.am-ring-1::after{background:#C8102E;box-shadow:0 0 10px rgba(200,16,46,.6)}
.am-ring-2::after{background:#14e0a3;box-shadow:0 0 10px rgba(20,224,163,.6)}

/* ── Tier Cards ── */
.am-tiers{display:grid;grid-template-columns:repeat(3,1fr);gap:16px;margin-bottom:56px}
@media(max-width:900px){.am-tiers{grid-template-columns:1fr}}
.am-tier{background:linear-gradient(160deg,#0a0c10,#0e1016);border:1px solid rgba(255,255,255,.06);
  border-radius:20px;padding:32px 28px;position:relative;overflow:hidden;transition:all .35s;
  display:flex;flex-direction:column}
.am-tier::before{content:'';position:absolute;top:0;left:0;right:0;height:3px;
  background:var(--tc,#C8102E);transform:scaleX(0);transform-origin:center;transition:transform .4s cubic-bezier(.16,1,.3,1)}
.am-tier:hover{border-color:rgba(255,255,255,.12);transform:translateY(-5px);box-shadow:0 20px 60px rgba(0,0,0,.6)}
.am-tier:hover::before{transform:scaleX(1)}
/* Background glow */
.am-tier::after{content:'';position:absolute;top:-30%;right:-30%;width:200px;height:200px;border-radius:50%;
  background:radial-gradient(circle,var(--tc)08,transparent 70%);pointer-events:none}
.am-tier-badge{display:inline-flex;align-items:center;gap:6px;padding:5px 14px;border-radius:20px;
  font-size:9.5px;font-weight:800;letter-spacing:.12em;text-transform:uppercase;
  background:var(--tc)10;border:1px solid var(--tc)30;color:var(--tc);margin-bottom:20px;width:fit-content}
.am-tier-badge::before{content:'';width:6px;height:6px;border-radius:50%;background:var(--tc);
  box-shadow:0 0 8px var(--tc)}
.am-tier-name{font-size:26px;font-weight:900;color:#fff;margin-bottom:6px;line-height:1.1}
.am-tier-tag{font-size:12px;color:rgba(255,255,255,.35);margin-bottom:20px}
.am-tier-perks{flex:1;margin-bottom:20px}
.am-tier-perk{display:flex;align-items:flex-start;gap:10px;margin-bottom:10px;font-size:13px;color:rgba(255,255,255,.5);line-height:1.5}
.am-tier-perk svg{width:16px;height:16px;stroke:var(--tc);fill:none;flex-shrink:0;margin-top:2px}
.am-tier-commission{padding:16px;border-radius:12px;background:rgba(255,255,255,.025);
  border:1px solid rgba(255,255,255,.06);text-align:center;margin-bottom:16px}
.am-tier-comm-val{font-size:28px;font-weight:900;color:var(--tc);line-height:1}
.am-tier-comm-lbl{font-size:10px;color:rgba(255,255,255,.3);letter-spacing:.08em;text-transform:uppercase;margin-top:4px}
.am-tier-cta{display:block;text-align:center;padding:12px;border-radius:10px;font-size:13px;font-weight:700;
  text-decoration:none;transition:all .2s}
.am-tier-cta.primary{background:var(--tc);color:#fff;box-shadow:0 4px 16px color-mix(in srgb,var(--tc) 30%,transparent)}
.am-tier-cta.primary:hover{filter:brightness(1.15);transform:translateY(-1px);color:#fff}

/* ── How It Works — Animated Flow ── */
.am-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}
.am-flow::after{content:'';position:absolute;top:0;left:0;right:0;height:1px;
  background:linear-gradient(90deg,transparent,rgba(200,16,46,.4),transparent);animation:am-sweep 4s linear infinite}
@keyframes am-sweep{0%,100%{opacity:.3}50%{opacity:1}}
.am-flow-inner{display:grid;grid-template-columns:repeat(4,1fr);gap:0;position:relative;z-index:1}
@media(max-width:800px){.am-flow-inner{grid-template-columns:repeat(2,1fr)}}
@media(max-width:500px){.am-flow-inner{grid-template-columns:1fr}}
.am-flow-step{padding:32px 24px;text-align:center;position:relative;
  border-right:1px solid rgba(255,255,255,.04)}
.am-flow-step:last-child{border-right:none}
@media(max-width:800px){.am-flow-step{border-right:none;border-bottom:1px solid rgba(255,255,255,.04)}}
.am-flow-step:hover .am-flow-num{background:rgba(200,16,46,.15);border-color:rgba(200,16,46,.4);
  box-shadow:0 0 20px rgba(200,16,46,.15)}
.am-flow-num{width:48px;height:48px;border-radius:50%;margin:0 auto 16px;
  background:rgba(255,255,255,.03);border:2px solid rgba(255,255,255,.08);
  display:flex;align-items:center;justify-content:center;
  font-size:18px;font-weight:900;color:#C8102E;transition:all .3s}
.am-flow-title{font-size:14px;font-weight:700;color:#fff;margin-bottom:6px}
.am-flow-desc{font-size:12px;color:rgba(255,255,255,.35);line-height:1.5}
/* Arrow connectors */
.am-flow-step::before{content:'→';position:absolute;right:-8px;top:48px;font-size:14px;color:rgba(200,16,46,.3);z-index:2}
body.rtl .am-flow-step::before{content:'←';right:auto;left:-8px}
.am-flow-step:last-child::before{display:none}
@media(max-width:800px){.am-flow-step::before{display:none}}

/* ── Benefits Grid ── */
.am-benefits{display:grid;grid-template-columns:repeat(3,1fr);gap:14px;margin-bottom:56px}
@media(max-width:800px){.am-benefits{grid-template-columns:repeat(2,1fr)}}
@media(max-width:500px){.am-benefits{grid-template-columns:1fr}}
.am-benefit{background:#0a0c10;border:1px solid rgba(255,255,255,.06);border-radius:14px;
  padding:24px;text-align:center;transition:all .25s;position:relative;overflow:hidden}
.am-benefit::before{content:'';position:absolute;inset:-1px;border-radius:14px;padding:1px;
  background:conic-gradient(from var(--a,0deg),transparent 60%,var(--bc,#C8102E) 80%,transparent 100%);
  -webkit-mask:linear-gradient(#fff 0 0) content-box,linear-gradient(#fff 0 0);mask:linear-gradient(#fff 0 0) content-box,linear-gradient(#fff 0 0);
  -webkit-mask-composite:xor;mask-composite:exclude;opacity:0;transition:opacity .3s}
.am-benefit:hover::before{opacity:1}
.am-benefit:hover{transform:translateY(-3px);box-shadow:0 12px 40px rgba(0,0,0,.4)}
.am-benefit-icon{width:48px;height:48px;border-radius:12px;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}
.am-benefit-icon svg{stroke:var(--bc,#C8102E);fill:none;width:22px;height:22px}
.am-benefit-title{font-size:14px;font-weight:700;color:#fff;margin-bottom:6px}
.am-benefit-desc{font-size:12px;color:rgba(255,255,255,.35);line-height:1.55}

/* ── Who We're Looking For ── */
.am-who{display:grid;grid-template-columns:1fr 1fr;gap:0;border-radius:20px;overflow:hidden;
  background:linear-gradient(135deg,#080a0f,#0c0e14);border:1px solid rgba(255,255,255,.07);
  margin-bottom:56px;position:relative}
@media(max-width:800px){.am-who{grid-template-columns:1fr}}
.am-who-left{padding:44px 36px;position:relative;z-index:1}
@media(max-width:800px){.am-who-left{padding:28px 20px}}
.am-who-right{position:relative;min-height:380px;border-left:1px solid rgba(255,255,255,.06)}
@media(max-width:800px){.am-who-right{min-height:260px;border-left:none;border-top:1px solid rgba(255,255,255,.06)}}
#am-network-cvs{width:100%;height:100%;display:block}
.am-who-kicker{font-size:10px;font-weight:700;letter-spacing:.15em;text-transform:uppercase;
  color:rgba(200,16,46,.7);margin-bottom:12px;display:flex;align-items:center;gap:8px}
.am-who-kicker::before{content:'';width:6px;height:6px;border-radius:50%;background:#C8102E;
  box-shadow:0 0 8px rgba(200,16,46,.5);animation:am-dot 2s infinite}
@keyframes am-dot{0%,100%{box-shadow:0 0 4px rgba(200,16,46,.3)}50%{box-shadow:0 0 14px rgba(200,16,46,.7)}}
.am-who-title{font-size:26px;font-weight:800;color:#fff;margin-bottom:10px;line-height:1.2}
.am-who-title em{font-style:normal;color:#C8102E}
.am-who-desc{font-size:13.5px;color:rgba(255,255,255,.4);line-height:1.7;margin-bottom:24px}
.am-who-list{display:flex;flex-direction:column;gap:10px}
.am-who-item{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}
.am-who-item:hover{border-color:rgba(200,16,46,.2);background:rgba(200,16,46,.03)}
.am-who-item-icon{width:32px;height:32px;border-radius:8px;background:rgba(200,16,46,.08);
  border:1px solid rgba(200,16,46,.15);display:flex;align-items:center;justify-content:center;flex-shrink:0}
.am-who-item-icon svg{stroke:#C8102E;fill:none;width:16px;height:16px}
.am-who-item-text{font-size:13px;color:rgba(255,255,255,.55)}
.am-who-item-text strong{color:#fff}

/* 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}
}
</style>

<article class="ip-page">
<!-- ═══ HERO ═══ -->
<div class="ip-hero" style="position:relative;overflow:hidden">
  <div class="am-hero-bg"></div>
  <div class="am-hero-grid"></div>
  <div class="am-hero-rings"><div class="am-ring am-ring-1"></div><div class="am-ring am-ring-2"></div></div>
  <div class="ip-hero-glow"></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?'سفیر برند':'Brand Ambassador';?></span>
    </nav>
    <div class="ip-kicker"><span class="ip-kicker-dot"></span><?php echo $fa?'STB Society · مشارکت':'STB SOCIETY · PARTNERSHIP';?></div>
    <h1 class="ip-h1"><?php echo $fa?'سفیر <em>برند STB</em> شوید':'Become an STB <em>Brand Ambassador</em>';?></h1>
    <p class="ip-hero-desc"><?php echo $fa?'به شبکه نخبه سفیران STB بپیوندید. اینفلوئنسرها، معامله‌گران حرفه‌ای و افراد تأثیرگذار — STB را معرفی کنید و از ساختار کمیسیون انحصاری بهره‌مند شوید.':'Join STB\'s elite ambassador network. Influencers, professional traders, and thought leaders — represent the brand and benefit from an exclusive commission structure.';?></p>
    <div class="ip-hero-stats">
      <div><div class="ip-stat-val"><?php echo $fa?'تا':'Up to';?> 50<em>%</em></div><div class="ip-stat-lbl"><?php echo $fa?'سهم درآمد':'Revenue Share';?></div></div>
      <div><div class="ip-stat-val"><?php echo $fa?'اختصاصی':'Exclusive';?></div><div class="ip-stat-lbl"><?php echo $fa?'محتوای برند':'Branded Content';?></div></div>
      <div><div class="ip-stat-val">VIP</div><div class="ip-stat-lbl"><?php echo $fa?'پشتیبانی':'Support';?></div></div>
      <div><div class="ip-stat-val"><?php echo $fa?'جهانی':'Global';?></div><div class="ip-stat-lbl"><?php echo $fa?'دسترسی':'Reach';?></div></div>
    </div>
    <div class="ip-hero-ctas">
      <a href="<?php echo esc_html($register_label_url);?>" class="ip-btn-red"><?php echo $fa?'درخواست سفیری':'Apply Now';?> <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.'/contact/'); ?>" class="ip-btn-ghost"><?php echo $fa?'تماس با تیم مشارکت':'Contact Partnership Team';?></a>
    </div>
  </div>
</div>

<!-- ═══ AMBASSADOR TIERS ═══ -->
<section class="ip-section">
  <div class="ip-container">
    <h2 class="ip-section-title am-rev"><?php echo $fa?'سطوح <em>سفیری</em>':'Ambassador <em>Tiers</em>';?></h2>
    <p class="ip-section-desc am-rev d1"><?php echo $fa?'سه سطح طراحی شده برای هر مرحله از مسیر شما. رشد کنید، درآمد بیشتری کسب کنید.':'Three tiers designed for every stage of your journey. Grow further, earn more.';?></p>
    <div class="am-tiers am-rev d2">
      <?php $tiers = $fa ? [
        ['#C8102E','نقره‌ای','SILVER','اینفلوئنسرها و معامله‌گران با ۵K+ دنبال‌کننده',
         ['محتوای اختصاصی برای شبکه‌های اجتماعی','لینک ارجاع شخصی با ردیابی لحظه‌ای','دسترسی به تیم پشتیبانی مشارکت','گزارش عملکرد ماهانه'],
         '25%','سهم درآمد'],
        ['#14e0a3','طلایی','GOLD','اینفلوئنسرها و تحلیلگران با ۲۵K+ دنبال‌کننده',
         ['تمام مزایای نقره‌ای','محتوای ویدیویی هم‌برند شده','دعوت به رویدادهای VIP','بونوس عملکرد فصلی','مدیر حساب اختصاصی'],
         '35%','سهم درآمد'],
        ['#C8102E','پلاتینوم','PLATINUM','سلبریتی‌ها، رسانه‌ها و اینفلوئنسرهای ۱۰۰K+',
         ['تمام مزایای طلایی','قرارداد سفیری اختصاصی','تبلیغات مشترک و اسپانسری','سفرهای تجاری رایگان','دسترسی به محصولات قبل از عرضه','مشاوره مالی شخصی'],
         '50%','سهم درآمد'],
      ] : [
        ['#C8102E','Silver','SILVER','Influencers & traders with 5K+ followers',
         ['Exclusive social media content kit','Personal referral link with real-time tracking','Access to partnership support team','Monthly performance reports'],
         '25%','Revenue Share'],
        ['#14e0a3','Gold','GOLD','Influencers & analysts with 25K+ followers',
         ['All Silver benefits','Co-branded video content production','VIP event invitations','Quarterly performance bonus','Dedicated account manager'],
         '35%','Revenue Share'],
        ['#C8102E','Platinum','PLATINUM','Celebrities, media & influencers with 100K+',
         ['All Gold benefits','Custom ambassadorship contract','Co-marketing & sponsorship','Complimentary business travel','Pre-launch product access','Personal financial advisory'],
         '50%','Revenue Share'],
      ];
      foreach($tiers as $i=>$t): ?>
      <div class="am-tier" style="--tc:<?php echo $t[0]; ?>">
        <div class="am-tier-badge"><?php echo $t[2]; ?></div>
        <div class="am-tier-name"><?php echo $t[1]; ?></div>
        <div class="am-tier-tag"><?php echo $t[3]; ?></div>
        <div class="am-tier-perks">
          <?php foreach($t[4] as $perk): ?>
          <div class="am-tier-perk">
            <svg viewBox="0 0 24 24"><path d="M20 6L9 17l-5-5" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>
            <span><?php echo $perk; ?></span>
          </div>
          <?php endforeach; ?>
        </div>
        <div class="am-tier-commission">
          <div class="am-tier-comm-val"><?php echo $t[5]; ?></div>
          <div class="am-tier-comm-lbl"><?php echo $t[6]; ?></div>
        </div>
        <a href="<?php echo esc_html($register_label_url);?>" class="am-tier-cta primary"><?php echo $fa?'درخواست':'Apply Now';?></a>
      </div>
      <?php endforeach; ?>
    </div>
  </div>
</section>

<!-- ═══ HOW IT WORKS — 4 STEP FLOW ═══ -->
<section class="ip-section alt">
  <div class="ip-container">
    <h2 class="ip-section-title am-rev"><?php echo $fa?'نحوه <em>عملکرد</em>':'How It <em>Works</em>';?></h2>
    <p class="ip-section-desc am-rev d1"><?php echo $fa?'از درخواست تا کسب درآمد — فرآیند ساده و شفاف.':'From application to earning — a simple, transparent process.';?></p>
    <div class="am-flow am-rev d2">
      <div class="am-flow-inner">
        <?php $steps = $fa ? [
          ['1','درخواست','فرم درخواست سفیری را پر کنید. شبکه‌های اجتماعی و حوزه فعالیت خود را معرفی کنید.'],
          ['2','بررسی','تیم مشارکت STB پروفایل شما را بررسی می‌کند. پاسخ ظرف ۴۸ ساعت.'],
          ['3','فعال‌سازی','بسته سفیری دریافت کنید: لینک اختصاصی، محتوا، داشبورد ردیابی.'],
          ['4','کسب درآمد','با هر مشتری که از طریق شما ثبت‌نام کند، کمیسیون مادام‌العمر دریافت کنید.'],
        ] : [
          ['1','Apply','Fill out the ambassador application. Introduce your social channels and niche.'],
          ['2','Review','STB partnership team reviews your profile. Response within 48 hours.'],
          ['3','Activate','Receive your ambassador kit: custom link, content pack, tracking dashboard.'],
          ['4','Earn','Earn lifetime commission on every client who signs up through your link.'],
        ];
        foreach($steps as $s): ?>
        <div class="am-flow-step">
          <div class="am-flow-num"><?php echo $s[0]; ?></div>
          <div class="am-flow-title"><?php echo $s[1]; ?></div>
          <div class="am-flow-desc"><?php echo $s[2]; ?></div>
        </div>
        <?php endforeach; ?>
      </div>
    </div>
  </div>
</section>

<!-- ═══ BENEFITS GRID ═══ -->
<section class="ip-section">
  <div class="ip-container">
    <h2 class="ip-section-title am-rev"><?php echo $fa?'مزایای <em>سفیری</em>':'Ambassador <em>Benefits</em>';?></h2>
    <div class="am-benefits am-rev d1">
      <?php $benefits = $fa ? [
        ['#C8102E','<path d="M12 2v20M17 5H9.5a3.5 3.5 0 000 7h5a3.5 3.5 0 010 7H6" stroke-width="1.5" stroke-linecap="round"/>',
         'کمیسیون مادام‌العمر','با هر معامله مشتریان ارجاعی، درآمد مستمر دریافت کنید. بدون محدودیت زمانی.'],
        ['#14e0a3','<path d="M14.752 11.168l-3.197-2.132A1 1 0 0010 9.87v4.263a1 1 0 001.555.832l3.197-2.132a1 1 0 000-1.664z" stroke-width="1.5"/><circle cx="12" cy="12" r="10" 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"/>',
         'داشبورد لحظه‌ای','ردیابی کلیک‌ها، ثبت‌نام‌ها و درآمد در لحظه. شفافیت کامل.'],
        ['#14e0a3','<path d="M17 21v-2a4 4 0 00-4-4H5a4 4 0 00-4 4v2" stroke-width="1.5"/><circle cx="9" cy="7" r="4" stroke-width="1.5"/><path d="M23 21v-2a4 4 0 00-3-3.87M16 3.13a4 4 0 010 7.75" stroke-width="1.5"/>',
         'شبکه VIP','به جامعه انحصاری سفیران STB دسترسی پیدا کنید. رویدادها، وبینارها و فرصت‌های ویژه.'],
        ['#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"/>',
         'ابزارهای بازاریابی','بنر، لندینگ پیج، ایمیل تمپلیت و لینک‌های سفارشی آماده استفاده.'],
        ['#14e0a3','<circle cx="12" cy="12" r="10" stroke-width="1.5"/><path d="M2 12h20M12 2a15.3 15.3 0 010 20 15.3 15.3 0 000 20" stroke-width="1.5"/>',
         'دسترسی جهانی','مشتریان از سراسر جهان (به جز مناطق محدود) قابل ارجاع هستند.'],
      ] : [
        ['#C8102E','<path d="M12 2v20M17 5H9.5a3.5 3.5 0 000 7h5a3.5 3.5 0 010 7H6" stroke-width="1.5" stroke-linecap="round"/>',
         'Lifetime Commission','Earn recurring income from every trade your referred clients make. No time limit.'],
        ['#14e0a3','<path d="M14.752 11.168l-3.197-2.132A1 1 0 0010 9.87v4.263a1 1 0 001.555.832l3.197-2.132a1 1 0 000-1.664z" stroke-width="1.5"/><circle cx="12" cy="12" r="10" stroke-width="1.5"/>',
         'Professional Video Content','STB Studio produces co-branded content for your channels.'],
        ['#C8102E','<path d="M3 3v18h18" stroke-width="1.5"/><polyline points="7 16 11 10 15 14 19 7" stroke-width="1.5"/>',
         'Real-Time Dashboard','Track clicks, signups, and earnings in real time. Full transparency.'],
        ['#14e0a3','<path d="M17 21v-2a4 4 0 00-4-4H5a4 4 0 00-4 4v2" stroke-width="1.5"/><circle cx="9" cy="7" r="4" stroke-width="1.5"/><path d="M23 21v-2a4 4 0 00-3-3.87M16 3.13a4 4 0 010 7.75" stroke-width="1.5"/>',
         'VIP Network','Access the exclusive STB ambassador community. Events, webinars, and special opportunities.'],
        ['#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"/>',
         'Marketing Toolkit','Banners, landing pages, email templates, and custom tracking links ready to use.'],
        ['#14e0a3','<circle cx="12" cy="12" r="10" stroke-width="1.5"/><path d="M2 12h20M12 2a15.3 15.3 0 010 20 15.3 15.3 0 000 20" stroke-width="1.5"/>',
         'Global Reach','Refer clients from anywhere in the world (excluding restricted regions).'],
      ];
      foreach($benefits as $b): ?>
      <div class="am-benefit" style="--bc:<?php echo $b[0]; ?>">
        <div class="am-benefit-icon"><svg viewBox="0 0 24 24"><?php echo $b[1]; ?></svg></div>
        <div class="am-benefit-title"><?php echo $b[2]; ?></div>
        <div class="am-benefit-desc"><?php echo $b[3]; ?></div>
      </div>
      <?php endforeach; ?>
    </div>
  </div>
</section>

<!-- ═══ WHO WE'RE LOOKING FOR + NETWORK CANVAS ═══ -->
<section class="ip-section alt">
  <div class="ip-container">
    <div class="am-who am-rev">
      <div class="am-who-left">
        <div class="am-who-kicker"><?php echo $fa?'پروفایل ایده‌آل':'IDEAL PROFILE';?></div>
        <h3 class="am-who-title"><?php echo $fa?'چه کسانی را <em>می‌خواهیم</em>':'Who We\'re <em>Looking For</em>';?></h3>
        <p class="am-who-desc"><?php echo $fa?'ما به دنبال افرادی هستیم که تأثیر واقعی در جامعه مالی و معاملاتی دارند.':'We\'re looking for individuals who have real influence in the financial and trading community.';?></p>
        <div class="am-who-list">
          <?php $who = $fa ? [
            ['<path d="M14.752 11.168l-3.197-2.132A1 1 0 0010 9.87v4.263a1 1 0 001.555.832l3.197-2.132a1 1 0 000-1.664z" stroke-width="1.5"/><circle cx="12" cy="12" r="10" stroke-width="1.5"/>',
             '<strong>یوتیوبرها و تیک‌تاکرها</strong> — تولیدکنندگان محتوای مالی و معاملاتی'],
            ['<path d="M23 3a10.9 10.9 0 01-3.14 1.53A4.48 4.48 0 0012 7.5v1A10.66 10.66 0 013 4s-4 9 5 13a11.64 11.64 0 01-7 2c9 5 20 0 20-11.5" stroke-width="1.5"/>',
             '<strong>اینفلوئنسرهای شبکه‌های اجتماعی</strong> — اینستاگرام، تلگرام، X'],
            ['<path d="M3 3v18h18" stroke-width="1.5"/><polyline points="7 16 11 10 15 14 19 7" stroke-width="1.5"/>',
             '<strong>تحلیلگران و معامله‌گران حرفه‌ای</strong> — با سابقه اثبات‌شده'],
            ['<path d="M12 1a3 3 0 00-3 3v8a3 3 0 006 0V4a3 3 0 00-3-3z" stroke-width="1.5"/><path d="M19 10v2a7 7 0 01-14 0v-2" stroke-width="1.5"/>',
             '<strong>پادکسترها و مجریان وبینار</strong> — در حوزه اقتصاد و بازارهای مالی'],
            ['<path d="M4 19.5A2.5 2.5 0 016.5 17H20" stroke-width="1.5"/><path d="M6.5 2H20v20H6.5A2.5 2.5 0 014 19.5v-15A2.5 2.5 0 016.5 2z" stroke-width="1.5"/>',
             '<strong>وبلاگ‌نویسان و روزنامه‌نگاران مالی</strong> — با مخاطب فعال و وفادار'],
          ] : [
            ['<path d="M14.752 11.168l-3.197-2.132A1 1 0 0010 9.87v4.263a1 1 0 001.555.832l3.197-2.132a1 1 0 000-1.664z" stroke-width="1.5"/><circle cx="12" cy="12" r="10" stroke-width="1.5"/>',
             '<strong>YouTubers & TikTokers</strong> — Financial and trading content creators'],
            ['<path d="M23 3a10.9 10.9 0 01-3.14 1.53A4.48 4.48 0 0012 7.5v1A10.66 10.66 0 013 4s-4 9 5 13a11.64 11.64 0 01-7 2c9 5 20 0 20-11.5" stroke-width="1.5"/>',
             '<strong>Social media influencers</strong> — Instagram, Telegram, X (Twitter)'],
            ['<path d="M3 3v18h18" stroke-width="1.5"/><polyline points="7 16 11 10 15 14 19 7" stroke-width="1.5"/>',
             '<strong>Professional traders & analysts</strong> — With a proven track record'],
            ['<path d="M12 1a3 3 0 00-3 3v8a3 3 0 006 0V4a3 3 0 00-3-3z" stroke-width="1.5"/><path d="M19 10v2a7 7 0 01-14 0v-2" stroke-width="1.5"/>',
             '<strong>Podcasters & webinar hosts</strong> — In finance and markets'],
            ['<path d="M4 19.5A2.5 2.5 0 016.5 17H20" stroke-width="1.5"/><path d="M6.5 2H20v20H6.5A2.5 2.5 0 014 19.5v-15A2.5 2.5 0 016.5 2z" stroke-width="1.5"/>',
             '<strong>Financial bloggers & journalists</strong> — With an active, loyal audience'],
          ];
          foreach($who as $w): ?>
          <div class="am-who-item">
            <div class="am-who-item-icon"><svg viewBox="0 0 24 24"><?php echo $w[0]; ?></svg></div>
            <div class="am-who-item-text"><?php echo $w[1]; ?></div>
          </div>
          <?php endforeach; ?>
        </div>
      </div>
      <div class="am-who-right"><canvas id="am-network-cvs"></canvas></div>
    </div>
  </div>
</section>

<!-- ═══ CTA ═══ -->
<section class="ip-section">
  <div class="ip-container">
    <div class="ip-cta-strip am-rev">
      <div class="ip-cta-strip-text">
        <h3><?php echo $fa?'آماده پیوستن به شبکه سفیران STB هستید؟':'Ready to join the STB ambassador network?';?></h3>
        <p><?php echo $fa?'همین حالا درخواست دهید. تیم مشارکت ظرف ۴۸ ساعت با شما تماس می‌گیرد.':'Apply now. Our partnership team will reach out within 48 hours.';?></p>
      </div>
      <div class="ip-cta-strip-btns">
        <a href="<?php echo esc_html($register_label_url);?>" class="ip-btn-red"><?php echo $fa?'درخواست سفیری':'Apply Now';?></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('.am-rev').forEach(function(el){obs.observe(el)});

  /* Ambassador Network Canvas — influence spreading visualization */
  var c=document.getElementById('am-network-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);

  // Central ambassador node surrounded by audience nodes
  var center={x:.5,y:.5,r:16,color:'#C8102E',label:'YOU'};
  var ring1=[],ring2=[];
  for(var i=0;i<6;i++){var a=Math.PI*2*(i/6)-Math.PI/2;ring1.push({x:.5+Math.cos(a)*.22,y:.5+Math.sin(a)*.22,r:8,color:'#14e0a3',label:''});}
  for(var i=0;i<12;i++){var a=Math.PI*2*(i/12)-Math.PI/6;ring2.push({x:.5+Math.cos(a)*.4,y:.5+Math.sin(a)*.4,r:5,color:'rgba(255,255,255,0.3)',label:''});}

  var pulses=[];
  function spawnPulse(){
    var r1=ring1[Math.floor(Math.random()*ring1.length)];
    pulses.push({x:center.x,y:center.y,tx:r1.x,ty:r1.y,t:0,speed:.015+Math.random()*.01,
      color:'rgba(200,16,46,',phase:1});
  }

  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+=30){ctx.beginPath();ctx.moveTo(0,gy);ctx.lineTo(w,gy);ctx.stroke()}
    for(var gx=0;gx<w;gx+=30){ctx.beginPath();ctx.moveTo(gx,0);ctx.lineTo(gx,h);ctx.stroke()}
    // Lines center→ring1
    ring1.forEach(function(n){ctx.beginPath();ctx.moveTo(center.x*w,center.y*h);ctx.lineTo(n.x*w,n.y*h);
      ctx.strokeStyle='rgba(200,16,46,.08)';ctx.lineWidth=1;ctx.stroke()});
    // Lines ring1→ring2
    ring2.forEach(function(n,i){var parent=ring1[i%ring1.length];
      ctx.beginPath();ctx.moveTo(parent.x*w,parent.y*h);ctx.lineTo(n.x*w,n.y*h);
      ctx.strokeStyle='rgba(20,224,163,.04)';ctx.lineWidth=.5;ctx.stroke()});
    // Ring2 nodes
    ring2.forEach(function(n){
      ctx.beginPath();ctx.arc(n.x*w,n.y*h,n.r,0,Math.PI*2);ctx.fillStyle='rgba(255,255,255,.05)';ctx.fill();
      ctx.beginPath();ctx.arc(n.x*w,n.y*h,2,0,Math.PI*2);ctx.fillStyle='rgba(255,255,255,.15)';ctx.fill()});
    // Ring1 nodes
    ring1.forEach(function(n){
      var g=ctx.createRadialGradient(n.x*w,n.y*h,0,n.x*w,n.y*h,n.r*2.5);
      g.addColorStop(0,n.color+'22');g.addColorStop(1,'transparent');ctx.fillStyle=g;ctx.fillRect(n.x*w-n.r*3,n.y*h-n.r*3,n.r*6,n.r*6);
      ctx.beginPath();ctx.arc(n.x*w,n.y*h,n.r,0,Math.PI*2);ctx.fillStyle=n.color+'33';ctx.fill();
      ctx.beginPath();ctx.arc(n.x*w,n.y*h,n.r*.5,0,Math.PI*2);ctx.fillStyle=n.color+'77';ctx.fill()});
    // Center node
    var cx=center.x*w,cy=center.y*h;
    var pr=center.r+Math.sin(t*0.04)*4;
    ctx.beginPath();ctx.arc(cx,cy,pr+8,0,Math.PI*2);ctx.strokeStyle='rgba(200,16,46,.08)';ctx.lineWidth=1;ctx.stroke();
    ctx.beginPath();ctx.arc(cx,cy,pr,0,Math.PI*2);ctx.fillStyle='rgba(200,16,46,.2)';ctx.fill();
    ctx.beginPath();ctx.arc(cx,cy,pr*.5,0,Math.PI*2);ctx.fillStyle='#C8102E';ctx.fill();
    ctx.font='700 10px system-ui';ctx.fillStyle='rgba(255,255,255,.5)';ctx.textAlign='center';ctx.fillText(center.label,cx,cy+pr+14);
    // Pulses
    pulses.forEach(function(p){
      p.t+=p.speed;
      var x=p.x+(p.tx-p.x)*p.t,y=p.y+(p.ty-p.y)*p.t;
      ctx.beginPath();ctx.arc(x*w,y*h,3,0,Math.PI*2);
      ctx.fillStyle=p.color+(1-p.t)*0.7+')';ctx.fill()});
    pulses=pulses.filter(function(p){return p.t<1});
    if(pulses.length<8&&Math.random()<0.04)spawnPulse();
    t++;
    if(!isVisible){
      animId = null;
      return;
    }
    animId = requestAnimationFrame(draw);
  }
})();
</script>
