/* Public blog: listing (/blog) and article (/blog/{slug}) pages.
   Built on the site tokens in style.css (--primary, --border, --radius-*,
   --shadow-*) and its .card-elevated / .provider-detail-badge components so
   the blog reads as part of the same site as the provider and event pages. */

.blog__title,
.blog-article__title {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    color: var(--heading);
}

.blog__title {
    font-size: clamp(2rem, 4vw, 2.5rem);
    margin-bottom: .5rem;
}

.blog__lead {
    font-size: 1.0625rem;
    max-width: 40rem;
    color: var(--text-muted);
}

/* Listing cards */
.blog-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: transform .15s ease, box-shadow .15s ease;
}

.blog-card:hover,
.blog-card:focus-within {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.blog-card__image {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

/* Posts without a cover get a branded block so every card in a row lines up. */
.blog-card__image--placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-soft) 0%, hsl(230, 80%, 90%) 100%);
    color: var(--primary);
    font-size: 2.25rem;
}

.blog-card .card-body {
    padding: 1.25rem 1.375rem 1.375rem;
}

.blog-card__title {
    font-family: var(--font-heading);
    font-size: 1.1875rem;
    line-height: 1.35;
    margin-bottom: .5rem;
}

.blog-card__title a {
    color: var(--heading);
}

.blog-card:hover .blog-card__title a {
    color: var(--primary);
}

.blog-card .blog-meta {
    font-size: .8125rem;
}

.blog-card__summary {
    color: var(--text-muted);
}

.blog-card__more {
    margin-top: auto;
    padding-top: 1rem;
    color: var(--primary);
    font-size: .875rem;
    font-weight: 600;
}

.blog-empty {
    padding: 3rem 1.5rem;
    text-align: center;
    color: var(--text-muted);
}

.blog-empty i {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: .75rem;
}

/* Article: one centred column, so the breadcrumb, card and "more articles"
   share the same edges. 52rem keeps body lines near 75 characters. */
.blog-article__wrap {
    max-width: 52rem;
    margin-left: auto;
    margin-right: auto;
}

.blog-breadcrumb .breadcrumb {
    font-size: .875rem;
}

.blog-breadcrumb a {
    color: var(--text-muted);
    text-decoration: none;
}

.blog-breadcrumb a:hover {
    color: var(--primary);
    text-decoration: underline;
}

/* Lets a long title shrink to an ellipsis instead of wrapping the trail. */
.blog-breadcrumb .breadcrumb-item.active {
    min-width: 0;
    color: var(--heading);
}

.blog-article {
    overflow: hidden;
}

.blog-article__header,
.blog-article__body {
    padding-left: 2.5rem;
    padding-right: 2.5rem;
}

.blog-article__header {
    padding-top: 2.25rem;
    padding-bottom: 1.75rem;
}

.blog-article__title {
    font-size: clamp(1.75rem, 3.5vw, 2.5rem);
    margin-bottom: 1rem;
}

.blog-meta {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem 1.25rem;
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: .9375rem;
    color: var(--text-muted);
}

.blog-meta li {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
}

.blog-meta i {
    color: var(--primary);
    font-size: .8125rem;
}

/* The cover spans the card edge to edge between the header and the body. */
.blog-article__cover {
    margin: 0;
}

.blog-article__cover img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

.blog-article__body {
    padding-top: 2rem;
    padding-bottom: 2.5rem;
    font-size: 1.0625rem;
    line-height: 1.75;
    color: var(--text);
    overflow-wrap: break-word;
    /* Contains floated side images so they never spill out of the card. */
    display: flow-root;
}

/* Without a cover, a rule separates the header from the text. */
.blog-article__header + .blog-article__body {
    border-top: 1px solid var(--border);
}

.blog-article__body > :first-child {
    margin-top: 0;
}

.blog-article__body > :last-child {
    margin-bottom: 0;
}

.blog-article__body h2,
.blog-article__body h3,
.blog-article__body h4 {
    color: var(--heading);
    line-height: 1.3;
    margin-top: 2rem;
    margin-bottom: .75rem;
}

.blog-article__body h2 { font-size: 1.625rem; }
.blog-article__body h3 { font-size: 1.3125rem; }
.blog-article__body h4 { font-size: 1.125rem; }

.blog-article__body p,
.blog-article__body ul,
.blog-article__body ol {
    margin-bottom: 1.25rem;
}

.blog-article__body li + li {
    margin-top: .375rem;
}

.blog-article__body a {
    color: var(--primary);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.blog-article__body a:hover {
    color: var(--primary-dark);
}

.blog-article__body hr {
    margin: 2rem 0;
    border: 0;
    border-top: 1px solid var(--border);
    opacity: 1;
}

.blog-article__body blockquote {
    border-left: 4px solid var(--primary);
    background: var(--primary-soft);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    margin: 1.75rem 0;
    padding: 1rem 1.25rem;
    color: var(--heading);
    font-style: italic;
}

.blog-article__body blockquote > :last-child {
    margin-bottom: 0;
}

.blog-article__body figure {
    margin: 1.75rem 0;
}

.blog-article__body img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius);
}

.blog-article__body figure.image img {
    margin-left: auto;
    margin-right: auto;
}

.blog-article__body figcaption {
    font-size: .875rem;
    color: var(--text-muted);
    text-align: center;
    margin-top: .5rem;
}

/* CKEditor image styles that the sanitizer keeps */
.blog-article__body figure.image-style-side {
    float: right;
    max-width: 50%;
    margin: .25rem 0 1rem 1.5rem;
}

/* More articles */
.blog-more {
    padding: 1.5rem 2.5rem;
}

.blog-more__title {
    font-size: 1.125rem;
    margin-bottom: .75rem;
}

.blog-more__list {
    margin: 0 0 1rem;
    padding: 0;
    list-style: none;
}

.blog-more__list li {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: .25rem 1rem;
    padding: .75rem 0;
    border-bottom: 1px solid var(--border);
}

.blog-more__list a {
    color: var(--heading);
    font-weight: 600;
    text-decoration: none;
}

.blog-more__list a:hover {
    color: var(--primary);
    text-decoration: underline;
}

.blog-more__date {
    font-size: .875rem;
    color: var(--text-muted);
    white-space: nowrap;
}

.blog-more__all {
    font-size: .9375rem;
    font-weight: 600;
    color: var(--primary);
    text-decoration: none;
}

.blog-more__all:hover {
    text-decoration: underline;
}

@media (max-width: 575.98px) {
    .blog-article__header,
    .blog-article__body,
    .blog-more {
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }

    .blog-article__header {
        padding-top: 1.5rem;
        padding-bottom: 1.25rem;
    }

    .blog-article__body {
        padding-top: 1.5rem;
        padding-bottom: 1.75rem;
    }

    .blog-article__body figure.image-style-side {
        float: none;
        max-width: 100%;
        margin: 1.5rem 0;
    }
}
