<?php
$phone = '7837335599';
$email = 'info@propertyinpanchkula.com';
$whatsapp = '917837335599';
$areas = ['Sector 1 to 12', 'Sector 23 to 25', 'Sector 27 and 28', 'MDC Panchkula', 'Peer Muchalla', 'Pinjore Road', 'Dharampur Colony'];
$status = $_GET['status'] ?? '';
?>
<!doctype html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <title>Contact Us | Property in Panchkula</title>
  <link rel="stylesheet" href="assets/css/panchkula.css">
</head>
<body>
  <div class="cursor-glow" aria-hidden="true"></div>
  <header class="site-header">
    <a class="brand" href="index.php"><img src="images/header-logo2.svg" alt="Property in Panchkula"></a>
    <nav class="main-nav" aria-label="Main navigation">
      <div class="nav-item"><a href="index.php">Home</a></div>
      <div class="nav-item"><a href="projects.php">Projects</a></div>
      <div class="nav-item"><a href="local-listings.php">Properties</a></div>
      <div class="nav-item"><a href="blogs.php">Blogs</a></div>
      <div class="nav-item"><a href="about.php">About Us</a></div>
      <div class="nav-item"><a href="post-property.php">Post Property</a></div>
    </nav>
    <button class="menu-toggle" type="button" aria-label="Open menu" aria-expanded="false"><span></span><span></span><span></span></button>
    <div class="header-actions">
      <a class="icon-link" href="dashboard.php">Login / Register</a>
      <a class="header-call" href="tel:<?= htmlspecialchars($phone) ?>"><?= htmlspecialchars($phone) ?></a>
    </div>
  </header>

  <main>
    <section class="contact-section refined-contact">
      <div class="contact-copy reveal is-visible">
        <p class="eyebrow">Contact Us</p>
        <h1>Tell us what you need in Panchkula</h1>
        <p>Share your buying, renting, selling, or listing requirement. We will respond with practical locality, budget, and property guidance.</p>

        <div class="contact-methods">
          <a href="tel:<?= htmlspecialchars($phone) ?>">
            <span>Call</span>
            <strong><?= htmlspecialchars($phone) ?></strong>
          </a>
          <a href="https://wa.me/<?= htmlspecialchars($whatsapp) ?>" target="_blank" rel="noopener">
            <span>WhatsApp</span>
            <strong>Send enquiry</strong>
          </a>
          <a href="mailto:<?= htmlspecialchars($email) ?>">
            <span>Email</span>
            <strong><?= htmlspecialchars($email) ?></strong>
          </a>
        </div>
      </div>

      <form class="contact-form refined-contact-form reveal is-visible" action="submit_enquiry.php" method="post">
        <input type="hidden" name="source" value="contact">
        <div class="form-card-title">
          <p class="eyebrow">Requirement Form</p>
          <h2>Send your details</h2>
        </div>
        <?php if ($status === 'sent'): ?>
          <div class="inline-alert">Requirement sent. We will contact you shortly.</div>
        <?php elseif ($status === 'missing'): ?>
          <div class="inline-alert">Please fill name, phone and requirement.</div>
        <?php endif; ?>
        <div class="form-row">
          <label>
            <span>Your name</span>
            <input name="name" type="text" placeholder="Enter name" required>
          </label>
          <label>
            <span>Phone number</span>
            <input name="phone" type="tel" placeholder="Enter phone" required>
          </label>
        </div>
        <div class="form-row">
          <label>
            <span>Email address</span>
            <input name="email" type="email" placeholder="Optional">
          </label>
          <label>
            <span>Preferred area</span>
            <select name="area">
              <?php foreach ($areas as $area): ?>
                <option><?= htmlspecialchars($area) ?></option>
              <?php endforeach; ?>
            </select>
          </label>
        </div>
        <label>
          <span>Requirement</span>
          <textarea name="message" rows="6" placeholder="Budget, property type, bedrooms, timeline, or listing details" required></textarea>
        </label>
        <button type="submit">Send Requirement</button>
      </form>
    </section>

    <section class="section band">
      <div class="section-heading reveal is-visible">
        <p class="eyebrow">Local support</p>
        <h2>Get help for buying, renting or listing property</h2>
        <p>Tell us the Panchkula sector, budget, property type and timeline. We will use those details to guide your enquiry properly.</p>
      </div>
      <div class="service-grid">
        <a class="service-card reveal is-visible" href="local-listings.php">
          <h3>Browse Listings</h3>
          <p>Check available local listings before sending your requirement.</p>
        </a>
        <a class="service-card reveal is-visible" href="post-property.php">
          <h3>Post Property</h3>
          <p>Create an owner or agent account and publish your property details.</p>
        </a>
      </div>
    </section>
  </main>

  <footer class="site-footer">
    <div>
      <a class="footer-brand" href="index.php">Property in Panchkula</a>
      <p>Direct contact support for Panchkula property buyers, owners, agents and tenants.</p>
    </div>
    <div>
      <h3>Quick Links</h3>
      <a href="about.php">About</a>
      <a href="projects.php">Projects</a>
      <a href="local-listings.php">Local Listings</a>
      <a href="post-property.php">Post Property</a>
    </div>
    <div>
      <h3>Contact</h3>
      <a href="tel:<?= htmlspecialchars($phone) ?>"><?= htmlspecialchars($phone) ?></a>
      <a href="mailto:<?= htmlspecialchars($email) ?>"><?= htmlspecialchars($email) ?></a>
      <a href="https://wa.me/<?= htmlspecialchars($whatsapp) ?>">WhatsApp enquiry</a>
    </div>
  </footer>

  <script src="assets/js/panchkula.js"></script>
</body>
</html>
