@php
    $postImage = !empty($post->image) ? $post->image : null;
@endphp
<a href="{{ $post->getUrl() }}" class="premium-blog-post-card d-block text-reset text-decoration-none h-100">
    <div class="premium-blog-post-card__media">
        @if ($postImage)
            <img src="{{ $postImage }}" alt="{{ clean($post->title, 'title') }}" class="premium-blog-post-card__img img-cover" loading="lazy" decoding="async">
        @else
            <div class="premium-blog-post-card__ph" aria-hidden="true"><i class="fa fa-file-text-o"></i></div>
        @endif
        <span class="premium-blog-post-card__badge">{{ dateTimeFormat($post->created_at, 'j M Y') }}</span>
    </div>
    <div class="premium-blog-post-card__body">
        @if (!empty($post->category))
            <p class="premium-blog-post-card__cat mb-0">{{ $post->category->title }}</p>
        @endif
        <h3 class="premium-blog-post-card__title">{{ clean($post->title, 'title') }}</h3>
        @if (!empty($post->description))
            <p class="premium-blog-post-card__excerpt mb-0">{!! truncate(strip_tags($post->description), 120) !!}</p>
        @endif
    </div>
</a>
