/* --- Tổng thể trang Chi tiết --- */
.single-post-content {
    padding-top: 150px;
    min-height: 100vh;
    /* Kế thừa background từ archive.css để đồng bộ */
    background: linear-gradient(rgba(18, 18, 18, 0.6), rgba(18, 18, 18, 0.7)), 
                url('https://images.unsplash.com/photo-1451187580459-43490279c0fa?auto=format&fit=crop&q=80&w=2072'); 
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: #fff;
}

/* Thanh tiến trình đọc màu cam VEA */
.reading-progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 4px;
    background: linear-gradient(90deg, #FFAD06 0%, #FF6600 100%);
    z-index: 9999;
    transition: width 0.1s ease;
}

.container {
    max-width: 900px; /* Bóp hẹp lại để đọc chữ dễ hơn */
    margin: 0 auto;
    padding: 0 20px;
}

/* --- Hero Section --- */
.post-hero {
    text-align: center;
    padding: 40px 0;
}

.post-meta-top {
    margin-bottom: 20px;
    color: #FF6600;
    font-weight: 700;
    font-size: 14px;
    display: flex;
    justify-content: center;
    gap: 20px;
}

.post-title {
    font-size: 42px;
    font-weight: 900;
    line-height: 1.2;
    text-transform: uppercase;
}

/* --- Nội dung chính --- */
.post-wrapper {
    background: rgba(29, 29, 29, 0.85);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 40px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    margin-bottom: 80px;
}

.post-featured-image {
    margin: -40px -40px 40px -40px;
    border-radius: 20px 20px 0 0;
    overflow: hidden;
}

.post-featured-image img {
    width: 100%;
    height: auto;
    display: block;
}

/* --- Style cho chữ trong bài viết --- */
.post-entry-content {
    font-size: 18px;
    line-height: 1.8;
    color: #e0e0e0;
}

.post-entry-content p {
    margin-bottom: 25px;
}

.post-entry-content h2, .post-entry-content h3 {
    color: #FF6600;
    margin: 40px 0 20px;
}

.post-entry-content blockquote {
    border-left: 4px solid #FF6600;
    padding-left: 20px;
    font-style: italic;
    background: rgba(255, 102, 0, 0.05);
    margin: 30px 0;
}

/* --- Điều hướng Trước/Sau --- */
.post-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 50px;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.post-navigation a {
    color: #FF6600;
    text-decoration: none;
    font-weight: 700;
    transition: 0.3s;
}

.post-navigation a:hover {
    color: #FFAD06;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .post-title { font-size: 28px; }
    .post-wrapper { padding: 20px; }
    .post-featured-image { margin: -20px -20px 20px -20px; }
}

/* --- Mục lục (Table of Contents) --- */
.post-toc {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 102, 0, 0.2);
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 40px;
}
.toc-title {
    font-weight: 800;
    color: #FF6600;
    margin-bottom: 15px;
    text-transform: uppercase;
    font-size: 16px;
    letter-spacing: 1px;
}
#toc-list {
    list-style: none;
    padding: 0;
}
#toc-list li {
    margin-bottom: 10px;
}
#toc-list a {
    color: #ccc;
    text-decoration: none;
    transition: 0.3s;
    font-size: 15px;
}
#toc-list a:hover { color: #FFAD06; padding-left: 5px; }

/* Phân cấp thụt đầu dòng trong mục lục */
.toc-h3 { padding-left: 20px; font-size: 0.95em; }
.toc-h4 { padding-left: 40px; font-size: 0.9em; font-style: italic; }

/* --- Phân biệt kiểu chữ các Đề mục (Headings) --- */
.post-entry-content h2 {
    font-size: 32px;
    color: #fff;
    border-left: 5px solid #FF6600;
    padding-left: 15px;
    margin-top: 50px;
}
.post-entry-content h3 {
    font-size: 26px;
    color: #FFAD06;
    margin-top: 40px;
}
.post-entry-content h4 {
    font-size: 22px;
    color: #eee;
    font-style: italic;
    text-decoration: underline rgba(255, 102, 0, 0.4);
}

/* --- Tin liên quan (Related Posts) --- */
.related-posts {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}
.related-title {
    font-size: 24px;
    margin-bottom: 30px;
    color: #FF6600;
}
.related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
.related-item {
    text-decoration: none;
    transition: 0.3s;
}
.related-thumb {
    height: 150px;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 10px;
}
.related-thumb img {
    width: 100%; height: 100%; object-fit: cover;
    transition: 0.5s;
}
.related-item h4 {
    font-size: 16px;
    color: #fff;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.related-item:hover .related-thumb img { transform: scale(1.1); }
.related-item:hover h4 { color: #FF6600; }

@media (max-width: 768px) {
    .related-grid { grid-template-columns: 1fr; }
}