<section class="testimonials-section py-5">

    <div class="container">

        <!-- Section Heading -->
        <div class="row justify-content-center text-center mb-5">

            <div class="col-lg-7">

                <span class="section-subtitle">
                    TESTIMONIALS
                </span>

                <h2 class="section-title mt-3">
                    What Our
                    <span>Happy Clients Say</span>
                </h2>

                <p class="section-description mt-3">
                    We take pride in delivering unforgettable experiences.
                    Here's what our valued clients say about our catering
                    and event management services.
                </p>

            </div>

        </div>

        <div class="swiper testimonialSwiper">

            <div class="swiper-wrapper">

                @forelse($testimonials as $testimonial)

                    <div class="swiper-slide">

                        <div class="testimonial-card">

                            <!-- Rating -->
                            <div class="stars">

                                @for($i = 1; $i <= 5; $i++)
                                    @if($i <= $testimonial->rating)
                                        <i class="fas fa-star text-warning"></i>
                                    @else
                                        <i class="far fa-star text-warning"></i>
                                    @endif
                                @endfor

                            </div>

                            <!-- Feedback -->
                            <p class="testimonial-text">

                                "{{ $testimonial->message }}"

                            </p>

                            <!-- Customer -->
                            <div class="client-info">

                                @if($testimonial->image)

                                    <img src="{{ asset($testimonial->image) }}"
                                         alt="{{ $testimonial->name }}">

                                @else

                                    <img src="{{ asset('frontend/images/testimonials/client-3.png') }}"
                                         alt="{{ $testimonial->name }}">

                                @endif

                                <div>

                                    <h5>{{ $testimonial->name }}</h5>

                                    <span>{{ $testimonial->designation }}</span>

                                </div>

                            </div>

                        </div>

                    </div>

                @empty

                    <div class="swiper-slide">

                        <div class="testimonial-card text-center">

                            <p>No testimonials available yet.</p>

                        </div>

                    </div>

                @endforelse

            </div>

            <!-- Pagination -->
            <div class="swiper-pagination"></div>

        </div>

    </div>

</section>