@extends('layouts.web_master')

@section('header-content')
    <div class="header-destination" style="background: url({{asset($banner->tour_package_banner)}}); background-position: center !important;
    background-repeat: no-repeat !important;
    background-size: cover !important;">
        <!-- ====== 3.1 hero section ====== -->
        <section class="hero">
            <div class="container">
                <div class="row justify-content-center mt-5">
                    <div class="col-lg-11 col-md-12 text-center" data-aos="fade">
                        <div>
                            <h2>Blog</h2>
                            <div class="d-flex justify-content-center gap-4 pt-4">
                                <nav aria-label="breadcrumb">
                                    <div class="breadcrumb d-flex gap-4 align-items-center">
                                        <div class="breadcrumb-item"><a href="{{ route('home') }}">Home</a></div>
                                        <i class="fa-solid fa-angles-right"></i>
                                        <div class="breadcrumb-item" aria-current="page">Blog</div>
                                    </div>
                                </nav>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </section>
    </div>
    <!-- ====== End 3.1 hero section ====== -->
@endsection
<style>
    .overlay {
        height: 347px !important;
    }
</style>
@section('main-content')
    <!-- ====== 1.6 tours section ====== -->
    <section id="tour" style="padding: 50px 0px">
        <div class="container">
            <div data-aos="fade" data-aos-duration="2000">
                <h4>Blog</h4>
            </div>
            <div class="tourCards card-text mt-2">
                <div class="row gap-4 ">
                    <style>
                        #blog-content figure{
                            position : relative;
                        }
                        #blog-content figure .ovrly{
                            position : absolute;
                            text-align: center;
                            width: 50px;
                            height: 20px;
                            line-height: 20px;
                            background: #FB8E26;
                            color: #fff;
                            top: 0;
                            left: 0;
                        }
                    </style>
                    @foreach ($blog as $key=>$item)
                    <div class="col-md-4 col-sm-5 col-11" data-aos="fade-up" data-aos-delay="{{ 100 + ($key * 100)}}">
                        <div id="blog-content">
                            <figure>
                                <img style="height: 200px" src="{{asset($item->image)}}" alt="tour-img">
                                <div class="ovrly">
                                    {{$item->category}}
                                </div>
                            </figure>
                            <div class="d-flex" style="justify-content: space-between; align-items:center">
                                <p style="padding: 5px !important; margin:5px"><i class="fa fa-calendar"></i> {{ $item->date}}</p>
                                <p style="padding: 5px !important; margin:5px"><i class="fa fa-user">{{ $item->user->name}}</i></p>
                            </div>

                            {{-- <a href="{{route('singleblog',$item->slug)}}">
                                <h6 style="">{{ $item->title}}</h6></a>
                            <div >{!! Str::limit($item->description, 80, '...') !!}</div> --}}
                            <h6>{{ $item->title}}</h6>
                            <div>{!! Str::limit($item->description, 80, '...') !!}</div>
                            <a href="{{route('singleblog',$item->slug)}}">Learn More <i class="fa-solid fa-arrow-right"></i></a>
                        </div>
                    </div>
                    @endforeach
                </div>
            </div>
        </div>
    </section>
    <style>
        .tourCards p {
    padding: 10px 30px 20px 30px !important;
}
    </style>
    <!-- ====== End 1.6 tours section ====== -->
@endsection
