/* Mục "Kinh nghiệm hay": danh sách + bài viết */

/* ----- Tab danh mục (dùng lại .category-tabs, hiện cả desktop) ----- */
.blog-tabs {
    position: relative;
    justify-content: flex-start;
}

@media (min-width: 768px) {
    .blog-tabs {
        justify-content: center;
    }
}

/* ----- Thẻ bài viết ----- */
.blog-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    background-color: #fff;
    border-radius: 12px;
    overflow: hidden;
    color: #222;
    transition: transform .2s, box-shadow .2s;
}

.blog-card:hover {
    color: #222;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(60, 64, 67, .18);
}

.blog-thumb {
    aspect-ratio: 16 / 9;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1b1b1b, #3a3a3a);
    color: rgba(255, 255, 255, .85);
    overflow: hidden;
}

.blog-thumb i {
    font-size: 64px;
}

.blog-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.blog-thumb-sua-chua {
    background: linear-gradient(135deg, #1b1b1b, #5a1a1a);
}

.blog-thumb-kinh-nghiem-mua-may {
    background: linear-gradient(135deg, #1b1b1b, #1d3b5a);
}

.blog-thumb-meo-dung-iphone {
    background: linear-gradient(135deg, #1b1b1b, #24503a);
}

.blog-card-body {
    padding: 2rem 2.2rem 2.4rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.blog-meta {
    font-size: 1.3rem;
    color: #888;
    margin-bottom: .8rem;
}

.blog-cat {
    color: var(--color-red);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .03em;
}

.blog-card-title {
    font-size: 1.8rem;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: .8rem;
}

.blog-excerpt {
    font-size: 1.4rem;
    color: #555;
    line-height: 1.6;
    margin-bottom: 1.2rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-more {
    margin-top: auto;
    font-size: 1.4rem;
    font-weight: 600;
}

.blog-card:hover .blog-more {
    color: var(--color-red);
}

@media (min-width: 768px) {
    .blog-card-featured {
        flex-direction: row;
    }

    .blog-card-featured .blog-thumb {
        flex: 0 0 55%;
        aspect-ratio: auto;
        min-height: 300px;
    }

    .blog-card-featured .blog-card-body {
        justify-content: center;
        padding: 3rem;
    }

    .blog-card-featured .blog-card-title {
        font-size: 2.6rem;
    }
}

.blog-empty {
    text-align: center;
    font-size: 1.5rem;
    color: #555;
}

.blog-empty i {
    font-size: 48px;
    color: #999;
}

.blog-empty p {
    margin: 1.2rem 0 2rem;
}

.blog-pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 1.6rem;
}

.blog-pagination a {
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border-radius: 50rem;
    border: 1px solid #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 600;
    color: #333;
    background-color: #fff;
}

.blog-pagination a.active {
    background-color: #111;
    border-color: #111;
    color: #fff;
}

/* ----- Trang bài viết ----- */
.post-hero {
    text-align: left;
    padding-bottom: 4rem;
}

.post-hero .container {
    max-width: 860px;
}

.post-hero h1 {
    font-size: 3.4rem;
    line-height: 1.3;
}

.post-hero .post-meta {
    margin: 1.6rem 0 0;
    max-width: none;
    font-size: 1.4rem;
}

.post-breadcrumb {
    font-size: 1.3rem;
    color: var(--text-sub);
    margin-bottom: 1.6rem;
}

.post-breadcrumb a {
    color: #ddd;
}

.post-breadcrumb a:hover {
    color: #fff;
}

.post-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 3rem;
    align-items: start;
}

.post-main {
    background-color: #fff;
    border-radius: 12px;
    padding: 3rem 3.6rem;
}

.post-cover {
    margin: -3rem -3.6rem 3rem;
    border-radius: 12px 12px 0 0;
    overflow: hidden;
}

.post-cover img {
    width: 100%;
    height: auto;
}

.post-toc {
    background-color: #f6f6f6;
    border-radius: 10px;
    padding: 1.2rem 1.8rem;
    margin-bottom: 2.4rem;
}

.post-toc summary {
    font-size: 1.5rem;
    font-weight: 700;
    cursor: pointer;
    padding: .4rem 0;
}

.post-toc ol {
    list-style: decimal;
    margin: .8rem 0 .4rem 2rem;
    font-size: 1.45rem;
}

.post-toc li {
    padding: .3rem 0;
}

.post-toc a {
    color: #333;
}

.post-toc a:hover {
    color: var(--color-red);
}

/* Nội dung bài viết */
.post-content {
    font-size: 1.65rem;
    line-height: 1.8;
    color: #222;
}

.post-content p,
.post-content ul,
.post-content ol,
.post-content table,
.post-content blockquote {
    margin-bottom: 1.6rem;
}

.post-content h2 {
    font-size: 2.3rem;
    font-weight: 700;
    line-height: 1.35;
    margin: 3.2rem 0 1.4rem;
    scroll-margin-top: 2rem;
}

.post-content h3 {
    font-size: 1.85rem;
    font-weight: 700;
    margin: 2.4rem 0 1rem;
}

.post-content ul,
.post-content ol {
    padding-left: 2.4rem;
}

.post-content ul {
    list-style: disc;
}

.post-content ol {
    list-style: decimal;
}

.post-content li {
    margin-bottom: .6rem;
}

.post-content a {
    color: #0b62c4;
    text-decoration: underline;
}

.post-content img {
    border-radius: 10px;
    margin: 1rem auto;
}

.post-content table {
    width: 100%;
    border-collapse: collapse;
    font-size: 1.5rem;
}

.post-content th,
.post-content td {
    border: 1px solid #e5e5e5;
    padding: 1rem 1.2rem;
    vertical-align: top;
}

.post-content th {
    background-color: #f6f6f6;
    font-weight: 700;
}

.post-content .table-wrap {
    overflow-x: auto;
    margin-bottom: 1.6rem;
}

.post-content .table-wrap table {
    margin-bottom: 0;
    min-width: 480px;
}

.post-content .note {
    background-color: #fff8e6;
    border-left: 4px solid #f0b400;
    border-radius: 8px;
    padding: 1.2rem 1.6rem;
}

/* Hộp kêu gọi giữa bài */
.post-cta {
    background-color: #111;
    color: #fff;
    border-radius: 12px;
    padding: 2.4rem;
    margin: 2.8rem 0;
    display: flex;
    gap: 2rem;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}

.post-cta .cta-text strong {
    display: block;
    font-size: 1.9rem;
    margin-bottom: .4rem;
}

.post-cta .cta-text span {
    font-size: 1.4rem;
    color: var(--text-sub);
}

.post-cta .cta-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.post-cta .btn {
    font-size: 1.5rem;
    font-weight: 600;
    padding: 1rem 2.2rem;
}

/* Nút trong hộp kêu gọi không ăn style link của nội dung bài */
.post-content .post-cta a.btn {
    text-decoration: none;
}

.post-content .post-cta a.btn-light {
    color: #111;
}

.post-content .post-cta a.btn-outline-light {
    color: #fff;
}

.post-content .post-cta a.btn-outline-light:hover {
    color: #111;
}

/* FAQ và chia sẻ */
.post-faq {
    margin-top: 3.2rem;
}

.post-faq h2 {
    font-size: 2.3rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.post-faq details {
    border-bottom: 1px solid #eee;
}

.post-faq summary {
    font-size: 1.6rem;
    font-weight: 600;
    padding: 1.4rem 0;
    cursor: pointer;
}

.post-faq details p {
    font-size: 1.5rem;
    color: #555;
    padding-bottom: 1.4rem;
}

.post-share {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #eee;
    font-size: 1.4rem;
    font-weight: 600;
}

.post-share a,
.post-share button {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    border: 1px solid #ddd;
    border-radius: 50rem;
    background-color: #fff;
    padding: .6rem 1.4rem;
    color: #333;
    font-size: 1.35rem;
    font-weight: 600;
    cursor: pointer;
}

.post-share i {
    font-size: 1.8rem;
}

/* Cột phải (desktop) */
.post-sidebar {
    position: sticky;
    top: 2rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.sidebar-card {
    background-color: #fff;
    border-radius: 12px;
    padding: 2.2rem;
}

.sidebar-card h3 {
    font-size: 1.7rem;
    font-weight: 700;
    margin-bottom: 1.2rem;
}

.sidebar-card .shop-line {
    display: flex;
    gap: .8rem;
    font-size: 1.4rem;
    color: #444;
    margin-bottom: .8rem;
}

.sidebar-card .shop-line i {
    font-size: 1.8rem;
    flex: 0 0 auto;
}

.sidebar-card .btn {
    font-size: 1.4rem;
    font-weight: 600;
    padding: .9rem 1rem;
}

.sidebar-card .latest a {
    display: block;
    font-size: 1.4rem;
    font-weight: 600;
    color: #222;
    padding: .9rem 0;
    border-bottom: 1px solid #f0f0f0;
}

.sidebar-card .latest a:last-child {
    border-bottom: 0;
}

.sidebar-card .latest a:hover {
    color: var(--color-red);
}

.post-related {
    margin-top: 5rem;
}

.post-related h2 {
    font-size: 2.4rem;
    font-weight: 700;
    margin-bottom: 2rem;
}

@media (max-width: 991.98px) {
    .post-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .post-sidebar {
        display: none;
    }
}

@media (max-width: 767.98px) {
    .post-hero h1 {
        font-size: 2.6rem;
    }

    .post-main {
        padding: 2.2rem 1.8rem;
        border-radius: 10px;
    }

    .post-cover {
        margin: -2.2rem -1.8rem 2.2rem;
    }

    .post-content {
        font-size: 1.6rem;
    }

    .post-content h2 {
        font-size: 2.05rem;
    }

    .post-cta {
        padding: 2rem 1.8rem;
    }

    .post-cta .cta-actions,
    .post-cta .btn {
        width: 100%;
    }

    .post-cta .btn {
        text-align: center;
        justify-content: center;
    }
}

/* Lưới ảnh trong bài (thay cho slider cũ): hiện trọn ảnh, không cắt; 1 cột trên điện thoại */
.post-content .post-gallery {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.6rem;
    margin: 1.6rem 0;
}

.post-content .post-gallery figure {
    margin: 0;
}

.post-content .post-gallery img {
    display: block;
    width: 100%;
    height: auto;
    margin: 0;
}

.post-content .post-gallery figcaption {
    margin-top: .6rem;
    font-size: 1.3rem;
    font-style: italic;
    color: #666;
    text-align: center;
}

@media (max-width: 575.98px) {
    .post-content .post-gallery {
        grid-template-columns: 1fr;
    }
}
