<?php
// footer.php
// Generate a math captcha
$num1 = rand(1, 9);
$num2 = rand(1, 9);
$captchaSum = $num1 + $num2;
?>
<footer class="footer">
<div class="container">
<div class="row g-4">
<div class="col-lg-3 col-md-6">
<div class="footer-widget">
<h4>About ITMeerut</h4>
<p style="color:rgba(255,255,255,.7);font-size:14px;line-height:1.8">ITMeerut is the leading computer training institute in Meerut offering professional IT courses with placement assistance since 2010. Join us to build a successful career.</p>
<div class="social-links">
<a href="#" aria-label="Facebook"><i class="fab fa-facebook-f"></i></a>
<a href="#" aria-label="Instagram"><i class="fab fa-instagram"></i></a>
<a href="#" aria-label="Twitter"><i class="fab fa-twitter"></i></a>
<a href="#" aria-label="YouTube"><i class="fab fa-youtube"></i></a>
<a href="#" aria-label="LinkedIn"><i class="fab fa-linkedin-in"></i></a>
</div>
</div>
</div>
<div class="col-lg-3 col-md-6">
<div class="footer-widget">
<h4>Quick Links</h4>
<ul class="footer-links">
<li><a href="/"><i class="fas fa-chevron-right"></i> Home</a></li>
<li><a href="/about/"><i class="fas fa-chevron-right"></i> About Us</a></li>
<li><a href="/courses/"><i class="fas fa-chevron-right"></i> All Courses</a></li>
<li><a href="/gallery/"><i class="fas fa-chevron-right"></i> Gallery</a></li>
<li><a href="/contact/"><i class="fas fa-chevron-right"></i> Contact Us</a></li>
<li><a href="/best-institute-in-meerut/"><i class="fas fa-chevron-right"></i> Best Institute in Meerut</a></li>
</ul>
</div>
</div>
<div class="col-lg-3 col-md-6">
<div class="footer-widget">
<h4>Popular Courses</h4>
<ul class="footer-links">
<li><a href="/python-course-in-meerut/"><i class="fas fa-chevron-right"></i> Python Programming</a></li>
<li><a href="/digital-marketing-course-in-meerut/"><i class="fas fa-chevron-right"></i> Digital Marketing</a></li>
<li><a href="/web-designing-course-in-meerut/"><i class="fas fa-chevron-right"></i> Web Designing</a></li>
<li><a href="/tally-course-in-meerut/"><i class="fas fa-chevron-right"></i> Tally with GST</a></li>
<li><a href="/ccc-institute-in-meerut/"><i class="fas fa-chevron-right"></i> CCC Course</a></li>
<li><a href="/graphic-designing-course-in-meerut/"><i class="fas fa-chevron-right"></i> Graphic Designing</a></li>
</ul>
</div>
</div>
<div class="col-lg-3 col-md-6">
<div class="footer-widget">
<h4>Contact Info</h4>
<ul class="footer-contact">
<li><i class="fas fa-map-marker-alt"></i><span>Meerut, Uttar Pradesh, India</span></li>
<li><i class="fas fa-phone"></i><span><a href="tel:+919368613710" style="color:rgba(255,255,255,.7);text-decoration:none">+91 93686 13710</a></span></li>
<li><i class="fas fa-envelope"></i><span><a href="mailto:info@itmeerut.com" style="color:rgba(255,255,255,.7);text-decoration:none">info@itmeerut.com</a></span></li>
<li><i class="fas fa-clock"></i><span>Mon - Sat: 8:00 AM - 8:00 PM</span></li>
</ul>
</div>
</div>
</div>
<div class="footer-bottom">
<p>Copyright 2024 ITMeerut. All Rights Reserved. | <a href="/privacy-policy/" style="color:rgba(255,255,255,.5)">Privacy Policy</a> | <a href="/terms-conditions/" style="color:rgba(255,255,255,.5)">Terms & Conditions</a></p>
</div>
</div>
</footer>
<div class="floating-buttons">
<a href="https://wa.me/919368613710?text=Hi%20ITMeerut%2C%20I%20am%20interested%20in%20your%20courses" class="float-btn float-whatsapp" target="_blank" rel="noopener" aria-label="WhatsApp">
<i class="fab fa-whatsapp"></i>
<span class="float-tooltip">Chat on WhatsApp</span>
</a>
<a href="tel:+919368613710" class="float-btn float-call" aria-label="Call Us">
<i class="fas fa-phone"></i>
<span class="float-tooltip">Call Us Now</span>
</a>
</div>
<button class="back-to-top" id="backToTop" aria-label="Back to Top"><i class="fas fa-arrow-up"></i></button>

<!-- Free Demo / Contact Modal -->
<div class="modal fade custom-modal" id="demoModal" tabindex="-1" aria-hidden="true">
  <div class="modal-dialog modal-dialog-centered">
    <div class="modal-content">
      <div class="modal-header">
        <h5 class="modal-title">Book a Free Demo Class</h5>
        <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
      </div>
      <div class="modal-body">
        <form id="demoForm">
          <div class="mb-3">
            <label for="studentName" class="form-label">Student Name</label>
            <input type="text" class="form-control" id="studentName" required placeholder="Enter your full name">
          </div>
          <div class="mb-3">
            <label for="studentPhone" class="form-label">Phone Number</label>
            <input type="tel" class="form-control" id="studentPhone" required placeholder="Enter 10 digit number" pattern="[0-9]{10}">
          </div>
          <div class="mb-3">
            <label for="studentCourse" class="form-label">Select Course</label>
            <select class="form-select" id="studentCourse" required>
              <option value="" selected disabled>Choose a course...</option>
              <option value="Python">Python Programming</option>
              <option value="Digital Marketing">Digital Marketing</option>
              <option value="Web Designing">Web Designing</option>
              <option value="Tally">Tally with GST</option>
              <option value="CCC">CCC Course</option>
              <option value="O Level">O Level</option>
              <option value="Graphic Designing">Graphic Designing</option>
              <option value="Other">Other</option>
            </select>
          </div>
          <div class="mb-4">
            <label class="form-label">Human Verification</label>
            <div class="captcha-container">
              <span class="captcha-question"><?php echo $num1; ?> + <?php echo $num2; ?> = ?</span>
              <input type="number" class="form-control" id="captchaAnswer" required placeholder="Answer" style="flex:1;">
              <input type="hidden" id="captchaExpected" value="<?php echo $captchaSum; ?>">
            </div>
          </div>
          <button type="submit" class="btn btn-primary w-100 py-3" style="border-radius:10px; font-weight:700; background:var(--gold); color:var(--navy); border:none;">Submit Request</button>
        </form>
      </div>
    </div>
  </div>
</div>

<script src="https://code.jquery.com/jquery-3.7.1.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js"></script>
<script>
$(window).scroll(function(){if($(this).scrollTop()>50){$('#navbar').addClass('scrolled');$('#backToTop').addClass('show')}else{$('#navbar').removeClass('scrolled');$('#backToTop').removeClass('show')}});
$('#backToTop').click(function(){$('html,body').animate({scrollTop:0},800)});

// Popup Logic
$('.trigger-demo-popup, .hero-btn-secondary[href="contact.html"], a[href="contact.html"]:contains("Demo")').on('click', function(e) {
    e.preventDefault();
    $('#demoModal').modal('show');
});

$('#demoForm').on('submit', function(e) {
    e.preventDefault();
    var expected = parseInt($('#captchaExpected').val());
    var answer = parseInt($('#captchaAnswer').val());
    if (answer !== expected) {
        alert("Incorrect Captcha Answer. Please try again.");
        return;
    }
    // Form is valid
    alert("Thank you! Your request for demo has been received. Our team will contact you shortly.");
    $('#demoModal').modal('hide');
    this.reset();
});
</script>
</body>
</html>
