/* =====================
   BASE
===================== */
body {
    margin: 0;
    padding-top: 72px;
    font-family: Arial, sans-serif;
}

/* =====================
   HEADER
===================== */
.header {
    position: fixed;
    top: 0;
    width: 100%;
    height: 72px;
    /* cố định chiều cao */
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    z-index: 1000;
    overflow: visible;
    /* THÊM DÒNG NÀY */
}

.header-inner {
    position: relative;
    /* để logo absolute theo nó */
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    height: 100%;

    display: flex;
    align-items: center;
    justify-content: center;
}

/* =====================
   LOGO – DESKTOP
===================== */
.logo {
    position: absolute;
    left: -10px;
    top: 0;
    transform: translateY(-5%);
}

.logo img {
    height: 85px;
    /* LOGO TO Ở DESKTOP */
    width: auto;
    display: block;
}

.logo-slogan {
    display: none;
}

/* Ẩn hamburger ở desktop */
.menu-toggle {
    display: none;
}

/* =====================
   NAV – DESKTOP
===================== */
.nav {
    display: flex;
    align-items: center;
    gap: 40px;
}

.nav-left,
.nav-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-center {
    margin: 0 30px;
}

.nav a {
    text-decoration: none;
    color: #1f6aa5;
    font-weight: 500;
    white-space: nowrap;
    transition: 0.2s ease;
}

.nav a:hover {
    color: #c94a4a;
}

/* =====================
   BUTTON AVATAR
===================== */
.btn-avatar {
    padding: 8px 18px;
    border-radius: 25px;
    background: linear-gradient(135deg, #1f6aa5, #c94a4a);
    color: #fff !important;
    font-weight: 600;
    text-decoration: none;
}

.btn-avatar:hover {
    opacity: 0.9;
}

/* =====================
   MOBILE – REFACTOR SẠCH
===================== */
@media (max-width: 768px) {

    body {
        padding-top: 64px;
    }

    .menu-toggle {
        display: block;
    }

    .header {
        height: 64px;
    }

    .header-inner {
        justify-content: space-between;
        align-items: center;
    }

    /* RESET LOGO */
    /* Logo + slogan cùng 1 hàng */
    .logo {
        position: relative;
        left: 0px;
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .logo img {
        height: 40px;
    }

    .logo-slogan {
        display: block;
        font-size: 14px;
        font-weight: 750;
        color: #1f6aa5;

        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .menu-toggle {
        display: block;
    }

    /* ================= NAV MOBILE ================= */

    .nav {
        position: absolute;
        top: 100%;
        right: 12px;
        width: 240px;

        background: #fff;
        border-radius: 12px;
        box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);
        padding: 8px;

        display: flex;
        flex-direction: column;

        opacity: 0;
        transform: translateY(-18px) scale(0.96);
        pointer-events: none;

        transition:
            opacity 0.25s ease,
            transform 0.35s cubic-bezier(0.22, 1.4, 0.36, 1);
    }

    .nav.active {
        opacity: 1;
        transform: translateY(0) scale(1);
        pointer-events: auto;
    }

    /* BỎ GROUP FLEX */
    .nav-left,
    .nav-right,
    .nav-center {
        display: contents;
    }

    /* MENU ITEM */
    .nav a {
        width: 100%;
        padding: 10px 14px;
        border-radius: 8px;
        font-size: 15px;
        box-sizing: border-box;
    }

    .nav a:not(.btn-avatar):hover {
        background: #e6eef7;
    }

    /* AVATAR – LUÔN CUỐI */
    .btn-avatar {
        order: 99;
        width: 100%;
        margin-top: 10px;
        padding: 12px;
        border-radius: 25px;
        text-align: center;
        border-top: 1px solid #eef1f5;
        padding-top: 14px;
    }
}

.nav {
    gap: 0;
    /* đảm bảo không có gap ẩn */
}

.nav a {
    display: block;
    padding: 10px 14px;
    /* giữ vùng hover đẹp */
    line-height: 2;
    /* GIẢM CHIỀU CAO */
    margin: 10;
    /* loại bỏ margin mặc định */
}