/* =====================================================
   HEADER + FOOTER – QUỸ PHÁT TRIỂN KH&CN QUỐC GIA
   Gồm: biến màu, font Roboto, tiện ích dùng chung,
        menu đầu trang, menu mobile, chân trang, nút lên đầu trang.
   NẠP TRƯỚC CssNoiDung.css.
   ===================================================== */


/* =====================================================
   BẢNG MÀU DÙNG CHUNG CHO CẢ TRANG
   (CssNoiDung.css cũng lấy từ đây nên file này phải nạp trước)
   ===================================================== */

:root {
    --qpt-orange: #ef8b1f;
    --qpt-orange-dark: #e2700d;
    --qpt-amber: #d88700;
    --qpt-amber-soft: #fbd28a;
    --qpt-red: #840707;
    --qpt-red-btn: #e20415;
    --qpt-cream: #fdf7ee;
    --qpt-ink: #222;
    --qpt-ink-soft: #444;
    --qpt-line: #e6e6e6;
    --qpt-footer: #f2c98d;
    --qpt-copyright: #b7302a;
}


/* =====================================================
   FONT CHỮ — 3 loại Roboto, nạp từ fonts/Roboto
     Roboto        : chữ thường (Regular)
     RobotoMedium  : đậm vừa
     RobotoBold    : đậm
   Dùng bằng cách gắn class: <h3 class="RobotoBold">…</h3>
   ===================================================== */


/* ---- 1. Ba họ font đặt tên riêng, dùng qua class ---- */

@font-face {
    font-family: Roboto;
    font-display: swap;
    src: url(../fonts/Roboto/Roboto-Regular.ttf) format('truetype');
}

@font-face {
    font-family: RobotoMedium;
    font-display: swap;
    src: url(../fonts/Roboto/Roboto-Medium.ttf) format('truetype');
}

@font-face {
    font-family: RobotoBold;
    font-display: swap;
    src: url(../fonts/Roboto/Roboto-Bold.ttf) format('truetype');
}


/* ---- 2. Khai báo thêm Medium/Bold như các mức đậm của họ Roboto ----
   Trong CSS đang có 17 chỗ font-weight:700 và 4 chỗ 500. Không có 2 dòng
   dưới đây thì trình duyệt chỉ có file Regular để dùng, nó sẽ tự "bôi đậm
   giả" — chữ bị nhoè và dày không đều. Có rồi thì nó lấy đúng file thật. */

@font-face {
    font-family: Roboto;
    font-weight: 500;
    font-display: swap;
    src: url(../fonts/Roboto/Roboto-Medium.ttf) format('truetype');
}

@font-face {
    font-family: Roboto;
    font-weight: 700;
    font-display: swap;
    src: url(../fonts/Roboto/Roboto-Bold.ttf) format('truetype');
}


/* ---- 3. Mặc định toàn trang dùng Roboto ---- */

body,
body * {
    font-family: Roboto, "Helvetica Neue", Arial, sans-serif !important;
}


/* ---- 4. Class tiện dụng để đổi sang Medium / Bold ----
   Đặt !important và dùng class nên luôn thắng rule mặc định ở trên.
   font-weight: normal để trình duyệt khỏi bôi đậm chồng lên file vốn đã đậm. */

.Roboto {
    font-family: Roboto !important;
}

.RobotoMedium {
    font-family: RobotoMedium !important;
    font-weight: normal;
}

.RobotoBold {
    font-family: RobotoBold !important;
    font-weight: normal;
}


/* Trả lại font icon cho Font Awesome (nếu không icon sẽ thành ô vuông) */

.fa,
.fas,
.far,
.fal,
.fab,
[class^="fa-"],
[class*=" fa-"] {
    font-family: FontAwesome !important;
}


/* =====================================================
   RESET CƠ BẢN
   Chuyển từ CssQuyPT.css cũ sang (file đó đã xoá).
   Bỏ bất kỳ dòng nào ở đây là menu hiện dấu chấm đầu dòng
   và mọi link bị gạch chân.
   ===================================================== */

html {
    scroll-behavior: smooth;
}

a {
    text-decoration: none !important;
}

ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

img {
    max-width: 100%;
}

body {
    background: #fff;
    color: var(--qpt-ink);
    /* giữ đúng 14px như bản cũ — cỡ chữ của các khối được canh theo mức này */
    /*font-size: 14px;*/
}


/* ---- Khung chứa chung ----
   Dùng .container gốc của Bootstrap 5.3.2, không tự định nghĩa:
   ≥576px: 540px | ≥768px: 720px | ≥992px: 960px | ≥1200px: 1140px | ≥1400px: 1320px
   Đổi sang .container-fluid / .container-xxl nếu muốn khung rộng hơn.
   ---------------------------------------------------------------- */


/* ---- Ảnh placeholder (khi chưa có file ảnh thật) ---- */

.imgph {
    background: #e7e9ec;
    color: #9aa0a6;
    font-size: 11px;
    display: block;
}


/* ---- Tiêu đề khối dùng chung ---- */

.qpt-eyebrow {
    color: var(--qpt-amber);
    font-weight: 700;
    font-size: 22px;
    margin-bottom: 6px;
}

.qpt-title {
    color: var(--qpt-red);
    font-weight: 800;
    font-size: 31px;
    line-height: 1.25;
    margin-bottom: 3px;
}

.qpt-title-sm {
    color: var(--qpt-red);
    font-weight: 800;
    /* cùng cỡ với .qpt-title */
    font-size: 31px;
    text-transform: uppercase;
    margin-bottom: 0;
}

.qpt-lead {
    color: var(--qpt-ink-soft);
    font-size: 17px;
    line-height: 1.6;
    margin-bottom: 0;
    text-align:justify;
}

.qpt-section {
    padding: 30px 0;
}


/* =====================================================
   NHỊP CHUYỂN ĐỘNG DÙNG CHUNG
   Mọi hiệu ứng hover ở cả 2 file đều lấy 4 biến này —
   sửa ở đây là đổi nhịp toàn trang.
   ===================================================== */

:root {
    --qpt-ease: cubic-bezier(.22, .61, .36, 1);
    --qpt-fast: .18s;
    --qpt-mid: .28s;
    --qpt-slow: .45s;
}


/* =========== 13. TÔN TRỌNG TUỲ CHỌN GIẢM CHUYỂN ĐỘNG =========== */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
        scroll-behavior: auto !important;
    }
}


/* =====================================================
   1. HEADER  (logo | menu | đăng nhập + cờ)
   ===================================================== */

.qpt-header {
    background: #fff;
    border-bottom: 1px solid #eee;
    position: sticky;
    top: 0;
    z-index: 1040;
}

.qpt-header-inner {
    display: flex;
    align-items: center;
    gap: 24px;
    min-height: 80px;
}

/* flex item mặc định co được; khoá lại để header chật cỡ nào
   logo cũng không bị ép về 0 rồi biến mất */

.qpt-logo {
    flex: 0 0 auto;
}

    .qpt-logo img {
        height: 65px;
        width: auto;
    }

.qpt-nav {
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin: 0;
}

    .qpt-nav > li {
        position: relative;
    }

        .qpt-nav > li > a {
            display: block;
            padding: 10px 16px;
            color: #1f2937;
            font-size: 15px;
            font-weight: 600;
            white-space: nowrap;
        }

            .qpt-nav > li > a:hover,
            .qpt-nav > li.active > a {
                color: #1668c4;
            }


    /* ---- Mũi tên dropdown ----
   ::after của .qpt-nav > li > a đã dành cho gạch chân hover rồi,
   nên caret phải dùng ::before riêng, không xài chung.
   Chừa 36px bên phải để tam giác có chỗ đứng. */

    .qpt-nav .dropdown-toggle {
        padding-right: 36px;
    }


        /* Vô hiệu caret mặc định của Bootstrap (nó cũng bám vào ::after)
   nhưng KHÔNG dùng display:none vì sẽ mất luôn gạch chân */

        .qpt-nav .dropdown-toggle::after {
            border: 0;
            margin-left: 0;
            /* canh gạch chân theo giữa phần chữ, bù lại padding phải lớn hơn trái */
            left: calc(50% - 10px);
        }

        .qpt-nav .dropdown-toggle:hover::after,
        .qpt-nav > li.active > .dropdown-toggle::after {
            width: calc(100% - 52px);
        }


        /* Tam giác xanh, canh giữa theo chiều dọc ở mép phải */

        .qpt-nav .dropdown-toggle::before {
            content: "";
            position: absolute;
            right: 16px;
            top: 50%;
            margin-top: -3px;
            width: 0;
            height: 0;
            border-top: 7px solid #1668c4;
            border-right: 6px solid transparent;
            border-left: 6px solid transparent;
            border-bottom: 0;
            transition: transform .25s var(--qpt-ease);
        }


        /* Lật mũi tên khi menu đang mở */

        .qpt-nav .dropdown-toggle.show::before {
            transform: rotate(180deg);
        }

    .qpt-nav .dropdown-menu {
        border: none;
        border-top: 3px solid var(--qpt-orange);
        border-radius: 0 0 6px 6px;
        box-shadow: 0 8px 22px rgba(0, 0, 0, .12);
        padding: 0;
        min-width: 260px;
    }

    .qpt-nav .dropdown-item {
        padding: 11px 16px;
        font-size: 15px;
        border-bottom: 1px solid #f2f2f2;
    }

        .qpt-nav .dropdown-item:hover {
            background: var(--qpt-orange);
            color: #fff;
        }

/* Bộ chọn ngôn ngữ: viền pill bọc ngoài + kẻ phân cách + cờ active
   (phong cách tham khảo bộ chọn ngôn ngữ ở header mst.gov.vn,
    chỉnh lại tông màu cho nền trắng của header NAFOSTED) */
.qpt-header-right {
    display: flex;
    align-items: center;
    flex: 0 0 auto;
    border: 1px solid var(--qpt-line);
    border-radius: 9999px;
    overflow: hidden;
    background: #fff;
}

    /* đường kẻ dọc ngăn cách 2 lá cờ */
    .qpt-header-right > * + * {
        border-left: 1px solid var(--qpt-line);
    }

.btn-login {
    background: var(--qpt-amber);
    color: #fff !important;
    font-weight: 700;
    font-size: 11px;
    border-radius: 999px;
    padding: 7px 18px 5px 18px;
    white-space: nowrap;
}

    .btn-login:hover {
        background: var(--qpt-orange-dark);
    }

.qpt-flag {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px 13px;
    line-height: 0;
    transition: background var(--qpt-mid) var(--qpt-ease);
}

    /* di chuột vào: nền cam nhạt */
    .qpt-flag:hover {
        background: rgba(239, 139, 31, .08);
    }

    /* ngôn ngữ đang chọn: nền cam đậm hơn cho nổi bật */
    .qpt-flag.active {
        background: #2125291f;
    }

.qpt-flag img {
    width: 22px;
    height: 20px;
    object-fit: cover;
    display: block;
}


/* =====================================================
   12. FOOTER
   ===================================================== */

.qpt-footer {
    background: var(--qpt-footer);
    padding: 40px 0 0;
}

    .qpt-footer h2 {
        font-size: 26px;
        /* 700: Roboto chỉ nạp 400/500/700. 800 làm trang cấp 2 (có thêm css-trang-cap-2.css) chọn mặt 900 khác file */
        font-weight: 700;
        color: #1f2937;
        text-transform: uppercase;
        line-height: 1.45;
        margin-bottom: 26px;
    }

.foot-contact {
    display: flex;
    flex-wrap: wrap;
    gap: 46px;
}

    .foot-contact .fc-item {
        display: flex;
        align-items: center;
        gap: 14px;
    }

    .foot-contact .fc-icon {
        width: 46px;
        height: 46px;
        border-radius: 4px;
        background: #e8620d;
        color: #fff;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 20px;
        flex: 0 0 auto;
    }

    .foot-contact p {
        margin-bottom: 0;
        font-size: 17px;
        color: #1f2937;
        line-height: 1.5;
    }

.foot-badge img {
    max-width: 240px;
    display: block;
    margin-left: auto;
    margin-bottom: 18px;
}

.foot-social {
    display: flex;
    justify-content: flex-end;
    gap: 16px;
}

    .foot-social a {
        width: 54px;
        height: 54px;
        border-radius: 8px;
        display: flex;
        align-items: center;
        justify-content: center;
        color: #fff;
        font-size: 26px;
    }

    .foot-social .yt {
        background: #ff0000;
    }

    .foot-social .fb {
        background: #1877f2;
    }

.foot-nav {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 34px;
    padding: 34px 0 30px;
}

    .foot-nav a {
        color: #1f2937;
        font-size: 17px;
        font-weight: 600;
    }

        .foot-nav > li.active > a,
        .foot-nav a:hover,
        .foot-nav a.active {
            color: #1668c4;
        }

    .foot-nav > li {
        position: relative;
    }


    /* Mũi tên dropdown ở chân trang: xanh, cách chữ ra — đồng bộ với menu trên.
   Ở đây mũi tên là thẻ <i> thật nên không đụng vào ::after (đang là gạch chân) */

    .foot-nav a .fa-caret-down {
        color: #1668c4;
        font-size: 20px;
        margin-left: 7px;
        vertical-align: -1px;
        display: inline-block;
        transition: transform .25s var(--qpt-ease);
    }

    .foot-nav [data-bs-toggle="dropdown"].show .fa-caret-down {
        transform: rotate(180deg);
    }


    /* ---- Menu cấp 2 ở chân trang ----
   .dropup nên menu bung lên trên, viền cam nằm ở cạnh dưới cho thuận mắt */

    .foot-nav .dropdown-menu {
        border: none;
        border-bottom: 3px solid var(--qpt-orange);
        border-radius: 6px 6px 0 0;
        box-shadow: 0 -8px 22px rgba(0, 0, 0, .16);
        padding: 0;
        min-width: 240px;
        margin-bottom: 12px;
        overflow: hidden;
    }

    .foot-nav .dropdown-item {
        padding: 11px 16px;
        font-size: 15px;
        font-weight: 400;
        color: #333;
        border-bottom: 1px solid #f2f2f2;
        transition: all .18s ease;
    }

        .foot-nav .dropdown-item:last-child {
            border-bottom: none;
        }

        .foot-nav .dropdown-item:hover {
            background: var(--qpt-orange);
            color: #fff;
            padding-left: 22px;
        }


        /* Mục trong menu con không cần gạch chân trượt */

        .foot-nav .dropdown-item::after {
            content: none;
        }


/* =====================================================
   NÚT MOBILE (ẩn ở desktop)
   ===================================================== */

.qpt-mobile-btns {
    display: none;
    align-items: center;
    gap: 16px;
}

    .qpt-mobile-btns img {
        width: 26px;
        cursor: pointer;
    }


/* =====================================================
   RESPONSIVE
   ===================================================== */


/* =========== NÚT LÊN ĐẦU TRANG ===========
   Ghi đè hẳn bản trong CssQuyPT.css (đang dùng màu xanh lá của theme cũ) */

#scrollTop {
    position: fixed;
    right: 24px;
    bottom: 28px;
    width: 52px;
    height: 52px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: linear-gradient(145deg, var(--qpt-amber) 0%, var(--qpt-orange-dark) 100%);
    color: #fff;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 8px 22px rgba(226, 112, 13, .42);
    /* ẩn hẳn khi chưa cần, tránh việc nút vô hình vẫn ăn cú bấm ở góc màn */
    opacity: 0;
    visibility: hidden;
    transform: translateY(18px) scale(.85);
    transition: opacity .35s var(--qpt-ease), transform .35s var(--qpt-ease), visibility .35s, box-shadow .28s var(--qpt-ease);
    z-index: 9000;
}

    #scrollTop.visible {
        opacity: 1;
        visibility: visible;
        transform: translateY(0) scale(1);
    }

    #scrollTop:hover {
        background: linear-gradient(145deg, var(--qpt-amber) 0%, var(--qpt-orange-dark) 100%);
        transform: translateY(-4px) scale(1.06);
        box-shadow: 0 14px 30px rgba(226, 112, 13, .55);
    }

    #scrollTop:active {
        transform: translateY(-1px) scale(1.02);
    }

    #scrollTop:focus-visible {
        outline: 3px solid rgba(255, 255, 255, .85);
        outline-offset: 2px;
    }


/* ---- Vòng tiến độ đọc ---- */

.stt-ring {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* xoay để vạch chạy bắt đầu từ đỉnh */
    transform: rotate(-90deg);
    pointer-events: none;
}

    .stt-ring circle {
        fill: none;
        stroke-width: 3;
    }

.stt-ring-bg {
    stroke: rgba(255, 255, 255, .32);
}

.stt-ring-bar {
    stroke: #fff;
    stroke-linecap: round;
    transition: stroke-dashoffset .12s linear;
}


/* ---- Mũi tên nhấp nhô khi rê chuột ---- */

#scrollTop i {
    position: relative;
    z-index: 1;
    line-height: 1;
}

#scrollTop:hover i {
    animation: sttNudge .8s ease-in-out infinite;
}

@keyframes sttNudge {
    0%, 100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-3px);
    }
}


/* ---- Nhãn bên trái ---- */

#stt-tooltip {
    position: absolute;
    right: calc(100% + 12px);
    left: auto;
    top: 50%;
    bottom: auto;
    background: #2b2b2b;
    color: #fff;
    font-size: 13px;
    font-weight: 500;
    padding: 7px 13px;
    border-radius: 6px;
    white-space: nowrap;
    box-shadow: 0 4px 14px rgba(0, 0, 0, .25);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-50%) translateX(8px);
    transition: opacity .22s ease, transform .22s var(--qpt-ease);
}


    /* mũi nhọn chỉ sang nút */

    #stt-tooltip::after {
        content: "";
        position: absolute;
        left: 100%;
        top: 50%;
        margin-top: -5px;
        border: 5px solid transparent;
        border-left-color: #2b2b2b;
    }

#scrollTop:hover #stt-tooltip {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
}


/* =====================================================
   RESPONSIVE – TOÀN TRANG
   Mốc theo đúng Bootstrap 5.3.2 để khớp với .container và lưới col-*
     ≤1399.98  laptop nhỏ      (container 1140px)
     ≤1199.98  tablet ngang    (container 960px)
     ≤991.98   tablet dọc      (container 720px)  → bật menu mobile
     ≤767.98   điện thoại lớn  (container 540px)
     ≤575.98   điện thoại dọc  (container tràn viền)
     ≤399.98   máy màn hẹp
   ===================================================== */


/* =====================================================
   ≤ 1399.98px — LAPTOP NHỎ
   ===================================================== */

@media (max-width: 1399.98px) {
    /* Menu 7 mục bắt đầu chật, thu khoảng đệm lại */
    .qpt-nav > li > a {
        padding: 10px 10px;
        font-size: 15px;
    }

    .qpt-nav .dropdown-toggle {
        padding-right: 30px;
    }

        .qpt-nav .dropdown-toggle::before {
            right: 10px;
        }

        .qpt-nav .dropdown-toggle::after {
            left: calc(50% - 10px);
        }

        .qpt-nav .dropdown-toggle:hover::after,
        .qpt-nav > li.active > .dropdown-toggle::after {
            width: calc(100% - 40px);
        }
}


/* =====================================================
   ≤ 1199.98px — TABLET NGANG
   ===================================================== */

@media (max-width: 1199.98px) {
    /* ---- Header rút gọn: bật menu mobile ngay từ 1199px ----
       Từ 992-1199px khung chỉ rộng 960px, trong khi menu 7 mục (~815px)
       cộng logo (157px) và nút Đăng nhập (~150px) cần tới ~1170px.
       Cố nhồi cho vừa thì logo bị ép về 0 và biến mất. */
    .qpt-header-inner {
        min-height: 68px;
        justify-content: space-between;
    }

    .qpt-nav,
    .qpt-header-right {
        display: none;
    }

    .qpt-mobile-btns {
        display: flex;
    }

    .qpt-logo img {
        height: 42px;
    }

    .qpt-footer h2 {
        font-size: 22px;
    }

    .foot-nav {
        gap: 24px;
    }
}


/* =====================================================
   ≤ 991.98px — TABLET DỌC  (bật menu mobile)
   ===================================================== */

@media (max-width: 991.98px) {
    /* ---- Footer: huy hiệu và mạng xã hội về canh trái ---- */
    .foot-badge img,
    .foot-social {
        margin-left: 0;
        justify-content: flex-start;
    }

    .foot-nav {
        gap: 20px;
        padding: 28px 0 24px;
    }
}


/* =====================================================
   ≤ 767.98px — ĐIỆN THOẠI LỚN
   ===================================================== */

@media (max-width: 767.98px) {
    /* ---- Footer ---- */
    .qpt-footer {
        padding: 30px 0 0;
    }

        .qpt-footer h2 {
            font-size: 20px;
            margin-bottom: 20px;
        }

    .foot-contact {
        gap: 20px;
    }

        .foot-contact p {
            font-size: 16px;
        }

    .foot-nav {
        gap: 16px 22px;
        padding: 24px 0 20px;
    }

        .foot-nav a {
            font-size: 16px;
        }
    /* ---- Nút lên đầu trang ---- */
    #scrollTop {
        width: 40px;
        height: 40px;
        right: 14px;
        bottom: 18px;
        font-size: 15px;
    }
}


/* =====================================================
   ≤ 575.98px — ĐIỆN THOẠI DỌC
   ===================================================== */

@media (max-width: 575.98px) {
    .qpt-footer h2 {
        font-size: 18px;
    }

    .foot-social a {
        width: 46px;
        height: 46px;
        font-size: 22px;
    }

    .foot-badge img {
        max-width: 200px;
    }
}


/* =====================================================
   ≤ 399.98px — MÁY MÀN HẸP
   ===================================================== */

@media (max-width: 399.98px) {
    .foot-nav {
        gap: 12px 16px;
    }
}


/* =========== 1. MENU CHÍNH : gạch chân trượt từ giữa =========== */

.qpt-nav > li > a {
    position: relative;
}

    .qpt-nav > li > a::after {
        content: "";
        position: absolute;
        left: 50%;
        bottom: 2px;
        width: 0;
        height: 2px;
        background: #1668c4;
        border-radius: 2px;
        transform: translateX(-50%);
        transition: width var(--qpt-mid) var(--qpt-ease);
    }

    .qpt-nav > li > a:hover::after,
    .qpt-nav > li.active > a::after {
        width: calc(100% - 32px);
    }


/* Logo & cờ */

.qpt-logo img,
.qpt-flag img {
    transition: transform var(--qpt-mid) var(--qpt-ease);
}

.qpt-logo:hover img {
    transform: scale(1.04);
}

.qpt-flag:hover img {
    transform: scale(1.14);
}


/* =========== 2. CÁC NÚT : nhấc lên + đổ bóng =========== */

.btn-login:hover,
.btn-hero:hover,
.btn-intl:hover,
.btn-register:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(0, 0, 0, .22);
}

.btn-login:active,
.btn-hero:active,
.btn-intl:active,
.btn-register:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(0, 0, 0, .18);
}


/* =========== 12. FOOTER =========== */

.foot-nav a {
    position: relative;
}

    .foot-nav a::after {
        content: "";
        position: absolute;
        left: 50%;
        bottom: -6px;
        width: 0;
        height: 2px;
        background: #1668c4;
        transform: translateX(-50%);
        transition: width var(--qpt-mid) var(--qpt-ease);
    }

    .foot-nav a:hover::after,
    .foot-nav a.active::after,
    .foot-nav > li.active > a::after,
    .foot-nav [data-bs-toggle="dropdown"].show::after {
        width: 100%;
    }

.foot-social a:hover {
    transform: translateY(-4px) scale(1.06);
    box-shadow: 0 10px 20px rgba(0, 0, 0, .25);
}

.foot-badge img {
    transition: transform var(--qpt-mid) var(--qpt-ease), box-shadow var(--qpt-mid) var(--qpt-ease);
}

.foot-badge a:hover img {
    transform: scale(1.04);
    box-shadow: 0 8px 20px rgba(0, 0, 0, .18);
}

.foot-contact .fc-icon {
    transition: transform var(--qpt-mid) var(--qpt-ease);
}

.foot-contact .fc-item:hover .fc-icon {
    transform: rotate(-8deg) scale(1.08);
}


/* =====================================================
   MENU TRƯỢT & Ô TÌM KIẾM CHO MOBILE
   Khay trượt từ mép trái: đầu khay có logo + nút đóng,
   giữa là danh sách menu, chân khay có Đăng nhập + ngôn ngữ.
   Các class do main.js điều khiển (KHÔNG đổi tên):
     .mobile_menu  .navbar-collapse.show  .overlay_menu.active
     .nav-mobile-sub  .rotate_180  .formobides  .searchmobi
   ===================================================== */


/* Mặc định ẩn, JS bật khi bấm nút hamburger / kính lúp */

nav.custom-menu-mobile {
    display: none;
}

.formobides {
    display: none;
}


/* ---- Từ 1199.98px trở xuống: bật menu mobile ---- */

@media (max-width: 1199.98px) {
    .formobides {
        display: block;
        position: relative;
    }
    /* ---------- Khay trượt ---------- */
    .navbar-collapse {
        position: fixed;
        top: 0;
        left: -340px;
        width: 300px;
        max-width: 86vw;
        height: 100%;
        padding: 0;
        background: #fff;
        display: flex;
        flex-direction: column;
        align-items: stretch;
        box-shadow: 4px 0 30px rgba(0, 0, 0, .28);
        transition: left 340ms var(--qpt-ease);
    }

        .navbar-collapse.show {
            left: 0;
            z-index: 1000;
        }
    /* ---------- Đầu khay ---------- */
    .mm-drawer-head {
        flex: 0 0 auto;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        padding: 14px 16px;
        background: linear-gradient(135deg, var(--qpt-amber) 0%, var(--qpt-orange-dark) 100%);
    }

        .mm-drawer-head img {
            height: 34px;
            width: auto;
        }
    /* Nút đóng: tròn, nền trắng mờ */
    .mobile_menu .navbar-toggler {
        position: static;
        flex: 0 0 auto;
        width: 34px;
        height: 34px;
        padding: 0;
        border: none;
        border-radius: 50%;
        background: rgba(255, 255, 255, .22);
        color: #fff;
        display: flex;
        align-items: center;
        justify-content: center;
        opacity: 1;
        box-shadow: none;
        transition: background .2s ease, transform .2s var(--qpt-ease);
    }

        .mobile_menu .navbar-toggler:hover {
            background: rgba(255, 255, 255, .38);
            transform: rotate(90deg);
        }
    /* ---------- Danh sách menu ---------- */
    .mobile_menu div.navbar-collapse {
        overflow: hidden;
    }

    .mobile_menu ul.navbar-nav {
        flex: 1 1 auto;
        overflow-y: auto;
        height: auto;
        display: block;
    }

    .mobile_menu .navbar-nav .nav-item {
        position: relative;
        border-bottom: 1px solid #f1f1f1;
    }

        .mobile_menu .navbar-nav .nav-item .nav-link {
            display: block !important;
            position: relative;
            margin: 0;
            padding: 13px 44px 13px 20px;
            font-size: 15px;
            font-weight: 600;
            color: #1f2937;
            transition: color .2s ease, background .2s ease, padding-left .2s var(--qpt-ease);
        }
            /* Vạch cam chạy ra ở mép trái khi chạm vào */
            .mobile_menu .navbar-nav .nav-item .nav-link::before {
                content: "";
                position: absolute;
                left: 0;
                top: 0;
                bottom: 0;
                width: 0;
                background: var(--qpt-orange-dark);
                transition: width .2s var(--qpt-ease);
            }

        .mobile_menu .navbar-nav .nav-item:hover > .nav-link,
        .mobile_menu .navbar-nav .nav-item.active > .nav-link {
            background: #fff6ea;
            color: var(--qpt-orange-dark);
            padding-left: 26px;
        }

            .mobile_menu .navbar-nav .nav-item:hover > .nav-link::before,
            .mobile_menu .navbar-nav .nav-item.active > .nav-link::before {
                width: 4px;
            }

    .mobile_menu .navbar-nav li:hover {
        background: transparent;
    }
    /* ---------- Mũi tên mở menu con ---------- */
    .mobile_menu .has-child .fa-caret-down {
        position: absolute;
        right: 0;
        top: 0;
        width: 44px;
        height: 45px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 17px;
        color: #b5b5b5;
        cursor: pointer;
        transition: transform .25s var(--qpt-ease), color .2s ease;
    }

    .mobile_menu .has-child:hover .fa-caret-down {
        color: var(--qpt-orange-dark);
    }

    .mobile_menu .has-child .fa-caret-down.rotate_180 {
        transform: rotate(180deg);
    }
    /* ---------- Menu con ---------- */
    .nav-mobile-sub {
        display: none;
        padding: 4px 0;
        background: #fdf7ee;
        border-top: 1px solid #f1e6d5;
    }

        .nav-mobile-sub .menu-item a {
            display: block;
            padding: 10px 20px 10px 32px;
            font-size: 14px;
            color: #5a5a5a;
            position: relative;
        }
            /* chấm tròn nhỏ đầu dòng */
            .nav-mobile-sub .menu-item a::before {
                content: "";
                position: absolute;
                left: 20px;
                top: 50%;
                margin-top: -2.5px;
                width: 5px;
                height: 5px;
                border-radius: 50%;
                background: var(--qpt-amber-soft);
                transition: background .2s ease;
            }

            .nav-mobile-sub .menu-item a:hover {
                color: var(--qpt-orange-dark);
            }

                .nav-mobile-sub .menu-item a:hover::before {
                    background: var(--qpt-orange-dark);
                }
    /* ---------- Chân khay ---------- */
    .mm-drawer-foot {
        flex: 0 0 auto;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        padding: 14px 20px;
        border-top: 1px solid #ececec;
        background: #fafafa;
    }

        .mm-drawer-foot .btn-login {
            padding: 7px 20px;
            font-size: 14px;
        }

    .mm-lang {
        display: flex;
        align-items: center;
        gap: 7px;
        font-size: 14px;
        color: #555;
    }

        .mm-lang img {
            width: 22px;
            height: 15px;
            object-fit: cover;
            border-radius: 2px;
        }
    /* ---------- Lớp phủ phía sau ---------- */
    .overlay_menu.active {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(20, 12, 4, .55);
        backdrop-filter: blur(2px);
        z-index: 99;
    }
    /* ---------- Ô tìm kiếm trượt xuống ---------- */
    .searchmobi {
        display: none;
        position: absolute;
        left: 2%;
        z-index: 100;
        width: 100%;
    }

    .searchbox-div input {
        width: 96%;
        height: 47px;
        padding: 0 40px 0 14px;
        border: 1px solid #e3d6bf;
        border-radius: 8px;
        box-shadow: 0 6px 18px rgba(0, 0, 0, .12);
        outline: none;
    }

        .searchbox-div input:focus {
            border-color: var(--qpt-amber);
        }

    .searchbox-div img.iconwebs {
        width: 26px !important;
        height: 26px !important;
        right: 60px;
        bottom: 10px !important;
        background-image: unset !important;
    }
}

@media (max-width: 575.98px) {
    .searchbox-div img.iconwebs {
        right: 40px !important;
    }

        .navbar-collapse {
            width: 280px;
        }

        .mm-drawer-head img {
            height: 30px;
        }

        .mobile_menu .navbar-nav .nav-item .nav-link {
            padding: 12px 42px 12px 18px;
            font-size: 14px;
        }

        .nav-mobile-sub .menu-item a {
            padding: 9px 18px 9px 30px;
            font-size: 13px;
        }
    }
