<?php include 'admin/connection.php'; ?>
<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">

    <title>Limbcare Clinic | Best Prosthetic & Orthotic Center in India | Artificial Limbs & Bionic Solutions</title>

    <meta name="description" content="Limbcare Clinic is a leading Prosthetic and Orthotic Center in India providing advanced artificial limbs, bionic hands, prosthetic legs, orthotics, pediatric orthotics, silicone prosthesis, mobility aids, wheelchairs, and rehabilitation solutions. Located at Beside Brahmkumari Ashram, Anantpur, Phulnakhara, Cuttack Near East College. We deliver customized, high-quality prosthetic and orthotic care with global standards.">

    <meta name="keywords" content="Limbcare Clinic, best prosthetic clinic in India, prosthetic leg India, artificial limb center, bionic hand India, myoelectric prosthesis, prosthetic foot, prosthetic knee joint, prosthetic hip joint, orthotics clinic India, pediatric orthotics, AFO brace, SMO orthosis, CROW walker, diabetic foot care, silicone prosthesis India, cosmetic prosthetic cover, rehabilitation center India, mobility aids India, wheelchair supplier India, CP chair, rollator walker, smart blind stick, hearing aid India, upper limb prosthesis, lower limb prosthesis, sports prosthetics, running blade India, artificial hand India, advanced prosthetics worldwide, limb replacement surgery support, prosthetic socket design, prosthetic suspension system, orthotic supports, calipers India, best artificial limb clinic Cuttack, prosthetic clinic Odisha, limbcare Cuttack, international prosthetic solutions, affordable prosthetics India">

    <meta name="author" content="Limbcare Clinic">
    <meta name="robots" content="index, follow">
    <meta name="language" content="English">
    <meta name="revisit-after" content="7 days">
    <meta name="rating" content="General">

    <!-- Open Graph for social sharing -->
    <meta property="og:title" content="Limbcare Clinic | Advanced Prosthetic & Orthotic Solutions in India">
    <meta property="og:description" content="Get advanced artificial limbs, bionic hands, prosthetic legs, orthotics, pediatric braces, silicone prosthesis, and mobility aids at Limbcare Clinic, Cuttack, India. Trusted prosthetic and rehabilitation center delivering global standard care.">
    <meta property="og:type" content="website">
    <meta property="og:locale" content="en_IN">
    <meta property="og:image" content="assets/images/logos.png">

    <!-- Twitter Card -->
    <meta name="twitter:card" content="summary_large_image">
    <meta name="twitter:title" content="Limbcare Clinic | Best Artificial Limb & Orthotic Center in India">
    <meta name="twitter:description" content="Advanced prosthetic legs, bionic hands, orthotic braces, pediatric orthotics, silicone prosthesis and mobility solutions in India. Visit Limbcare Clinic, Cuttack.">
    <meta name="twitter:image" content="assets/images/logos.png">

    <!-- Clinic Address -->
    <meta name="geo.region" content="IN-OD">
    <meta name="geo.placename" content="Cuttack, Odisha, India">
    <meta name="geo.position" content="20.4625;85.8830">
    <meta name="ICBM" content="20.4625, 85.8830">

    <!-- Favicon -->
    <link rel="icon" type="image/png" sizes="32x32" href="./assets/images/logos.png">
    <link rel="icon" type="image/png" sizes="16x16" href="./assets/images/logos.png">
    <link rel="apple-touch-icon" href="./assets/images/logos.png">

    <meta name="theme-color" content="#0e7aa7">
    <link rel="stylesheet" href="./css/style.css">
    <!-- Font Awesome for Stars -->
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css">
</head>

<body>
    <!-- ================= REVIEW SECTION ================= -->

    <section class="ias-review2-section">

        <div class="ias-review2-container">

            <div class="ias-review2-header">
                <span class="ias-review2-subtitle">Testimonials</span>
                <h2 class="ias-review2-title">What Our <span>Happy Clients</span> Say</h2>
                <p>Real feedback from our valued customers who trusted our services.</p>
            </div>

            <div class="ias-review2-wrapper">
                <button class="ias-review2-prev">
                    <i class="fas fa-chevron-left"></i>
                </button>

                <div class="ias-review2-slider" id="iasReview2Slider">
                    <?php
                    $sql = "SELECT * FROM reviews WHERE status = 1 ORDER BY id DESC";
                    $res = $conn->query($sql);

                    if ($res->num_rows > 0) {
                        while ($row = $res->fetch_assoc()) {
                            $img = !empty($row['image']) ? $row['image'] : 'assets/images/default-user.png';
                    ?>
                            <!-- Dynamic Card -->
                            <div class="ias-review2-card">
                                <div class="ias-review2-top">
                                    <img src="<?= htmlspecialchars($img) ?>" alt="<?= htmlspecialchars($row['name']) ?>">
                                    <div>
                                        <h4><?= htmlspecialchars($row['name']) ?></h4>
                                        <div class="ias-review2-stars">
                                            <?php
                                            for ($i = 1; $i <= 5; $i++) {
                                                echo $i <= $row['rating'] ? '<i class="fas fa-star"></i>' : '<i class="far fa-star"></i>';
                                            }
                                            ?>
                                        </div>
                                    </div>
                                </div>
                                <p><?= htmlspecialchars($row['review']) ?></p>
                            </div>
                    <?php
                        }
                    } else {
                        echo "<p style='text-align:center; width:100%;'>No reviews found.</p>";
                    }
                    ?>
                </div>

                <button class="ias-review2-next">
                    <i class="fas fa-chevron-right"></i>
                </button>
            </div>

        </div>

    </section>

    <script>
        const slider2 = document.getElementById("iasReview2Slider");
        const prev2 = document.querySelector(".ias-review2-prev");
        const next2 = document.querySelector(".ias-review2-next");

        function slideNext2() {
            // Calculate card width dynamically
            const card = document.querySelector(".ias-review2-card");
            if (card) {
                const cardWidth = card.offsetWidth + 20; // keep 20 because gap is 20
                slider2.scrollLeft += cardWidth;
            }
        }

        function slidePrev2() {
            const card = document.querySelector(".ias-review2-card");
            if (card) {
                const cardWidth = card.offsetWidth + 20;
                slider2.scrollLeft -= cardWidth;
            }
        }

        next2.addEventListener("click", slideNext2);
        prev2.addEventListener("click", slidePrev2);

        /* Auto Slide */
        let autoSlideReview = setInterval(() => {
            // Check if scrolled to end, if yes reset to start
            if (slider2.scrollLeft + slider2.offsetWidth >= slider2.scrollWidth) {
                slider2.scrollLeft = 0;
            } else {
                slideNext2();
            }
        }, 3500);
    </script>
</body>

</html>