/* project/static/css/article.css — Article + News detail page styles.
   Extracted from inline <style> blocks in articles/article_page.html
   and news/news_page.html for caching and discoverability.
*/

.article-page {
    background: #f8f9fa;
    min-height: 100vh;
    padding: 2rem 0 4rem;
}

/* Breadcrumbs */
.article-breadcrumbs {
    font-size: 0.875rem;
    color: #6c757d;
    margin-bottom: 1.5rem;
}

.article-breadcrumbs a {
    color: #6c757d;
    text-decoration: none;
    transition: color 0.2s;
}

.article-breadcrumbs a:hover {
    color: #0d6efd;
}

.article-breadcrumbs .separator {
    margin: 0 0.5rem;
    color: #adb5bd;
}

.article-breadcrumbs .current {
    color: #495057;
}

/* Article Card */
.article-card {
    background: #fff;
    border-radius: 1rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 4px 12px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

/* Hero Image */
.article-hero {
    width: 100%;
    max-height: 400px;
    overflow: hidden;
}

.article-hero-img {
    width: 100%;
    height: auto;
    object-fit: cover;
}

/* Article Body */
.article-body {
    padding: 2.5rem;
    max-width: 800px;
    margin: 0 auto;
}

@media (max-width: 768px) {
    .article-body {
        padding: 1.5rem;
    }
}

/* Article Header */
.article-header {
    margin-bottom: 2.5rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #e9ecef;
}

.article-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.article-tags .tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: #e7f1ff;
    color: #0d6efd;
    font-size: 0.8125rem;
    font-weight: 500;
    border-radius: 1rem;
}

.article-title {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.3;
    color: #212529;
    margin: 0 0 1rem;
}

@media (min-width: 768px) {
    .article-title {
        font-size: 2.5rem;
    }
}

.article-excerpt {
    margin-top: 1.25rem;
    font-size: 1.125rem;
    line-height: 1.6;
    color: #495057;
}

/* Article Content */
.article-content {
    font-size: 1.0625rem;
    line-height: 1.8;
    color: #343a40;
}

.article-content h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 2.5rem 0 1rem;
    color: #212529;
}

.article-content h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 2rem 0 0.75rem;
    color: #212529;
}

.article-content p {
    margin-bottom: 1.25rem;
}

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

.article-content li {
    margin-bottom: 0.5rem;
}

.article-content a {
    color: #0d6efd;
    text-decoration: underline;
    text-decoration-color: rgba(13, 110, 253, 0.3);
    text-underline-offset: 2px;
    transition: text-decoration-color 0.2s;
}

.article-content a:hover {
    text-decoration-color: #0d6efd;
}

.article-content blockquote {
    margin: 2rem 0;
    padding: 1.25rem 1.5rem;
    background: #f8f9fa;
    border-left: 4px solid #0d6efd;
    border-radius: 0 0.5rem 0.5rem 0;
    font-style: italic;
    color: #495057;
}

.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 0.5rem;
    margin: 1.5rem 0;
}

.article-content table {
    width: 100%;
    margin: 1.5rem 0;
    border-collapse: collapse;
}

.article-content th,
.article-content td {
    padding: 0.75rem 1rem;
    border: 1px solid #dee2e6;
    text-align: left;
}

.article-content th {
    background: #f8f9fa;
    font-weight: 600;
}

.article-content pre,
.article-content code {
    font-family: 'SF Mono', Monaco, 'Courier New', monospace;
    font-size: 0.875em;
}

.article-content code {
    background: #f1f3f4;
    padding: 0.2em 0.4em;
    border-radius: 0.25rem;
}

.article-content pre {
    background: #f8f9fa;
    padding: 1rem 1.25rem;
    border-radius: 0.5rem;
    overflow-x: auto;
    margin: 1.5rem 0;
}

.article-content pre code {
    background: none;
    padding: 0;
}

/* Related Section */
.article-related {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #e9ecef;
}

.article-related h2 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #212529;
    margin: 0 0 1rem;
}

.related-grid {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.related-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    background: #f8f9fa;
    border-radius: 0.5rem;
    text-decoration: none;
    transition: background 0.2s, transform 0.2s;
}

.related-link:hover {
    background: #e9ecef;
    transform: translateX(4px);
}

.related-link.primary {
    background: #e7f1ff;
}

.related-link.primary:hover {
    background: #d0e3ff;
}

.related-title {
    font-size: 0.9375rem;
    font-weight: 500;
    color: #212529;
}

.related-badge {
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.25rem 0.625rem;
    background: #0d6efd;
    color: #fff;
    border-radius: 1rem;
}

/* Article Footer */
.article-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e9ecef;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Button block styling */
.article-content .btn {
    color: #fff !important;
    text-decoration: none;
}

.article-content .btn-primary {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

.article-content .btn-primary:hover {
    background-color: #0b5ed7;
    border-color: #0a58ca;
}

.back-link,
.cta-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9375rem;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s;
}

.back-link {
    color: #6c757d;
}

.back-link:hover {
    color: #0d6efd;
}

.cta-link {
    color: #0d6efd;
}

.cta-link:hover {
    color: #0a58ca;
}

.article-cta {
    margin: 2rem 0;
    padding: 1.5rem;
    background: linear-gradient(135deg, #f0f4ff 0%, #e8f5e9 100%);
    border-radius: 12px;
    border: 1px solid #d0d7de;
}

.article-cta-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.article-cta-text h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0 0 0.25rem;
    color: #1a1a2e;
}

.article-cta-text p {
    font-size: 0.875rem;
    color: #555;
    margin: 0;
}

.article-cta-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.btn-article-cta {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 8px;
    background: white;
    color: #333;
    border: 1px solid #d0d7de;
    transition: all 0.2s;
}

.btn-article-cta:hover {
    border-color: #667eea;
    color: #667eea;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.15);
    text-decoration: none;
}

.btn-article-cta.primary {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.btn-article-cta.primary:hover {
    background: #5a6fd6;
    border-color: #5a6fd6;
    color: white;
}

@media (max-width: 575.98px) {
    .article-cta-content {
        flex-direction: column;
        align-items: stretch;
    }

    .article-cta-buttons {
        flex-direction: column;
    }

    .btn-article-cta {
        justify-content: center;
    }
}