/* Mobile adaptation module shared by the Chinese and English storefronts. */

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    overflow-wrap: break-word;
}

button,
a,
input,
select,
textarea {
    touch-action: manipulation;
}

.table-responsive {
    width: 100%;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
}

.table-responsive > table {
    margin-bottom: 0;
}

.page-content img,
.area-left-right img,
.intro2 img,
.section-heading img,
article img,
iframe,
video {
    max-width: 100% !important;
}

iframe,
video {
    height: auto;
}

@media (max-width: 1180px) {
    .primary-header {
        position: relative;
        z-index: 100;
        box-shadow: 0 1px 8px rgba(0, 0, 0, .08);
    }

    .primary-header-inner {
        min-height: 68px;
    }

    .primary-header .header-logo {
        max-width: min(190px, calc(100vw - 92px));
    }

    .primary-header-inner .header-right {
        line-height: normal;
        margin-left: 8px;
    }

    .header-right .mobile-menu-icon {
        align-items: center;
        justify-content: center;
        width: 46px;
        height: 46px;
        margin: 0;
        padding: 13px;
        border-radius: 6px;
        cursor: pointer;
    }

    .header-right .mobile-menu-icon:focus-visible,
    .dropdown-plus:focus-visible {
        outline: 2px solid #136caf;
        outline-offset: 2px;
    }

    .header-menu-wrap {
        max-height: calc(100vh - 68px);
        padding: 0 15px 12px;
        overflow-y: auto;
        overscroll-behavior: contain;
        box-shadow: 0 12px 24px rgba(0, 0, 0, .14);
    }

    .header-menu-wrap ul li > a {
        min-height: 48px;
        padding: 12px 48px 12px 12px;
        font-size: 15px;
        line-height: 24px;
    }

    .header-menu-wrap li li > a {
        padding-left: 24px;
        font-size: 14px;
    }

    .dropdown-plus {
        width: 48px;
        height: 48px;
        line-height: 48px;
    }

    .dropdown-plus::before,
    .dropdown-plus::after {
        top: 24px;
        right: 17px;
    }

    .slider-content {
        max-width: 680px;
        margin-right: 32px;
        margin-left: 32px;
    }

    .slide-caption.small,
    .area-left-right-desc,
    .intro2-desc,
    .reference li {
        overflow-wrap: anywhere;
    }

    .default-btn,
    .slide-btn {
        min-height: 44px;
        line-height: 44px;
    }
}

@media (max-width: 768px) {
    .container {
        width: 100% !important;
        padding-right: 15px;
        padding-left: 15px;
    }

    .slider-content-wrap {
        height: min(500px, calc(100vh - 68px));
        min-height: 400px;
    }

    .main-slider .bg-img {
        background-position: center center;
    }

    .main-slider .slide-caption.big {
        font-size: clamp(26px, 8vw, 34px);
        line-height: 1.25;
    }

    .main-slider .slide-caption.small {
        font-size: 15px;
        line-height: 1.8;
    }

    .main-slider .slick-arrow {
        display: none !important;
    }

    .title-section,
    .title-section-2 {
        padding-right: 0;
        padding-left: 0;
    }

    .page-header {
        height: 220px;
        background-position: center;
    }

    .page-content h2 {
        font-size: 28px;
        line-height: 1.3;
    }

    .table-responsive {
        margin-bottom: 18px;
        border: 1px solid #e6edf2;
        border-radius: 6px;
    }

    .table-responsive::before {
        display: block;
        content: "左右滑动查看完整表格";
        padding: 7px 10px;
        color: #64748b;
        background: #f7fafc;
        font-size: 12px;
        line-height: 20px;
    }

    html[lang="en"] .table-responsive::before {
        content: "Swipe horizontally to view the full table";
    }

    .table-responsive th,
    .table-responsive td {
        padding: 9px 10px;
        font-size: 13px;
        line-height: 1.55;
    }

    .about-section .row > [class*="col-"],
    .area-left-right .row > [class*="col-"],
    .intro2 .row > [class*="col-"] {
        margin-bottom: 12px;
    }

    .area-left-right-info,
    .intro2-info,
    .intro2-info[style] {
        padding-top: 8px !important;
    }

    .reference ul {
        padding-left: 18px;
    }
}

@media (max-width: 420px) {
    .primary-header-inner {
        min-height: 62px;
    }

    .primary-header .header-logo {
        max-width: 155px;
    }

    .header-menu-wrap {
        max-height: calc(100vh - 62px);
    }

    .slider-content {
        margin-right: 18px;
        margin-left: 18px;
    }

    .slider-content-wrap {
        height: 430px;
        min-height: 380px;
    }

    .main-slider .slide-caption.big {
        font-size: 26px;
    }

    .main-slider .slide-caption.small {
        font-size: 14px;
        line-height: 1.7;
    }

    .section-heading h2,
    .about-section .section-heading h2,
    .services-section .section-heading h2 {
        font-size: 25px;
        line-height: 1.35;
    }

    .padding {
        padding: 36px 0;
    }

    .page-header {
        height: 190px;
    }
}

/* Keep the complete homepage banners and inner-page header images visible on
   phones. Their source ratios are 1920:650 and 1920:268 respectively. */
@media (max-width: 768px) {
    .slider-content-wrap {
        height: auto;
        min-height: 0;
        aspect-ratio: 1920 / 650;
    }

    .main-slider .bg-img {
        background-color: #eef2f4;
        background-position: center;
        background-size: contain;
    }

    .main-slider .slider-content {
        max-width: 92%;
        margin-right: 0;
        margin-left: 0;
    }

    .main-slider .slider-content-wrap.text-center .slider-content {
        max-width: 100%;
        margin-right: auto;
        margin-left: auto;
        text-align: center;
    }

    .main-slider .slide-caption.big {
        min-height: 0;
        font-size: clamp(14px, 4vw, 18px);
        line-height: 1.1;
        letter-spacing: 0;
    }

    .main-slider .slide-caption.big .inner-layer {
        margin-top: 0;
        line-height: 1.1;
    }

    .main-slider .slide-caption.small {
        display: block;
        margin-top: 3px;
        font-size: clamp(7px, 2vw, 9px);
        line-height: 1.2;
    }

    .main-slider .slide-btn-group {
        display: block;
        height: 22px;
        margin-top: 3px;
        line-height: 22px;
    }

    .main-slider .slide-btn-group .inner-layer {
        height: 22px;
        line-height: 22px;
    }

    .main-slider .slide-btn {
        height: 22px;
        min-height: 0;
        padding: 0 12px;
        border-radius: 4px;
        font-size: clamp(7px, 1.8vw, 9px);
        line-height: 20px;
    }

    .main-slider .slick-dots {
        bottom: 5px;
    }

    .page-header,
    .page-header.padding {
        height: auto;
        min-height: 0;
        padding: 0;
        aspect-ratio: 1920 / 268;
        background-color: #eef2f4;
        background-position: center;
        background-size: contain;
    }
}
