<?php $__env->startSection('title', 'Blog | Dr. Rajan Shah'); ?>
<?php $__env->startSection('content'); ?>
<div class="bg-teal-50 py-16">
    <div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 text-center">
        <h1 class="text-4xl font-extrabold text-teal-900 sm:text-5xl">Our Blog</h1>
        <p class="mt-4 max-w-2xl text-xl text-gray-500 mx-auto">Read the latest articles, health tips, and news.</p>
    </div>
</div>

<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-12">
    <div class="grid gap-8 md:grid-cols-2 lg:grid-cols-3">
        <?php $__empty_1 = true; $__currentLoopData = $blogs; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $blog): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
        <div class="bg-white rounded-lg shadow-md overflow-hidden flex flex-col transition hover:shadow-lg">
            <?php if($blog->image_url): ?>
                <img class="h-48 w-full object-cover object-top" src="<?php echo e($blog->image_url); ?>" alt="<?php echo e($blog->title); ?>">
            <?php else: ?>
                <div class="h-48 w-full bg-teal-100 flex items-center justify-center">
                    <span class="text-teal-500 text-4xl"><i class="fas fa-newspaper"></i></span>
                </div>
            <?php endif; ?>
            <div class="p-6 flex-1 flex flex-col">
                <p class="text-sm font-medium text-teal-600 mb-1">
                    <?php echo e($blog->created_at->format('M d, Y')); ?>

                </p>
                <a href="<?php echo e(route('blogs.show', $blog->slug)); ?>" class="block mt-2 flex-1">
                    <p class="text-xl font-semibold text-gray-900 hover:text-teal-700 transition"><?php echo e($blog->title); ?></p>
                    <p class="mt-3 text-base text-gray-500 line-clamp-3">
                        <?php echo e($blog->meta_description ?? Str::limit(strip_tags($blog->content), 120)); ?>

                    </p>
                </a>
                <div class="mt-6">
                    <a href="<?php echo e(route('blogs.show', $blog->slug)); ?>" class="text-teal-600 hover:text-teal-800 font-medium">Read full article &rarr;</a>
                </div>
            </div>
        </div>
        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
        <div class="col-span-full text-center py-12">
            <p class="text-gray-500 text-lg">No blog posts available at the moment. Please check back later!</p>
        </div>
        <?php endif; ?>
    </div>
    
    <div class="mt-12">
        <?php echo e($blogs->links()); ?>

    </div>
</div>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('layouts.app', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH /Users/sumankc/Desktop/ Websites/Dr Rajan/resources/views/blogs/index.blade.php ENDPATH**/ ?>