<?php
require_once 'includes/config.php';
$pageTitle  = 'Sponsorship Opportunities | 20th Kenya Expo 2026';
$pageDesc   = 'Become a sponsor of the 20th Kenya Expo 2026. Title, Gold, Silver and Bronze sponsorship packages. Maximum brand exposure to 35,000+ trade visitors in Nairobi.';
$images     = readJSON(IMAGES_FILE);
$tiers      = readJSON(SPONSORSHIP_FILE);
$activeTiers = array_filter($tiers, fn($t) => !empty($t['active']));
usort($activeTiers, fn($a,$b) => ($a['sort_order']??0) <=> ($b['sort_order']??0));
require_once 'includes/header.php';
?>

<!-- SECTION 1 — HERO -->
<section class="hero-section sponsorship-hero" style="min-height:60vh;">
  <div class="hero-bg" style="background-image: url('<?php echo htmlspecialchars($images['sponsorship_hero'] ?? ''); ?>');"></div>
  <div class="hero-pattern"></div>
  <div class="container hero-content text-center">
    <div class="hero-badge reveal">BECOME A SPONSOR | 20TH KENYA EXPO 2026</div>
    <h1 class="hero-title reveal reveal-delay-1">Sponsorship <span>Opportunities</span></h1>
    <p class="hero-subtitle reveal reveal-delay-2">Amplify Your Brand at Africa's Milestone Trade Event</p>
    <p class="mb-4 reveal reveal-delay-2" style="color:var(--text-muted);max-width:850px;margin:12px auto 0;">Align your brand with East Africa's most trusted trade expo — celebrating its 20th anniversary in 2026. Reach 35,000+ trade visitors, buyers, investors, and government officials from 16+ countries over 4 days in Nairobi.</p>
    <div class="hero-buttons justify-content-center reveal reveal-delay-3">
      <a href="#sponsorship-tiers" class="btn btn-gold btn-lg">View Packages <i class="fas fa-arrow-down ms-2"></i></a>
      <a href="#sponsorship-enquiry" class="btn btn-outline-gold btn-lg">Enquire Now</a>
    </div>
  </div>
</section>

<!-- SECTION 2 — WHY SPONSOR -->
<section class="section-padding">
  <div class="container">
    <div class="text-center reveal">
      <span class="section-label">Benefits</span>
      <h2 class="section-title text-center">Why Sponsor Kenya Expo?</h2>
    </div>
    <div class="row g-4 mt-2">
      <div class="col-md-4 reveal">
        <div class="why-sponsor-card">
          <div class="ws-icon"><i class="fas fa-globe-africa"></i></div>
          <h4>35,000+ Qualified Visitors</h4>
          <p>Reach trade visitors from 16+ countries — buyers, investors, and decision-makers.</p>
        </div>
      </div>
      <div class="col-md-4 reveal reveal-delay-1">
        <div class="why-sponsor-card">
          <div class="ws-icon"><i class="fas fa-wifi"></i></div>
          <h4>Multi-Channel Digital Exposure</h4>
          <p>Website, email, social media &amp; press releases promoting your brand.</p>
        </div>
      </div>
      <div class="col-md-4 reveal reveal-delay-2">
        <div class="why-sponsor-card">
          <div class="ws-icon"><i class="fas fa-microphone"></i></div>
          <h4>Speaking Opportunities</h4>
          <p>Present at high-profile conference sessions alongside industry leaders.</p>
        </div>
      </div>
      <div class="col-md-4 reveal">
        <div class="why-sponsor-card">
          <div class="ws-icon"><i class="fas fa-glass-cheers"></i></div>
          <h4>VIP Networking Access</h4>
          <p>Network with business leaders, government officials, and fellow sponsors.</p>
        </div>
      </div>
      <div class="col-md-4 reveal reveal-delay-1">
        <div class="why-sponsor-card">
          <div class="ws-icon"><i class="fas fa-newspaper"></i></div>
          <h4>Regional &amp; International Media</h4>
          <p>Coverage at media outlets - TV, radio, print, and digital.</p>
        </div>
      </div>
      <div class="col-md-4 reveal reveal-delay-2">
        <div class="why-sponsor-card">
          <div class="ws-icon"><i class="fas fa-award"></i></div>
          <h4>20th Anniversary Prestige</h4>
          <p>Associate your brand with a milestone event - two decades of trade excellence.</p>
        </div>
      </div>
    </div>
  </div>
</section>

<!-- SECTION 3 — SPONSORSHIP TIERS -->
<section class="section-padding section-dark" id="sponsorship-tiers">
  <div class="container">
    <div class="text-center reveal">
      <span class="section-label">Packages</span>
      <h2 class="section-title text-center">Sponsorship Packages</h2>
      <p style="color:var(--text-muted);max-width:600px;margin:12px auto 0;">Four tiers of brand exposure from entry-level to title sponsor</p>
    </div>

    <?php
    $first = true;
    foreach ($activeTiers as $tier):
      $isTitle = $first;
      $first = false;
      $isHighlighted = !empty($tier['highlight']);
    ?>
    <?php if ($isTitle): ?><div class="row mt-4 mb-4"><?php else: ?><?php if ($tier === reset(array_slice($activeTiers, 1))): ?><div class="row g-4"><?php endif; ?><?php endif; ?>
      <div class="<?php echo $isTitle ? 'col-12' : 'col-lg-4'; ?> reveal">
        <div class="spon-card <?php echo $isHighlighted ? 'highlighted' : ''; ?>" data-id="<?php echo htmlspecialchars($tier['id']); ?>">
          <i class="fas <?php echo htmlspecialchars($tier['icon']); ?> spon-icon" style="color:<?php echo htmlspecialchars($tier['color']); ?>"></i>
          <?php if (!empty($tier['badge'])): ?>
          <div class="spon-badge"><?php echo htmlspecialchars($tier['badge']); ?></div>
          <?php endif; ?>
          <h3 class="spon-tier-name"><?php echo htmlspecialchars($tier['tier']); ?></h3>
          <div class="spon-price"><?php echo htmlspecialchars($tier['price_label']); ?></div>
          <div class="spon-note"><?php echo htmlspecialchars($tier['price_note']); ?></div>

          <?php if (isset($tier['slots_available']) && $tier['slots_available'] > 0): ?>
          <div class="slot-indicator">
            <span class="slot-dot"></span>
            <span><?php echo ($tier['slots_available'] - ($tier['slots_taken'] ?? 0)); ?> of <?php echo $tier['slots_available']; ?> available</span>
          </div>
          <?php endif; ?>

          <ul class="spon-benefits">
            <?php foreach ($tier['benefits'] ?? [] as $benefit): ?>
            <li><i class="fas fa-check spon-check"></i><span><?php echo htmlspecialchars($benefit); ?></span></li>
            <?php endforeach; ?>
          </ul>

          <?php if (!empty($tier['visibility_items'])): ?>
          <div class="spon-visibility-pills">
            <?php foreach ($tier['visibility_items'] as $item): ?>
            <span class="pill"><?php echo htmlspecialchars($item); ?></span>
            <?php endforeach; ?>
          </div>
          <?php endif; ?>

          <button class="btn btn-gold w-100 spon-enquire-btn" data-tier="<?php echo htmlspecialchars($tier['tier']); ?>">Become a Sponsor</button>
        </div>
      </div>
    <?php if ($isTitle): ?></div><?php endif; ?>
    <?php endforeach; ?>
    <?php if (!$first): ?></div><?php endif; ?>
  </div>
</section>

<!-- SECTION 4 — AUDIENCE STATS STRIP -->
<section class="section-padding section-darker">
  <div class="container">
    <div class="row g-4 text-center">
      <div class="col-6 col-lg-3 reveal"><div class="stat-item"><div class="stat-number" data-target="35000" data-suffix="+">0</div><div class="stat-label">Visitors</div></div></div>
      <div class="col-6 col-lg-3 reveal reveal-delay-1"><div class="stat-item"><div class="stat-number" data-target="16" data-suffix="+">0</div><div class="stat-label">Countries</div></div></div>
      <div class="col-6 col-lg-3 reveal reveal-delay-2"><div class="stat-item"><div class="stat-number" data-target="200" data-suffix="+">0</div><div class="stat-label">Exhibitors</div></div></div>
      <div class="col-6 col-lg-3 reveal reveal-delay-3"><div class="stat-item"><div class="stat-number" data-target="20" data-suffix=" Years">0</div><div class="stat-label">Anniversary</div></div></div>
    </div>
  </div>
</section>

<!-- SECTION 5 — PAST SPONSORS -->
<!-- <section class="section-padding">
  <div class="container">
    <div class="past-sponsors-strip reveal">
      <span class="section-label">Past Partners</span>
      <h2 class="section-title text-center">Our Partners &amp; Sponsors</h2>
      <div class="sponsor-marquee">
        <?php for ($i = 1; $i <= 8; $i++): ?>
        <div class="sponsor-placeholder">PARTNER <?php echo $i; ?></div>
        <?php endfor; ?>
      </div>
      <p class="mt-4" style="color:var(--text-muted);">Join an elite community of brands that have shaped 20 years of Kenya trade.</p>
    </div>
  </div>
</section> -->

<!-- SECTION 6 — WHAT HAPPENS NEXT -->
<section class="section-padding section-dark">
  <div class="container">
    <div class="text-center reveal">
      <span class="section-label">Process</span>
      <h2 class="section-title text-center">What Happens Next</h2>
    </div>
    <div class="row g-4 mt-4">
      <div class="col-md-4 reveal">
        <div class="step-card">
          <div class="step-number">1</div>
          <div class="step-title">Submit Your Enquiry</div>
          <div class="step-desc">Complete the sponsorship enquiry form below with your details and goals</div>
        </div>
      </div>
      <div class="col-md-4 reveal reveal-delay-1">
        <div class="step-card">
          <div class="step-number">2</div>
          <div class="step-title">Receive Proposal</div>
          <div class="step-desc">Our team contacts you within 24 hours with a tailored sponsorship proposal</div>
        </div>
      </div>
      <div class="col-md-4 reveal reveal-delay-2">
        <div class="step-card">
          <div class="step-number">3</div>
          <div class="step-title">Confirm &amp; Activate</div>
          <div class="step-desc">Confirm your sponsorship and receive your brand activation kit</div>
        </div>
      </div>
    </div>
  </div>
</section>

<!-- SECTION 7 — SPONSORSHIP ENQUIRY FORM -->
<section class="section-padding" id="sponsorship-enquiry">
  <div class="container">
    <div class="row justify-content-center">
      <div class="col-lg-8 reveal">
        <div class="glass-card">
          <div class="text-center mb-4">
            <span class="section-label">Apply</span>
            <h3>Become a Sponsor</h3>
            <p style="color:var(--text-muted);font-size:0.9rem;">Submit your sponsorship enquiry and our partnerships team will respond within 24 hours.</p>
          </div>
          <form data-ajax="true">
            <input type="hidden" name="type" value="sponsor">
            <input type="hidden" name="_csrf" value="<?php echo generateCSRF(); ?>">
            <div class="row g-3">
              <div class="col-md-6">
                <label class="form-label">Full Name <span class="required">*</span></label>
                <input type="text" name="name" class="form-control" required>
              </div>
              <div class="col-md-6">
                <label class="form-label">Job Title <span class="required">*</span></label>
                <input type="text" name="job_title" class="form-control" required>
              </div>
              <div class="col-md-6">
                <label class="form-label">Company Name <span class="required">*</span></label>
                <input type="text" name="company" class="form-control" required>
              </div>
              <div class="col-md-6">
                <label class="form-label">Company Website</label>
                <input type="url" name="website" class="form-control" placeholder="https://">
              </div>
              <div class="col-md-6">
                <label class="form-label">Email <span class="required">*</span></label>
                <input type="email" name="email" class="form-control" required>
              </div>
              <div class="col-md-6">
                <label class="form-label">Phone <span class="required">*</span></label>
                <input type="tel" name="phone" class="form-control" required>
              </div>
              <div class="col-md-6">
                <label class="form-label">Country <span class="required">*</span></label>
                <select name="country" class="form-select" required>
                  <option value="">Select...</option>
                  <option>Kenya</option><option>Uganda</option><option>Tanzania</option><option>Rwanda</option>
                  <option>Ethiopia</option><option>Nigeria</option><option>South Africa</option>
                  <option>UAE</option><option>India</option><option>China</option><option>UK</option>
                  <option>USA</option><option>Germany</option><option>Other</option>
                </select>
              </div>
              <div class="col-md-6">
                <label class="form-label">Sponsorship Tier Interest <span class="required">*</span></label>
                <select name="interest" class="form-select" id="sponEnquiryTier" required>
                  <option value="">Select...</option>
                  <option>Title Sponsor</option>
                  <option>Gold Sponsor</option>
                  <option>Silver Sponsor</option>
                  <option>Bronze Sponsor</option>
                </select>
              </div>
              <div class="col-12">
                <label class="form-label">Sponsorship Goals</label>
                <textarea name="message" class="form-control" rows="3" placeholder="What are your brand objectives for sponsoring Kenya Expo 2026?"></textarea>
              </div>
              <div class="col-md-6">
                <label class="form-label">Budget Range</label>
                <select name="budget" class="form-select">
                  <option value="">Prefer not to say</option>
                  <option>Under $10,000</option>
                  <option>$10,000 - $20,000</option>
                  <option>$20,000 - $30,000</option>
                  <option>$30,000+</option>
                </select>
              </div>
            </div>
            <div class="text-center mt-4">
              <button type="submit" class="btn btn-gold btn-lg">Submit Sponsorship Enquiry</button>
            </div>
          </form>
        </div>
      </div>
    </div>
  </div>
</section>

<?php require_once 'includes/footer.php'; ?>
