<?php $lang = stb_lang(); $is_rtl = stb_is_rtl_lang(); ?>
<style>
/* ════════════════════════════════════════
   STB FOOTER — Futuristic animated
════════════════════════════════════════ */
.ftr-wrap{
  background:#04060a;
  position:relative;overflow:hidden;
  border-top:1px solid rgba(255,255,255,.06);
}
/* Animated grid */
.ftr-wrap::before{
  content:'';position:absolute;inset:0;
  background-image:
    linear-gradient(rgba(200,16,46,.025) 1px,transparent 1px),
    linear-gradient(90deg,rgba(200,16,46,.025) 1px,transparent 1px);
  background-size:48px 48px;
  mask-image:radial-gradient(ellipse 80% 100% at 50% 0%,black 40%,transparent 100%);
  pointer-events:none;
}
/* Glow orbs */
.ftr-orb{position:absolute;border-radius:50%;filter:blur(80px);pointer-events:none}
.ftr-orb-1{width:500px;height:300px;top:-60px;left:-100px;background:radial-gradient(circle,rgba(200,16,46,.1),transparent 65%);animation:ftr-float 10s ease-in-out infinite alternate}
.ftr-orb-2{width:400px;height:300px;bottom:200px;right:-80px;background:radial-gradient(circle,rgba(200,16,46,.07),transparent 65%);animation:ftr-float 13s ease-in-out infinite alternate-reverse}
@keyframes ftr-float{0%{transform:translate(0,0)}100%{transform:translate(20px,-15px)}}

/* Sweep line at top */
.ftr-sweep{
  position:relative;height:1px;overflow:hidden;
  background:rgba(255,255,255,.04);
}
.ftr-sweep::after{
  content:'';position:absolute;top:0;height:100%;width:30%;
  background:linear-gradient(90deg,transparent,rgba(200,16,46,.7),rgba(200,16,46,.4),transparent);
  animation:ftr-sweep 5s linear infinite;
}
@keyframes ftr-sweep{0%{left:-30%}100%{left:110%}}

/* Inner */
.ftr-inner{max-width:1280px;margin:0 auto;padding:64px 40px 40px;position:relative;z-index:1}
@media(max-width:768px){.ftr-inner{padding:48px 20px 32px}}

/* ── Top: logo + tagline ── */
.ftr-top{
  display:grid;grid-template-columns:280px 1fr;gap:48px;
  padding-bottom:48px;border-bottom:1px solid rgba(255,255,255,.07);
  margin-bottom:48px;align-items:start;
}
@media(max-width:900px){.ftr-top{grid-template-columns:1fr;gap:32px;padding-bottom:32px;margin-bottom:32px}}
.ftr-logo img{height:36px;margin-bottom:16px}
.ftr-tagline{font-size:13.5px;color:rgba(255,255,255,.4);line-height:1.7;max-width:240px}
.ftr-social{display:flex;gap:8px;margin-top:20px}
.ftr-social-btn{
  width:36px;height:36px;border-radius:9px;
  background:rgba(255,255,255,.04);border:1px solid rgba(255,255,255,.08);
  display:flex;align-items:center;justify-content:center;
  transition:background .15s,border-color .15s;text-decoration:none;
}
.ftr-social-btn:hover{background:rgba(200,16,46,.12);border-color:rgba(200,16,46,.3)}
.ftr-social-btn svg{stroke:rgba(255,255,255,.45);fill:none;width:16px;height:16px;transition:stroke .15s}
.ftr-social-btn:hover svg{stroke:rgba(200,16,46,.9)}

/* Trusted badge */
.ftr-reg-badge{
  display:flex;align-items:flex-start;gap:10px;
  padding:14px 16px;border-radius:12px;
  background:rgba(20,224,163,.05);border:1px solid rgba(20,224,163,.15);
  width:fit-content;
}
.ftr-reg-dot{width:7px;height:7px;border-radius:50%;background:#14e0a3;flex-shrink:0;margin-top:5px;box-shadow:0 0 8px #14e0a3;animation:ftr-pulse 2s infinite}
@keyframes ftr-pulse{0%,100%{box-shadow:0 0 0 0 rgba(20,224,163,.4)}50%{box-shadow:0 0 0 5px rgba(20,224,163,0)}}
.ftr-reg-title{font-size:12.5px;font-weight:700;color:#14e0a3;margin-bottom:3px}
.ftr-reg-text{font-size:11.5px;color:rgba(20,224,163,.6);line-height:1.5}

/* ── Columns ── */
.ftr-cols{
  display:grid;
  grid-template-columns:repeat(5,1fr);
  gap:32px;margin-bottom:48px;
}
@media(max-width:1000px){.ftr-cols{grid-template-columns:repeat(3,1fr)}}
@media(max-width:600px){.ftr-cols{grid-template-columns:repeat(2,1fr);gap:24px}}
.ftr-col{}
.ftr-col-header{display:flex;align-items:center;gap:8px;margin-bottom:16px}
.ftr-col-icon{
  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;flex-shrink:0;
}
.ftr-col-icon svg{stroke:var(--fc,#C8102E);fill:none;width:13px;height:13px}
.ftr-col-title{
  font-size:11.5px;font-weight:700;letter-spacing:.1em;
  text-transform:uppercase;color:rgba(255,255,255,.55);
}
.ftr-links{display:flex;flex-direction:column;gap:9px}
.ftr-links a{
  font-size:13px;color:rgba(255,255,255,.38);
  text-decoration:none;transition:color .15s,padding-left .15s,padding-right .15s;
  display:flex;align-items:center;gap:0;
}
.ftr-links a:hover{color:rgba(255,255,255,.85);padding-left:4px}
body.rtl .ftr-links a:hover{padding-left:0;padding-right:4px}

/* New badge */
.ftr-new{
  font-size:9px;font-weight:700;padding:1px 6px;border-radius:3px;
  background:rgba(20,224,163,.12);color:#14e0a3;
  border:1px solid rgba(20,224,163,.2);letter-spacing:.06em;
  text-transform:uppercase;margin-left:6px;flex-shrink:0;
}

/* ── Bottom bar ── */
.ftr-bottom{
  padding-top:28px;border-top:1px solid rgba(255,255,255,.07);
  display:flex;align-items:center;justify-content:space-between;
  gap:16px;flex-wrap:wrap;
}
.ftr-copy{font-size:12.5px;color:rgba(255,255,255,.25)}
.ftr-legal-links{display:flex;gap:20px;flex-wrap:wrap}
.ftr-legal-links a{font-size:12.5px;color:rgba(255,255,255,.3);text-decoration:none;transition:color .15s;white-space:nowrap}
.ftr-legal-links a:hover{color:rgba(255,255,255,.65)}

/* ── Disclaimer block ── */
.ftr-disclaimer{
  margin-top:32px;padding:24px 28px;
  background:rgba(255,255,255,.02);
  border:1px solid rgba(255,255,255,.06);
  border-radius:12px;
  position:relative;overflow:hidden;
}
/* Warning stripe on left */
.ftr-disclaimer::before{
  content:'';position:absolute;left:0;top:0;bottom:0;width:3px;
  background:linear-gradient(180deg,#C8102E,rgba(200,16,46,.3));
}
.ftr-disclaimer-title{
  font-size:10.5px;font-weight:700;letter-spacing:.1em;text-transform:uppercase;
  color:rgba(200,16,46,.7);margin-bottom:10px;
  display:flex;align-items:center;gap:7px;
}
.ftr-disclaimer-title svg{stroke:rgba(200,16,46,.7);fill:none;width:13px;height:13px}
.ftr-disclaimer p{
  font-size:11.5px;color:rgba(255,255,255,.28);
  line-height:1.7;margin-bottom:10px;
}
.ftr-disclaimer p:last-child{margin-bottom:0}
.ftr-disclaimer strong{color:rgba(255,255,255,.4);font-weight:600}

/* ── Animated signal bottom bar ── */
.ftr-signal{height:2px;position:relative;overflow:hidden;background:rgba(255,255,255,.03);margin-top:40px}
.ftr-signal::after{
  content:'';position:absolute;top:0;height:100%;width:35%;
  background:linear-gradient(90deg,transparent,rgba(200,16,46,.5),rgba(200,16,46,.7),rgba(200,16,46,.5),transparent);
  animation:ftr-sweep 4s linear infinite;
}

/* ════════════════════════════════════════
   RTL FIXES
════════════════════════════════════════ */
body.rtl .ftr-tagline,
body.rtl .ftr-copy,
body.rtl .ftr-reg-text,
body.rtl .ftr-reg-title,
body.rtl .ftr-disclaimer-title,
body.rtl .ftr-disclaimer p{
  text-align:right;
}

body.rtl .ftr-col-header,
body.rtl .ftr-reg-badge{
  flex-direction:row-reverse;
}
body.rtl .ftr-disclaimer-title{
    flex-direction:row;

}
body.rtl .ftr-new{
  margin-left:0 !important;
  margin-right:6px !important;
}

body.rtl .ftr-disclaimer::before{
  left:auto !important;
  right:0 !important;
}

body.rtl .ftr-legal-links,
body.rtl .ftr-social{
  justify-content:flex-start;
}

body.rtl .ftr-bottom{
  direction:rtl;
}

body.rtl .ftr-links a{
  justify-content:flex-start;
}

@media(max-width:768px){
  body.rtl .ftr-top,
  body.rtl .ftr-cols,
  body.rtl .ftr-bottom{
    direction:rtl!important;
  }
  body.rtl .ftr-legal-links {
    direction: rtl;
        justify-content: flex-end;
}


}
</style>

<footer class="ftr-wrap" role="contentinfo">
  <!-- Animated sweep top -->
  <div class="ftr-sweep" aria-hidden="true"></div>

  <!-- Glow orbs -->
  <div class="ftr-orb ftr-orb-1" aria-hidden="true"></div>
  <div class="ftr-orb ftr-orb-2" aria-hidden="true"></div>

  <div class="ftr-inner">

    <!-- Top: brand + Trusted badge -->
    <div class="ftr-top">
      <div>
        <a href="<?php echo home_url('/') . ($lang!=='en' ? '?lang='.$lang : ''); ?>">
          <img src="<?php echo get_template_directory_uri(); ?>/assets/images/logo.png"
               alt="STB Provider" class="ftr-logo" style="height:36px;display:block;margin-bottom:16px">
        </a>
        <p class="ftr-tagline">
          <?php echo $lang==='fa' ? 'پنج بخش یکپارچه. یک اکوسیستم معاملاتی حرفه‌ای.' : 'Five integrated divisions. One professional trading ecosystem.'; ?>
        </p>

        <!-- Social links -->
        <div class="ftr-social">
          <?php $socials = [
            [$lang === 'fa' ? 'https://t.me/stbbroker_ir' : 'https://t.me/stbbrokereng', '<path d="M22 2L11 13M22 2L15 22l-4-9-9-4 20-7z" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>', 'Telegram'],
            ['https://www.instagram.com/stb_provider', '<rect x="2" y="2" width="20" height="20" rx="5" stroke-width="1.5"/><circle cx="12" cy="12" r="4" stroke-width="1.5"/><circle cx="17.5" cy="6.5" r="1" fill="currentColor" stroke="none"/>', 'Instagram'],
            [$lang === 'fa' ? 'https://x.com/STB_broker' : 'https://x.com/stbprovideltd', '<path d="M23 3a10.9 10.9 0 01-3.14 1.53 4.48 4.48 0 00-7.86 3v1A10.66 10.66 0 013 4s-4 9 5 13a11.64 11.64 0 01-7 2c9 5 20 0 20-11.5a4.5 4.5 0 00-.08-.83A7.72 7.72 0 0023 3z" stroke-width="1.5"/>', 'Twitter / X'],
            ['https://www.youtube.com/@stbprovider-o6b', '<path d="M22.54 6.42a2.78 2.78 0 00-1.95-1.96C18.88 4 12 4 12 4s-6.88 0-8.59.46a2.78 2.78 0 00-1.95 1.96A29 29 0 001 12a29 29 0 00.46 5.58A2.78 2.78 0 003.41 19.6C5.12 20 12 20 12 20s6.88 0 8.59-.46a2.78 2.78 0 001.95-1.95A29 29 0 0023 12a29 29 0 00-.46-5.58z" stroke-width="1.5"/><polygon points="9.75 15.022 15.5 12 9.75 8.978 9.75 15.022" stroke-width="1.5"/>', 'YouTube'],
            [$lang === 'fa' ? 'https://www.linkedin.com/company/stb-brokers?trk=public_post_feed-actor-name' : 'https://ae.linkedin.com/company/stbproviderr?trk=public_post_feed-actor-image', '<path d="M16 8a6 6 0 016 6v7h-4v-7a2 2 0 00-4 0v7h-4v-12h4v2a4 4 0 013-2z" stroke-width="1.5"/><rect x="2" y="9" width="4" height="12" stroke-width="1.5"/><circle cx="4" cy="4" r="2" stroke-width="1.5"/>', 'LinkedIn'],
            ['https://www.aparat.com/Stb_broker', '<path d="M12.0014 1.5938C2.7317 1.5906-1.9119 12.7965 4.641 19.3515c2.975 2.976 7.4496 3.8669 11.3374 2.257 3.8877-1.61 6.4228-5.4036 6.4228-9.6116 0-5.7441-4.6555-10.4012-10.3997-10.4031zM6.11 6.783c.5011-2.5982 3.8927-3.2936 5.376-1.1028 1.4834 2.1907-.4216 5.0816-3.02 4.5822-1.6118-.3098-2.6668-1.868-2.356-3.4794zm4.322 8.9882c-.5045 2.5971-3.8965 3.288-5.377 1.0959-1.4807-2.1922.427-5.0807 3.0247-4.5789 1.612.3114 2.6655 1.8714 2.3524 3.483zm1.2605-2.405c-1.1528-.2231-1.4625-1.7273-.4917-2.3877.9708-.6604 2.256.18 2.0401 1.3343-.1347.7198-.8294 1.1924-1.5484 1.0533zm6.197 3.8375c-.501 2.5981-3.8927 3.2935-5.376 1.1028-1.4834-2.1908.4217-5.0817 3.0201-4.5822 1.6117.3097 2.6667 1.8679 2.356 3.4794zm-1.9662-5.5018c-2.5981-.501-3.2935-3.8962-1.1027-5.3795 2.1907-1.4834 5.0816.4216 4.5822 3.02-.3082 1.6132-1.8668 2.6701-3.4795 2.3595zm-2.3348 11.5618l2.2646.611c1.9827.5263 4.0167-.6542 4.5433-2.6368l.639-2.4016a11.3828 11.3828 0 0 1-7.4469 4.4274zM21.232 3.5985l-2.363-.6284a11.3757 11.3757 0 0 1 4.3538 7.619l.6495-2.4578c.5194-1.9804-.6615-4.0076-2.6403-4.5328zM.6713 13.8086l-.5407 2.04c-.5263 1.9826.6542 4.0166 2.6368 4.5432l2.1066.5618a11.3792 11.3792 0 0 1-4.2027-7.145zM10.3583.702L8.1498.1261C6.166-.4024 4.1296.7785 3.603 2.763l-.5512 2.082A11.3757 11.3757 0 0 1 10.3583.702Z" stroke-width="1.5"/>', 'Aparat'],
            ['https://ble.ir/join/EjMa6E1Fsq', '<svg viewBox="0 0 1000 1000" fill="none" stroke="currentColor" stroke-width="60" stroke-linecap="round" stroke-linejoin="round"><path d="M1010.36,547.36c-.73,17.77-2.6,36-6.85,53.41-1.54,16.48-6.36,32.54-10.76,48.52-5.14,19.5-12.48,38.33-19.9,57.17-6.77,15.66-14.35,30.91-22.26,46.08C942.92,766,934.93,779.2,926.29,792q-14.32,21-30.5,40.45c-11.18,13.13-22.68,26.09-35.15,37.92a503.68,503.68,0,0,1-51.3,43.55,453.44,453.44,0,0,1-48.44,31.56C742.06,956.74,722.16,966,702,974.6a548,548,0,0,1-65.89,21.86c-19.49,4.32-39,9.21-58.88,10.76-37,5.71-74.86,5.79-112.13,2.2-33.6-2.61-66.87-9.78-99.25-19.32l-.08-.58C210.19,944.18,82.32,816.07,34.94,661.2c-10.36-33.35-17.62-67.93-20.31-102.83-3.83-33.85-2-68-2.2-102q-.37-40.74-.08-81.64-.26-41.83,0-83.83c-.17-24-.08-47.95-.08-71.93s-.17-48.19.16-72.25c-.33-23.82-.08-47.63-.16-71.44-1.64-17.94,4.24-36.7,17.86-48.85C44.48,13.44,65.68,8.55,84,14.91c11.09,3.75,20.71,10.6,30.58,16.72,36,23.4,70.54,48.85,104.71,74.78a86.74,86.74,0,0,0,10.68-6.77A426.86,426.86,0,0,1,272.58,73.3a483.59,483.59,0,0,1,45.75-22.1c16.39-6.85,33.19-12.8,50.15-18.1,18.1-5,36.29-10.11,55-12.72a392.65,392.65,0,0,1,61.82-7.26,451.46,451.46,0,0,1,76.41,1.71A413.36,413.36,0,0,1,619,24c128.53,27,244.08,108.3,314.46,219a493,493,0,0,1,66.47,159.76c4.73,20.95,8.48,42.32,9.7,63.77A411.89,411.89,0,0,1,1010.36,547.36Z" transform="translate(-12 -12.14)"/><path d="M705.69,273.2a107.59,107.59,0,0,1,62.37,1.3c25.62,9.82,46.29,29.94,57.5,54.9,8.34,22.86,9.31,48.42.91,71.44-6.06,16.2-16.76,30.09-29.4,41.74q-16.7,16.49-33.21,33.14c-11.79,11.79-23.64,23.5-35.33,35.35-11.3,11.28-22.62,22.49-33.85,33.81-12.32,12.34-24.68,24.61-36.95,37-14,14-28.06,27.94-42,42-13.24,13.29-26.55,26.49-39.8,39.78s-26.77,26.71-40.1,40.11c-12.27,11.85-23.51,24.94-37.35,35.06a106.69,106.69,0,0,1-57.95,16C417,753.28,393.79,744,376.87,727.33q-78.53-78.44-157-156.94c-12.82-12.66-21.38-29.07-26-46.38-4.75-23.86-1.94-49.51,10.31-70.75,9.37-16.54,23.79-29.65,40.19-39a107.52,107.52,0,0,1,57.86-9.73c21.38,3.21,42,13,56.91,28.76Q401.7,476,444.37,518.5c8.63-8.18,16.9-16.73,25.19-25.27q18-17.31,35.24-35.35c11.36-10.68,22.33-21.82,33.07-33.12,7.74-6.88,14.75-14.51,22.07-21.8,12-11.68,23.75-23.59,35.49-35.51,11.21-10.83,22.11-21.95,33.07-33,11.79-11.5,23.28-23.28,35-34.87a105.75,105.75,0,0,1,42.21-26.37Z" transform="translate(-12 -12.14)"/></svg>', 'Bale'],
            ['https://www.tiktok.com/@stbbrokers.fa?_r=1&_t=ZS-97E6tANzRRK', '<path d="M12.525.02c1.31-.02 2.61-.01 3.91-.02.08 1.53.63 3.09 1.75 4.17 1.12 1.11 2.7 1.62 4.24 1.79v4.03c-1.44-.05-2.89-.35-4.2-.97-.57-.26-1.1-.59-1.62-.93-.01 2.92.01 5.84-.02 8.75-.08 1.4-.54 2.79-1.35 3.94-1.31 1.92-3.58 3.17-5.91 3.21-1.43.08-2.86-.31-4.08-1.03-2.02-1.19-3.44-3.37-3.65-5.71-.02-.5-.03-1-.01-1.49.18-1.9 1.12-3.72 2.58-4.96 1.66-1.44 3.98-2.13 6.15-1.72.02 1.48-.04 2.96-.04 4.44-.99-.32-2.15-.23-3.02.37-.63.41-1.11 1.04-1.36 1.75-.21.51-.15 1.07-.14 1.61.24 1.64 1.82 3.02 3.5 2.87 1.12-.01 2.19-.66 2.77-1.61.19-.33.4-.67.41-1.06.1-1.79.06-3.57.07-5.36.01-4.03-.01-8.05.02-12.07z" stroke-width="1.5"/>', 'TikTok'],
          ];
          foreach($socials as $s):
            if (($s[2] === 'Aparat' || $s[2] === 'Bale') && $lang !== 'fa') {
              continue;
            }
          ?>
          <a href="<?php echo esc_url($s[0]); ?>" class="ftr-social-btn" aria-label="<?php echo esc_attr($s[2]); ?>" target="_blank" rel="noopener">
            <?php if (strpos($s[1], '<svg') === 0): ?>
              <?php echo $s[1]; ?>
            <?php else: ?>
              <svg viewBox="0 0 24 24"><?php echo $s[1]; ?></svg>
            <?php endif; ?>
          </a>
          <?php endforeach; ?>
        </div>
      </div>

      <!-- <div class="ftr-reg-badge">
        <div class="ftr-reg-dot"></div>
        <div>
          <div class="ftr-reg-title"><?php echo $lang==='fa' ? 'مورد اعتماد و فعال' : 'Trusted & Active'; ?></div>
          <div class="ftr-reg-text">
            <?php echo $lang==='fa' ? 'STB Provider LTD · شماره مجوز: 2023-00478 · سنت لوسیا' : 'STB Provider LTD · Licence No. 2023-00478 · Saint Lucia'; ?>
          </div>
        </div>
      </div> -->
    </div>

    <!-- 5-column nav -->
    <div class="ftr-cols">

      <?php
      $cols = [
        ['#C8102E','<path d="M3 3v18h18" stroke-width="1.5"/><polyline points="7 16 11 10 15 14 19 7" stroke-width="1.5"/>',
         $lang==='fa' ? 'بروکر' : 'Broker',
         $lang==='fa'
           ? [['حساب‌های معاملاتی','/NewSite/trading-accounts/'],['پلتفرم‌ها','/NewSite/platforms/'],['اجرا و اسپرد','/NewSite/execution/'],['واریز و برداشت','/NewSite/deposit/']]
           : [['Trading Accounts','/NewSite/trading-accounts/'],['Platforms','/NewSite/platforms/'],['Execution & Spreads','/NewSite/execution/'],['Deposit & Withdraw','/NewSite/deposit/']]
        ],
        ['#C8102E','<path d="M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z" stroke-width="1.5"/>',
         $lang==='fa' ? 'سرمایه‌گذاری' : 'Investment',
         $lang==='fa'
           ? [['PAMM','/NewSite/pamm/'],['کپی تریدینگ','/NewSite/copy-trading/']]
           : [['PAMM Overview','/NewSite/pamm/'],['Copy Trading','/NewSite/copy-trading/']],
        ],
        // ['#14e0a3','<path d="M13 2L3 14h9l-1 8 10-12h-9l1-8z" stroke-width="1.5" stroke-linecap="round"/>',
        //  'STB Venture',
        //  $lang==='fa'
        //    ? [['چالش دو مرحله‌ای','/NewSite/venture/','new'],['چالش یک مرحله‌ای','/NewSite/venture/','new'],['فاندد فوری','/NewSite/venture/','new'],['قوانین و شرایط','/NewSite/venture/']]
        //    : [['2-Step Challenge','/NewSite/venture/','new'],['1-Step Challenge','/NewSite/venture/','new'],['Instant Funded','/NewSite/venture/','new'],['Rules & Conditions','/NewSite/venture/']],
        // ],
        ['#14e0a3','<path d="M22 10v6M2 10l10-5 10 5-10 5-10-5z" stroke-width="1.5"/><path d="M6 12v5c0 2.21 2.686 4 6 4s6-1.79 6-4v-5" stroke-width="1.5"/>',
         $lang==='fa' ? 'آکادمی' : 'Academy',
         $lang==='fa'
           ? [['دانشنامه','/encyclopedia/'],['مقالات بازار','/NewSite/blog/']]
           : [['Encyclopedia','/encyclopedia/'],['Market Articles','/NewSite/blog/']],
        ],
        ['#C8102E','<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"/>',
         $lang==='fa' ? 'جامعه' : 'Society',
         $lang==='fa'
           ? [['معرفی بروکر (IB)','/NewSite/ib/'],['برنامه همکاری','/NewSite/affiliate/'],['سفیر برند','/NewSite/ambassador/'],['فروشگاه جامعه','/NewSite/community-shop/']]
           : [['Introducing Broker','/NewSite/ib/'],['Affiliate Program','/NewSite/affiliate/'],['Brand Ambassador','/NewSite/ambassador/'],['Community Shop','/NewSite/community-shop/']],
        ],
      ];
      foreach($cols as $col): ?>
      <div class="ftr-col" style="--fc:<?php echo $col[0]; ?>">
        <div class="ftr-col-header">
          <div class="ftr-col-icon">
            <svg viewBox="0 0 24 24" stroke="currentColor" fill="none"><?php echo $col[1]; ?></svg>
          </div>
          <span class="ftr-col-title"><?php echo esc_html($col[2]); ?></span>
        </div>
        <div class="ftr-links">
          <?php foreach($col[3] as $link): ?>
          <a href="<?php echo esc_url(stb_url($link[1])); ?>">
            <?php echo esc_html($link[0]); ?>
            <?php if(!empty($link[2])): ?><span class="ftr-new">NEW</span><?php endif; ?>
          </a>
          <?php endforeach; ?>
        </div>
      </div>
      <?php endforeach; ?>
    </div>

    <!-- Disclaimer block -->
    <div class="ftr-disclaimer">
      <div class="ftr-disclaimer-title">
        <svg viewBox="0 0 24 24"><path d="M10.29 3.86L1.82 18a2 2 0 001.71 3h16.94a2 2 0 001.71-3L13.71 3.86a2 2 0 00-3.42 0z" stroke-width="1.5"/><line x1="12" y1="9" x2="12" y2="13" stroke-width="1.5"/><line x1="12" y1="17" x2="12.01" y2="17" stroke-width="2"/></svg>
        <?php echo $lang==='fa' ? 'افشای ریسک و اطلاعات حقوقی' : 'Risk Disclosure & Legal Information'; ?>
      </div>
      <?php if($lang==='fa'): ?>
      <p>معاملات CFD ابزارهای پیچیده‌ای هستند و به دلیل اهرم، ریسک بالایی برای از دست دادن سرمایه به سرعت دارند. <strong>۷۵٪ از حساب‌های سرمایه‌گذاران خرده‌فروش هنگام معامله CFD پول از دست می‌دهند.</strong> باید بررسی کنید که آیا می‌دانید CFDها، فارکس یا سایر محصولات ما چگونه کار می‌کنند و آیا می‌توانید ریسک بالای از دست دادن پول خود را بپذیرید.</p>
      <p>معامله محصولات و خدمات STB Provider LTD می‌تواند منجر به زیان یا سود شود. اهرم هم سود و هم زیان را تقویت می‌کند و زیان شما می‌تواند از سپرده‌هایتان بیشتر شود.</p>
      <p><strong>STB Provider LTD</strong> در طبقه همکف ساختمان Sotheby، روستای Rodney، خلیج Rodney، Gros Islet، سنت لوسیا ثبت شده است. <strong>شماره مجوز: 2023-00478</strong></p>
      <p>STB Provider LTD به ساکنان <strong>ایالات متحده آمریکا، ترکیه، امارات متحده عربی یا سنت لوسیا</strong> خدمات ارائه نمی‌دهد.</p>
      <?php else: ?>
      <p>CFDs are complex instruments and come with a high risk of losing money rapidly due to leverage. <strong>75% of retail investor accounts lose money when trading CFDs.</strong> You should consider whether you understand how CFDs, FX, or any of our other products work and whether you can afford to take the high risk of losing your money.</p>
      <p>Trading the products and services of STB Provider LTD may result in losses as well as profits, even if trades are made in accordance with a recommendation. Leverage magnifies both gains and losses, and your losses can exceed your deposits. Margin calls may be made quickly or frequently.</p>
      <p><strong>STB Provider LTD</strong> is registered Ground Floor, The Sotheby Building, Rodney Village, Rodney Bay, Gros Islet, Saint Lucia. <strong>Licence Number: 2023-00478.</strong> Office: Bulgaria bul. 58, ent.C, Floor 1, Office 4, Sofia, Bulgaria. Email: Info@stbbrokers.com · Tel (BG): +359 2 928 6457 </p>
      <p>STB Provider LTD does not provide services to residents of the <strong>USA, Turkey, UAE, or Saint Lucia.</strong></p>
      <?php endif; ?>
    </div>

    <!-- Bottom bar -->
    <div class="ftr-bottom">
      <span class="ftr-copy">&copy; 2020–<?php echo date('Y'); ?> STB Provider LTD. <?php echo $lang==='fa' ? 'تمام حقوق محفوظ است.' : 'All rights reserved.'; ?></span>
      <div class="ftr-legal-links">
        <?php
        $upl = home_url().'/wp-content/uploads/2026/03/';
        // [label, url, is_file]  is_file=true => absolute PDF, no lang param
        $legal = $lang==='fa'
          ? [
              ['سیاست حریم خصوصی','/NewSite/legal/',false],
              ['افشای ریسک','/NewSite/legal/',false],
              ['شرایط استفاده','/NewSite/legal/',false],
              ['سیاست AML','/NewSite/legal/',false],
              ['گواهی ثبت شرکت',$upl.'STB_Certificate_of_Incorporation.pdf',true],
              ['ثبت MSB در FinCEN',$upl.'STB_FinCEN_MSB_Registration.pdf',true],
            ]
          : [
              ['Privacy Policy','/NewSite/legal/',false],
              ['Risk Disclosure','/NewSite/legal/',false],
              ['Terms of Use','/NewSite/legal/',false],
              ['AML Policy','/NewSite/legal/',false],
              ['Certificate of Incorporation',$upl.'STB_Certificate_of_Incorporation.pdf',true],
              ['FinCEN MSB Registration',$upl.'STB_FinCEN_MSB_Registration.pdf',true],
            ];
        foreach($legal as $l):
          $href = $l[2] ? $l[1] : stb_url($l[1]);
          $tgt  = $l[2] ? ' target="_blank" rel="noopener"' : '';
        ?>
        <a href="<?php echo esc_url($href); ?>"<?php echo $tgt; ?>><?php echo esc_html($l[0]); ?></a>
        <?php endforeach; ?>
      </div>
    </div>

  </div>

  <!-- Animated signal bottom bar -->
  <div class="ftr-signal" aria-hidden="true"></div>

</footer>
<?php wp_footer(); ?>
<script type="text/javascript">window.$crisp=[];window.CRISP_WEBSITE_ID="68674de9-d85f-4ce4-a9b2-f66bb2a5d29b";(function(){d=document;s=d.createElement("script");s.src="https://client.crisp.chat/l.js";s.async=1;d.getElementsByTagName("head")[0].appendChild(s);})();</script>
</body>
</html>
