/* ============================================================
   STEWARD BLOG — blog.css
   Loaded AFTER driver.css. driver.css handles reset, nav,
   footer, and base typography. This file handles blog-only
   layout and components only.
   Sync --b-blue-* vars with driver.css if brand colors change.
   ============================================================ */

/* ── Variables ─────────────────────────────────────────────── */
:root {
    --b-blue-900: #0a3ec5;
    --b-blue-700: #1e40af;
    --b-blue-500: #3b82f6;
    --b-blue-100: #dbeafe;
    --b-blue-50: #eff6ff;

    --b-gray-900: #111827;
    --b-gray-700: #374151;
    --b-gray-500: #6b7280;
    --b-gray-300: #d1d5db;
    --b-gray-100: #f3f4f6;
    --b-gray-50: #f9fafb;
    --b-white: #ffffff;

    --b-font: 'Roboto', 'Lato', -apple-system, sans-serif;
    --b-font-serif: Georgia, 'Times New Roman', serif;

    --b-max-w: 1140px;
    --b-post-w: 740px;
    --b-radius: 8px;
    --b-radius-lg: 14px;
    --b-shadow: 0 1px 3px rgba(0, 0, 0, .08), 0 1px 2px rgba(0, 0, 0, .06);
    --b-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, .10), 0 2px 4px -1px rgba(0, 0, 0, .06);
}

/* ── Layout helpers ─────────────────────────────────────────── */
.b-container {
    max-width: var(--b-max-w);
    margin: 0 auto;
    padding: 0 24px;
}

.b-container--narrow {
    max-width: var(--b-post-w);
    margin: 0 auto;
    padding: 30px 24px 24px 0;
}

/* ── Blog hero ──────────────────────────────────────────────── */
.b-hero {
    background: var(--b-white);
    border-bottom: 1px solid var(--b-gray-300);
    padding: 90px 0 48px;
    text-align: center;
}

.b-hero__eyebrow {
    font-size: .75rem;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--b-blue-700);
    margin-bottom: 12px;
}

.b-hero__title {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--b-gray-900);
    line-height: 1.2;
    margin-bottom: 14px;
}

.b-hero__subtitle {
    font-size: 1.05rem;
    color: var(--b-gray-500);
    max-width: 520px;
    margin: 0 auto;
}

/* ── Posts section ──────────────────────────────────────────── */
.b-posts {
    padding: 48px 0 80px;
    background: var(--b-gray-50);
}

.b-posts__header {
    margin-bottom: 20px;
}

.b-posts__count {
    font-size: .875rem;
    color: var(--b-gray-500);
}

/* ── Article list ───────────────────────────────────────────── */
.b-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.b-article-card {
    background: var(--b-white);
    border: 1px solid var(--b-gray-300);
    border-radius: var(--b-radius-lg);
    display: flex;
    gap: 0;
    overflow: hidden;
    transition: box-shadow .15s, transform .15s;
}

.b-article-card:hover {
    box-shadow: var(--b-shadow-md);
    transform: translateY(-2px);
}

.b-article-card__image {
    width: 240px;
    min-width: 240px;
    background: var(--b-gray-100);
    overflow: hidden;
    flex-shrink: 0;
}

.b-article-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .3s;
}

.b-article-card:hover .b-article-card__image img {
    transform: scale(1.03);
}

.b-article-card__image--placeholder {
    width: 100%;
    height: 100%;
    min-height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--b-blue-50);
}

.b-article-card__image--placeholder svg {
    opacity: .25;
}

.b-article-card__body {
    padding: 28px 32px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex: 1;
    min-width: 0;
}

.b-article-card__meta {
    font-size: .78rem;
    color: var(--b-gray-500);
    margin-bottom: 10px;
}

.b-article-card__title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--b-gray-900);
    line-height: 1.35;
    margin-bottom: 10px;
}

.b-article-card__title a {
    color: inherit;
    text-decoration: none;
}

.b-article-card__title a:hover {
    color: var(--b-blue-700);
}

.b-article-card__desc {
    font-size: .9rem;
    color: var(--b-gray-500);
    line-height: 1.65;
    margin-bottom: 18px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.b-article-card__footer {
    display: flex;
    align-items: center;
    gap: 16px;
}

.b-read-link {
    font-size: .85rem;
    font-weight: 600;
    color: var(--b-blue-700);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.b-read-link:hover {
    text-decoration: underline;
}

/* ── Tag pill ───────────────────────────────────────────────── */
.b-tag {
    font-size: .7rem;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--b-blue-700);
    background: var(--b-blue-50);
    border: 1px solid var(--b-blue-100);
    padding: 3px 9px;
    border-radius: 99px;
}

/* ── Loading / empty ────────────────────────────────────────── */
.b-loading {
    text-align: center;
    padding: 80px 0;
    color: var(--b-gray-500);
}

.b-loading__spinner {
    width: 36px;
    height: 36px;
    border: 3px solid var(--b-gray-300);
    border-top-color: var(--b-blue-700);
    border-radius: 50%;
    animation: b-spin .6s linear infinite;
    margin: 0 auto 16px;
}

@keyframes b-spin {
    to {
        transform: rotate(360deg);
    }
}

.b-empty {
    text-align: center;
    padding: 80px 24px;
    color: var(--b-gray-500);
}

.b-empty p {
    font-size: 1rem;
    margin-bottom: 8px;
}

/* ── Pagination ─────────────────────────────────────────────── */
.b-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 40px;
}

.b-page-btn {
    font-family: var(--b-font);
    font-size: .875rem;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: var(--b-radius);
    border: 1px solid var(--b-gray-300);
    background: var(--b-white);
    color: var(--b-gray-700);
    cursor: pointer;
    transition: background .12s, border-color .12s;
}

.b-page-btn:hover:not(:disabled) {
    background: var(--b-gray-100);
    border-color: var(--b-gray-500);
}

.b-page-btn:disabled {
    opacity: .35;
    cursor: default;
}

.b-page-info {
    font-size: .875rem;
    color: var(--b-gray-500);
    padding: 0 8px;
}

/* ── Bottom CTA ─────────────────────────────────────────────── */
.b-cta {
    background: var(--b-blue-900);
    color: var(--b-white);
    padding: 64px 0;
    text-align: center;
}

.b-cta__label {
    font-size: .75rem;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--b-blue-100);
    margin-bottom: 12px;
}

.b-cta__title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.b-cta__sub {
    font-size: 1rem;
    color: var(--b-blue-100);
    margin-bottom: 28px;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
}

.b-cta__btn {
    display: inline-block;
    background: var(--b-white);
    color: var(--b-blue-900);
    font-weight: 700;
    font-size: .95rem;
    padding: 13px 28px;
    border-radius: var(--b-radius);
    text-decoration: none;
    transition: background .15s;
}

.b-cta__btn:hover {
    background: var(--b-blue-50);
    text-decoration: none;
}

/* ── Post prose (post.html) ─────────────────────────────────── */
.b-post-hero {
    background: var(--b-white);
    border-bottom: 1px solid var(--b-gray-300);
    padding: 52px 0 44px;
}

.b-post-hero__back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: .875rem;
    color: var(--b-gray-500);
    margin-bottom: 24px;
    text-decoration: none;
}

.b-post-hero__back:hover {
    color: var(--b-blue-700);
}

.b-post-hero__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 16px;
}

.b-post-hero__title {
    font-size: 2.1rem;
    font-weight: 700;
    line-height: 1.2;
    color: var(--b-gray-900);
    margin-bottom: 16px;
}

.b-post-hero__meta {
    font-size: .875rem;
    color: var(--b-gray-500);
}

.b-post-hero__desc {
    font-size: 1.1rem;
    color: var(--b-gray-500);
    margin-top: 14px;
    line-height: 1.6;
    max-width: 620px;
}

.b-prose {
    font-family: var(--b-font-serif);
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--b-gray-700);
}

.b-prose h1,
.b-prose h2,
.b-prose h3,
.b-prose h4 {
    font-family: var(--b-font);
    color: var(--b-gray-900);
    line-height: 1.3;
    margin: 1.8em 0 .6em;
}

.b-prose h2 {
    font-size: 1.5rem;
    font-weight: 700;
}

.b-prose h3 {
    font-size: 1.2rem;
    font-weight: 600;
}

.b-prose p {
    margin-bottom: 1.4em;
}

.b-prose ul,
.b-prose ol {
    margin: 0 0 1.4em 1.5em;
}

.b-prose li {
    margin-bottom: .5em;
}

.b-prose a {
    color: var(--b-blue-700);
    text-decoration: underline;
}

.b-prose strong {
    font-weight: 700;
    color: var(--b-gray-900);
}

.b-prose blockquote {
    border-left: 4px solid var(--b-blue-500);
    margin: 0 0 1.4em;
    padding: 12px 20px;
    background: var(--b-blue-50);
    border-radius: 0 var(--b-radius) var(--b-radius) 0;
    color: var(--b-gray-700);
    font-style: italic;
}

.b-prose hr {
    border: none;
    border-top: 1px solid var(--b-gray-300);
    margin: 2em 0;
}

.b-prose img {
    border-radius: var(--b-radius);
    margin: 1.4em 0;
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 680px) {
    .b-article-card {
        flex-direction: column;
    }

    .b-article-card__image {
        width: 100%;
        min-width: unset;
        height: 180px;
    }

    .b-article-card__body {
        padding: 20px;
    }
}

@media (max-width: 600px) {
    .b-hero {
        padding: 36px 0 28px;
    }

    .b-hero__title {
        font-size: 1.5rem;
    }

    .b-post-hero__title {
        font-size: 1.35rem;
    }

    .b-prose {
        font-size: 1rem;
    }
}