 <?php include_once('include/header.php') ?>
 <!-- Hero Section Start -->
 <div class="hero hero-slider">
     <div class="hero-slider-layout1">
         <div class="swiper">
             <div class="swiper-wrapper">

                 <?php
                $sliderstmt = $con->prepare("SELECT * FROM slider");
                $sliderstmt->execute();
                $sliderResult = $sliderstmt->get_result();
                ?>

                 <?php while ($sliderRow = $sliderResult->fetch_assoc()) { ?>

                 <div class="swiper-slide">
                     <div class="hero-slide" >

                         <div class="hero-slider-image">
                             <img src="<?php path() ?>admin/assets/images/slider/<?php echo $sliderRow['Image'] ?>"
                                 alt="">
                         </div>

                         <div class="container">
                             <div class="row align-items-center">
                                 <div class="col-lg-7">
                                     <div class="hero-content">

                                     </div>
                                 </div>
                             </div>
                         </div>

                     </div>
                 </div>
                 <!-- Hero Slide End -->

                 <?php } ?>

             </div>

             <div class="hero-button-prev"></div>
             <div class="hero-button-next"></div>
         </div>
     </div>
 </div>
 <!-- Hero Section End -->

 <div class="why-chooseus-layout2">
     <div class="container py-5">

         <div class="row mb-3">
             <div class="col-lg-5">
                 <!-- Section Title Start -->
                 <div class="section-title">

                     <h2 class="text-start">Solar Power Solutions</h2>
                 </div>
                 <!-- Section Title End -->
             </div>

             <div class="col-lg-7">
                 <!-- Section Description Start -->
                 <div class="section-description wow fadeInUp" data-wow-delay="0.2s">
                     <p>Depending on your energy consumption patterns and grid availability at your location, you can choose from on-grid solar, off-grid solar, or industrial solar solutions. Our experienced team conduct a detailed site and load analysis to accurately size and design the most efficient solar configuration, ensuring maximum performance, reliability, and long-term savings.</p>
                 </div>
                 <!-- Section Description End -->
             </div>
         </div>



         <div class="row row-equal-height">
             <?php
                $solutionstmt = $con->prepare("SELECT * FROM solutions");
                $solutionstmt->execute();
                $result = $solutionstmt->get_result();
                ?>

             <div class="col-lg-12">
                 <div class="row g-3">
                     <?php while ($solrow = $result->fetch_assoc()) { ?>
                        
                     <div class="col-md-3">
                        <a href="<?php echo  path() . 'solutions/' .  $solrow['slug'];  ?>"
                                 class="small text-decoration-none">
                         <div class="solar-card p-3">
                             <div class="solar-card-icon mb-3">
                                 <img class="rounded"
                                     src="<?php path(); ?>admin/assets/images/solutions/<?php echo $solrow['image']; ?>"
                                     alt="<?php echo htmlspecialchars($solrow['name']); ?>">
                             </div>
                             <h5 class="mb-1"><?php echo htmlspecialchars($solrow['name']); ?></h5>
                             <p class="small text-muted mb-2">

                                 <?php  echo html_entity_decode(  mb_strimwidth(strip_tags($solrow['short_description']), 0, 120, '...')  ); ?>
                             </p>
                             
                                 View <?php echo htmlspecialchars($solrow['name']); ?> details →
                             
                         </div>
                           </a>
                     </div>
                   
                     <?php } ?>
                     
                 </div>
             </div>


         </div>
     </div>
 </div>

<div id="products" class="py-5 bg-light-subtle">
    <div class="container">
        <div class="row align-items-center section-title-row">
            <div class="col-lg-12">
                <div class="d-flex justify-content-between align-items-end mb-4">

                    <div class="mb-0 section-title">

                        <h2 class="text-anime mb-0">Solar Products</h2>
                    </div>

                </div>
            </div>
        </div>
        <?php
        $categories = mysqli_query(
            $con,
            "SELECT id, name, slug, image, description 
            FROM top_categories 
            ORDER BY id DESC"
        );
        ?>

        <div class="row">
            <div class="col-md-12">
                <div class="services-layout3-slider">
                    <div class="swiper">
                        <div class="swiper-wrapper">
                            <?php while ($cat = mysqli_fetch_assoc($categories)): ?>
                            <div class="swiper-slide">
                                <div class="service-slide3">
                                <a href="<?php echo  path() . 'products/' .  $cat['slug'];  ?>"
                                            class="small text-decoration-none">
                                    <div class="solar-card p-3">
                                        <div class="solar-card-icon mb-3">
                                            <img class="rounded"
                                                src="<?php echo path(); ?>admin/assets/images/top_categories/<?php echo htmlspecialchars($cat['image']); ?>"
                                                alt="<?php echo htmlspecialchars($cat['name']); ?>">
                                        </div>
                                        <h3><?php echo htmlspecialchars($cat['name']); ?></h3>
                                        <p class="small text-muted mb-2">

                                            <?php  echo html_entity_decode(  mb_strimwidth(strip_tags($cat['description']), 0, 120, '...')  ); ?>
                                        </p>
                                        
                                            View <?php echo htmlspecialchars($cat['name']); ?> details →
                                       
                                    </div>
                                </a>
                                     
                                </div>
                            </div>
                            <?php endwhile; ?>
                        </div>
                        <div class="swiper-pagination"></div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

     <!-- <div class="row">
             <div class="col-md-12">
                 <div class="services-layout3-slider">
                     <div class="swiper">
                         <div class="swiper-wrapper">

                             <?php while ($cat = mysqli_fetch_assoc($categories)): ?>
                             <div class="swiper-slide  bg-body">
                                 <a href="<?php echo path(); ?>products/<?php echo htmlspecialchars($cat['slug']); ?>"
                                     class="text-decoration-none">

                                     <div class="service-slide3">
                                         <div class="service-image">
                                             <figure class="image-anime">
                                                 <img src="<?php echo path(); ?>admin/assets/images/top_categories/<?php echo htmlspecialchars($cat['image']); ?>"
                                                     alt="<?php echo htmlspecialchars($cat['name']); ?>">
                                             </figure>
                                         </div>

                                         <div class="service-content d-block ">
                                             <h3><?php echo htmlspecialchars($cat['name']); ?></h3>
                                             <p class="mb-0">
                                                 <?php
                                                        echo $cat['description']
                                                            ? substr(strip_tags($cat['description']), 0, 90) . '...'
                                                            : '';
                                                        ?>
                                             </p>
                                         </div>
                                     </div>

                                 </a>
                             </div>
                             <?php endwhile; ?>
                         </div>
                     </div>
                 </div>
             </div>
         </div>  -->

     <!-- OUR OFFERINGS -->
     <!-- <section id="offerings" class="py-5 bg-light-subtle">
        <div class="container">
            <div class="d-flex justify-content-between align-items-end mb-4">

                <div class="mb-0 section-title">

                    <h2 class="text-anime mb-0">Our Offerings</h2>
                </div>
                <a href="all-offerings.html" class="small text-decoration-none btn-custom">
                    View details →
                </a>
            </div>

            <div class="row g-3">
              
                <div class="col-12 col-md-6 col-lg-3">
                    <div class="solar-card h-100 p-3">
                        <div class="solar-card-icon mb-3">🏠</div>
                        <h5 class="mb-1">Home Solar</h5>
                        <p class="small mb-2 text-muted">
                            Rooftop systems for individual homes &amp; villas with subsidy support.
                        </p>
                        <a href="home-solar.html" class="small text-decoration-none">
                            Explore home plans →
                        </a>
                    </div>
                </div>

               
                <div class="col-12 col-md-6 col-lg-3">
                    <div class="solar-card h-100 p-3">
                        <div class="solar-card-icon mb-3">🏢</div>
                        <h5 class="mb-1">Commercial</h5>
                        <p class="small mb-2 text-muted">
                            Solar for offices, shops and showrooms with fast payback.
                        </p>
                        <a href="commercial-solar.html" class="small text-decoration-none">
                            See commercial solutions →
                        </a>
                    </div>
                </div>

               
                <div class="col-12 col-md-6 col-lg-3">
                    <div class="solar-card h-100 p-3">
                        <div class="solar-card-icon mb-3">🏬</div>
                        <h5 class="mb-1">Housing Societies</h5>
                        <p class="small mb-2 text-muted">
                            Common-area solar systems for apartments &amp; gated communities.
                        </p>
                        <a href="housing-societies.html" class="small text-decoration-none">
                            Learn more →
                        </a>
                    </div>
                </div>

                 
                <div class="col-12 col-md-6 col-lg-3">
                    <div class="solar-card h-100 p-3">
                        <div class="solar-card-icon mb-3">🏭</div>
                        <h5 class="mb-1">Industrial</h5>
                        <p class="small mb-2 text-muted">
                            High-capacity solar power plants for factories and warehouses.
                        </p>
                        <a href="industrial-solar.html" class="small text-decoration-none">
                            Industrial case studies →
                        </a>
                    </div>
                </div>
            </div>
        </div>
    </section> -->

     <!-- Our Process Section Start -->
     <div class="our-process">
         <div class="container">
             <div class="row">
                 <div class="col-md-12">
                     <!-- Section Title Start -->
                     <div class="section-title">
                         <h3 class="wow fadeInUp">Our Process</h3>
                         <h2 class="text-anime">Our Work Process</h2>
                     </div>
                     <!-- Section Title End -->
                 </div>
             </div>

             <div class="row">
                 <div class="col-md-4">
                     <!-- Step Item Start -->
                     <div class="step-item step-1 wow fadeInUp" data-wow-delay="0.25s">
                         <div class="step-header">
                             <div class="step-icon">
                                 <figure>
                                     <img src="images/icon-step-1.svg" alt="">
                                 </figure>
                                 <span class="step-no">01</span>
                             </div>
                         </div>

                         <div class="step-content">
                             <h3>Project Planning</h3>
                             <p>We begin with a detailed site survey and energy requirement assessment to design the
                                 most efficient and cost-effective solar solution for your property.</p>
                         </div>
                     </div>
                     <!-- Step Item End -->
                 </div>

                 <div class="col-md-4">
                     <!-- Step Item Start -->
                     <div class="step-item step-2 wow fadeInUp" data-wow-delay="0.5s">
                         <div class="step-header">
                             <div class="step-icon">
                                 <figure>
                                     <img src="images/icon-step-2.svg" alt="">
                                 </figure>
                                 <span class="step-no">02</span>
                             </div>
                         </div>

                         <div class="step-content">
                             <h3>Research & Analysis</h3>
                             <p>Our experts analyze solar potential, load patterns, and feasibility to create a
                                 customized system layout that maximizes energy output and long-term savings.</p>
                         </div>
                     </div>
                     <!-- Step Item End -->
                 </div>

                 <div class="col-md-4">
                     <!-- Step Item Start -->
                     <div class="step-item wow fadeInUp" data-wow-delay="0.75s">
                         <div class="step-header">
                             <div class="step-icon">
                                 <figure>
                                     <img src="images/icon-step-3.svg" alt="">
                                 </figure>
                                 <span class="step-no">03</span>
                             </div>
                         </div>

                         <div class="step-content">
                             <h3>Solar Installation</h3>
                             <p>We deliver safe, fast, and professional installation using high-quality solar panels
                                 and
                                 components, ensuring optimal performance and long-term reliability.</p>
                         </div>
                     </div>
                     <!-- Step Item End -->
                 </div>
             </div>
         </div>
     </div>
     <!-- Our Process Section End -->

     <!-- Start Solar Savings Calculator Area -->
     <!-- <div class="solar-savings-calculator-area py-5">
         <div class="container">
             <div class="section-title section-title-animation animation-style3">
                 <span class="sub extra-gap">Solar Savings Calculator</span>
                 <h2 class="title-animation">Calculate how much you could save with solar energy based on your
                     energy
                     usage</h2>
             </div>
             <div class="solar-savings-calculator-inner">
                 <div class="row justify-content-center g-0" data-cues="slideInUp">
                     <div class="col-lg-6 col-md-12 p-0">
                         <form class="solar-form">

                             <div class="form-group">
                                 <div class="slider-container">
                                     <span class="bill">Average Monthly Electric Bill</span>
                                     <input type="range" min="50" max="500" value="50" step="10" class="range-slider"
                                         id="billSlider">
                                     <div class="slider-value">
                                         <span>₹100</span>
                                         <span>₹5000</span>
                                     </div>
                                     <span class="current" id="currentBill">Selected: ₹50/month</span>
                                 </div>
                             </div>
                             <div class="form-group">
                                 <label>Roof Type</label>
                                 <select class="form-select form-control">
                                     <option selected>Metal</option>
                                     <option value="1">Asphalt Shingle</option>
                                     <option value="2">Tile</option>
                                     <option value="3">Flat</option>
                                 </select>
                             </div>
                             <div class="form-group">
                                 <label>Shade Coverage</label>
                                 <select class="form-select form-control">
                                     <option selected>No Shade</option>
                                     <option value="1">Light Shade</option>
                                     <option value="2">Moderate Shade</option>
                                     <option value="3">Heavy Shade</option>
                                 </select>
                             </div>
                             <button type="submit" class="default-btn">
                                 <span class="left">
                                     <i class="ri-arrow-right-up-long-fill"></i>
                                 </span>
                                 Calculate My Savings
                                 <span class="right">
                                     <i class="ri-arrow-right-long-fill"></i>
                                 </span>
                             </button>
                         </form>
                     </div>
                     <div class="col-lg-6 col-md-12 p-0">
                         <div class="solar-result">
                             <div class="top">
                                 <img src="logo.png" alt="sun">
                                 <div class="savings-title text-dark">Your Estimated Savings</div>
                                 <div class="savings-amount" id="savingsAmount">₹1,500</div>
                             </div>
                             <ul class="list">
                                 <li>
                                     <span class="detail-label">25-Year Savings</span>
                                     <span class="detail-value" id="longTermSavings">₹42,800</span>
                                 </li>
                                 <li>
                                     <span class="detail-label">System Size</span>
                                     <span class="detail-value">7.2 kW</span>
                                 </li>
                                 <li>
                                     <span class="detail-label">Payback Period</span>
                                     <span class="detail-value">6.5 years</span>
                                 </li>
                                 <li>
                                     <span class="detail-label">Annual Savings</span>
                                     <span class="detail-value" id="annualSavings">₹1,712</span>
                                 </li>
                             </ul>
                             <div class="disclaimer">
                                 <p>*Estimates based on local electricity rates and solar incentives. Actual savings
                                     may
                                     vary.</p>
                             </div>
                         </div>
                     </div>
                 </div>
             </div>
         </div>
         <div class="solar-savings-calculator-shape">
             <img src="assets/images/lamp.png" alt="image">
         </div>
     </div> -->
     <!-- End Solar Savings Calculator Area -->

     <!-- Testimonial Layout 2 Section Start -->
     <div class="testimonial-layout2">
         <div class="container">
             <div class="row">
                 <div class="col-md-12">
                     <!-- Section Title Start -->
                     <div class="section-title">
                         <h3 class="wow fadeInUp">Our Testimonials</h3>
                         <h2 class="text-anime">See What People Say's About Us</h2>
                     </div>
                     <!-- Section Title End -->
                 </div>
             </div>

             <div class="row">
                 <div class="col-md-12">
                     <!-- Testimonial Slider Layout 2 Start -->
                     <div class="testimonial-slider2">
                         <div class="swiper">
                             <div class="swiper-wrapper">
                                 <!-- Testimonial Slide Start -->
                                 <div class="swiper-slide">
                                     <div class="testimonial-item2">
                                         <div class="testimonial-header">
                                             <div class="testimonial-author-image">
                                                 <img src="images/author-1.jpg" alt="">
                                             </div>

                                             <div class="testimonial-author-info">
                                                 <h3>Rahul Mehta</h3>
                                                 <p>Homeowner, Bareilly</p>
                                             </div>
                                         </div>

                                         <div class="testimonial-body">
                                             <p>“Jay Balaji Associates installed a 5kW rooftop system at my home,
                                                 and
                                                 the results have been outstanding.
                                                 My electricity bill dropped by nearly 80% within the first month.
                                                 The
                                                 entire process was smooth,
                                                 professional, and on time.”</p>
                                         </div>
                                     </div>
                                 </div>
                                 <!-- Testimonial Slide End -->


                                 <!-- Testimonial Slide Start -->
                                 <div class="swiper-slide">
                                     <div class="testimonial-item2">
                                         <div class="testimonial-header">
                                             <div class="testimonial-author-image">
                                                 <img src="images/author-2.jpg" alt="">
                                             </div>

                                             <div class="testimonial-author-info">
                                                 <h3>Anita Deshmukh</h3>
                                                 <p>Factory Owner, Uttar Pradesh</p>
                                             </div>
                                         </div>

                                         <div class="testimonial-body">
                                             <p>“We chose Jay Balaji Associates for our 50kW industrial solar
                                                 project
                                                 after comparing multiple vendors.
                                                 Their technical knowledge and dedication to quality really stood
                                                 out.
                                                 Our system is performing beyond
                                                 expectations.”</p>
                                         </div>
                                     </div>
                                 </div>
                                 <!-- Testimonial Slide End -->


                                 <!-- Testimonial Slide Start -->
                                 <div class="swiper-slide">
                                     <div class="testimonial-item2">
                                         <div class="testimonial-header">
                                             <div class="testimonial-author-image">
                                                 <img src="images/author-3.jpg" alt="">
                                             </div>

                                             <div class="testimonial-author-info">
                                                 <h3>Vikas Patel</h3>
                                                 <p>Commercial Client</p>
                                             </div>
                                         </div>

                                         <div class="testimonial-body">
                                             <p>“Excellent service from start to finish. Their team handled
                                                 documentation, net metering, installation,
                                                 and post-installation support very efficiently. I highly recommend
                                                 Jay
                                                 Balaji Associates for any
                                                 commercial solar needs.”</p>
                                         </div>
                                     </div>
                                 </div>
                                 <!-- Testimonial Slide End -->


                                 <!-- Testimonial Slide Start -->
                                 <div class="swiper-slide">
                                     <div class="testimonial-item2">
                                         <div class="testimonial-header">
                                             <div class="testimonial-author-image">
                                                 <img src="images/author-2.jpg" alt="">
                                             </div>

                                             <div class="testimonial-author-info">
                                                 <h3>Shreya Shah</h3>
                                                 <p>School Administrator</p>
                                             </div>
                                         </div>

                                         <div class="testimonial-body">
                                             <p>“Our school installed a 25kW solar plant through Jay Balaji
                                                 Associates,
                                                 and the experience was
                                                 exceptional. Their team explained everything in detail and ensured
                                                 zero
                                                 disruption during installation.”</p>
                                         </div>
                                     </div>
                                 </div>
                                 <!-- Testimonial Slide End -->

                             </div>

                             <div class="swiper-pagination"></div>
                         </div>
                     </div>
                     <!-- Testimonial Slider Layout 2 End -->
                 </div>
             </div>
         </div>
     </div>
     <!-- Testimonial Layout 2 Section End -->

     <div class="latest-post-layout3">
         <div class="container">
             <div class="row align-items-center section-title-row">
                 <div class="col-lg-12 ">
                     <!-- Section Title Start -->
                     <div class="section-title">
                         <h3 class="wow fadeInUp text-center">Recent Articles</h3>
                         <h2 class="text-anime text-center">Our Latest Blog</h2>
                     </div>
                     <!-- Section Title End -->
                 </div>
 
             </div>

             <div class="row">

              <?php
                    $blogs = mysqli_query(
                        $con, "SELECT * FROM blog ORDER BY id DESC"
                    ); 

                    while ($blog = mysqli_fetch_assoc($blogs)):
                        ?>
                 <div class="col-lg-4">
                    <a href="<?php path() ?>blog/<?php echo $blog['slug'] ?>" >
                      
                     <div class="post-item3 wow fadeInUp" data-wow-delay="0.4s">
                         <div class="post-featured-image">
                             <figure class="image-anime">
                                 <img src="<?php path(); ?>admin/assets/images/blog/<?php echo htmlspecialchars($blog['Image']); ?>" alt="<?php echo htmlspecialchars($blog['title']); ?>">
                             </figure>

                             <div class="blog-read-more"><img src="images/icon-right-2.svg" alt=""></div>
                         </div>

                         <div class="post-body">
                             <h2><?php echo htmlspecialchars($blog['title']); ?></h2>
                             <p><?php  echo html_entity_decode(  mb_strimwidth(strip_tags($blog['short_des']), 0, 120, '...')  ); ?></p>
                         </div>
                     </div>
                    </a>
                 </div>
                
                <?php endwhile; ?>
 
             </div>
         </div>
     </div>

     <!-- Infobar Section Start -->
     <div class="infobar">
         <div class="container">
             <div class="row">
                 <div class="col-md-12">
                     <div class="cta-box">
                         <div class="row align-items-center">
                             <div class="col-lg-4">
                                 <!-- CTA Image Start -->
                                 <div class="cta-image">
                                     <figure class="image-anime">
                                         <img src="images/cta-image.jpg" alt="">
                                     </figure>
                                 </div>
                                 <!-- CTA Image End -->
                             </div>

                             <div class="col-lg-8">
                                 <!-- CTA Content Start -->
                                 <div class="cta-content">
                                     <div class="phone-icon">
                                         <figure>
                                             <img src="images/icon-cta-phone.svg" alt="">
                                         </figure>
                                     </div>
                                     <h3>Have Questions? <span style="color:#ffa500">Call Us</span>
                                         <?php echo PHONE_DISPLAY; ?></h3>
                                     <p class="wow fadeInUp" data-wow-delay="0.25s">Your Reliable Partner for
                                         End-to-End
                                         Solar Energy Solutions</p>
                                 </div>
                                 <!-- CTA Content End -->
                             </div>
                         </div>
                     </div>
                 </div>
             </div>
         </div>
     </div>
     <!-- Infobar Section End -->

     <!-- Why Choose us Section Start -->
     <div class="why-choose-us">
         <div class="container">
             <div class="row">
                 <div class="col-md-12">
                     <!-- Section Title Start -->
                     <div class="section-title">
                         <h3 class="wow fadeInUp">Why Choose Us</h3>
                         <h2 class="text-anime">Providing Solar Energy Solutions</h2>
                     </div>
                     <!-- Section Title End -->
                 </div>
             </div>

             <div class="row">
                 <div class="col-lg-3 col-md-6">
                     <!-- Why Choose Item Start -->
                     <div class="why-choose-item wow fadeInUp" data-wow-delay="0.25s">
                         <div class="why-choose-image">
                             <img src="images/whyus-1.jpg" alt="">
                         </div>

                         <div class="why-choose-content">
                             <div class="why-choose-icon">
                                 <img src="images/icon-whyus-1.svg" alt="">
                             </div>

                             <h3>Efficiency & Power</h3>
                             <p>At Jay Balaji Associates, we deliver high-efficiency solar energy systems designed
                                 to
                                 generate maximum power output.</p>
                         </div>
                     </div>
                     <!-- Why Choose Item End -->
                 </div>

                 <div class="col-lg-3 col-md-6">
                     <!-- Why Choose Item Start -->
                     <div class="why-choose-item wow fadeInUp" data-wow-delay="0.5s">
                         <div class="why-choose-image">
                             <img src="images/whyus-2.jpg" alt="">
                         </div>

                         <div class="why-choose-content">
                             <div class="why-choose-icon">
                                 <img src="images/icon-whyus-2.svg" alt="">
                             </div>

                             <h3>Trust & Warranty</h3>
                             <p> We are a trusted solar energy company committed to transparency, reliability and
                                 long-lasting performance you can depend on.</p>
                         </div>
                     </div>
                     <!-- Why Choose Item End -->
                 </div>

                 <div class="col-lg-3 col-md-6">
                     <!-- Why Choose Item Start -->
                     <div class="why-choose-item wow fadeInUp" data-wow-delay="0.75s">
                         <div class="why-choose-image">
                             <img src="images/whyus-3.jpg" alt="">
                         </div>

                         <div class="why-choose-content">
                             <div class="why-choose-icon">
                                 <img src="images/icon-whyus-3.svg" alt="">
                             </div>

                             <h3>High Quality Work</h3>
                             <p> Jay Balaji Associates follows industry best practices and uses premium-grade
                                 components
                                 to ensure safe, durable, and high-performance solar installations.</p>
                         </div>
                     </div>
                     <!-- Why Choose Item End -->
                 </div>

                 <div class="col-lg-3 col-md-6">
                     <!-- Why Choose Item Start -->
                     <div class="why-choose-item wow fadeInUp" data-wow-delay="1.0s">
                         <div class="why-choose-image">
                             <img src="images/whyus-4.jpg" alt="">
                         </div>

                         <div class="why-choose-content">
                             <div class="why-choose-icon">
                                 <img src="images/icon-whyus-4.svg" alt="">
                             </div>

                             <h3>24*7 Support</h3>
                             <p>Our dedicated support team is available 24/7 to assist you with system monitoring,
                                 maintenance, and technical support.</p>
                         </div>
                     </div>
                     <!-- Why Choose Item End -->
                 </div>
             </div>
         </div>
     </div>
     <!-- Why Choose us Section End -->

     <style>
     .partner-section {
         padding: 60px 0; 
         overflow: hidden;
     }

     .partners-section h5::after {
         content: '';
         display: block;
         width: 40px;
         height: 4px;
         background-color: #0d6efd;
         margin: 10px auto 0;
         border-radius: 2px;
     }

     .partners-slider {
         overflow: hidden;
         position: relative;
         width: 100%;
     }

     .slide-track {
         display: flex;
         animation: scroll 10s linear infinite;
     }

     .slide {
         flex: 0 0 auto;
         height: 150px;
         width: 250px;
         display: flex;
         justify-content: center;
         align-items: center;
         border: 1px solid #eee;
         margin:10px;
     }

     .slide:hover {
       transition: transform 0.3s ease, filter 0.3s ease;
       border: 1px solid var(--primary-color);
     }

     .slide img {
         /* max-height: 60px; */
         max-width: 175px;
         object-fit: contain;
         filter: grayscale(0%);
         transition: transform 0.3s ease, filter 0.3s ease;
     }

     .slide img:hover {
         transform: scale(1.08);
         filter: grayscale(0%);
     }

     @keyframes scroll {
         0% {
             transform: translateX(0);
         }

         100% {
             transform: translateX(-50%);
         }
     }

     @media (max-width: 768px) {
         .slide {
             width: 180px;
         }

         .slide img {
             max-height: 50px;
         }
     }
     </style>


     <?php
    $partners = mysqli_query(
        $con,
        "SELECT logo FROM partner_logo WHERE status = 1 ORDER BY id ASC"
    );
    $logos = [];
    $noOfPartner = 0;
    $repeatTime = 0;
    while ($row = mysqli_fetch_assoc($partners)) {
        $logos[] = $row['logo'];
        $noOfPartner++;
    }

    if($noOfPartner <= 5){
        $repeatTime = 5;
    }else{
        $repeatTime = 3;
    }
    
    ?>

     <section class="partner-section">
         <div class="row">
             <div class="col-md-12">
                 <!-- Section Title Start -->
                 <div class="section-title">
                     <h3 class="wow fadeInUp">Partners</h3>
                     <h2 class="text-anime">Our Partners</h2>
                 </div>
                 <!-- Section Title End -->
             </div>
         </div>
         <div class="partners-slider mt-4">
             <div class="slide-track">

                 <?php 
                for ($i = 0; $i < $repeatTime; $i++):
                    foreach ($logos as $logo):
                ?>
                 <div class="slide">
                     <img src="<?php echo path(); ?>admin/assets/images/partner_logo/<?php echo htmlspecialchars($logo); ?>"
                         alt="Partner Logo">
                 </div>
                 <?php
                    endforeach;
                endfor;
                ?>

             </div>
         </div>
     </section>

     <!-- Footer Ticker Start -->
     <!-- <div class="footer-ticker">
        <div class="scrolling-ticker">
            <div class="scrolling-ticker-box">
                <div class="scrolling-content">
                    <span>Generate Your Own Power</span>
                    <span>Reap the Returns</span>
                    <span>Heal the World</span>
                    <span>Efficiency & Power</span>
                    <span>24*7 Support</span>
                </div>

                <div class="scrolling-content">
                    <span>Generate Your Own Power</span>
                    <span>Reap the Returns</span>
                    <span>Heal the World</span>
                    <span>Efficiency & Power</span>
                    <span>24*7 Support</span>
                </div>
            </div>
        </div>
    </div> -->
     <!-- Footer Ticker End -->
 </div>


 <?php include_once('include/footer.php') ?>