/* ==========================================================================
   SLPFlow Blog — standalone stylesheet
   Used by: blog.html, ai-for-slps.html, slp-soap-notes.html, best-slp-software.html
   Do NOT link the app's styles.css on blog pages. This file is self-contained.
   Design tokens mirror the landing page (public/index.html).
   ========================================================================== */

:root {
    --primary: #2563eb;
    --primary-light: #3b82f6;
    --primary-dark: #1d4ed8;
    --background: #fafbfc;
    --surface-solid: #ffffff;
    --surface-elevated: #f8fafc;
    --text-primary: #0f172a;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --border: #e2e8f0;
    --border-light: #f1f5f9;
    --border-hover: #cbd5e1;
    --primary-border: #dbeafe;
    --success: #059669;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
}

/* --------------------------------------------------------------------------
   Base / reset
   -------------------------------------------------------------------------- */

*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--background);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img {
    max-width: 100%;
    height: auto;
}

a {
    color: var(--primary);
    text-decoration: none;
}

a:focus-visible,
button:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
    border-radius: 4px;
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */

.btn-primary {
    display: inline-block;
    background: var(--primary);
    color: #ffffff;
    border: none;
    padding: 14px 32px;
    font-size: 16px;
    font-weight: 600;
    font-family: inherit;
    letter-spacing: 0.2px;
    border-radius: 50px;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

/* Smaller variant for the nav bar */
.btn-nav {
    padding: 9px 20px;
    font-size: 14px;
}

.btn-nav:hover {
    transform: none;
    box-shadow: var(--shadow-sm);
}

/* --------------------------------------------------------------------------
   Navigation
   -------------------------------------------------------------------------- */

.blog-nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.88);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}

.blog-nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 14px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.blog-nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text-primary);
}

.blog-nav-logo img {
    height: 28px;
    width: auto;
    border-radius: 7px;
}

.blog-nav-logo span {
    font-weight: 600;
    font-size: 16px;
    letter-spacing: 0.2px;
    color: var(--text-primary);
}

.blog-nav-links {
    display: flex;
    align-items: center;
    gap: 28px;
}

.nav-quiet {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s ease;
}

.nav-quiet:hover {
    color: var(--text-primary);
}

.blog-nav-links a[aria-current="page"] {
    color: var(--text-primary);
}

/* --------------------------------------------------------------------------
   Shared eyebrow label (blog hero, section labels)
   -------------------------------------------------------------------------- */

.eyebrow {
    display: block;
    color: var(--primary);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

/* --------------------------------------------------------------------------
   Blog index — hero
   -------------------------------------------------------------------------- */

.blog-hero {
    max-width: 720px;
    margin: 0 auto;
    padding: 72px 24px 16px;
    text-align: center;
}

.blog-hero .eyebrow {
    margin-bottom: 14px;
}

.blog-hero h1 {
    font-size: clamp(32px, 5vw, 42px);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    margin-bottom: 14px;
}

.blog-hero-sub {
    font-size: 18px;
    line-height: 1.6;
    color: var(--text-secondary);
}

/* --------------------------------------------------------------------------
   Blog index — post card grid
   -------------------------------------------------------------------------- */

.post-grid {
    max-width: 1080px;
    margin: 0 auto;
    padding: 48px 24px 32px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

.post-card {
    display: flex;
    flex-direction: column;
    background: var(--surface-solid);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 28px;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.post-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: var(--border-hover);
}

.post-card-eyebrow {
    color: var(--primary);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.post-card-title {
    font-size: 21px;
    font-weight: 650;
    line-height: 1.35;
    letter-spacing: -0.01em;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.post-card-excerpt {
    font-size: 15px;
    line-height: 1.6;
    color: var(--text-secondary);
    margin-bottom: 20px;
    flex-grow: 1;
}

.post-card-link {
    color: var(--primary);
    font-size: 15px;
    font-weight: 600;
}

.post-card-link::after {
    content: "\2192";
    display: inline-block;
    margin-left: 6px;
    transition: transform 0.2s ease;
}

.post-card:hover .post-card-link::after {
    transform: translateX(3px);
}

/* --------------------------------------------------------------------------
   Article pages
   -------------------------------------------------------------------------- */

.article {
    max-width: 720px;
    margin: 0 auto;
    padding: 0 24px 24px;
}

.article-header {
    padding: 64px 0 36px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 40px;
}

.article-meta {
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 18px;
}

.article-title {
    font-size: clamp(32px, 4.5vw, 40px);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    margin-bottom: 18px;
}

.article-lede {
    font-size: 19px;
    line-height: 1.6;
    color: var(--text-secondary);
}

/* Prose column */

.article-body {
    font-size: 17px;
    line-height: 1.7;
    color: var(--text-primary);
}

.article-body p {
    margin-bottom: 20px;
}

.article-body h2 {
    font-size: 26px;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -0.015em;
    margin: 56px 0 16px;
}

.article-body h3 {
    font-size: 20px;
    font-weight: 650;
    line-height: 1.35;
    letter-spacing: -0.01em;
    margin: 36px 0 12px;
}

.article-body h2:first-child {
    margin-top: 0;
}

.article-body ul,
.article-body ol {
    margin: 0 0 20px;
    padding-left: 26px;
}

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

.article-body li::marker {
    color: var(--text-muted);
}

.article-body a {
    color: var(--primary);
    text-decoration: underline;
    text-decoration-color: var(--primary-border);
    text-underline-offset: 3px;
    transition: text-decoration-color 0.2s ease;
}

.article-body a:hover {
    text-decoration-color: var(--primary);
}

.article-body strong {
    font-weight: 650;
}

.article-body blockquote {
    margin: 0 0 20px;
    padding: 4px 0 4px 20px;
    border-left: 3px solid var(--border);
    color: var(--text-secondary);
}

/* Callout — white card, 3px blue left border, small heading.
   Replaces the old emoji boxes. */

.callout {
    background: var(--surface-solid);
    border: 1px solid var(--border);
    border-left: 3px solid var(--primary);
    border-radius: var(--radius-md);
    padding: 20px 24px;
    margin: 32px 0;
}

.callout-title {
    color: var(--primary);
    font-size: 13px;
    font-weight: 650;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.callout p:last-child,
.callout ul:last-child,
.callout ol:last-child {
    margin-bottom: 0;
}

/* Example block — light card for worked examples (SOAP samples, etc.) */

.example-block {
    background: var(--surface-elevated);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 24px 26px;
    margin: 28px 0;
    font-size: 15.5px;
    line-height: 1.65;
}

.example-label {
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 650;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 14px;
}

.example-block p {
    margin-bottom: 14px;
}

.example-block p:last-child {
    margin-bottom: 0;
}

/* Tables (wrap every table in .table-scroll so the page never scrolls sideways) */

.table-scroll {
    overflow-x: auto;
    margin: 28px 0;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--surface-solid);
}

.article-body table {
    width: 100%;
    border-collapse: collapse;
    font-size: 15px;
    line-height: 1.5;
}

.article-body th,
.article-body td {
    text-align: left;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-light);
    vertical-align: top;
}

.article-body th {
    background: var(--surface-elevated);
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 650;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    white-space: nowrap;
}

.article-body tr:last-child td {
    border-bottom: none;
}

/* --------------------------------------------------------------------------
   CTA section (all pages, above footer)
   -------------------------------------------------------------------------- */

.cta-section {
    background: var(--surface-solid);
    border-top: 1px solid var(--border);
    margin-top: 56px;
    padding: 72px 24px 80px;
    text-align: center;
}

.cta-section h2 {
    font-size: clamp(26px, 4vw, 34px);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.cta-section p {
    font-size: 17px;
    line-height: 1.6;
    color: var(--text-secondary);
    max-width: 520px;
    margin: 0 auto 28px;
}

.cta-microcopy {
    font-size: 14px;
    color: var(--text-muted);
    margin: 16px auto 0;
}

/* --------------------------------------------------------------------------
   Footer (mirrors the landing footer)
   -------------------------------------------------------------------------- */

.blog-footer {
    padding: 56px 20px 40px;
    background: #0b1120;
    color: #ffffff;
}

.footer-container {
    max-width: 1000px;
    margin: 0 auto;
    text-align: center;
}

.footer-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 24px;
}

.footer-brand img {
    height: 28px;
    width: auto;
    border-radius: 8px;
}

.footer-brand span {
    font-size: 17px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95);
    letter-spacing: 0.2px;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 28px;
    margin-bottom: 28px;
    flex-wrap: wrap;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.75);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: #ffffff;
}

.footer-copyright {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.55);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 24px;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 768px) {
    .blog-hero {
        padding: 48px 20px 8px;
    }

    .post-grid {
        padding: 36px 20px 24px;
    }

    .article-header {
        padding: 44px 0 28px;
        margin-bottom: 32px;
    }

    .article-body h2 {
        font-size: 23px;
        margin-top: 44px;
    }

    .cta-section {
        padding: 56px 20px 64px;
    }
}

@media (max-width: 640px) {
    /* Nav collapses: keep logo + CTA, hide quiet links */
    .nav-quiet {
        display: none;
    }

    .blog-nav-links {
        gap: 16px;
    }

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

    .post-card {
        padding: 24px;
    }

    .article {
        padding: 0 20px 16px;
    }

    .example-block {
        padding: 20px;
    }

    .footer-links {
        gap: 18px;
    }
}
