<footer class="site-footer bg-dark text-white py-5 mt-5">
    <div class="container">
        <div class="row g-4">
            <div class="col-lg-4">
                <div class="footer-brand mb-3">
                    <img src="images/oldage-home-logo.svg" alt="Oldage Home logo" class="footer-brand__logo">
                    <div>
                        <h5 class="fw-bold mb-1">Oldage Home</h5>
                        <p class="mb-0 text-white-50">Care &amp; Comfort</p>
                    </div>
                </div>
                <p class="mb-3">Providing compassionate care and comprehensive facilities for elderly men and women since 2010.</p>
                <div class="d-flex footer-socials">
                    <a href="#" class="text-white me-3"><i class="fab fa-facebook-f"></i></a>
                    <a href="#" class="text-white me-3"><i class="fab fa-twitter"></i></a>
                    <a href="#" class="text-white me-3"><i class="fab fa-instagram"></i></a>
                    <a href="#" class="text-white"><i class="fab fa-linkedin-in"></i></a>
                </div>
            </div>
            <div class="col-lg-2">
                <h6 class="fw-bold mb-3">Quick Links</h6>
                <ul class="list-unstyled">
                    <li><a href="about.php" class="text-white-50">About Us</a></li>
                    <li><a href="services.php" class="text-white-50">Services</a></li>
                    <li><a href="facilities.php" class="text-white-50">Facilities</a></li>
                    <li><a href="gallery.php" class="text-white-50">Gallery</a></li>
                </ul>
            </div>
            <div class="col-lg-2">
                <h6 class="fw-bold mb-3">Support</h6>
                <ul class="list-unstyled">
                    <li><a href="contact.php" class="text-white-50">Contact Us</a></li>
                    <li><a href="admission.php" class="text-white-50">Admission</a></li>
                    <li><a href="staff.php" class="text-white-50">Our Staff</a></li>
                    <li><a href="testimonials.php" class="text-white-50">Testimonials</a></li>
                </ul>
            </div>
            <div class="col-lg-4">
                <h6 class="fw-bold mb-3">Contact Info</h6>
                <p class="mb-2"><i class="fas fa-map-marker-alt me-2"></i>123 Care Street, Wellness City, WC 12345</p>
                <p class="mb-2"><i class="fas fa-phone me-2"></i>(555) 123-4567</p>
                <p class="mb-2"><i class="fas fa-envelope me-2"></i>info@oldagehome.com</p>
                <p class="mb-0"><i class="fas fa-clock me-2"></i>24/7 Emergency Support</p>
            </div>
        </div>
        <hr class="my-4">
        <div class="row align-items-center">
            <div class="col-md-6">
                <p class="mb-0">&copy; 2024 Oldage Home. All rights reserved.</p>
            </div>
            <div class="col-md-6 text-md-end">
                <a href="#" class="text-white-50 me-3">Privacy Policy</a>
                <a href="#" class="text-white-50">Terms of Service</a>
            </div>
        </div>
    </div>
</footer>

<div class="floating-socials" id="floatingSocials">
    <div class="floating-socials__panel" id="floatingSocialsPanel" aria-hidden="true">
        <a href="https://wa.me/15551234567" class="floating-socials__link floating-socials__link--whatsapp" target="_blank" rel="noopener" aria-label="Chat on WhatsApp">
            <i class="fab fa-whatsapp"></i>
        </a>
        <a href="https://www.facebook.com/" class="floating-socials__link floating-socials__link--facebook" target="_blank" rel="noopener" aria-label="Visit Facebook page">
            <i class="fab fa-facebook-f"></i>
        </a>
        <a href="https://www.instagram.com/" class="floating-socials__link floating-socials__link--instagram" target="_blank" rel="noopener" aria-label="Visit Instagram page">
            <i class="fab fa-instagram"></i>
        </a>
        <a href="https://www.youtube.com/" class="floating-socials__link floating-socials__link--youtube" target="_blank" rel="noopener" aria-label="Visit YouTube channel">
            <i class="fab fa-youtube"></i>
        </a>
    </div>
    <button type="button" class="floating-socials__toggle" id="floatingSocialsToggle" aria-expanded="false" aria-controls="floatingSocialsPanel" aria-label="Open social links">
        <i class="fas fa-share-alt"></i>
        <span class="floating-socials__toggle-arrow"><i class="fas fa-chevron-up"></i></span>
    </button>
</div>
<div class="chatbot-widget" id="chatbotWidget">
    <div class="chatbot-prompt" id="chatbotPrompt" aria-live="polite">
        <button type="button" class="chatbot-prompt__close" id="chatbotPromptClose" aria-label="Close chat help">
            <i class="fas fa-times"></i>
        </button>
        <div class="chatbot-prompt__eyebrow">Need Help?</div>
        <div class="chatbot-prompt__title">Chat assistance is available</div>
        <p class="chatbot-prompt__text">Ask about booking, services, admission, or contact details anytime.</p>
        <button type="button" class="chatbot-prompt__cta" id="chatbotPromptAction">Open Chat</button>
    </div>
    <div class="chatbot-panel" id="chatbotPanel" aria-hidden="true">
        <div class="chatbot-panel__header">
            <div>
                <strong>Oldage Home Assistant</strong>
                <div class="small opacity-75">Ask about services, booking, admission, or contact.</div>
            </div>
            <button type="button" class="chatbot-close" id="chatbotClose" aria-label="Close chat">
                <i class="fas fa-times"></i>
            </button>
        </div>
        <div class="chatbot-messages" id="chatbotMessages">
            <div class="chatbot-message chatbot-message--bot">Hello. How can I help you today?</div>
        </div>
        <div class="chatbot-suggestions">
            <button type="button" class="chatbot-suggestion" data-chatbot-question="What services do you provide?">Services</button>
            <button type="button" class="chatbot-suggestion" data-chatbot-question="How can I book a service?">Booking</button>
            <button type="button" class="chatbot-suggestion" data-chatbot-question="How do I apply for admission?">Admission</button>
            <button type="button" class="chatbot-suggestion" data-chatbot-question="How can I contact you?">Contact</button>
        </div>
        <form class="chatbot-form" id="chatbotForm">
            <input type="text" id="chatbotInput" class="form-control" placeholder="Type your question..." autocomplete="off">
            <button type="submit" class="btn btn-primary">Send</button>
        </form>
    </div>
    <button type="button" class="chatbot-float-btn" id="chatbotToggle" aria-label="Open chatbot">
        <i class="fas fa-comments"></i>
        <span>Chat</span>
    </button>
</div>

<?php if (function_exists('isLoggedIn') && isLoggedIn()): ?>
    <?php if (function_exists('isAdmin') && isAdmin()): ?>
    <nav class="mobile-app-nav d-lg-none" aria-label="Admin mobile navigation">
        <a href="index.php" class="mobile-app-nav__item" data-app-link="index.php"><i class="fas fa-home"></i><span>Home</span></a>
        <a href="admin.php" class="mobile-app-nav__item" data-app-link="admin.php"><i class="fas fa-chart-line"></i><span>Admin</span></a>
        <a href="services.php" class="mobile-app-nav__item" data-app-link="services.php"><i class="fas fa-concierge-bell"></i><span>Services</span></a>
        <a href="contact.php" class="mobile-app-nav__item" data-app-link="contact.php"><i class="fas fa-headset"></i><span>Support</span></a>
    </nav>
    <?php else: ?>
    <nav class="mobile-app-nav d-lg-none" aria-label="User mobile navigation">
        <a href="index.php" class="mobile-app-nav__item" data-app-link="index.php"><i class="fas fa-home"></i><span>Home</span></a>
        <a href="services.php" class="mobile-app-nav__item" data-app-link="services.php"><i class="fas fa-heart"></i><span>Services</span></a>
        <a href="book-services.php" class="mobile-app-nav__item mobile-app-nav__item--primary" data-app-link="book-services.php"><i class="fas fa-plus-circle"></i><span>Book</span></a>
        <a href="dashboard.php" class="mobile-app-nav__item" data-app-link="dashboard.php"><i class="fas fa-calendar-check"></i><span>Bookings</span></a>
        <a href="profile.php" class="mobile-app-nav__item" data-app-link="profile.php"><i class="fas fa-user"></i><span>Profile</span></a>
    </nav>
    <?php endif; ?>
<?php else: ?>
<nav class="mobile-app-nav d-lg-none" aria-label="Guest mobile navigation">
    <a href="index.php" class="mobile-app-nav__item" data-app-link="index.php"><i class="fas fa-home"></i><span>Home</span></a>
    <a href="services.php" class="mobile-app-nav__item" data-app-link="services.php"><i class="fas fa-hand-holding-heart"></i><span>Services</span></a>
    <a href="contact.php" class="mobile-app-nav__item mobile-app-nav__item--primary" data-app-link="contact.php"><i class="fas fa-phone-alt"></i><span>Contact</span></a>
    <a href="login.php" class="mobile-app-nav__item" data-app-link="login.php"><i class="fas fa-sign-in-alt"></i><span>Login</span></a>
    <a href="register.php" class="mobile-app-nav__item" data-app-link="register.php"><i class="fas fa-user-plus"></i><span>Join</span></a>
</nav>
<?php endif; ?>
