/* Article Styling - ออกแบบใหม่สำหรับการอ่านที่สบายตา */
h1, h2, h3, h4, h5, h6 {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Sarabun', 'Roboto', 'Noto Sans Thai', sans-serif !important;
}

/* Base Container */
.article-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Sarabun', 'Roboto', 'Noto Sans Thai', sans-serif;
}

/* Article Header */
.article-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e0e0e0;
}

.article-header h1 {
    font-size: 32px;
    font-weight: 700;
    line-height: 1.3;
    color: #1a1a1a;
    margin-bottom: 15px;
}

/* Article Intro */
.article-intro {
    margin-bottom: 40px;
}

.article-intro .lead {
    font-size: 18px;
    line-height: 1.8;
    color: #333;
    font-weight: 400;
}

.article-intro .lead p:first-child {
    margin-top: 0;
}

/* Article Content */
.article-content {
    margin-bottom: 30px;
}

.article-section {
    margin-bottom: 40px;
}

.article-section h2 {
    font-size: 24px;
    font-weight: 600;
    color: #2c3e50;
    margin-top: 30px;
    margin-bottom: 20px;
    line-height: 1.4;
}

.article-section h3 {
    font-size: 20px;
    font-weight: 600;
    color: #34495e;
    margin-top: 25px;
    margin-bottom: 15px;
}

.article-section p {
    font-size: 16px;
    line-height: 1.9;
    color: #444;
    margin-bottom: 20px;
    text-align: justify;
}

/* Lists */
.article-section ul,
.article-section ol {
    font-size: 16px;
    line-height: 1.9;
    color: #444;
    margin-bottom: 20px;
    padding-left: 30px;
}

.article-section ul li,
.article-section ol li {
    margin-bottom: 12px;
}

/* Links */
.article-section a {
    color: #3498db;
    text-decoration: none;
    border-bottom: 1px solid #3498db;
    transition: all 0.3s ease;
}

.article-section a:hover {
    color: #2980b9;
    border-bottom-color: #2980b9;
}

/* Bold and Italic */
.article-section strong {
    font-weight: 600;
    color: #2c3e50;
}

.article-section em {
    font-style: italic;
}

/* Code */
.article-section code {
    background-color: #f8f9fa;
    padding: 3px 8px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    color: #e74c3c;
}

.article-section pre {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #3498db;
    overflow-x: auto;
    margin-bottom: 20px;
}

.article-section pre code {
    background-color: transparent;
    padding: 0;
    color: #2c3e50;
}

/* Blockquotes */
.article-section blockquote {
    border-left: 4px solid #3498db;
    padding-left: 20px;
    margin: 30px 0;
    font-style: italic;
    color: #555;
    background-color: #f8f9fa;
    padding: 20px 20px 20px 24px;
    border-radius: 0 8px 8px 0;
    font-size: 15px;
}

/* Conclusion */
.article-conclusion {
    margin-top: 50px;
    padding: 30px;
    background-color: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #27ae60;
}

.article-conclusion h2 {
    font-size: 22px;
    font-weight: 600;
    color: #27ae60;
    margin-bottom: 20px;
}

.article-conclusion p {
    font-size: 16px;
    line-height: 1.9;
    color: #444;
}

/* Tags */
.article-tags {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid #e0e0e0;
}

.article-tags strong {
    font-size: 14px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-right: 10px;
}

.article-tags .badge {
    font-size: 14px;
    font-weight: 400;
    padding: 8px 16px;
    margin-right: 8px;
    margin-bottom: 8px;
    background-color: #3498db;
    color: white;
    border-radius: 20px;
    display: inline-block;
    transition: all 0.3s ease;
    text-decoration: none;
    cursor: pointer;
}

.article-tags .badge:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    color: white;
}

/* Metadata */
.article-metadata {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.article-metadata small {
    font-size: 13px;
    color: #999;
}

/* Responsive Images */
.article-section img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 20px 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* Table Styling */
.article-section table {
    width: 100%;
    margin: 20px 0;
    border-collapse: collapse;
}

.article-section table th,
.article-section table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
    font-size: 15px;
}

.article-section table th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #2c3e50;
}

.article-section table tr:hover {
    background-color: #f8f9fa;
}

/* Horizontal Rule */
.article-section hr {
    border: 0;
    border-top: 2px solid #e0e0e0;
    margin: 40px 0;
}

/* Reading Progress Bar */
.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 4px;
    background: linear-gradient(to right, #3498db, #2ecc71);
    z-index: 1000;
    transition: width 0.1s ease;
}

/* Mobile Optimizations */
@media (max-width: 768px) {
    .article-container {
        padding: 20px 15px;
    }

    .article-header h1 {
        font-size: 26px;
    }

    .article-section h2 {
        font-size: 20px;
    }

    .article-section h3 {
        font-size: 18px;
    }

    .article-section p,
    .article-section ul,
    .article-section ol {
        font-size: 15px;
        text-align: left;
    }

    .article-intro .lead {
        font-size: 16px;
    }

    .article-conclusion {
        padding: 20px;
    }

    .article-section code {
        font-size: 13px;
    }

    .article-section blockquote {
        font-size: 14px;
    }

    .article-tags .badge {
        font-size: 13px;
    }
}

/* Print Styles */
@media print {
    .article-container {
        max-width: 100%;
    }

    .article-tags,
    .article-metadata,
    .reading-progress {
        display: none;
    }

    .article-section a {
        color: #000;
        text-decoration: underline;
        border-bottom: none;
    }

    .article-header h1 {
        font-size: 24px;
    }

    .article-section h2 {
        font-size: 18px;
    }

    .article-section p,
    .article-section ul,
    .article-section ol {
        font-size: 14px;
    }
}
