/* Header Core */
.header {
    width: 100%;
    z-index: 1000;
    position: relative;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

/* Header Top */
.header-top {
    background: #000000;
    /* Dark blue background */
    padding: 8px 0;
    transition: all 0.3s ease;
}

.header.is-sticky .header-top {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1001;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 10px 0;
    background: #000000;
}

.header-top-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.header-logo img {
    width: 100%;
    max-width: 200px;
    display: block;
}

.header-middle {
    display: flex;
    align-items: center;
    gap: 25px;
    flex: 1;
    justify-content: center;
}

.header-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 15px;
}

.header-action-mobile {
    display: none;
    align-items: center;
    gap: 15px;
}

.header-search-toggle {
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-menu-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    text-transform: uppercase;
    transition: color 0.3s;
}

.mobile-only {
    display: none !important;
}

.header-menu-toggle:hover {
    color: var(--color-sub);
}

/* Header Search */
.header-search {
    flex: 1;
    max-width: 500px;
}

.header-search form {
    display: flex;
    background: #fff;
    border-radius: 4px;
    overflow: hidden;
    height: 42px;
}

.header-search input {
    flex: 1;
    border: none;
    padding: 0 15px;
    outline: none;
    font-size: 14px;
    color: #333;
}

.header-search button {
    background: transparent;
    border: none;
    padding: 0 15px;
    cursor: pointer;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s;
}

.header-search button:hover {
    color: var(--color-sub);
}

/* Header Hotline */
.header-hotline {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #fff;
}

.hl-icon {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

.header-hotline:hover .hl-icon {
    background: var(--color-sub);
}

.hl-info {
    display: flex;
    flex-direction: column;
}

.hl-info p {
    font-size: 12px;
    color: #ccc;
    line-height: 1.2;
}

.hl-info h2 {
    color: var(--color-sub);
    font-size: 16px;
    font-weight: 700;
    transition: color 0.3s;
    line-height: 1.2;
}

.header-hotline:hover .hl-number {
    color: #fff;
}

/* Header Bottom */
.header-bottom {
    background: #fff;
    border-bottom: 1px solid #eaeaea;
}

.header-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-item {
    position: relative;
}

.nav-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 10px;
    gap: 8px;
    color: #000;
    /* Dark blue text */
    transition: all 0.3s ease;
    min-width: 100px;
}

.nav-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease, color 0.3s ease;
}

.nav-icon img {
    width: 35px;
    height: 35px;
    object-fit: contain;
    filter: brightness(0);
}

.nav-text {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    text-align: center;
}

.nav-link:hover {
    color: var(--color-sub);
}

.nav-link:hover .nav-icon {
    color: var(--color-sub);
    transform: translateY(-3px);
}

/* 3-Level Dropdown Menu (Desktop) */
.sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    width: max-content;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    opacity: 0;
    visibility: hidden;
    transform: translateY(15px);
    transition: all 0.3s ease;
    list-style: none;
    padding: 10px 0;
    margin: 0;
    z-index: 99;
    border-top: 2px solid var(--color-sub);
}

.nav-item:hover .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.sub-menu>li {
    position: relative;
}

.sub-menu>li>a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    color: #333;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    border-bottom: 1px solid #f5f5f5;
}

.sub-menu>li:last-child>a {
    border-bottom: none;
}

.sub-menu>li>a:hover {
    color: var(--color-sub);
    background: #fdfaf6;
    padding-left: 25px;
}

/* Level 3 */
.sub-menu-2 {
    position: absolute;
    top: -2px;
    /* align with border top */
    left: 100%;
    background: #fff;
    min-width: 220px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    opacity: 0;
    visibility: hidden;
    transform: translateX(15px);
    transition: all 0.3s ease;
    list-style: none;
    padding: 10px 0;
    margin: 0;
    border-top: 2px solid var(--color-sub);
}

.sub-menu>li:hover .sub-menu-2 {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

.sub-menu-2>li>a {
    display: block;
    padding: 12px 20px;
    color: #333;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
    border-bottom: 1px solid #f5f5f5;
}

.sub-menu-2>li>a:hover {
    color: var(--color-sub);
    background: #fdfaf6;
    padding-left: 25px;
}


/* Mobile Sidebar */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
}

.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

.mobile-sidebar {
    position: fixed;
    top: 0;
    left: -320px;
    width: 80%;
    max-width: 320px;
    height: 100%;
    background: #fff;
    z-index: 1001;
    box-shadow: 5px 0 15px rgba(0, 0, 0, 0.1);
    transition: left 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.mobile-sidebar.active {
    left: 0;
}

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 20px;
    background: #000000;
}

.sidebar-logo img {
    height: 55px;
}

.close-sidebar {
    background: transparent;
    border: none;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s;
}

.close-sidebar:hover {
    transform: rotate(90deg);
}

.sidebar-body {
    padding: 20px 0;
}

.sidebar-hotline {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 20px 20px;
    border-bottom: 1px solid #eee;
    margin-bottom: 10px;
}

.sidebar-hotline .hl-icon {
    background: #f5f5f5;
    color: #000000;
}

.hl-icon img {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

.sidebar-hotline .hl-number {
    color: #000000;
}

.mobile-nav {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mob-item {
    border-bottom: 1px solid #f5f5f5;
}

.mob-item-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.mob-item-wrap a,
.mob-item>a {
    display: block;
    padding: 15px 20px;
    font-size: 15px;
    font-weight: 600;
    flex: 1;
    text-transform: uppercase;
}

.mob-toggle {
    padding: 15px 20px;
    cursor: pointer;
    color: #888;
    transition: transform 0.3s;
}

.mob-toggle.active {
    transform: rotate(180deg);
}

.mob-sub-menu {
    display: none;
    background: #fafafa;
    list-style: none;
    padding: 10px 0;
    margin: 0;
}

.mob-sub-menu .mob-item-wrap a,
.mob-sub-menu li>a {

    font-weight: 500;
    font-size: 14px;
    text-transform: none;
    position: relative;
    padding: 8px 20px;

    padding-left: 40px;
}

.mob-sub-menu .mob-item-wrap a::before {
    content: "";
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--color-primary);
    position: absolute;
    top: 48%;
    left: 27px;
    transform: translateY(-50%);
}

.mob-sub-menu-2 {
    display: none;
    background: #f0f0f0;
    list-style: none;
    padding: 0;
    margin: 0;
}

.mob-sub-menu-2 li>a {
    padding-left: 60px;
    font-weight: 400;
}

/* Search Modal */
.search-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 100px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.search-modal.active {
    opacity: 1;
    visibility: visible;
}

.search-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.search-modal-content {
    position: relative;
    width: 90%;
    max-width: 600px;
    background: #fff;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    transform: translateY(-20px);
    transition: all 0.3s ease;
    z-index: 1;
}

.search-modal.active .search-modal-content {
    transform: translateY(0);
}

.search-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    transition: color 0.3s;
}

.search-modal-close:hover {
    color: #333;
}

.search-modal-body h3 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 20px;
    color: #000000;
    text-align: center;
}

.search-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
    border-bottom: 2px solid #eee;
    padding-bottom: 5px;
}

.search-input-wrap input {
    flex: 1;
    border: none;
    padding: 10px 0;
    font-size: 16px;
    outline: none;
    background: transparent;
}

.search-input-wrap button {
    background: none;
    border: none;
    color: var(--color-sub);
    cursor: pointer;
    padding: 10px;
}

/* Responsive Customizations */
@media (max-width: 1024px) {
    .header-top-wrap {
        flex-wrap: nowrap;
    }

    .header-bottom {
        display: none;
    }

    .header-hotline.email {
        display: none;
    }
}

@media (max-width: 767px) {
    .desktop-only {
        display: none !important;
    }

    .mobile-only {
        display: flex !important;
    }

    .header-hotline {
        display: none;
    }

    .header-search {
        display: none;
    }

    .header-action-mobile {
        display: flex;
    }

    .header-menu-toggle span {
        display: none;
    }

    .header-logo img {
        max-width: 170px;
    }

    .header-middle {
        flex: 0;
        margin: 0;
    }
}