/* Header Styles */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 80px;
    z-index: 1001;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.4s ease;
    background-color: transparent;
    backdrop-filter: none;
}

header.site-header.hide {
    opacity: 0;
    visibility: hidden;
}

header.site-header.hideScrolled {
    background: transparent !important;
    border-bottom: none !important;
}

/*@media(max-width: 1024px) {*/
/*    .site-header {*/
/*        padding: 15px 30px;*/
/*        height: 100px;*/
/*    }*/
/*}*/
/*@media (max-width: 991px) {*/
/*    .site-header {*/
/*        padding: 10px 15px;*/
/*        height: 90px;*/
/*    }*/
/*}*/

@media (max-width: 768px) {
    .site-header {
        padding: 10px 10px;
        height: 70px;
    }
}

@media (max-width: 575px) {
    .site-header {
        padding: 10px 0;
        height: 60px;
    }
}

/* Header có nền trắng khi cuộn */
.site-header.active,
.site-header.scrolled {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.05);
}

/* Header có nền trong suốt khi menu mở */
.site-header.menu-open {
    background-color: transparent !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    box-shadow: none !important;
    border-bottom: none !important;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Logo */
.header-logo img {
    max-width: 180px;
    height: auto;
    transition: height 0.3s ease,
    opacity 0.3s ease,
    transform 0.3s ease,
    filter 1s ease; /* đổi màu (filter) chạy 1s */
}

.header-logo a.logo-text {
    font-size: 24px;
    font-weight: 700;
    color: var(--white-color);
    /* Màu trắng khi header trong suốt */
    text-decoration: none;
    transition: color 0.4s ease;
}

/* Khi header có nền trắng, chuyển logo sang màu đen */
.site-header.scrolled .header-logo a.logo-text {
    color: var(--black-color);
}
.site-header.header--light.scrolled .header-logo img,
.site-header.scrolled .header-logo img {
    filter: none !important
}

/* Khi menu mở, chuyển logo sang màu trắng */
.site-header.menu-open .header-logo a.logo-text {
    color: var(--white-color) !important;
}

.header-logo.hide {
    opacity: 0;
    transform: translateY(-30px);
}

.header-logo.white.hide {
    opacity: 1;
    transform: translateY(0);
}
header.site-header.header--dark.scrolled.menu-open .header-logo img,
.site-header.header--light.scrolled .header-logo.white img,
.site-header.header--light .header-logo img,
.header-logo.white img {
    filter: brightness(0) invert(1) contrast(100%) !important;
}

header.site-header.hideScrolled .header-logo img {
    filter: none;
}

.header-flexgrow {
    flex-grow: 1;
}

/* Navigation */
.header_nav {
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.header_nav.show-hide,
.header_nav.hide {
    opacity: 0;
    transform: translateY(-30px);
    pointer-events: none;
}

/* Cho phép pseudo hiển thị đúng */
#mega-menu-wrap-primary #mega-menu-primary > li.mega-menu-item {
    overflow: visible !important;
}

/* Reset thẻ <a> để pseudo hoạt động */
#mega-menu-wrap-primary #mega-menu-primary > li.mega-menu-item > a.mega-menu-link {
    position: relative !important;
    display: inline-block !important;
    overflow: visible !important;
}

.header_nav #mega-menu-wrap-primary #mega-menu-primary > li.mega-menu-item > a.mega-menu-link {
    color: var(--black-color);
    text-decoration: none;
    font-weight: 400;
    font-size: 1rem;
    transition: color 0.3s ease;
    position: relative;
}

/* Khi header có nền trắng, chuyển menu sang màu đen */
.site-header.scrolled #mega-menu-wrap-primary #mega-menu-primary > li.mega-menu-item > a.mega-menu-link {
    color: var(--black-color) !important;
}

.site-header.scrolled #mega-menu-wrap-primary #mega-menu-primary > li.mega-menu-item > a.mega-menu-link:hover {
    color: var(--primary-color) !important;
}

/*.site-header.scrolled #mega-menu-wrap-primary #mega-menu-primary > li.mega-menu-item > a.mega-menu-link::after {*/
/*    background: var(--primary-color) !important;*/
/*}*/

/* Khi menu mở, chuyển menu sang màu trắng */
.site-header.menu-open #mega-menu-wrap-primary #mega-menu-primary > li.mega-menu-item > a.mega-menu-link {
    color: var(--white-color) !important;
}

.header_nav #mega-menu-wrap-primary #mega-menu-primary > li.mega-menu-item > a.mega-menu-link:hover {
    color: var(--primary-color);
}

/* Tạo underline animation */
/*#mega-menu-wrap-primary #mega-menu-primary > li.mega-menu-item > a.mega-menu-link::after {*/
/*    display: inline-block !important;*/
/*    content: '';*/
/*    position: absolute;*/
/*    bottom: 0;*/
/*    left: 0;*/
/*    width: 0;*/
/*    height: 1px;*/
/*    background-color: var(--primary-color);*/
/*    transition: width 0.3s ease;*/
/*    z-index: 2;*/
/*}*/

/* Hover hiển thị gạch */
/*#mega-menu-wrap-primary #mega-menu-primary > li.mega-menu-item > a.mega-menu-link:hover::after {*/
/*    width: 100%;*/
/*}*/
.header_nav #mega-menu-wrap-primary #mega-menu-primary > li.mega-menu-flyout ul.mega-sub-menu li.mega-menu-item > a.mega-menu-link{
    border-radius: 8px;
}

@media (max-width: 1024px) {
    .header_nav {
        display: none;
    }
}

/* Menu Button */
.header-iconmenu {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    margin-left: 30px;
    background-color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
    z-index: 1002;
}

.iconmenu {
    width: 25px;
    height: 25px;
    position: relative;
}

@media (max-width: 768px) {
    .header-iconmenu {
        width: 40px;
        height: 40px;
        margin-left: 0;
    }

    .iconmenu {
        width: 20px;
        height: 20px;
    }
}

/* .header-iconmenu:hover {
    background-color: var(--black-color);
} */


.header-iconmenu span {
    position: absolute;
    left: 0;
    width: 100%;
    max-height: 2px;
    height: 2px;
    background-color: var(--white-color);
    transition: all 0.3s ease;
}

.header-iconmenu span:nth-child(1) {
    top: 3px;
    width: 50%;

}

.header-iconmenu span:nth-child(2) {
    top: 11px;
}

.header-iconmenu span:nth-child(3) {
    top: 19px;
    width: 70%;
}

@media (max-width: 768px) {
    .header-iconmenu span:nth-child(1) {
        top: 2px;
    }

    .header-iconmenu span:nth-child(2) {
        top: 10px;
    }

    .header-iconmenu span:nth-child(3) {
        top: 18px;
    }
}

.header-iconmenu:hover span:nth-child(1) {
    width: 100%;
}

.header-iconmenu:hover span:nth-child(2) {
    width: 70%;
}

.header-iconmenu:hover span:nth-child(3) {
    width: 100%;
}


/* Khi active → thành X */
.header-iconmenu.active {
    background-color: var(--white-color);
}


.header-iconmenu.active span {
    background-color: var(--primary-color);
    width: 100%;
}

.header-iconmenu.active span:nth-child(1) {
    transform: rotate(45deg);
    top: 10px;
}

.header-iconmenu.active span:nth-child(2) {
    opacity: 0;
}

.header-iconmenu.active span:nth-child(3) {
    transform: rotate(-45deg);
    top: 10px;
}

@media (max-width: 768px) {
    .header-iconmenu.active span:nth-child(1) {
        top: 8px;
    }


    .header-iconmenu.active span:nth-child(3) {
        top: 8px;
    }
}

/* Overlay menu */
.header_menu {
    padding: 160px 0 40px;
    position: fixed;
    inset: 0;
    background: var(--primary-color);
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    flex-direction: column;
    opacity: 0;
    clip-path: circle(0 at var(--btn-x) var(--btn-y));
    visibility: hidden;
    transition: all 1.4s ease-in-out;
}

.header_menu.active {
    visibility: visible;
    opacity: 1;
    clip-path: circle(150% at var(--btn-x) var(--btn-y));
}

/* trạng thái đóng: vẫn visible để thấy animation thu */
.header_menu.closing {
    opacity: 1;
    clip-path: circle(0 at var(--btn-x) var(--btn-y));
    visibility: visible;
}

.header-menu-inner,
.header-menu-footer {
    width: 100%;
}

.header-menu-inner {
    max-height: calc(100vh - 220px); /* hoặc 80vh tuỳ thiết kế */
    overflow-y: auto; /* bật cuộn dọc */
    overflow-x: hidden; /* ẩn cuộn ngang nếu có */
}

/* Tùy chỉnh thanh cuộn cho Webkit (Chrome, Edge, Safari) */
.header-menu-inner::-webkit-scrollbar {
    width: 8px; /* độ rộng thanh cuộn */
}

.header-menu-inner::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.5); /* màu thanh cuộn */
    border-radius: 10px; /* bo góc */
    transition: background 0.3s;
}

.header-menu-inner::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.8); /* sáng hơn khi hover */
}

.header-menu-inner::-webkit-scrollbar-track {
    background: transparent; /* nền trong suốt */
}

/* Ẩn mũi tên 2 đầu (scrollbar buttons) */
.header-menu-inner::-webkit-scrollbar-button {
    display: none;
}

/* Firefox */
.header-menu-inner {
    scrollbar-width: thin; /* thanh cuộn nhỏ */
    scrollbar-color: rgba(255, 255, 255, 0.5) transparent;
}

/*css phần nội dung menu*/
.menu-label {
    display: block;
    font-size: 12px;
    line-height: 1.2;
    text-transform: uppercase;
    color: #fff;
    letter-spacing: 0.06em;
    opacity: 0.8;
    border-bottom: 1px solid rgba(255, 255, 255, 0.5);
    padding-bottom: 15px;
}

@media (min-width: 992px) {
    .menu-label {
        font-size: 14px;
    }
}

/* Menu items trong overlay */
.overlay-nav {
    margin: 25px 0;
}

.overlay-nav li {
    opacity: 0;
    transition: all 0.6s ease;
    margin-top: 10px;
}

.overlay-nav li a {
    color: white;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    display: inline-block;
}

.overlay-nav li a:hover {
    transform: translateX(10px);
}

.overlay-nav li a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 3px;
    background-color: white;
    transition: width 0.3s ease;
}

.overlay-nav li a:hover::after {
    width: 100%;
}

.header_menu.active .overlay-nav li {
    opacity: 1;
    transform: translateY(0);
}

.header_menu-left {
    width: 50%;
}

.header_menu-left .overlay-nav li a {
    font-size: clamp(1.2rem, 2vw, 2rem);
}

@media (min-width: 768px) {
    .header_menu-left {
        width: 90%;
    }
}

@media (min-width: 880px) {
    .header_menu-left {
        width: 80%;
    }
}

@media (min-width: 992px) {
    .header_menu-left {
        width: 70%;
    }
}

@media (min-width: 1024px) {
    .header_menu-left {
        width: 60%;
    }
}

@media (min-width: 1240px) {
    .header_menu-left {
        width: 50%;
    }
}

@media (max-width: 768px) {
    .header_menu-left {
        width: 100%;
    }
}

.header_menu-right .overlay-nav li a {
    font-size: clamp(1.4rem, 4vw, 4rem);
    padding-right: 65px;
}

/*Thông liên hệ*/
.header-contacts {
    font-size: 0.9rem;
    border-top: 1px solid rgba(255, 255, 255, 0.5);
    padding-top: 30px;
    color: var(--white-color);
}

.header-contacts .contact-item {
    display: flex;
    flex-direction: column;
    margin-top: 20px;
}

.header-contacts .contact-item:first-child {
    margin-top: 0;
}

.header-contacts .contact-value {
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.75);
    margin: 8px 0 0 0;
}

/*menu footoer*/
.header-menu-footer {
    padding: 10px 0 0;
    color: var(--white-color);
}

.menu_language {
    padding: 10px 0;
}

.menu_language .language {
    margin: 0;
    padding: 0;
    display: flex;
    gap: 20px;
}

.menu_language li.lang-item a {
    display: inline-block;
    font-size: 15px;
    color: #fff;
    opacity: 0.65;
    line-height: 1;
}

.menu_language li.lang-item.current-lang a,
.menu_language li.lang-item a:hover {
    opacity: 1;

}

.header-socials {
    padding: 10px 0;
    display: flex;
    gap: 20px;
}