/* Ẩn menu mobile trên màn hình mặc định (Desktop) */
.menu-bar-mobile {
    display: none;
}

@media screen and (max-width: 1280px) {

}

@media screen and (max-width: 1177px) {
    /* CHỈ ẩn Menu Desktop (SmartMenus và nút Hamburger gốc). 
       KHÔNG ẩn .nav_header vì thẻ này đang là thẻ cha chứa cả khối HTML của file nav.cshtml */
    #main-menu,
    .main-menu-btn {
        display: none !important;
    }
    
    .nav_header {
        background: transparent !important;
    }

    /* ------- RESPONSIVE HEADER TOP CHO MOBILE ------- */
    
    /* 1. Reset lại chiều cao và padding để gọn gàng hơn trên Tablet/Mobile */
    .menu-bar .header_top .nav-brand {
        padding: 5px 0;
        justify-content: center;
        width: 100%;
    }

    /* 2. Cỡ chuẩn cho màn 991px - 769px (Tablet ngang) */
    .menu-bar .header_top .nav-brand img {
        width: 76px;
        height: 76px;
        max-height: 76px;
    }

    .menu-bar .header_top .nav-brand .logocontent .toplogocontent {
        font-size: 20px;
        line-height: 1.2;
    }

    .menu-bar .header_top .nav-brand .logocontent .bottomlogocontent {
        font-size: 16px;
        line-height: 1.2;
    }
    
    /* 4. Giữ lại khung trang trí nền chéo bên trái theo yêu cầu, chỉ ẩn khung bên phải để không bị chật */
    .menu-bar .header_top::before {
        width: 150px;
        height: 90px;
        background-size: contain;
    }

    /* 5. Gói gọn dải màu Gradient animation lại cho nhẹ mắt */
    .bg-gradient-anim {
        background: linear-gradient(90deg, #FFF5CC 0%, #FFFCF7 50%, #FFF5CC 100%);
    }

    /* 6. Tổ chức lại cụm Ngày giờ, ngôn ngữ, đăng nhập dàn trải mượt mà */
    .menu-bar .header_top .nav_top_option {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 8px 16px;
        width: 100%;
        gap: 10px;
    }
    
    .menu-bar .header_top .nav_top_option>img {
        display: none; /* Giấu các ảnh trang trí phụ để tránh vỡ góc */
    }

    .menu-bar .header_top .nav-action ul {
        display: flex;
        align-items: center;
        gap: 12px;
        margin: 0;
    }
    
    .login a {
        font-size: 14px;
        display: flex;
        align-items: center;
        gap: 4px;
    }

    /* ------- RESPONSIVE FOOTER CHO MOBILE ------- */
    
    /* 1. Tránh để nội dung Footer bị che lấp bởi thanh Bottom Navigation */
    footer .main-footer-copyright {
        padding-bottom: 85px !important; 
    }

    footer .main-footer-information {
        padding: 50px 0;
    }
    
    /* 2. Tạo khoảng giãn cách (margin) giữa các khối (Thông tin, Danh mục, Bản đồ) khi chúng bị rớt xuống thành từng hàng ngang */
    .main-footer-information .row > div {
        margin-bottom: 16px;
    }

    /* 3. Bản đồ trên Desktop đang ăn theo chiều cao cột, trên Mobile rớt cột nên cần fix cứng chiều cao để không bị co nhỏ tàng hình */
    .footer-map {
        height: 250px;
        margin-bottom: 0 !important; /* Xóa margin khối cuối cùng */
    }
    .footer-map iframe {
        height: 100% !important;
    }

    /* 4. Tổ chức lại cụm Mạng xã hội, Liên kết website và Thống kê truy cập dóng thẳng lề trái khi nằm trên Mobile */
    .footer-contact,
    .onlinecounter-statistics {
        justify-content: flex-start !important;
        flex-wrap: wrap;
    }
    
    .footer-related {
        margin-top: 10px; /* Cách vùng Copyright một khoảng cho thoáng */
        display: none;
    }
}

@media screen and (max-width: 991px) {
    footer .main-footer-information { padding: 40px 0; }
}

@media screen and (max-width: 768px) {
    /* Tablet dọc */
    .menu-bar .header_top::before { width: 130px; height: 78px; }
    .menu-bar .header_top::after { width: 179px; height: 78px; }
    .menu-bar .header_top .nav-brand img { width: 68px; height: 68px; max-height: 68px; }
    .menu-bar .header_top .nav-brand .logocontent .toplogocontent { font-size: 18px; }
    .menu-bar .header_top .nav-brand .logocontent .bottomlogocontent { font-size: 15px; }

    .menu-bar .nav-information {
        display: none;
    }

    .menu-bar .header_top .nav-brand {
        justify-content: flex-start;
    }

    footer .main-footer-information { padding: 30px 0; }
}

@media screen and (max-width: 576px) {
    /* Điện thoại ngang / màn hình vừa */

    /* ------- FOOTER RESPONSIVE TEXT SIZE ------- */
    .info-title { font-size: 18px; }
    
    .info-text, 
    .footer-category .list_chuyenmuc li a, 
    footer .main-footer-copyright .footer-copyright * { 
        font-size: 14px !important; 
        line-height: 22px;
    }

    /* Ép khung Liên kết website dài 100% cực đẹp */
    .Lienket_website .select2 .select2-selection {
        width: 100% !important; 
    }

    /* Rớt dòng bộ đếm số người thống kê truy cập */
    .onlinecounter-statistics {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
        margin-top: 15px;
    }
    .onlinecounter-statistics .hitcounter_totalonline {
        margin-right: 0 !important;
    }
    .onlinecounter-statistics .hitcounter_totalonline span:last-child {
        margin-right: 0 !important;
    }
    .onlinecounter-statistics .hitcounter_totalonline::after {
        display: none !important; /* Giấu dải chia dọc | */
    }

    footer .main-footer-information { padding: 20px 0; }

    .menu-bar .header_top::after { width: 151px; height: 66px; opacity: 0.8; }
    .menu-bar .header_top::before { width: 110px; height: 66px; opacity: 0.8; }
    .menu-bar .header_top .nav_top_option { padding: 6px 10px; font-size: 14px; }
    .menu-bar .header_top .nav-brand img { width: 60px; height: 60px; max-height: 60px; }
    .menu-bar .header_top .nav-brand .logocontent .toplogocontent { font-size: 16px; }
    .menu-bar .header_top .nav-brand .logocontent .bottomlogocontent { font-size: 14px; }
    .login a { font-size: 13px; }
}

@media screen and (max-width: 460px) {
    /* Điện thoại tiêu chuẩn */

    .menu-bar .header_top::before { width: 90px; height: 54px; opacity: 0.5; }
    .menu-bar .header_top::after { width: 124px; height: 54px; opacity: 0.5; }
    .menu-bar .header_top .nav_top_option { font-size: 12px; gap: 6px; } 
    .menu-bar .header_top .nav-brand img { width: 54px; height: 54px; max-height: 54px; }
    .menu-bar .header_top .nav-brand .logocontent .toplogocontent { font-size: 15px; }
    .menu-bar .header_top .nav-brand .logocontent .bottomlogocontent { font-size: 13px; }
}

@media screen and (max-width: 420px) {
    /* Màn iPhone cũ */
}

@media screen and (max-width: 380px) {

    .menu-bar .header_top::after { width: 96px; height: 42px; opacity: 0.3; }
    .menu-bar .header_top::before { width: 70px; height: 42px; opacity: 0.3; }
    .menu-bar .header_top .nav-brand img { width: 56px; height: 56px; max-height: 56px; }
    .menu-bar .header_top .nav-brand .logocontent .toplogocontent { font-size: 14px; }
    .menu-bar .header_top .nav-brand .logocontent .bottomlogocontent { font-size: 12px; }
}

@media screen and (max-width: 320px) {
    /* Các máy feature phone thu nhỏ chót */
    .menu-bar .header_top::before,
    .menu-bar .header_top::after { display: none !important; } /* Màn quá nhỏ ẩn luôn tránh mờ chéo chữ */
    .menu-bar .header_top .nav-brand img { width: 42px; height: 42px; max-height: 42px; }
    .menu-bar .header_top .nav-brand .logocontent .toplogocontent { font-size: 13px; }
    .menu-bar .header_top .nav-brand .logocontent .bottomlogocontent { font-size: 11px; }
}

@media screen and (max-width: 280px) {

}

