.site-header {
    position: relative;
    z-index: 1000;
    overflow: visible;
}

/******************* Desktop *******************/
.desktop-header {
    display: block;
    position: relative;
    z-index: 1000;
}

.top-header {
    height: 72px;
    background: var(--white);
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    padding: 0 48px;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s ease;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 12px;

    justify-self: start;
}

.header-left img {
    width: 50px;
    height: 50px;
    object-fit: contain;
}

.header-left p {
    font-size: 14px;
    font-weight: 600;
    margin: 0;
}

.header-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;

    gap: 12px;

    justify-self: end;
}

.lang-btn {
    min-width: 38px;
    height: 38px;

    padding: 0 12px;

    border: none;
    border-radius: 999px;

    background: transparent;

    color: var(--text-main);

    display: flex;
    align-items: center;
    justify-content: center;

    gap: 8px;

    cursor: pointer;

    transition:
        background 0.25s ease,
        color 0.25s ease,
        transform 0.25s ease;
}

.lang-btn i {
    font-size: 16px;
}

.lang-btn:hover,
.header-lang.show .lang-btn {
    background: var(--pink-soft);
    color: var(--text-pink);
    transform: translateY(-1px);
}

.lang-btn img {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    object-fit: cover;
}

.header-lang {
    position: relative;
}

.lang-btn::after {
    display: none;
}

.lang-menu {
    min-width: 80px;
    width: 80px;

    padding: 6px;

    border: 1px solid var(--border-soft);
    border-radius: 18px;

    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.lang-menu.show {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.lang-menu .dropdown-item {
    height: 38px;

    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;

    padding: 0;

    border-radius: var(--radius-pill);

    color: var(--text-main);

    font-size: 16px;
    font-weight: 400;
}

.lang-menu .dropdown-item img {
    width: 20px;
    height: 20px;

    object-fit: cover;
    border-radius: 50%;
}

.lang-menu .dropdown-item:hover {
    background: var(--pink-soft);
    color: var(--text-pink);
}

.lang-menu .dropdown-item.active {
    background: var(--pink-soft);
    color: var(--text-pink);
    font-weight: 600;
}

/******************* Floating menu *******************/

.floating-menu {
    position: relative;
    z-index: 1001;

    width: fit-content;
    max-width: calc(100% - 64px);
    margin: -12px auto 0;

    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(4px, 0.9vw, 18px);

    background: linear-gradient(135deg, var(--green-primary), var(--green-dark));

    border-radius: var(--radius-pill);

    padding: 10px clamp(14px, 2vw, 34px);

    box-shadow:
        0 12px 28px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.16);

    transition:
        width 0.45s cubic-bezier(0.22, 0.61, 0.36, 1),
        padding 0.45s cubic-bezier(0.22, 0.61, 0.36, 1),
        border-radius 0.45s cubic-bezier(0.22, 0.61, 0.36, 1),
        box-shadow 0.45s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.floating-menu.sticky {
    position: fixed;
    top: 10px;
    left: 0;
    right: 0;

    margin: 0 auto;

    width: fit-content;
    max-width: calc(100% - 24px);

    padding: 10px clamp(34px, 4vw, 64px);

    transform: none;

    gap: clamp(4px, 0.9vw, 18px);

    border-radius: var(--radius-pill);

    box-shadow: rgba(0, 0, 0, 0.24) 0px 3px 8px;
}

.floating-menu-links {
    display: flex;
    align-items: center;
    gap: clamp(4px, 0.9vw, 18px);

    opacity: 0;
    transition: opacity 0.25s ease;
}

.floating-menu-links.loaded {
    opacity: 1;
}

.floating-menu-links.loading {
    display: block;
    width: clamp(600px, 72vw, 980px);
    height: 44px;
    border-radius: var(--radius-pill);
    background: rgba(255, 255, 255, 0.14);
    overflow: hidden;
    position: relative;
}

.floating-menu-links.loading::after {
    content: "";
    position: absolute;
    inset: 0;
    transform: translateX(-100%);
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.28), transparent);
    animation: navbarLoading 1.2s infinite;
}

@keyframes navbarLoading {
    to {
        transform: translateX(100%);
    }
}

.floating-menu .nav-link,
.floating-menu .nav-item .nav-link {
    min-height: 42px;

    display: flex;
    align-items: center;
    justify-content: center;

    gap: clamp(5px, 0.6vw, 8px);

    color: rgba(255, 255, 255, 0.92);

    padding: 8px clamp(7px, 1vw, 16px);
    border-radius: 14px;

    font-size: clamp(12px, 1vw, 14px);
    font-weight: 400;
    line-height: 1;

    white-space: nowrap;

    transition:
        background 0.25s ease,
        color 0.25s ease,
        transform 0.25s ease;
}

.floating-menu .nav-link span {
    white-space: nowrap;
}

.floating-menu .nav-link i {
    flex-shrink: 0;
}

.floating-menu .nav-link i,
.floating-menu .nav-item .nav-link i {
    color: inherit;
}

.floating-menu .nav-link:hover,
.floating-menu .nav-item:hover .nav-link {
    background: rgba(255, 255, 255, 0.12);
    color: var(--white);
    font-weight: 600;
    transform: translateY(-1px);
}

.floating-menu .nav-link.active {
    background: var(--pink-soft);
    color: var(--text-pink);
    font-weight: 600;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
}

/* Mega menu */
.nav-item.has-mega {
    position: relative;
}

.nav-item.has-mega::after {
    content: "";
    position: absolute;
    left: -20px;
    right: -20px;
    top: 100%;
    height: 32px;
    background: transparent;
}

.mega-menu {
    position: fixed;
    z-index: 2000;

    top: 140px;
    left: 50%;
    transform: translateX(-50%);

    width: min(1280px, calc(100vw - 64px));

    opacity: 0;
    visibility: hidden;
    pointer-events: none;

    transition: 0.22s ease;
}

.floating-menu.sticky .mega-menu {
    top: 95px;
}

.mega-panel {
    min-height: 300px;

    background: var(--white);
    border: 1px solid var(--border-soft);
    border-top: 5px solid var(--green-primary);
    border-radius: 18px;

    padding: 34px 42px 40px;

    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.18);
}

.nav-item.has-mega:hover .mega-menu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.nav-arrow {
    transition: transform 0.28s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.nav-item.has-mega:hover .nav-arrow {
    transform: rotate(180deg);
}

.mega-column {
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;

    max-height: 260px;

    column-gap: 36px;
    row-gap: 8px;
}

@media (max-width: 1320px) {
    .mega-column {
        max-height: 400px;
    }
}

.mega-column > a {
    display: flex;
    align-items: center;

    width: max-content;
    max-width: none;

    padding: 8px 14px;

    border-radius: 12px;

    color: var(--text-main) !important;

    font-size: 14px;
    font-weight: 400;
    line-height: 1.4;

    white-space: nowrap;

    transition: 0.2s ease;
}

.mega-column a > span {
    display: block;

    white-space: nowrap;

    word-break: normal;
    overflow-wrap: normal;
}

/* Mega menu item */

.mega-column a:hover,
.mega-list-item:hover {
    background: #f7f7f7;
    color: var(--green-primary) !important;
}

/* .mega-column a:hover span,
.mega-list-item:hover span {
  transform: translateX(8px);
} */

.mega-column img,
.mega-list-item img {
    width: 14px;
    height: 14px;
    object-fit: contain;
    margin-top: 3px;

    opacity: 0.65;
    filter: saturate(60%);
    flex-shrink: 0;
}

.mega-column a:hover img,
.mega-list-item:hover img {
    opacity: 0.85;
    filter: saturate(80%);
}

/******************* Mobile / iPad Header *******************/

.mobile-header {
    overflow: visible;
    display: none;

    height: 88px;

    background: var(--green-primary);
    color: var(--white);

    align-items: center;
    gap: 14px;

    padding: 0 22px;
}

.hamburger {
    width: 42px;
    height: 42px;

    flex-shrink: 0;

    border: none;
    border-radius: 50%;

    background: rgba(255, 255, 255, 0.12);
    color: var(--white);

    font-size: 22px;

    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-brand {
    flex: 1;
    min-width: 0;

    display: flex;
    align-items: center;
    gap: 12px;
}

.mobile-brand img {
    width: 52px;
    height: 52px;

    flex-shrink: 0;

    object-fit: contain;
}

.mobile-brand h5 {
    color: var(--white);

    font-size: 18px;
    font-weight: 700;
    line-height: 1.25;

    margin: 0;

    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mobile-brand p {
    color: rgba(255, 255, 255, 0.82);

    font-size: 13px;
    line-height: 1.25;

    margin: 2px 0 0;

    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mobile-lang {
    height: 38px;
    min-width: 74px;

    flex-shrink: 0;

    padding: 0 10px;

    border: none;
    border-radius: 999px;

    background: rgba(255, 255, 255, 0.12);
    color: var(--white);

    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;

    font-size: 14px;
}

.mobile-lang img {
    width: 20px;
    height: 20px;

    border-radius: 50%;
    object-fit: cover;
}

/******************* Sidebar *******************/

.sidebar-overlay {
    position: fixed;
    inset: 0;
    z-index: 1500;

    background: rgba(0, 0, 0, 0.45);

    opacity: 0;
    visibility: hidden;

    transition: 0.25s ease;
}

.mobile-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1600;

    width: min(340px, 88vw);
    height: 100vh;

    background: linear-gradient(180deg, var(--green-primary), var(--green-dark));

    padding: 18px 16px 28px;

    overflow-y: auto;

    box-shadow: 12px 0 34px rgba(0, 0, 0, 0.28);

    transform: translateX(-100%);
    transition: left 0.28s ease;
}

body.sidebar-open {
    overflow: hidden;
}

.sidebar-open .sidebar-overlay {
    opacity: 1;
    visibility: visible;
}

.sidebar-open .mobile-sidebar {
    transform: translateX(0);
}

.mobile-sidebar-head {
    position: relative;

    display: flex;
    align-items: center;
    gap: 12px;

    padding: 8px 42px 18px 4px;
    margin-bottom: 12px;

    border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

.mobile-sidebar-head img {
    width: 52px;
    height: 52px;

    flex-shrink: 0;

    object-fit: contain;
}

.mobile-sidebar-head h3 {
    color: var(--white);

    font-size: 16px;
    line-height: 1.25;

    margin: 0;
}

.mobile-sidebar-head p {
    color: rgba(255, 255, 255, 0.82);

    font-size: 12px;
    line-height: 1.25;

    margin: 2px 0 0;
}

.close-sidebar {
    position: absolute;
    top: 10px;
    right: 0;

    width: 34px;
    height: 34px;

    border: none;
    border-radius: 50%;

    background: rgba(255, 255, 255, 0.12);
    color: var(--white);

    display: flex;
    align-items: center;
    justify-content: center;
}

/******************* Sidebar Tools *******************/

.mobile-sidebar-tools {
    display: flex;
    flex-direction: column;
    gap: 12px;

    padding-bottom: 16px;
    margin-bottom: 14px;

    border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

.mobile-sidebar-lang {
    display: none;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.mobile-sidebar-lang a {
    height: 38px;

    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;

    border-radius: 999px;

    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.88);

    font-size: 13px;
    font-weight: 500;
}

.mobile-sidebar-lang a.active {
    background: var(--pink-soft);
    color: var(--text-pink);
}

.mobile-sidebar-lang img {
    width: 20px;
    height: 20px;

    border-radius: 50%;
    object-fit: cover;
}

/******************* Sidebar Menu *******************/

.mobile-sidebar-menu {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.mobile-link,
.mobile-menu-toggle {
    width: 100%;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;

    padding: 13px 14px;

    border: none;
    border-radius: 14px;

    background: transparent;
    color: rgba(255, 255, 255, 0.92);

    font-size: 15px;
    font-weight: 500;
    text-align: left;
}

.mobile-link {
    justify-content: flex-start;
}

.mobile-menu-toggle span {
    display: flex;
    align-items: center;
    gap: 10px;
}

.mobile-link.active,
.mobile-menu-group.active .mobile-menu-toggle {
    background: var(--pink-soft);
    color: var(--text-pink);
    font-weight: 700;
}

.mobile-arrow {
    font-size: 12px;

    transition: transform 0.25s ease;
}

.mobile-menu-group.open .mobile-arrow {
    transform: rotate(180deg);
}

.mobile-submenu {
    display: none;

    margin: 4px 0 8px 18px;
    padding: 8px 0 8px 14px;

    border-left: 1px solid rgba(255, 255, 255, 0.18);
}

.mobile-menu-group.open .mobile-submenu {
    display: block;
}

.mobile-sub-heading {
    color: rgba(255, 255, 255, 0.55);

    font-size: 13px;
    font-weight: 700;

    margin: 12px 0 6px;
}

.mobile-submenu a {
    display: flex;
    align-items: flex-start;
    gap: 9px;

    padding: 9px 10px;

    border-radius: 10px;

    color: rgba(255, 255, 255, 0.86);

    font-size: 14px;
    line-height: 1.45;
}

.mobile-submenu a:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
}

.mobile-submenu img {
    width: 13px;
    height: 13px;

    margin-top: 4px;

    opacity: 0.7;
    filter: saturate(65%);

    flex-shrink: 0;
}

/******************* responsive *******************/

@media (max-width: 991px) {
    .desktop-header {
        display: none;
    }

    .site-header {
        position: sticky;
        top: 0;
        z-index: 1400;
        width: 100%;
    }

    .mobile-header {
        display: flex;
    }

    .mobile-header .mobile-lang {
        display: flex;
    }

    .mobile-sidebar-lang {
        display: none;
    }
}

@media (max-width: 576px) {
    .mobile-header {
        height: 72px;
        padding: 0 14px;
        gap: 10px;
    }

    .hamburger {
        width: 38px;
        height: 38px;

        font-size: 14px;
    }

    .mobile-brand img {
        width: 44px;
        height: 44px;
    }

    .mobile-brand h5 {
        font-size: 15px;
    }

    .mobile-brand p {
        font-size: 11px;
    }

    .mobile-header .mobile-lang {
        display: none;
    }

    .mobile-sidebar-lang {
        display: grid;
    }

    .mobile-sidebar {
        width: min(320px, 90vw);
        padding: 16px 14px 24px;
    }
}

@media (max-width: 420px) {
    .mobile-header {
        height: 66px;
        padding: 0 10px;
        gap: 8px;
    }

    .hamburger {
        width: 34px;
        height: 34px;

        font-size: 14px;
    }

    .mobile-brand {
        gap: 8px;
    }

    .mobile-brand img {
        width: 38px;
        height: 38px;
    }

    .mobile-brand h5 {
        font-size: 13px;
        line-height: 1.2;
    }

    .mobile-brand p {
        font-size: 10px;
        line-height: 1.15;
    }

    .mobile-sidebar {
        width: 92vw;
        padding: 14px 12px 22px;
    }

    .mobile-sidebar-head img {
        width: 46px;
        height: 46px;
    }

    .mobile-sidebar-head h3 {
        font-size: 15px;
    }

    .mobile-sidebar-head p {
        font-size: 11px;
    }

    .mobile-link,
    .mobile-menu-toggle {
        padding: 12px;
        font-size: 14px;
    }

    .mobile-submenu a {
        font-size: 13px;
    }
}
