/* Keep desktop English navigation on one line without crowding the logo. */
@media screen and (min-width: 1043px) {
    .header .headMain {
        gap: 0.4rem;
    }

    .header .headLogo {
        flex-shrink: 0;
    }

    .header .head_box {
        flex: 1;
        min-width: 0;
        justify-content: flex-end;
        gap: 0.4rem;
    }

    .header .headNav {
        flex: 1;
        min-width: 0;
        justify-content: space-between;
        gap: 0.2rem;
        margin: 0;
    }

    .header .headNav .item {
        flex-shrink: 0;
    }

    .header .headNav .item > a {
        font-size: 16px;
        line-height: 1.5;
        white-space: nowrap;
        justify-content: center;
        text-align: center;
    }

    .header .headRight {
        flex-shrink: 0;
        gap: 0.24rem;
        margin-left: 0;
    }

    /* Reserve both columns before wrapping the longer English contact copy. */
    .homePage .contactMain {
        column-gap: 0.6rem;
    }

    .homePage .contactMain > .contactText {
        flex: 0 0 calc(100% - 7.2rem - 0.6rem);
        min-width: 0;
        overflow-wrap: break-word;
    }

    .homePage .contactMain > .messageForm {
        flex: 0 0 7.2rem;
        min-width: 0;
    }

    .footerMain {
        align-items: flex-start;
    }

    .footerInfo {
        flex: 0 0 4.2rem;
        width: 4.2rem;
    }

    .footerInfo::before {
        right: -0.3rem;
    }

    .footerNav {
        flex: 1 1 auto;
        min-width: 0;
        justify-content: space-between;
        gap: 0.4rem;
        margin-left: 0.6rem;
    }

}

@media screen and (min-width: 1043px) and (max-width: 1440px) {
    .header .headMain,
    .header .head_box {
        gap: 0.24rem;
    }

    .header .headNav {
        gap: 0.14rem;
    }

    .header .headNav .item > a {
        font-size: 14px;
    }

    .header .headRight {
        gap: 0.16rem;
    }
}

.footerNav .navItem {
    min-width: 0;
}

.footerNav .navItem a {
    line-height: 1.4;
    overflow-wrap: break-word;
}

.footerInfo .contactLine img {
    flex-shrink: 0;
}

.footerInfo .contactLine span {
    min-width: 0;
    overflow-wrap: anywhere;
}

@media screen and (max-width: 1042px) {
    .footerNav {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 28px 24px;
    }
}

@media screen and (max-width: 768px) {
    .footerNav {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
