/* ==========================================================================
   Blog Article Typography — Global Styles
   Applied to .blog-article-content inside blog post show pages.
   ========================================================================== */

.blog-article-content {
    font-family: 'Plus Jakarta Sans', 'Inter', system-ui, -apple-system, sans-serif;
    font-size: 1.175rem;
    line-height: 1.9;
    color: #374151;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* ---------- Headings ---------- */
.blog-article-content h2 {
    font-family: 'Space Grotesk', 'Inter', sans-serif;
    font-size: 1.85rem;
    font-weight: 800;
    color: #0f172a;
    margin-top: 3.5rem;
    margin-bottom: 1.25rem;
    padding-bottom: 0.85rem;
    border-bottom: 2px solid #e2e8f0;
    letter-spacing: -0.025em;
    line-height: 1.3;
    position: relative;
}

.blog-article-content h2::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 70px;
    height: 3px;
    background: linear-gradient(90deg, #06b6d4, #0d9488);
    border-radius: 3px;
}

.blog-article-content h3 {
    font-family: 'Space Grotesk', 'Inter', sans-serif;
    font-size: 1.45rem;
    font-weight: 700;
    color: #1e293b;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    letter-spacing: -0.015em;
    line-height: 1.4;
}

.blog-article-content h4 {
    font-family: 'Space Grotesk', 'Inter', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    color: #1e293b;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

/* First heading should not have excessive top margin */
.blog-article-content > h2:first-child,
.blog-article-content > h3:first-child {
    margin-top: 0;
}

/* ---------- Paragraphs ---------- */
.blog-article-content p {
    margin-bottom: 1.75rem;
    color: #4b5563;
    font-size: 1.175rem;
    line-height: 1.9;
}

/* Lead paragraph (first paragraph) */
.blog-article-content > p:first-of-type {
    font-size: 1.3rem;
    line-height: 1.85;
    color: #334155;
    font-weight: 400;
}

/* ---------- Links ---------- */
.blog-article-content a {
    color: #0891b2;
    font-weight: 500;
    text-decoration: none;
    border-bottom: 1px solid rgba(8, 145, 178, 0.3);
    transition: all 0.2s ease;
}

.blog-article-content a:hover {
    color: #0e7490;
    border-bottom-color: #0e7490;
}

/* ---------- Bold & Strong ---------- */
.blog-article-content strong,
.blog-article-content b {
    font-weight: 700;
    color: #1e293b;
}

/* ---------- Italic & Emphasis ---------- */
.blog-article-content em,
.blog-article-content i:not(.fas):not(.fab):not(.far):not(.fal) {
    font-style: italic;
    color: #4b5563;
}

/* ---------- Unordered Lists ---------- */
.blog-article-content ul {
    margin: 1.75rem 0;
    padding-left: 0;
    list-style: none;
}

.blog-article-content ul li {
    position: relative;
    padding-left: 2rem;
    margin-bottom: 1rem;
    color: #4b5563;
    line-height: 1.8;
    font-size: 1.125rem;
}

.blog-article-content ul li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.7rem;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: linear-gradient(135deg, #06b6d4, #0d9488);
    flex-shrink: 0;
}

/* Nested lists */
.blog-article-content ul ul {
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}

.blog-article-content ul ul li::before {
    width: 6px;
    height: 6px;
    background: #94a3b8;
    border-radius: 50%;
}

/* List items with bold lead text — add visual distinction */
.blog-article-content li strong:first-child {
    color: #0f172a;
}

/* ---------- Ordered Lists ---------- */
.blog-article-content ol {
    margin: 1.75rem 0;
    padding-left: 0;
    list-style: none;
    counter-reset: article-counter;
}

.blog-article-content ol li {
    position: relative;
    padding-left: 2.75rem;
    margin-bottom: 1rem;
    color: #4b5563;
    line-height: 1.8;
    font-size: 1.125rem;
    counter-increment: article-counter;
}

.blog-article-content ol li::before {
    content: counter(article-counter);
    position: absolute;
    left: 0;
    top: 0.2rem;
    width: 1.65rem;
    height: 1.65rem;
    border-radius: 50%;
    background: linear-gradient(135deg, #06b6d4, #0d9488);
    color: white;
    font-size: 0.8rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* ---------- Blockquotes ---------- */
.blog-article-content blockquote {
    margin: 2.5rem 0;
    padding: 1.75rem 2rem;
    border-left: 4px solid #06b6d4;
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.06), rgba(6, 182, 212, 0.02));
    border-radius: 0 16px 16px 0;
    font-style: normal;
    color: #374151;
    font-size: 1.15rem;
    line-height: 1.8;
}

.blog-article-content blockquote p {
    margin-bottom: 0.5rem;
    color: #374151;
    font-size: 1.15rem;
}

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

/* ---------- Code (inline) ---------- */
.blog-article-content code {
    font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
    font-size: 0.85em;
    background: #f1f5f9;
    color: #e11d48;
    padding: 0.2em 0.55em;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    font-weight: 500;
    word-break: break-word;
}

/* ---------- Code (block / pre) ---------- */
.blog-article-content pre {
    margin: 2.5rem 0;
    padding: 1.75rem;
    background: #0f172a;
    border-radius: 16px;
    overflow-x: auto;
    border: 1px solid #1e293b;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
}

.blog-article-content pre code {
    font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
    font-size: 0.9rem;
    background: none;
    color: #e2e8f0;
    padding: 0;
    border: none;
    border-radius: 0;
    line-height: 1.75;
}

/* ---------- Images ---------- */
.blog-article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 16px;
    margin: 2.5rem 0;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
}

/* ---------- Horizontal Rule ---------- */
.blog-article-content hr {
    border: none;
    height: 1px;
    background: linear-gradient(90deg, transparent, #cbd5e1, transparent);
    margin: 3.5rem 0;
}

/* ---------- Tables ---------- */
.blog-article-content table {
    width: 100%;
    margin: 2.5rem 0;
    border-collapse: separate;
    border-spacing: 0;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    font-size: 0.975rem;
}

.blog-article-content thead {
    background: linear-gradient(135deg, #0f172a, #1e293b);
}

.blog-article-content thead th {
    padding: 1rem 1.25rem;
    text-align: left;
    color: white;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.blog-article-content tbody tr {
    border-bottom: 1px solid #f1f5f9;
    transition: background 0.15s ease;
}

.blog-article-content tbody tr:hover {
    background: rgba(6, 182, 212, 0.04);
}

.blog-article-content tbody tr:last-child {
    border-bottom: none;
}

.blog-article-content tbody td {
    padding: 0.875rem 1.25rem;
    color: #4b5563;
}

/* ---------- Figures & Captions ---------- */
.blog-article-content figure {
    margin: 3rem 0;
}

.blog-article-content figcaption {
    text-align: center;
    font-size: 0.9rem;
    color: #94a3b8;
    margin-top: 0.75rem;
    font-style: italic;
}

/* ---------- Definition Lists ---------- */
.blog-article-content dl {
    margin: 1.75rem 0;
}

.blog-article-content dt {
    font-weight: 700;
    color: #1e293b;
    margin-top: 1.25rem;
}

.blog-article-content dd {
    margin-left: 1.5rem;
    margin-top: 0.25rem;
    color: #4b5563;
}

/* ---------- Abbreviations ---------- */
.blog-article-content abbr {
    text-decoration: underline dotted;
    cursor: help;
}

/* ---------- Mark / Highlight ---------- */
.blog-article-content mark {
    background: linear-gradient(120deg, rgba(6, 182, 212, 0.15) 0%, rgba(6, 182, 212, 0.25) 100%);
    padding: 0.1em 0.35em;
    border-radius: 4px;
    color: inherit;
}

/* ---------- Spacing between lists after a paragraph ---------- */
.blog-article-content p + ul,
.blog-article-content p + ol {
    margin-top: -0.5rem;
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
    .blog-article-content {
        font-size: 1.0625rem;
        line-height: 1.8;
    }

    .blog-article-content > p:first-of-type {
        font-size: 1.125rem;
    }

    .blog-article-content h2 {
        font-size: 1.5rem;
        margin-top: 2.5rem;
    }

    .blog-article-content h3 {
        font-size: 1.25rem;
        margin-top: 2rem;
    }

    .blog-article-content pre {
        padding: 1.25rem;
        border-radius: 12px;
    }

    .blog-article-content blockquote {
        padding: 1.25rem 1.5rem;
    }

    .blog-article-content table {
        font-size: 0.875rem;
    }

    .blog-article-content thead th,
    .blog-article-content tbody td {
        padding: 0.625rem 0.875rem;
    }
}

/* ---------- Print Styles ---------- */
@media print {
    .blog-article-content {
        color: #000;
        font-size: 12pt;
    }

    .blog-article-content h2,
    .blog-article-content h3 {
        color: #000;
        page-break-after: avoid;
    }

    .blog-article-content a {
        color: #000;
        text-decoration: underline;
    }

    .blog-article-content pre,
    .blog-article-content code {
        border: 1px solid #ccc;
        background: #f5f5f5;
    }
}
