/* ==========================================================================
   CSS CHO TRANG TIN TỨC (BLOG LAYOUT)
   ========================================================================== */

/* Container Flexbox cho Layout 2 Cột */
.t-blog-container {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    margin-top: 30px;
}

/* Cột Nội Dung (Trái) */
.t-blog-content {
    flex: 1;
    /* Chiếm phần còn lại */
    min-width: 0;
    /* Fix flexbox overflow issue */
}

/* Cột Sidebar (Phải) */
.t-blog-sidebar {
    width: 320px;
    /* Chiều rộng cố định cho sidebar */
    flex-shrink: 0;
    /* Không co lại */
}

/* Grid bài viết 2 cột trong vùng nội dung */
.t-news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

/* === Sidebar Styling (Updated) === */
.t-sidebar-inner {
    background-color: #f9f9f9;
    padding: 25px;
    border-radius: var(--border-radius);
    border: 1px solid #eee;
    height: 100%;
    /* Đảm bảo full chiều cao nếu cần */
}

.t-slidebar-section {
    margin-bottom: 30px;
}

.t-slidebar-section:last-child {
    margin-bottom: 0;
}

.t-slidebar-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--t-secondary-color);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--t-primary-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.t-slidebar-title i {
    color: var(--t-primary-color);
}

/* List Categories Sidebar */
.t-slidebar-categories {
    padding: 0;
    margin: 0;
    list-style: none;
}

.t-slidebar-categories li {
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #eee;
}

.t-slidebar-categories li:last-child {
    border-bottom: none;
}

.t-slidebar-categories li a {
    color: var(--t-text-color);
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: var(--transition);
}

.t-slidebar-categories li a:hover {
    color: var(--t-primary-color);
    padding-left: 5px;
}

/* Slider trong Sidebar (Mini Products/News) */
.t-slidebar-slider-item {
    margin-bottom: 20px;
}

.t-slidebar-product-img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
    float: left;
    margin-right: 15px;
    margin-bottom: 10px;
}

.t-slidebar-product-title,
.t-slidebar-news-title {
    font-size: 15px;
    font-weight: 600;
    margin: 0 0 5px 0;
    line-height: 1.4;
}

.t-slidebar-product-price {
    font-size: 14px;
    color: var(--t-primary-color);
    font-weight: bold;
    margin-bottom: 5px;
}

.t-slidebar-read-more {
    font-size: 13px;
    color: var(--t-primary-color);
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    margin-top: 5px;
}

/* === Pagination Styling (Fixed Horizontal) === */
.t-pagination-wrapper {
    margin-top: 50px;
    margin-bottom: 30px;
    text-align: center;
    display: flex;
    justify-content: center;
}

.t-pagination-wrapper .navigation.pagination {
    display: inline-block;
    border: none;
    padding: 0;
}

.t-pagination-wrapper .page-numbers {
    display: flex;
    gap: 8px;
    align-items: center;
    padding: 0;
    margin: 0;
    list-style: none;
    /* Quan trọng: Xóa bullet point */
}

/* Từng item trong list */
.t-pagination-wrapper .page-numbers li {
    display: inline-block;
    margin: 0;
}

/* Style cho các link số trang */
.t-pagination-wrapper .page-numbers a,
.t-pagination-wrapper .page-numbers span {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    border: 1px solid #ddd;
    border-radius: 5px;
    /* Hình vuông bo nhẹ */
    color: var(--t-secondary-color);
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    background-color: #fff;
    font-size: 16px;
    border-radius: 4px;
}

/* Hover state */
.t-pagination-wrapper .page-numbers a:hover {
    border-color: var(--t-primary-color);
    color: var(--t-primary-color);
    background-color: #fff;
}

/* Active state (Trang hiện tại) */
.t-pagination-wrapper .page-numbers span.current {
    background-color: var(--t-primary-color);
    color: #fff;
    border-color: var(--t-primary-color);
    cursor: default;
}

/* Style cho nút Prev/Next (Icon) */
.t-pagination-wrapper .page-numbers .prev,
.t-pagination-wrapper .page-numbers .next {
    width: auto;
    padding: 0 15px;
    font-size: 14px;
}

/* Responsive cho Pagination */
@media (max-width: 480px) {

    .t-pagination-wrapper .page-numbers a,
    .t-pagination-wrapper .page-numbers span {
        width: 35px;
        height: 35px;
        font-size: 14px;
    }
}


/* === Responsive Blog Layout === */
@media (max-width: 992px) {
    .t-blog-container {
        flex-direction: column;
        /* Chuyển thành 1 cột */
    }

    .t-blog-sidebar {
        width: 100%;
        /* Sidebar full width */
        order: 2;
        /* Đẩy xuống dưới content */
    }

    .t-blog-content {
        order: 1;
    }
}