/* US Core Features — trích từ theme con generatepress-child (FR): bài liên quan, bài mới, bảng cuộn ngang, FAQ */
/* ==========================================================================
   BÀI VIẾT LIÊN QUAN (RELATED POSTS)
   ========================================================================== */
ul.related_posts {
    display: flex;
    flex-direction: column;
    gap: 15px;
    list-style: none;
    padding: 0;
    margin: 0;
}

li.related_post {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    padding: 14px 18px;
    transition: transform 0.2s ease;
}

li.related_post:hover {
    transform: translateY(-3px);
}

/* Ẩn ảnhサムネイル mặc định của plugin */
.related_posts .crp_thumb {
    display: none !important;
}

/* Tiêu đề bài viết */
li.related_post a {
    position: relative;
    display: block;
    padding-left: 24px;
    font-size: 16px;
    font-weight: 600;
    color: #004880;
    text-decoration: none;
    line-height: 1.5;
    margin-bottom: 6px;
}

li.related_post a:hover {
    color: #e63946;
    text-decoration: underline;
}

/* Icon ⭐ trước tiêu đề */
li.related_post a::before {
    content: "⭐";
    position: absolute;
    left: 0;
    top: 2px;
    font-size: 14px;
    color: #f39c12;
}

/* Thông tin danh mục */
li.related_post .crp_primary_term {
    display: block;
    font-size: 14px;
    color: #666;
    line-height: 1.4;
    font-style: italic;
    margin-top: 4px;
}

li.related_post .crp_primary_term::before {
    content: "📁 Categories: ";
    font-weight: 500;
    color: #444;
    font-style: normal;
}

/* ==========================================================================
   BÀI VIẾT MỚI (RECENT POSTS)
   ========================================================================== */
.custom-latest-posts {
    padding: 15px;
    background-color: #f8f8f8;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.custom-latest-posts li {
    line-height: 1.5;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #ddd;
}

.custom-latest-posts li:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.custom-latest-posts a {
    font-size: 15px;
    font-weight: 600;
    color: #004880;
    text-decoration: none;
}

.custom-latest-posts a:hover {
    color: #e63946;
    text-decoration: underline;
}

.custom-latest-posts small {
    display: block;
    font-size: 13px;
    color: #666;
}

/*
* Tách ngày tháng trong Widget "Recent Posts" (WP Block) xuống dòng mới
*/
.wp-block-latest-posts__post-date {
    display: block;    /* Chuyển thành block-level để tự động xuống dòng */
    margin-top: 5px;   /* Tùy chỉnh: Thêm một chút khoảng cách với tiêu đề ở trên */
}

/* ==========================================================================
   BẢNG BIỂU CUỘN NGANG (RESPONSIVE TABLES)
   ========================================================================== */
/* Bọc bảng của bạn trong <div class="table-scroll"> để kích hoạt */
.table-scroll {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    width: 100%;
}

.table-scroll table {
    min-width: 600px; /* Đảm bảo bảng có chiều rộng tối thiểu để cuộn */
    width: 100%;
    border-collapse: collapse;
}

.table-scroll th,
.table-scroll td {
    border: 1px solid #ccc;
    padding: 8px;
}

/* ==========================================================================
   KHUNG HỎI ĐÁP (FAQ) - STATIC VERSION
   ========================================================================== */
.custom-faq-container {
    max-width: 700px;
    margin: 20px auto;
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    font-family: 'Inter', sans-serif;
    color: #333;
    overflow: hidden;
    padding: 0;
}

.custom-faq-item {
    border-bottom: 1px solid #e0e0e0;
    padding: 18px 25px;
    transition: background-color 0.3s ease;
}

.custom-faq-item:last-child {
    border-bottom: none;
}

.custom-faq-item:hover {
    background-color: #f9f9f9;
}

.custom-faq-question {
    font-size: 1.05em;
    font-weight: 600;
    color: #333;
    margin: 0;
    cursor: default; /* Bỏ cursor pointer vì không còn click */
    display: block; /* Thay đổi từ flex để bỏ justify-content */
}

/* Giữ nguyên màu hover cho question */
.custom-faq-item:hover .custom-faq-question {
    color: #007bff;
}

/* Bỏ tất cả CSS liên quan đến toggle-icon vì không còn cần */

.custom-faq-answer {
    display: block !important; /* Luôn hiển thị */
    overflow: visible;
    color: #555;
    font-size: 1em;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e0e0e0;
    opacity: 1;
    visibility: visible;
}

/* Class này đảm bảo answer luôn hiển thị */
.custom-faq-answer.open {
    display: block !important;
}

/* Responsive - giữ nguyên */
@media (max-width: 768px) {
    .custom-faq-container {
        margin: 15px 10px;
        border-radius: 8px;
    }
    
    .custom-faq-item {
        padding: 15px 20px;
    }
    
    .custom-faq-question {
        font-size: 1em;
    }
    
    .custom-faq-answer {
        font-size: 0.95em;
        margin-top: 12px;
        padding-top: 12px;
    }
}
