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

$seo = [
    'title' => 'Free Property Valuation | ' . SITE_NAME,
    'description' => 'Request a free, data-backed valuation of your property in Kigali or anywhere in Rwanda — delivered within 48 hours.',
    'path' => '/valuation',
];
include __DIR__ . '/includes/header.php';
?>
<section class="section-pad-sm">
  <div class="container-narrow">
    <?= breadcrumb_html([['name' => 'Request a Valuation', 'url' => '/valuation']]) ?>
    <div class="section-head center">
      <div class="eyebrow" style="justify-content:center;">Free Valuation</div>
      <h1>What's Your Property Worth Today?</h1>
      <p>Get a free, no-obligation valuation from our advisors, backed by current district-level sales data. Most valuations are delivered within 48 hours.</p>
    </div>

    <div class="form-card reveal">
      <form data-ajax action="/api/valuation.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-row mb-4">
          <div class="field"><label for="phone">Phone / WhatsApp</label><input type="tel" id="phone" name="phone" required></div>
          <div class="field">
            <label for="property_type">Property Type</label>
            <select id="property_type" name="property_type">
              <?php foreach (get_categories() as $c): ?><option><?= e($c['name']) ?></option><?php endforeach; ?>
            </select>
          </div>
        </div>
        <div class="field mb-4">
          <label for="address">Property Address</label>
          <input type="text" id="address" name="address" placeholder="e.g. Kibagabaga, Gasabo, Kigali" required>
        </div>
        <div class="field mb-4">
          <label for="notes">Additional Notes (size, bedrooms, condition)</label>
          <textarea id="notes" name="notes"></textarea>
        </div>
        <button type="submit" class="btn btn-accent btn-block">Request Free Valuation</button>
      </form>
    </div>
  </div>
</section>
<?php include __DIR__ . '/includes/footer.php'; ?>
