

<?php $__env->startSection('page_title', 'Events'); ?>
<?php $__env->startSection('page_subtitle', 'Join our upcoming community actions, workshops, and volunteer programs.'); ?>

<?php $__env->startSection('content'); ?>
<section class="section" style="padding-top: 60px;">
    <div class="container">
        <div class="page-header" style="text-align: center; margin-bottom: 50px;">
            <?php if(auth()->guard()->check()): ?>
                <div style="margin-top: 20px;">
                    <a class="button button-primary" href="<?php echo e(route('events.create')); ?>">+ Create New Event</a>
                </div>
            <?php endif; ?>
        </div>

        <?php if(session('success')): ?>
            <div class="alert alert-success"><?php echo e(session('success')); ?></div>
        <?php endif; ?>

        <div class="blog-grid">
            <?php $__empty_1 = true; $__currentLoopData = $events; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $event): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
                <article class="post-card">
                    <?php if($event->image_path): ?>
                        <div class="post-card-image">
                            <img src="<?php echo e(asset('storage/' . $event->image_path)); ?>" alt="<?php echo e($event->title); ?>">
                        </div>
                    <?php endif; ?>
                    <div class="post-card-content">
                        <div style="font-size: 0.85rem; color: #00bcd4; font-weight: 700; text-transform: uppercase; margin-bottom: 10px;">
                            <?php echo e($event->event_date->format('M d, Y')); ?> <?php if($event->event_time): ?> at <?php echo e(date('h:i A', strtotime($event->event_time))); ?> <?php endif; ?>
                        </div>
                        <h2><?php echo e($event->title); ?></h2>
                        <p><?php echo e(Str::limit($event->description, 120)); ?></p>
                        <div style="display: flex; justify-content: space-between; align-items: center; margin-top: auto;">
                            <?php if($event->location): ?>
                                <div style="font-size: 0.9rem; color: #888; display: flex; align-items: center; gap: 5px;">
                                    📍 <?php echo e($event->location); ?>

                                </div>
                            <?php endif; ?>
                            <?php if(auth()->guard()->check()): ?>
                                <form action="<?php echo e(route('events.destroy', $event)); ?>" method="POST" onsubmit="return confirm('Are you sure you want to delete this event?')">
                                    <?php echo csrf_field(); ?>
                                    <?php echo method_field('DELETE'); ?>
                                    <button type="submit" style="background: none; border: none; color: #ff4d4d; cursor: pointer; font-weight: 700; font-size: 0.85rem; text-transform: uppercase;">Delete</button>
                                </form>
                            <?php endif; ?>
                        </div>
                    </div>
                </article>
            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
                <div class="empty-state" style="grid-column: 1 / -1;">
                    <div style="font-size: 4rem; margin-bottom: 20px;">📅</div>
                    <p>No upcoming events at the moment. Check back soon!</p>
                </div>
            <?php endif; ?>
        </div>

        <div style="margin-top: 100px; border-top: 1px solid #eee; padding-top: 60px;">
            <div class="page-grid">
                <article>
                    <h2>Event Calendar</h2>
                    <p>Our calendar shows workshops, fundraisers, and community meetups. We update this regularly to keep you informed about our latest activities.</p>
                </article>
                <article>
                    <h2>Attendance Guidelines</h2>
                    <p>Follow the guidelines to register and participate safely in our events. We prioritize the safety and well-being of all participants.</p>
                </article>
            </div>
        </div>
    </div>
</section>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('layouts.app', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH C:\wamp64\www\Touchfoundation\resources\views/pages/events.blade.php ENDPATH**/ ?>