/* Min-width */
@media (min-width: 576px) {}

@media (min-width: 768px) {

    .container,
    .container-sm {
        max-width: 100%;
    }
}

@media (min-width: 992px) {

    .vungtam-home .title-main,
    .vungtam-home .desc { max-width: 544px;}

    /* Dự án nổi bật: bật accordion kéo ngang, panel đóng xoay chữ dọc (Figma 2008:330) */
    .duan-home .duan-gallery { flex-direction: row; flex-wrap: nowrap; height: clamp(420px, 45vw, 650px);}
    .duan-home .duan-item { width: auto; flex: 1 1 0; min-width: 0; transition: flex .75s cubic-bezier(.22, 1, .36, 1);}
    .duan-home .duan-item.active { flex: 3 1 0;}
    .duan-home .duan-item .info { right: auto; width: max-content; max-width: calc(clamp(420px, 45vw, 650px) - 80px); padding-left: 0; transform-origin: left bottom; transform: rotate(-90deg) translateY(100%); border-left-color: transparent; transition: transform .75s cubic-bezier(.22, 1, .36, 1), border-color .3s, padding-left .75s cubic-bezier(.22, 1, .36, 1);}
    .duan-home .duan-item.active .info {transform: rotate(0deg) translateY(0); }
    .duan-home .duan-item .more { opacity: 0; transition: opacity .4s ease-in-out;}
    .duan-home .duan-item.active .more { opacity: 1;}

    /* Tại sao chọn chúng tôi: bật vòng cung bằng mặt nạ SVG lấy nguyên path Figma (node 43:873).
       aspect-ratio đặt ở ĐÂY để mặt nạ 1440x471 phủ đúng tỉ lệ và 5 ảnh cao bằng nhau — không phải
       aspect-ratio ăn theo tỉ lệ thumb mà coding-rules cấm. Khe hở giữa các ảnh do mặt nạ khoét, nên
       cột phải sát nhau (padding 0), bề rộng --w in từ template cho khớp tâm khe. */
    .taisao-home .taisao-gallery { aspect-ratio: 1440 / 471; -webkit-mask: url(../images/mask-taisao.svg) center / 100% 100% no-repeat; mask: url(../images/mask-taisao.svg) center / 100% 100% no-repeat;}
    .taisao-home .taisao-gallery .col { width: var(--w); padding: 0;}
    /* Chuỗi height:100% phải liền mạch .image -> a -> img, đứt 1 mắt là ảnh tụt về chiều cao tự nhiên */
    .taisao-home .taisao-gallery .image,
    .taisao-home .taisao-gallery .image a { height: 100%;}
    .taisao-home .taisao-gallery img { height: 100%;}

    /* Chi tiết dịch vụ: sidebar dự án đi theo khi cuộn, chừa chỗ cho header fixed */
    .dvdetail-side { position: sticky; top: 90px;}

    /* Gallery chi tiết dịch vụ: cột thumb dọc bên TRÁI, ảnh lớn bên phải.
       Cột rộng 116px = thumb 106px + padding 5px mỗi bên của .item */
    /* Core khai .gallery-pro-detail{flex-wrap:wrap} — để nguyên thì ảnh lớn rớt xuống dòng 2 */
    .gallery-pro-detail.thumbs-left { flex-wrap: nowrap;}
    .gallery-pro-detail.thumbs-left .gallery-pro-detail-left { width: 116px; flex: 0 0 116px; margin: 0;}
    .gallery-pro-detail.thumbs-left .slider-products { flex: 1 1 auto; width: auto; min-width: 0;}
}

@media (min-width: 1200px) {
    .category-lists .col-xl-2 {
        width: 14.28%;
    }

    .category-lists span {
        max-width: 80%;
    }
}

@media (min-width: 1400px) {
    .container {
        max-width: 1215px;
    }
}


/* Max-width */
@media (max-width: 1299.98px) {
    .header-bottom .header-ul .line {
        margin: 0px 5px;
    }

    .search-wrapper.active {
        width: 200px;
    }
}

@media (max-width: 1199.98px) {
    .menu {
        display: none;
    }

    .menu-bar-res {
        display: flex;
        align-items: center;
    }
}

@media (max-width: 991.98px) {
    /* Giới thiệu: bỏ kiểu so le, 2 ảnh về thẳng hàng. Style.css cho ảnh phải tụt 64px theo Figma nhưng
       đó là bố cục desktop, cột hẹp lại thì nhìn như bị lỗi căn lề. */
    .about-home .about-img > div:last-child { margin-top: 0;}
    .duan-home .duan-gallery { flex-wrap: wrap;}
    .duan-home .duan-item { width: calc(50% - .5rem);}
    .duan-home .duan-item .info { left: 16px; right: 12px; bottom: 20px; padding-left: 12px; border-left-width: 3px;}

    /* Giá trị cốt lõi: bỏ đường kẻ + chấm tròn. Đường kẻ ghép từ border-top của 4 cột, desktop 4 cột
       1 hàng nên liền mạch; xuống 2 cột thì đứt thành 2 đoạn, chấm tròn cũng lặp lại giữa chừng.
       Bỏ luôn min-height ép tên cao 2 dòng — nó chỉ tồn tại để đường kẻ các cột ngang bằng nhau,
       không còn đường kẻ thì nó thành khoảng trắng chết (đo được 81px trong khi chữ chỉ cao ~24px). */
    .giatri-about .desc { border-top: 0;}
    .giatri-about .desc::before { display: none;}
    .giatri-about .name { min-height: 0;}

    /* Tiêu đề section có kèm link "Xem thêm...": dưới 992px link rớt xuống dòng 2, mà vạch đậm lại neo
       theo đáy h2 (bottom:-14px) nên nó cắt ngang chữ link. Cho h2 về position:static để vạch neo theo
       cả khối .title-underline, tụt xuống đúng đường kẻ dưới cùng. */
    .title-underline > h2 { position: static;}
    .title-underline > h2::after { bottom: -5px;}

    /* Hotline header: bỏ viền đỏ khi header thu gọn còn 1 hàng, chỉ giữ chữ */
    .header-hotline { border: 0; padding-left: 0 !important; padding-right: 0 !important;}
    .header-hotline:hover { background: none;}
    .header-hotline:hover span { color: inherit;}
    .header-hotline:hover img { filter: none;}

    .header-bottom .logo {max-width:200px ;}
    .menu-wrapper:before {
        display: none;
    }

    .header-nav {
        padding: 5px 0;
    }

    .menu-wrapper {
        width: auto;
    }

    img {
        max-width: 100% !important;
        height: auto !important;
        vertical-align: top;
    }

    .header-top {
        text-align: right;
    }

    .header-top marquee {
        width: calc(100% - 150px);
        margin-right: 0px;
    }
    .px-71{padding-left: 0px;padding-right:0px;}
    .slideshow {
        width: 100%;
    }

    .footer-title {
        margin-bottom: 0px;
    }

    .visao-item {
        margin: 0px 0px 20px 0px !important;
        max-width: 100%;
    }

    #product-title {
        width: 100%;
        -webkit-line-clamp: 3;
    }

    .left-pro-detail {
        width: 400px;
    }

    .right-pro-detail {
        width: calc(100% - 415px);
        padding: 0px;
    }

    .camket-pro-detail {
        width: 100%;
    }
}

@media (max-width: 767.98px) {

    div#header {
        z-index: 1000;
        min-height: 46px;
    }

    .search-wrapper .btn {
        border-radius: 0;
        width: 36px;
    }

    .header-top marquee {
        width: calc(100%);
    }

    .search-wrapper.active {
        width: 100%;
        position: relative;
    }

    .slideshow .slider {
        width: 100%;
    }

    .title-main {
        margin-bottom: 15px;
    }

    .wrap-cauhoi {
        background: none;
    }

    .wrap-cauhoi .accordion {
        max-width: 100%;
    }

    .doitac-item {
        padding: 10px;
    }

    .wrap-newsletter .hotline {
        min-height: 135px;
        padding-left: 120px;
    }

    .wrap-newsletter .hotline span {
        font-size: 20px;
        padding-bottom: 10px;
    }

    .wrap-newsletter .hotline a {
        font-size: 35px;
        line-height: 40px;
    }

    .footer {
        padding-bottom: 50px;
    }

    .footer-ul {
        display: flex;
        flex-wrap: wrap;
        justify-content: space-between;
    }

    .footer-ul li.line {
        display: none;
    }

    .footer-ul li {
        width: 45%;
    }

    .wrap-product-list .slider-products,
    .wrap-product-list .slider-product-thumbs {
        width: 100%;
    }

    .wrap-product-list .slider-product-thumbs {
        margin-bottom: 30px;
    }

    .product-item .image,
    .product-item .info {
        width: 100%;
    }

    .footer-statistic,
    .footer-copyright {
        text-align: center;
    }

    .vanhoa-item {
        max-width: 100%;
    }

    #chuyenkhoaTabs .nav-item {
        width: 49.5%;
        margin-bottom: 3px;
    }

    #chuyenkhoaTabs .nav-link {
        font-size: 14px;
        width: 100%;
    }

    #chuyenkhoaTabs .nav-link img {
        width: 20px;
    }

    .giatri-item .info {
        min-height: auto;
    }

    .news-item .name {
        min-height: auto;
    }

    .news-item .line {
        margin-top: 0px;
    }

    .wrap-history {
        background: #f8f8f8;
    }

    .wrap-history .slider-nav,
    .wrap-history .slider-for {
        width: 100%;
    }

    /* .year-item.slick-current span {
        padding-left: 20px;
    } */

    /* .year-item.slick-current::before {
        right: auto;
        left: 0px;
    } */

    .attr-pro-detail,
    .camket-pro-detail {
        width: 100%;
    }

    .left-pro-detail {
        margin: 0px auto;
    }

    .left-pro-detail {
        width: 100%;
    }

    .right-pro-detail {
        width: 100%;
        ;
    }

    .menu-wrapper .menu-toggle {
        width: 54px;
    }

    .menu-header {
        padding: 10px;
    }

    .menu-header .btn-close-menu {
        border: 1px solid #e0e0e0;
        color: #333;
        line-height: 21px;
        padding: 7px 5px 7px 0;
        position: relative;
        text-align: right;
        width: 18px;
        height: 18px;
        border-radius: 50%;
        background-color: #6e6e6e;
    }

    .menu-header .btn-close-menu::before,
    .menu-header .btn-close-menu::after {
        content: "";
        position: absolute;
        width: 1px;
        top: 4px;
        left: 8px;
        background-color: #fff;
        height: 8px;
    }

    .menu-header .btn-close-menu::before {
        transform: rotate(45deg);
    }

    .menu-header .btn-close-menu::after {
        transform: rotate(-45deg);
    }

    .menu-dropdown {
        display: flex;
        flex-direction: column;
        position: fixed;
        top: 0;
        right: -100%;
        left: auto;
        width: 100vw;
        /* toàn bộ chiều ngang */
        height: 100vh;
        max-height: 100vh;
        overflow-y: auto;
        border: none;
        border-radius: 0px;
        padding: 0px;
        box-shadow: -2px 0 8px rgba(0, 0, 0, 0.3);
        transition: right 0.3s ease;
    }

    .menu-dropdown.open {
        display: block !important;
        right: 0;
        z-index: 1002;
    }

    .menu-left {
        width: 100px;
        /* height: calc(100vh - 49px); */
        border-right: 0px;
    }

    .menu-right {
        padding: 10px;
        background: #fff;
    }

    .menu-panel .category-item {
        width: calc(100% / 3);
        padding: 0px;
    }

    #thuong-hieu .category-item {
        width: calc(100% / 3 - 6px);
        padding: 0px;
    }

    .search-wrapper {
        height: 36px;
        border-radius: 5px;
    }
}

@media (max-width: 575.98px) {
    .menu-left li {
        padding: 7px 5px;
    }

    .gird-images {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(3, 238px);
        grid-gap: 5px 5px;
    }

    .box-images:nth-child(1) {
        grid-column: 1 / 3;
        grid-row: 1 / 2;
    }

    .gradient-title {
        width: 300PX;
    }

    .cart .text-start {
        display: NONE;
    }

    .wrap-uudai {
        padding-top: 1rem;
        transform: translateY(0);
    }

    .wrap-counter .num {
        display: none
    }

    .banner h2 {
        font-size: 20px;
    }

    .btn-submain {
        font-size: 14px;
    }

    header#header.fixed {
        position: relative;
    }

    .title-main h2 {
        font-size: 22px;
    }

    .title-main::before {
        font-size: 5rem;
        line-height: 65px;
    }

    .wrap-diadiem-hot .service-list h2.name {
        font-size: 16px;
    }

    .wrap-counter .num {
        font-size: 4.5rem;
    }

    .wrap-counter .counter {
        font-size: 2.5rem;
    }

    .wrap-service-list .service-list .name {
        font-size: 17px;
    }

    .wrap-service-list .service-list .info h3 {
        font-size: 16px;
    }

    .wrap-service-list .service-list .info .line {
        margin: 5px auto;
    }

    .news-item .name a {
        height: 42px;
    }

    .news-item .desc {
        font-size: 13px;
    }

    .service-item .name {
        font-size: 18px;
    }

    .service-item .desc {
        font-size: 14px;
    }

    .item_history .name {
        font-size: 1.5rem;
    }

    .item_year {
        font-size: 17px;
    }

    #frm-newsletter {
        padding: 0px;
    }

    .notify-popup {
        bottom: 85px;
    }

    .news-item.list .image {
        width: 120px;
    }

    .news-item.list .info {
        width: calc(100% - 120px);
        padding: 0px 10px;
    }

    .title-main h2,
    .title-main h3,
    .title-main h4 {
        white-space: normal !important;
    }

    .choose-list button {
        font-size: 16px;
        margin-bottom: 5px;
        padding: 7px 15px 4px;
    }

    .left-pro-detail {
        width: 100%;
    }

    .khachhang-item {
        width: 300px;
    }

    .accordion-button {
        font-size: 16px;
    }

    .footer-payments {
        text-align: center;
    }

    .item_history .desc {
        margin-bottom: 0px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: normal;
        -webkit-box-orient: vertical;
        display: -webkit-box;
        -webkit-line-clamp: 3;
    }

    .category-item {
        padding: 5px;
        width: calc(100% / 3);
    }

    .wrap-brand .brand-item,
    .wrap-doitac .brand-item {
        width: calc(100% / 3 - .5rem);
    }

    .filter-brand .filter-dropdown-item {
        width: calc(100% / 3 - .5rem);
    }

    .cart-fixed {
        bottom: 100px;
    }

    .wrap-about .about-img {
        position: relative;
        text-align: left;
        padding-bottom: 20%;
    }

    .wrap-about .about-img img:nth-child(2) {
        margin-left: 0px;
        margin-top: 0px;
        position: absolute;
        right: 0px;
        top: 15%;
    }

    .gallery-pro-detail .gallery-pro-detail-left {
        width: 100%;
        margin: 0px;
        order: -1;
    }

    .gallery-pro-detail .slider-product-thumbs {
        width: calc(100% - 85px);
    }

    .gallery-pro-detail .slider-products {
        width: 100%;
    }

    /* Chi tiết dịch vụ: trả ảnh nhỏ về DƯỚI ảnh lớn. Rule core ngay trên khai order:-1 kéo hàng thumb
       lên trên, nhưng đó là bố cục của chi tiết SẢN PHẨM — chỉ đè lại cho bản .thumbs-left, giữ nguyên
       chi tiết sản phẩm. Thứ tự DOM vốn đã là ảnh lớn trước nên chỉ cần bỏ order. */
    .gallery-pro-detail.thumbs-left .gallery-pro-detail-left { order: 0;}
    .gallery-pro-detail.thumbs-left .slider-product-thumbs { width: 100%;}
}

@media (max-width: 380.98px) {
    .product-video {
        width: 60px;
        height: 60px;
    }
}