/* =========================================================
   TTG BLOG & NEWS PAGE - STYLES MATCHING MOCKUP
========================================================= */

:root {
    --ttg-font: "Be Vietnam Pro", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    --ttg-brand: #f09e16;
    --ttg-brand-hover: #d98b0d;
    --ttg-title: #1a1a1a;
    --ttg-body: #333333;
    --ttg-sub: #888888;
    --ttg-border: #eaeaea;
    --ttg-zalo: #1688f8;
}

.ttg-blog-page,
.ttg-blog-page * {
    font-family: var(--ttg-font) !important;
    box-sizing: border-box;
}

/* ẨN VÒNG LẶP MẶC ĐỊNH CỦA FLATSOME TRÊN TRANG BLOG */
.ttg-blog-page #content > .row {
    display: none !important;
}


/* =========================================================
   01. HERO BANNER TIN TỨC
========================================================= */
.ttg-blog-hero {
    position: relative;
    width: 100%;
    min-height: 250px;
    padding-top: 130px !important;
    padding-bottom: 35px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    margin-bottom: 30px;
}

.ttg-blog-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, rgba(0, 0, 0, 0.88) 0%, rgba(0, 0, 0, 0.45) 100%);
}

.ttg-blog-hero-content {
    position: relative;
    z-index: 2;
    padding: 0 20px;
    color: #fff;
}

.ttg-blog-breadcrumbs {
    font-size: 13px;
    color: #ccc;
    margin-bottom: 8px;
}

.ttg-blog-breadcrumbs a {
    color: #fff;
    text-decoration: none;
}

.ttg-blog-breadcrumbs .divider {
    margin: 0 6px;
    color: #aaa;
}

.ttg-blog-hero-title {
    font-size: 34px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 8px;
    text-transform: uppercase;
    letter-spacing: -0.02em;
}

.ttg-blog-hero-desc {
    font-size: 14px;
    color: #e0e0e0;
    margin: 0;
    max-width: 650px;
    line-height: 1.5;
}


/* =========================================================
   02. THANH LỌC CHUYÊN MỤC & Ô TÌM KIẾM
========================================================= */
.ttg-blog-filter-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.ttg-blog-pills {
    display: flex;
    align-items: center;
    gap: 10px;
    overflow-x: auto;
    scrollbar-width: none;
    padding-bottom: 4px;
}

.ttg-blog-pills::-webkit-scrollbar {
    display: none;
}

.ttg-blog-pill {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    border-radius: 6px;
    background: #fff;
    border: 1px solid var(--ttg-border);
    color: #444;
    font-size: 13.5px;
    font-weight: 500;
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.ttg-blog-pill:hover {
    border-color: var(--ttg-brand);
    color: var(--ttg-brand);
}

.ttg-blog-pill.is-active {
    background: var(--ttg-brand);
    border-color: var(--ttg-brand);
    color: #fff;
    font-weight: 600;
}

/* Ô TÌM KIẾM */
.ttg-blog-search {
    position: relative;
    width: 280px;
    display: flex;
    align-items: center;
    margin: 0;
}

.ttg-search-input {
    width: 100%;
    height: 40px;
    padding: 0 45px 0 14px;
    border: 1px solid var(--ttg-border);
    border-radius: 6px;
    font-size: 13px;
    outline: none;
    background: #fff;
}

.ttg-search-input:focus {
    border-color: var(--ttg-brand);
}

.ttg-search-btn {
    position: absolute;
    right: 4px;
    top: 4px;
    width: 32px;
    height: 32px;
    border-radius: 4px;
    background: var(--ttg-brand);
    color: #fff;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease;
}

.ttg-search-btn:hover {
    background: var(--ttg-brand-hover);
}


/* =========================================================
   03. KHUNG BỐ CỤC 2 CỘT
========================================================= */
.ttg-blog-layout-grid {
    display: flex;
    gap: 30px;
    align-items: flex-start;
    margin-bottom: 40px;
}

.ttg-blog-content-col {
    flex: 1 1 0;
    min-width: 0;
}

.ttg-blog-sidebar-col {
    flex: 0 0 300px;
    width: 300px;
}


/* =========================================================
   04. BÀI VIẾT NỔI BẬT ĐẦU TRANG (1 TO + 2 VỪA)
========================================================= */
.ttg-featured-news-grid {
    display: grid;
    grid-template-columns: 1.25fr 1fr;
    gap: 20px;
    margin-bottom: 25px;
}

.ttg-news-card-big,
.ttg-news-card-medium,
.ttg-news-card {
    background: #fff;
    border: 1px solid var(--ttg-border);
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.25s ease;
}

.ttg-news-card-big:hover,
.ttg-news-card-medium:hover,
.ttg-news-card:hover {
    box-shadow: 0 6px 20px rgba(0,0,0,0.06);
    border-color: #ddd;
}

.card-thumb {
    position: relative;
    overflow: hidden;
    background: #f7f7f7;
}

.card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.35s ease;
}

.ttg-news-card-big:hover .card-thumb img,
.ttg-news-card-medium:hover .card-thumb img,
.ttg-news-card:hover .card-thumb img {
    transform: scale(1.04);
}

.card-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
    padding: 3px 8px;
    border-radius: 4px;
    background: var(--ttg-brand);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
}

.ttg-news-card-big .card-thumb {
    aspect-ratio: 16 / 10;
}

.ttg-news-card-big .card-body {
    padding: 18px 20px 20px;
}

.ttg-news-card-big .card-title {
    font-size: 18px;
    font-weight: 700;
    margin: 6px 0 10px;
    line-height: 1.35;
}

.ttg-news-card-big .card-excerpt {
    font-size: 13.5px;
    color: var(--ttg-body);
    line-height: 1.6;
    margin-bottom: 14px;
}

.ttg-news-sub-column {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.ttg-news-card-medium .card-thumb {
    aspect-ratio: 16 / 9;
}

.ttg-news-card-medium .card-body {
    padding: 14px 16px 16px;
}

.ttg-news-card-medium .card-title {
    font-size: 14px;
    font-weight: 700;
    margin: 4px 0 10px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-date {
    display: block;
    font-size: 11.5px;
    color: var(--ttg-sub);
}

.card-title a {
    color: var(--ttg-title);
    text-decoration: none;
    transition: color 0.2s ease;
}

.card-title a:hover {
    color: var(--ttg-brand);
}

.card-readmore {
    display: inline-flex;
    align-items: center;
    color: var(--ttg-brand);
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
}

.card-readmore:hover {
    color: var(--ttg-brand-hover);
}


/* =========================================================
   05. LƯỚI TẤT CẢ BÀI VIẾT (3 CỘT)
========================================================= */
.ttg-news-loop-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.ttg-news-card .card-thumb {
    aspect-ratio: 16 / 10;
}

.ttg-news-card .card-body {
    padding: 14px 16px 16px;
}

.ttg-news-card .card-title {
    font-size: 13.5px;
    font-weight: 600;
    margin: 4px 0 10px;
    line-height: 1.4;
    min-height: 38px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}


/* =========================================================
   06. PHÂN TRANG
========================================================= */
.ttg-blog-pagination {
    margin-top: 25px;
    text-align: center;
}

.ttg-blog-pagination ul.page-numbers {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.ttg-blog-pagination .page-numbers li a,
.ttg-blog-pagination .page-numbers li span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    border-radius: 6px;
    border: 1px solid var(--ttg-border);
    background: #fff;
    color: #444;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
}

.ttg-blog-pagination .page-numbers li span.current {
    background: var(--ttg-brand);
    border-color: var(--ttg-brand);
    color: #fff;
}

.ttg-blog-pagination .page-numbers li a:hover {
    border-color: var(--ttg-brand);
    color: var(--ttg-brand);
}


/* =========================================================
   07. SIDEBAR CỘT PHẢI
========================================================= */
.ttg-blog-widget {
    background: #fff;
    border: 1px solid var(--ttg-border);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 25px;
}

.widget-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--ttg-title);
    text-transform: uppercase;
    margin: 0 0 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

/* DANH SÁCH CHUYÊN MỤC */
.ttg-blog-cat-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.ttg-blog-cat-list li {
    margin-bottom: 6px;
}

.ttg-blog-cat-list li a {
    display: flex;
    align-items: center;
    padding: 8px 10px;
    border-radius: 6px;
    color: #555;
    font-size: 13px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.ttg-blog-cat-list li.is-active a,
.ttg-blog-cat-list li a:hover {
    background: #fff6eb;
    color: var(--ttg-brand);
    font-weight: 600;
}

.ttg-blog-cat-list .cat-icon {
    margin-right: 8px;
    display: flex;
    align-items: center;
}

.ttg-blog-cat-list .cat-name {
    flex: 1;
}

.ttg-blog-cat-list .cat-count {
    color: #999;
    font-size: 12px;
}

.ttg-blog-cat-list li.is-active .cat-count {
    color: var(--ttg-brand);
}

/* BÀI VIẾT NỔI BẬT SIDEBAR */
.ttg-recent-posts-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.recent-post-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.recent-post-item .post-thumb {
    flex: 0 0 64px;
    width: 64px;
    height: 64px;
    border-radius: 6px;
    overflow: hidden;
    background: #f7f7f7;
}

.recent-post-item .post-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.recent-post-item .post-info h4 {
    margin: 0 0 4px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.recent-post-item .post-info h4 a {
    color: var(--ttg-title);
    text-decoration: none;
}

.recent-post-item .post-info h4 a:hover {
    color: var(--ttg-brand);
}

.recent-post-item .post-date {
    font-size: 11px;
    color: var(--ttg-sub);
}

/* KHỐI TƯ VẤN STICKY */
.ttg-support-box {
    background: #fffaf5;
    border: 1px solid rgba(240, 158, 22, 0.3);
    border-radius: 10px;
    padding: 18px 16px;
    text-align: center;
}

.ttg-support-head h4 {
    font-size: 14px;
    font-weight: 700;
    color: var(--ttg-title);
    margin: 0 0 4px;
}

.ttg-support-head p {
    font-size: 11px;
    color: var(--ttg-sub);
    margin: 0 0 12px;
}

.ttg-support-avatar img {
    width: 76px;
    height: 76px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 12px;
    border: 2px solid #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
    display: block;
}

.ttg-support-actions {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
}

.ttg-btn-zalo,
.ttg-btn-hotline {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    height: 34px;
    border-radius: 5px;
    font-size: 11px;
    font-weight: 600;
    text-decoration: none;
}

.ttg-btn-zalo {
    background: var(--ttg-zalo);
    color: #fff;
}

.ttg-btn-zalo img {
    width: 16px;
    height: 16px;
}

.ttg-btn-hotline {
    background: #fff;
    border: 1px solid #ddd;
    color: #333;
}

.ttg-support-phone {
    display: block;
    width: 100%;
    height: 38px;
    line-height: 38px;
    background: var(--ttg-brand);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    border-radius: 6px;
    text-decoration: none;
}


/* =========================================================
   08. THANH USP 4 CAM KẾT
========================================================= */
.ttg-shop-usp-bar {
    margin-top: 35px;
    margin-bottom: 30px;
}

.ttg-shop-usp-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    background: #fff;
    border: 1px solid var(--ttg-border);
    border-radius: 8px;
    padding: 18px 24px;
}

.ttg-shop-usp-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 15px;
    border-right: 1px solid #eee;
}

.ttg-shop-usp-item:last-child {
    border-right: none;
}

.ttg-shop-usp-item .usp-icon {
    color: var(--ttg-brand);
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.ttg-shop-usp-item .usp-text strong {
    display: block;
    color: var(--ttg-title);
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 2px;
}

.ttg-shop-usp-item .usp-text small {
    display: block;
    color: var(--ttg-sub);
    font-size: 11px;
}


/* =========================================================
   09. RESPONSIVE MOBILE & TABLET
========================================================= */
@media (max-width: 991px) {
    .ttg-blog-layout-grid {
        flex-direction: column;
    }

    .ttg-blog-sidebar-col {
        width: 100%;
        flex: 0 0 100%;
    }

    .ttg-featured-news-grid {
        grid-template-columns: 1fr;
    }

    .ttg-news-loop-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .ttg-shop-usp-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .ttg-shop-usp-item:nth-child(2) {
        border-right: none;
    }
}

@media (max-width: 549px) {
    .ttg-blog-hero {
        min-height: 180px;
        padding-top: 100px !important;
    }

    .ttg-blog-hero-title {
        font-size: 24px;
    }

    .ttg-news-loop-grid {
        grid-template-columns: 1fr;
    }

    .ttg-blog-filter-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .ttg-blog-search {
        width: 100%;
    }
}