/* -------------------------------
   Article Content
---------------------------------*/
.article-content {
    width: 750px;
    margin: 0 auto;
    background: #f9f9f9;
    color: #333;
    padding: 20px;
}

/* Sidebar */
.sidebar {
    width: 350px;
    background: #fff;
    padding: 20px;
}

/* Headings */
.article-content h1 { color: darkred; }
.article-content h2,
.article-content h3 { color: #3a6f3a; margin-top: 30px; }

/* Paragraphs */
.article-content p { margin-bottom: 15px; }

/* Tables */
.article-content table { 
    border-collapse: collapse; 
    width: 100%; 
    margin: 15px 0; 
    background: #fff; 
}
.article-content table, 
.article-content th, 
.article-content td { border: 1px solid #ccc; }
.article-content th, 
.article-content td { padding: 10px; text-align: left; }
.article-content th { background-color: #4CAF50; color: white; }

/* Images */
.article-content img { 
    max-width: 100%; 
    height: auto; 
    margin: 10px 0; 
    border-radius: 8px; 
    cursor: pointer; 
}

/* Share Buttons (Fixed Right) */
.share-buttons { 
    position: fixed; 
    top: 50%; 
    right: 10px; 
    display: flex; 
    flex-direction: column; 
    z-index: 999; 
    transform: translateY(-50%);
}
.share-buttons a { 
    display: block; 
    margin-bottom: 10px; 
    text-decoration: none; 
    color: #fff; 
    padding: 8px 12px; 
    border-radius: 5px; 
    text-align: center; 
}
.share-facebook { background: #3b5998; }
.share-twitter { background: #000000; }
.share-line { background: #00c300; }
.share-copy { background: #555; }
.share-buttons a:hover { opacity: 0.85; }

/* Lightbox */
#lightbox { 
    display:none; 
    position:fixed; 
    top:0; 
    left:0; 
    width:100%; 
    height:100%; 
    background: rgba(0,0,0,0.8); 
    justify-content:center; 
    align-items:center; 
    z-index:1000; 
}
#lightbox img { max-width:90%; max-height:90%; border-radius:8px; }
#lightbox span { 
    position:absolute; 
    top:20px; 
    right:30px; 
    color:#fff; 
    font-size:30px; 
    cursor:pointer; 
}

/* Responsive Adjustments */
@media (max-width: 1200px) {
    .article-content { width: 70%; }
    .sidebar { width: 30%; }
}
@media (max-width: 768px) {
    .article-content, .sidebar { width: 100%; }
    /* Share buttons ยังคงอยู่ด้านขวาแนวตั้ง */
    .share-buttons { top: 50%; right: 10px; transform: translateY(-50%); flex-direction: column; }
    .share-buttons a { margin-bottom: 10px; margin-right: 0; }
}
