/* Contact 页面特定样式 */

.contact-page {
    padding-top: 0;
    background-color: #FFFFFF;
}

/* 覆盖复用的首页 Hero 样式 */
.contact-page .hero-section {
    height: 720px;
}

.contact-page .hero-title-container {
    margin-bottom: 0;
}

.contact-page .hero-title {
    font-size: 0.64rem;
}

/* 公司介绍区域 */
.contact-intro-section {
    padding: 0.8rem 0;
    background-color: #FFFFFF;
}

.pc-only {
    display: block !important;
}

.mobile-only {
    display: none !important;
}

.mobile-br {
    display: none;
}

.contact-intro-container {
    padding: 0 2.04rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.intro-left h2 {
    font-family: 'PangMenZhengDaoBiaoTiTiMianFeiBan-4', sans-serif;
    font-size: 0.64rem;
    font-weight: normal;
    line-height: 1.2;
}

.intro-desc {
    font-size: 0.14rem;
    color: #505050;
    line-height: 1.6;
    margin-top: 0.16rem;
}

.intro-right {
    width: 4.88rem;
    flex-shrink: 0;
}

.intro-right p {
    font-size: 0.16rem;
    color: #505050;
    line-height: 1.6;
}

/* 地址卡片区域 */
.location-card-section {
    padding: 0.4rem 0;
    background-color: #FFFFFF;
    position: relative;
    overflow: hidden; /* 防止边缘矩形撑开页面宽度 */
}

/* 边缘装饰背景 */
.edge-rect {
    position: absolute;
    width: 11.84rem;
    height: 4.12rem;
    top: 50%;
    transform: translateY(-50%);
    z-index: 0;
}

.edge-rect-right {
    right: 0;
    background: url('images/contact-map-bg1.svg') no-repeat right center / contain;
}

.edge-rect-left {
    left: 0;
    background: url('images/contact-map-bg2.svg') no-repeat left center / contain;
}

.location-card-container {
    position: relative;
    z-index: 1;
    padding: 0 2.04rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.88rem;
}

/* 移除 flex-direction: row-reverse; 保持 HTML 原有的 DOM 顺序 */
.location-card-section.reverse .location-card-container {
    /* 生产厂房区域：HTML 中 Map 在前，Text 在后，自然形成 Map 左、Text 右 */
}

.location-text {
    width: 4.88rem;
    flex-shrink: 0;
    position: relative;
    z-index: 2;
}

.location-text h3 {
    font-family: 'PangMenZhengDaoBiaoTiTiMianFeiBan-4', sans-serif;
    font-size: 0.48rem;
    color: #0037C3;
    font-weight: normal;
    margin-bottom: 0.32rem;
}

.location-text p {
    font-size: 0.16rem;
    color: #505050;
    line-height: 1.6;
}

.location-map {
    position: relative;
    width: 9.36rem;
    height: 5.26rem;
    border-radius: 0.48rem;
    flex-shrink: 0;
    z-index: 1;
}

.location-map img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0.48rem;
    position: relative;
    z-index: 2;
}

/* 蓝色半圆装饰 */
/* 移除 map-bg-circle 相关样式，现已合并到 SVG 中 */

/* 表单区域 */
.contact-form-section {
    padding: 1.2rem 0;
    background-color: #FFFFFF;
}

.form-container {
    padding: 0 2.04rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.form-header {
    text-align: center;
    margin-bottom: 0.36rem;
}

.form-header h2 {
    font-family: 'PangMenZhengDaoBiaoTiTiMianFeiBan-4', sans-serif;
    font-size: 0.64rem;
    font-weight: normal;
    color: #000000;
    margin-bottom: 0.36rem;
}

.form-header h2 span {
    color: #0037C3;
}

.form-header p {
    font-size: 0.18rem;
    color: #505050;
    line-height: 1.6;
    margin: 0 auto;
}

.cooperation-form {
    width: 100%;
    background-color: #F5F5F5;
    border-radius: 0.36rem;
    padding: 0.48rem 0.24rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.24rem;
    box-sizing: border-box; /* 确保 padding 不会撑大容器宽度 */
}

.form-row {
    display: flex;
    flex-wrap: wrap; /* 允许在 PC 端折行 */
    justify-content: center;
    gap: 0.24rem;
    width: 100%;
    max-width: 14.16rem; /* 限制输入框行的最大宽度 */
}

.form-group {
    flex: 1 1 30%; /* 让输入框均分宽度，基础宽度设为30%以便一行放3个 */
    min-width: 3rem; /* 最小宽度限制 */
}

.form-group.full-width {
    width: 100%;
}

/* 表单输入框样式 */
.cooperation-form input,
.cooperation-form textarea {
    width: 100%;
    padding: 0.16rem 0.24rem;
    border: none;
    border-radius: 0.16rem; /* 调整为更小一点的圆角，更贴近设计图 */
    background-color: #FFFFFF;
    font-size: 0.16rem;
    color: #000000;
    outline: none;
    box-sizing: border-box;
    font-family: inherit;
    line-height: 1.5;
}

.cooperation-form input.input-normal {
    border-radius: 0;
}

.cooperation-form input::placeholder,
.cooperation-form textarea::placeholder {
    color: #999999;
    opacity: 1; /* 确保占位符颜色不会被浏览器默认淡化 */
}

/* 必填项：占位提示 + 星号（星号紧跟文字，避免 em 估算错位） */
.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background-color: #FFFFFF;
    border-radius: 0.16rem;
    overflow: hidden;
}

.input-wrapper.textarea-wrapper {
    align-items: flex-start;
}

.cooperation-form .input-wrapper input,
.cooperation-form .input-wrapper textarea {
    padding-right: 0.16rem;
    border-radius: 0;
    position: relative;
    z-index: 0;
}

.field-hint {
    position: absolute;
    left: 0.24rem;
    top: 50%;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    color: #999999;
    font-size: 0.16rem;
    font-family: inherit;
    line-height: 1;
    pointer-events: none;
    z-index: 1;
    white-space: nowrap;
}

.textarea-wrapper .field-hint {
    top: 0.16rem;
    transform: none;
}

.field-hint .required-star {
    position: static;
    color: #E23D3D;
    font-size: inherit;
    pointer-events: none;
    margin-left: 5px;
}

.input-wrapper:has(input:focus) .field-hint,
.input-wrapper:has(textarea:focus) .field-hint,
.input-wrapper:has(input:not(:placeholder-shown)) .field-hint,
.input-wrapper:has(textarea:not(:placeholder-shown)) .field-hint {
    display: none;
}

.cooperation-form input {
    height: 0.56rem; /* 设定固定高度，防止被拉伸 */
}

.cooperation-form textarea {
    line-height: 1.6;
    height: 1.64rem;
    resize: none;
}

/* 表单按钮 */
.form-submit {
    margin-top: 0.24rem;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.12rem;
    justify-content: center;
}

.submit-btn {
    background-color: #0037C3;
    color: #FFFFFF;
    border: none;
    padding: 0.16rem 0.64rem;
    border-radius: 0.64rem; /* 改为大圆角 */
    font-size: 0.18rem;
    cursor: pointer;
    transition: background-color 0.3s;
    font-family: 'HarmonyOS Sans SC', sans-serif;
    font-weight: bold;
}

.submit-btn:hover {
    background-color: #00288E;
}

.submit-btn:disabled {
    cursor: not-allowed;
    opacity: 0.72;
}

.form-message {
    color: #505050;
    font-size: 0.14rem;
    line-height: 1.5;
    margin: 0;
    min-height: 0.2rem;
    text-align: center;
}

.form-message.success {
    color: #138A5B;
}

.form-message.error {
    color: #D81818;
}

/* 移动端适配 */
@media (max-width: 1024px) {
    .contact-intro-container {
        padding: 0 16px;
        flex-direction: column;
        gap: 0.24rem;
    }
    .location-card-container,
    .location-card-section.reverse .location-card-container {
        padding: 0 16px;
        flex-direction: column;
    }
    .location-map {
        width: 100%;
    }
    .form-container {
        padding: 0 16px;
    }
    .form-row {
        flex-direction: column;
    }
    .form-group {
        width: 100%;
        flex: none; /* 重置 flex-basis，防止在 column 模式下导致高度异常 */
        min-width: 0;
    }
    .form-row.full-width .form-group {
        width: 100%;
    }
    .pc-only {
        display: none !important;
    }
    .mobile-only {
        display: block !important;
    }
    .form-row.mobile-only {
        display: flex !important;
    }
    .mobile-br {
        display: block;
    }
}

@media (max-width: 768px) {
    .contact-page .hero-section {
        height:43vh;
    }
    .contact-page .hero-title {
        
    }

    .contact-intro-section {
        padding: 0.4rem 0;
    }
    
    .intro-left {
        display: flex;
        flex-direction: column;
        gap: 24px;
    }

    .intro-left h2 {
        font-size: .64rem;
        margin: 0;
    }

    .intro-desc {
        display: block;
        margin: 0;
        font-size: .28rem;
        line-height: 1.6;
    }

    .location-card-section {
        padding: 0.2rem 0;
    }

    .location-card-container {
        flex-direction: column-reverse; /* 移动端 Map 在上，Text 在下 */
        gap: 0.12rem;
        padding: 0 16px;
    }

    .location-card-container.reverse-mobile {
        flex-direction: column; /* 移动端 Map 在上，Text 在下 */
        gap: 0.12rem;
    }

    .location-map {
        height: 193px;
        width: 100%;
        border-radius: 24px;
    }

    .location-map img {
        border-radius: 24px;
    }

    .edge-rect {
        width: 0.8rem;
        height: 2.6rem;
        top: 0.8rem; /* section padding-top 0.4rem + (map height 2.4rem - rect height 1.6rem) / 2 = 0.8rem */
        transform: none;
        z-index: 0;
    }

    .edge-rect-right {
        right: 0;
        left: auto;
        border-radius: 1.6rem 0 0 1.6rem; /* 靠右，左侧为半圆角 */
        width: 99vw;
        background: #0037C3;
    }

    .edge-rect-left {
        left: 0;
        right: auto;
        border-radius: 0 1.6rem 1.6rem 0; /* 靠左，右侧为半圆角 */
        width: 99vw;/* 作为整个地图的背景底色 */
        background: #0037C3;
    }

    .location-text {
        width: 100%;
        text-align: left;
    }

    .location-text h3 {
        font-size: .48rem;
        margin-bottom: 0.16rem;
    }

    .location-text p {
        font-size: .28rem;
    }

    .contact-form-section {
        padding: 40px 0; /* Changed from 0.8rem 0 to fit mobile better, let's see */
    }

    .form-container {
        padding: 0 16px;
    }

    .form-header {
        margin-bottom: 24px;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 24px;
    }

    .form-header h2 {
        font-size: .64rem;
        margin-bottom: 0;
        line-height: 1.2;
    }

    .form-header p {
        font-size: .28rem;
        line-height: 1.6;
        margin: 0;
    }

    .cooperation-form {
        padding: 16px;
        border-radius: 24px;
        gap: 12px;
        display: flex;
        flex-direction: column;
    }

    .form-row {
        flex-direction: column;
        gap: 12px;
    }

    .form-group {
        width: 100%;
        flex: none;
        min-width: 0;
    }

    .cooperation-form input,
    .cooperation-form textarea {
        padding: 12px;
        font-size: .28rem;
        height: auto;
        border-radius: 12px;
        line-height: 1;
    }

    .cooperation-form textarea {
        line-height: 1.6;
        height: 120px;
    }

    .input-wrapper {
        border-radius: 12px;
        width: 100%;
    }

    .cooperation-form .input-wrapper input,
    .cooperation-form .input-wrapper textarea {
        border-radius: 12px;
    }

    .field-hint {
        left: 12px;
        font-size: .28rem;
    }

    .textarea-wrapper .field-hint {
        top: 12px;
    }

    .cooperation-form input {
        height: 38px;
    }

    .form-submit {
        margin-top: 0;
        width: 100%;
    }

    .submit-btn {
        width: 100%;
        padding: 16px 24px;
        border-radius: 64px;
        font-size: .32rem;
        height: 48px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .contact-intro-container {
        padding-left: 16px;
        padding-right: 16px;
    }
    .location-card-container {
        padding-left: 16px;
        padding-right: 16px;
    }
    .form-container {
        padding-left: 16px;
        padding-right: 16px;
    }
}
