/* ==========================================================================
   HEADER STYLES - 2-ROW LAYOUT (LEFT LOGO, RIGHT STACKED ACTIONS & MENU)
   ========================================================================== */

.header-main-new {
    width: 100%;
    position: relative;
    z-index: 1099;
    font-family: var(--font-family, "Roboto", sans-serif);
}

.header-main-new .mobile-drawer-header,
.header-main-new .mobile-dropdown-toggle,
.header-main-new .mobile-dropdown-toggle-lvl2,
.header-main-new .mobile-drawer-actions {
    display: none;
}

.header-main-new .menu-link-row,
.header-main-new .lvl2-link-row {
    display: flex;
    align-items: center;
    width: 100%;
}

/* ---- Navbar Wrapper ---- */
.header-main-new .navbar-wrapper {
    background-color: #fff;
    border-bottom: 1px solid #eaeaea;
    position: relative;
    /* padding: 10px 0 0 0; */
    transition: box-shadow 0.3s ease;
}

.header-main-new .navbar-wrapper .ctnr {
    position: static;
}

/* ---- Sticky Header ---- */
.header-main-new.is-sticky .navbar-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: #ffffff;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    animation: headerSlideDown 0.28s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes headerSlideDown {
    from {
        transform: translateY(-100%);
    }

    to {
        transform: translateY(0);
    }
}

/* 2-Row Flex Container: Left Big Logo, Right Stacked (Top: Actions, Bottom: Menu) */
.header-main-new .navbar-content-2row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 7px 0;
    gap: 20px;
}

/* ---- Left Logo (To) ---- */
.header-main-new .header-left-logo {
    flex-shrink: 0;
}

.header-main-new .logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.header-main-new .logo-img {
    height: 80px;
    width: auto;
    margin-bottom: 5px;
    object-fit: contain;
    transition: height 0.25s ease;
}



/* ---- Right Column (Stacked) ---- */
.header-main-new .header-right-col {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 15px;
    flex: 1;
}

/* HÃƒÂ ng trÃƒÂªn: Search & Auth Buttons */
.header-main-new .header-top-row {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    width: 100%;
}

.header-main-new .right-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-main-new .action-btn {
    background: transparent;
    border: none;
    color: #1a1a1a;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px;
    border-radius: 50%;
    transition: color 0.2s ease, background 0.2s ease;
}

.header-main-new .action-btn:hover {
    color: var(--color-3, #0c55a5);
    background: #f7f9fc;
}

/* Action Buttons (Ã„ÂÃ„Æ’ng nhÃ¡ÂºÂ­p, Ã„ÂÃ„Æ’ng kÃƒÂ½ hÃ¡Â»â„¢i viÃƒÂªn) */
.header-main-new .header-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    /* height: 34px; */
    padding: 7px 16px;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 400;
    text-decoration: none;
    transition: all 0.25s ease;
    white-space: nowrap;
    height: auto;
    text-transform: none;
    letter-spacing: 0;
    margin-bottom: 0;
    box-shadow: none;
}

.header-main-new .btn-login {
    background: transparent;
    color: #1a1a1a;
    border: 1px solid #cccccc;
}

.header-main-new .btn-login:hover {
    border-color: var(--color-3, #0c55a5);
    color: var(--color-3, #0c55a5);
}

.header-main-new .btn-register {
    background: linear-gradient(90deg, #38607c, #62a6d1);
    color: #ffffff;
    border: solid 1px #2554a0;
}

.header-main-new .btn-register:hover {
    opacity: 0.9;
    box-shadow: 0 4px 12px rgba(12, 85, 165, 0.25);
    color: #ffffff;
}

/* HÃƒÂ ng dÃ†Â°Ã¡Â»â€ºi: Menu Navigation */
.header-main-new .header-bottom-row {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    width: 100%;
}

.header-main-new .nav-menu {
    display: flex;
    align-items: center;
}

.header-main-new .menu-list {
    display: flex;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 26px;
}

.header-main-new .menu-item {
    position: relative;
    display: flex;
    align-items: center;
}

.header-main-new .menu-link {
    color: #1a1a1a;
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
    display: flex;
    align-items: center;
    padding: 4px 0;
    position: relative;
    text-transform: uppercase;
    transition: color 0.2s ease;
}

/* Active Underline Indicator */
.header-main-new .menu-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 100%;
    height: 3px;
    background: transparent;
    border-radius: 3px 3px 0 0;
    transition: background 0.25s ease;
}

.header-main-new .menu-link .icon-arrow-down {
    margin-left: 5px;
    transition: transform 0.25s ease;
    flex-shrink: 0;
    position: relative;
    top: -2px;
}

.header-main-new .menu-item:hover>.menu-link-row>.menu-link .icon-arrow-down,
.header-main-new .menu-item:hover>.menu-link .icon-arrow-down {
    transform: rotate(180deg);
}

.header-main-new .menu-item:hover>.menu-link-row>.menu-link,
.header-main-new .menu-item:hover>.menu-link,
.header-main-new .menu-item.active>.menu-link-row>.menu-link,
.header-main-new .menu-item.active>.menu-link {
    color: var(--color-3, #0c55a5);
}

.header-main-new .menu-item:hover>.menu-link-row>.menu-link::after,
.header-main-new .menu-item:hover>.menu-link::after,
.header-main-new .menu-item.active>.menu-link-row>.menu-link::after,
.header-main-new .menu-item.active>.menu-link::after {
    background: var(--color-3, #0c55a5);
}

/* ==========================================================================
   DROPDOWN MENU LEVEL 2 & LEVEL 3 (DESKTOP)
   ========================================================================== */

.header-main-new .dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: #ffffff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    min-width: 135px;
    width: max-content;
    max-width: 230px;
    padding: 8px 0;
    list-style: none;
    margin: 4px 0 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 999;
}

.header-main-new .menu-item.has-dropdown:hover>.dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.header-main-new .dropdown-item {
    position: relative;
}

.header-main-new .dropdown-link {
    font-size: 14px;
    font-weight: 500;
    color: #222222;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease;
    width: 100%;
}

.header-main-new .dropdown-link .icon-arrow-right {
    margin-left: 8px;
    transition: transform 0.25s ease;
    flex-shrink: 0;
}

.header-main-new .dropdown-item:hover>.dropdown-link,
.header-main-new .dropdown-item:hover>.lvl2-link-row>.dropdown-link {
    background: #f7f9fc;
    color: var(--color-3, #0c55a5);
}

.header-main-new .dropdown-item.has-sub-dropdown:hover .icon-arrow-right {
    transform: translateX(4px);
}

/* Menu CÃ¡ÂºÂ¥p 3 (Flyout bÃƒÂªn phÃ¡ÂºÂ£i) */
.header-main-new .sub-dropdown-menu {
    position: absolute;
    top: 0;
    left: 100%;
    background: #ffffff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    min-width: 210px;
    padding: 8px 0;
    list-style: none;
    margin: 0;
    opacity: 0;
    visibility: hidden;
    transform: translateX(10px);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 1000;
}

.header-main-new .dropdown-item.has-sub-dropdown:hover>.sub-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

.header-main-new .sub-dropdown-link {
    font-size: 13.5px;
    font-weight: 500;
    color: #333333;
    padding: 8px 18px;
    display: block;
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease;
}

.header-main-new .sub-dropdown-link:hover {
    background: #f7f9fc;
    color: var(--color-3, #0c55a5);
}

.header-main-new .nav-toggle {
    display: none;
    background: transparent;
    border: none;
    color: #1a1a1a;
    cursor: pointer;
    padding: 6px;
}

/* ---- Mobile Overlay Backdrop ---- */
.header-main-new .nav-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.header-main-new .nav-overlay.is-active {
    opacity: 1;
    visibility: visible;
}

/* ==========================================================================
   SEARCH MODAL SLIDE DOWN OVERLAY
   ========================================================================== */

.header-main-new .search-modal {
    position: fixed;
    inset: 0;
    z-index: 1200;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.35s ease, visibility 0.35s ease;
}

.header-main-new .search-modal.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.header-main-new .search-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
}

.header-main-new .search-modal-content {
    position: relative;
    z-index: 2;
    background: #ffffff;
    width: 100%;
    padding: 44px 24px 48px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transform: translateY(-100%);
    transition: transform 0.38s cubic-bezier(0.16, 1, 0.3, 1);
}

.header-main-new .search-modal.is-open .search-modal-content {
    transform: translateY(0);
}

.header-main-new .search-modal-close {
    position: absolute;
    top: 8px;
    right: 14px;
    background: transparent;
    border: none;
    color: #000000;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.header-main-new .search-modal-close:hover {
    background: #f7f7f7;
}

.header-main-new .search-modal-container {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.header-main-new .search-modal-form {
    width: 100%;
    /* margin-bottom: 24px; */
}

.header-main-new .search-input-box {
    display: flex;
    align-items: center;
    width: 100%;
    height: 48px;
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 24px;
    padding: 0 20px;
    gap: 12px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.header-main-new .search-input-box:focus-within {
    border-color: var(--color-3, #0c55a5);
    box-shadow: 0 0 0 2px rgba(12, 85, 165, 0.15);
}

.header-main-new .search-box-icon {
    flex-shrink: 0;
    color: #666666;
}

.header-main-new .search-input-box input {
    flex: 1;
    border: none;
    background: transparent;
    outline: none;
    font-size: 15px;
    color: #000000;
    font-weight: 500;
}

.header-main-new .search-quick-links {
    width: 100%;
    text-align: left;
}

.header-main-new .quick-links-title {
    font-size: 16px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 12px;
}

.header-main-new .quick-links-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.header-main-new .quick-links-list li a {
    font-size: 13.5px;
    font-weight: 500;
    color: #555555;
    background: #f4f4f4;
    padding: 6px 14px;
    border-radius: 16px;
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
}

.header-main-new .quick-links-list li a:hover {
    background: var(--color-3, #0c55a5);
    color: #ffffff;
}

/* ==========================================================================
   RESPONSIVE LAYOUT (< 992px)
   ========================================================================== */

@media (max-width: 992px) {
    .header-main-new .navbar-content-2row {
        padding: 8px 0;
        gap: 12px;
    }

    .header-main-new .logo-img {
        height: 60px;
    }

    .header-main-new .header-right-col {
        flex-direction: row;
        align-items: center;
        justify-content: flex-end;
        gap: 0;
    }

    .header-main-new .header-bottom-row {
        display: contents;
    }

    .header-main-new .nav-overlay {
        display: block;
    }

    .header-main-new .desktop-only {
        display: none !important;
    }

    .header-main-new .nav-toggle {
        display: flex;
    }

    /* Mobile Drawer Top Bar Header */
    .header-main-new .mobile-drawer-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        padding: 5px 12px;
        border-bottom: 1px solid #eeeeee;
        margin-bottom: 12px;
    }

    .header-main-new .mobile-logo-img {
        height: 110px;
        width: auto;
        object-fit: contain;
    }

    .header-main-new .mobile-drawer-close {
        background: transparent;
        border: none;
        color: #1a1a1a;
        cursor: pointer;
        padding: 4px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* Nav Menu convertirse en Drawer TrÃ†Â°Ã¡Â»Â£t tÃ¡Â»Â« bÃƒÂªn trÃƒÂ¡i */
    .header-main-new .nav-menu {
        position: fixed;
        top: 0;
        left: -320px;
        width: 300px;
        max-width: 85vw;
        height: 100vh;
        background: #ffffff;
        z-index: 1100;
        flex-direction: column;
        align-items: flex-start;
        justify-content: flex-start;
        padding: 0 0 24px;
        box-shadow: 4px 0 24px rgba(0, 0, 0, 0.12);
        transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        overflow-y: auto;
    }

    .header-main-new .nav-menu.mobile-open {
        left: 0;
    }

    .header-main-new .menu-list {
        flex-direction: column;
        width: 100%;
        gap: 0;
        height: auto;
        padding: 0 16px;
    }

    .header-main-new .menu-item {
        width: 100%;
        height: auto;
        flex-direction: column;
        align-items: flex-start;
        border-bottom: 1px solid #f5f5f5;
    }

    .header-main-new .menu-link-row {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        padding: 12px 0;
    }

    .header-main-new .menu-link {
        font-size: 14px;
        font-weight: 700;
        color: #1a1a1a;
        text-transform: uppercase;
        padding: 0;
        height: auto;
    }

    .header-main-new .menu-link::after {
        display: none !important;
    }

    /* Toggle Accordion Buttons */
    .header-main-new .mobile-dropdown-toggle,
    .header-main-new .mobile-dropdown-toggle-lvl2 {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 28px;
        height: 28px;
        background: #f4f4f4;
        border-radius: 6px;
        border: none;
        cursor: pointer;
        color: #333;
        transition: background 0.2s, color 0.2s;
        flex-shrink: 0;
    }

    .header-main-new .mobile-dropdown-toggle.is-open,
    .header-main-new .mobile-dropdown-toggle-lvl2.is-open {
        background: var(--color-3, #0c55a5);
        color: #ffffff;
    }

    .header-main-new .mobile-dropdown-toggle.is-open .line-v,
    .header-main-new .mobile-dropdown-toggle-lvl2.is-open .line-v {
        display: none;
    }

    /* Mobile Submenu Accordion Layout (Level 2 & Level 3) */
    .header-main-new .dropdown-menu,
    .header-main-new .sub-dropdown-menu {
        position: static;
        width: 100%;
        box-shadow: none;
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        display: none;
        border-top: none;
        transform: none;
        transition: none;
    }

    /* Menu Level 2 trên Mobile */
    .header-main-new .lvl2-menu {
        list-style: disc;
        list-style-type: disc;
        padding: 4px 0 8px 24px;
    }

    .header-main-new .lvl2-menu>.dropdown-item {
        width: 100%;
        display: list-item;
        list-style: disc;
        list-style-type: disc;
    }

    .header-main-new .lvl2-menu>.dropdown-item::marker {
        color: var(--color-3, #0c55a5);
    }

    .header-main-new .dropdown-link {
        padding: 8px 0;
        font-size: 13.5px;
        font-weight: 600;
    }

    .header-main-new .dropdown-link .icon-arrow-right {
        display: none;
    }

    /* Menu Level 3 trên Mobile */
    .header-main-new .lvl3-menu,
    .header-main-new .sub-dropdown-menu {
        list-style: none;
        list-style-type: none;
        padding: 4px 0 8px 12px;
    }

    .header-main-new .lvl3-menu>.sub-dropdown-item {
        display: block;
        list-style: none;
    }

    .header-main-new .sub-dropdown-link {
        padding: 6px 0 6px 12px;
        font-size: 13px;
        border-left: 2px solid var(--color-3, #0c55a5);
    }

    /* Mobile Auth Buttons in Drawer Footer */
    .header-main-new .mobile-drawer-actions {
        display: flex;
        flex-direction: column;
        gap: 10px;
        width: 100%;
        padding: 20px 16px 0;
        margin-top: auto;
    }

    .header-main-new .mobile-drawer-actions .header-btn {
        width: 100%;
    }


    .header-main-new .menu-link .icon-arrow-down {
        display: none;
    }
}
