@media screen and (min-width: 992px) {
    #header {
        position: -webkit-sticky !important;
        position: sticky !important;
        top: 0 !important;
        z-index: 99999 !important;
        background-color: #ffffff !important; 
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08) !important;
        width: 100% !important;
        -webkit-transform: translateZ(0); 
    }
    
    body.admin-bar #header {
        top: 32px !important;
    }
}

.scroll-to-fixed-spacer {
    display: none !important;
    height: 0 !important;
}
@media screen and (max-width: 390px) {
    .m-col-left { width: 44%; } /* Thu nhỏ cột trái */
    .m-col-right { width: 49%; } /* Tăng cột phải để vừa chữ */
    
    .m-btn-branch {
        font-size: 10px !important;
        padding: 6px 4px !important;
    }
    
    .m-col-right .m-btn {
        font-size: 9px !important;
        min-height: 44px;
        padding: 5px 1px !important;
    }
    
    .m-search-icon-trigger {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }
}

.mobile-main-menu {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
    background: #121b27;
}

.mobile-main-menu li {
    border-bottom: 1px solid #1c2b3e !important;
    position: relative;
    margin: 0 !important;
    padding: 0 !important;
}

/* Các mục menu cấp 1 */
.mobile-main-menu li a {
    display: block !important;
    padding: 14px 20px !important;
    color: #ffffff !important;
    font-size: 14px !important;
    font-weight: bold !important;
    text-decoration: none !important;
    text-transform: uppercase;
    transition: all 0.2s ease;
}

/* Đổi màu vàng khi bấm/chạm */
.mobile-main-menu li a:active,
.mobile-main-menu li a:hover {
    color: #f5bc18 !important;
    background-color: #1a2636 !important;
}

.mobile-main-menu li ul.sub-menu {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
    background-color: #0b111a !important;
    border-top: 1px solid #1c2b3e;
}

.mobile-main-menu li ul.sub-menu li a {
    padding: 12px 20px 12px 35px !important; /* Thụt lề 35px */
    font-size: 13px !important;
    font-weight: normal !important;
    color: #d1d5db !important;
    text-transform: none;
}

/* Menu cấp 3 (nếu có) thụt sâu hơn nữa */
.mobile-main-menu li ul.sub-menu li ul.sub-menu li a {
    padding-left: 50px !important;
}

.mobile-main-menu li ul.sub-menu {
    display: none; 
}

.mobile-main-menu li.menu-item-has-children > a {
    position: relative;
    padding-right: 50px !important; 
}

/* 3. Nút bấm mũi tên xổ xuống */
.m-toggle-sub {
    position: absolute;
    top: 0;
    right: 0;
    width: 50px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    border-left: 1px solid #1c2b3e; /* Vạch ngăn cách với chữ */
    cursor: pointer;
    z-index: 10;
}

.m-toggle-sub i {
    font-size: 18px;
    color: #ffffff;
    transition: transform 0.3s ease;
}

/* Đổi màu và xoay mũi tên khi menu đang mở */
.mobile-main-menu li.menu-item-has-children.open-sub > a > .m-toggle-sub i {
    transform: rotate(180deg);
    color: #f5bc18;
}
@media (max-width: 768px) {
    .list_cate.list_cate_ctrinh .nav-tabs {
        flex-wrap: wrap; /* Bẻ dòng trên mobile */
    }
    .list_cate.list_cate_ctrinh .nav-tabs > li {
        flex: 0 0 50%; /* Chia thành 2 cột vuông vắn */
        border-bottom: 1px solid #eaeaea;
    }
    .list_cate.list_cate_ctrinh .nav-tabs > li:nth-child(2n) {
        border-right: none;
    }
    .list_cate.list_cate_ctrinh .nav-tabs > li:nth-last-child(-n+2) {
        border-bottom: none;
    }

    .list_cate.list_cate_ctrinh .nav-tabs > li > a {
        border-radius: 0 !important;
        padding: 10px !important;
    }
   
    .list_cate.list_cate_ctrinh .img_cate {
        display: none !important;
    }
}
@media (max-width: 991px) {
    .m-header-main-layout {
        display: flex;
        justify-content: space-between;
        align-items: stretch; 
        padding-bottom: 8px;
    }

    .m-col-left {
        width: 70%; 
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        gap: 12px;
    }

    .m-col-left .mobile-logo img {
        max-width: 100%;
        height: auto;
    }

    .m-action-bottom {
        display: flex;
        align-items: center;
        gap: 6px;
    }

    .m-btn-branch {
        background-color: #f5bc18 !important;
        color: #121b27 !important;
        font-size: 12px !important;
        font-weight: bold !important;
        padding: 7px 10px !important;
        border-radius: 20px !important;
        text-align: center;
        text-decoration: none !important;
        flex-grow: 1; 
        white-space: nowrap;
        border: 1px solid #f5bc18;
    }

    .m-search-icon-trigger {
        width: 32px;
        height: 32px;
        background-color: #f5bc18;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        color: #121b27;
        cursor: pointer;
        flex-shrink: 0;
        font-size: 14px;
    }

    /* 3. Cột phải (Chiếm 44% màn hình): Grid 4 nút */
    .m-col-right {
        width: 48%;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 5px;
    }

    /* Cấu hình chung cho 4 nút bên phải */
    .m-col-right .m-btn {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 7px 2px !important;
        font-size: 10px !important;
        font-weight: bold !important;
        border-radius: 6px !important;
        text-align: center;
        text-decoration: none !important;
        min-height: 48px;
        gap: 4px;
    }

    .m-col-right .m-btn i {
        font-size: 14px;
    }

    .mobile-search-dropdown {
        padding: 0 0 10px 0;
        width: 100%;
    }

    
	.mobile-logo a img{
		padding-top:6px
	}
}
	.mobile .mobile-header-v2 .container-fluid{
		padding-top: 8px
	}
@media screen and (max-width: 991px) {
    #single-project.hethong_list,
    #single-project.hethong_list .slider_hethong,
    #single-project.hethong_list .owl-carousel,
    #single-project.hethong_list .owl-wrapper-outer,
    #single-project.hethong_list .owl-wrapper,
    #single-project.hethong_list .owl-item {
        display: block !important;
        width: 100% !important;
        position: static !important;
        transform: none !important; 
        height: auto !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    #single-project.hethong_list .hethong_item {
        display: block !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    #single-project.hethong_list .item {
        display: block !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding: 30px !important; /* Khoảng thở 30px theo yêu cầu */
        margin-bottom: 40px !important; /* Đẩy cách khối bên dưới ra xa */
        border-bottom: none !important; /* Xóa đường kẻ ngang dính chùm */
    }

    #single-project.hethong_list .item .img {
        width: 100% !important;
        height: 0 !important; /* Triệt tiêu chiều cao tự do */
        padding-bottom: 100% !important; /* Ép chiều cao = 100% chiều rộng */
        border-radius: 50% !important; /* Bo tròn hoàn toàn */
        position: relative !important; /* Dùng để giữ tấm ảnh con bên trong */
        overflow: hidden !important;
        margin: 0 auto !important;
        display: block !important;
    }

    #single-project.hethong_list .item .img img {
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important; /* Cắt ảnh lấp đầy khung */
        object-position: center !important;
    }

    #single-project.hethong_list .item h2 {
        margin: 20px 0 0 0 !important;
        text-align: center !important;
        font-size: 18px !important;
        line-height: 1.4 !important;
        display: block !important;
        word-break: break-word !important;
    }
}
@media screen and (max-width: 991px) {
    .col-xs-6 .item .img {
        width: 100% !important;
        aspect-ratio: 1 / 1 !important;
        padding-top: 0 !important; 
        height: auto !important;
        overflow: hidden !important;
        position: relative !important;
    }

    .col-xs-6 .item .img > a,
    .col-xs-6 .item .img .img-inner,
    .col-xs-6 .item .img .image-cover {
        display: block !important;
        width: 100% !important;
        height: 100% !important;
        padding-top: 0 !important;
        margin: 0 !important;
    }

    .col-xs-6 .item .img img {
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
        object-position: center !important;
    }
}

.m-action-bottom {
    display: flex;
    align-items: center;
    gap: 8px; /* Khoảng cách giữa các ô */
    flex-wrap: nowrap;
}

/* 2. Thu nhỏ nút Các chi nhánh */
.m-btn-branch.m-shrink {
    padding: 6px 12px !important;
    font-size: 13px !important;
    height: auto !important;
    line-height: normal !important;
}

/* 3. Thu nhỏ Icon Tìm kiếm */
.m-search-icon-trigger.m-shrink-icon {
    width: 32px !important;
    height: 32px !important;
    line-height: 32px !important;
    font-size: 14px !important;
}

/* 4. Cấu trúc Dropdown */
.m-lang-currency-dropdown {
    position: relative;
    display: inline-block;
    font-family: Arial, sans-serif;
}

/* Nút hiển thị cờ VN mặc định */
.m-lang-trigger {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #fff; /* Chỉnh màu chữ cho phù hợp với nền của bạn */
    padding-top: 5px;
	  padding-bottom:5px;
    cursor: pointer;
    font-size: 13px;
    font-weight: bold;
}
.m-lang-trigger img {
    width: 20px;
    height: auto;
    box-shadow: 0 0 2px rgba(0,0,0,0.3);
}

/* 5. Menu xổ xuống ẩn đi mặc định */
.m-lang-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #fff;
    color: #333;
    min-width: 240px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    border-radius: 4px;
    padding: 15px;
    z-index: 9999;
    text-align: left;
}

/* Tạo hình mũi tên trỏ lên (Giống Amazon) */
.m-lang-menu::before {
    content: "";
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    border-width: 0 8px 8px 8px;
    border-style: solid;
    border-color: transparent transparent #fff transparent;
}

/* 7. Style bên trong Menu Dropdown */
.menu-section strong {
    display: block;
    font-size: 13px;
    margin-bottom: 10px;
    color: #333;
}
.menu-section label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    margin-bottom: 8px;
    cursor: pointer;
    font-weight: normal;
    color: #555;
}
.menu-section input[type="radio"] {
    margin: 0;
    cursor: pointer;
    accent-color: #f0c14b; /* Màu cam vàng giống Amazon */
}
.menu-divider {
    border: 0;
    border-top: 1px solid #e0e0e0;
    margin: 12px 0;
}
@media screen and (max-width: 991px) {
    /* 1. Kích hoạt Flexbox cho hộp bài viết để tự động dãn đều */
    .col-xs-6 .item {
        display: flex !important;
        flex-direction: column !important;
        height: 100% !important;
        background: #fff !important; /* Nền trắng cho gọn gàng */
    }
    
    .col-xs-6 .item .info_post_cn {
        flex-grow: 1 !important; /* Ép phần thông tin tự động đẩy dãn ra */
        display: flex !important;
        flex-direction: column !important;
        padding: 10px 8px !important; /* Đệm lề cho chữ không sát mép */
    }

    /* 2. Cố định chiều cao thẻ H2 (Chính xác = 3 dòng) */
    .col-xs-6 .item .info_post_cn h2 {
        margin: 0 0 10px 0 !important;
        padding: 0 !important;
        /* Công thức: line-height (20px) * 3 dòng = 60px */
        height: 60px !important;      
        min-height: 60px !important;
        max-height: 60px !important;
        overflow: hidden !important;
    }

    .col-xs-6 .item .info_post_cn h2 a {
        display: -webkit-box !important;
        -webkit-line-clamp: 3 !important; /* Số dòng tối đa */
        -webkit-box-orient: vertical !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        white-space: normal !important;
        
        font-size: 14px !important; 
        line-height: 20px !important; /* Chiều cao 1 dòng = 20px */
    }
}
@media screen and (max-width: 991px) {
    #single-project .row,
    #single-project [class*="col-"],
    #single-project .item,
    #single-project .post_big,
    .congtrinh_index .row,
    .congtrinh_index [class*="col-"],
    .congtrinh_index .post_big {
        display: block !important;
        height: auto !important;
        min-height: 0 !important;
        max-height: none !important;
        flex: none !important;
    }

    #single-project .post_big h2,
    #single-project .post_big h2 a,
    .congtrinh_index .post_big h2,
    .congtrinh_index .post_big h2 a {
        min-height: 0 !important;
        height: auto !important;
        margin-top: 10px !important;
        margin-bottom: 6px !important;
    }

    #single-project .duan_meta,
    .congtrinh_index .duan_meta {
        margin-top: 0 !important;
        padding-top: 0 !important;
        height: auto !important;
    }
} 
@media screen and (max-width: 991px) {
    #single-project .col-md-4 {
        margin-bottom: 25px !important; /* Đẩy các bài viết cách nhau 25px */
    }

    #single-project .col-md-4:last-child {
        margin-bottom: 0 !important;
    }
}

@media screen and (max-width: 991px) {
    html, body, #wrapper, #main {
        padding-top: 0 !important;
        margin-top: 0 !important;
        background-color: #ffffff !important;
    }
    .mobile-header-v2 {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        z-index: 9998 !important;
        background-color: #121b27 !important;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35) !important;
    }
}
@media (max-width: 480px) {
    .video_item_sub .thumb_sub,
    .item_scroll_cn .thumb_box {
        width: 95px !important;
        min-width: 95px !important;
        height: 65px !important;
    }
}
@media screen and (max-width: 991px) {
    html, body {
        background-color: #ffffff !important;
    }
    #header, header, .header, .mobile-header-v2 {
        background-color: #121b27 !important;
        height: auto !important;
        min-height: 0 !important;
        margin-top: 0 !important;
        padding-top: 0 !important;
    }
}
@media screen and (max-width: 991px) {
    .desktop, 
    div.desktop, 
    .desktop.top, 
    .desktop.header, 
    .menu-desktop,
    header .desktop {
        display: none !important;
        height: 0 !important;
        max-height: 0 !important;
        padding: 0 !important;
        margin: 0 !important;
        overflow: hidden !important;
    }
    .mobile,
    .mobile-header-v2 {
        display: block !important;
    }
}
@media screen and (min-width: 992px) {
    .desktop,
    header .desktop {
        display: block !important;
    }
    .mobile,
    .mobile-header-v2,
    header .mobile {
        display: none !important;
        height: 0 !important;
        padding: 0 !important;
        margin: 0 !important;
        overflow: hidden !important;
    }
}

@media screen and (max-width: 576px) {
    html, 
    body, 
    body.admin-bar, 
    #header, 
    header, 
    .mobile-header-v2 {
        margin-top: 0 !important;
        padding-top: 0 !important;
        top: 0 !important;
    }
    #wpadminbar {
        display: none !important;
    }
    .mobile-row-1 {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
    }
    .mobile-logo {
        width: 95% !important;
    }
    .mobile-logo img {
        max-width: 100% !important;
        height: auto !important;
    }
    .mobile-grid-actions {
        width: 60% !important;
        gap: 4px !important;
    }
    .m-btn {
        font-size: 9px !important;
        padding: 5px 2px !important;
        white-space: nowrap;
    }
    .mobile-row-2 {
        margin-top: 5px !important;
    }
    .m-btn-branch {
        font-size: 11px !important;
        padding: 5px 8px !important;
    }
    .mobile-search-box input {
        height: 30px !important;
        font-size: 11px !important;
    }
}