




<?php $__env->startSection('section'); ?>
    <!-- Breadcrumb Start -->
    <div class="breadcrumb-wrap">
        <div class="container">
            <ul class="breadcrumb">
                <li class="breadcrumb-item"><a href="#">Home</a></li>
                <li class="breadcrumb-item"><a href="#">News</a></li>
                <li class="breadcrumb-item active">Category</li>
            </ul>
        </div>
    </div>
    <!-- Breadcrumb End -->

    <!-- Single News Start-->
    <div class="single-news">
        <div class="container">
            <div class="row">
                <div class="col-lg-8">
                    <div class="row">
                        <?php $__currentLoopData = $posts; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $post): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                            <div class="cat-post">
                                <div class="cat-post-img">
                                    <img src="<?php echo e(asset('storage/' . $post->featured_image)); ?>" alt="<?php echo e($post->title); ?>" />
                                </div>
                                <div class="cat-post-content">
                                    <!-- Post Title -->
                                    <div class="cat-post-title">
                                        <a href="<?php echo e(route('post.view', $post->slug)); ?>"><?php echo e(Str::limit($post->title, 50)); ?></a>
                                    </div>

                                    <!-- Post Metadata -->
                                    <div class="cat-post-meta">
                                        <!-- Category -->
                                        <div class="meta-item">
                                            <i class="fa fa-folder"></i>
                                            <a
                                                href="<?php echo e(route('category', $post->category->slug)); ?>"><?php echo e($post->category->name); ?></a>
                                        </div>

                                        <!-- Views -->
                                        <div class="meta-item">
                                            <i class="fa fa-eye"></i>
                                            <?php echo e($post->views); ?> views
                                        </div>

                                        <!-- Author -->
                                        <div class="meta-item">
                                            <i class="fa fa-user"></i>
                                            <?php echo e($post->author->name); ?>

                                        </div>

                                        <!-- Created Date -->
                                        <div class="meta-item">
                                            <i class="fa fa-calendar"></i>
                                            <?php echo e($post->created_at->format('M d, Y')); ?>

                                        </div>
                                    </div>

                                    <!-- Post Description -->
                                    <div class="cat-post-desc">
                                        <p><?php echo e(Str::limit(strip_tags($post->content), 150)); ?></p>
                                    </div>
                                </div>
                            </div>
                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                    </div>
                    
                    
                </div>


                <div class="col-lg-4">
                    <div class="sidebar">
                        <div class="sidebar-widget">
                            <h2 class="sw-title">In This Category</h2>
                            <div class="news-list">
                                <?php $__currentLoopData = $relatedPosts; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $rpost): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                    <div class="nl-item">
                                        <div class="nl-img">
                                            <img src="<?php echo e(asset('storage/' . $rpost->featured_image)); ?>"
                                                alt="<?php echo e($rpost->title); ?>">
                                        </div>
                                        <div class="nl-title">
                                            <a
                                                href="<?php echo e(route('post.view', $rpost->slug)); ?>"><?php echo e(Str::limit($rpost->title, 70)); ?></a>
                                        </div>
                                    </div>
                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                            </div>
                        </div>


                        

                        <div class="sidebar-widget">
                            <div class="tab-news">
                                <ul class="nav nav-pills nav-justified">
                                    <li class="nav-item">
                                        <a class="nav-link active" data-toggle="pill" href="#featured">Featured</a>
                                    </li>
                                    <li class="nav-item">
                                        <a class="nav-link" data-toggle="pill" href="#popular">Popular</a>
                                    </li>
                                    <li class="nav-item">
                                        <a class="nav-link" data-toggle="pill" href="#latest">Latest</a>
                                    </li>
                                </ul>

                                <div class="tab-content">
                                    
                                    <div id="featured" class="container tab-pane active">
                                        <?php $__currentLoopData = $featuredPosts; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $post): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                            <div class="tn-news">
                                                <div class="tn-img">
                                                    <img src="<?php echo e(asset('storage/' . $post->featured_image)); ?>"
                                                        alt="<?php echo e($post->title); ?>">
                                                </div>
                                                <div class="tn-title">
                                                    <a
                                                        href="<?php echo e(route('post.view', $post->slug)); ?>"><?php echo e(Str::limit($post->title, 70)); ?></a>
                                                </div>
                                            </div>
                                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                    </div>

                                    
                                    <div id="popular" class="container tab-pane fade">
                                        <?php $__currentLoopData = $popularPosts; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $post): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                            <div class="tn-news">
                                                <div class="tn-img">
                                                    <img src="<?php echo e(asset('storage/' . $post->featured_image)); ?>"
                                                        alt="<?php echo e($post->title); ?>">
                                                </div>
                                                <div class="tn-title">
                                                    <a
                                                        href="<?php echo e(route('post.view', $post->slug)); ?>"><?php echo e(Str::limit($post->title, 70)); ?></a>
                                                </div>
                                            </div>
                                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                    </div>

                                    
                                    <div id="latest" class="container tab-pane fade">
                                        <?php $__currentLoopData = $latestPosts; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $post): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                            <div class="tn-news">
                                                <div class="tn-img">
                                                    <img src="<?php echo e(asset('storage/' . $post->featured_image)); ?>"
                                                        alt="<?php echo e($post->title); ?>">
                                                </div>
                                                <div class="tn-title">
                                                    <a
                                                        href="<?php echo e(route('post.view', $post->slug)); ?>"><?php echo e(Str::limit($post->title, 70)); ?></a>
                                                </div>
                                            </div>
                                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                    </div>
                                </div>
                            </div>
                        </div>


                        

                        <div class="sidebar-widget">
                            <h2 class="sw-title">News Category</h2>
                            <div class="category">
                                <ul>
                                    <?php $__currentLoopData = $categories; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $category): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                        <li>
                                            <a href="<?php echo e(route('category', $category->slug)); ?>"><?php echo e($category->name); ?></a>
                                            <span>(<?php echo e($category->posts_count); ?>)</span>
                                        </li>
                                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                </ul>

                            </div>
                        </div>

                        

                        <div class="sidebar-widget">
                            <h2 class="sw-title">Tags Cloud</h2>
                            <div class="tags">
                                <?php $__currentLoopData = $tags; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $tag): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                    <a href="<?php echo e(route('tag', $tag->slug)); ?>"><?php echo e($tag->name); ?></a>
                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <!-- Single News End-->
<?php $__env->stopSection(); ?>

<?php $__env->startPush('style'); ?>

    <style>
        /* General Styles for the Post */
        .cat-post {
            display: flex;
            margin-bottom: 30px;
            border: 1px solid #ddd;
            border-radius: 8px;
            overflow: hidden;
            background-color: #fff;
            box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
        }

        .cat-post-img {
            flex: 1;
            max-width: 300px;
            overflow: hidden;
        }

        .cat-post-img img {
            width: 100%;
            height: auto;
            object-fit: cover;
        }

        .cat-post-content {
            flex: 2;
            padding: 15px;
        }

        .cat-post-title {
            font-size: 20px;
            font-weight: 600;
            color: #333;
            margin-bottom: 10px;
            transition: color 0.3s;
        }

        .cat-post-title a {
            color: inherit;
            text-decoration: none;
        }

        .cat-post-title a:hover {
            color: #007bff;
        }

        .cat-post-desc {
            font-size: 14px;
            color: #555;
            line-height: 1.6;
            margin-bottom: 15px;
        }

        /* Meta Information Styles */
        .cat-post-meta {
            display: flex;
            flex-wrap: wrap;
            gap: 15px;
            margin-bottom: 15px;
        }

        .meta-item {
            font-size: 14px;
            color: #777;
        }

        .meta-item i {
            margin-right: 5px;
            /* color: #007bff; */
        }

        .meta-item a {
            color: gray;
            text-decoration: none;
        }

        .meta-item a:hover {
            text-decoration: underline;
        }

        /* Responsive Styles */
        @media (max-width: 768px) {
            .cat-post {
                flex-direction: column;
            }

            .cat-post-img {
                max-width: 100%;
                height: auto;
            }

            .cat-post-content {
                padding: 10px;
            }

            .cat-post-meta {
                flex-direction: column;
            }
        }
    </style>
<?php $__env->stopPush(); ?>
<?php echo $__env->make('frontend.layouts.main', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH D:\NEWXAMP\htdocs\newssite.com\resources\views/frontend/category-details.blade.php ENDPATH**/ ?>