/* Synlang compatibility for the CombineCN template.
 * Static assets remain on the main site; only page/content links use SYN_URL. */

html:not([lang^="zh" i]) body {
    overflow-x: hidden;
}

html:not([lang^="zh" i]) h1,
html:not([lang^="zh" i]) h2,
html:not([lang^="zh" i]) h3,
html:not([lang^="zh" i]) h4,
html:not([lang^="zh" i]) h5,
html:not([lang^="zh" i]) p,
html:not([lang^="zh" i]) a,
html:not([lang^="zh" i]) span,
html:not([lang^="zh" i]) dt,
html:not([lang^="zh" i]) dd,
html:not([lang^="zh" i]) li,
html:not([lang^="zh" i]) button {
    overflow-wrap: break-word;
    word-break: normal;
}

/* Desktop navigation: allow long German/French/Russian labels without overlap. */
.menu_dl .menu_tt > a {
    box-sizing: border-box;
    overflow: hidden;
    max-width: 100%;
}

html:not([lang^="zh" i]) .head_t,
html:not([lang^="zh" i]) .header,
html:not([lang^="zh" i]) .head_t .wrapper {
    height: auto;
    min-height: 112px;
}

html:not([lang^="zh" i]) .head_t .wrapper {
    display: flex;
    align-items: center;
}

html:not([lang^="zh" i]) .menu_dl {
    display: flex;
    flex: 1 1 auto;
    min-width: 0;
    height: auto;
    align-items: stretch;
    justify-content: center;
}

html:not([lang^="zh" i]) .logo {
    width: 210px;
    height: 112px;
}

html:not([lang^="zh" i]) .head_clm_box {
    width: 300px;
    height: 112px;
}

html:not([lang^="zh" i]) .head_clm_tel {
    padding-right: 3px;
    font-size: 16px;
    line-height: 1.2;
}

html:not([lang^="zh" i]) .head_clm_tel .icon {
    margin-right: 4px;
    font-size: 20px;
}

html:not([lang^="zh" i]) .menu_dl {
    width: calc(100% - 510px);
    padding-right: 1.5%;
    padding-left: 1.5%;
}

html:not([lang^="zh" i]) .menu_dl > dd {
    display: flex;
    float: none;
    flex: 1 1 0;
    min-width: 0;
    height: auto;
    min-height: 112px;
    align-items: stretch;
}

html:not([lang^="zh" i]) .menu_dl .menu_tt {
    display: flex;
    width: 100%;
    height: auto;
    min-height: 112px;
    align-items: center;
    justify-content: center;
}

html:not([lang^="zh" i]) .menu_dl .menu_tt > a {
    box-sizing: border-box;
    display: flex;
    width: 100%;
    height: auto;
    min-height: 112px;
    max-height: 112px;
    padding: 9px 4px;
    align-items: center;
    justify-content: center;
    font-size: clamp(11px, .72vw, 14px);
    line-height: 1.18;
    text-align: center;
    white-space: normal;
    word-break: break-word;
    overflow-wrap: anywhere;
    hyphens: auto;
}

html:not([lang^="zh" i]) .menu_down {
    top: 100%;
    width: max(190px, 100%);
}

html:not([lang^="zh" i]) .menu_down a {
    box-sizing: border-box;
    height: auto;
    min-height: 38px;
    padding: 9px 12px;
    line-height: 20px;
    white-space: normal;
}

/* Titles, breadcrumbs, buttons and form controls. */
html:not([lang^="zh" i]) [class*="title"],
html:not([lang^="zh" i]) [class*="_tt"],
html:not([lang^="zh" i]) [class*="position"],
html:not([lang^="zh" i]) [class*="crumb"] {
    height: auto;
    min-height: 0;
    line-height: 1.35;
}

html:not([lang^="zh" i]) .btn_style1,
html:not([lang^="zh" i]) button,
html:not([lang^="zh" i]) input[type="submit"] {
    box-sizing: border-box;
    height: auto;
    min-height: 38px;
    padding-top: 8px;
    padding-bottom: 8px;
    line-height: 1.25;
    white-space: normal;
}

/* Keep product/news/case grids aligned when translated titles become longer. */
html:not([lang^="zh" i]) .pro_list_clm,
html:not([lang^="zh" i]) .pro_list li,
html:not([lang^="zh" i]) .news_list li,
html:not([lang^="zh" i]) .case_list li {
    height: auto;
    min-height: 0;
}

html:not([lang^="zh" i]) .pro_list_clm .tt,
html:not([lang^="zh" i]) .pro_list li .tt,
html:not([lang^="zh" i]) .news_list li .tt,
html:not([lang^="zh" i]) .case_list li .tt,
html:not([lang^="zh" i]) .textOverflow {
    display: -webkit-box;
    overflow: hidden;
    height: auto;
    min-height: 2.7em;
    line-height: 1.35;
    white-space: normal;
    text-overflow: ellipsis;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

html:not([lang^="zh" i]) .pro_list_clm p,
html:not([lang^="zh" i]) .news_list li p,
html:not([lang^="zh" i]) .case_list li p {
    display: -webkit-box;
    overflow: hidden;
    height: auto;
    min-height: 4.05em;
    line-height: 1.35;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

/* Synlang/XunRui pagination emits ul.pagination > li. */
.pagination {
    display: flex !important;
    flex-flow: row wrap;
    width: 100%;
    margin: 24px 0 !important;
    padding: 0 !important;
    align-items: center;
    justify-content: center;
    gap: 6px;
    list-style: none !important;
}

.pagination > li {
    display: block !important;
    float: none !important;
    width: auto !important;
    margin: 0 !important;
    padding: 0 !important;
}

.pagination > li > a,
.pagination > li > span {
    box-sizing: border-box;
    display: block !important;
    min-width: 34px;
    height: 34px !important;
    padding: 0 11px !important;
    border: 1px solid #ddd !important;
    color: #555 !important;
    background: #fff !important;
    line-height: 32px !important;
    text-align: center;
    white-space: nowrap;
}

.pagination > li.active > a,
.pagination > li.active > span {
    border-color: #1677c8 !important;
    color: #fff !important;
    background: #1677c8 !important;
}

/* Footer columns may contain much longer translated labels. */
html:not([lang^="zh" i]) .footer .wrapper,
html:not([lang^="zh" i]) .footer_nav,
html:not([lang^="zh" i]) .footer_menu {
    height: auto;
}

html:not([lang^="zh" i]) .footer a {
    height: auto;
    line-height: 1.5;
    white-space: normal;
}

/* Synlang language selector, shared by desktop and mobile headers/footers. */
.synlang-desktop-row {
    position: relative;
    z-index: 92;
    padding: 7px 0;
    border-bottom: 1px solid #eee;
    background: #fff;
}

.synlang-desktop-row .wrapper {
    display: flex;
    justify-content: flex-end;
}

.synlang-switch {
    position: relative;
    z-index: 90;
    color: #333;
    font: 14px/1.4 Arial, "Microsoft YaHei", sans-serif;
    text-align: left;
}

.synlang-switch summary {
    box-sizing: border-box;
    display: flex;
    min-width: 142px;
    height: 34px;
    padding: 0 28px 0 11px;
    border: 1px solid #dedede;
    border-radius: 4px;
    align-items: center;
    gap: 7px;
    color: #333;
    background: rgba(255,255,255,.96);
    cursor: pointer;
    list-style: none;
    white-space: nowrap;
}

.synlang-switch summary::-webkit-details-marker {
    display: none;
}

.synlang-switch summary::after {
    content: "";
    position: absolute;
    right: 11px;
    top: 13px;
    width: 6px;
    height: 6px;
    border-right: 1px solid currentColor;
    border-bottom: 1px solid currentColor;
    transform: rotate(45deg);
}

.synlang-switch[open] summary::after {
    top: 16px;
    transform: rotate(225deg);
}

.synlang-switch img {
    display: block;
    flex: 0 0 auto;
    width: 22px;
    height: 15px;
    object-fit: cover;
    border-radius: 1px;
}

.synlang-switch summary span,
.synlang-switch-menu a span {
    flex: 1 1 auto;
    overflow: hidden;
    text-overflow: ellipsis;
}

.synlang-switch small {
    flex: 0 0 auto;
    color: #8b8b8b;
    font-size: 11px;
    text-transform: uppercase;
}

.synlang-switch-menu {
    position: absolute;
    right: 0;
    top: calc(100% + 5px);
    box-sizing: border-box;
    overflow-y: auto;
    width: 210px;
    max-height: 330px;
    padding: 6px;
    border: 1px solid #e2e2e2;
    border-radius: 5px;
    background: #fff;
    box-shadow: 0 10px 28px rgba(0,0,0,.15);
}

.synlang-switch-menu a {
    box-sizing: border-box;
    display: flex;
    width: 100%;
    min-height: 36px;
    padding: 7px 9px;
    border-radius: 3px;
    align-items: center;
    gap: 8px;
    color: #444 !important;
    text-decoration: none;
    white-space: nowrap;
}

.synlang-switch-menu a:hover {
    color: #000 !important;
    background: #f3f5f7;
}

.synlang-switch-menu a.is-current {
    color: #fff !important;
    background: #111;
}

.synlang-switch-menu a.is-current small {
    color: #ddd;
}

.synlang-footer-row {
    display: flex;
    flex: 0 0 100%;
    width: 100%;
    padding: 0 0 12px;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.synlang-footer-label {
    color: #ddd;
    font-size: 13px;
}

.synlang-switch-footer .synlang-switch-menu,
.synlang-switch-mobile-footer .synlang-switch-menu {
    top: auto;
    bottom: calc(100% + 5px);
}

.synlang-mobile-row {
    position: relative;
    z-index: 80;
    display: flex;
    box-sizing: border-box;
    width: 100%;
    padding: 8px 12px;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    background: #fff;
}

.synlang-mobile-row-footer {
    justify-content: center;
    background: #263238;
}

.synlang-switch-mobile-header {
    display: none;
}

@media (max-width: 1100px) {
    .synlang-desktop-row {
        display: none;
    }

    .synlang-switch-mobile-header {
        position: absolute;
        top: 9px;
        right: 102px;
        z-index: 9;
        display: block;
    }

    .synlang-switch-mobile-header summary {
        min-width: 116px;
        height: 34px;
    }

    html:not([lang^="zh" i]) .head_t .wrapper {
        display: block;
    }

    html:not([lang^="zh" i]) .menu_dl {
        display: none;
    }
}

@media (max-width: 767px) {
    .synlang-switch-menu {
        width: 190px;
    }

    html:not([lang^="zh" i]) .mobile_menu_tt,
    html:not([lang^="zh" i]) .mobile_menu_tt > a,
    html:not([lang^="zh" i]) .mobile_menu_down a {
        box-sizing: border-box;
        height: auto;
        min-height: 42px;
        line-height: 1.35;
        white-space: normal;
    }

    .pagination {
        gap: 4px;
    }

    .pagination > li > a,
    .pagination > li > span {
        min-width: 30px;
        height: 32px !important;
        padding: 0 8px !important;
        font-size: 13px;
        line-height: 30px !important;
    }
}
