/* ==========================================================================
   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);
    }
}

/* ==========================================================================
   HEADER TOP BAR (LEFT BRAND, CENTER PILL SEARCH, RIGHT BELL & AUTH BUTTONS)
   ========================================================================== */
.header-main-new .header-top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    gap: 20px;
}

/* ---- Left: Logo & Brand Name & Slogan ---- */
.header-main-new .header-brand-wrap {
    flex-shrink: 0;
}

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

.header-main-new .header-logo-img {
    height: 56px;
    width: 56px;
    object-fit: contain;
    border-radius: 50%;
    flex-shrink: 0;
    transition: transform 0.25s ease;
}

.header-main-new .header-brand-link:hover .header-logo-img {
    transform: scale(1.04);
}

.header-main-new .header-brand-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.header-main-new .brand-title {
    font-size: 22px;
    font-weight: 800;
    color: #0c55a5;
    letter-spacing: 0.5px;
    line-height: 1.15;
    text-transform: uppercase;
}

.header-main-new .brand-slogan {
    font-size: 12.5px;
    font-weight: 500;
    color: #64748b;
    line-height: 1.2;
}

/* ---- Center: Pill Search Bar ---- */
.header-main-new .header-search-bar {
    flex: 1;
    max-width: 480px;
    margin: 0 16px;
}

.header-main-new .header-search-form {
    position: relative;
    width: 100%;
    height: 44px;
    display: flex;
    align-items: center;
    background: #ffffff;
    border: 1px solid #dbeafe;
    border-radius: 50px;
    padding: 3px 4px 3px 20px;
    box-shadow: 0 2px 10px rgba(0, 119, 255, 0.04);
    transition: all 0.25s ease;
}

.header-main-new .header-search-form:hover {
    border-color: #93c5fd;
    box-shadow: 0 4px 14px rgba(0, 119, 255, 0.08);
}

.header-main-new .header-search-form:focus-within {
    border-color: #0077ff;
    box-shadow: 0 0 0 3px rgba(0, 119, 255, 0.15);
}

.header-main-new .header-search-input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    font-size: 14px;
    font-weight: 400;
    color: #1e293b;
    padding: 0;
    min-width: 0;
}

.header-main-new .header-search-input::placeholder {
    color: #94a3b8;
    font-weight: 400;
}

.header-main-new .header-search-btn {
    width: 46px;
    height: 36px;
    border-radius: 20px;
    border: none;
    background: linear-gradient(135deg, #0088ff 0%, #0066ee 100%);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.2s ease;
    padding: 0;
}

.header-main-new .header-search-btn:hover {
    background: linear-gradient(135deg, #0077ee 0%, #0055dd 100%);
    transform: scale(1.04);
}

/* ---- Right: Actions (Bell, Register, Login) ---- */
.header-main-new .header-actions-wrap {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-shrink: 0;
}

/* Bell Notification */
.header-main-new .header-bell-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #0c55a5;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.header-main-new .header-bell-btn:hover {
    color: #0077ff;
    background: #f1f5f9;
    transform: scale(1.05);
}

.header-main-new .bell-count-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 17px;
    height: 17px;
    background: #ef4444;
    color: #ffffff;
    border-radius: 50%;
    font-size: 10px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1.5px solid #ffffff;
    line-height: 1;
    box-shadow: 0 2px 4px rgba(239, 68, 68, 0.4);
}

/* Register Link */
.header-main-new .header-link-register {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14.5px;
    font-weight: 600;
    color: #0f172a;
    transition: color 0.2s ease;
    padding: 6px 0;
}

.header-main-new .header-link-register svg {
    color: #0c55a5;
    transition: color 0.2s ease;
}

.header-main-new .header-link-register:hover {
    color: #0077ff;
}

.header-main-new .header-link-register:hover svg {
    color: #0077ff;
}

/* Login Pill Button */
.header-main-new .header-btn-login {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 22px;
    border-radius: 24px;
    background: linear-gradient(90deg, #0088ff 0%, #0066ee 100%);
    font-size: 14px;
    font-weight: 500;
    color: #fff;
    box-shadow: 0 4px 14px rgba(0, 119, 255, 0.3);
    transition: all 0.25s ease;
}

.header-main-new .header-btn-login:hover {
    background: linear-gradient(90deg, #0077ee 0%, #0055dd 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0, 119, 255, 0.45);
}

/* Logged in User Button */
.header-main-new .header-user-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 18px;
    border-radius: 24px;
    background: #f1f5f9;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s ease;
    border: 1px solid #e2e8f0;
}

.header-main-new .header-user-btn:hover {
    background: #e2e8f0;
    border-color: #cbd5e1;
}

/* ==========================================================================
   MENU HEADER (Sub-bar underneath top bar)
   ========================================================================== */
/* ==========================================================================
   MENU HEADER (Dark Navy Ribbon Over Slide)
   ========================================================================== */
.header-main-new .menu_header {
    background: #003c85;
    border-bottom: none;
    position: relative;
    z-index: 90;
}

/* On Home Page: Menu sits directly on top of the slide image! */
.classHome .header-main-new .menu_header {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    z-index: 95;
    background: transparent;
    pointer-events: none;
}

.classHome .header-main-new .menu_header .ctnr {
    pointer-events: auto;
}

/* Hide floating ribbon when sticky header is active on scroll */
.header-main-new.is-sticky .menu_header {
    display: none;
}

/* Ribbon container with slanted/curved end */
.header-main-new .header-bottom-row {
    display: inline-flex;
    align-items: center;
    position: relative;
    z-index: 10;
    padding: 0 45px 0 0;
}

/* Background extending to left edge of screen with slanted right edge */
.header-main-new .header-bottom-row::before {
    content: '';
    position: absolute;
    top: 0;
    left: -3000px;
    right: 0;
    bottom: 0;
    background: #003c85;
    clip-path: polygon(0 0, 100% 0, calc(100% - 32px) 100%, 0 100%);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.12);
    z-index: -1;
    pointer-events: none;
}

.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: 0;
}

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

/* Thin vertical separator between menu items (|) */
.header-main-new .menu-item:not(:last-child)::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 1px;
    height: 16px;
    background: rgba(255, 255, 255, 0.22);
    pointer-events: none;
}

.header-main-new .menu-link {
    color: #ffffff;
    font-size: 14.5px;
    font-weight: 600;
    text-decoration: none !important;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 10px 18px;
    position: relative;
    text-transform: none;
    transition: color 0.2s ease;
    white-space: nowrap;
}

.header-main-new .menu-link:hover {
    color: #ffd43b;
}

/* Active Underline Indicator (Golden yellow line directly below item) */
.header-main-new .menu-link::after {
    content: '';
    position: absolute;
    bottom: 0px;
    left: 14px;
    right: 14px;
    height: 3.5px;
    background: transparent;
    border-radius: 2px 2px 0 0;
    transition: background-color 0.2s ease;
}

.header-main-new .menu-item.active>.menu-link-row>.menu-link::after,
.header-main-new .menu-item.active>.menu-link::after,
.header-main-new .menu-item:hover>.menu-link-row>.menu-link::after,
.header-main-new .menu-item:hover>.menu-link::after {
    background: #ffcb05;
}

.header-main-new .menu-link .icon-arrow-down {
    margin-left: 2px;
    color: rgba(255, 255, 255, 0.85);
    transition: transform 0.25s ease;
    flex-shrink: 0;
    position: static;
}

.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-icon {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
}

.header-main-new .menu-item-icon.icon-home {
    color: #ffcb05;
}

/* ==========================================================================
   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 .header-top-bar {
        padding: 8px 0;
        gap: 12px;
    }

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

    .header-main-new .brand-title {
        font-size: 18px;
    }

    .header-main-new .brand-slogan {
        font-size: 11px;
    }

    .header-main-new .header-search-bar {
        display: none;
    }

    .header-main-new .header-link-register {
        display: none;
    }

    .header-main-new .header-btn-login {
        padding: 7px 14px;
        font-size: 12.5px;
    }

    .header-main-new .header-actions-wrap {
        gap: 10px;
    }

    .header-main-new .menu_header {
        display: contents;
    }

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

    .header-main-new .header-bottom-row::before {
        display: none !important;
    }

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

    .header-main-new .menu-item-icon {
        color: #0c55a5;
    }

    .header-main-new .menu-item-icon.icon-home {
        color: #ffcb05;
    }

    .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;
    }
}

@media (max-width: 576px) {
    .header-main-new .brand-slogan {
        display: none;
    }

    .header-main-new .brand-title {
        font-size: 16px;
    }

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

    .header-main-new .header-btn-login span {
        display: none;
    }

    .header-main-new .header-btn-login {
        padding: 8px;
        border-radius: 50%;
        width: 36px;
        height: 36px;
        justify-content: center;
    }
}