/* Begin: Dung cho cac trang khong can keo menu */
header.scrolled .header__top {
    display: none !important;
}
header#header {
    background: #fff;
}
.header--gradient .header__menu > .menu-item > .menu-link {
    color: #207d57;
}
img.logoFixed {
    display: block !important;
}
.header__main {
    padding-top: 20px !important;
    border-bottom: 1px solid #207d57;
}
.header__logo img.logoRelative {
    display: none;
}

.header.fixed .header__top {
    margin-top: 0px !important;
}

.header.fixed .header__main .header__tools {
    /* display: none !important; */
    margin-bottom: 16px;
}
/* End: Dung cho cac trang khong can keo menu */


.social-sharing-network ul {
    padding: 24px 0;
    list-style: none;
    display: flex;
    gap: 30px;
}

.icon_fb,
.icon_x,
.icon_in,
.icon_link {
    cursor: pointer;
    transition: transform 0.2s ease;
}

.icon_fb:hover,
.icon_x:hover,
.icon_in:hover,
.icon_link:hover {
    transform: scale(1.1);
}

.banner {
    margin-top: 132px;
}
/* Nội dung */
.post-text {
    padding-right: 50px;
}

h2 {
    font-size: 18px;
}

.post-text h1 {
    color: var(--mLOGO, #207d57);
    font-feature-settings: "liga" off, "clig" off;
    font-family: Montserrat;
    font-size: 20px;
    font-style: normal;
    font-weight: 600;
    line-height: normal;
    letter-spacing: -0.5px;
}

/* Mục lục */
.toc-container {
    width: 100%;
    border: 2px solid #c2c5c1;
    border-radius: 8px;
    overflow: hidden;
    font-family: Montserrat;
    color: #1c7d56;
    background: rgba(35, 127, 87, 0.06);
    padding: 20px;
}

.toc-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px 0px 20px;
    margin-bottom: 8px;
    cursor: pointer;
}

.toc-title {
    display: flex;
    align-items: center;
}

.toc-title svg {
    font-size: 18px;
    margin-right: 10px;
}

.toc-header h3 {
    margin: 0;
    font-size: 22px;
    color: #1c7d56;
    font-weight: 700;
    margin-left: 10px;
}

.toc-list {
    list-style-type: none !important;
}

.toc-list li {
    position: relative;
    padding-left: 18px;
    margin-bottom: 8px;
}

.toc-list li::before {
    position: absolute;
    left: 0;
    color: #207d57;
    margin: 4px 0;
}

.toc-h1 {
    margin-left: 0;
}
.toc-h2 {
    margin-left: 25px;
}
.toc-h3 {
    margin-left: 50px;
}
.toc-h4 {
    margin-left: 75px;
}
.toc-h5 {
    margin-left: 100px;
}

.toc-list a {
    text-decoration: none;
    display: inline-block;
    padding: 3px 0;
    color: #207d57;
    font-size: 14px;
    font-weight: 400;
}

.toc-list a:hover {
    color: #207d57;
}

#post-content {
    margin-top: 24px;
}

/* Sidebar khối 1 */
.contact-card-sidebar {
    height: 500px;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.contact-card-sidebar .background-image {
    background-image: url("your-background-image-path.jpg");
    background-size: cover;
    background-position: center;
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
}

.overlay-sidebar {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        222deg,
        rgba(0, 20, 12, 0.7) 12.31%,
        #00140c 98.76%
    );
}

.content-sidebar {
    position: relative;
    z-index: 1;
    color: white;
    padding: 30px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    box-sizing: border-box;
}

.logo-sidebar {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    margin-top: 20px;
}

.logo-sidebar img {
    width: 150px;
}

.logo-sidebar p {
    font-size: 12px;
    margin-top: 5px;
    color: #ccc;
}

.content-sidebar h2 {
    font-size: 28px;
    font-weight: 700;
    margin-top: 0;
}

.info-item-sidebar {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    font-size: 14px;
}

.icon-circle-sidebar {
    width: 40px;
    height: 40px;
    min-width: 40px;
    min-height: 40px;
    border-radius: 15%;
    background-color: rgba(255, 255, 255, 0.2);
    display: flex;
    justify-content: center;
    align-items: center;
    margin-right: 15px;
}

.icon-circle-sidebar svg {
    width: 24px;
    height: 24px;
    display: block;
}

.info-item-sidebar span {
    word-break: break-word;
    overflow-wrap: break-word;
}

.contact-button-sidebar {
    display: block;
    margin: 0 auto;
    width: 50%;
    padding: 15px;
    border: none;
    border-radius: 8px;
    background: var(--button, linear-gradient(270deg, #70bf54 0%, #1c7d56 80%));
    color: white;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s, box-shadow 0.2s;
    margin-bottom: 30px;
    text-align: center;
}

.contact-button-sidebar:hover {
    transform: translateY(-2px);
    background: linear-gradient(to right, #008000, #aadd00);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4);
}

/* Sidebar khối 2 */
.service-menu-sidebar {
    margin-top: 50px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    font-family: Arial, sans-serif;
}

.menu-header-sidebar {
    background-color: #1c7d56;
    color: white;
    padding: 21px 30px 5px;
    font-weight: 600;
    font-size: 18px;
}

.menu-item-sidebar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 21px 30px 10px;
    background-color: white;
    position: relative;
    border-bottom: none;
    cursor: pointer;
    transition: background-color 0.2s ease;
    font-size: 16px;
    font-weight: 500;
}

.menu-item-sidebar::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 30px;
    right: 30px;
    height: 2px;
    background-color: #f0f0f0;
}

.menu-item-sidebar:last-child::after {
    display: none;
}

.menu-item-sidebar:last-child {
    border-bottom: none;
}

.menu-item-sidebar:hover {
    background-color: #f8f8f8;
}

.menu-item-sidebar p {
    margin: 0;
    color: #333;
}

.menu-item-sidebar i {
    color: #999;
    font-size: 14px;
}

/* list tin */

.section-title {
    margin: 30px 0px;
    color: var(--mLOGO, #207d57);
    font-family: Montserrat;
    font-size: 30px;
    font-style: normal;
    font-weight: 700;
    line-height: normal;
    letter-spacing: -1px;
}

.related-posts {
    width: 100%;
    background: #fff;
}

.card-list {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    margin-top: 70px;
}

.card {
    flex: 1 1 calc(25% - 20px);
    min-width: 260px;
    border: 1px solid #ddd;
    border-radius: 6px;
    overflow: hidden;
    transition: all 0.5s ease; /* mượt */
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    /* max-width: calc(25% - 20px); */
    min-height: 470px;
}

.card:hover {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    transform: translateY(-4px);
}

.card-image img {
    width: 100%;
    align-self: stretch;
    height: auto;
    border-top-left-radius: 6px;
    border-top-right-radius: 6px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.card-content {
    display: flex;
    padding: 24px;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    align-self: stretch;
    background: #fff;
}

.card-content a {
    text-align: justify;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: normal;
    line-height: 1.4em;
    max-height: calc(1.4em * 4);
}

.card-content p {
    text-align: left;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: normal;
    line-height: 1.4em;
    max-height: calc(1.4em * 3);
}

.card-title {
    color: var(--mLOGO, #207d57);
    font-feature-settings: "liga" off, "clig" off;
    font-family: Montserrat;
    font-size: 16px;
    font-style: normal;
    font-weight: 700;
    line-height: normal;
    letter-spacing: -0.5px;
}

.card-desc {
    margin-bottom: 10px;
    line-height: 1.4em;
    color: var(--mLOGO, #207d57);
    font-size: 16px;
    font-weight: 400;
}

.card-link {
    display: inline-block;
    color: #237f57;
    font-size: 16px;
    text-decoration: none;
}

.card-date {
    margin-top: 10px;
    font-size: 14px;
    font-weight: 700;
    color: var(--Mlogo, #207d57);
}

.btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 30px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: 0.3s;
}

/* Khối cuối trang */
.banner-section {
    position: relative;
    width: 100%;
    height: 620px;
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    display: flex;
    align-items: flex-end;
    margin-top: 70px;
}

.banner-section::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        85deg,
        rgba(0, 0, 0, 0.7) 0%,
        rgba(0, 0, 0, 0) 52.05%
    );
}

.banner-section .banner-box-content {
    position: relative;
    left: 240px;
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
    max-width: 100%;
    z-index: 1;
    bottom: 250px;
}

.banner-section .banner-box-content h3 {
    color: #fff;
    font-family: "Montserrat", sans-serif;
    font-size: 34px;
    font-weight: 600;
    margin: 0;
}

.banner-section .banner-box-content p {
    margin: 0px;
}

/* Nút */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: 0.3s;
}

.btn-outline {
    border: 1px solid #fff;
    background: transparent;
    color: #fff;
}

.btn-outline:hover {
    background: #fff;
    color: #000;
}

.btn-green {
    background: #207d57;
    color: #fff;
    border: none;
}

.btn-green:hover {
    background: #145c3e;
}

.toc-floating-btn {
    position: fixed;
    bottom: 40px;
    left: 20px;
    width: 48px;
    height: 48px;
    background: #ffffff;
    border: 2px solid #207D57;
    border-radius: 6px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0;
    visibility: hidden;
    z-index: 999;
}
.toc-floating-btn:hover {
    background-color: #207D57;
}
.toc-floating-btn:hover svg path {
    fill: #fff;
}
.toc-floating-btn.show {
    opacity: 1;
    visibility: visible;
}

/* === Begin: Muc luc popup === */
.toc-popup {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 2000;
    pointer-events: none;
}

.toc-popup.show {
    display: block;
}

.toc-popup-content {
    position: fixed;
    right: 20px;
    bottom: 20px;
    top: 20px;
    background: #fff;
    max-width: 350px;
    width: 90%;
    overflow-y: auto;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
    pointer-events: auto;
    animation: slideUp 0.3s ease;
}

.toc-popup-content h3 {
    margin-top: 0;
    color: #207D57;
    font-weight: 700;
    text-align: center;
    font-size: 18px;
}

.toc-popup-close {
    position: absolute;
    top: 10px;
    right: 12px;
    background: transparent;
    border: none;
    font-size: 22px;
    cursor: pointer;
}

.popup-toc-list {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.popup-toc-list li {
    margin: 6px 0;
}

.popup-toc-list .toc-h1 a { font-weight: 600; margin-left: 0; font-size: 14px; }
.popup-toc-list .toc-h2 a { font-weight: 400; margin-left: 10px; font-size: 14px; }
.popup-toc-list .toc-h3 a { font-weight: 400; margin-left: 20px; font-size: 14px; }
.popup-toc-list .toc-h4 a { font-weight: 400; margin-left: 30px; font-size: 14px; }
.popup-toc-list .toc-h5 a { font-weight: 400; margin-left: 40px; font-size: 14px; }

.popup-toc-list a {
    flex: 1;
    color: #207D57;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.2s ease;
    display: inline-block;
    padding: 6px 10px;
}

.popup-toc-list a:hover {
    background-color: #e8f6ef;
}

.popup-toc-list a.active {
    background-color: #207D57;
    color: #fff !important;
}

.toc-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
}

.toggle-btn {
    font-size: 12px;
    color: #207D57;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.toggle-btn i {
    transition: transform 0.3s ease;
}

.toggle-btn.collapsed i {
    transform: rotate(90deg);
}

.toggle-btn.expanded i {
    transform: rotate(180deg);
}

.sub-list {
    display: none;
    list-style: none;
    padding-left: 0 !important;
}

@keyframes slideUp {
    from { transform: translateY(30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}
/* === End: Muc luc popup === */

/* Tablet (<= 991px) */
@media (max-width: 991px) {
    .post-text {
        padding-right: 20px;
    }

    .toc-header h3 {
        font-size: 18px;
    }

    .toc-list a {
        font-size: 14px;
    }

    /* Khối cuối trang */
    .banner-section {
        height: 480px;
    }
    .banner-section .banner-box-content {
        left: 60px;
        bottom: 180px;
        max-width: 80%;
    }
    .banner-section .banner-box-content h3 {
        font-size: 26px;
    }
    .btn {
        padding: 10px 20px;
        font-size: 15px;
    }
    /* Khối cuối trang */
}

/* Mobile (<= 575px) */
@media (max-width: 575px) {
    .toc-list {
        padding-left: 20px;
    }
    .toc-list li {
        padding-left: 0px;
    }
    .post-text {
        padding-right: 0;
    }

    .toc-container {
        margin: 20px 0;
        font-size: 14px;
        padding: 0;
    }

    .toc-header {
        padding: 10px 15px;
    }

    .toc-header h3 {
        font-size: 18px;
    }

    .toc-title svg {
        width: 18px;
        height: 18px;
        margin-right: 6px;
    }

    .toc-list a {
        font-size: 13px;
        padding: 2px 0;
    }

    #post-content {
        margin-top: 16px;
    }
    /* Khối cuối trang */
    .banner-section {
        height: auto;
        min-height: 360px;
        display: flex;
        background-position: top center;
        align-items: center;
        justify-content: center;
        padding: 20px;
    }
    .banner-section .banner-box-content {
        position: relative;
        left: 0;
        bottom: 0;
        text-align: center;
        align-items: center;
        gap: 16px;
        max-width: 100%;
    }
    .banner-section .banner-box-content h3 {
        font-size: 18px;
        line-height: 1.4;
    }
    .btn {
        width: 100%;
        max-width: 280px;
        text-align: center;
        font-size: 10px;
    }
    /* Khối cuối trang */
}
