@charset "utf-8";

/*
    Blog index and a single post.
*/

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.blog-card {
    background-color: var(--mp-surface);
    border: 1px solid var(--mp-border);
    border-radius: var(--mp-radius-lg);
    overflow: hidden;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.blog-card:hover {
    border-color: #cfd6dd;
    box-shadow: var(--mp-shadow-lift);
    transform: translateY(-2px);
}

.blog-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
    height: 100%;
}

.blog-card-link:hover,
.blog-card-link:focus {
    text-decoration: none;
    color: inherit;
}

.blog-card-image {
    display: block;
    height: 180px;
    background-size: cover;
    background-position: center;
    background-color: var(--mp-wash);
}

.blog-card-body {
    display: block;
    padding: 22px;
}

/*  Shared between a card on the index and the head of a single post - the same slug->label lookup
    ? backs both, so one badge style does too. */
.blog-category-badge {
    display: inline-block;
    background-color: var(--mp-wash);
    color: var(--mp-body);
    border: 1px solid var(--mp-border);
    border-radius: 100px;
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    padding: 2px 10px;
    margin-bottom: 8px;
    white-space: nowrap;
}

.blog-card-date {
    display: block;
    font-size: 12.5px;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: var(--mp-muted);
    margin-bottom: 8px;
    font-variant-numeric: tabular-nums;
}

.blog-card-title {
    display: block;
    font-size: 18px;
    font-weight: 700;
    color: var(--mp-ink);
    line-height: 1.3;
    margin-bottom: 8px;
}

.blog-card-excerpt {
    display: block;
    font-size: 14.5px;
    color: var(--mp-muted);
}

.blog-empty {
    color: var(--mp-muted);
    font-size: 17px;
}

/*-------------------------------------------------------------------------------------------------
    A single post
-------------------------------------------------------------------------------------------------*/

.blog-article {
    padding: 56px 0 68px;
}

.blog-article-head {
    max-width: 720px;
    margin: 0 auto 32px;
    text-align: center;
}

.blog-article-date {
    display: block;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--mp-red);
    margin-bottom: 12px;
}

.blog-article-title {
    font-size: 38px;
    margin: 0 0 14px;
}

.blog-article-sub {
    font-size: 18px;
    color: var(--mp-muted);
    margin: 0;
}

/*  ? The body is staff-written html from a rich text field, so the elements inside it are styled
    ? by tag rather than by class - there are no classes to hook onto. */
.blog-article-body {
    max-width: 720px;
    margin: 0 auto;
    font-size: 17px;
    line-height: 1.75;
}

.blog-article-body h2 {
    font-size: 26px;
    margin: 38px 0 14px;
}

.blog-article-body h3 {
    font-size: 21px;
    margin: 30px 0 12px;
}

.blog-article-body ul,
.blog-article-body ol {
    margin: 0 0 18px;
    padding-left: 22px;
}

.blog-article-body li {
    margin-bottom: 7px;
}

.blog-article-body img {
    max-width: 100%;
    height: auto;
    border-radius: var(--mp-radius);
    margin: 22px 0;
}

.blog-article-body blockquote {
    border-left: 4px solid var(--mp-red);
    padding: 4px 0 4px 20px;
    margin: 24px 0;
    font-size: 18px;
    color: var(--mp-ink);
}

/*  A table pasted into a post has no scroll container of its own to give it */
.blog-article-body table {
    width: 100%;
    display: block;
    overflow-x: auto;
    margin-bottom: 20px;
}

.blog-article-back {
    max-width: 720px;
    margin: 40px auto 0;
    font-weight: 600;
}

.blog-article-back a {
    text-decoration: none;
}

.blog-article-back i {
    font-size: 12px;
    margin-right: 4px;
}

@media (max-width: 767px) {

    .blog-article {
        padding: 36px 0 44px;
    }

    .blog-article-title {
        font-size: 27px;
    }

    .blog-article-sub {
        font-size: 16.5px;
    }

    .blog-article-body {
        font-size: 16px;
    }

    .blog-article-body h2 {
        font-size: 21px;
    }
}
