<?php
$freeQuoteFormId = $freeQuoteFormId ?? 'quote';
$freeQuoteDefaultService = $freeQuoteDefaultService ?? 'book-publishing';

if (!isset($serviceMenuItems)) {
  require __DIR__ . '/services-menu.php';
}
?>

<section class="free-quote" id="<?= htmlspecialchars($freeQuoteFormId) ?>">
  <div class="container">
    <div class="row free-quote-row">
      <div class="col-lg-5">
        <div class="free-quote-content">
          <h2 class="free-quote-title">Get Your <br><em>Free Quote Today!</em></h2>

          <div class="free-quote-intro-wrap">
            <div class="free-quote-intro-line" aria-hidden="true"></div>
            <p class="free-quote-intro">We are the USA's top-rated book writing company that brings your untold story out and dumps your literary woes by providing affordable ghostwriting and publishing services.</p>
          </div>

          <h3 class="free-quote-subtitle">What to expect?</h3>

          <ul class="free-quote-list">
            <li>30 minute one-to-one idea validation and Q&amp;A.</li>
            <li>Project consultation with a clear execution roadmap.</li>
            <li>Personalized solutions and estimated quote for your book.</li>
            <li>Results require investment, so we can chat when you're ready.</li>
          </ul>
        </div>
      </div>

      <div class="col-lg-7">
        <form class="free-quote-form" action="#" method="post">
          <div class="row g-4">
            <div class="col-md-6">
              <label class="free-quote-label" for="<?= $freeQuoteFormId ?>-name">Your Name</label>
              <input class="free-quote-input" type="text" id="<?= $freeQuoteFormId ?>-name" name="name" placeholder="William Jacob">
            </div>
            <div class="col-md-6">
              <label class="free-quote-label" for="<?= $freeQuoteFormId ?>-email">Email</label>
              <input class="free-quote-input" type="email" id="<?= $freeQuoteFormId ?>-email" name="email" placeholder="www.william.Jacob@gmail.com">
            </div>
            <div class="col-md-6">
              <label class="free-quote-label" for="<?= $freeQuoteFormId ?>-phone">Phone</label>
              <input class="free-quote-input" type="tel" id="<?= $freeQuoteFormId ?>-phone" name="phone" placeholder="+1 (123) 456 789">
            </div>
            <div class="col-md-6">
              <label class="free-quote-label" for="<?= $freeQuoteFormId ?>-service">Service Interested in</label>
              <div class="free-quote-select-wrap">
                <select class="free-quote-input free-quote-select" id="<?= $freeQuoteFormId ?>-service" name="service">
                  <?php foreach ($serviceMenuItems as $item): ?>
                  <option value="<?= htmlspecialchars($item['slug']) ?>"<?= $freeQuoteDefaultService === $item['slug'] ? ' selected' : '' ?>><?= htmlspecialchars($item['label']) ?></option>
                  <?php endforeach; ?>
                </select>
              </div>
            </div>
            <div class="col-12">
              <label class="free-quote-label" for="<?= $freeQuoteFormId ?>-message">Your Message</label>
              <textarea class="free-quote-input free-quote-textarea" id="<?= $freeQuoteFormId ?>-message" name="message" rows="5" placeholder="Enter Your Message Here"></textarea>
            </div>
            <div class="col-12">
              <button class="btn btn-primary free-quote-submit" type="submit">Start Your Publishing Journey</button>
            </div>
          </div>
        </form>
      </div>
    </div>
  </div>
</section>
