<?php $__env->startSection('title', 'Workshops'); ?>
<?php $__env->startSection('meta_description', 'Join Auromon Chakrabarti\'s transformative healing workshops – online and in-person in South Delhi. Chakra healing, meditation, emotional wellness and more.'); ?>

<?php $__env->startSection('content'); ?>

<div class="page-hero">
    <div class="container">
        <h1>Workshops</h1>
        <p class="lead mt-2">Transformative group healing experiences</p>
        <nav aria-label="breadcrumb"><ol class="breadcrumb justify-content-center mb-0">
            <li class="breadcrumb-item"><a href="<?php echo e(route('home')); ?>" class="text-warning">Home</a></li>
            <li class="breadcrumb-item active text-white">Workshops</li>
        </ol></nav>
    </div>
</div>

<!-- Upcoming Workshops -->
<section class="py-5" style="background:var(--light-bg)">
    <div class="container">
        <h2 class="section-title text-center mb-5">Upcoming Workshops</h2>

        <?php if($upcoming->count()): ?>
        <div class="row g-4 mt-3">
            <?php $__currentLoopData = $upcoming; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $w): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
            <div class="col-lg-6">
                <div class="card border-0 shadow-sm h-100 overflow-hidden" style="border-radius:14px">
                    <div class="row g-0 h-100">
                        <div class="col-md-5">
                            <?php if($w->image): ?>
                                <img src="<?php echo e(asset('storage/'.$w->image)); ?>" class="img-fluid h-100" style="object-fit:cover" alt="<?php echo e($w->title); ?>">
                            <?php else: ?>
                                <div class="d-flex align-items-center justify-content-center h-100"
                                     style="min-height:200px;background:linear-gradient(135deg,#f0e8f7,#e8d4f5)">
                                    <i class="fas fa-hands-praying fa-3x" style="color:var(--purple-dark);opacity:0.5"></i>
                                </div>
                            <?php endif; ?>
                        </div>
                        <div class="col-md-7">
                            <div class="card-body p-4">
                                <div class="d-flex gap-2 mb-2">
                                    <span class="badge" style="background:var(--gold);color:var(--purple-dark)">
                                        <?php echo e($w->is_online ? 'Online' : 'In-Person'); ?>

                                    </span>
                                    <?php if($w->price == 0): ?>
                                    <span class="badge bg-success">Free</span>
                                    <?php endif; ?>
                                </div>
                                <h5 class="card-title" style="color:var(--purple-dark)"><?php echo e($w->title); ?></h5>
                                <p class="card-text text-muted small"><?php echo e($w->short_description); ?></p>
                                <ul class="list-unstyled small mt-3">
                                    <?php if($w->workshop_date): ?>
                                    <li class="mb-1"><i class="fas fa-calendar-alt me-2" style="color:var(--purple-dark)"></i><?php echo e($w->workshop_date->format('D, d M Y')); ?></li>
                                    <li class="mb-1"><i class="fas fa-clock me-2" style="color:var(--purple-dark)"></i><?php echo e($w->workshop_date->format('h:i A')); ?></li>
                                    <?php endif; ?>
                                    <?php if($w->duration): ?>
                                    <li class="mb-1"><i class="fas fa-hourglass-half me-2" style="color:var(--purple-dark)"></i><?php echo e($w->duration); ?></li>
                                    <?php endif; ?>
                                    <?php if($w->venue): ?>
                                    <li class="mb-1"><i class="fas fa-map-marker-alt me-2" style="color:var(--purple-dark)"></i><?php echo e($w->venue); ?></li>
                                    <?php endif; ?>
                                    <?php if($w->seats_available): ?>
                                    <li class="mb-1"><i class="fas fa-users me-2" style="color:var(--purple-dark)"></i><?php echo e($w->seats_available); ?> seats available</li>
                                    <?php endif; ?>
                                </ul>
                                <?php if($w->price > 0): ?>
                                <p class="fw-bold mb-3" style="color:var(--purple-dark);font-size:1.2rem">₹<?php echo e(number_format($w->price)); ?></p>
                                <?php endif; ?>
                                <!-- Booking Form (inline collapse) -->
                                <button class="btn btn-primary btn-sm w-100" type="button"
                                        data-bs-toggle="collapse" data-bs-target="#book<?php echo e($w->id); ?>">
                                    Book Your Seat
                                </button>
                            </div>
                            <div class="collapse" id="book<?php echo e($w->id); ?>">
                                <div class="card-body pt-0 px-4 pb-4">
                                    <?php if(session('success')): ?>
                                    <div class="alert alert-success small py-2"><?php echo e(session('success')); ?></div>
                                    <?php endif; ?>
                                    <form action="<?php echo e(route('workshop.book', $w->id)); ?>" method="POST">
                                        <?php echo csrf_field(); ?>
                                        <div class="mb-2">
                                            <input type="text" name="name" class="form-control form-control-sm" placeholder="Your Name" required>
                                        </div>
                                        <div class="mb-2">
                                            <input type="email" name="email" class="form-control form-control-sm" placeholder="Email" required>
                                        </div>
                                        <div class="mb-2">
                                            <input type="tel" name="phone" class="form-control form-control-sm" placeholder="Phone" required>
                                        </div>
                                        <button type="submit" class="btn btn-gold btn-sm w-100">Confirm Booking</button>
                                    </form>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
        </div>
        <?php else: ?>
        <!-- Default placeholder workshops when DB is empty -->
        <div class="row g-4 mt-3">
            <?php
            $demoWorkshops = [
                ['title'=>'Chakra Awakening & Balancing Workshop','type'=>'Online','price'=>'₹2,500','date'=>'Every 2nd Saturday','time'=>'11 AM – 1 PM','duration'=>'2 Hours','seats'=>15,
                 'desc'=>'A deep-dive into the 7 chakra system. Learn to identify blockages, balance your energy centres through guided meditation, breathwork and healing visualisations.'],
                ['title'=>'Emotional Freedom – Release & Heal','type'=>'Online','price'=>'₹1,800','date'=>'Every Sunday','time'=>'5 PM – 7 PM','duration'=>'2 Hours','seats'=>12,
                 'desc'=>'A compassionate group healing journey to identify, express and release trapped emotions — including grief, fear, anger and shame — and return to your natural state of peace.'],
                ['title'=>'Inner Child Healing Intensive','type'=>'In-Person – Anand Niketan','price'=>'₹4,500','date'=>'Last Saturday of Month','time'=>'10 AM – 4 PM','duration'=>'6 Hours','seats'=>8,
                 'desc'=>'A full-day immersive workshop to heal the wounded inner child. Includes guided regression, journaling, art therapy and group sharing. Limited to 8 participants for depth of work.'],
                ['title'=>'Meditation for Modern Life','type'=>'Online','price'=>'Free','date'=>'Every Wednesday','time'=>'7:30 PM – 8:30 PM','duration'=>'1 Hour','seats'=>25,
                 'desc'=>'A free weekly online meditation session for beginners and experienced practitioners. Each week focuses on a different technique — breath, body scan, loving-kindness, visualisation.'],
            ];
            ?>
            <?php $__currentLoopData = $demoWorkshops; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $i => $w): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
            <div class="col-lg-6">
                <div class="card border-0 shadow-sm h-100" style="border-radius:14px">
                    <div class="card-body p-4">
                        <div class="d-flex gap-2 mb-2">
                            <span class="badge" style="background:var(--gold);color:var(--purple-dark)"><?php echo e($w['type']); ?></span>
                            <?php if($w['price'] === 'Free'): ?>
                            <span class="badge bg-success">Free</span>
                            <?php endif; ?>
                        </div>
                        <h5 class="card-title" style="color:var(--purple-dark)"><?php echo e($w['title']); ?></h5>
                        <p class="card-text text-muted small"><?php echo e($w['desc']); ?></p>
                        <ul class="list-unstyled small mt-3 mb-0">
                            <li class="mb-1"><i class="fas fa-calendar-alt me-2" style="color:var(--purple-dark)"></i><?php echo e($w['date']); ?></li>
                            <li class="mb-1"><i class="fas fa-clock me-2" style="color:var(--purple-dark)"></i><?php echo e($w['time']); ?></li>
                            <li class="mb-1"><i class="fas fa-hourglass-half me-2" style="color:var(--purple-dark)"></i><?php echo e($w['duration']); ?></li>
                            <li class="mb-1"><i class="fas fa-users me-2" style="color:var(--purple-dark)"></i><?php echo e($w['seats']); ?> seats available</li>
                        </ul>
                        <?php if($w['price'] !== 'Free'): ?>
                        <p class="fw-bold mt-3 mb-3" style="color:var(--purple-dark);font-size:1.2rem"><?php echo e($w['price']); ?></p>
                        <?php endif; ?>
                    </div>
                    <div class="card-footer bg-white border-0 px-4 pb-4">
                        <a href="<?php echo e(route('contact')); ?>" class="btn btn-primary w-100">
                            <?php echo e($w['price'] === 'Free' ? 'Register Free' : 'Book Your Seat'); ?>

                        </a>
                    </div>
                </div>
            </div>
            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
        </div>
        <?php endif; ?>
    </div>
</section>

<!-- Past Workshops -->
<?php if(isset($past) && $past->count()): ?>
<section class="py-5">
    <div class="container">
        <h2 class="section-title text-center mb-5">Past Workshops</h2>
        <div class="row g-4 mt-3">
            <?php $__currentLoopData = $past; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $w): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
            <div class="col-md-6 col-lg-4">
                <div class="card service-card h-100 opacity-85">
                    <div class="card-body p-4 text-center">
                        <span class="badge bg-secondary mb-2">Completed</span>
                        <h6 class="card-title mt-2"><?php echo e($w->title); ?></h6>
                        <p class="small text-muted"><?php echo e($w->workshop_date->format('d M Y')); ?></p>
                    </div>
                </div>
            </div>
            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
        </div>
    </div>
</section>
<?php endif; ?>

<!-- Custom Workshop CTA -->
<section class="py-5 text-center" style="background:var(--light-bg)">
    <div class="container col-lg-7">
        <i class="fas fa-users fa-2x mb-3" style="color:var(--purple-dark)"></i>
        <h2 class="section-title mb-4">Corporate & Group Workshops</h2>
        <p class="lead text-muted mt-4">Looking for a customised healing or wellness workshop for your organisation, school or community group? Taanya offers tailored programs for stress management, emotional intelligence, team cohesion and more.</p>
        <a href="<?php echo e(route('contact')); ?>" class="btn btn-primary btn-lg px-5 mt-3">Enquire About Custom Workshops</a>
    </div>
</section>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('layouts.app', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH /home/rahobefi/floraresidency/resources/views/pages/workshops.blade.php ENDPATH**/ ?>