@charset "utf-8";

/* ==========================================================================
   1. RESET & PHẠM VI ÁP DỤNG (DESKTOP SCOPED)
   ========================================================================== */

/* Khoanh vùng font chữ, box-sizing & Ép căn trái mặc định toàn bộ nội dung */
.news-desktop-container,
.news-desktop-container *,
.news-desktop-container table,
.news-desktop-container td,
.news-desktop-container div,
.news-desktop-container p,
.news-desktop-container li,
.news-desktop-container a,
#noidung,
#noidung p,
#noidung div,
#noidung span,
#noidung li {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif !important;
    box-sizing: border-box;
    text-align: left !important;
}

/* Khung chứa tổng 2 cột chính */
.news-desktop-container {
    max-width: 1200px;
    margin: 20px auto;
    display: flex;
    gap: 25px;
    align-items: flex-start;
}


/* ==========================================================================
   2. THANH DANH MỤC SIDEBAR CỘT TRÁI (22%)
   ========================================================================== */

.news-sidebar {
    width: 22%;
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    padding: 20px 15px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    flex-shrink: 0;
}

/* Tiêu đề "TRANG TIN TỨC" */
.news-sidebar .sidebar-title {
    font-size: 16px;
    font-weight: 800;
    color: #1b5e20;
    text-transform: uppercase;
    margin: 0 0 16px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #2e7d32;
    letter-spacing: 0.5px;
}

/* Menu danh mục */
.news-sidebar .sidebar-menu {
    list-style: none;
    margin: 0;
    padding: 0;
}

.news-sidebar .sidebar-menu li {
    margin-bottom: 8px;
}

.news-sidebar .sidebar-menu a {
    display: block;
    padding: 10px 14px;
    font-size: 14px;
    font-weight: 600;
    color: #334155;
    text-decoration: none;
    border-radius: 8px;
    background-color: #f8fafc;
    transition: all 0.2s ease;
}

.news-sidebar .sidebar-menu a:hover {
    background-color: #e8f5e9;
    color: #2e7d32;
    padding-left: 18px;
}

/* Danh mục đang chọn */
.news-sidebar .sidebar-menu a.doimau {
    background-color: #2e7d32;
    color: #ffffff;
}


/* ==========================================================================
   3. CỘT NỘI DUNG CHÍNH BÊN PHẢI (78%)
   ========================================================================== */

.news-content {
    width: 78%;
    flex-grow: 1;
}

/* Breadcrumb / Tên danh mục */
.news-breadcrumb {
    background-color: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    padding: 12px 18px;
    margin-bottom: 20px;
    width: 100% !important;
}

.news-breadcrumb a {
    font-size: 15px;
    font-weight: 700;
    color: #2e7d32;
    text-decoration: none;
}


/* ==========================================================================
   4. GIAO DIỆN DANH SÁCH BÀI VIẾT (USER_NEWS_GENERAL_DETAIL)
   ========================================================================== */

.news-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100% !important;
    align-items: stretch !important; /* Ép tất cả khung bài viết giãn full chiều rộng */
}

/* Thẻ bài viết (Card) */
.news-card {
    display: flex;
    width: 100% !important; /* Bắt buộc mọi bài viết rộng bằng nhau 100% */
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px;
    gap: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
    transition: all 0.25s ease-in-out;
}

.news-card:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
    border-color: #cbd5e1;
}

/* Ảnh thumbnail */
.news-card-thumb {
    flex-shrink: 0;
}

.news-card-thumb img {
    width: 180px;
    height: 120px;
    object-fit: cover;
    border-radius: 8px;
    display: block;
}

.news-card-info {
    flex-grow: 1;
    width: 100%;
}

.news-card-title {
    font-size: 16px;
    font-weight: 700;
    line-height: 1.4;
    margin: 0 0 10px 0;
}

.news-card-title a {
    color: #0f172a;
    text-decoration: none;
    transition: color 0.2s;
}

.news-card-title a:hover {
    color: #1b66b1;
}

.news-card-excerpt {
    font-size: 14px;
    color: #475569;
    line-height: 1.6;
}

/* Phân trang (Giữ căn giữa) */
.news-pagination {
    margin-top: 30px;
    text-align: center !important;
    font-size: 15px;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100% !important;
}

.news-pagination a, 
.news-pagination .current-page {
    padding: 6px 14px;
    border-radius: 6px;
    border: 1px solid #cbd5e1;
    background: #ffffff;
    color: #334155;
    text-decoration: none;
    font-weight: 600;
}

.news-pagination .current-page,
.news-pagination a.doimau {
    background: #2e7d32;
    color: #ffffff;
    border-color: #2e7d32;
}


/* ==========================================================================
   5. GIAO DIỆN CHI TIẾT BÀI VIẾT (USER_NEWS_DETAIL)
   ========================================================================== */

.news-detail-title {
    font-size: 24px;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.4;
    margin: 15px 0 20px 0;
}

/* Khung nội dung bài viết #noidung */
#noidung {
    width: 100% !important;
    font-size: 16px !important;
    line-height: 1.75 !important;
    color: #334155 !important;
    word-wrap: break-word !important;
}

#noidung *,
#noidung p,
#noidung span,
#noidung div,
#noidung li {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif !important;
    font-size: 16px !important;
    line-height: 1.75 !important;
    max-width: 100% !important;
}

/* KHÔI PHỤC MÀU LINK XANH DƯƠNG CHUẨN */
#noidung a,
#noidung a *,
#noidung a span,
#noidung a strong {
    color: #1b66b1 !important;
    text-decoration: underline !important;
    font-weight: 700 !important;
}

/* KHÔI PHỤC MÀU CHỮ ĐỎ */
#noidung [color="red"],
#noidung [color="#ff0000"],
#noidung [color="#f00"],
#noidung [style*="color: red"],
#noidung [style*="color:red"],
#noidung [style*="color: #ff0000"],
#noidung [style*="color:#ff0000"],
#noidung [style*="color: #f00"],
#noidung [style*="color:#f00"],
#noidung [color="red"] *,
#noidung [color="#ff0000"] *,
#noidung [style*="color: red"] *,
#noidung [style*="color:red"] * {
    color: #d32f2f !important;
}

/* Ảnh & Video trong bài viết */
#noidung img, 
#noidung iframe {
    max-width: 100% !important;
    height: auto !important;
    display: block;
    margin: 15px auto;
    border-radius: 6px;
}


/* ==========================================================================
   6. BẢNG TÍNH GIÁ ĐỆM TRONG BÀI VIẾT (Giữ căn giữa ô bảng)
   ========================================================================== */

#noidung table {
    display: table !important;
    width: 100% !important;
    max-width: 100% !important;
    border-collapse: collapse !important;
    margin: 15px 0 !important;
    background-color: #ffffff;
}

#noidung table td, 
#noidung table th {
    text-align: center !important;
    vertical-align: middle !important;
    padding: 8px 4px !important;
    white-space: normal !important;
}

#noidung table label {
    font-size: 14px !important;
}

#noidung table input[type="radio"] {
    display: inline-block !important;
    vertical-align: middle !important;
    margin: 0 3px 0 8px !important;
    width: auto !important;
}

#noidung table input[type="text"],
#noidung table input[type="number"] {
    width: 100% !important;
    min-width: 120px !important;
    max-width: 150px !important;
    height: 38px !important;
    padding: 2px 6px !important;
    border: 1px solid #a0aec0 !important;
    border-radius: 4px !important;
    text-align: center !important;
    font-size: 13px !important;
    display: inline-block !important;
}

#noidung table input[type="submit"],
#noidung table input[type="button"],
#noidung table button {
    display: inline-block !important;
    padding: 8px 20px !important;
    font-weight: bold !important;
    margin: 8px auto !important;
    border-radius: 4px !important;
    cursor: pointer !important;
}
/* Khung chứa mục lục bài viết */
.table-of-contents-news {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-left: 4px solid #2e7d32; /* Đường nhấn xanh Everon */
    border-radius: 8px;
    padding: 16px 20px;
    margin: 20px 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.03);
    width: 100% !important; /* Mặc định trải rộng 100% cực kỳ thoáng */
    box-sizing: border-box;
}

/* Tiêu đề Xem nhanh */
.table-of-contents-news h2 {
    font-size: 16px !important;
    font-weight: 700 !important;
    color: #1b5e20 !important;
    margin: 0 0 12px 0 !important;
    padding: 0 !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Danh sách link mục lục */
.table-of-contents-news ul {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.table-of-contents-news li {
    margin-bottom: 8px !important;
    padding-left: 15px;
    position: relative;
    line-height: 1.5;
}

/* Dấu chấm đầu dòng tinh tế */
.table-of-contents-news li::before {
    content: "•";
    color: #2e7d32;
    font-weight: bold;
    position: absolute;
    left: 0;
    top: 0;
}

.table-of-contents-news a {
    color: #334155 !important;
    text-decoration: none !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    transition: color 0.2s ease;
}

.table-of-contents-news a:hover {
    color: #2e7d32 !important;
    text-decoration: underline !important;
}

/* Cấu hình hiển thị dạng nổi góc phải trên Desktop (Màn hình > 768px) */
@media screen and (min-width: 768px) {
    .table-of-contents-news {
        float: right;
        width: 320px !important; /* Cố định chiều rộng vừa đủ trên máy tính */
        margin: 0 0 15px 20px;
    }
}