/* =========================================================
   CHỐNG THẤM BUTYL - BLOG CSS
   File: butyl-blog.css

   Chỉ load cho:
   - Single Post
   - Blog / Category / Archive nếu có dùng các component bên dưới
========================================================= */


/* =========================================================
   1. BLOG WRAPPER
========================================================= */

.blog-wrapper {
    padding-top: 0;
}

.blog-wrapper .entry-header-text {
    padding: 0;
}

.blog-wrapper .flickity-prev-next-button {
    opacity: 1;
}


/*
 * FIX selector cũ:
 * Không dùng:
 * .blog-wrapper h1, h2, h3...
 *
 * vì sẽ ảnh hưởng h2/h3/p toàn website.
 */
.blog-wrapper h1,
.blog-wrapper h2,
.blog-wrapper h3,
.blog-wrapper h4,
.blog-wrapper h5,
.blog-wrapper h6,
.blog-wrapper p {
    color: #101828;
}


.flickity-button .flickity-button-icon {
    background-color: #F4F4F4;
    border: none !important;
}


/* =========================================================
   2. TYPOGRAPHY BÀI VIẾT
========================================================= */

.blog-single .entry-content.single-page {
    color: #333;
    font-size: 17px;
    font-weight: 400;
    line-height: 1.8;
}


/* Paragraph */
.blog-single .entry-content.single-page p {
    margin: 0 0 20px;
}


/* H2 */
.blog-single .entry-content.single-page h2 {
    margin: 42px 0 16px;
    padding-bottom: 10px;

    color: #222;

    font-size: 28px;
    line-height: 1.35;

    border-bottom: 2px solid #cc202b;
}


/* H3 */
.blog-single .entry-content.single-page h3 {
    margin: 30px 0 12px;
    padding-left: 12px;

    color: #222;

    font-size: 21px;
    line-height: 1.4;

    border-left: 3px solid #cc202b;
}


/* H4 */
.blog-single .entry-content.single-page h4 {
    margin: 24px 0 10px;

    color: #222;

    font-size: 18px;
    line-height: 1.45;
}


/* List */
.blog-single .entry-content.single-page ul,
.blog-single .entry-content.single-page ol {
    margin: 0 0 22px;
    padding-left: 25px;
}

.blog-single .entry-content.single-page li {
    margin-bottom: 7px;
    line-height: 1.7;
}

.blog-single .entry-content.single-page li::marker {
    color: #cc202b;
}


/* Strong */
.blog-single .entry-content.single-page strong {
    color: #222;
    font-weight: 700;
}


/* Links trong content */
.blog-single .entry-content.single-page p a,
.blog-single .entry-content.single-page li a {
    color: #cc202b;

    font-weight: 600;

    text-decoration: underline;
    text-underline-offset: 3px;
}


/* HR */
.blog-single .entry-content.single-page hr {
    margin: 34px 0;

    border: 0;
    border-top: 1px solid #e5e5e5;
}


/* =========================================================
   3. IMAGE TRONG BÀI VIẾT
========================================================= */

/*
 * Selector cũ là:
 * .entry-content img
 *
 * Đã scope lại để không ảnh hưởng Product Page.
 */
.blog-single .entry-content img {
    border-radius: 30px;
    overflow: hidden;
    padding-top: 15px;
}


/* =========================================================
   4. TABLE TRONG BÀI BLOG
   Không tác động .my-table của Product
========================================================= */

.blog-single .entry-content table:not(.my-table) {
    width: 100%;
    margin: 24px 0;

    border-collapse: collapse;
    border-top: 3px solid #cc202b;

    /* Chia đều chiều rộng các cột */
    table-layout: fixed;

    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}


/* Cell */
.blog-single .entry-content table:not(.my-table) th,
.blog-single .entry-content table:not(.my-table) td {
    padding: 13px 15px;

    border: 1px solid #e2e2e2;

    font-size: 15px;
    line-height: 1.6;

    text-align: left;
    vertical-align: top;

    /* Không để width cũ trong HTML làm lệch cột */
    width: auto !important;

    /* Nội dung dài không phá layout */
    overflow-wrap: break-word;
    word-wrap: break-word;
}


/* Header table */
.blog-single .entry-content table:not(.my-table) th {
    color: #fff;
    background: #373a40;
}


/* Zebra */
.blog-single .entry-content table:not(.my-table) tbody tr:nth-child(even) td {
    background: #f7f7f7;
}


/* Dòng lẻ */
.blog-single .entry-content table:not(.my-table) tbody tr:nth-child(odd) td {
    background: #fff;
}

/* =========================================================
   5. PREVIOUS / NEXT POST
========================================================= */

#nav-below.navigation-post {
    margin: 30px 0;
}


#nav-below .next-prev-nav {
    display: grid;

    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;

    background: #ffffff;

    border: 1px solid #e6e6e6;
    border-radius: 10px;

    overflow: hidden;

    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.1);
}


/* 2 cột */
#nav-below .next-prev-nav > .flex-col {
    display: flex;
    align-items: center;

    min-width: 0;
    min-height: 86px;

    padding: 16px 20px;
}


/* Divider */
#nav-below .next-prev-nav > .nav-prev {
    border-right: 1px solid #e6e6e6;
}


#nav-below .next-prev-nav > .flex-col > div {
    width: 100%;
}


/* Link */
#nav-below .next-prev-nav a {
    display: flex;
    align-items: center;

    gap: 10px;

    width: 100%;

    color: #373a40;

    font-size: 14px;
    font-weight: 600;
    line-height: 1.45;

    text-decoration: none;

    transition: color 0.2s ease;
}


#nav-below .next-prev-nav > .nav-prev a {
    justify-content: flex-start;
    text-align: left;
}


#nav-below .next-prev-nav > .nav-next a {
    justify-content: flex-end;
    text-align: right;
}


#nav-below .next-prev-nav a:hover {
    color: #cc202b;
}


/* Icon */
#nav-below .next-prev-nav i {
    flex: 0 0 auto;

    color: #cc202b;

    font-size: 18px;
    line-height: 1;
}


/* Override border Flatsome */
#nav-below .next-prev-nav.bt,
#nav-below .next-prev-nav.bb {
    border-top: 1px solid #e6e6e6;
    border-bottom: 1px solid #e6e6e6;
}


/* =========================================================
   6. AUTHOR BOX
========================================================= */

.htn-author-box {
    margin: 30px 0;
    padding: 20px;

    background: #fafafa;

    border: 1px solid #e2e2e2;
    border-top: 3px solid #c0272d;
    border-radius: 8px;
}


.htn-author-inner {
    display: flex;

    gap: 18px;

    align-items: flex-start;
}


.htn-author-avatar img {
    display: block;

    width: 90px;
    height: 90px;

    border: 2px solid #c0272d;
    border-radius: 50%;

    object-fit: cover;
}


.htn-author-content {
    flex: 1;
    min-width: 0;
}


.htn-author-label {
    margin-bottom: 4px;

    color: #c0272d;

    font-size: 11px;
    font-weight: 600;

    letter-spacing: 0.06em;
    text-transform: uppercase;
}


.htn-author-name {
    margin: 0 0 3px;

    font-size: 18px;
    font-weight: 600;
    line-height: 1.2;
}


.htn-author-name a {
    color: #2c2c2c;
    text-decoration: none;
}


/*
 * CSS cũ của anh bị thiếu declaration ở selector:
 * .htn-author-name a:hover
 *
 * Fix lại tại đây.
 */
.htn-author-name a:hover {
    color: #c0272d;
}


.htn-author-job {
    margin-bottom: 8px;

    color: #666;

    font-size: 13px;
}


.htn-author-bio {
    margin: 0 0 8px;

    color: #555;

    font-size: 13px;
    line-height: 1.7;
}


.htn-author-bio a {
    color: #c0272d;
    text-decoration: none;
}


.htn-author-more {
    color: #c0272d;

    font-size: 12px;
    font-weight: 600;

    text-decoration: none;
}


/* =========================================================
   7. EASY TABLE OF CONTENTS
========================================================= */

#ez-toc-container {
    width: 100% !important;
    max-width: 100%;

    margin: 25px 0;
    padding: 0 !important;

    background:
        linear-gradient(
            145deg,
            #252525 0%,
            #171717 100%
        ) !important;

    border: 1px solid rgba(210, 25, 35, 0.65) !important;
    border-left: 5px solid #d71920 !important;
    border-radius: 12px !important;

    box-shadow:
        0 10px 25px rgba(0, 0, 0, 0.18),
        0 3px 8px rgba(0, 0, 0, 0.12) !important;

    overflow: hidden;

    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease;
}


#ez-toc-container:hover {
    transform: translateY(-2px);

    box-shadow:
        0 14px 32px rgba(0, 0, 0, 0.23),
        0 4px 10px rgba(215, 25, 32, 0.12) !important;
}


/* Header */
#ez-toc-container .ez-toc-title-container {
    display: flex;

    align-items: center;
    justify-content: space-between;

    min-height: 58px;

    padding: 14px 18px;

    background:
        linear-gradient(
            90deg,
            #111111 0%,
            #292929 100%
        );

    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}


#ez-toc-container .ez-toc-title {
    position: relative;

    margin: 0 !important;
    padding-left: 20px;

    color: #ffffff !important;

    font-size: 18px !important;
    font-weight: 700 !important;
    line-height: 1.4;

    letter-spacing: 0.3px;
    text-transform: uppercase;
}


#ez-toc-container .ez-toc-title::before {
    content: "";

    position: absolute;
    top: 50%;
    left: 0;

    width: 9px;
    height: 9px;

    background: #d71920;

    border-radius: 50%;

    box-shadow:
        0 0 0 4px rgba(215, 25, 32, 0.18);

    transform: translateY(-50%);
}


/* Toggle */
#ez-toc-container .ez-toc-title-toggle {
    display: flex;
    align-items: center;
}


#ez-toc-container .ez-toc-toggle {
    display: flex !important;

    align-items: center;
    justify-content: center;

    width: 36px;
    height: 36px;

    padding: 0 !important;

    background: rgba(255, 255, 255, 0.07) !important;

    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    border-radius: 8px !important;

    box-shadow: none !important;

    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        transform 0.2s ease;
}


#ez-toc-container .ez-toc-toggle:hover {
    background: #d71920 !important;
    border-color: #d71920 !important;

    transform: scale(1.05);
}


#ez-toc-container .ez-toc-toggle svg {
    fill: #ffffff !important;
    color: #ffffff !important;
}


#ez-toc-container .ez-toc-toggle svg path {
    fill: currentColor !important;
}


/* TOC nav */
#ez-toc-container nav {
    padding: 14px 18px 18px;
}


#ez-toc-container ul.ez-toc-list {
    margin: 0 !important;
    padding: 0 !important;

    list-style: none !important;
}


#ez-toc-container ul.ez-toc-list > li {
    position: relative;

    margin: 0 !important;
    padding: 0 !important;

    border-bottom:
        1px solid rgba(255, 255, 255, 0.07);
}


#ez-toc-container ul.ez-toc-list > li:last-child {
    border-bottom: none;
}


/* TOC links */
#ez-toc-container a.ez-toc-link {
    position: relative;

    display: block;

    padding: 13px 14px 13px 32px !important;

    color: #e5e5e5 !important;

    font-size: 15px;
    font-weight: 500;
    line-height: 1.55;

    text-decoration: none !important;

    border-radius: 7px;

    transition:
        color 0.2s ease,
        background 0.2s ease,
        padding-left 0.2s ease;
}


#ez-toc-container a.ez-toc-link::before {
    content: "›";

    position: absolute;
    top: 50%;
    left: 12px;

    color: #d71920;

    font-size: 22px;
    font-weight: 700;
    line-height: 1;

    transform: translateY(-52%);

    transition:
        transform 0.2s ease,
        color 0.2s ease;
}


#ez-toc-container a.ez-toc-link:hover {
    padding-left: 37px !important;

    color: #ffffff !important;

    background: rgba(215, 25, 32, 0.13);
}


#ez-toc-container a.ez-toc-link:hover::before {
    color: #ff3b42;

    transform: translate(4px, -52%);
}


/* Active */
#ez-toc-container a.ez-toc-link.ez-toc-heading-level-2.active,
#ez-toc-container a.ez-toc-link.ez-toc-active {
    color: #ffffff !important;

    background: rgba(215, 25, 32, 0.2);

    box-shadow: inset 3px 0 0 #d71920;
}


/* =========================================================
   8. BLOG SIDEBAR / PRODUCT LIST
========================================================= */

.blog-products .blog-product-title {
    width: fit-content;

    margin: 0 0 24px;
    padding: 8px 16px;

    background-color: #CC202B;

    border-top-right-radius: 30px;
    border-bottom-right-radius: 30px;

    color: #ffffff;

    font-size: 14px;
    font-weight: 700;

    text-align: left;
}


.blog-products .blog-product-title p {
    color: #ffffff !important;
}


.blog-products .ux-products-list li {
    margin-left: 0;
    margin-bottom: 12px;

    color: #333333;

    font-size: 14px;
    font-weight: 600;

    border-radius: 8px;

    box-shadow:
        rgba(149, 157, 165, 0.2) 0 4px 4px;
}


ul.product_list_widget li + li {
    border-top: none;
}


ul.product_list_widget li:hover img {
    transform: scale(1.1);

    transition: transform 0.3s ease;
}


/* =========================================================
   9. BLOG LIST
========================================================= */

.blog-list-title p {
    width: fit-content;

    margin: 0 0 24px;
    padding: 8px 16px;

    background-color: #CC202B;

    border-top-right-radius: 30px;
    border-bottom-right-radius: 30px;

    color: #ffffff;

    font-size: 14px;
    font-weight: 700;

    text-align: left;
}


.blog-list .post-item .col-inner {
    border-radius: 6px;
}


.blog-list .box-image {
    padding: 10px;
}


.blog-list .box-image img {
    border-radius: 6px;
}


.blog-list .is-divider {
    display: none;
}


.blog-list .post-title a {
    display: -webkit-box;

    overflow: hidden;

    color: #101828;

    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}


/* =========================================================
   10. BLOG CARD
========================================================= */

.box-blog-post {
    height: 100%;

    margin-bottom: 24px !important;
}


/* Ẩn excerpt + divider */
.box-blog-post .from_the_blog_excerpt,
.box-blog-post .is-divider {
    display: none !important;
}


.box-blog-post .box-text {
    padding: 16px 14px;
}


.box-blog-post .post-title {
    min-height: 72px;

    margin: 0;

    font-size: 17px;
    line-height: 1.4;
}


.box-blog-post .post-title a {
    display: -webkit-box;

    overflow: hidden;

    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}


/* =========================================================
   11. RELATED POSTS
========================================================= */

.entry-content .related-posts-section {
    margin-top: 30px;
    padding: 20px;

    background: #fff;

    border: 1px solid #e5e7eb;
    border-radius: 12px;

    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}


/* Header */
.entry-content .related-posts-section .rel-header {
    display: flex;

    align-items: center;
    justify-content: space-between;

    gap: 10px;

    margin-bottom: 10px;
}


.entry-content .related-posts-section .rel-title {
    margin: 0;

    font-size: 18px;
    font-weight: 700;
}


/* Filter container */
.entry-content .related-posts-section .rel-filters {
    display: flex;
    flex-wrap: wrap;

    gap: 4px;

    margin: 6px 0 10px;
}


/*
 * Đã hợp nhất 2 declaration .rel-filter cũ.
 * Giữ phiên bản nhỏ gọn cuối cùng.
 */
.entry-content .related-posts-section .rel-filter {
    padding: 2px 8px;

    background: #fff;

    border: 1px solid #e5e7eb;
    border-radius: 999px;

    font-size: 12px;
    line-height: 1.2;

    cursor: pointer;

    transition: all 0.2s ease;
}


.entry-content .related-posts-section .rel-filter:hover {
    border-color: #d00000;

    transform: translateY(-1px);
}


.entry-content .related-posts-section .rel-filter.is-active {
    background: #d00000;
    border-color: #d00000;

    color: #fff;
}


.entry-content .related-posts-section .rel-slider-panels {
    margin-top: 6px;
}


.entry-content .related-posts-section .slider,
.entry-content .related-posts-section .row {
    margin-top: 6px;
}


.entry-content .related-posts-section .box,
.entry-content .related-posts-section .box .box-text {
    border-radius: 12px;

    overflow: hidden;
}


/* =========================================================
   12. POST META
========================================================= */

/* Ẩn category mặc định Flatsome */
.blog-single .entry-category.is-xsmall {
    display: none !important;
}


/* Icon ngày */
.blog-single .post-meta.is-small.op-8::before {
    content: "";

    display: inline-block;

    width: 15px;
    height: 15px;

    margin-right: 8px;

    background-image:
        url("https://chongthambutyl.com/wp-content/uploads/2025/11/icon-lich.webp");

    background-size: cover;

    vertical-align: middle;
}


/* =========================================================
   13. COMMENTS
========================================================= */

.blog-single .comments-area {
    display: none !important;
}


/* =========================================================
   14. MOBILE - BLOG TYPOGRAPHY / TABLE
========================================================= */

@media screen and (max-width: 549px) {

    .blog-single .entry-content.single-page {
        font-size: 16px;
        line-height: 1.75;
    }


    .blog-single .entry-content.single-page p {
        margin-bottom: 18px;
    }


    .blog-single .entry-content.single-page h2 {
        margin-top: 34px;

        font-size: 23px;
    }


    .blog-single .entry-content.single-page h3 {
        margin-top: 26px;

        font-size: 19px;
    }


    .blog-single .entry-content table:not(.my-table) {
        display: block;

        overflow-x: auto;

        -webkit-overflow-scrolling: touch;
    }


    .blog-single .entry-content table:not(.my-table) th,
    .blog-single .entry-content table:not(.my-table) td {
        min-width: 160px;

        padding: 10px 12px;

        font-size: 14px;
    }

}


/* =========================================================
   15. MOBILE - PREVIOUS / NEXT
========================================================= */

@media screen and (max-width: 549px) {

    #nav-below.navigation-post {
        margin: 24px 0;
    }


    #nav-below .next-prev-nav {
        grid-template-columns: 1fr;

        border-radius: 8px;
    }


    #nav-below .next-prev-nav > .flex-col {
        min-height: 68px;

        padding: 13px 15px;
    }


    #nav-below .next-prev-nav > .nav-prev {
        border-right: 0;
        border-bottom: 1px solid #e6e6e6;
    }


    #nav-below .next-prev-nav a {
        font-size: 13px;
        line-height: 1.45;
    }


    #nav-below .next-prev-nav > .nav-next a {
        justify-content: flex-start;
        text-align: left;
    }


    #nav-below .next-prev-nav i {
        font-size: 16px;
    }

}


/* =========================================================
   16. MOBILE - AUTHOR BOX
========================================================= */

@media screen and (max-width: 549px) {

    .htn-author-inner {
        flex-direction: column;

        align-items: center;

        text-align: center;
    }


    .htn-author-avatar img {
        width: 80px;
        height: 80px;
    }

}


/* =========================================================
   17. MOBILE / TABLET - EASY TOC
========================================================= */

@media screen and (max-width: 849px) {

    #ez-toc-container {
        margin: 18px 0;

        border-radius: 9px !important;
    }


    #ez-toc-container .ez-toc-title-container {
        min-height: 52px;

        padding: 12px 14px;
    }


    #ez-toc-container .ez-toc-title {
        font-size: 16px !important;
    }


    #ez-toc-container nav {
        padding: 10px 12px 14px;
    }


    #ez-toc-container a.ez-toc-link {
        padding: 11px 9px 11px 27px !important;

        font-size: 14px;
        line-height: 1.5;
    }


    #ez-toc-container a.ez-toc-link::before {
        left: 9px;
    }


    #ez-toc-container a.ez-toc-link:hover {
        padding-left: 31px !important;
    }

}


/* =========================================================
   18. ACCESSIBILITY - REDUCED MOTION
========================================================= */

@media (prefers-reduced-motion: reduce) {

    #ez-toc-container,
    #ez-toc-container .ez-toc-toggle,
    #ez-toc-container a.ez-toc-link,
    #ez-toc-container a.ez-toc-link::before,
    ul.product_list_widget li img {
        transition: none !important;
    }


    #ez-toc-container:hover {
        transform: none;
    }


    #ez-toc-container .ez-toc-toggle:hover {
        transform: none;
    }


    #ez-toc-container a.ez-toc-link:hover::before {
        transform: translateY(-52%);
    }

}
/* =========================================================
   CATEGORY SEO CONTENT
========================================================= */

.child-blog-cat-seo-content {
    width: 100%;

    margin: 25px 0;

    font-size: 16px;
    line-height: 1.7;
}


/* Content trên */
.child-blog-cat-top-content {
    margin-bottom: 30px;
}


/* Content dưới */
.child-blog-cat-bottom-content {
    margin-top: 35px;
}


/* Heading */
.child-blog-cat-seo-content h2,
.child-blog-cat-seo-content h3 {
    margin-top: 25px;
    margin-bottom: 12px;
}


/* Paragraph */
.child-blog-cat-seo-content p {
    margin-bottom: 14px;
}


/* Image */
.child-blog-cat-seo-content img {
    max-width: 100%;
    height: auto;

    border-radius: 8px;
}


/* Table */
.child-blog-cat-seo-content table {
    width: 100%;

    margin: 20px 0;

    border-collapse: collapse;
}

.child-blog-cat-seo-content table th,
.child-blog-cat-seo-content table td {
    padding: 8px;

    border: 1px solid #ddd;
}