<?php
require_once __DIR__ . '/includes/functions.php';
require_once __DIR__ . '/includes/seo.php';

$seo = [
    'title' => 'VIP Property Alerts | ' . SITE_NAME,
    'description' => 'Subscribe to VIP Property Alerts and be the first to know when a new listing matching your budget, district and property type goes live.',
    'path' => '/vip-alerts',
];
include __DIR__ . '/includes/header.php';
?>
<section class="hero" style="min-height:50vh;">
  <div class="hero-media"><img src="/assets/images/properties/villa-ext-d.jpg" alt="Luxury villa with pool representing VIP property opportunities" fetchpriority="high"></div>
  <div class="container hero-content">
    <div class="eyebrow" style="color:var(--color-accent-light);">VIP Property Alerts</div>
    <h1>Be First to Know. Free, Always.</h1>
    <p class="lede">Set your budget, preferred districts and property type — we'll notify you the moment a matching listing is added, before it goes to the general public.</p>
  </div>
</section>

<section class="section-pad">
  <div class="container-narrow">
    <div class="form-card reveal">
      <form data-ajax action="/api/vip-alerts.php" method="post">
        <input type="text" name="website" class="visually-hidden" tabindex="-1" autocomplete="off">
        <div class="field-row mb-4">
          <div class="field"><label for="name">Full Name</label><input type="text" id="name" name="name" required></div>
          <div class="field"><label for="email">Email</label><input type="email" id="email" name="email" required></div>
        </div>
        <div class="field mb-4"><label for="phone">Phone / WhatsApp (optional)</label><input type="tel" id="phone" name="phone"></div>
        <div class="field-row mb-4">
          <div class="field"><label for="budget_min">Min Budget (RWF)</label><input type="number" id="budget_min" name="budget_min"></div>
          <div class="field"><label for="budget_max">Max Budget (RWF)</label><input type="number" id="budget_max" name="budget_max"></div>
        </div>
        <div class="field-row mb-4">
          <div class="field">
            <label for="property_type">Property Type</label>
            <select id="property_type" name="property_type">
              <option value="">Any Type</option>
              <?php foreach (get_categories() as $c): ?><option><?= e($c['name']) ?></option><?php endforeach; ?>
            </select>
          </div>
          <div class="field">
            <label for="district">Preferred District</label>
            <select id="district" name="district">
              <option value="">Any District</option>
              <?php foreach (get_districts() as $d): ?><option><?= e($d['name']) ?></option><?php endforeach; ?>
            </select>
          </div>
        </div>
        <button type="submit" class="btn btn-accent btn-block">Join VIP Property Alerts</button>
        <p class="text-xs text-muted mt-3">Free forever. Unsubscribe anytime. We never share your details with third parties.</p>
      </form>
    </div>
  </div>
</section>
<?php include __DIR__ . '/includes/footer.php'; ?>
