<footer class="footer-area">
    <div class="footer-shape">
        <img src="assets/img/logo/macaw.png" alt="">
    </div>
    <div class="footer-widget">
        <div class="container">
            <div class="row footer-widget-wrapper pt-100 pb-70">
                <div class="col-md-6 col-lg-4">
                    <div class="footer-widget-box about-us">
                        <a href="#" class="footer-logo">
                            <img src="assets/img/logo/macaw-white.jpeg" style="border-radius: 10%;" alt="">
                        </a>
                        <p><?= $user_rows["uabout"];?></p>
                    </div>
                </div>
                <div class="col-md-6 col-lg-2">
                    <div class="footer-widget-box list">
                        <h4 class="footer-widget-title">Quick Links</h4>
                        <ul class="footer-list">
                            <li><a href="about.php"><i class="fas fa-caret-right"></i> About Us</a></li>
                            <li><a href="how-to-apply.php"><i class="fas fa-caret-right"></i> Admission</a></li>
                            <li><a href="notice.php"><i class="fas fa-caret-right"></i> Notice</a></li>
                            <li><a href="blog.php"><i class="fas fa-caret-right"></i> Blog</a></li>
                            <li><a href="image-gallery.php"><i class="fas fa-caret-right"></i> Image Gallery</a></li>
                            <li><a href="cocsp.php"><i class="fas fa-caret-right"></i> Code of Conduct & School
                                    Policies</a></li>
                            <li><a href="privacy.php"><i class="fas fa-caret-right"></i> Privacy policy</a></li>
                        </ul>
                    </div>
                </div>
                <div class="col-md-6 col-lg-2">
                    <div class="footer-widget-box list">
                        <h4 class="footer-widget-title">Our Classes</h4>
                        <ul class="footer-list">
                            <?php
                                $course_sql = "SELECT * FROM data_table WHERE up_by = $x && page_type = 'course' && recycle = '1' ORDER BY id DESC";
                                $course_run = mysqli_query($con, $course_sql);

                                while ($course_row = mysqli_fetch_assoc($course_run)) {
                                    ?>
                            <li><a href="course-single.php?coursre=<?= $cource_row["title"];?>"><i
                                        class="fas fa-caret-right"></i> <?= $course_row["title"];?></a></li>
                            <?php }?>
                        </ul>
                    </div>
                </div>
                <div class="col-md-6 col-lg-4">
                    <div class="footer-widget-box list">
                        <h4 class="footer-widget-title">Reach Us!</h4>
                        <ul class="footer-contact">
                            <li><a href="tel:<?php echo $user_rows['uphone']; ?>"><i
                                        class="far fa-phone"></i><?php echo $user_rows['uphone']; ?></a> &nbsp; / &nbsp;
                                <a
                                    href="tel:<?php echo $user_rows['uothcontact']; ?>"><?php echo $user_rows['uothcontact']; ?></a>
                            </li>
                            <li><i class="far fa-map-marker-alt"></i>
                                <?php 
                                $address = [];
                                if (!empty($user_rows['uaddress1'])) {
                                    $address[] = $user_rows['uaddress1'];
                                }
                                if (!empty($user_rows['uaddress2'])) {
                                    $address[] = $user_rows['uaddress2'];
                                }
                                echo implode(', ', $address);
                                ?>
                            </li>
                            <li><a href="mailto:<?php echo $user_rows['umail']; ?>"><i
                                        class="far fa-envelope"></i><?php echo $user_rows['umail']; ?></a>
                            </li>
                        </ul>
                        <?php if (!empty($user_rows['umap'])): ?>
                        <div class="footer-map">
                            <iframe src="<?php echo htmlspecialchars($user_rows['umap']); ?>" width="100%" height="250"
                                style="border:0; border-radius: 10px;" allowfullscreen="" loading="lazy"
                                referrerpolicy="no-referrer-when-downgrade">
                            </iframe>
                        </div>
                        <?php else: ?>
                        <p>No map available.</p>
                        <?php endif; ?>
                    </div>
                </div>

            </div>
        </div>
    </div>
    <div class="copyright">
        <div class="container">
            <div class="copyright-wrapper">
                <div class="row">
                    <div class="col-md-6 align-self-center">
                        <p class="copyright-text">
                            &copy; Copyright <span id="date"></span> <a href="#"> MACAW </a> All Rights Reserved.
                        </p>
                    </div>
                    <div class="col-md-6 align-self-center">
                        <ul class="footer-social">
                            <li><a href="<?php echo $user_rows['ufburl']; ?>"><i class="fab fa-facebook-f"></i></a></li>
                            <li><a href="<?php echo $user_rows['uyoutube']; ?>"><i class="fab fa-youtube"></i></a></li>
                            <li><a href="<?php echo $user_rows['uinsta']; ?>"><i class="fab fa-instagram"></i></a></li>
                            <li><a href="https://wa.me/<?php echo $user_rows['uwhatsapp']; ?>"><i
                                        class="fab fa-whatsapp"></i></a></li>
                        </ul>
                    </div>
                </div>
            </div>
        </div>
    </div>
</footer>



<!-- scroll-top -->
<a href="#" id="scroll-top"><i class="far fa-arrow-up-from-arc"></i></a>
<!-- scroll-top end -->

<?php if($current_page != 'how-to-apply.php'){?>
<style>
/* Hide on desktop by default */
.mobile-side-btn {
    display: none;
    position: fixed;
    right: -37px;
    bottom: 47%;
    transform: rotate(270deg);
    text-decoration: none;
    cursor: pointer;
    z-index: 9999;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

/* Show only on mobile view */
@media (max-width: 768px) {
    .mobile-side-btn {
        display: block;
    }
}
</style>
<a href="how-to-apply.php" class="mobile-side-btn theme-btn">
    Apply Now
</a>
<?php }?>