<?php
// ── CY Consultancy Centre — Footer Include ──
if(!defined('BASE_PATH')) require_once dirname(__FILE__).'/config.php';
$B = BASE_PATH;
?>

<!-- FOOTER -->
<footer class="footer">
  <div class="footer-banner">
    <img src="<?= $B ?>assets/images/ImportedPhoto_1723029072133.jpg" alt="CY Consultancy Office">
    <div class="footer-banner-overlay"></div>
  </div>
  <div class="footer-body">
    <div class="footer-brand">
      <div class="footer-logo">
        <img src="<?= $B ?>assets/images/logo-white.png" alt="CY Consultancy" onerror="this.style.display='none'">
        <div>
          <span>CY Consultancy Centre</span>
          <span class="footer-logo-sub">Since 2008 &middot; Dhaka, Bangladesh</span>
        </div>
      </div>
      <p>Bangladesh's most trusted study abroad partner since 2008. We have helped 500+ students achieve their dream of studying in Europe and beyond.</p>
      <ul class="footer-contact">
        <li><i class="fas fa-map-marker-alt"></i><span>Lift 14, Nahar Plaza, Bir Uttam C.R. Dutta Road, Hatirpool, Dhaka 1205</span></li>
        <li><i class="fas fa-phone"></i><span><a href="tel:+8801711351367">+88 01711351367</a> &middot; <a href="tel:+8801955001001">+88 01955-001001</a></span></li>
        <li><i class="fas fa-envelope"></i><span><a href="mailto:info@cyconsultancy.net">info@cyconsultancy.net</a></span></li>
        <li><i class="far fa-clock"></i><span>SAT&ndash;THU 10:00 &ndash; 5:30</span></li>
      </ul>
      <div class="footer-social">
        <a href="https://www.facebook.com/cyconsultancycentre" target="_blank"><i class="fab fa-facebook-f"></i></a>
        <a href="#"><i class="fab fa-twitter"></i></a>
        <a href="#"><i class="fab fa-youtube"></i></a>
        <a href="https://wa.me/8801711351367" target="_blank"><i class="fab fa-whatsapp"></i></a>
      </div>
    </div>
    <div class="footer-col">
      <h4>Important Links</h4>
      <ul>
        <li><a href="<?= $B ?>index.php">Home</a></li>
        <li><a href="<?= $B ?>destinations.php">Study Abroad</a></li>
        <li><a href="<?= $B ?>universities.php">Universities</a></li>
        <li><a href="<?= $B ?>about.php">About Us</a></li>
        <li><a href="<?= $B ?>blog.php">Blog &amp; News</a></li>
        <li><a href="<?= $B ?>gallery.php">Gallery</a></li>
        <li><a href="<?= $B ?>our-success.php">Our Success</a></li>
        <li><a href="<?= $B ?>contact.php">Contact</a></li>
      </ul>
    </div>
    <div class="footer-col">
      <h4>Office Hours</h4>
      <div class="footer-hours">
        <div class="fh-row"><span class="fh-day">Saturday</span><span class="fh-time">10:00&ndash;5:30</span></div>
        <div class="fh-row"><span class="fh-day">Sunday</span><span class="fh-time">10:00&ndash;5:30</span></div>
        <div class="fh-row"><span class="fh-day">Monday</span><span class="fh-time">10:00&ndash;5:30</span></div>
        <div class="fh-row"><span class="fh-day">Tuesday</span><span class="fh-time">10:00&ndash;5:30</span></div>
        <div class="fh-row"><span class="fh-day">Wednesday</span><span class="fh-time">10:00&ndash;5:30</span></div>
        <div class="fh-row"><span class="fh-day">Thursday</span><span class="fh-time">10:00&ndash;5:30</span></div>
        <div class="fh-row"><span class="fh-day">Friday</span><span class="fh-time closed">Closed</span></div>
      </div>
      <div style="margin-top:16px">
        <a href="<?= $B ?>contact.php" class="btn btn-r" style="width:100%;justify-content:center;font-size:12px;padding:12px">
          <i class="fas fa-arrow-right"></i> Free Consultation
        </a>
      </div>
    </div>
  </div>
  <div class="footer-bottom">
    <p class="footer-copy">&copy; <?= date('Y') ?> CY Consultancy Centre. All rights reserved.</p>
    <nav class="footer-bottom-nav">
      <a href="#">Privacy Policy</a>
      <a href="#">Terms of Use</a>
      <a href="https://cyconsultancy.net" target="_blank">cyconsultancy.net</a>
    </nav>
    <p class="footer-dev">Development &amp; Maintenance by <a href="https://www.sarkarit.com/" target="_blank">SARKAR IT</a></p>
  </div>
</footer>

<!-- WhatsApp Float -->
<a href="https://wa.me/8801711351367" class="wa-float" target="_blank"><i class="fab fa-whatsapp"></i></a>

<!-- Page Transition -->
<script src="<?= $B ?>assets/js/transitions.js"></script>
<!-- Scripts — absolute paths -->
<script src="<?= $B ?>assets/js/aos.js"></script>
<script src="<?= $B ?>assets/js/main.js"></script>

<script>
/* ══════════════════════════════════════
   MOBILE MENU — FULLY FIXED
   Works on all touch + desktop devices
══════════════════════════════════════ */
(function(){
  var btn  = document.getElementById('mob-btn');
  var menu = document.getElementById('mob-menu');
  var icon = document.getElementById('mob-icon');
  if(!btn || !menu) return;

  var open = false;

  function openMenu(){
    open = true;
    menu.classList.add('open');
    btn.classList.add('is-open');
    if(icon){ icon.className = 'fas fa-times'; }
    document.body.style.overflow = 'hidden';
  }

  function closeMenu(){
    open = false;
    menu.classList.remove('open');
    btn.classList.remove('is-open');
    if(icon){ icon.className = 'fas fa-bars'; }
    document.body.style.overflow = '';
  }

  /* Button — handle both click and touch */
  btn.addEventListener('click', function(e){
    e.preventDefault();
    e.stopPropagation();
    open ? closeMenu() : openMenu();
  });

  /* Close when tapping outside */
  document.addEventListener('click', function(e){
    if(open && !menu.contains(e.target) && !btn.contains(e.target)){
      closeMenu();
    }
  });

  /* Close on nav link click */
  var links = menu.querySelectorAll('a');
  for(var i=0; i<links.length; i++){
    links[i].addEventListener('click', closeMenu);
  }

  /* Escape key */
  document.addEventListener('keydown', function(e){
    if(e.key === 'Escape' && open) closeMenu();
  });
})();
</script>
</body>
</html>
