/* ==========================================================================
   HEADER MOBILE (<= 1199px) — hotline cạnh logo + menu con
   File riêng, nạp SAU stylesheet_custom/stylesheet.css. Không sửa file cũ.
   ========================================================================== */

/* Hotline: chỉ hiện trên mobile */
.hd-hotline {
    display: none;
}

@media (max-width: 1199px) {

    /* ---------- Hotline cạnh logo: "Hotline: 0909 xxx xxx" ---------- */
    .hd-hotline {
        display: inline-block;
        margin-left: auto;
        padding-left: 10px;            /* khe tối thiểu với logo khi màn hẹp */
        margin-right: 48px;            /* chừa chỗ cho nút ☰ (absolute, rộng 30px) */
        color: #cf1f22;
        font-size: 15px;
        line-height: 1.3;
        white-space: nowrap;
        text-decoration: none;
    }

    .hd-hotline:hover,
    .hd-hotline:focus {
        color: #fff;
    }

    .hd-hotline__label {
        font-weight: 400;
    }

    .hd-hotline__phone {
        font-weight: 700;
    }

    /* ---------- Menu mobile: cuộn được khi dài ---------- */
    nav.main-menu.show {
        max-height: calc(100vh - 90px);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* ---------- Mũi tên báo có menu con ----------
       stylesheet.css (mục "hover nav") đặt `.mega-menu-item a::after { content: '' }`
       thành vạch gạch chân ⇒ mất mũi tên ▾ của megamenu.css. Vẽ lại bằng CSS,
       không phụ thuộc font icon. */
    nav.main-menu ul.menu li.mega-menu-item > a.mega-menu-link {
        padding-right: 48px !important;
    }

    nav.main-menu ul.menu li.mega-menu-item > a.mega-menu-link::after,
    nav.main-menu .mega-menu-item:hover > a.mega-menu-link::after {
        content: '';
        position: absolute;
        top: 50%;
        left: auto;
        right: 20px;
        bottom: auto;
        width: 9px;
        height: 9px;
        margin: -7px 0 0;
        float: none;
        background: none;
        border-right: 2px solid currentColor;
        border-bottom: 2px solid currentColor;
        transform: rotate(45deg);
        transition: transform .25s ease, margin .25s ease;
    }

    nav.main-menu ul.menu li.mega-menu-item > a.mega-menu-link.active::after {
        margin-top: -2px;
        transform: rotate(-135deg);
    }

    /* main.js tự chèn thêm 1 mũi tên Font Awesome vào mục "Dịch vụ" ⇒ ẩn trên mobile cho khỏi 2 mũi tên */
    nav.main-menu a.mega-menu-link > span:has(> .fa-chevron-down) {
        display: none;
    }

    /* Menu con cấp 2 thụt vào, dễ phân biệt */
    nav.main-menu ul.menu li.mega-menu-item ul.mega-submenu.active {
        padding: 4px 0 8px 15px;
    }
}

@media (max-width: 400px) {
    .hd-hotline {
        font-size: 13px;
        margin-right: 42px;
    }
}

@media (max-width: 340px) {
    .hd-hotline {
        font-size: 12px;
    }
}
