/* ===================================================
   HỆ THỐNG BLOG & BÀI VIẾT STYLES (blog.css)
   =================================================== */

/* Card bài viết dạng Grid/List */
.post-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
}
.post-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.12) !important;
}

/* Ảnh thumbnail bài viết tỉ lệ 16:9 chuẩn responsive */
.post-thumb-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background-color: #f8f9fa;
}
.post-thumb-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}
.post-card:hover .post-thumb-img {
    transform: scale(1.05);
}

/* Tiêu đề bài viết giới hạn 2 dòng */
.post-title-link {
    color: #212529;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}
.post-title-link:hover {
    color: #dc3545;
}
.post-title-2-lines {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4em;
    min-height: 2.8em;
}

/* Tóm tắt bài viết giới hạn 3 dòng */
.post-summary-3-lines {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 0.9rem;
    color: #6c757d;
    line-height: 1.5em;
}

/* GIAO DIỆN TRANG CHI TIẾT BÀI VIẾT (post-detail.php) */
.post-detail-container {
    background-color: #fff;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}
.post-detail-title {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.3;
    color: #1a1a1a;
}
.post-meta {
    font-size: 0.875rem;
    color: #6c757d;
}

/* Định dạng vùng nội dung Rich Text bài viết (WYSIWYG content) */
.post-content {
    font-size: 1.05rem;
    line-height: 1.8;
    color: #333;
}
.post-content h2, 
.post-content h3, 
.post-content h4 {
    margin-top: 1.5rem;
    margin-bottom: 0.8rem;
    font-weight: 700;
    color: #212529;
}
.post-content img {
    max-width: 100% !important;
    height: auto !important;
    border-radius: 8px;
    margin: 1rem 0;
}
.post-content blockquote {
    padding: 0.8rem 1.2rem;
    margin: 1.5rem 0;
    border-left: 4px solid #dc3545;
    background-color: #f8f9fa;
    font-style: italic;
}

/* Sidebar bài viết nổi bật / Bài viết liên quan */
.recent-post-item {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 12px;
}
.recent-post-thumb {
    width: 70px;
    height: 50px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
}
/* Điều chỉnh kích thước ảnh nhỏ cột phải khi cột hẹp lại */
.home-blog-posts .blog-sub-img {
    width: 130px !important;
    height: 85px !important;
    object-fit: cover;
    border-radius: 8px;
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.home-blog-posts .sub-title-text {
    font-size: 0.95rem; /* Cỡ chữ vừa vặn, chuẩn phom bài viết nhỏ */
    line-height: 1.35;
}