/* ==========================================================
   联系我们页面专属样式
   ========================================================== */

/* ── Banner ─────────────────────────────────────────────── */
.page-banner--contact {
    width: 100%;
    height: 645px;
    overflow: hidden;
}

.contact-banner-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

/* ── 区块1：联系方式 ─────────────────────────────────────── */
.contact-info-section {
    width: 100%;
}

/* 内容层：1420px 容器，设计稿指定内边距 */
.contact-info-wrap {
    max-width: 1420px;
    margin: 0 auto;
    padding: 25px 175px 140px;
    box-sizing: border-box;
}

.contact-city-title {
    font-size: 32px;
    font-family: 'HarmonyOS_Sans_SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    font-weight: 300;
    color: #000;
    margin: 0;
    line-height: 1.4;
}

/* 文字列表：距标题 45px */
.contact-list {
    margin-top: 45px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.contact-row {
    display: flex;
    align-items: flex-start;
    gap: 0;
}

/* 每列平分行宽 */
.contact-col {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-family: 'HarmonyOS_Sans_SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    font-weight: 300;
    color: #000;
    line-height: 1.7;
}

.contact-col--cn {
    padding-right: 40px;
}

/* icon 图标：与文字首行基线对齐 */
.contact-icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    margin-top: 4px; /* 微调与文字对齐 */
    object-fit: contain;
}

/* 地图：距文字列表 60px，图片原始尺寸 */
.contact-map {
    margin-top: 60px;
}

.contact-map img {
    display: block;
    max-width: 100%;
    height: auto;
}

/* ── 区块2：留言表单 ─────────────────────────────────────── */
.contact-form-section {
    background-color: #f5f5f5;
    padding-top: 110px;
    padding-bottom: 75px;
}

.contact-form-layout {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 40px;
}

/* 左侧标题区 */
.contact-form-left {
    flex: 1;
}

.contact-form-en {
    font-size: 37px;
    font-family: 'HarmonyOS_Sans_SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    font-weight: 400;
    color: #000;
    margin: 0;
    line-height: 1.3;
}

.contact-form-cn {
    font-size: 32px;
    font-family: 'HarmonyOS_Sans_SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    font-weight: 300;
    color: #000;
    margin: 16px 0 0;
    line-height: 1.3;
}

/* 右侧表单区：固定 862px */
.contact-form-right {
    flex: 0 0 862px;
    width: 862px;
}

/* ── CF7 表单字段样式 ─────────────────────────────────────── */
/*
 * CF7 实际输出结构（wpautop 行为）：
 *
 *   <div class="cf7-input-row">
 *     <p>
 *       <span class="wpcf7-form-control-wrap">[input name]</span><br>
 *       <span class="wpcf7-form-control-wrap">[input phone]</span><br>
 *       <span class="wpcf7-form-control-wrap">[input email]</span>
 *     </p>
 *   </div>
 *   <p>
 *     <span class="wpcf7-form-control-wrap">[textarea]</span><br>
 *     <input type="submit">
 *     <span class="wpcf7-spinner"></span>
 *   </p>
 *
 * 策略：
 *   - .cf7-input-row > p  → flex 容器，三列并排
 *   - 其中的 <br>         → display:none
 *   - 表单直接子 <p>      → 清除默认 margin，垂直排列
 */

/* 首行三列：让 CF7 生成的 <p> 成为 flex 容器 */
.contact-form-right .wpcf7-form .cf7-input-row > p {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin: 0;
}

/* 隐藏 CF7 在字段间插入的 <br> */
.contact-form-right .wpcf7-form .cf7-input-row br {
    display: none;
}

/* 每个字段的 <span> 包裹层：不拉伸，保持 input 自身宽度 */
.contact-form-right .wpcf7-form .cf7-input-row .wpcf7-form-control-wrap {
    display: block;
    flex-shrink: 0;
}

/* 三个单行 input */
.contact-form-right .wpcf7-form input[type="text"],
.contact-form-right .wpcf7-form input[type="tel"],
.contact-form-right .wpcf7-form input[type="email"] {
    display: block;
    width: 278px;
    height: 55px;
    border: 1px solid rgb(15, 46, 107);
    background-color: rgb(255, 255, 255);
    box-shadow: inset 0 0 21px 0 rgba(7, 7, 7, 0.21);
    padding: 0 16px;
    font-size: 16px;
    font-family: 'HarmonyOS_Sans_SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    font-weight: 300;
    color: #000;
    box-sizing: border-box;
    outline: none;
    transition: opacity 0.2s;
}

.contact-form-right .wpcf7-form input[type="text"]:focus,
.contact-form-right .wpcf7-form input[type="tel"]:focus,
.contact-form-right .wpcf7-form input[type="email"]:focus {
    opacity: 0.8;
}

/* textarea + submit 所在的 <p>：清除 margin，垂直排列 */
.contact-form-right .wpcf7-form > p {
    margin: 10px 0 0; /* 10px = 距首行 input 的间距 */
}

/* 隐藏 textarea 后的 <br> */
.contact-form-right .wpcf7-form > p > br {
    display: none;
}

/* textarea 全宽，高 230px */
.contact-form-right .wpcf7-form textarea {
    display: block;
    width: 100%;
    height: 230px;
    border: 1px solid rgb(15, 46, 107);
    background-color: rgb(255, 255, 255);
    box-shadow: inset 0 0 21px 0 rgba(7, 7, 7, 0.21);
    padding: 14px 16px;
    font-size: 16px;
    font-family: 'HarmonyOS_Sans_SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    font-weight: 300;
    color: #000;
    resize: vertical;
    box-sizing: border-box;
    outline: none;
}

/* 提交按钮：与 textarea 在同一 <p> 中，margin-top 产生 35px 间距 */
.contact-form-right .wpcf7-form .wpcf7-submit,
.contact-form-right .wpcf7-form input[type="submit"] {
    display: block;
    margin-top: 35px;
    width: 265px;
    height: 49px;
    background-color: #0091e2;
    border: none;
    color: #fff;
    font-size: 16px;
    font-family: 'HarmonyOS_Sans_SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    font-weight: 300;
    letter-spacing: 0.5em;
    cursor: pointer;
    transition: background-color 0.2s;
}

.contact-form-right .wpcf7-form .wpcf7-submit:hover,
.contact-form-right .wpcf7-form input[type="submit"]:hover {
    background-color: #0078bc;
}

/* CF7 加载中旋转图标：不影响布局 */
.contact-form-right .wpcf7-spinner {
    display: inline-block;
    vertical-align: middle;
    margin-left: 8px;
}

/* CF7 验证提示样式 */
.contact-form-right .wpcf7-not-valid-tip {
    font-size: 13px;
    color: #e0302e;
    margin-top: 4px;
}

.contact-form-right .wpcf7-response-output {
    margin-top: 20px;
    padding: 12px 16px;
    font-size: 15px;
    border-left: 4px solid #0091e2;
    background: #e8f5fd;
    color: #333;
}

/* 管理员提示（CF7 未安装时） */
.cf7-admin-notice {
    padding: 16px 20px;
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    font-size: 15px;
    color: #856404;
}

/* ==========================================================
   响应式
   ========================================================== */
@media screen and (max-width: 1200px) {
    .page-banner--contact {
        height: 480px;
    }

    .contact-info-wrap {
        padding: 25px 80px 100px;
    }

    .contact-form-right {
        flex: 0 0 600px;
        width: 600px;
    }

    .contact-form-right .wpcf7-form input[type="text"],
    .contact-form-right .wpcf7-form input[type="tel"],
    .contact-form-right .wpcf7-form input[type="email"] {
        width: calc((600px - 40px) / 3); /* (862→600px 右列 - 两侧余量) / 3 */
    }

    .contact-form-right .wpcf7-form .cf7-input-row > p {
        gap: 0; /* 宽度已由 input 自身 width 控制 */
    }
}

@media screen and (max-width: 960px) {
    .page-banner--contact {
        height: 300px;
    }

    .contact-info-wrap {
        padding: 30px 24px 80px;
    }

    .contact-city-title {
        font-size: 24px;
    }

    .contact-col {
        font-size: 16px;
    }

    .contact-form-section {
        padding-top: 60px;
        padding-bottom: 50px;
    }

    .contact-form-layout {
        flex-direction: column;
        gap: 36px;
    }

    .contact-form-right {
        flex: none;
        width: 100%;
    }

    .contact-form-right .wpcf7-form .cf7-input-row {
        flex-direction: column;
        gap: 10px;
    }

    .contact-form-right .wpcf7-form input[type="text"],
    .contact-form-right .wpcf7-form input[type="tel"],
    .contact-form-right .wpcf7-form input[type="email"] {
        width: 100%;
    }

    .contact-form-en {
        font-size: 26px;
    }

    .contact-form-cn {
        font-size: 22px;
    }
}

@media screen and (max-width: 600px) {
    .page-banner--contact {
        height: 200px;
    }

    .contact-info-wrap {
        padding: 24px 16px 60px;
    }

    .contact-row {
        flex-direction: column;
        gap: 4px;
    }

    .contact-col--cn {
        padding-right: 0;
    }

    .contact-col {
        font-size: 14px;
    }
}
