/* Public blog pages (blog/). Colours come from the site theme (--bs-primary in style.css). */

.blog-hero {
    padding: 3rem 0 2rem;
    text-align: center;
}

.blog-hero .lead {
    max-width: 640px;
    margin: 0 auto;
}

/* Cards */
.blog-card {
    border-radius: 1rem;
    overflow: hidden;
    transition: transform .2s ease, box-shadow .2s ease;
}

.blog-card:hover,
.blog-card:focus-within {
    transform: translateY(-3px);
    box-shadow: 0 .75rem 1.5rem rgba(0, 0, 0, .08) !important;
}

.blog-card-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.blog-card-img-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #eef1f8;
    color: var(--bs-primary);
    font-size: 2.5rem;
}

/* Category pill: sits above the card's stretched link so it stays clickable */
.blog-pill {
    display: inline-block;
    align-self: flex-start;
    z-index: 2;
    padding: .25rem .75rem;
    border-radius: 50rem;
    background: rgba(44, 61, 130, .08);
    color: var(--bs-primary);
    font-size: .8rem;
    font-weight: 600;
    text-decoration: none;
}

.blog-pill:hover {
    background: var(--bs-primary);
    color: #fff;
}

/* Sidebar */
.blog-sidebar .card {
    border-radius: 1rem;
}

.blog-sidebar .list-group-item a {
    transition: padding-left .2s ease, color .2s ease;
}

.blog-sidebar .list-group-item a:hover {
    color: var(--bs-primary) !important;
    padding-left: 4px;
}

.blog-cta {
    background: var(--bs-primary);
    color: #fff;
}

@media (min-width: 992px) {
    .blog-sidebar-sticky {
        position: sticky;
        top: 1.5rem;
    }
}

/* Single post */
.article-header {
    padding: 1rem 0 2rem;
}

.article-title {
    font-weight: 800;
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    line-height: 1.2;
    margin-bottom: 1rem;
}

.article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem 1rem;
    color: #64748b;
    font-size: .95rem;
}

.article-featured-image {
    width: 100%;
    max-height: 480px;
    object-fit: cover;
    border-radius: 1rem;
    margin-bottom: 2.5rem;
}

.article-content {
    font-size: 1.05rem;
    line-height: 1.8;
    color: #334155;
    overflow-wrap: break-word;
}

.article-content h2,
.article-content h3,
.article-content h4 {
    font-weight: 700;
    color: #0f172a;
    margin-top: 2.25rem;
    margin-bottom: 1rem;
}

.article-content img,
.article-content iframe,
.article-content video {
    max-width: 100%;
    height: auto;
    border-radius: .75rem;
}

.article-content img {
    margin: 1.5rem 0;
}

.article-content table {
    display: block;
    max-width: 100%;
    overflow-x: auto;
}

.article-content a:not(.btn) {
    color: var(--bs-primary);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.article-content blockquote {
    border-left: 4px solid var(--bs-primary);
    padding: 1.25rem 1.5rem;
    font-style: italic;
    color: #475569;
    background: #f1f5f9;
    border-radius: 0 .75rem .75rem 0;
    margin: 2rem 0;
}

.share-buttons .btn {
    margin: 0 .25rem .5rem 0;
}
