.nav-bar {
    height: var(--nav-bar-height);
    background-color: var(--color-primary);
    position: sticky;
    top: -100px;
    left: 0;
    width: 100%;
    z-index: 999;
    transition: top 0.5s ease;
    border-bottom: 1px solid var(--color-primary);
}

.nav-bar-main {
    display: flex;
    height: 100%;
    width: 100%;
    justify-content: space-between;
    align-items: center;
}
.nav-bar-main-layer {
    display: none;
}

.nav-bar-logo {
    display: none;
}

.sticky {
    top: 0;
}

.nav-item,
.nav-link {
    height: 100%;
    position: relative;
}

.nav-link {
    text-decoration: none;
    transition: color 0.3s ease;
    text-transform: uppercase;
    display: flex;
    align-items: center;
}

.nav-item::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 4px;
    background-color: var(--color-white);
    transition: width 0.3s ease;
    border-radius: 1px;
}

.nav-item-sub {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    background-color: var(--color-white);
    padding: 6px 0;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 3px 6px rgba(0, 0, 0, 0.1), 0 10px 20px rgba(0, 0, 0, 0.1);
    animation: slideUp 0.5s ease forwards;
    overflow-y: auto;
    overflow-x: hidden;
    display: none;
}
.nav-item-sub-col {
    padding-right: 24px;
}
.nav-item-sub a {
    text-wrap: nowrap;
    white-space: nowrap;
}

.nav-item::before {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 100%;
    height: 20px;
}

@media (min-width: 993px) {
    .nav-item:hover > .nav-item-sub {
        display: flex;
    }
}

.nav-link {
    font-size: 14px;
    font-weight: 500;
}

.nav-item-sub li {
    width: 100%;
}

.nav-item-sub li a {
    width: 100%;
    height: 100%;
    color: var(--color-primary);
    font-size: 0.875rem;
    display: block;
    padding: 8px 14px 8px 20px;
    line-height: 1.5;
    text-align: left;
}
.nav-item-sub li a:hover {
    color: var(--color-secondary);
    text-decoration: underline;
    text-decoration-color: var(--color-secondary);
}
.nav-item-sub hr {
    border: 1px solid #878787;
    height: 100%;
    opacity: 0.3;
    margin: 0;
    height: auto;
}

/* nav bar actions */
.nav-bar-actions {
    display: flex;
    align-items: center;
}
.nav-bar-icons {
    display: flex;
    align-items: center;
    gap: 24px;
}
.nav-bar-icon-item > img {
    width: 20px;
    height: 20px;
}

.nav-bar-icon-language img {
    width: 24px;
    height: 24px;
    object-fit: cover;
}

/* search */
.nav-bar .search-container {
    position: relative;
    display: flex;
    align-items: center;
    margin-right: 24px;
}

.search-input {
    width: 0;
    height: 40px;
    border: 1px solid #ccc;
    border-radius: 100px;
    transition: width 0.3s ease, right 0.3s ease;
    opacity: 1;
    right: 8px;
    position: absolute;
    outline: none;
    border: none;
}

.search-icon {
    cursor: pointer;
    transition: opacity 0.3s;
    z-index: 2;
    background-color: transparent;
}
.nav-bar-btn-search {
    display: none;
}

.search-icon > p,
.search-container-btn-back {
    display: none;
}
@media (min-width: 992px) {
    .search-container:hover .search-input {
        width: 280px;
        opacity: 1;
        padding: 0 20px;
        right: -11px;
    }
}

/* toggle menu */
.nav-bar-toggle-menu {
    position: absolute;
    right: 4px;
    top: calc(50% + 2px);
    transform: translateY(-50%);
    display: none;
}
.nav-bar-open-menu,
.nav-bar-close-menu {
    background-color: transparent;
    padding: 4px 8px;
    font-size: 24px;
    color: var(--color-white);
    display: none;
    animation: show .3s ease;
}
.nav-bar-open-menu.active-mobile,
.nav-bar-close-menu.active-mobile {
    display: block;
} 


@media (max-width: 1200px) {
    .nav-bar-list {
        gap: 32px;
    }
    .nav-link {
        font-size: 12px;
    }
}

@media (max-width: 992px) {
    .nav-bar {
        top: 0;
    }
    .nav-bar > div {
        display: flex;
        align-items: center;
    }
    .nav-bar-main {
        position: fixed;
        display: none;
        flex-direction: column;
        background-color: var(--color-white);
        top: var(--nav-bar-height);
        max-height: calc(100vh - var(--nav-bar-height));
        right: 0;
        bottom: 0;
        width: 360px;  
        max-width: 80%; 
        z-index: 100;
        animation: show .3s ease;
    }
    .nav-bar-main-layer {
        position: fixed;
        top: var(--nav-bar-height);
        left: 0;
        right: 0;
        bottom: 0;
        background-color: rgba(0, 0, 0, 0.6);
        z-index: 10;
        animation: show .3s ease;
    }
    .nav-bar-main.active-mobile,
    .nav-bar-main.active-mobile ~ .nav-bar-main-layer {
        display: flex !important;
    }

    /* nav bar logo */
    .nav-bar-logo {
        width: 44px;
        display: flex;
        align-items: end;
        gap: 8px;
    }
    .nav-bar-logo img {
        width: 100%;
    }
    .nav-bar-logo-content {
        color: #fff;
        font-size: 12px;
        font-weight: 600;
        line-height: 18px;
    }
    .nav-bar-logo-content h6 {
        margin: 0;
        font-size: 15px;
        line-height: 24px;
        text-wrap: nowrap;
        white-space: nowrap;
    }
    .nav-bar-logo-content p {
        text-wrap: nowrap;
        white-space: nowrap;
    }

    /* nav bar menu */
    .nav-bar-list {
        flex-direction: column;
        align-items: start !important;
        width: 100%;
        gap: 0;
        flex: 1;
        padding: 12px;
        max-height: calc(100% - 60px);
        overflow-y: auto;
    }
    .nav-item {
        height: auto;
        width: 100%;
        border-bottom: 1px solid var(--color-text-light);
    }
    .nav-link {
        width: 100%;
        height: auto;
        padding: 12px;
        font-size: 16px;
        color: var(--color-primary) !important;
        justify-content: space-between;
    }
    .nav-item::after {
        content: none;
    }
    .nav-link > i {
        padding: 4px 0 4px 12px;
    }

    /* nav bar subitem */
    .nav-item-sub {
        position: static;
        box-shadow: none;
        background-color: #F3F7FA;
        margin-bottom: 4px;
        flex-direction: column;
    }

    .nav-item-sub hr {
        display: none;
    }

    /* nav bar actions */
    .nav-bar-actions {
        background-color: var(--color-primary);
        width: 100%;
        justify-content: center ;
        min-height: 60px;
        padding-top: 6px;
        padding-bottom: 68px;
    }
    .nav-bar .search-container.active-mobile {
        position: fixed;
        flex-direction: column;
        background-color: var(--color-white);
        top: var(--nav-bar-height);
        max-height: calc(100vh - var(--nav-bar-height));
        right: 0;
        bottom: 0;
        width: 360px;  
        max-width: 80%; 
        z-index: 100;
        margin-right: 0;
        gap: 16px;
        padding: 56px 16px 24px;
    }
    .search-container.active-mobile .search-input {
        width: 100%;
        position: static;
        border-radius: 0;
        padding: 6px 4px;
        font-size: 18px;
        border-bottom: 1px solid var(--color-primary);
    }
    .search-container.active-mobile .nav-bar-btn-search {
        background-color: var(--color-primary);
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
        border-radius: 4px;
        padding: 9px 8px !important;
        width: 100%;
        font-size: 16px;
    }
    .nav-bar .search-container.active-mobile .search-icon {
        display: none;
    }
    .search-container.active-mobile .nav-bar-btn-search svg {
        width: 18px;
        height: 18px;
    }
    .search-container.active-mobile .search-container-btn-back {
        display: flex;
        gap: 6px;
        align-items: center;
        font-size: 16px;
        font-weight: 500;
        cursor: pointer;
        position: absolute;
        left: 16px;
        top: 6px;
        padding: 8px 8px 8px 0;
        color: #757F95;
    }

    /* toggle */
    .nav-bar-toggle-menu {
        display: block;
    }
    .nav-bar-toggle-menu.active-mobile {
        display: flex !important;
    }
}

