/* ============================================================
   blog.css — /blog index and post pages. Loads after base.css.
   ============================================================ */

.blog-page {
    padding: var(--s6) 0 var(--s8);
}

/* ============ Index hero ============ */
.blog-hero {
    max-width: 720px;
    margin-bottom: var(--s6);
}

.blog-eyebrow {
    font-size: var(--fs-xs);
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--blue);
    margin-bottom: 10px;
}

.blog-hero h1 {
    font-size: clamp(2rem, 4vw, 2.9rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.14;
}

.blog-hero-sub {
    margin-top: var(--s2);
    color: var(--body);
    font-size: var(--fs-lg);
    line-height: 1.7;
}

/* ============ Search ============ */
.blog-search {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: var(--s3);
    max-width: 560px;
    padding: 6px 6px 6px 14px;
    background: #fff;
    border: 1.5px solid #dfe7f0;
    border-radius: 999px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.blog-search:focus-within {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
}

.blog-search svg {
    width: 18px;
    height: 18px;
    fill: var(--muted);
    flex-shrink: 0;
}

.blog-search input {
    flex: 1;
    min-width: 0;
    border: none;
    background: none;
    font: inherit;
    font-size: var(--fs-md);
    color: var(--navy);
}

.blog-search input:focus {
    outline: none;
}

.blog-search .cta-button {
    padding: 10px 20px;
    font-size: var(--fs-sm);
    border-radius: 999px;
}

.search-summary {
    margin-top: var(--s2);
    font-size: var(--fs-sm);
    color: var(--body);
}

.search-summary a {
    color: var(--blue);
    font-weight: 600;
}

.search-empty {
    grid-column: 1 / -1;
    padding: var(--s4);
    background: var(--card);
    border-radius: var(--r-md);
    color: var(--body);
    font-size: var(--fs-md);
    text-align: center;
}

.search-empty a {
    color: var(--blue);
    font-weight: 600;
}

/* ============ Pagination ============ */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: var(--s5);
}

.page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    padding: 9px 14px;
    border: 1.5px solid #dfe7f0;
    border-radius: var(--r-sm);
    background: #fff;
    color: var(--navy);
    font-size: var(--fs-sm);
    font-weight: 600;
    text-decoration: none;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.page-link:hover {
    border-color: rgba(37, 99, 235, 0.4);
}

.page-link.current {
    background: var(--blue);
    border-color: var(--blue);
    color: #fff;
}

/* ============ State directory ============ */
.state-links {
    margin-top: var(--s8);
}

.state-links h2 {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.state-links-sub {
    margin: 8px 0 var(--s3);
    color: var(--body);
    font-size: var(--fs-md);
}

.state-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 8px;
    list-style: none;
    margin-top: var(--s3);
}

.state-grid a {
    display: block;
    padding: 10px 14px;
    background: var(--card);
    border: 1px solid var(--card-line);
    border-radius: var(--r-sm);
    color: var(--navy);
    font-size: var(--fs-sm);
    font-weight: 600;
    text-decoration: none;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.state-grid a:hover {
    background: #fff;
    border-color: rgba(37, 99, 235, 0.4);
    color: var(--blue);
}

.state-grid a[aria-current="page"] {
    background: var(--disc);
    border-color: var(--blue);
    color: var(--blue-dark);
}

.topic-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: var(--s3);
    list-style: none;
}

.topic-list li {
    padding: 6px 13px;
    border: 1px solid var(--card-line);
    border-radius: 999px;
    background: var(--card);
    color: var(--body);
    font-size: var(--fs-xs);
    font-weight: 600;
}

/* ============ Post cards ============ */
.post-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}

.post-card {
    background: var(--card);
    border: 1px solid var(--card-line);
    border-radius: var(--r-md);
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease,
        background 0.18s ease;
}

.post-card:hover {
    transform: translateY(-3px);
    background: #fff;
    border-color: rgba(37, 99, 235, 0.35);
    box-shadow: var(--shadow-card);
}

.post-card-link {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: var(--s3);
    text-decoration: none;
    color: inherit;
}

.post-category {
    display: inline-block;
    align-self: flex-start;
    padding: 4px 11px;
    margin-bottom: 12px;
    border-radius: 999px;
    background: var(--disc);
    color: var(--blue-dark);
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.post-card h2,
.post-card h3 {
    font-family: var(--heading);
    font-size: 1.2rem;
    font-weight: 800;
    line-height: 1.3;
    letter-spacing: -0.015em;
    color: var(--navy);
}

.post-card p {
    margin-top: 10px;
    color: var(--body);
    font-size: var(--fs-sm);
    line-height: 1.65;
}

.post-meta {
    margin-top: 14px;
    color: var(--muted);
    font-size: var(--fs-xs);
    font-weight: 600;
}

.post-meta .dot {
    margin: 0 6px;
    color: #c3ccd8;
}

.post-more {
    margin-top: auto;
    padding-top: var(--s2);
    color: var(--blue);
    font-size: var(--fs-sm);
    font-weight: 700;
}

/* ============ Breadcrumb ============ */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: var(--s3);
    font-size: var(--fs-xs);
    font-weight: 600;
    color: var(--muted);
}

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

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

/* ============ Article ============ */
.post {
    max-width: 720px;
}

.post-header h1 {
    font-size: clamp(1.9rem, 3.6vw, 2.6rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.16;
}

.post-header .post-meta {
    margin-top: 12px;
}

.post-body {
    margin-top: var(--s4);
}

.post-body p,
.post-body li {
    color: #3f4b5c;
    font-size: 1.0625rem;
    line-height: 1.8;
}

.post-body p + p {
    margin-top: var(--s2);
}

.post-body .lede {
    font-size: 1.2rem;
    line-height: 1.7;
    color: var(--navy);
    font-weight: 500;
    padding-left: var(--s2);
    border-left: 3px solid var(--blue);
}

.post-body h2 {
    margin-top: var(--s5);
    margin-bottom: 12px;
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--navy);
}

.post-body h3 {
    margin-top: var(--s3);
    margin-bottom: 8px;
    font-family: var(--heading);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--navy);
}

.post-body ul,
.post-body ol {
    margin: var(--s2) 0 0 22px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.post-body li::marker {
    color: var(--blue);
    font-weight: 700;
}

.post-body strong {
    color: var(--navy);
}

.post-body a {
    color: var(--blue);
    font-weight: 600;
}

/* ============ CTAs ============ */
.post-cta,
.blog-cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--s3);
    margin-top: var(--s6);
    padding: var(--s3) var(--s4);
    background: var(--soft);
    border-radius: var(--r-lg);
}

.post-cta div,
.blog-cta div {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;  /* let the text wrap instead of forcing the row wider */
}

.post-cta strong,
.blog-cta strong {
    font-family: var(--heading);
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--navy);
}

.post-cta span,
.blog-cta span {
    color: var(--body);
    font-size: var(--fs-md);
}

.blog-cta {
    margin-top: var(--s7);
}

/* ============ Disclaimers ============ */
.post-disclaimer {
    margin-top: var(--s4);
    padding: var(--s3);
    background: var(--card);
    border: 1px solid var(--card-line);
    border-radius: var(--r-md);
    font-size: var(--fs-sm);
    line-height: 1.7;
    color: var(--body);
}

.post-disclaimer strong {
    color: var(--navy);
}

.blog-disclaimer {
    margin-top: var(--s6);
    padding-top: var(--s3);
    border-top: 1px solid var(--line);
    font-size: 0.72rem;
    line-height: 1.7;
    color: var(--muted);
}

.blog-disclaimer a {
    color: var(--body);
    font-weight: 600;
}

/* ============ Related ============ */
.related {
    margin-top: var(--s8);
}

.related h2 {
    margin-bottom: var(--s3);
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

/* ============ Mobile ============ */
@media (max-width: 640px) {
    .blog-page {
        padding: var(--s4) 0 var(--s6);
    }

    .blog-search {
        flex-wrap: nowrap;
    }

    .blog-search .cta-button {
        padding: 10px 14px;
    }

    .state-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .post-grid {
        grid-template-columns: 1fr;
    }

    .post-body p,
    .post-body li {
        font-size: 1rem;
    }

    .post-body .lede {
        font-size: 1.08rem;
        padding-left: 14px;
    }

    .post-body h2 {
        font-size: 1.3rem;
    }

    .post-cta,
    .blog-cta {
        flex-direction: column;
        align-items: stretch;
        padding: var(--s3);
    }

    .post-cta .cta-button,
    .blog-cta .cta-button {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .post-card {
        transition: none;
    }
}
