  <!-- footer area -->
  <?php
    include("admin/connection.php");
    ?>

  <!--icon desktop whatsapp-->
  <div class="floating_btn phone">
      <a href="tel:+919812390615" target="_blank">
          <div class="contact_icon phone">
              <i class="fa fa-phone" aria-hidden="true"></i>
          </div>
      </a>
  </div>

  <div class="floating_btn whatsapp">
      <a href="https://wa.link/p0ocf9" target="_blank">
          <div class="contact_icon whatsapp">
              <i class="fab fa-whatsapp"></i>
          </div>
      </a>
  </div>

  <!--end desktop whatsapp-->

  <!--mobile view whatsapp -->
  <div id="callbook">
      <ul>
          <li style="background:#00b451;">
              <a href="https://wa.link/p0ocf9" target="_blank" title="WhatsApp">
                  <i class="fab fa-whatsapp"></i> Chat With Us
              </a>
          </li>
          <li style="background:#064391;">
              <a href="tel:+919812390615" title="Call Us">
                  <i class="fa fa-phone"></i> Click To Call
              </a>
          </li>
      </ul>
  </div>

  <!-- end mobile view  -->

  <footer class="footer-wrapper footer-layout1">
      <div class="widget-area">
          <div class="container">
              <div class="row">
                  <?php
          // header info (logo / phone / email / address)
          $query = "SELECT * FROM `header` LIMIT 1";
          $sql = mysqli_query($con, $query);
          $headerRow = mysqli_fetch_assoc($sql);
        ?>
                  <!-- ABOUT / LOGO -->
                  <div class="col-lg-3">
                      <div class="widget footer-widget">
                          <div class="about-logo mb-3">
                              <a href="<?php path() ?>/index.php">
                                  <img src="<?php path(); ?>/admin/assets/images/slider/<?php echo htmlspecialchars($headerRow['logo']); ?>"
                                      alt="ND We Make">
                              </a>
                          </div>
                          <div class="th-widget-about">
                             
                              <p class="about-text">
                                  <strong>ND We Make Windows</strong> is a trusted manufacturer of
                                  <strong>uPVC & Aluminium Doors and Windows</strong>, offering premium
                                  interior and modular kitchen solutions.
                                  Based in <strong>Noida, Sector 10</strong>, we deliver modern, durable,
                                  and energy-efficient designs that redefine comfort and style.
                              </p>

                              <div class="social-block">
                                
                                  <div class="th-social">
                                      <a href="https://www.facebook.com/" aria-label="Facebook" target="_blank"><i
                                              class="fab fa-facebook-f"></i></a>
                                      <a href="https://www.instagram.com/" aria-label="Instagram" target="_blank"><i
                                              class="fa-brands fa-instagram"></i></a>
                                      <a href="https://www.twitter.com/" aria-label="Twitter" target="_blank"><i
                                              class="fa-brands fa-x-twitter"></i></a>
                                      <a href="https://www.linkedin.com/" aria-label="LinkedIn" target="_blank"><i
                                              class="fab fa-linkedin-in"></i></a>
                                      <a href="https://www.youtube.com/" aria-label="YouTube" target="_blank"><i
                                              class="fa-brands fa-youtube"></i></a>
                                  </div>
                              </div>
                          </div>

                          
                      </div>
                  </div>

                  <!-- QUICK LINKS (was UPVC Doors) -->
                  <div class="col-lg-3">
                      <div class="footer-item">
                          <div class="widget widget_nav_menu footer-widget">
                              <h3 class="widget_title">Quick Links</h3>
                              <div class="menu-all-pages-container">
                                  <ul class="menu quick-links-list">
                                      <!-- Static main menu links -->
                                      <li><a href="index.php">Home</a></li>
                                      <li><a href="about.php">About Us</a></li>
                                      <li><a href="upvc-doors-windows.php">uPVC Doors & Windows</a></li>
                                      <li><a href="aluminium-products.php">Aluminium Products</a></li>
                                      <li><a href="aluminium-products.php">Interior Solutions</a></li>
                                      <li><a href="gallery.php">Gallery</a></li>
                                      <li><a href="blog.php">News & Blog</a></li>
                                      <li><a href="contact.php">Contact Us</a></li>


                                  </ul>
                              </div>
                          </div>
                      </div>
                  </div>

                  <!-- CONTACT NOW (improved visual) -->
                  <div class="col-lg-3 col-md-6">
                      <div class="footer-item">
                          <aside class="widget widget_contact footer-widget contact-now-card"
                              aria-labelledby="footer-contact-now">
                              <h3 id="footer-contact-now" class="widget_title">Contact Now</h3>

                              <div class="contact-now">
                                  <!-- Phone -->
                                  <div class="contact-row">
                                      <div class="contact-icon" aria-hidden="true">
                                          <i class="fas fa-phone"></i>
                                      </div>
                                      <div class="contact-body">
                                          <div class="contact-label">Phone</div>
                                          <div class="contact-value">
                                              <?php
                $phones = strip_tags($headerRow['phone']);
                $phoneList = preg_split('/<br\s*\/?>|,/', $phones);
                                              // show each phone on its own line
                                              foreach ($phoneList as $p) {
                                              $display = trim($p);
                                              $tel = preg_replace('/\D/', '', $display);
                                              if (!empty($tel)) {
                                              echo '<a class="contact-link phone-link" href="tel:+91'.$tel.'"
                                                  aria-label="Call '.$display.'">'.htmlspecialchars($display).'</a><br>';
                                              }
                                              }
                                              ?>
                                          </div>
                                      </div>
                                  </div>

                                  <!-- Email -->
                                  <div class="contact-row">
                                      <div class="contact-icon" aria-hidden="true">
                                          <i class="fas fa-envelope"></i>
                                      </div>
                                      <div class="contact-body">
                                          <div class="contact-label">Email</div>
                                          <div class="contact-value">
                                              <?php
                $emails = strip_tags($headerRow['email']);
                $emailList = preg_split('/<br\s*\/?>|,/', $emails);
                                              foreach ($emailList as $em) {
                                              $e = trim($em);
                                              if (!empty($e)) {
                                              echo '<a class="contact-link email-link"
                                                  href="mailto:'.htmlspecialchars($e).'"
                                                  aria-label="Email '.$e.'">'.htmlspecialchars($e).'</a><br>';
                                              }
                                              }
                                              ?>
                                          </div>
                                      </div>
                                  </div>

                                  <!-- Address -->
                                  <div class="contact-row">
                                      <div class="contact-icon" aria-hidden="true">
                                          <i class="fas fa-location-dot"></i>
                                      </div>
                                      <div class="contact-body">
                                          <div class="contact-label">Address</div>
                                          <div class="contact-value address-text">
                                              <?php echo nl2br(htmlspecialchars($headerRow['address'])); ?></div>
                                      </div>
                                  </div>


                              </div>
                          </aside>
                      </div>
                  </div>

                  <!-- Styles for Contact Now: move to main stylesheet if preferred -->
                  <style>
                  /* Contact Now card */
                  .contact-now-card {
                      background: transparent;
                      padding: 8px 0 0 0;
                  }

                  .contact-now {
                      padding: 6px 0 8px;
                  }

                  .contact-row {
                      display: flex;
                      gap: 12px;
                      align-items: flex-start;
                      margin-bottom: 14px;
                  }

                  .contact-icon {
                      min-width: 44px;
                      min-height: 44px;
                      display: flex;
                      align-items: center;
                      justify-content: center;
                      border-radius: 10px;
                      background: #ffffff;
                      color: black;
                      font-size: 16px;
                      box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.25);
                  }

                  .contact-body {
                      flex: 1;
                  }

                  .contact-label {
                      /* font-size: 13px; */
                      color: #fff;
                      font-weight: 600;
                      margin-bottom: 4px;
                      text-transform: capitalize;
                  }

                  .contact-value {
                      font-size: 15px;
                      color: #dbe9f4;
                      line-height: 1.6;
                  }

                  .address-text {
                      color: #cbd8e2;
                      white-space: pre-line;
                  }

                  .contact-link {
                      color: #cfe8f6;
                      text-decoration: none;
                      display: inline-block;
                      transition: color .16s ease, transform .12s ease;
                  }

                  .contact-link:hover {
                      color: #ffd089;
                      transform: translateX(4px);
                  }
                  </style>


                  <!-- LOCATION -->
                  <div class="col-lg-3">
                      <div class="widget widget_banner footer-widget">
                          <h3 class="widget_title">Location</h3>
                          <div class="widget-map">
                              <iframe
                                  src="https://www.google.com/maps/embed?pb=!1m17!1m12!1m3!1d3516.3870524095796!2d76.62035747548485!3d28.195550875906267!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m2!1m1!2zMjjCsDExJzQ0LjAiTiA3NsKwMzcnMjIuNiJF!5e0!3m2!1sen!2sin!4v1753789070156!5m2!1sen!2sin"
                                  width="100%" height="250" style="border:0;" allowfullscreen="" loading="lazy"
                                  referrerpolicy="no-referrer-when-downgrade"></iframe>
                          </div>
                      </div>
                  </div>

              </div> <!-- /.row -->
          </div> <!-- /.container -->
      </div> <!-- /.widget-area -->

      <div class="copyright-wrap">
          <div class="container">
              <div class="copyright-bar">
                  <p class="copyright-left">
                      © 2025 <a href="index.php">ND We Make</a>. All Rights Reserved.
                  </p>
                  <p class="copyright-right">
                      Designed & Developed by <a href="https://wedigitalindia.com" target="_blank">Wedigital India</a>
                  </p>
              </div>
          </div>
      </div>

      <style>
      /* ==== COPYRIGHT BAR STYLE ==== */
      .copyright-wrap {
          background-color: #003377;
          /* Deep blue tone for professional look */
          color: #ffffff;
          padding: 12px 0;
          font-size: 14px;
          font-weight: 500;
          border-top: 1px solid rgba(255, 255, 255, 0.1);
      }

      .copyright-bar {
          display: flex;
          justify-content: space-between;
          align-items: center;
          flex-wrap: wrap;
          gap: 10px;
      }

      .copyright-bar p {
          margin: 0;
          color: #e6ecf5;
          letter-spacing: 0.3px;
      }

      .copyright-bar a {
          color: #f4b544;
          /* warm yellow-gold tone */
          text-decoration: none;
          font-weight: 600;
          transition: color 0.3s ease;
      }

      .copyright-bar a:hover {
          color: #ffffff;
      }

      /* ==== Responsive view for mobile ==== */
      @media (max-width: 767px) {
          .copyright-bar {
              flex-direction: column;
              text-align: center;
          }
      }
      </style>


      <!-- Optional quick inline CSS - move to main stylesheet if you prefer -->
      <style>
      .quick-links-list {
          list-style: none;
          padding-left: 0;
          margin: 0;
      }

      .quick-links-list li {
          margin: 6px 0;
      }

      .quick-links-list li a {
          color: inherit;
          text-decoration: none;
      }

      .quick-group-title {
          font-weight: 700;
          padding-top: 8px;
          color: #f1c542;
      }

      /* small group separator */
      .btn-contact-now {
          display: inline-block;
          padding: 10px 18px;
          background: #f5b642;
          color: #111;
          border-radius: 6px;
          text-decoration: none;
          font-weight: 600;
      }

      .contact-link {
          color: inherit;
          text-decoration: none;
      }

      .widget_title {
          font-size: 20px;
          margin-bottom: 14px;
      }

      @media (max-width:991px) {
          .quick-group-title {
              display: none;
          }

          /* optional: hide group titles on small screens for brevity */
      }
      </style>
  </footer>




  <div class="scroll-top"><svg class="progress-circle svg-content" width="100%" height="100%" viewBox="-1 -1 102 102">
          <path d="M50,1 a49,49 0 0,1 0,98 a49,49 0 0,1 0,-98"
              style="transition: stroke-dashoffset 10ms linear 0s; stroke-dasharray: 307.919, 307.919; stroke-dashoffset: 307.919;">
          </path>
      </svg></div>
  <script src="<?php path() ?>/assets/js/vendor/jquery-3.7.1.min.js"></script>
  <script src="<?php path() ?>/assets/js/app.min.js"></script>
  <script src="<?php path() ?>/assets/js/wow.min.js"></script>
  <script src="<?php path() ?>/assets/js/nice-select.min.js"></script>
  <script src="<?php path() ?>/assets/js/main.js"></script>
  <!-- academy form submit -->
  <script>
function gotoChatService(event) {
    event.preventDefault(); // Stop form submission

    const name = document.getElementById("Name").value.trim();
    const email = document.getElementById("Email").value.trim();
    const phone = document.getElementById("Phone").value.trim();
    const service = document.getElementById("Service").value;
    const message = document.getElementById("Message").value.trim();

    // Basic validation
    if (!name || !email || !phone || !service || !message) {
        alert("Please fill out all fields before submitting.");
        return false;
    }

    const emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
    if (!emailRegex.test(email)) {
        alert("Please enter a valid email address.");
        return false;
    }

    if (phone.length !== 10 || isNaN(phone)) {
        alert("Please enter a valid 10-digit mobile number.");
        return false;
    }

    // WhatsApp message formatting
    const waMessage =
        `Name: ${encodeURIComponent(name)}%0A` +
        `Email: ${encodeURIComponent(email)}%0A` +
        `Phone: ${encodeURIComponent(phone)}%0A` +
        `Service: ${encodeURIComponent(service)}%0A` +
        `Message: ${encodeURIComponent(message)}`;

    const waUrl = `https://wa.me/919812390615?text=${waMessage}`;
    window.open(waUrl, "_blank").focus();
    return true;
}
  </script>
  <!-- end  -->
  </body>

  </html>