/* ══════════════════════════════════════════════
   BLOG STYLES — extends /styles.css design tokens
   ══════════════════════════════════════════════ */

/* Active nav state for blog pages */
.nav-blog-active { color: var(--purple) !important; }

/* ── Reading Progress Bar ── */
.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: var(--purple);
    z-index: 200;
    transition: width 50ms linear;
}

/* ── Back Link ── */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 96px;
    margin-bottom: 32px;
    font-size: 13px;
    font-weight: 500;
    color: var(--gray-400);
    text-decoration: none;
    transition: color var(--transition);
}
.back-link:hover { color: var(--purple); }

/* ══════════════════════════════════════════════
   BLOG LISTING
   ══════════════════════════════════════════════ */
.blog-hero { padding: 128px 0 64px; }
.blog-hero .section-header { margin-bottom: 0; }

.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.blog-card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-xl);
    overflow: hidden;
    transition: all var(--transition);
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
}
.blog-card:hover {
    box-shadow: var(--shadow-lg);
    border-color: var(--purple-200);
}

.blog-card-image {
    aspect-ratio: 16 / 9;
    background: var(--purple-50);
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid var(--gray-100);
    overflow: hidden;
}
.blog-card-image-icon {
    font-size: 48px;
    color: var(--purple-200);
}

/* Blog card hero visual (COBOL → CogniCortex → Java) */
.blog-card-hero-visual {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 24px;
}
.blog-hero-flow {
    display: flex;
    align-items: center;
    gap: 12px;
}
.bhf-box {
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: -0.01em;
}
.bhf-legacy {
    background: var(--gray-100);
    color: var(--gray-500);
    border: 1px solid var(--gray-200);
}
.bhf-cogni {
    background: var(--purple);
    color: var(--white);
    font-size: 12px;
    padding: 10px 18px;
}
.bhf-target {
    background: var(--purple-50);
    color: var(--purple);
    border: 1px solid var(--purple-200);
}
.bhf-arrow {
    color: var(--purple-300);
    font-size: 18px;
    font-weight: 700;
}

.blog-card-body {
    padding: 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.blog-card-category {
    display: inline-block;
    padding: 3px 10px;
    background: var(--purple-100);
    color: var(--purple);
    font-size: 11px;
    font-weight: 700;
    border-radius: 100px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    width: fit-content;
}

.blog-card-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--gray-900);
    margin: 10px 0 8px;
    line-height: 1.3;
    letter-spacing: -0.01em;
}

.blog-card-excerpt {
    font-size: 14px;
    color: var(--gray-500);
    line-height: 1.7;
    flex: 1;
}

.blog-card-meta {
    font-size: 12px;
    color: var(--gray-400);
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--gray-100);
    display: flex;
    gap: 16px;
}

/* ══════════════════════════════════════════════
   BLOG POST
   ══════════════════════════════════════════════ */
.post-container {
    max-width: 760px;
    margin: 0 auto;
    padding: 0 24px 80px;
}

.post-header {
    margin-bottom: 48px;
}

.post-category {
    display: inline-block;
    padding: 5px 14px;
    background: var(--purple-100);
    color: var(--purple);
    font-size: 12px;
    font-weight: 700;
    border-radius: 100px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 16px;
}

.post-title {
    font-size: 40px;
    font-weight: 900;
    line-height: 1.12;
    letter-spacing: -0.03em;
    color: var(--gray-900);
    margin-bottom: 16px;
}

.post-subtitle {
    font-size: 18px;
    color: var(--gray-500);
    line-height: 1.6;
    margin-bottom: 16px;
}

.post-meta {
    font-size: 13px;
    color: var(--gray-400);
    display: flex;
    gap: 16px;
    align-items: center;
}
.post-meta-divider {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--gray-300);
}

/* ── Post Body Prose ── */
.post-body h2 {
    font-size: 28px;
    font-weight: 800;
    color: var(--gray-900);
    letter-spacing: -0.02em;
    margin: 48px 0 16px;
}

.post-body h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--gray-900);
    margin: 36px 0 12px;
}

.post-body p {
    font-size: 17px;
    color: var(--gray-600);
    line-height: 1.8;
    margin-bottom: 20px;
}

.post-body ul, .post-body ol {
    font-size: 17px;
    color: var(--gray-600);
    line-height: 1.8;
    margin-bottom: 20px;
    padding-left: 24px;
}

.post-body li {
    margin-bottom: 8px;
}

.post-body strong {
    color: var(--gray-800);
    font-weight: 600;
}

.post-body code {
    background: var(--purple-50);
    color: var(--purple-dark);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 15px;
    font-family: 'SF Mono', 'Fira Code', monospace;
}

.post-body pre {
    background: var(--gray-900);
    color: #e5e7eb;
    padding: 20px 24px;
    border-radius: var(--radius-lg);
    overflow-x: auto;
    margin-bottom: 24px;
    font-size: 14px;
    line-height: 1.7;
}
.post-body pre code {
    background: none;
    color: inherit;
    padding: 0;
    font-size: 14px;
}

.post-body blockquote {
    border-left: 3px solid var(--purple);
    padding: 16px 24px;
    margin: 24px 0;
    background: var(--purple-50);
    border-radius: 0 var(--radius) var(--radius) 0;
}
.post-body blockquote p {
    color: var(--gray-700);
    margin-bottom: 0;
    font-style: italic;
}

/* Callout boxes inside post */
.post-callout {
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin: 24px 0;
}
.post-callout-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 8px;
}
.post-callout p {
    font-size: 15px;
    margin-bottom: 0;
}

/* Wizard steps visual */
.post-wizard-steps {
    margin: 24px 0 32px;
    display: flex;
    flex-direction: column;
    gap: 0;
}
.post-wizard-step {
    display: flex;
    gap: 16px;
    padding: 20px;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
}
.post-wizard-num {
    width: 32px;
    height: 32px;
    background: var(--purple);
    color: var(--white);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    flex-shrink: 0;
}
.post-wizard-content { flex: 1; }
.post-wizard-label {
    font-size: 13px;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.post-wizard-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.pw-chip {
    padding: 4px 12px;
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: 100px;
    font-size: 12px;
    font-weight: 500;
    color: var(--gray-600);
}
.pw-chip.pw-active {
    background: var(--purple-50);
    border-color: var(--purple-200);
    color: var(--purple);
    font-weight: 700;
}
.pw-chip.pw-more {
    background: none;
    border-color: transparent;
    color: var(--gray-400);
    font-size: 11px;
    padding: 4px 6px;
}
.post-wizard-layers {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.pw-layer {
    display: flex;
    align-items: center;
    font-size: 12px;
    color: var(--gray-600);
    padding: 4px 0;
}
.pw-layer-name {
    display: inline-block;
    width: 80px;
    font-size: 11px;
    font-weight: 700;
    color: var(--gray-400);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    flex-shrink: 0;
}
.pw-more-layer {
    color: var(--gray-400);
    font-size: 11px;
    padding-left: 80px;
}
.post-wizard-connector {
    width: 2px;
    height: 12px;
    background: var(--gray-200);
    margin-left: 35px;
}

/* Migration arrow rows in the article */
.post-migration-grid {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 8px 16px;
    margin: 20px 0 28px;
    align-items: center;
}
.post-migration-from {
    font-size: 14px;
    font-weight: 500;
    color: var(--gray-500);
    text-align: right;
    padding: 8px 16px;
    background: var(--gray-50);
    border-radius: 6px;
}
.post-migration-arrow {
    font-weight: 700;
    color: var(--purple);
    font-size: 16px;
    text-align: center;
}
.post-migration-to {
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-900);
    padding: 8px 16px;
    background: var(--purple-50);
    border: 1px solid var(--purple-200);
    border-radius: 6px;
}

/* Step badges */
.post-step {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: var(--purple);
    color: var(--white);
    border-radius: 8px;
    font-size: 15px;
    font-weight: 700;
    margin-right: 10px;
    vertical-align: middle;
}

/* Stats row in article */
.post-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin: 28px 0;
}
.post-stat {
    text-align: center;
    padding: 24px 16px;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
}
.post-stat-value {
    font-size: 32px;
    font-weight: 800;
    color: var(--purple);
    letter-spacing: -0.03em;
}
.post-stat-label {
    font-size: 13px;
    color: var(--gray-500);
    margin-top: 4px;
}

/* ── Post CTA ── */
.post-cta {
    border: 1px solid var(--purple-200);
    background: var(--purple-50);
    border-radius: var(--radius-xl);
    padding: 40px;
    text-align: center;
    margin-top: 64px;
}
.post-cta h3 {
    font-size: 24px;
    font-weight: 800;
    color: var(--gray-900);
    margin-bottom: 12px;
}
.post-cta p {
    font-size: 15px;
    color: var(--gray-500);
    margin-bottom: 24px;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
}

/* ══════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════ */
@media (max-width: 1024px) {
    .blog-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
    .blog-grid { grid-template-columns: 1fr; }
    .blog-hero { padding: 100px 0 48px; }
    .post-title { font-size: 28px; }
    .post-subtitle { font-size: 16px; }
    .back-link { margin-top: 80px; }
    .post-body h2 { font-size: 22px; }
    .post-body p, .post-body ul, .post-body ol { font-size: 16px; }
    .post-stats { grid-template-columns: 1fr; }
    .post-migration-grid { grid-template-columns: 1fr; gap: 4px; }
    .post-migration-from, .post-migration-to { text-align: center; }
    .post-migration-arrow { font-size: 14px; }
    .post-cta { padding: 28px 20px; }
}
