/* ============================================================
   BLOG CONTENT STYLES — blog_content.css
   Typography and layout classes for blog post pages.
   Typography rules are scoped to .blog-content.
   Surrounding layout classes (.blog-toc, .blog-cta, etc.)
   are standalone.
   ============================================================ */


/* ── Reading Time Pill ── */
.reading-time {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--brand-blue);
    background: #eef7ff;
    padding: 4px 12px;
    border-radius: 20px;
    letter-spacing: 0.02em;
}


/* ── Blog Meta Row ── */
.blog-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.blog-meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.blog-meta-item i {
    color: var(--brand-blue);
    font-size: 0.8rem;
}


/* ── Table of Contents ── */
.blog-toc {
    background: var(--light-gray);
    border-left: 4px solid var(--brand-blue);
    border-radius: 0 8px 8px 0;
    padding: 20px 24px;
    margin-bottom: 36px;
}

.blog-toc-heading {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.blog-toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
    counter-reset: toc-counter;
}

.blog-toc-list li {
    counter-increment: toc-counter;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 0.9rem;
    line-height: 1.5;
}

.blog-toc-list li:last-child {
    margin-bottom: 0;
}

.blog-toc-list li::before {
    content: counter(toc-counter) ".";
    color: var(--brand-blue);
    font-weight: 700;
    font-size: 0.8rem;
    min-width: 18px;
    flex-shrink: 0;
    padding-top: 1px;
}

.blog-toc-list a {
    color: var(--dark);
    text-decoration: none;
    transition: color 0.15s;
}

.blog-toc-list a:hover {
    color: var(--brand-blue);
}


/* ── Typography ── */
.blog-content h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dark);
    margin: 36px 0 16px;
    border-left: 4px solid var(--brand-blue);
    padding-left: 12px;
    line-height: 1.3;
}

.blog-content h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--dark);
    margin: 28px 0 12px;
    line-height: 1.3;
}

.blog-content h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--dark);
    margin: 20px 0 8px;
    line-height: 1.3;
}

.blog-content h2:first-child,
.blog-content h3:first-child,
.blog-content h4:first-child {
    margin-top: 0;
}

.blog-content p {
    font-size: 0.95rem;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.blog-content p:last-child {
    margin-bottom: 0;
}

.blog-content a {
    color: var(--brand-blue);
    text-decoration: none;
    font-weight: 500;
}

.blog-content a:hover {
    text-decoration: underline;
}

.blog-content strong {
    font-weight: 600;
    color: var(--dark);
}

.blog-content em {
    font-style: italic;
}


/* ── Lists ── */
.blog-content ul,
.blog-content ol {
    padding-left: 1.5rem;
    margin-bottom: 16px;
}

.blog-content li {
    margin-bottom: 8px;
    line-height: 1.7;
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.blog-content li strong {
    color: var(--dark);
}


/* ── Tables ── */
.blog-content table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    margin-bottom: 24px;
}

.blog-content th {
    background: var(--light-gray);
    font-weight: 700;
    color: var(--dark);
    padding: 12px 16px;
    border: 1px solid var(--border-light);
    text-align: left;
}

.blog-content td {
    padding: 10px 16px;
    border: 1px solid var(--border-light);
    color: var(--text-secondary);
    line-height: 1.6;
}

.blog-content tr:nth-child(even) td {
    background: #fafafa;
}

.blog-content .blog-table-wrap {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 8px;
    border: 1px solid var(--border-light);
    margin-bottom: 24px;
}

.blog-content .blog-table-wrap table {
    margin-bottom: 0;
}


/* ── Blockquote ── */
.blog-content blockquote {
    border-left: 4px solid var(--brand-blue);
    background: #eef7ff;
    padding: 16px 20px;
    border-radius: 0 4px 4px 0;
    margin: 20px 0;
    font-style: italic;
    color: var(--dark);
}

.blog-content blockquote p {
    margin-bottom: 0;
    color: var(--dark);
}


/* ── Featured Image ── */
.featured-image-wrapper img {
    width: 100%;
    border-radius: 12px;
    margin-bottom: 32px;
    max-height: 480px;
    object-fit: cover;
    display: block;
}


/* ── Blog CTA ── */
.blog-cta {
    background: #eef7ff;
    border-radius: 12px;
    padding: 32px;
    text-align: center;
    margin: 40px 0 32px;
}

.blog-cta h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--dark);
    margin: 0 0 10px;
}

.blog-cta p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin: 0 0 20px;
}

.blog-cta-btn {
    display: inline-block;
    background: var(--brand-blue);
    color: var(--white);
    font-size: 0.95rem;
    font-weight: 600;
    padding: 12px 28px;
    border-radius: 8px;
    text-decoration: none;
    transition: opacity 0.15s, transform 0.15s;
}

.blog-cta-btn:hover {
    opacity: 0.88;
    transform: translateY(-1px);
    text-decoration: none;
    color: var(--white);
}


/* ── FAQ ── */
.blog-faq {
    background: var(--light-gray);
    border-radius: 12px;
    padding: 32px;
    margin: 36px 0;
}

.blog-faq-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--dark);
    margin: 0 0 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-light);
}

.blog-faq-item {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-light);
}

.blog-faq-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.blog-faq-question {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 8px;
    line-height: 1.4;
}

.blog-faq-answer {
    font-size: 0.93rem;
    color: var(--text-secondary);
    line-height: 1.75;
    margin: 0;
}


/* ── Related Posts ── */
.blog-related {
    padding: 48px 0 32px;
    border-top: 1px solid var(--border-light);
    margin-top: 16px;
}

.related-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 24px;
}

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

.related-card {
    background: var(--white);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    overflow: hidden;
    text-decoration: none;
    display: block;
    transition: box-shadow 0.2s, transform 0.2s;
}

.related-card:hover {
    box-shadow: 0 6px 24px rgba(28, 28, 28, 0.1);
    transform: translateY(-2px);
    text-decoration: none;
}

.related-image {
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: var(--light-gray);
}

.related-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.related-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 1.5rem;
}

.related-content {
    padding: 14px 16px;
}

.related-content h3 {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--dark);
    margin: 0 0 8px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.related-date {
    font-size: 0.78rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 5px;
}


/* ── Share Buttons ── */
.blog-share {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    padding: 24px 0;
    border-top: 1px solid var(--border-light);
    margin-top: 8px;
}

.blog-share-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--dark);
    margin-right: 4px;
}

.blog-share-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 18px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    color: var(--white);
    transition: opacity 0.15s, transform 0.15s;
}

.blog-share-btn:hover {
    opacity: 0.88;
    transform: translateY(-1px);
    text-decoration: none;
    color: var(--white);
}

.blog-share-btn--whatsapp { background: #25D366; }
.blog-share-btn--linkedin { background: #0A66C2; }
.blog-share-btn--twitter  { background: #000000; }


/* ── CVF Components (mirrored from cv-format.css for use in blog posts) ── */
.cvf-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    line-height: 1.4;
}
.cvf-badge--blue   { background: var(--brand-blue); color: var(--white); }
.cvf-badge--green  { background: #16a34a; color: var(--white); }
.cvf-badge--amber  { background: #f59e0b; color: var(--dark); }
.cvf-badge--purple { background: #7c3aed; color: var(--white); }

.cvf-highlight-box {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    padding: 18px 20px;
    margin: 16px 0;
    color: var(--dark);
    line-height: 1.75;
}
.cvf-highlight-box p:last-child { margin-bottom: 0; }

.cvf-warning-box {
    background: #fffbeb;
    border: 1px solid #fcd34d;
    border-radius: 8px;
    padding: 18px 20px;
    margin: 16px 0;
    color: var(--dark);
    line-height: 1.75;
}
.cvf-warning-box p:last-child { margin-bottom: 0; }

.cvf-do-dont {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin: 16px 0;
}

.cvf-do,
.cvf-dont {
    border-radius: 8px;
    padding: 18px 20px;
    font-size: 0.875rem;
    line-height: 1.75;
}

.cvf-do {
    background: #f0fdf4;
    border: 1px solid #86efac;
}

.cvf-do::before {
    content: '✓ Do';
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #16a34a;
    margin-bottom: 10px;
}

.cvf-dont {
    background: #fef2f2;
    border: 1px solid #fca5a5;
}

.cvf-dont::before {
    content: '✗ Don\'t';
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #dc2626;
    margin-bottom: 10px;
}

.cvf-do p, .cvf-dont p,
.cvf-do ul, .cvf-dont ul { margin-bottom: 8px; color: var(--dark); }
.cvf-do p:last-child, .cvf-dont p:last-child { margin-bottom: 0; }

.cvf-table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0;
    font-size: 0.875rem;
    border-radius: 8px;
    overflow: hidden;
}
.cvf-table thead tr { background: var(--brand-blue); color: var(--white); }
.cvf-table th {
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.cvf-table td {
    padding: 11px 16px;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-light);
    line-height: 1.6;
}
.cvf-table tbody tr:last-child td { border-bottom: none; }
.cvf-table tbody tr:nth-child(even) { background: var(--light-gray); }
.cvf-table tbody tr:hover { background: #eff6ff; }

.cvf-steps {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin: 16px 0;
}

.cvf-step {
    display: flex;
    align-items: flex-start;
    gap: 18px;
    background: var(--light-gray);
    border: 1px solid var(--border-light);
    border-radius: 10px;
    padding: 20px;
}

.cvf-step-num {
    width: 40px;
    height: 40px;
    background: var(--brand-blue);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 800;
    flex-shrink: 0;
}

.cvf-step-content { flex: 1; min-width: 0; }

.cvf-step-content h4 {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--dark);
    margin: 0 0 6px;
    line-height: 1.3;
}

.cvf-step-content p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin: 0;
}

.cvf-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin: 16px 0;
}

.cvf-stat {
    flex: 1;
    min-width: 140px;
    background: var(--light-gray);
    border: 1px solid var(--border-light);
    border-radius: 10px;
    padding: 20px 16px;
    text-align: center;
}

.cvf-stat-value {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--brand-blue);
    line-height: 1;
    margin-bottom: 6px;
    letter-spacing: -0.02em;
}

.cvf-stat-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.4;
}


/* ── Responsive ── */
@media (max-width: 768px) {
    .blog-content h2 {
        font-size: 1.3rem;
    }

    .blog-content table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .cvf-table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .cvf-do-dont {
        grid-template-columns: 1fr;
    }

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

    .blog-cta {
        padding: 20px;
    }

    .blog-cta h3 {
        font-size: 1.1rem;
    }

    .blog-share {
        gap: 8px;
    }

    .blog-share-btn {
        padding: 7px 14px;
        font-size: 0.8rem;
    }

    .blog-toc {
        padding: 16px 18px;
    }

    .blog-faq {
        padding: 20px;
    }
}
