{% load i18n %}
{% load wagtailcore_tags %}
{% load wagtailimages_tags %}

<article class="blog-overview-card h-100">
    <div class="row g-0 align-items-stretch">
        {% if blog.lead_image %}
            <div class="col-12 col-md-5 col-lg-4">
                <a class="blog-overview-card__image-link" href="{{ blog.url }}">
                    {% image blog.lead_image fill-800x560 class="img-fluid blog-overview-card__image" %}
                </a>
            </div>
        {% endif %}

        <div class="col-12 {% if blog.lead_image %}col-md-7 col-lg-8{% endif %}">
            <div class="blog-overview-card__body">
                <div class="blog-overview-card__meta mb-3">
                    {% include "blog/partials/blog_meta.html" with blog=blog only %}
                </div>
                <h2 class="blog-overview-card__title h3">
                    <a href="{{ blog.url }}">{{ blog.title }}</a>
                </h2>

                {% if blog.intro %}
                    <div class="blog-overview-card__intro">
                        {{ blog.intro|richtext }}
                    </div>
                {% endif %}

                <div class="blog-overview-card__actions">
                    <a class="btn btn-primary btn-lg blog-overview-card__cta" href="{{ blog.url }}">
                        {% trans "Read more" %}
                    </a>
                </div>
            </div>
        </div>
    </div>
</article>
