@php
    $content = getContent('blog.content', true);
    $blogs = getContent('blog.element', false, !request()->routeIs('blog') ? 4 : null);
@endphp

<section class="blog my-120">
    <div class="container">
        <div class="row">
            <div class="col-lg-12">
                <div class="section-heading">
                    <h3 class="section-heading__title">{{ __($content->data_values->title) }}</h3>
                </div>
            </div>
        </div>
        <div class="row gy-4 justify-content-center">
            @foreach ($blogs as $blog)
                <div class="col-lg-3 col-md-6">
                    <div class="blog-item">
                        <div class="blog-item__thumb">
                            <a href="{{ route('blog.details', $blog->slug) }}" class="blog-item__thumb-link">
                                <img class="image1"
                                    src="{{ frontendImage('blog', $blog->data_values->image, '415x240', false, true) }}"
                                    alt="@lang('Image')" />
                                <img class="image2"
                                    src="{{ frontendImage('blog', $blog->data_values->image, '415x240', false, true) }}"
                                    alt="@lang('Image')" />
                            </a>
                        </div>
                        <div class="blog-item__content">
                            <h6 class="blog-item__title">
                                <a href="{{ route('blog.details', $blog->slug) }}"
                                    class="blog-item__title-link border-effect">
                                    {{ __($blog->data_values->title) }}
                                </a>
                            </h6>

                            <p class="blog-item__desc">{{ __(strLimit($blog->data_values->short_description, 500)) }}
                            </p>

                            <a href="{{ route('blog.details', $blog->slug) }}" class="blog-item__btn">@lang('Read More')
                                <span class="blog-item__btn-icon"><i class="las la-arrow-right"></i></span>
                            </a>
                        </div>
                    </div>
                </div>
            @endforeach
        </div>
    </div>
</section>
