/* ─── Blog shared styles ─────────────────────────────────────────── */

/* ── Index hero ── */
.blog-index-hero {
    padding: 140px 0 64px;
    background: #fff;
    border-bottom: 1px solid #E2E8F0;
}

.blog-eyebrow {
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #10B981;
    margin-bottom: 1rem;
}

.blog-index-heading {
    font-size: 2.75rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.1;
    color: #0F172A;
    margin-bottom: 1.25rem;
    max-width: 640px;
}

.blog-index-sub {
    font-size: 1.1rem;
    color: #64748B;
    line-height: 1.7;
    max-width: 600px;
}

/* ── Index body ── */
.blog-index-body {
    padding: 64px 0 96px;
    background: #F8FAFC;
}

/* ── Post grid ── */
.blog-post-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 2rem;
    margin-bottom: 64px;
}

/* ── Blog card ── */
.blog-card {
    background: #fff;
    border: 1px solid #E2E8F0;
    border-radius: 16px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.blog-card:hover {
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
    transform: translateY(-2px);
}

.blog-card-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.blog-tag {
    background: #ecfdf5;
    color: #10B981;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.6rem;
    border-radius: 9999px;
    letter-spacing: 0.02em;
}

.blog-date {
    font-size: 0.8rem;
    color: #94A3B8;
}

.blog-read-time {
    font-size: 0.8rem;
    color: #94A3B8;
}

.blog-card-title {
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: -0.015em;
    line-height: 1.35;
    color: #0F172A;
    margin: 0;
}

.blog-card-title a {
    color: inherit;
    text-decoration: none;
}

.blog-card-title a:hover {
    color: #10B981;
}

.blog-card-excerpt {
    font-size: 0.92rem;
    color: #64748B;
    line-height: 1.65;
    margin: 0;
    flex: 1;
}

.blog-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 0.75rem;
    border-top: 1px solid #F1F5F9;
    margin-top: auto;
}

.blog-read-link {
    font-size: 0.875rem;
    font-weight: 600;
    color: #10B981;
    text-decoration: none;
}

.blog-read-link:hover {
    text-decoration: underline;
}

/* ── Newsletter block on index ── */
.blog-index-newsletter {
    background: #0F172A;
    border-radius: 20px;
    padding: 3rem;
}

.blog-newsletter-heading {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #fff;
    margin-bottom: 0.5rem;
}

.blog-newsletter-sub {
    color: #94A3B8;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    max-width: 480px;
}

.blog-newsletter-form {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.blog-newsletter-input {
    flex: 1;
    min-width: 180px;
    padding: 0.75rem 1rem;
    border-radius: 9999px;
    border: 1px solid #334155;
    background: #1E293B;
    color: #fff;
    font-family: inherit;
    font-size: 0.9rem;
    outline: none;
}

.blog-newsletter-input::placeholder {
    color: #64748B;
}

.blog-newsletter-input:focus {
    border-color: #10B981;
}

.blog-newsletter-btn {
    white-space: nowrap;
}

.blog-newsletter-note {
    font-size: 0.78rem;
    color: #475569;
    margin-top: 0.75rem;
}

/* ── Active nav link ── */
.nav-link.active {
    color: #10B981;
    font-weight: 600;
}

/* ═══════════════════════════════════════════════════════════════════
   POST PAGE LAYOUT
═══════════════════════════════════════════════════════════════════ */

.post-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 120px 20px 96px;
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 4rem;
    align-items: start;
}

/* ── Post header ── */
.post-header {
    margin-bottom: 2.5rem;
    padding-bottom: 2.5rem;
    border-bottom: 1px solid #E2E8F0;
}

.post-meta-top {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.post-back {
    font-size: 0.85rem;
    color: #64748B;
    text-decoration: none;
    font-weight: 500;
}

.post-back:hover {
    color: #10B981;
}

.post-title {
    font-size: 2.25rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.15;
    color: #0F172A;
    margin-bottom: 1rem;
}

.post-subtitle {
    font-size: 1.1rem;
    color: #64748B;
    line-height: 1.7;
    margin-bottom: 1.25rem;
}

.post-meta-bottom {
    display: flex;
    gap: 1rem;
    align-items: center;
    font-size: 0.83rem;
    color: #94A3B8;
}

/* ── Post body typography ── */
.post-body {
    font-size: 1.05rem;
    line-height: 1.8;
    color: #1E293B;
}

.post-body p {
    margin-bottom: 1.5rem;
}

.post-body h2 {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #0F172A;
    margin: 2.5rem 0 1rem;
    line-height: 1.3;
}

.post-body h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: #0F172A;
    margin: 2rem 0 0.75rem;
}

.post-body code {
    background: #F1F5F9;
    color: #0F172A;
    padding: 0.15em 0.4em;
    border-radius: 4px;
    font-size: 0.9em;
    font-family: 'SF Mono', 'Fira Code', monospace;
}

/* ── Step list ── */
.post-step-list {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    margin: 1.5rem 0 2rem;
}

.post-step {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.post-step-num {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    background: #10B981;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 700;
    margin-top: 2px;
}

.post-step-content {
    font-size: 1rem;
    line-height: 1.7;
    color: #1E293B;
}

/* ── Bullet list ── */
.post-list {
    margin: 1rem 0 1.5rem 1.25rem;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.post-list li {
    line-height: 1.7;
    color: #1E293B;
}

.post-list li::marker {
    color: #10B981;
}

/* ── Content upgrade box ── */
.post-upgrade-box {
    background: #F0FDF4;
    border: 1px solid #A7F3D0;
    border-radius: 16px;
    padding: 1.75rem;
    margin: 2.5rem 0;
    display: flex;
    gap: 1.25rem;
    align-items: flex-start;
}

.post-upgrade-icon {
    font-size: 1.75rem;
    flex-shrink: 0;
    margin-top: 2px;
}

.post-upgrade-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #065F46;
    margin-bottom: 0.4rem;
}

.post-upgrade-desc {
    font-size: 0.9rem;
    color: #047857;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.post-upgrade-btn {
    display: inline-block;
    background: #10B981;
    color: #fff;
    padding: 0.6rem 1.25rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s ease;
}

.post-upgrade-btn:hover {
    background: #059669;
}

/* ── Stamp callout ── */
.post-stamp-callout {
    background: #0F172A;
    border-radius: 16px;
    padding: 2rem;
    margin: 3rem 0 2rem;
}

.post-stamp-title {
    font-size: 1rem;
    font-weight: 700;
    color: #10B981;
    margin-bottom: 0.75rem;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    font-size: 0.78rem;
}

.post-stamp-callout p {
    color: #CBD5E1;
    font-size: 0.97rem;
    line-height: 1.7;
    margin-bottom: 1.25rem;
}

.post-stamp-link {
    display: inline-block;
    background: #10B981;
    color: #fff;
    padding: 0.65rem 1.5rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s ease;
}

.post-stamp-link:hover {
    background: #059669;
}

/* ── FAQ section ── */
.post-faq {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin: 1rem 0;
    border: 1px solid #E2E8F0;
    border-radius: 12px;
    overflow: hidden;
}

.post-faq-item {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #E2E8F0;
}

.post-faq-item:last-child {
    border-bottom: none;
}

.post-faq-q {
    font-size: 1rem;
    font-weight: 600;
    color: #0F172A;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.post-faq-a {
    font-size: 0.93rem;
    color: #475569;
    line-height: 1.7;
    margin: 0;
}

/* ── Post nav ── */
.post-nav {
    padding-top: 2.5rem;
    border-top: 1px solid #E2E8F0;
    margin-top: 3rem;
}

.post-back-link {
    font-size: 0.9rem;
    font-weight: 600;
    color: #64748B;
    text-decoration: none;
}

.post-back-link:hover {
    color: #10B981;
}

/* ── Sidebar ── */
.post-sidebar {
    /* sticks on scroll */
}

.sidebar-sticky {
    position: sticky;
    top: 100px;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.sidebar-card {
    background: #fff;
    border: 1px solid #E2E8F0;
    border-radius: 16px;
    padding: 1.5rem;
}

.sidebar-card-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #0F172A;
    margin-bottom: 0.5rem;
}

.sidebar-card-desc {
    font-size: 0.85rem;
    color: #64748B;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.sidebar-form {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.sidebar-input {
    padding: 0.65rem 1rem;
    border-radius: 9999px;
    border: 1px solid #E2E8F0;
    font-family: inherit;
    font-size: 0.875rem;
    color: #0F172A;
    outline: none;
    background: #F8FAFC;
}

.sidebar-input:focus {
    border-color: #10B981;
    background: #fff;
}

.sidebar-btn {
    width: 100%;
    font-size: 0.875rem;
    padding: 0.65rem 1rem;
}

.sidebar-note {
    font-size: 0.75rem;
    color: #94A3B8;
    margin-top: 0.5rem;
    text-align: center;
}

/* ── TOC ── */
.sidebar-toc {}

.toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.toc-link {
    font-size: 0.85rem;
    color: #64748B;
    text-decoration: none;
    line-height: 1.5;
    display: block;
    padding: 0.1rem 0;
    border-left: 2px solid #E2E8F0;
    padding-left: 0.75rem;
    transition: color 0.15s, border-color 0.15s;
}

.toc-link:hover {
    color: #10B981;
    border-color: #10B981;
}

/* ─── Responsive ──────────────────────────────────────────────────── */
@media (max-width: 900px) {
    .post-container {
        grid-template-columns: 1fr;
        padding: 100px 20px 64px;
    }

    .post-sidebar {
        order: -1;
    }

    .sidebar-sticky {
        position: static;
        flex-direction: row;
        flex-wrap: wrap;
    }

    .sidebar-card {
        flex: 1;
        min-width: 260px;
    }

    .sidebar-toc {
        display: none;
    }

    .post-title {
        font-size: 1.75rem;
    }

    .blog-index-heading {
        font-size: 2rem;
    }

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

    .blog-index-newsletter {
        padding: 2rem;
    }

    .blog-newsletter-form {
        flex-direction: column;
    }

    .post-upgrade-box {
        flex-direction: column;
    }
}

@media (max-width: 600px) {
    .blog-index-hero {
        padding: 120px 0 48px;
    }

    .post-container {
        padding: 90px 16px 48px;
    }
}
