/* ==========================================================================
   HEADER  (port từ Next.js header.model.css + contact.model.css + language.model.css)
   ========================================================================== */

.header {
    background: transparent;
}

.header.header-sticky {
    position: fixed;
    top: 0;
    z-index: 102;
    width: 100%;
    transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out,
        background 0.3s ease, backdrop-filter 0.3s ease;
    will-change: transform, opacity;
    backdrop-filter: blur(9.95px);
}

.header.is-hidden {
    transform: translateY(-100%);
}

.header.header-scrolled {
    background: rgba(58, 58, 58, 0.6);
    backdrop-filter: blur(9.95px);
}

body.is-search-results-page .header.header-sticky {
    background: rgba(29, 38, 45, 0.72);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

body.is-search-results-page .header.header-scrolled {
    background: rgba(29, 38, 45, 0.82);
}

body.is-search-results-page .header .header-menu-sub {
    background: rgba(29, 38, 45, 0.5);
}

body.is-search-results-page .header-menu {
    background: rgba(29, 38, 45, 0.34);
}

body.is-search-results-page .header-menu .header-menu_item a,
body.is-search-results-page .header-menu h5,
body.is-search-results-page .contact h3,
body.is-search-results-page .header-language .header-language_button h4 {
    color: rgba(255, 255, 255, 0.96);
}

body.is-search-results-page .contact .contact-separation {
    background: rgba(255, 255, 255, 0.28);
}

body.is-search-results-page .contact .header-search svg,
body.is-search-results-page .contact svg {
    color: #fff;
}

.header .header-menu-sub {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    height: 3.13rem;
    background: rgba(0, 0, 0, 0.2);
}

.header-menu h5,
.header .header-menu-sub .icon-logo a {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
}

.header .header-menu-sub .icon-logo svg,
.header .header-menu-sub .icon-logo img {
    width: 3.64013rem;
    height: 2.27681rem;
    flex-shrink: 0;
    object-fit: contain;
}

.header-menu {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    align-items: center;
    height: 2.7rem;
}

.header-menu .header-menu_item {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 2.25rem;
}

.header-menu .header-menu_item a {
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.2;
    text-transform: uppercase;
    letter-spacing: 0;
    white-space: nowrap;
}

.header-menu .header-menu_item a:hover {
    opacity: 0.8;
}

.header-menu .header-menu_item:last-child {
    justify-content: flex-start;
}

.header-menu h5 {
    color: #fff;
    font-size: 1.125rem;
    font-style: normal;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0.075rem;
    text-transform: uppercase;
    text-align: center;
    white-space: nowrap;
}

.icon-logo a .header-menu_item-title {
    display: none;
}

.contact-sub {
    display: none;
}

.contact-link {
    display: inline-block;
    width: auto !important;
}

/* ====== Google Translate — ẩn toàn bộ UI mặc định ====== */
/* #google_translate_element phải off-screen (không display:none) để widget attach được */
#google_translate_element {
    position: absolute !important;
    left: -9999px !important;
    top: -9999px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    pointer-events: none !important;
    opacity: 0 !important;
}

.goog-te-gadget,
.goog-te-gadget-simple,
.goog-te-gadget-icon,
.goog-te-combo,
.goog-logo-link,
.goog-te-banner-frame,
.goog-te-banner-frame.skiptranslate,
.goog-te-balloon-frame,
.goog-te-ftab,
.goog-te-ftab-float,
.goog-te-menu-frame,
.goog-te-menu-value,
.goog-tooltip,
.goog-tooltip:hover,
#goog-gt-tt,
#goog-gt-tt:hover,
.goog-gt-tt,
.goog-te-spinner-pos,
.goog-te-spinner,
.goog-te-spinner-animation,
.goog-gt-vt,
#goog-gt-vt,
div[id^="goog-gt-"],
/* New-gen translate icon/viewer Google chèn động khi hover ảnh/element */
[class^="VIpgJd-"],
[class*=" VIpgJd-"],
[id^="VIpgJd-"],
[id*=" VIpgJd-"] {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    width: 0 !important;
    border: none !important;
    box-shadow: none !important;
    background: none !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* .goog-text-highlight = <font> wrap text khi hover. KHÔNG được display:none
   (sẽ gây nhấp nháy: text ẩn → mất hover → class bỏ → text hiện → hover lại → lặp).
   Chỉ neutralize trang trí (highlight vàng, shadow). */
.goog-text-highlight {
    background-color: transparent !important;
    background-image: none !important;
    box-shadow: none !important;
    border: none !important;
}

/* Google Translate inject iframe top — ẩn hẳn */
iframe.goog-te-banner-frame,
iframe.goog-te-menu-frame {
    display: none !important;
}

/* Body offset do banner — reset về 0 */
body {
    top: 0 !important;
    position: static !important;
}

html {
    margin-top: 0 !important;
}

/* Ẩn skiptranslate placeholder (text "Powered by Google", loading...) */
.skiptranslate {
    display: none !important;
}

/* Safety net cho mọi <font> Google Translate chèn (wrap text dịch):
   luôn visible + bỏ highlight nền/shadow — đặt SAU các rule hide để override. */
font,
font[class],
font[style],
font.skiptranslate {
    display: inline !important;
    visibility: visible !important;
    height: auto !important;
    width: auto !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    background-color: transparent !important;
    background-image: none !important;
    box-shadow: none !important;
    border: none !important;
}

/* ====== Language switcher ====== */
.header-language {
    cursor: pointer;
    position: relative;
    height: 100%;
    display: flex;
    justify-content: flex-start;
    align-items: center;
}

.header-language .menu-language {
    position: absolute;
    top: 110%;
    left: -0.5rem;
    min-width: 300px;
    padding: 0.2rem;
    border-radius: 0.3rem;
    background-color: white;
    box-shadow: 1px 1px 4px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    z-index: 10;

    /* === Animation panel (match framer-motion menuVariants) === */
    opacity: 0;
    transform: translateY(-10px) scale(0.95);
    transform-origin: top center;
    pointer-events: none;
    transition: opacity 0.15s ease-in, transform 0.15s ease-in;
}

.header-language .menu-language.is-open {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
    transition: opacity 0.2s ease-out, transform 0.2s ease-out;
}

.header-language .menu-language .menu-item {
    padding: 0.5rem;
    cursor: pointer;
    border-radius: 0.2rem;

    /* === Stagger animation cho từng item (match itemVariants) === */
    opacity: 0;
    transform: translateX(-20px);
    transition: opacity 0.1s ease, transform 0.1s ease;
}

.header-language .menu-language.is-open .menu-item {
    opacity: 1;
    transform: translateX(0);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.header-language .menu-language.is-open .menu-item:nth-child(1) {
    transition-delay: 0.05s;
}
.header-language .menu-language.is-open .menu-item:nth-child(2) {
    transition-delay: 0.1s;
}
.header-language .menu-language.is-open .menu-item:nth-child(3) {
    transition-delay: 0.15s;
}
.header-language .menu-language.is-open .menu-item:nth-child(4) {
    transition-delay: 0.2s;
}

.header-language .menu-language .menu-item.activate,
.header-language .menu-language .menu-item:hover {
    background-color: #0000001a;
}

.header-language .header-language_button {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 0.48rem;
    color: #fff;
    padding: 0.5rem;
    margin-left: -0.5rem;
    border-radius: 1rem;
    background: transparent;
}

.header-language .header-language_button:hover {
    background: rgba(255, 255, 255, 0.1);
}

.header-language .header-language_button svg {
    width: 0.93938rem;
    height: 0.93938rem;
}

.header-language .header-language_button .icon-down {
    width: 0.52125rem;
    height: 0.52125rem;
}

.header-language .header-language_button h4 {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.75rem;
    font-weight: 400;
    line-height: normal;
}

/* ====== Contact area (right side) ====== */
.contact {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 0.5625rem;
    flex-shrink: 0;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.75rem;
    font-weight: 600;
    line-height: normal;
    text-transform: uppercase;
}

.contact h3 {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.75rem;
    font-weight: 600;
    line-height: normal;
    text-transform: uppercase;
}

.contact .contact-separation {
    width: 0.0625rem;
    height: 0.73063rem;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.16);
}

.contact .header-search svg,
.contact svg {
    color: #fff;
    width: 0.94rem;
    height: 0.94rem;
}

.search-header-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    min-width: 0;
    z-index: 20;
}

.search-header-input {
    width: 0;
    height: 2rem;
    padding: 0;
    border: 1px solid transparent;
    border-radius: 0.5rem;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font-size: 0.875rem;
    font-weight: 400;
    line-height: 1.2;
    text-transform: none;
    opacity: 0;
    pointer-events: none;
    transition: width 0.22s ease, opacity 0.18s ease, padding 0.22s ease, border-color 0.18s ease;
}

.search-header-input::placeholder {
    color: rgba(255, 255, 255, 0.62);
}

.search-header-wrapper.is-open .search-header-input {
    width: 16rem;
    padding: 0.45rem 0.75rem;
    border-color: rgba(255, 255, 255, 0.28);
    opacity: 1;
    pointer-events: auto;
}

.search-header-toggle {
    width: 2rem;
    height: 2rem;
    align-items: center;
    justify-content: center;
    border-radius: 0.5rem;
    transition: background 0.18s ease;
}

.search-header-toggle:hover,
.search-header-wrapper.is-open .search-header-toggle {
    background: rgba(255, 255, 255, 0.12);
}

.search-header-results {
    position: absolute;
    top: calc(100% + 0.65rem);
    right: 0;
    width: min(40rem, calc(100vw - 2rem));
    max-height: min(70vh, 32rem);
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: rgba(29, 38, 45, 0.28) transparent;
    padding: 0.875rem;
    border: 1px solid rgba(29, 38, 45, 0.1);
    border-radius: 0.5rem;
    background: #fff;
    color: #1d262d;
    box-shadow: 0 1rem 2.5rem rgba(0, 0, 0, 0.18);
    text-transform: none;
}

.search-header-results::-webkit-scrollbar {
    display: block;
    width: 0.35rem;
}

.search-header-results::-webkit-scrollbar-track {
    background: transparent;
}

.search-header-results::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: rgba(29, 38, 45, 0.28);
}

.search-header-results[hidden] {
    display: none !important;
}

.search-header-results__section + .search-header-results__section {
    margin-top: 0.875rem;
    padding-top: 0.875rem;
    border-top: 1px solid rgba(29, 38, 45, 0.1);
}

.search-header-results__section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.search-header-results__section-head h3 {
    color: #1d262d;
    font-size: 0.875rem;
    font-weight: 700;
    line-height: 1.2;
    text-transform: uppercase;
}

.search-header-results__section-head a {
    width: auto;
    color: #9b2124;
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
}

.search-header-results__list {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.search-header-results__item {
    display: grid !important;
    grid-template-columns: 4rem minmax(0, 1fr);
    gap: 0.75rem;
    width: 100%;
    padding: 0.45rem;
    border-radius: 0.5rem;
    transition: background 0.18s ease;
}

.search-header-results__item:hover {
    background: rgba(29, 38, 45, 0.06);
}

.search-header-results__item--no-thumb {
    grid-template-columns: minmax(0, 1fr);
}

.search-header-results__thumb {
    width: 4rem;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: 0.375rem;
    background: rgba(29, 38, 45, 0.08);
}

.search-header-results__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.search-header-results__content {
    display: flex;
    min-width: 0;
    flex-direction: column;
    justify-content: center;
    gap: 0.25rem;
}

.search-header-results__title {
    color: #1d262d;
    font-size: 0.875rem;
    font-weight: 700;
    line-height: 1.25;
}

.search-header-results__excerpt {
    display: -webkit-box;
    overflow: hidden;
    color: rgba(29, 38, 45, 0.68);
    font-size: 0.75rem;
    font-weight: 400;
    line-height: 1.35;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.search-header-results mark {
    border-radius: 0.2rem;
    background: rgba(234, 177, 61, 0.42);
    color: inherit;
    padding: 0 0.08rem;
}

.search-header-results__empty {
    color: rgba(29, 38, 45, 0.6);
    font-size: 0.8125rem;
    line-height: 1.4;
    padding: 0.45rem;
}

.icon-menu-header {
    display: none;
    background: transparent;
}

.icon-menu-header svg {
    width: 1.625rem;
}

.icon-menu-header__open svg {
    margin-bottom: 0.5rem;
}

/* ====== Floating social network buttons ====== */
.contact-social-network {
    position: fixed;
    bottom: 5.875rem;
    right: 1.2rem;
    display: inline-flex;
    flex-direction: column;
    gap: 0.62rem;
    z-index: 100;
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.28s ease, transform 0.28s ease;
    will-change: opacity, transform;
}

.contact-social-network.is-cta-hidden {
    opacity: 0;
    transform: translateY(1rem);
    pointer-events: none;
}

.contact-social-network .contact-social-network__link {
    width: 3rem;
    height: 3rem;
    border-radius: 5.34975rem;
    background: #0e9bf8;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 1px 1px 4px rgba(0, 0, 0, 0.25);
    margin: 0.37rem 0;
    position: relative;
    transition: transform 0.2s ease;
}

.contact-social-network .contact-social-network__link:hover {
    transform: scale(1.1);
}

.contact-social-network .contact-social-network__link.red {
    background: #eb001b;
}

.contact-social-network .contact-social-network__link::after {
    position: absolute;
    border-radius: 5.34975rem;
    opacity: 0.16;
    background: rgba(29, 38, 45, 0.45);
    content: "";
    inset: -0.37rem;
}

.contact-social-network .contact-social-network__link.red::after {
    background: #eb001b;
}

.contact-social-network .contact-social-network__link svg {
    width: 1.5rem;
    height: 1.5rem;
    color: #fff;
}

.button-scroll-top {
    background: #fff !important;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.button-scroll-top[hidden] {
    display: none;
}

.contact-social-network .contact-social-network__link.button-scroll-top svg {
    width: 1rem;
    height: 1rem;
    color: #1d262d;
}

/* ========================================================================
   MOBILE
   ======================================================================== */
@media (max-width: 640px) {
    .contact-sub {
        display: flex !important;
        flex-direction: column;
        justify-content: space-between;
        position: absolute;
        top: calc(100% - 1px);
        left: 0;
        right: 0;
        height: 100vh;
        color: white;
        z-index: 100;
        overflow: hidden;
        padding-bottom: 2.3rem;
        background: #1D262D;
        /* position: relative; */
    }

    .contact-sub::before {
        content: "";
        position: absolute;
        inset: 0;
    
        background:
        linear-gradient(
            180deg,
            rgba(12, 12, 12, 0.91) 43.59%,
            rgba(12, 12, 12, 0.27) 69.13%,
            rgba(12, 12, 12, 0.00) 89.42%,
            rgba(12, 12, 12, 0.52) 100%
        ),
        url('/wp-content/uploads/2026/06/Variant4.png'),
        #1D262D;
        background-position: center;
        background-repeat: no-repeat;
        background-size: cover;
    
        opacity: 0.4;
        z-index: -1;
    }

    .contact-sub[hidden] {
        display: none !important;
    }

    .contact-social-network .contact-social-network__link {
        width: 2.5rem;
        height: 2.5rem;
    }

    .contact-social-network {
        right: 1rem;
    }

    .header.show-menu-sub {
        transform: none !important;
    }

    .icon-menu-header {
        display: block;
    }

    .icon-logo a {
        flex-direction: column;
    }

    .icon-logo a .header-menu_item-title {
        display: block;
        font-size: 0.75rem !important;
        white-space: nowrap;
        color: #fff;
    }

    .header-menu_item-title {
        font-size: 0.99106rem !important;
    }

    .header-menu {
        display: none;
    }

    .header .header-menu-sub {
        position: relative;
        height: auto;
        padding: 0.4rem 1rem;
        background-color: rgba(26, 26, 26, 1);
    }

    .search-header-wrapper.is-open {
        position: absolute;
        top: calc(100% + 0.5rem);
        left: 1rem;
        right: 1rem;
        width: auto;
        justify-content: flex-end;
    }

    .search-header-wrapper.is-open .search-header-input {
        width: 100%;
        height: 2.5rem;
        padding: 0.55rem 2.75rem 0.55rem 0.75rem;
        background: #fff;
        color: #1d262d;
    }

    .search-header-wrapper.is-open .search-header-input::placeholder {
        color: rgba(29, 38, 45, 0.48);
    }

    .search-header-wrapper.is-open .search-header-toggle {
        position: absolute;
        top: 50%;
        right: 0.25rem;
        background: #1d262d;
        transform: translateY(-50%);
    }

    .search-header-results {
        top: calc(100% + 0.5rem);
        right: 0;
        left: 0;
        width: 100%;
        max-height: 62vh;
        padding: 0.75rem;
    }

    .search-header-results__item {
        grid-template-columns: 3.75rem minmax(0, 1fr);
    }

    .search-header-results__thumb {
        width: 3.75rem;
    }
    
    .header-padding {
        padding-bottom: 2.38rem !important;
    }

    .header-menu-mobile {
        display: flex;
        flex-direction: column;
        gap: 0.88rem;
        padding: 0 1rem 1rem;
        border: none;
    }
    .header-menu-mobile a span{
      
        text-transform: uppercase;
    }

    .header-menu-mobile a {
        color: #fff;
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0.56rem 0.94rem;
        width: 100%;
        border-radius: 0 0.75rem 0 0;
        border: 1px solid rgba(255, 255, 255, 0.3);
        font-size: 0.75rem;
        background: rgba(255, 255, 255, 0.08);
        backdrop-filter: blur(9.45px);
    }

    .header-menu-mobile a svg {
        width: 0.75rem;
        height: 0.75rem;
        color: #fff;
    }

    .header-menu-mobile__contact {
        padding: 1.31rem 1rem;
        padding-top: 0;
        display: flex;
        justify-content: space-between;
        align-items: center;
        align-self: stretch;
    }

    .header-menu-mobile__contact h3 {
        color: rgba(255, 255, 255, 0.7);
        font-size: 0.75rem;
        font-weight: 600;
        line-height: normal;
        text-transform: uppercase;
    }
    .header-menu-mobile__contact-link {
        margin-left: 0.75rem;
    }
    .contact-sub .footer-contact__email-hotline--sub {
        border: none;
        padding: 0.56rem 1rem;
        display: flex;
        flex-direction: row;
        gap: 1.25rem;
        margin-bottom: 4.3rem;
    }

    .contact-sub .footer-contact__email-hotline--sub p {
        text-transform: initial;
    }

    .contact-sub .footer-contact__email,
    .contact-sub .footer-contact__phone {
        display: flex;
        align-items: center;
        gap: 0.62rem;
        font-size: 0.75rem;
        color: #fff;
    }

    .contact-sub .footer-contact__email span,
    .contact-sub .footer-contact__phone span {
        text-transform: uppercase;
        opacity: 0.6;
    }
}
