<?php
$page_title = "FAQ";
$page_description = "Find answers to common questions about our services, payments, and account management.";
include('include/header.php');

$faqs = [
  ['q'=>'How do I fund my wallet?','a'=>'You can fund your wallet via bank transfer or card payment through our secure payment gateways. Funds reflect instantly with zero hidden fees.'],
  ['q'=>'Are the followers, likes, and views real?','a'=>'Yes! We provide high-quality engagement from real-looking accounts. Our services are designed to be safe for your account and comply with platform guidelines.'],
  ['q'=>'How fast is the delivery?','a'=>'Most orders start delivering within seconds to minutes after payment. Large orders may take slightly longer but we always aim to fulfill as quickly as possible — 24/7.'],
  ['q'=>'Is my wallet balance safe?','a'=>'Absolutely. Your wallet balance is fully secured and never expires. For incomplete or failed orders, the amount is automatically refunded to your wallet.'],
  ['q'=>'How do I become a reseller?','a'=>'After creating your account, navigate to "Become a Reseller" in your dashboard. Fund your wallet with the qualifying amount and your account is instantly upgraded.'],
  ['q'=>'Can I use the API to automate orders?','a'=>'Yes! We offer a powerful REST API that resellers can use to integrate our services into their own platforms or automate bulk orders.'],
  ['q'=>'What platforms do you support?','a'=>'We support all major social media platforms including Instagram, TikTok, Facebook, Twitter/X, YouTube, Snapchat, Telegram, and more.'],
  ['q'=>'What payment methods do you accept?','a'=>'We accept bank transfers, debit/credit cards via Paystack, cryptocurrency, and wallet-to-wallet transfers. All channels are secured and encrypted.'],
  ['q'=>'How do I contact support?','a'=>'Our support team is available 24/7 via Telegram, WhatsApp, and email. We typically respond within minutes.'],
  ['q'=>'What is your refund policy?','a'=>'If an order cannot be completed for any reason, the amount is fully refunded to your wallet automatically. We do not offer cash refunds for successfully delivered orders.'],
];
?>

<!-- Hero -->
<section class="pt-16 pb-12 px-4 sm:px-6 lg:px-8 max-w-7xl mx-auto text-center">
  <div class="inline-flex items-center gap-2 bg-primary/10 border border-primary/20 rounded-full px-4 py-1.5 mb-6">
    <span class="text-xs font-semibold text-slate-800 tracking-wide uppercase">Help Center</span>
  </div>
  <h1 class="text-4xl sm:text-5xl font-extrabold text-slate-900 mb-4">Frequently Asked <span class="text-accent italic">Questions</span></h1>
  <p class="text-slate-600 max-w-lg mx-auto">Find answers to the most common questions about <?php echo htmlspecialchars($site_data['web_name']); ?> services, payments, and account management.</p>
</section>

<!-- FAQ Accordion -->
<section class="px-4 sm:px-6 lg:px-8 max-w-3xl mx-auto pb-20">
  <div class="space-y-3">
    <?php foreach($faqs as $i => $f): ?>
    <div class="glassmorphism rounded-2xl overflow-hidden shadow-sm border border-slate-200 hover:border-primary/30 transition-all">
      <button onclick="toggleFaq(this)" class="w-full text-left px-6 py-5 flex items-center justify-between">
        <div class="flex items-center gap-3">
          <span class="text-xs font-bold text-primary bg-primary/10 px-2 py-1 rounded-md"><?php printf('%02d', $i+1); ?></span>
          <span class="font-bold text-slate-900 text-sm"><?php echo htmlspecialchars($f['q']); ?></span>
        </div>
        <i class="fa-solid fa-chevron-down text-xs text-slate-400 transition-transform duration-300 faq-icon"></i>
      </button>
      <div class="faq-answer hidden px-6 pb-5 text-slate-600 text-sm leading-relaxed border-t border-slate-100 pt-4">
        <?php echo htmlspecialchars($f['a']); ?>
      </div>
    </div>
    <?php endforeach; ?>
  </div>

  <!-- CTA -->
  <div class="glassmorphism rounded-2xl p-8 text-center mt-10 shadow-sm">
    <h3 class="text-lg font-bold text-slate-900 mb-2">Still have questions?</h3>
    <p class="text-slate-600 text-sm mb-5">Our support team is available 24/7 and ready to help you with anything.</p>
    <a href="<?php echo $site_data['web_url']; ?>/contact" class="inline-flex items-center gap-2 bg-primary hover:bg-primary-light text-white font-bold text-sm px-6 py-3 rounded-xl transition-all shadow-glow-purple">
      <i class="fa-solid fa-headset"></i> Contact Support
    </a>
  </div>
</section>

<script>
function toggleFaq(btn) {
  var answer = btn.nextElementSibling;
  var icon = btn.querySelector('.faq-icon');
  var isOpen = !answer.classList.contains('hidden');
  // Close all
  document.querySelectorAll('.faq-answer').forEach(function(a){ a.classList.add('hidden'); });
  document.querySelectorAll('.faq-icon').forEach(function(i){ i.style.transform = ''; });
  // Open clicked if was closed
  if (!isOpen) {
    answer.classList.remove('hidden');
    icon.style.transform = 'rotate(180deg)';
  }
}
</script>

<?php include('include/footer.php'); ?>
