<?php include('header.php');

$data = file_get_contents('blogs.json');
$blogs = json_decode($data,true);

?>

<style>
    .blog-single-item{
        background: #f3f9ff;
        box-shadow: 0px 2px 20px rgba(0, 0, 0, 0.1);
        margin-bottom: 30px;
        padding: 10px 20px;
    }
    .blog-content-icons{
        display:flex;
        gap: 20px;
    }
    .blog-content-icons i{
        font-size: 1.4rem;
        color: var(--accent-color);
    }
</style>

<!-- Page Title -->
<div class="page-title light-background">
  <div class="container">
    <h1>Blog & Updates</h1>
    <nav class="breadcrumbs">
      <ol>
        <li><a href="index.html">Home</a></li>
        <li class="current">Blogs</li>
      </ol>
    </nav>
  </div>
</div><!-- End Page Title -->

<!-- Service Details Section -->
<section id="service-details" class="service-details section">

  <div class="container">

    <div class="row gy-5">

      
      <div class="col-lg-8 ps-lg-5" data-aos="fade-up" data-aos-delay="200">
         <?php foreach($blogs as $blog): ?>
        <div class="blog-single-item">
            <a href="#"> 
                <img src="assets/img/blog/<?=$blog['image']?>" alt="" class="img-fluid services-img w-100">
            </a>
            <h4><a href="#"><?=$blog['title']?></a></h4>
            <p><?=$blog['short_description']?></p>
            <div  class="blog-content-icons">
                <div>
                    <i class="bi bi-calendar-week"></i>
                    <span><?=$blog['date']?></span>
                </div>
                <div>
                    <a href="#">
                        <i class="bi bi-info-circle-fill"></i>
                        <span>View Deatils</span>
                    </a>
                </div>
            </div>
        </div>
        <?php endforeach ?>
       
      </div>
      
      
      <div class="col-lg-4" data-aos="fade-up" data-aos-delay="100">

        <div class="service-box">
          <h4>Blog Categories</h4>
          <div class="services-list">
            <a href="#" class=""><i class="bi bi-arrow-right-circle"></i><span>Career Development</span></a>
            <a href="#" class=""><i class="bi bi-arrow-right-circle"></i><span>Workforce Trends</span></a>
            <a href="#" class=""><i class="bi bi-arrow-right-circle"></i><span>HR Best Practices</span></a>
            <a href="#" class=""><i class="bi bi-arrow-right-circle"></i><span>Leadership & Management</span></a>
            <a href="#" class=""><i class="bi bi-arrow-right-circle"></i><span>Remote Work Strategies</span></a>
            <a href="#" class=""><i class="bi bi-arrow-right-circle"></i><span>Employee Wellbeing</span></a>
            <a href="#" class=""><i class="bi bi-arrow-right-circle"></i><span>Compliance & Legal Updates</span></a>
            <a href="#" class=""><i class="bi bi-arrow-right-circle"></i><span>Learning & Development</span></a>
            <a href="#" class=""><i class="bi bi-arrow-right-circle"></i><span>Recruitment & Hiring</span></a>
            <a href="#" class=""><i class="bi bi-arrow-right-circle"></i><span>Industry Insights</span></a>


          </div>
        </div><!-- End Services List -->
      </div>


    </div>

  </div>

</section><!-- /Service Details Section -->

<?php include('footer.php') ?>