@extends('layouts.app')
@section('title', 'Testimonials')
@section('meta_description', 'Read what clients say about Auromon Chakrabarti\'s Innerharmony healing and counselling sessions. Genuine Google reviews and client stories.')

@section('content')

<div class="page-hero">
    <div class="container">
        <h1>Client Testimonials</h1>
        <p class="lead mt-2">Real stories of healing and transformation</p>
        <nav aria-label="breadcrumb"><ol class="breadcrumb justify-content-center mb-0">
            <li class="breadcrumb-item"><a href="{{ route('home') }}" class="text-warning">Home</a></li>
            <li class="breadcrumb-item active text-white">Testimonials</li>
        </ol></nav>
    </div>
</div>

<!-- Rating Summary -->
<section class="py-4 border-bottom">
    <div class="container">
        <div class="row align-items-center text-center g-4">
            <div class="col-md-3">
                <div class="display-3 fw-bold" style="color:var(--purple-dark);font-family:'Playfair Display',serif">4.9</div>
                <div class="text-warning fs-5">★★★★★</div>
                <div class="text-muted small">Average Rating</div>
            </div>
            <div class="col-md-3">
                <div class="display-3 fw-bold" style="color:var(--purple-dark);font-family:'Playfair Display',serif">200+</div>
                <div class="text-muted small">Happy Clients</div>
            </div>
            <div class="col-md-3">
                <div class="display-3 fw-bold" style="color:var(--purple-dark);font-family:'Playfair Display',serif">5★</div>
                <div class="text-muted small">Google Reviews</div>
            </div>
            <div class="col-md-3">
                <a href="" target="_blank" class="btn btn-primary px-4">
                    <i class="fab fa-google me-2"></i>Leave a Review
                </a>
            </div>
        </div>
    </div>
</section>

<!-- Testimonials Grid -->
<section class="py-5" style="background:var(--light-bg)">
    <div class="container">
        <div class="row g-4">
            @forelse($testimonials as $t)
            <div class="col-md-6 col-lg-4">
                <div class="testimonial-card h-100 d-flex flex-column">
                    <div class="mb-2 text-warning">
                        @for($i = 1; $i <= 5; $i++)
                            <i class="{{ $i <= $t->rating ? 'fas' : 'far' }} fa-star"></i>
                        @endfor
                    </div>
                    <p class="fst-italic flex-grow-1 mb-3">"{{ $t->review }}"</p>
                    <div class="d-flex align-items-center gap-3 mt-auto">
                        <div class="rounded-circle d-flex align-items-center justify-content-center fw-bold text-white flex-shrink-0"
                             style="width:44px;height:44px;background:var(--purple-dark)">
                            {{ strtoupper(substr($t->name, 0, 1)) }}
                        </div>
                        <div>
                            <div class="fw-bold small">{{ $t->name }}</div>
                            @if($t->location)
                            <div class="text-muted" style="font-size:0.78rem">{{ $t->location }}</div>
                            @endif
                            <div class="text-muted" style="font-size:0.75rem">
                                <i class="fab fa-google me-1"></i>{{ $t->source }}
                                @if($t->review_date) · {{ $t->review_date->format('M Y') }} @endif
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            @empty
            @php
            $sampleReviews = [
                ['name'=>'Paras Taneja','location'=>'Delhi','date'=>'March 2024','review'=>'I was at a very low phase in life. Auromon Chakrabarti\'s sessions — a beautiful blend of counselling, chakra healing and hypnotherapy — gradually shifted me from a state of hopelessness to a genuinely hopeful person. I am forever grateful.'],
                ['name'=>'Meera Sharma','location'=>'Gurugram','date'=>'Jan 2024','review'=>'Auromon Chakrabarti has a rare ability to hold space without judgment. Her work on my inner child healing was profoundly transformative. I feel lighter, more compassionate with myself, and more joyful than I have in years.'],
                ['name'=>'Rohan Malhotra','location'=>'Mumbai','date'=>'Dec 2023','review'=>'I had severe anxiety and couldn\'t sleep for months. After just 4 sessions of hypnotherapy and NLP with Auromon Chakrabarti, I experienced a shift I can only describe as miraculous. Highly recommended.'],
                ['name'=>'Priya Kapoor','location'=>'Bengaluru (Online)','date'=>'Feb 2024','review'=>'I was sceptical about online healing sessions, but Auromon Chakrabarti\'s presence and expertise translate perfectly through the screen. The chakra balancing work was deeply relaxing and I noticed changes in my emotional patterns within days.'],
                ['name'=>'Ananya Verma','location'=>'Delhi','date'=>'Nov 2023','review'=>'Auromon Chakrabarti helped me heal a 20-year-old wound around my father through inner child work. I walked in carrying a weight I didn\'t even know I was carrying. I walked out free. That\'s the only way I can describe it.'],
                ['name'=>'Sanjay & Riya Mehta','location'=>'Delhi','date'=>'Oct 2023','review'=>'We attended pre-marital counselling with Auromon Chakrabarti before our wedding. It gave us tools, language and frameworks for communication that have genuinely strengthened our relationship. Wish more couples did this.'],
            ];
            @endphp
            @foreach($sampleReviews as $r)
            <div class="col-md-6 col-lg-4">
                <div class="testimonial-card h-100 d-flex flex-column">
                    <div class="mb-2 text-warning">★★★★★</div>
                    <p class="fst-italic flex-grow-1 mb-3">"{{ $r['review'] }}"</p>
                    <div class="d-flex align-items-center gap-3 mt-auto">
                        <div class="rounded-circle d-flex align-items-center justify-content-center fw-bold text-white flex-shrink-0"
                             style="width:44px;height:44px;background:var(--purple-dark)">
                            {{ strtoupper(substr($r['name'], 0, 1)) }}
                        </div>
                        <div>
                            <div class="fw-bold small">{{ $r['name'] }}</div>
                            <div class="text-muted" style="font-size:0.78rem">{{ $r['location'] }}</div>
                            <div class="text-muted" style="font-size:0.75rem">
                                <i class="fab fa-google me-1"></i>Google · {{ $r['date'] }}
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            @endforeach
            @endforelse
        </div>

        <!-- Pagination -->
        @if($testimonials instanceof \Illuminate\Pagination\LengthAwarePaginator && $testimonials->hasPages())
        <div class="d-flex justify-content-center mt-5">
            {{ $testimonials->links() }}
        </div>
        @endif
    </div>
</section>

<!-- CTA -->
<section class="py-5 text-white text-center" style="background:linear-gradient(135deg,var(--purple-dark),var(--purple-medium))">
    <div class="container col-lg-7">
        <h2 class="mb-3">Begin Your Own Transformation</h2>
        <p class="lead mb-4" style="opacity:0.9">Join thousands who have already experienced healing and growth with Auromon Chakrabarti.</p>
        <a href="{{ route('contact') }}" class="btn btn-gold btn-lg px-5">Book a Session</a>
    </div>
</section>
@endsection
