body {
    padding-top: var(--header-height-normal);
    /* Quan trọng: Màu nền body trùng màu navbar để nếu có kẽ hở nano giây cũng ko bị lộ */
    background-color: #ffffff;
}
/* --- 1. NAVBAR LOGIC BẤT ĐỐI XỨNG --- */
.navbar {
    background: #ffffff;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    padding: 0;
    /* TRẠNG THÁI MẶC ĐỊNH (KHI Ở TOP): */
    height: var(--header-height-normal);
    /* Kỹ thuật fix lỗi: Khi bỏ class .scrolled (về top), dùng tốc độ siêu nhanh */
    transition: all var(--speed-expand) ease-out;
}
/* TRẠNG THÁI KHI SCROLL (CÓ CLASS .scrolled) */
.navbar.scrolled {
    height: var(--header-height-scrolled);
    /* Khi thêm class (scroll xuống), dùng tốc độ chậm cho mượt */
    transition: all var(--speed-shrink) ease-in-out;
}
.navbar .container {
    height: 100%;
    display: flex;
    align-items: center;
}
/* --- 2. LOGO ANIMATION (Cũng áp dụng bất đối xứng) --- */
.navbar-brand {
    padding: 0;
    display: flex;
    align-items: center;
    height: 100%;
}
.navbar-brand img {
    width: auto;
    /* Mặc định (về top): Giãn ra nhanh */
    height: 50px;
    transition: height var(--speed-expand) ease-out;
}
.navbar.scrolled .navbar-brand img {
    /* Scroll xuống: Thu vào từ từ */
    height: 35px;
    transition: height var(--speed-shrink) ease-in-out;
}
/* --- 3. GIỮ NGUYÊN PHẦN MENU ĐÃ FIX TRƯỚC ĐÓ --- */
.navbar-collapse {
    height: 100%;
}
.navbar-nav {
    height: 100%;
    display: flex;
    align-items: center;
    gap: 5px;
}
.nav-item {
    height: 100%;
    display: flex;
    align-items: center;
    position: relative;
}
.nav-link {
    color: #2C3338 !important;
    font-weight: 500;
    padding: 0 1rem !important;
    height: 100%;
    display: flex;
    align-items: center;
    transition: color 0.3s;
}
.nav-link:hover {
    color: var(--primary) !important;
}
@media (min-width: 992px) {
    .dropdown-menu {
        display: block;
        margin-top: 0;
        top: 100%;
        left: 0;
        border: none;
        border-radius: 0 0 12px 12px;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
        padding: 10px;
        visibility: hidden;
        opacity: 0;
        transform: translateY(15px);
        transition: all 0.3s ease;
        pointer-events: none;
    }
    .nav-item.dropdown:hover .dropdown-menu {
        visibility: visible;
        opacity: 1;
        transform: translateY(0);
        pointer-events: auto;
    }
    .dropdown-arrow {
        width: 10px;
        margin-left: 5px;
        margin-top: 2px;
        transition: transform 0.3s;
    }
    .nav-item.dropdown:hover .dropdown-arrow {
        transform: rotate(180deg);
    }
}

/* MOBILE */
@media (max-width:991.98px){
    /* Full screen panel */
    .navbar-collapse{
        position: fixed;
        top: var(--header-height-normal);
        left: 0;
        width: 100%;
        height: calc(100vh - var(--header-height-normal));
        background: #fff;
        padding: 25px 20px;
        overflow-y: auto;
        z-index: 999;
        box-shadow: 0 20px 40px rgba(0,0,0,.08);
    }
    .navbar.scrolled .navbar-collapse{
        top: var(--header-height-scrolled);
        height: calc(100vh - var(--header-height-scrolled));
    }
    /* menu dọc */
    .navbar-nav{
        height: auto;
        align-items: flex-start;
        gap: 0;
        width: 100%;
    }
    .nav-item{
        display: unset;
        width: 100%;
        border-bottom: 1px solid #eee;
        height: auto;
    }
    .nav-link{
        color: #222!important;
        height: auto;
        padding: 14px 5px!important;
        font-size: 1.1rem;
        width: 100%;
        justify-content: space-between;
    }
    /* arrow mobile */
    .dropdown-arrow{
        width: 14px;
        height: 14px;
    }
    .nav-item.dropdown.show .dropdown-arrow{
        transform: rotate(180deg);
    }
    /* dropdown mobile */
    .dropdown-menu{
        position: static;
        visibility: visible!important;
        opacity: 1!important;
        transform: none!important;
        box-shadow: none;
        border: none;
        border-radius: 0;
        padding: 0 0 10px 15px;
        display: none;
    }
    .nav-item.dropdown.show .dropdown-menu{
        display: block;
    }
    .dropdown-item{
        padding: 10px 5px;
        font-size: 1rem;
    }
}