/* single.css - Giao diện tin tức nâng cấp */

.single-post-wrapper {
    background-color: #f8fafc; /* Màu nền hiện đại hơn */
    padding: 60px 0;
    font-family: 'Be Vietnam Pro', sans-serif !important;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.news-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 40px;
    align-items: start;
}

/* Khối nội dung chính */
.post-detail-card {
    background: #fff;
    padding: 50px;
    border-radius: 24px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.03);
}

.post-header {
    margin-bottom: 35px;
}

.post-category-tag a {
    background: #f87316;
    color: #fff !important;
    padding: 6px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    text-decoration: none;
    display: inline-block;
    transition: 0.3s;
}

.post-category-tag a:hover {
    background: #ea580c;
    transform: translateY(-2px);
}

.post-main-title {
    font-size: 42px;
    font-weight: 850;
    color: #0f172a;
    line-height: 1.25;
    margin: 25px 0;
    letter-spacing: -1.5px;
}

.post-meta-info {
    display: flex;
    flex-wrap: wrap;
    gap: 25px;
    color: #64748b;
    font-size: 15px;
    padding-top: 20px;
    border-top: 1px solid #f1f5f9;
}

.post-meta-info span {
    display: flex;
    align-items: center;
    gap: 8px;
}

.post-meta-info i {
    color: #f87316;
}

/* Ảnh đại diện bài viết */
.post-featured-image {
    margin: 30px 0 40px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(0,0,0,0.08);
}

.post-featured-image img {
    width: 100%;
    height: auto;
    display: block;
}

/* Typography nội dung */
.post-content-entry {
    font-size: 19px;
    line-height: 1.85;
    color: #334155;
}

.post-content-entry p {
    margin-bottom: 25px;
}

.post-content-entry h2 {
    font-size: 30px;
    color: #0f172a;
    margin: 45px 0 20px;
    font-weight: 800;
}

/* Footer Tags */
.post-footer-tags {
    margin-top: 50px;
    padding-top: 30px;
    border-top: 2px dashed #f1f5f9;
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.tag-label {
    font-weight: 800;
    color: #0f172a;
    margin-right: 5px;
}

.post-footer-tags a {
    background: #f1f5f9;
    padding: 6px 15px;
    border-radius: 100px;
    font-size: 14px;
    color: #475569 !important;
    text-decoration: none;
    transition: 0.3s;
}

.post-footer-tags a:hover {
    background: #0f172a;
    color: #fff !important;
}

/* SIDEBAR - Sticky */
.news-sidebar {
    position: sticky;
    top: 25px;
}

.sidebar-widget {
    background: #fff;
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 4px 25px rgba(0,0,0,0.04);
}

.widget-title {
    font-size: 20px;
    font-weight: 850;
    color: #0f172a;
    margin-bottom: 25px;
    position: relative;
    padding-left: 15px;
}

.widget-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 5px;
    height: 22px;
    background: #f87316;
    border-radius: 10px;
}

.popular-item {
    display: flex;
    gap: 15px;
    text-decoration: none;
    margin-bottom: 25px;
}

.popular-thumb {
    width: 100px;
    height: 75px;
    border-radius: 12px;
    overflow: hidden;
    flex-shrink: 0;
}

.popular-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: 0.5s;
}

.popular-title {
    font-size: 15px;
    font-weight: 700;
    color: #1e293b;
    line-height: 1.4;
    transition: 0.3s;
}

.popular-item:hover .popular-title { color: #f87316; }
.popular-item:hover .popular-thumb img { transform: scale(1.1); }

/* Responsive */
@media (max-width: 1024px) {
    .news-layout { grid-template-columns: 1fr; }
    .post-detail-card { padding: 30px; }
    .post-main-title { font-size: 32px; }
    .news-sidebar { position: relative; top: 0; }
}

.popular-posts-list {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}


/* RESET SIDEBAR CỰC ĐOAN */
.custom-popular-widget {
    background: #fff;
    padding: 25px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.02);
}

/* Xóa bỏ mọi định dạng danh sách có thể có */
.popular-list-clean {
    display: block !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.clean-item {
    display: flex !important;
    align-items: center !important;
    gap: 15px !important;
    padding: 12px 0 !important;
    margin: 0 !important;
    
    /* TRỊ TIỆT LỖI DẤU GẠCH */
    text-decoration: none !important;
    border: none !important;
    border-bottom: 0px solid transparent !important;
    box-shadow: none !important;
    outline: none !important;
}

/* Đảm bảo khi hover cũng không hiện gạch chân */
.clean-item:hover, 
.clean-item:active, 
.clean-item:focus {
    text-decoration: none !important;
    border: none !important;
    box-shadow: none !important;
}

.item-thumb {
    width: 75px;
    height: 60px;
    border-radius: 10px;
    overflow: hidden;
    flex-shrink: 0;
    border: none !important;
}

.item-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border: none !important;
    box-shadow: none !important;
}

.item-title {
    font-size: 15px !important;
    font-weight: 600 !important;
    color: #334155 !important;
    line-height: 1.4 !important;
    margin: 0 !important;
    padding: 0 !important;
    
    /* Xóa gạch chân cho cả tiêu đề */
    text-decoration: none !important;
    border: none !important;
}

.clean-item:hover .item-title {
    color: #f87316 !important;
}

/* Dấu gạch cam bên cạnh chữ Bài viết nổi bật */
.widget-title {
    font-size: 20px;
    font-weight: 800;
    margin-bottom: 20px;
    padding-left: 15px;
    position: relative;
    color: #0f172a;
    border: none !important;
}

.widget-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 20px;
    background: #f87316;
    border-radius: 4px;
}

/* 1. Ẩn TOC ở nội dung chính */
.post-content-entry .wp-block-rank-math-toc-block {
    display: none !important;
}

/* 2. Trong Sidebar: Ẩn tất cả trừ block TOC */
.toc-wrapper-fixed > *:not(.wp-block-rank-math-toc-block) {
    display: none !important;
}

/* 3. Định dạng lại TOC cho đẹp khi nằm trong Sidebar */
.toc-sidebar-only .wp-block-rank-math-toc-block {
    display: block !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.toc-sidebar-only nav ul {
    list-style: none !important;
    padding-left: 10px !important;
}

.toc-sidebar-only nav ul li a {
    font-size: 14px;
    color: #475569 !important;
    text-decoration: none !important;
    display: block;
    padding: 5px 0;
    transition: 0.3s;
}

.toc-sidebar-only nav ul li a:hover {
    color: #f87316 !important;
    transform: translateX(5px);
}