<?php $__env->startSection('title', 'Home'); ?>

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





<?php if($slides->count()): ?>
<div id="heroSlider" class="carousel slide" data-bs-ride="carousel">
    <div class="carousel-inner">
        <?php $__currentLoopData = $slides; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $index => $slider): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
        <div class="carousel-item <?php echo e($index === 0 ? 'active' : ''); ?>">
            <div class="position-relative">
                <img src="<?php echo e(asset('storage/'.$slider->image)); ?>" class="w-100" style="height:85vh;object-fit:cover" alt="<?php echo e($slider->title); ?>">
                <div class="position-absolute top-0 start-0 w-100 h-100" style="background:linear-gradient(to right, rgba(0,0,0,.65), rgba(0,0,0,.25));"></div>
                <div class="carousel-caption text-start text-light animate__animated animate__fadeInLeft">
                    <h1 class="display-4 fw-bold"><?php echo e($slider->title); ?></h1>
                    <?php if($slider->subtitle): ?>
                        <p class="lead"><?php echo e($slider->subtitle); ?></p>
                    <?php endif; ?>
                    <?php if($slider->button_text && $slider->button_link): ?>
                        <a href="<?php echo e($slider->button_link); ?>" class="btn btn-warning btn-lg me-2 shadow"><?php echo e($slider->button_text); ?></a>
                    <?php endif; ?>
                </div>
            </div>
        </div>
        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
    </div>
    <button class="carousel-control-prev" type="button" data-bs-target="#heroSlider" data-bs-slide="prev">
        <span class="carousel-control-prev-icon"></span>
    </button>
    <button class="carousel-control-next" type="button" data-bs-target="#heroSlider" data-bs-slide="next">
        <span class="carousel-control-next-icon"></span>
    </button>
</div>
<?php endif; ?>


<?php if($about): ?>
<section class="py-5 bg-light">
    <div class="container">
        <div class="row align-items-center g-4">
            <div class="col-md-6 animate__animated animate__fadeInLeft">
                <img src="<?php echo e(asset('storage/'.$about->image)); ?>" class="img-fluid rounded shadow-sm" alt="<?php echo e($about->title); ?>">
            </div>
            <div class="col-md-6 animate__animated animate__fadeInRight">
                <h6 class="text-success fw-bold mb-2">Who We Are</h6>
                <h2 class="fw-bold mb-3"><?php echo e($about->title); ?></h2>
                <p class="text-muted"><?php echo e($about->description); ?></p>
                <a href="<?php echo e(route('frontend.about')); ?>" class="btn btn-success mt-3 shadow">Read More</a>
            </div>
        </div>
    </div>
</section>
<?php endif; ?>



<section class="py-5">
    <div class="container">
        
        <div class="text-center mb-5 animate__animated animate__fadeInDown">
            <h2 class="fw-bold">Our Services</h2>
            
        </div>

        
        <div class="row justify-content-left">
            <div class="col-md-12 animate__animated animate__fadeInUp">
                <ul class="list-group list-group-numbered shadow-sm">
                    <?php $__currentLoopData = $services; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $service): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                    <li class="list-group-item d-flex justify-content-between align-items-start mb-2 rounded">
                        <div class="ms-2 me-auto">
                            <div class="fw-bold"><?php echo e($service->title); ?></div>
                            <?php if($service->description): ?>
                            
                            <?php endif; ?>
                        </div>
                        <a href="<?php echo e(route('frontend.services.show', ['slug' => $service->slug])); ?>" 
                           class="btn btn-sm btn-outline-success">Read More</a>
                    </li>
                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                </ul>
            </div>
        </div>
    </div>
</section>



<section class="py-5 bg-light">
    <div class="container">
        <div class="text-center mb-5 animate__animated animate__fadeInDown">
            <h2 class="fw-bold">Latest Blog Posts</h2>
        </div>
        <div class="row g-4">
            <?php $__empty_1 = true; $__currentLoopData = $blogs; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $blog): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
            <div class="col-md-4 animate__animated animate__fadeInUp">
                <div class="card h-100 shadow-sm border-0 hover-shadow">
                    <?php if($blog->image): ?>
                        <img src="<?php echo e(asset('storage/'.$blog->image)); ?>" class="card-img-top" alt="<?php echo e($blog->title); ?>" loading="lazy">
                    <?php endif; ?>
                    <div class="card-body">
                        <h5 class="card-title fw-bold"><?php echo e($blog->title); ?></h5>
                        <p class="card-text text-muted"><?php echo e($blog->excerpt); ?></p>
                        <a href="<?php echo e(route('frontend.blog_detail', $blog->slug)); ?>" class="btn btn-primary btn-sm shadow">Read More</a>
                    </div>
                </div>
            </div>
            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
            <div class="col-12 text-center">
                <p class="text-muted">No blogs available at the moment.</p>
            </div>
            <?php endif; ?>
        </div>
    </div>
</section>


<section class="py-5">
    <div class="container">
        <div class="text-center mb-5 animate__animated animate__fadeInDown">
            <h2 class="fw-bold">Featured Products</h2>
        </div>
        <div class="row g-4">
            <?php $__empty_1 = true; $__currentLoopData = $featuredProducts; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $product): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
            <div class="col-md-3 animate__animated animate__fadeInUp">
                <div class="card h-100 shadow-sm border-0 hover-shadow">
                    <?php if($product->image): ?>
                        <img src="<?php echo e(asset('storage/'.$product->image)); ?>" class="card-img-top" alt="<?php echo e($product->name); ?>" loading="lazy">
                    <?php endif; ?>
                    <div class="card-body text-center">
                        <h6 class="fw-bold"><?php echo e($product->name); ?></h6>
                        <p class="text-success fw-bold">Tsh <?php echo e(number_format($product->price,2)); ?>/=</p>
                        <a href="<?php echo e(route('frontend.product_detail', $product->id)); ?>" class="btn btn-warning btn-sm shadow">View Product</a>
                    </div>
                </div>
            </div>
            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
            <div class="col-12 text-center">
                <p class="text-muted">No products available at the moment.</p>
            </div>
            <?php endif; ?>
        </div>
    </div>
</section>




    

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


<?php $__env->startPush('styles'); ?>
<style>
.hover-shadow:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    transition: 0.3s;
}
.card-img-top {
    object-fit: cover;
    height: 200px;
}
.service-number {
    font-size: 1.25rem;
}
</style>
<?php $__env->stopPush(); ?>

<?php echo $__env->make('frontend.layouts.app', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH /usr/local/var/www/memafarms/resources/views/frontend/home.blade.php ENDPATH**/ ?>