/* Article Page Specific Styles */

/* Typography & Readability */
.article-content {
    font-size: 1.125rem;
    line-height: 1.8;
    color: #333;
    max-width: 800px;
    margin: 0 auto;
}

.article-content h2 {
    font-size: 2rem;
    font-weight: 700;
    color: #2c3e50;
    margin-top: 2.5rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 3px solid #007bff;
}

.article-content h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #34495e;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.article-content h4 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #34495e;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

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

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

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

.article-content strong {
    font-weight: 600;
    color: #2c3e50;
}

/* Article Header */
.article-header {
    border-bottom: 4px solid #007bff;
    margin-bottom: 2rem;
}

.article-meta {
    font-size: 0.9rem;
    margin-top: 1rem;
}

/* Table of Contents */
.toc a {
    color: #495057;
    text-decoration: none;
    padding: 0.5rem 0;
    display: block;
    transition: all 0.3s ease;
}

.toc a:hover {
    color: #007bff;
    padding-left: 0.5rem;
    background-color: #f8f9fa;
}

/* Feature Lists */
.feature-list {
    list-style: none;
    padding-left: 0;
}

.feature-list li {
    padding: 0.75rem 1rem;
    margin-bottom: 0.75rem;
    background-color: #f8f9fa;
    border-left: 4px solid #007bff;
    border-radius: 4px;
}

.feature-list li strong {
    color: #007bff;
}

/* Tables */
.article-content table {
    font-size: 0.95rem;
    margin: 2rem 0;
}

.article-content table caption {
    caption-side: top;
    padding: 0.75rem;
    font-weight: 600;
    color: #495057;
    text-align: left;
    font-size: 1rem;
}

.article-content th {
    background-color: #343a40;
    color: white;
    font-weight: 600;
    padding: 1rem 0.75rem;
    vertical-align: middle;
}

.article-content td {
    padding: 0.75rem;
    vertical-align: top;
}

.table-striped tbody tr:nth-of-type(odd) {
    background-color: #f8f9fa;
}

/* Alerts & Callouts */
.article-content .alert {
    border-radius: 8px;
    border-width: 2px;
    padding: 1.25rem 1.5rem;
}

.article-content .alert h4 {
    margin-top: 0;
    margin-bottom: 0.75rem;
}

.alert-info {
    background-color: #e7f3ff;
    border-color: #0dcaf0;
}

.alert-warning {
    background-color: #fff3cd;
    border-color: #ffc107;
}

.alert-danger {
    background-color: #f8d7da;
    border-color: #dc3545;
}

.alert-success {
    background-color: #d1e7dd;
    border-color: #198754;
}

.alert-info .alert-link,
.alert-warning .alert-link {
    font-weight: 600;
    text-decoration: underline;
}

/* Figures & Images */
.article-content figure {
    margin: 2rem 0;
}

.article-content .figure-img {
    border: 1px solid #dee2e6;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    width: 100%;
    height: auto;
}

.article-content .figure-caption {
    font-size: 0.9rem;
    color: #6c757d;
    font-style: italic;
    margin-top: 0.75rem;
    padding: 0 1rem;
}

/* Cards */
.article-content .card {
    border-radius: 8px;
    margin: 2rem 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.card.border-danger {
    border-width: 2px;
}

.card.bg-light {
    background-color: #f8f9fa !important;
}

.card-header {
    font-weight: 600;
}

.card h5 {
    color: #2c3e50;
    font-size: 1.15rem;
    margin-top: 1rem;
    margin-bottom: 0.75rem;
}

.card h5:first-child {
    margin-top: 0;
}

/* CTA Section */
.cta-section {
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.cta-section .btn-light {
    background-color: white;
    color: #007bff;
    font-weight: 600;
    padding: 0.75rem 2rem;
    border: none;
    transition: all 0.3s ease;
}

.cta-section .btn-light:hover {
    background-color: #f8f9fa;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

/* Breadcrumb */
.breadcrumb {
    background-color: #f8f9fa;
    padding: 0.75rem 1rem;
    border-radius: 6px;
}

.breadcrumb-item a {
    color: #007bff;
    text-decoration: none;
}

.breadcrumb-item a:hover {
    text-decoration: underline;
}

.breadcrumb-item.active {
    color: #6c757d;
}

/* Content Sections */
.content-section {
    scroll-margin-top: 80px; /* For smooth scrolling with fixed headers */
}

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

    .article-content h2 {
        font-size: 1.75rem;
    }

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

    .article-content h4 {
        font-size: 1.15rem;
    }

    .article-header {
        padding: 2rem 0 !important;
    }

    .article-header h1 {
        font-size: 1.75rem;
    }

    .article-header .lead {
        font-size: 1rem;
    }

    .cta-section {
        padding: 2rem !important;
    }

    .cta-section h2 {
        font-size: 1.5rem;
    }

    .table-responsive {
        font-size: 0.85rem;
    }

    .article-content table th,
    .article-content table td {
        padding: 0.5rem 0.4rem;
    }
}

/* Print Styles */
@media print {
    .article-header,
    .breadcrumb,
    .toc,
    .cta-section,
    #scroll-to-top,
    footer {
        display: none;
    }

    .article-content {
        max-width: 100%;
        font-size: 12pt;
    }

    .article-content h2 {
        page-break-before: always;
    }

    .article-content h2:first-of-type {
        page-break-before: avoid;
    }
}

/* Accessibility Improvements */
.article-content a {
    color: #007bff;
    text-decoration: underline;
}

.article-content a:hover,
.article-content a:focus {
    color: #0056b3;
}

.article-content a:focus {
    outline: 2px solid #007bff;
    outline-offset: 2px;
}

/* Skip to content link for screen readers */
.skip-to-content {
    position: absolute;
    left: -9999px;
    z-index: 999;
    padding: 1rem;
    background-color: #007bff;
    color: white;
    text-decoration: none;
}

.skip-to-content:focus {
    left: 0;
    top: 0;
}
