.first {
    position: relative;
    height: 6rem;
    overflow: hidden;
    background: url("../assets/images/contact/contact.webp") center / cover no-repeat;
}

.first__inner {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-end;
    height: 100%;
    padding: 0 1.6rem 0.87rem;
}

/* ---------- 入场动画 ---------- */
@keyframes first-hero-in {
    from {
        opacity: 0;
        transform: translateY(0.3rem);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.first__badge,
.first__title,
.first__desc {
    opacity: 0;
    animation: first-hero-in 0.7s var(--ease-out) forwards;
}

.first__badge {
    animation-delay: 0.1s;
}

.first__title {
    animation-delay: 0.25s;
}

.first__desc {
    animation-delay: 0.4s;
}

/* ---------- 徽标胶囊 ---------- */
.first__badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 0.81rem;
    height: 0.34rem;
    border: 0.01rem solid rgba(255, 255, 255, 0.5);
    border-radius: 1rem;
    color: #fff;
    font-size: 0.16rem;
    font-weight: 500;
}

/* ---------- 标题 / 描述 ---------- */
.first__title {
    max-width: 10.14rem;
    margin-top: 0.2rem;
    color: #fff;
    font-size: 0.48rem;
    font-weight: 600;
    line-height: 1.2;
}

.first__desc {
    max-width: 9.36rem;
    margin-top: 0.23rem;
    color: #fff;
    font-size: 0.16rem;
    font-weight: 500;
    line-height: 1.5;
}

html[data-mode="h5"] .first {
    height: auto;
    min-height: 3.6rem;
}

html[data-mode="h5"] .first__inner {
    max-width: none;
    padding: 1.1rem 0.4rem 0.6rem;
    height: 5rem;
}

html[data-mode="h5"] .first__badge {
    min-width: max-content;
    padding: 0 0.2rem;
    height: 0.48rem;
    font-size: 0.32rem;
}

html[data-mode="h5"] .first__title {
    max-width: 100%;
    margin-top: 0.24rem;
    font-size: 0.44rem;
}

html[data-mode="h5"] .first__desc {
    max-width: 100%;
    margin-top: 0.24rem;
    font-size: 0.32rem;
    display: none;
}

/* ============================================================
   第二屏：联系卡片
   - 1920 基准：内容区 1600，内边距 100 / 160
   - 卡片 508×550，圆角 20，列间距 38
   - 公司卡：card-bg.png 成图背景（蓝色纹理，圆角已烘焙），
     Logo 拼合 + 三组「图标 / 标签 / 值」信息
   - 联系人卡：白底描边，悬浮仅上浮 + 阴影（不变蓝）
   - 入场：三卡自下错峰浮现（contact.js 滚动触发）
   ============================================================ */
.second {
    padding: 1rem 1.6rem;
}

.second__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.38rem;
}

/* ---------- 卡片主体 ---------- */
.contact-card {
    position: relative;
    min-height: 5.5rem;
    border-radius: 0.2rem;
    transition: transform 0.35s var(--ease-out), box-shadow 0.35s var(--ease-out);
}

.contact-card:hover {
    transform: translateY(-0.12rem);
    box-shadow: 0 0.16rem 0.4rem rgba(2, 101, 178, 0.2);
}

/* ---------- 蓝色公司卡：背景即设计稿成图 ---------- */
.contact-card--brand {
    overflow: hidden;
    padding: 0.46rem 0.54rem 0.5rem;
    background: url("../assets/images/contact/card-bg.png") center / cover no-repeat;
}

/* ---------- 白色联系人卡 ---------- */
.contact-card--person {
    overflow: hidden;
    padding: 0.9rem 0.55rem 0.5rem;
    background: #fff;
    border: 0.01rem solid #D9D9D9;
}

.contact-card__logo,
.contact-card__name,
.contact-card__divider,
.contact-card__rows,
.contact-card__info {
    position: relative;
    z-index: 1;
}

/* ---------- Logo（两块异形拼合） ---------- */
.contact-card__logo {
    width: 1.81rem;
    height: 1.06rem;
}

.contact-card__logo img {
    position: absolute;
    height: 1.05rem;
    width: auto;
}

.contact-card__logo img:first-child {
    left: 0.7256rem;
    top: 0.0035rem;
}

.contact-card__logo img:last-child {
    left: 0;
    top: 0;
    width: 1.08rem;
}

/* ---------- 联系人卡：姓名 / 分隔线 ---------- */
.contact-card__name {
    color: #333;
    font-size: 0.3rem;
    font-weight: 600;
    line-height: 1;
}

.contact-card__divider {
    height: 0.01rem;
    margin-top: 0.43rem;
    background: #D9D9D9;
}

/* ---------- 联系人卡：信息行 ---------- */
.contact-card__rows {
    display: flex;
    flex-direction: column;
    gap: 0.26rem;
    margin: 0.42rem 0 0;
    padding: 0;
    list-style: none;
}

.contact-card__row {
    display: flex;
    align-items: center;
}

.contact-card__value {
    color: #666;
    font-size: 0.2rem;
    font-weight: 500;
    line-height: 0.3rem;
    word-break: break-all;
}

/* ---------- 公司卡：图标 + 标签 + 内容 ---------- */
.contact-card__info {
    margin: 0.89rem 0 0;
    padding: 0;
    list-style: none;
}

.contact-card__info-item {
    display: flex;
    flex-direction: column;
}

.contact-card__info-item+.contact-card__info-item {
    margin-top: 0.32rem;
}

.contact-card__info-head {
    display: flex;
    align-items: center;
    gap: 0.1rem;
    color: #fff;
    font-size: 0.16rem;
    font-weight: 500;
    line-height: 0.2rem;
}

.contact-card__info-value {
    display: inline-block;
    margin-top: 0.1rem;
    color: #fff;
    font-size: 0.16rem;
    font-weight: 500;
    line-height: 1.2;
}

/* ---------- 图标（内联 SVG：公司卡白 / 联系人卡蓝，尺寸随卡片） ---------- */
.contact-card__icon {
    display: block;
    flex: 0 0 auto;
    width: 0.16rem;
    height: 0.16rem;
}

.contact-card--person .contact-card__icon {
    width: 0.2rem;
    height: 0.2rem;
    margin-right: 0.26rem;
}

/* ---------- 入场动画（滚动触发，html.js 防无 JS 隐藏） ---------- */
html.js .second .contact-item {
    opacity: 0;
    transform: translateY(0.3rem);
    transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}

html.js .second .contact-item:nth-child(2) {
    transition-delay: 0.15s;
}

html.js .second .contact-item:nth-child(3) {
    transition-delay: 0.3s;
}

html.js .second .contact-item.is-in {
    opacity: 1;
    transform: translateY(0);
}

/* ---------- H5 ---------- */
html[data-mode="h5"] .second {
    padding: 0.6rem 0.4rem;
}

html[data-mode="h5"] .second__grid {
    grid-template-columns: 1fr;
    gap: 0.3rem;
}

html[data-mode="h5"] .contact-card {
    min-height: 0;
}

html[data-mode="h5"] .contact-card--brand {
    padding: 0.5rem 0.4rem;
}

html[data-mode="h5"] .contact-card--person {
    padding: 1rem 0.4rem 0.6rem;
}

html[data-mode="h5"] .contact-card__logo {
    width: 2.4rem;
    height: 1.4rem;
}

html[data-mode="h5"] .contact-card__logo img {
    height: 1.38rem;
}

html[data-mode="h5"] .contact-card__logo img:last-child {
    width: 1.42rem;
}

html[data-mode="h5"] .contact-card__name {
    font-size: 0.4rem;
}

html[data-mode="h5"] .contact-card__divider {
    margin-top: 0.5rem;
}

html[data-mode="h5"] .contact-card__rows {
    gap: 0.32rem;
    margin-top: 0.5rem;
}

html[data-mode="h5"] .contact-card__value {
    font-size: 0.32rem;
}

html[data-mode="h5"] .contact-card__info {
    margin-top: 1rem;
}

html[data-mode="h5"] .contact-card__info-item+.contact-card__info-item {
    margin-top: 0.48rem;
}

html[data-mode="h5"] .contact-card__info-head,
html[data-mode="h5"] .contact-card__info-value {
    font-size: 0.32rem;
}

html[data-mode="h5"] .contact-card__info-head {
    line-height: 0.3rem;
}

html[data-mode="h5"] .contact-card__icon {
    width: 0.26rem;
    height: 0.26rem;
    margin-right: 0.14rem;
}

html[data-mode="h5"] .contact-card--person .contact-card__icon {
    width: 0.3rem;
    height: 0.3rem;
    margin-right: 0.3rem;
}

/* ============================================================
   第三屏：留言表单（设计稿 317_880）
   - 1920 基准：背景 #F4F7FD，内容区 1600（内边距 0.88rem / 1.6rem）
   - 左：880 宽（标题 48 / 描述 16 / 表单 880×623），右：586×483 圆角 20 配图
   - 表单结构与 common.html wpcf7 组件一致：下划线控件 + 上方标签
   - 布局：3 列栅格（Name/Email/Phone｜Country+Attachment｜Content 整行）
   - 入场：滚动触发整体浮现，标题→描述→表单→说明→配图错峰（contact.js）
   ============================================================ */
.third {
    padding: 0.88rem 1.6rem 1rem;
    background: #F4F7FD;
}

.third__inner {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

/* ---------- 左：标题 / 描述 ---------- */
.third__title {
    color: #333;
    font-size: 0.48rem;
    font-weight: 600;
    line-height: 1.2;
}

.third__desc {
    max-width: 8.7rem;
    margin-top: 0.2rem;
    color: #999;
    font-size: 0.16rem;
    font-weight: 500;
    line-height: 1.5;
}

/* ---------- 左：wpcf7 表单（结构与 common.html 一致） ---------- */
.third form>ul {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: auto auto auto;
    column-gap: 0.19rem;
    row-gap: 0.46rem;
    margin: 0.55rem 0 0;
    padding: 0;
    list-style: none;
}

/* 栅格排布（对齐设计稿）：3 列自动流——
   第 1 行 Name / Email / Phone-Whatsapp；第 2 行 Company / Country / Website；
   第 3 行 Content 整行 */
.third form>ul>li:nth-child(7) {
    grid-column: 1 / 4;
}

.third form li>p {
    margin: 0;
}

.third form li>p>span {
    display: block;
}

.third form label {
    display: block;
    color: #666;
    font-family: "Montserrat", sans-serif;
    font-size: 0.16rem;
    font-style: normal;
    font-weight: 500;
    line-height: 175%;
}

.third form input,
.third form textarea {
    display: block;
    width: 100%;
    padding: 0.04rem 0 0.08rem;
    border: none;
    border-bottom: 0.01rem solid #D9D9D9;
    background: transparent;
    outline: none;
    color: #333;
    font-family: "Montserrat", sans-serif;
    font-size: 0.16rem;
    font-style: normal;
    font-weight: 400;
    line-height: 175%;
    transition: border-color 0.3s ease;
}

.third form input:focus,
.third form textarea:focus {
    border-color: #0265B2;
}

.third form input::placeholder,
.third form textarea::placeholder {
    color: #999;
}

/* Content 整行：textarea 高度对齐设计稿 */
.third form textarea {
    height: 0.55rem;
    min-height: 0;
    resize: vertical;
}

/* Submit 按钮（设计稿：221×46，圆角 10，#0265B2） */
.third form>p:has(> button[type="submit"]) {
    margin: 0;
}

.third form>p>button[type="submit"] {
    display: block;
    width: 2.21rem;
    height: 0.46rem;
    margin-top: 0.4rem;
    border: none;
    border-radius: 0.1rem;
    background: #0265B2;
    color: #FFF;
    font-family: "Montserrat", sans-serif;
    font-size: 0.18rem;
    font-style: normal;
    font-weight: 400;
    line-height: 0.46rem;
    text-align: center;
    cursor: pointer;
    transition: filter 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.third form>p>button[type="submit"]:hover {
    filter: brightness(1.1);
    transform: translateY(-0.02rem);
    box-shadow: 0 0.08rem 0.2rem rgba(2, 101, 178, 0.3);
}

/* ---------- 左：底部保密说明 ---------- */
.third__note {
    max-width: 8.7rem;
    margin-top: 0.49rem;
    color: #999;
    font-size: 0.16rem;
    font-weight: 500;
    line-height: 1.5;
}

/* ---------- 右：配图（586×483，圆角 20） ---------- */
.third__media {
    flex: 0 1 auto;
    margin-top: 0.78rem;
}

.third__media img {
    display: block;
    width: 5.86rem;
    height: 4.83rem;
    object-fit: cover;
    border-radius: 0.2rem;
}

/* ---------- 入场动画（滚动触发，html.js 防无 JS 隐藏） ---------- */
html.js .third .third__title,
html.js .third .third__desc,
html.js .third .third__content .wpcf7,
html.js .third .third__note,
html.js .third .third__media {
    opacity: 0;
    transform: translateY(0.3rem);
    transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}

html.js .third.is-in .third__title,
html.js .third.is-in .third__desc,
html.js .third.is-in .third__content .wpcf7,
html.js .third.is-in .third__note,
html.js .third.is-in .third__media {
    opacity: 1;
    transform: translateY(0);
}

html.js .third.is-in .third__desc {
    transition-delay: 0.1s;
}

html.js .third.is-in .third__content .wpcf7 {
    transition-delay: 0.2s;
}

html.js .third.is-in .third__note {
    transition-delay: 0.3s;
}

html.js .third.is-in .third__media {
    transition-delay: 0.15s;
}

/* ---------- H5 ---------- */
html[data-mode="h5"] .third {
    padding: 0.6rem 0.4rem;
}

html[data-mode="h5"] .third__inner {
    flex-direction: column;
    gap: 0.5rem;
}

html[data-mode="h5"] .third__title {
    font-size: 0.44rem;
}

html[data-mode="h5"] .third__desc {
    max-width: 100%;
    margin-top: 0.24rem;
    font-size: 0.32rem;
}

html[data-mode="h5"] .third form>ul {
    grid-template-columns: 1fr;
    grid-template-rows: none;
    column-gap: 0;
    row-gap: 0.32rem;
    margin-top: 0.4rem;
}

html[data-mode="h5"] .third form>ul>li:nth-child(1),
html[data-mode="h5"] .third form>ul>li:nth-child(2),
html[data-mode="h5"] .third form>ul>li:nth-child(3),
html[data-mode="h5"] .third form>ul>li:nth-child(4),
html[data-mode="h5"] .third form>ul>li:nth-child(5),
html[data-mode="h5"] .third form>ul>li:nth-child(6),
html[data-mode="h5"] .third form>ul>li:nth-child(7) {
    grid-column: auto;
    grid-row: auto;
}

html[data-mode="h5"] .third form label,
html[data-mode="h5"] .third form input,
html[data-mode="h5"] .third form textarea {
    font-size: 0.32rem;
}

html[data-mode="h5"] .third form textarea {
    height: 1rem;
}

html[data-mode="h5"] .third form>p>button[type="submit"] {
    width: 100%;
    height: 0.68rem;
    margin-top: 0.5rem;
    font-size: 0.32rem;
    line-height: 0.68rem;
}

html[data-mode="h5"] .third__note {
    max-width: 100%;
    margin-top: 0.3rem;
    font-size: 0.32rem;
}

html[data-mode="h5"] .third__media {
    width: 100%;
    margin-top: 0;
}

html[data-mode="h5"] .third__media img {
    width: 100%;
    height: auto;
}

/* ============================================================
   第四屏：厂区地址（设计稿 320_924）
   - 1920 基准：内边距 1rem / 1.6rem，内容区 1600
   - 居中标题 40px + 全宽配图（1592×447）
   - 入场：滚动触发，标题→配图错峰浮现（contact.js）
   ============================================================ */
.fourth {
    padding: 1rem 1.6rem;
}

.fourth__title {
    color: #333;
    font-size: 0.4rem;
    font-weight: 600;
    line-height: 1.25;
    text-align: center;
}

.fourth__media {
    margin-top: 0.39rem;
}

.fourth__media img {
    display: block;
    width: 100%;
    height: 4.47rem;
    object-fit: cover;
}

/* ---------- 入场动画（滚动触发，html.js 防无 JS 隐藏） ---------- */
html.js .fourth .fourth__title,
html.js .fourth .fourth__media {
    opacity: 0;
    transform: translateY(0.3rem);
    transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}

html.js .fourth.is-in .fourth__title,
html.js .fourth.is-in .fourth__media {
    opacity: 1;
    transform: translateY(0);
}

html.js .fourth.is-in .fourth__media {
    transition-delay: 0.15s;
}

/* ---------- H5 ---------- */
html[data-mode="h5"] .fourth {
    padding: 0.6rem 0.4rem;
}

html[data-mode="h5"] .fourth__title {
    font-size: 0.44rem;
}

html[data-mode="h5"] .fourth__media {
    margin-top: 0.3rem;
}

html[data-mode="h5"] .fourth__media img {
    height: auto;
}