<?php
/**
 * Shared page footer. Expected variables (set before including this file):
 *   $isHome         - bool, optional (default false). true only for index.php.
 *   $ctaHeading     - string, optional. Headline shown in the CTA band above the footer.
 *   $ctaButtonText  - string, optional (default 'Request Proposal'). Ignored when $isHome.
 *   $ctaHref        - string, optional (default 'contact.php'). Ignored when $isHome.
 *   $extraBodyHtml  - string, optional. Raw HTML inserted just before the closing scripts
 *                     (used by careers.php / our-openings.php for their "Apply" modal).
 */
if (!isset($isHome)) { $isHome = false; }
if (!isset($ctaHeading)) { $ctaHeading = 'Partner With Research Experts'; }
if (!isset($ctaButtonText)) { $ctaButtonText = 'Request Proposal'; }
if (!isset($ctaHref)) { $ctaHref = 'contact.php'; }
if (!isset($extraBodyHtml)) { $extraBodyHtml = ''; }
require_once __DIR__ . '/config.php';
?>

  <!-- ============ CTA ============ -->
  <section class="cta-band">
    <?php if (!$isHome): ?>
    <div class="angle l"></div><div class="angle r"></div>
    <?php endif; ?>
    <div class="container reveal">
      <h2><?php echo $ctaHeading; ?></h2>
      <?php if ($isHome): ?>
      <a id="openModalBtn" href="javascript:void(0);" class="btn-gx mx-auto" data-bs-toggle="modal" data-bs-target="#gxModal">
        Request Proposal
      </a>
      <?php else: ?>
      <a href="<?php echo $ctaHref; ?>" class="btn-gx mx-auto"><?php echo $ctaButtonText; ?></a>
      <?php endif; ?>
    </div>
  </section>

   <!-- FOOTER -->
  <footer class="footer" id="footer">
    <div class="container">
      <div class="row g-5">
        <div class="col-lg-6">
          <img src="images/logo.png" alt="Globinex Research" class="f-logo" />
          <div class="f-contact"><i class="bi bi-geo-alt-fill"></i> <a href="https://maps.google.com/?q=C1+Building+Ajman+United+Arab+Emirates" target="_blank" rel="noopener noreferrer" class="text-decoration-none text-reset" style="font-size: 16px;">
        C1, 1F - SF14129, C1 Building, Ajman, United Arab Emirates.
    </a></div>
         <div class="f-contact">
    <i class="bi bi-envelope-fill"></i>
    <a href="mailto:info@globinexresearch.com" class="text-decoration-none text-reset">info@globinexresearch.com</a>
</div>
        </div>
        <div class="col-6 col-lg-3">
          <h5>EXPLORE</h5>
          <a class="f-link" href="about.php">About GXR</a>
          <a class="f-link" href="solutions.php">Solutions</a>
          <a class="f-link" href="case-studies.php">Case Studies</a>
          <a class="f-link" href="careers.php">Join the GXR Team</a>
          <a class="f-link" href="blog/">Blog</a>
        </div>
        <div class="col-6 col-lg-3">
          <h5>OUR SERVICES</h5>
          <a class="f-link" href="capi-computer-assisted-personal-interviewing.php">CAPI</a>
          <a class="f-link" href="cati-computer-assisted-telephonic-interviewing.php">CATI</a>
          <a class="f-link" href="online-services-cawi.php">Online Services</a>
          <a class="f-link" href="idi-in-depth-interviews.php">IDI</a>
        </div>
        <!-- Newsletter block commented out for now per client request (will use in future) -->
        <!--
        <div class="col-lg-4">
          <h5>Newsletter</h5>
          <p class="f-news">Don't miss the latest news</p>
          <form class="news-form" onsubmit="return false;"><input type="email" placeholder="Enter email..." /><button type="submit"><i class="bi bi-arrow-right"></i></button></form>
        </div>
        -->
      </div>
      <div class="footer-bottom d-flex justify-content-between align-items-center flex-wrap gap-3">
    <div class="copy">
        © 2026, All Right Reserved | Globinex Research
    </div>

    <div class="footer-legal-links d-flex gap-3">
        <a href="terms-and-conditions.php" class="text-decoration-none text-white">Terms & Conditions</a>
        <span>|</span>
        <a href="privacy-policy.php" class="text-decoration-none text-white">Privacy Policy</a>
    </div>

    <div class="d-flex gap-3">
        <a class="social-ic" href="https://wa.me/971551950499" target="_blank" rel="noopener noreferrer" aria-label="Chat with us on WhatsApp"><i class="bi bi-whatsapp"></i></a>
        <a class="social-ic" href="https://www.linkedin.com/company/globinex-research/" target="_blank" rel="noopener noreferrer" aria-label="Globinex Research on LinkedIn"><i class="bi bi-linkedin"></i></a>
        <a class="social-ic" href="https://www.instagram.com/globinex-research/" target="_blank" rel="noopener noreferrer" aria-label="Globinex Research on Instagram"><i class="bi bi-instagram"></i></a>
    </div>
</div>
    </div>
  </footer>

  <?php if ($isHome): ?>
 <!-- Request Proposal Bootstrap Modal -->
<div class="modal fade" id="gxModal" tabindex="-1" aria-labelledby="gxModalTitle" aria-hidden="true">
  <div class="modal-dialog modal-dialog-centered">
    <div class="modal-content p-3">

      <!-- Modal Header -->
      <div class="modal-header border-0 p-0">
        <div>
          <h3 class="modal-title h5 fw-bold" id="gxModalTitle">Request a Proposal</h3>

        </div>
        <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
      </div>

      <!-- Modal Body -->
      <div class="modal-body">
        <form id="gxProposalForm" class="modal-form" novalidate>
          <div class="row g-3">

            <div class="col-12">
              <label class="form-label fw-medium">Full Name</label>
              <input class="form-control gx-input" type="text" name="name" required placeholder="Your full name">
            </div>

            <div class="col-md-6">
              <label class="form-label fw-medium">Email Address</label>
              <input class="form-control gx-input" type="email" name="email" required placeholder="you@company.com">
            </div>

            <div class="col-md-6">
              <label class="form-label fw-medium">Phone Number</label>
              <input class="form-control gx-input" type="tel" name="phone" placeholder="+1 555 555 5555">
            </div>

            <div class="col-12">
              <label class="form-label fw-medium">Comments / Message</label>
              <textarea class="form-control gx-input" name="message" rows="4" placeholder="Tell us about your research..."></textarea>
            </div>

            <div class="col-12">
              <div class="g-recaptcha" data-sitekey="<?php echo GX_RECAPTCHA_SITE_KEY; ?>"></div>
            </div>

          </div>

          <div class="mt-4 d-flex justify-content-end">
            <button type="submit" class="btn-gx" id="gxSendBtn">Send <i class="bi bi-arrow-right"></i></button>
          </div>
        </form>

        <div class="modal-feedback mt-2" id="gxModalFeedback" role="status" aria-live="polite"></div>
      </div>

    </div>
  </div>
</div>
  <?php endif; ?>

  <?php echo $extraBodyHtml; ?>

  <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js"></script>
  <script src="https://www.google.com/recaptcha/api.js" async defer></script>
  <script src="js/custom.js"></script>
  <?php if ($isHome): ?>
  <script src="js/trust.js"></script>
  <?php else: ?>
  <script src="js/pages.js"></script>
  <?php endif; ?>
</body>
</html>
