<?php
$settings = getSiteSettings();
?>
<!-- Footer -->
<footer class="site-footer">
    <div class="footer-top">
        <div class="container">
            <div class="row g-4">
                <!-- Brand Column -->
                <div class="col-lg-4">
                    <div class="footer-brand">
                        <a href="<?= SITE_URL ?>/" class="footer-logo">
                            <img src="<?= SITE_URL ?>/assets/images/meevakeel-white.png" alt="" />
                        </a>
                        <p class="footer-desc">India's trusted online legal consultation platform. Connect with verified
                            lawyers across Telangana, Andhra Pradesh and all of India.</p>
                        <div class="footer-contact">
                            <!-- <p><i class="fas fa-phone-alt me-2"></i> <a
                                    href="tel:<?= $settings['site_phone'] ?? '' ?>"><?= $settings['site_phone'] ?? '+91 9876543210' ?></a>
                            </p> -->
                            <p><i class="fas fa-envelope me-2"></i> <a
                                    href="mailto:<?= $settings['site_email'] ?? '' ?>"><?= $settings['site_email'] ?? 'enquiry@meevakeel.com' ?></a>
                            </p>
                            <p><i class="fas fa-map-marker-alt me-2"></i> H. No. 8-1-68/3/70/82, Flat No. 402, 4th
                                Floor, Royal Mansion, Jai Hind Nagar, Shaikpet, Hyderabad 500008, Telangana.</p>
                        </div>
                        <div class="social-links mt-4">
                            <a href="<?= $settings['facebook_url'] ?? '#' ?>" target="_blank"><i
                                    class="fab fa-facebook-f"></i></a>
                            <a href="<?= $settings['twitter_url'] ?? '#' ?>" target="_blank"><i
                                    class="fab fa-twitter"></i></a>
                            <a href="<?= $settings['linkedin_url'] ?? '#' ?>" target="_blank"><i
                                    class="fab fa-linkedin-in"></i></a>
                            <a href="https://wa.me/<?= $settings['site_whatsapp'] ?? '9876543210' ?>" target="_blank"><i
                                    class="fab fa-whatsapp"></i></a>
                            <a href="#" target="_blank"><i class="fab fa-youtube"></i></a>
                        </div>
                    </div>
                </div>

                <!-- Legal Services -->
                <div class="col-lg-2 col-md-4">
                    <h5 class="footer-heading">Legal Services</h5>
                    <ul class="footer-links">
                        <?php
                        $db = getDB();
                        $cats = $db->query("
SELECT id, name, slug
FROM legal_categories
WHERE status=1
ORDER BY sort_order
LIMIT 10
")->fetchAll();
                        foreach($cats as $cat): ?>
                        <li>
                            <a href="<?= SITE_URL ?>/lawyers.php?category=<?= $cat['id'] ?>">
                                <?= $cat['name'] ?>
                            </a>
                        </li>
                        <?php endforeach; ?>
                    </ul>
                </div>

                <!-- Quick Links -->
                <div class="col-lg-2 col-md-4">
                    <h5 class="footer-heading">Quick Links</h5>
                    <ul class="footer-links">
                        <li><a href="<?= SITE_URL ?>/pages/about.php">About Us</a></li>
                        <li><a href="<?= SITE_URL ?>/lawyers.php">Find Lawyers</a></li>
                        <li><a href="<?= SITE_URL ?>/register-lawyer.php">Register as Lawyer</a></li>
                        <li><a href="<?= SITE_URL ?>/register.php">Register as Client</a></li>
                        <li><a href="<?= SITE_URL ?>/blog.php">Legal Guide</a></li>
                        <li><a href="<?= SITE_URL ?>/pages/faq.php">FAQ</a></li>
                        <li><a href="<?= SITE_URL ?>/pages/student-internship.php">Student Internship</a></li>
                        <li><a href="<?= SITE_URL ?>/pages/careers.php">Careers</a></li>
                        <li><a href="<?= SITE_URL ?>/pages/contact.php">Contact Us</a></li>
                          <li><a href="<?= SITE_URL ?>">High Court</a></li>
                    </ul>
                </div>

                <!-- Cities -->
                <div class="col-lg-2 col-md-4">
                    <h5 class="footer-heading">Top Cities</h5>
                    <ul class="footer-links">
                        <li><a href="<?= SITE_URL ?>/lawyers.php?city=hyderabad">Hyderabad Lawyers</a></li>
                        <li><a href="<?= SITE_URL ?>/lawyers.php?city=warangal">Warangal Lawyers</a></li>
                        <li><a href="<?= SITE_URL ?>/lawyers.php?city=karimnagar">Karimnagar Lawyers</a></li>
                        <li><a href="<?= SITE_URL ?>/lawyers.php?city=nizamabad">Nizamabad Lawyers</a></li>
                        <li><a href="<?= SITE_URL ?>/lawyers.php?city=khammam">Khammam Lawyers</a></li>
                        <li><a href="<?= SITE_URL ?>/lawyers.php?city=visakhapatnam">Visakhapatnam Lawyers</a></li>
                        <li><a href="<?= SITE_URL ?>/lawyers.php?city=vijayawada">Vijayawada Lawyers</a></li>
                        <li><a href="<?= SITE_URL ?>/lawyers.php?city=guntur">Guntur Lawyers</a></li>
                        <li><a href="<?= SITE_URL ?>/lawyers.php?city=tirupati">Tirupati Lawyers</a></li>
                        <li><a href="<?= SITE_URL ?>/lawyers.php?city=kurnool">Kurnool Lawyers</a></li>
                    </ul>
                </div>

                <!-- Newsletter -->
                <div class="col-lg-2">
                    <h5 class="footer-heading">Stay Updated</h5>
                    <p class="footer-desc small">Get latest legal updates and news.</p>
                    <form class="footer-newsletter" action="<?= SITE_URL ?>/api/newsletter.php" method="POST">
                        <input type="hidden" name="csrf_token" value="<?= $csrf ?>">
                        <div class="input-group">
                            <input type="email" name="email" class="form-control" placeholder="Your email">
                            <button class="btn btn-gold" type="submit"><i class="fas fa-paper-plane"></i></button>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>

    <div class="footer-bottom">
        <div class="container">
            <div class="row align-items-center">
                <div class="col-md-6">
                    <p>&copy; <?= date('Y') ?> MeeVakeel. All Rights Reserved.</p>
                </div>
                <div class="col-md-6 text-md-end">
                    <a href="<?= SITE_URL ?>/pages/privacy-policy.php">Privacy Policy</a>
                    <span class="mx-2">|</span>
                    <a href="<?= SITE_URL ?>/pages/terms.php">Terms & Conditions</a>
                    <span class="mx-2">|</span>
                    <a href="<?= SITE_URL ?>/sitemap.php">Sitemap</a>
                </div>
            </div>
        </div>
    </div>
</footer>

<!-- Back to Top -->
<button class="back-to-top" id="backToTop" title="Back to Top">
    <i class="fas fa-chevron-up"></i>
</button>

<!-- WhatsApp Float -->
<!-- <a href="https://wa.me/<?= $settings['site_whatsapp'] ?? '9876543210' ?>?text=Hello%20Nyaya%20Guru,%20I%20need%20legal%20help" 
   class="whatsapp-float" target="_blank" title="Chat on WhatsApp">
    <i class="fab fa-whatsapp"></i>
</a> -->


<!-- Floating Legal Help -->
<div class="legal-help" id="legalHelp">

    <div class="help-items" id="helpItems">

        <a href="#">
            <i class="fas fa-video"></i> Video Call
        </a>

        <a href="#">
            <i class="fas fa-phone"></i> Audio Call
        </a>

        <a href="#">
            <i class="fas fa-comments"></i> Live Chat
        </a>

        <a href="#">
            <i class="fab fa-whatsapp"></i> WhatsApp
        </a>

        <a href="#">
            <i class="fas fa-triangle-exclamation"></i> Emergency
        </a>

    </div>

    <button type="button" id="helpBtn">

        <i class="fas fa-headset"></i>

    </button>

</div>
<!-- Bootstrap 5 JS -->
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
<!-- jQuery -->
<script src="https://code.jquery.com/jquery-3.7.0.min.js"></script>
<!-- Select2 -->
<script src="https://cdn.jsdelivr.net/npm/select2@4.1.0-rc.0/dist/js/select2.min.js"></script>
<!-- Custom JS -->
<script src="<?= SITE_URL ?>/assets/js/main.js"></script>

<script>
// Back to Top
const backToTop = document.getElementById('backToTop');
window.addEventListener('scroll', () => {
    backToTop.style.display = window.scrollY > 400 ? 'flex' : 'none';
});
backToTop.addEventListener('click', () => window.scrollTo({
    top: 0,
    behavior: 'smooth'
}));

// CSRF Token for AJAX
window.CSRF_TOKEN = '<?= $csrf ?>';
window.SITE_URL = '<?= SITE_URL ?>';
</script>
<!-- Live Chat -->
<script>
document.getElementById("helpBtn").onclick = function() {
    var menu = document.getElementById("helpItems");
    if (menu.style.display == "block") {
        menu.style.display = "none";
    } else {
        menu.style.display = "block";
    }
}
const helpBtn = document.getElementById("helpBtn");
const helpItems = document.getElementById("helpItems");
helpBtn.onclick = function() {
    if (helpItems.style.display === "block") {

        helpItems.style.display = "none";
        helpBtn.innerHTML = '<i class="fas fa-headset"></i>';
    } else {
        helpItems.style.display = "block";
        helpBtn.innerHTML = '<i class="fas fa-times"></i>';

    }
};
</script>

</body>

</html>