* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Kanit', sans-serif;
    line-height: 1.6;
    color: #2d3748;
    background: linear-gradient(135deg, #ffffff 0%, #f7fafc 50%, #edf2f7 100%);
    min-height: 100vh;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(192, 160, 64, 0.1);
    transition: all 0.3s ease;
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 8px 32px rgba(46, 125, 50, 0.15);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

.nav-brand {
    font-size: 1.25rem;
    font-weight: 700;
    background: linear-gradient(135deg, #2e7d32, #c0a040);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-link {
    color: #64748b;
    text-decoration: none;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 20px;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: #2e7d32;
    background: linear-gradient(135deg, rgba(46, 125, 50, 0.1), rgba(192, 160, 64, 0.1));
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #2e7d32 0%, #c0a040 50%, #6d4c41 100%);
    padding: 100px 0 60px;
    color: white;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
    position: relative;
    z-index: 1;
}

.breadcrumb a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumb a:hover {
    color: white;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 16px;
    position: relative;
    z-index: 1;
}

/* Main Layout */
.main-container {
    max-width: 1400px;
    margin: -40px auto 0;
    padding: 0 20px 60px;
    position: relative;
    z-index: 2;
}

.content-grid {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 30px;
}

/* Auto Read Controls */
.auto-read-controls {
    background: linear-gradient(135deg, rgba(46, 125, 50, 0.1), rgba(192, 160, 64, 0.1));
    padding: 20px;
    border-radius: 12px 12px 0 0;
    border-bottom: 1px solid rgba(192, 160, 64, 0.2);
}

.auto-read-btn {
    background: linear-gradient(135deg, #2e7d32, #c0a040);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.auto-read-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(46, 125, 50, 0.3);
}

.reading-progress {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #2e7d32, #c0a040);
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 2px;
}

/* Article */
.article-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(46, 125, 50, 0.1);
    border: 1px solid rgba(192, 160, 64, 0.1);
}

.article-header {
    padding: 30px 30px 0;
}

.category-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, #2e7d32, #c0a040);
    color: white;
    padding: 8px 16px;
    border-radius: 25px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(46, 125, 50, 0.3);
}

.article-title {
    font-size: 1.875rem;
    font-weight: 700;
    background: linear-gradient(135deg, #1f2937, #374151);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.3;
    margin-bottom: 20px;
}

.article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    padding: 16px 0;
    border-top: 1px solid rgba(192, 160, 64, 0.1);
    border-bottom: 1px solid rgba(192, 160, 64, 0.1);
    margin-bottom: 24px;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #64748b;
    font-size: 0.875rem;
    font-weight: 500;
}

.meta-item i {
    color: #c0a040;
}

/* Author Info */
.author-info {
    display: flex;
    align-items: center;
    gap: 16px;
    background: linear-gradient(135deg, rgba(46, 125, 50, 0.05), rgba(192, 160, 64, 0.05));
    padding: 20px;
    border-radius: 12px;
    margin-top: 20px;
    border: 1px solid rgba(192, 160, 64, 0.1);
}

.author-avatar {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #2e7d32, #c0a040);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.author-details h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 4px;
}

.author-details p {
    font-size: 0.875rem;
    color: #64748b;
    margin-bottom: 2px;
}

/* Images */
.article-image {
    margin: 0 30px 30px;
    overflow: hidden;
}

.article-image img {
    width: 100%;
    object-fit: cover;
}

.article-content {
    padding: 0 30px 30px;
    font-size: 1rem;
    line-height: 1.8;
    color: #374151;
}

.article-content p {
    margin-bottom: 20px;
    text-align: justify;
}

.share-section {
    background: linear-gradient(135deg, rgba(248, 250, 252, 0.8), rgba(241, 245, 249, 0.8));
    padding: 24px 30px;
    border-top: 1px solid rgba(192, 160, 64, 0.1);
}

.share-title {
    font-size: 1rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 16px;
    text-align: center;
}

.share-buttons {
    display: flex;
    justify-content: center;
    gap: 12px;
}

.share-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    border: none;
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.facebook { 
    background: linear-gradient(135deg, #1877f2, #42a5f5); 
    color: white; 
}
.twitter { 
    background: linear-gradient(135deg, #1da1f2, #64b5f6); 
    color: white; 
}
.line { 
    background: linear-gradient(135deg, #00c300, #4caf50); 
    color: white; 
}

/* Sidebar */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.sidebar-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 10px 40px rgba(46, 125, 50, 0.1);
    border: 1px solid rgba(192, 160, 64, 0.1);
}

.sidebar-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sidebar-title i {
    color: #c0a040;
}

.nav-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.nav-item-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    color: #64748b;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.nav-item-link:hover {
    background: linear-gradient(135deg, rgba(46, 125, 50, 0.1), rgba(192, 160, 64, 0.1));
    color: #2e7d32;
}

.nav-item-link i {
    width: 16px;
    text-align: center;
    color: #c0a040;
}

/* Popular News */
.popular-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.popular-item {
    display: flex;
    gap: 12px;
    padding: 16px;
    border-radius: 8px;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 1px solid rgba(192, 160, 64, 0.1);
}

.popular-item:hover {
    background: linear-gradient(135deg, rgba(46, 125, 50, 0.05), rgba(192, 160, 64, 0.05));
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(46, 125, 50, 0.1);
}

.popular-image {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #2e7d32, #c0a040);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.popular-content {
    flex: 1;
}

.popular-content h4 {
    font-size: 0.875rem;
    font-weight: 600;
    color: #1f2937;
    line-height: 1.4;
    margin-bottom: 8px;
}

.popular-stats {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.75rem;
    color: #64748b;
}

.popular-stats i {
    color: #c0a040;
}

.additional-images {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
    margin: 20px 30px;
}

.additional-images a {
    display: block;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    height: 220px;
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.additional-images a:hover {
    transform: scale(1.03);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.additional-images img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
    position: absolute;
    top: 0;
    left: 0;
}

/* จำกัดขนาดรูปใน lightbox */
.lb-image {
    max-width: 90vw !important;
    max-height: 90vh !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain;
}

/* Scroll to Top */
.scroll-top {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #2e7d32, #c0a040);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1rem;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: 0 8px 25px rgba(46, 125, 50, 0.3);
}

.scroll-top.show {
    opacity: 1;
    visibility: visible;
}

.scroll-top:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 12px 35px rgba(46, 125, 50, 0.4);
}

/* Responsive */
@media (max-width: 1400px) {
    .container, .nav-container, .main-container {
        max-width: 100%;
        padding: 0 15px;
    }
}

@media (max-width: 1024px) {
    .content-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .sidebar-card {
        position: static;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }
    
    .hero {
        padding: 80px 0 40px;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .article-header,
    .article-content,
    .share-section {
        padding-left: 20px;
        padding-right: 20px;
    }
    
    .article-image {
        margin-left: 20px;
        margin-right: 20px;
    }
    
    .article-title {
        font-size: 1.5rem;
    }
    
    .share-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .share-btn {
        width: 160px;
        justify-content: center;
    }

    .image-grid {
        grid-template-columns: 1fr;
    }

    .author-info {
        flex-direction: column;
        text-align: center;
    }
}
/* ================= DARK MODE ================= */
body.dark-mode {
  background: #121212 !important; /* เทา-ดำเข้ม */
  color: #ddd !important;
}

/* Navbar */
body.dark-mode .navbar {
  background: rgba(18, 18, 18, 0.95) !important;
  border-bottom: 1px solid rgba(192, 160, 64, 0.3) !important;
}

body.dark-mode .nav-link {
  color: #ccc !important;
}

body.dark-mode .nav-link:hover,
body.dark-mode .nav-link.active {
  background: rgba(192, 160, 64, 0.15) !important;
  color: #c0a040 !important;
}

/* Hero Section */
body.dark-mode .hero {
  background: linear-gradient(135deg, #1a1a1a, #2e2e2e) !important;
  color: #eee !important;
}

body.dark-mode .breadcrumb a {
  color: #c0a040 !important;
}

/* Article */
body.dark-mode .article-card {
  background: #1a1a1a !important;
  color: #ddd !important;
  border: 1px solid rgba(192, 160, 64, 0.25) !important;
}

body.dark-mode .article-title {
  background: linear-gradient(135deg, #c0a040, #eee);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

body.dark-mode .article-content {
  color: #ccc !important;
}

body.dark-mode .meta-item {
  color: #aaa !important;
}

/* Sidebar */
body.dark-mode .sidebar-card {
  background: #1a1a1a !important;
  color: #ddd !important;
  border: 1px solid rgba(192, 160, 64, 0.25) !important;
}

body.dark-mode .sidebar-title {
  color: #c0a040 !important;
}

body.dark-mode .nav-item-link {
  color: #bbb !important;
}

body.dark-mode .nav-item-link:hover {
  background: rgba(192, 160, 64, 0.15) !important;
  color: #c0a040 !important;
}

/* Popular News */
body.dark-mode .popular-item {
  border: 1px solid rgba(192, 160, 64, 0.25) !important;
  background: #1a1a1a !important;
}

body.dark-mode .popular-content h4 {
  color: #eee !important;
}

body.dark-mode .popular-stats {
  color: #aaa !important;
}

/* Share Section */
body.dark-mode .share-section {
  background: #1a1a1a !important;
  border-top: 1px solid rgba(192, 160, 64, 0.25) !important;
}

body.dark-mode .share-title {
  color: #c0a040 !important;
}

/* Author */
body.dark-mode .author-info {
  background: #1a1a1a !important;
  border: 1px solid rgba(192, 160, 64, 0.25) !important;
}

body.dark-mode .author-details h4 {
  color: #c0a040 !important;
}

body.dark-mode .author-details p {
  color: #bbb !important;
}

/* Footer */
body.dark-mode footer,
body.dark-mode .footer-container,
body.dark-mode .footer-bottom-bar {
  background: #121212 !important;
  color: #bbb !important;
}

/* Scroll-to-top */
body.dark-mode .scroll-top {
  background: linear-gradient(135deg, #c0a040, #6d4c41);
}
