/* ==========================================================================
   AI-4-Contractors.com — Article Page Styles
   ========================================================================== */

.article-content {
    max-width: var(--content-width);
    margin: 0 auto;
    padding: 48px 24px 80px;
}

/* --- Prose Typography --- */
.article-content h2 {
    font-size: 1.75rem;
    margin-top: 48px;
    margin-bottom: 16px;
    padding-top: 16px;
}

.article-content h3 {
    font-size: 1.35rem;
    margin-top: 36px;
    margin-bottom: 12px;
}

.article-content h4 {
    font-size: 1.1rem;
    margin-top: 28px;
    margin-bottom: 8px;
}

.article-content p {
    margin-bottom: 1.25rem;
    font-size: 1.05rem;
    line-height: 1.8;
}

.article-content a {
    color: var(--primary);
    text-decoration: underline;
    text-decoration-color: rgba(37, 99, 235, 0.3);
    text-underline-offset: 2px;
    transition: text-decoration-color var(--transition);
}

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

/* --- Lists --- */
.article-content ul,
.article-content ol {
    margin-bottom: 1.25rem;
    padding-left: 1.5em;
}

.article-content ul {
    list-style: disc;
}

.article-content ol {
    list-style: decimal;
}

.article-content li {
    margin-bottom: 0.5rem;
    font-size: 1.05rem;
    line-height: 1.7;
}

.article-content li::marker {
    color: var(--primary);
}

/* --- Blockquotes --- */
.article-content blockquote {
    border-left: 4px solid var(--primary);
    background: var(--cream);
    padding: 20px 24px;
    margin: 24px 0;
    border-radius: 0 var(--radius-btn) var(--radius-btn) 0;
    font-style: italic;
    color: var(--dark-text);
}

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

.article-content blockquote cite {
    display: block;
    margin-top: 8px;
    font-size: 0.875rem;
    font-style: normal;
    font-weight: 600;
    color: var(--muted);
}

/* --- Code Blocks --- */
.article-content code {
    background: var(--cream-deep);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.9em;
    font-family: 'SFMono-Regular', 'Consolas', 'Liberation Mono', 'Menlo', monospace;
    color: var(--dark);
}

.article-content pre {
    background: var(--dark);
    color: #E2E8F0;
    padding: 24px;
    border-radius: var(--radius-card);
    overflow-x: auto;
    margin: 24px 0;
    font-size: 0.9rem;
    line-height: 1.6;
}

.article-content pre code {
    background: none;
    padding: 0;
    border-radius: 0;
    color: inherit;
    font-size: inherit;
}

/* --- Tables --- */
.article-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 24px 0;
    font-size: 0.95rem;
    border-radius: var(--radius-card);
    overflow: hidden;
    border: 1px solid var(--border);
}

.article-content thead {
    background: var(--dark);
    color: var(--white);
}

.article-content th {
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.article-content td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
}

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

.article-content tbody tr:nth-child(even) {
    background: var(--cream);
}

/* --- Images / Figures --- */
.article-content figure {
    margin: 32px 0;
}

.article-content figure img {
    border-radius: var(--radius-card);
    width: 100%;
}

.article-content figcaption {
    text-align: center;
    font-size: 0.85rem;
    color: var(--muted);
    margin-top: 8px;
    font-style: italic;
}

/* --- Callout Boxes --- */
.callout {
    padding: 20px 24px;
    border-radius: var(--radius-card);
    margin: 24px 0;
    border-left: 4px solid;
}

.callout--tip {
    background: #ECFDF5;
    border-color: var(--success);
}

.callout--warning {
    background: #FFFBEB;
    border-color: var(--accent);
}

.callout--info {
    background: var(--primary-light);
    border-color: var(--primary);
}

.callout h4 {
    margin-top: 0;
    margin-bottom: 8px;
    font-size: 1rem;
}

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

/* --- Sources / Citations --- */
.article-sources {
    margin-top: 48px;
    padding-top: 32px;
    border-top: 2px solid var(--border);
}

.article-sources h2 {
    font-size: 1.5rem;
    margin-top: 0;
}

.article-sources ol {
    list-style: decimal;
    padding-left: 1.5em;
}

.article-sources li {
    font-size: 0.9rem;
    color: var(--muted);
    margin-bottom: 8px;
}

/* --- Related Articles --- */
.related-articles {
    margin-top: 64px;
    padding-top: 48px;
    border-top: 2px solid var(--border);
}

.related-articles h2 {
    margin-top: 0;
    margin-bottom: 24px;
}

/* --- Table of Contents --- */
.toc {
    background: var(--cream);
    border: 1px solid var(--border);
    border-radius: var(--radius-card);
    padding: 24px;
    margin-bottom: 32px;
}

.toc h4 {
    margin-top: 0;
    margin-bottom: 12px;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--muted);
}

.toc ol {
    list-style: decimal;
    padding-left: 1.25em;
}

.toc li {
    font-size: 0.95rem;
    margin-bottom: 6px;
}

.toc a {
    color: var(--dark-text);
    text-decoration: none;
}

.toc a:hover {
    color: var(--primary);
}

/* --- Article CTA --- */
.article-cta {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
    color: var(--white);
    border-radius: var(--radius-card);
    padding: 40px;
    text-align: center;
    margin-top: 48px;
}

.article-cta h3 {
    color: var(--white);
    margin-bottom: 12px;
}

.article-cta p {
    opacity: 0.9;
    margin-bottom: 24px;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .article-content {
        padding: 32px 16px 56px;
    }

    .article-content h2 {
        font-size: 1.5rem;
        margin-top: 36px;
    }

    .article-content h3 {
        font-size: 1.2rem;
    }

    .article-content pre {
        padding: 16px;
        font-size: 0.85rem;
        border-radius: var(--radius-btn);
    }

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

    .article-content th,
    .article-content td {
        padding: 10px 12px;
    }

    .article-cta {
        padding: 28px 20px;
    }
}
