
  <!-- Start main-content -->
  <div class="main-content">

    <!-- Section: inner-header -->
    <section class="inner-header divider parallax layer-overlay overlay-dark-5" data-stellar-background-ratio="0.5" data-bg-img="">
      <div class="container pt-10 pb-10">
        <!-- Section Content -->
        <div class="section-content">
          <div class="row"> 
            <div class="col-md-12">
              <h3 class="title text-white"><?php echo $all_blog[0]->category_name?></h3>
            </div>
          </div>
        </div>
      </div>
    </section>

    <section>
      <div class="container">
        <div class="row multi-row-clearfix">
          <div class="blog-posts">
            <div class="row">
              <div class="col-sm-9">
                <div class="row">
                  <?php foreach ($all_blog as $blog):?>
                    <div class="col-md-4">
                      <article class="post clearfix mb-sm-30 bg-lighter">
                        <div class="entry-header">
                          <div class="post-thumb thumb"> 
                            <img src="<?php echo base_url()?>/<?php echo $blog->image; ?>" alt="<?php echo $blog->title; ?>" class="img-responsive img-fullwidth"> 
                          </div>
                        </div>
                        <div class="entry-content p-20 pr-10">
                          <div class="entry-meta media mt-0 no-bg no-border">
                            <div class="entry-date media-left text-center flip bg-theme-colored pt-5 pr-15 pb-5 pl-15">
                              <ul>
                                <li class="font-16 text-white font-weight-600 border-bottom"><?php echo date('d', strtotime($blog->date)); ?></li>
                                <li class="font-12 text-white text-uppercase"><?php echo date('M', strtotime($blog->date)); ?></li>
                              </ul>
                            </div>
                            <div class="media-body pl-15">
                              <div class="event-content pull-left flip">
                                <h4 class="entry-title text-white text-uppercase m-0 mt-5"><a href="<?php echo base_url()?>/details-blog/<?php echo $blog->title_slug; ?>"><?php echo $blog->title; ?></a></h4>                       
                                <span class="mb-10 text-gray-darkgray mr-10 font-13"><i class="fa fa-heart-o mr-5 text-theme-colored"></i><?php echo $blog->like; ?> Likes</span>                       
                              </div>
                            </div>
                          </div>
                          <p class="mt-10"><?php echo mb_strimwidth($blog->short_description, 0, 100, "..."); ?></p>
                          <a href="<?php echo base_url()?>/details-blog/<?php echo $blog->title_slug; ?>" class="btn-read-more"><?php echo read_more(); ?></a>
                          <div class="clearfix"></div>
                        </div>
                      </article>
                    </div>
                  <?php endforeach; ?>
                </div>
              </div>
              <div class="col-md-3">
                <div class="sidebar sidebar-left mt-sm-30">
                  <div class="widget">
                    <h5 class="widget-title line-bottom">Categories</h5>
                    <div class="categories">
                      <ul class="list list-border angle-double-right">
                        <?php foreach ($all_category as $category):?>
                          <li><a href="<?php echo base_url();?>/blog-category/<?php echo $category->category_slug; ?>"><?php echo $category->category_name; ?></a></li>
                        <?php endforeach;?>
                      </ul>
                    </div>
                  </div>
                  <div class="widget">
                    <h5 class="widget-title line-bottom">Latest News</h5>
                    <div class="latest-posts">
                      <?php foreach ($top_4_blog as $top_blog):?>
                        <article class="post media-post clearfix pb-0 mb-10">
                          <a class="post-thumb" href="<?php echo base_url(); ?>/blog-details/<?php echo $top_blog->title_slug ?>"><img src="<?php echo base_url(); ?><?php echo $top_blog->image ?>" alt="<?php echo $top_blog->title ?>" width="70px"></a>
                          <div class="post-right">
                            <h5 class="post-title mt-0"><a href="<?php echo base_url(); ?>/blog-details/<?php echo $top_blog->title_slug ?>"><?php echo $top_blog->title ?></a></h5>
                            <p><?php echo mb_strimwidth($top_blog->title, 0, 40, "...") ?></p>
                          </div>
                        </article>
                      <?php endforeach;?>
                    </div>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
    </section>
  </div>
  <!-- end main-content -->