@extends('main')

@section('content')

<section class="cs_banner cs_style_3 cs_bg_filed" data-src="{{ url('/') }}/assets/img/about/banner_bg.svg">
  <div class="cs_banner_img">
     <img src="{{ url('/') }}/assets/img/about/bg3.png" style="height:558px !important;" alt="Banner Image" class="cs_main_banner_img">
  </div>
  <div class="container">
    <div class="cs_banner_text">
      <h2 class="cs_banner_title cs_fs_72">{{ $blog->title }} </h2>
      <p class="cs_banner_subtitle cs_fs_20 mb-0 cs_heading_color"></p>
    </div>
  </div>
</section>
<!-- End Banner  -->
<!-- Start Services Section -->



<section>
  <div class="cs_height_200 cs_height_xl_150 cs_height_lg_110"></div>
  <div class="container">
    <div class="cs_height_55"></div>
      <img src="{{ url('/') }}/{{ $blog->image }}" style="height:550px" alt="Blog Details" class="w-100 cs_radius_20">
      <div class="cs_height_90 cs_height_lg_50"></div>
      <div class="row">
        <div class="col-lg-8">
          <div class="cs_blog_details">
            
            <p align="justify">{!! nl2br($blog->content) !!}</p>
          </div>
          
          
        </div>
        <div class="col-lg-4">
          <div class="cs_sidebar">
            <div class="cs_sidebar_item widget_categories">
              <div class="cs_newsletter cs_style2">
                <h2 class="cs_newsletter_title">Newsletter Sign Up Form</h2>
                <form method="post" action="{{ route('newsletter.send') }}" class="cs_newsletter_form">
                  <input type="email" name="email" class="cs_newsletter_input" placeholder="Enter your Email Address">
                  <button class="cs_btn cs_style_1">
                    <span>Subscribe Newsletter</span>
                    <i>
                      <img src="assets/img/icons/arrow_white.svg" alt="Icon">
                      <img src="assets/img/icons/arrow_white.svg" alt="Icon">
                    </i>
                  </button>
                </form>
              </div>
            </div>
          </div>
        </div>
      </div>
      <div class="cs_height_135 cs_height_lg-100"></div>
      <h2 class="mb-0 cs_fs_40 cs_medium">Related Articles</h2>
      <div class="cs_height_57"></div>
      <div class="row">
        @if(count($related)>0)
        @foreach($related as $rel)
        <div class="col-lg-4">
          <div class="cs_post cs_style_1">
            <a href="{{ route('blog.details', $rel->url) }}" class="cs_post_thumb"><img src="{{ url('/') }}/{{ $rel->image}}" alt="Post"></a>
            <div class="cs_post_info">
              <div>
                <div class="cs_post_meta">
                  <div class="cs_posted_by">{{ date('d F, Y', strtotime($rel->created_at)) }}</div>
                  <div class="cs_post_social">
                    <a href="#" class="cs_center rounded-circle"><i class="fa-brands fa-linkedin-in"></i></a>
                    <a href="#" class="cs_center rounded-circle"><i class="fa-brands fa-facebook-f"></i></a>
                    <a href="#" class="cs_center rounded-circle"><i class="fa-brands fa-twitter"></i></a>
                  </div>
                </div>
                <h2 class="cs_post_title cs_semibold cs_fs_32"><a href="{{ route('blog.details', $rel->url) }}">{{ $rel->title }}</a></h2>
              </div>
              <!--<div class="cs_heading_color cs_medium"><a href="{{ route('blog.details', $rel->url) }}" class="cs_post_btn">Read more</a></div>-->
            </div>
          </div>
        </div>
        @endforeach
        @endif
      </div>
    </div>
    <!-- End Blog Details -->
    <div class="cs_height_200 cs_height_xl_150 cs_height_lg_110"></div>
    <!-- Start Footer Banner  -->
    
@stop