:root {
    --site-green: #14663b;
    --site-navy: #1a246b;
    --site-line: #e2e8f0;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding-bottom: 18px;
    position: relative;
}

.brand {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.brand img.logo-umri {
    width: 58px;
    height: 58px;
    flex: 0 0 auto;
}

.brand-block {
    display: flex;
    align-items: center;
    gap: 10px;
}

.brand img.logo-siam {
    width: 110px;
    height: auto;
    flex: 0 0 auto;
}

.brand-copy {
    display: flex;
    flex-direction: column;
    gap: 3px;
    line-height: 1;
}

.brand-copy strong {
    color: var(--site-green);
    font-size: 25px;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.brand-copy span {
    color: #222;
    font-size: 15px;
    font-weight: 700;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.nav-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border: 1px solid #dbe5ef;
    border-radius: 12px;
    background: #fff;
    color: var(--site-navy);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
}

.nav-toggle-close {
    display: none;
}

.nav-toggle.is-open .nav-toggle-open {
    display: none;
}

.nav-toggle.is-open .nav-toggle-close {
    display: block;
}

.nav-link,
.nav-lang {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    color: var(--site-navy);
    font-size: 15px;
    font-weight: 600;
    border-bottom: 3px solid transparent;
}

.nav-lang {
    list-style: none;
    cursor: pointer;
}

.nav-lang::-webkit-details-marker {
    display: none;
}

.nav-lang-menu {
    position: relative;
}

.nav-lang-menu[open] .nav-lang-caret {
    transform: rotate(180deg);
}

.nav-lang-caret {
    width: 14px;
    height: 14px;
    transition: transform 0.18s ease;
}

.nav-lang-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    min-width: 170px;
    padding: 8px;
    border: 1px solid var(--site-line);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.14);
    z-index: 30;
}

.nav-lang-option {
    display: block;
    padding: 10px 12px;
    border-radius: 10px;
    color: var(--site-navy);
    font-size: 14px;
    font-weight: 600;
}

.nav-lang-option:hover {
    background: #f4f8fb;
}

.nav-lang-option.active {
    color: var(--site-green);
    background: #eef8f2;
}

.nav-link.active {
    color: var(--site-green);
    border-bottom-color: var(--site-green);
}

.nav-divider {
    width: 1px;
    height: 24px;
    background: var(--site-line);
    margin: 0 2px;
}

.icon {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex: 0 0 auto;
}

.footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    color: #5f6f87;
    font-size: 14px;
    margin-top: 24px;
    padding: 6px 2px 0;
}

.footer-links,
.footer-socials {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
}

.footer-socials a {
    color: #60739a;
}

@media (max-width: 1120px) {
    .topbar {
        flex-direction: column;
        align-items: flex-start;
    }

    .main-nav {
        justify-content: flex-start;
    }
}

@media (max-width: 760px) {
    .brand-block {
        gap: 8px;
    }

    .brand img.logo-umri {
        width: 48px;
        height: 48px;
    }

    .brand img.logo-siam {
        width: 88px;
    }

    .brand-copy {
        display: none;
    }

    .topbar > a {
        width: calc(100% - 60px);
    }

    .brand {
        gap: 10px;
    }

    .nav-toggle {
        display: inline-flex;
        position: absolute;
        top: 2px;
        right: 0;
    }

    .main-nav {
        display: none;
        width: 100%;
        margin-top: 12px;
        padding: 10px;
        border: 1px solid var(--site-line);
        border-radius: 16px;
        background: #fff;
        box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
    }

    .main-nav.is-open {
        display: flex;
    }

    .nav-link,
    .nav-lang {
        width: 100%;
        justify-content: flex-start;
        padding: 12px 10px;
        font-size: 14px;
        border-bottom: 0;
        border-radius: 12px;
    }

    .nav-link.active {
        background: #eef8f2;
    }

    .nav-divider {
        display: none;
    }

    .nav-lang-menu {
        width: 100%;
    }

    .nav-lang-dropdown {
        position: static;
        margin-top: 6px;
        min-width: 0;
        box-shadow: none;
    }

    .footer {
        flex-direction: column;
        align-items: flex-start;
    }
}
