/* ====== FONT: KANIT FOR NAVBAR ====== */
@font-face {
    font-family: "Kanit";
    src: url("/assets/fonts/kanit/KANIT-REGULAR.TTF") format("truetype");
    font-weight: 400;
    font-style: normal;
}

/* IMPORTANT: lock navbar spacing & box sizing so other pages can't change it */
.eh-navbar-wrapper,
.eh-navbar-wrapper * {
    box-sizing: border-box;
}

.eh-navbar-wrapper {
    margin: 0 !important;
    padding: 0 !important;
    background-color: #ffffff;
    position: sticky;
    top: 0;
    z-index: 1000;
}

/* lock font values on navbar itself so other page CSS can't shrink it */
.kanit-navbar {
    font-family: "Kanit", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-weight: 400;
    font-size: 16px;
    line-height: 24px;
    letter-spacing: -0.006em;
}

/* ====== DESKTOP NAVBAR LAYOUT ====== */
.eh-navbar {
    width: 1300px;
    height: 90px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.eh-navbar-logo {
    width: 130px;
    flex: 0 0 130px;
    display: flex;
    align-items: center;
}

.eh-navbar-logo-img {
    display: block;
    max-width: 100%;
    height: auto;
}

/* Links center */
.eh-navbar-links {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1 1 auto;
    gap: 45px;
}

.eh-nav-link {
    text-decoration: none;
    color: rgba(0,0,0,1);
    transition: color 0.18s ease;
    white-space: nowrap;
}

.eh-nav-link:hover,
.eh-nav-link.is-active {
    color: rgba(0,0,0,0.7);
}

/* Right side container (lang + burger) */
.eh-navbar-right {
    display: flex;
    align-items: center;
    gap: 18px;
    flex: 0 0 auto;
}

/* ====== LANGUAGE DROPDOWN ====== */
.eh-lang-dropdown { position: relative; }

.eh-lang-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: 91px;
    height: 32px;
    padding: 0 12px;
    background-color: #ffffff;
    border: 1px solid #d0d0d0;
    border-radius: 6px;
    cursor: pointer;
    font-family: "Kanit", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 16px;
    line-height: 1;
    color: #000000;
    transition: border-color 0.16s ease, background-color 0.16s ease;
}

.eh-lang-button:hover {
    border-color: #a0a0a0;
    background-color: #f7f7f7;
}

.eh-lang-label { white-space: nowrap; }
.eh-lang-caret { font-size: 12px; line-height: 1; }

.eh-lang-menu {
    position: absolute;
    right: 0;
    top: 38px;
    min-width: 140px;
    background-color: #ffffff;
    border-radius: 6px;
    border: 1px solid #d0d0d0;
    box-shadow: 0 4px 10px rgba(0,0,0,0.06);
    padding: 6px 0;
    display: none;
    z-index: 1001;
}

.eh-lang-dropdown.open .eh-lang-menu { display: block; }

.eh-lang-item {
    display: block;
    padding: 8px 14px;
    text-decoration: none;
    font-family: "Kanit", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 16px;
    color: #000000;
    white-space: nowrap;
    transition: background-color 0.16s ease, color 0.16s ease;
}

.eh-lang-item:hover {
    background-color: #f2f2f2;
    color: rgba(0,0,0,0.8);
}

/* ====== BURGER (hidden on desktop) ====== */
.eh-burger {
    width: 44px;
    height: 44px;
    background: transparent;
    border: 0;
    cursor: pointer;
    display: none; /* shown only on mobile */
    position: relative;
}

.eh-burger-lines {
    position: absolute;
    left: 9px;
    right: 9px;
    top: 50%;
    height: 2px;
    background: #000;
    transform: translateY(-50%);
    transition: opacity 0.18s ease;
}

.eh-burger-lines::before,
.eh-burger-lines::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    height: 2px;
    background: #000;
    transition: transform 0.18s ease, top 0.18s ease, bottom 0.18s ease;
}

.eh-burger-lines::before { top: -9px; }
.eh-burger-lines::after  { bottom: -9px; }

/* When menu open -> X */
.eh-navbar-wrapper.eh-menu-open .eh-burger-lines {
    background: transparent;
}
.eh-navbar-wrapper.eh-menu-open .eh-burger-lines::before {
    top: 0;
    transform: rotate(45deg);
}
.eh-navbar-wrapper.eh-menu-open .eh-burger-lines::after {
    bottom: 0;
    transform: rotate(-45deg);
}

/* ====== MOBILE FULLSCREEN MENU ====== */
.eh-mobile-menu {
    display: none;
    position: fixed;
    left: 0;
    right: 0;
    top: 90px;
    bottom: 0;
    background: #ffffff;
    z-index: 999;
    overflow: auto;
}

.eh-navbar-wrapper.eh-menu-open .eh-mobile-menu {
    display: block;
}

.eh-mobile-menu-inner {
    max-width: 1300px;
    margin: 0 auto;
    padding: 34px 28px 60px 28px;
    display: flex;
    flex-direction: column;
    gap: 34px;
}

.eh-mobile-link {
    text-decoration: none;
    color: rgba(0,0,0,1);
    font-family: "Kanit", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-weight: 400;
    font-size: 34px;
    line-height: 1.15;
    transition: color 0.18s ease;
}

.eh-mobile-link:hover,
.eh-mobile-link.is-active {
    color: rgba(0,0,0,0.7);
}

/* Prevent background scroll when menu is open */
.eh-no-scroll { overflow: hidden; }

/* ====== RESPONSIVE ====== */
@media (max-width: 1400px) {
    .eh-navbar { width: calc(100% - 40px); }
}

/* MOBILE ONLY (matches screenshots + your tweaks) */
@media (max-width: 980px) {

    /* Hide desktop links */
    .eh-navbar-links { display: none; }

    /* Show burger */
    .eh-burger { display: inline-block; }

    /* Make bar full-width with padding like mobile screenshot */
    .eh-navbar {
        width: 100%;
        padding: 0 20px;
        position: relative;
    }

    /* Slightly smaller logo on mobile */
    .eh-navbar-logo {
        width: 115px;
        flex: 0 0 115px;
    }

    .eh-navbar-logo-img {
        max-height: 44px;
        width: auto;
    }

    /* Center language, but move it 50px to the right (your request) */
    .eh-lang-dropdown {
        position: absolute;
        left: calc(50% + 50px);
        transform: translateX(-50%);
    }

    /* Keep right-side spacing stable */
    .eh-navbar-right {
        gap: 12px;
    }
}
