/* ============================================================
   1. 首屏 Hero（Figma 560_2：1920 × 700）
   ============================================================ */
.first {
    position: relative;
    height: 7rem;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
}

/* 背景大图：入场缓慢回缩（Ken Burns），顶部品牌蓝压色保证 header 衔接 */
.first__bg {
    position: absolute;
    inset: 0;
    background: url("../assets/images/service/service.webp") center / cover no-repeat;
    animation: firstZoom 2.2s var(--ease-out) both;
    will-change: transform;
}

/* 底部轻压暗，保证标题/面包屑可读性 */
.first::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg,
            rgba(3, 82, 141, 0.35) 0%,
            rgba(3, 82, 141, 0) 30%,
            rgba(0, 0, 0, 0) 62%,
            rgba(0, 0, 0, 0.32) 100%);
    pointer-events: none;
}

.first__content {
    position: relative;
    z-index: 1;
    width: 100%;
    padding: 0 1.6rem 0.76rem;
}

/* ---------- 标题：遮罩上滑 + 字距收缩 ---------- */
.first__title {
    overflow: hidden;
    /* 遮罩：文字从下方滑入 */
    font-size: 0.64rem;
    font-weight: 600;
    line-height: 1.15;
    color: #ffffff;
}

.first__title span {
    display: inline-block;
    animation: firstTitleUp 0.9s var(--ease-out) 0.25s both;
}

/* ---------- 入场动效 ---------- */
@keyframes firstZoom {
    from {
        transform: scale(1.12);
    }

    to {
        transform: scale(1);
    }
}

@keyframes firstTitleUp {
    from {
        transform: translateY(110%);
        letter-spacing: 0.04rem;
        opacity: 0.4;
    }

    to {
        transform: translateY(0);
        letter-spacing: normal;
        opacity: 1;
    }
}

/* ============================================================
   2. H5 适配
   ============================================================ */
html[data-mode="h5"] .first {
    height: 4.8rem;
}

html[data-mode="h5"] .first__content {
    padding: 0 0.4rem 0.5rem;
}

html[data-mode="h5"] .first__title {
    font-size: 0.56rem;
}

/* ============================================================
   2. 第二屏标题（Figma 741_563：居中，48px，最大宽 1072）
   ============================================================ */
.second {
    padding: 1rem 1.6rem 0.7rem;
}

.second__title {
    max-width: 10.72rem;
    margin: 0 auto;
    overflow: hidden; /* 遮罩：文字从下方滑入 */
    text-align: center;
    font-size: 0.48rem;
    font-weight: 600;
    line-height: 1.35;
    color: #333333;
}

.second__title span {
    display: inline-block;
}

/* 描述：Figma 747_976 —— 居中，20px，#666，最大宽 1315 */
.second__desc {
    max-width: 13.15rem;
    margin: 0.1rem auto 0;
    text-align: center;
    font-size: 0.2rem;
    line-height: 1.6;
    color: #666666;
}

/* 入场：与标题联动，淡入 + 上移（略延迟形成层级） */
.second__desc[data-reveal] {
    opacity: 0;
    transform: translateY(0.3rem);
}

.second__desc[data-reveal].is-in-view {
    opacity: 1;
    transform: none;
    transition:
        opacity 0.9s var(--ease-out) 0.15s,
        transform 0.9s var(--ease-out) 0.15s;
}

/* 入场：data-reveal 触发（common.js 进入视口加 .is-in-view），
   容器淡入 + 文字遮罩上滑 + 字距收拢 */
.second__title[data-reveal] span {
    transform: translateY(110%);
    letter-spacing: 0.02rem;
}

.second__title[data-reveal].is-in-view span {
    transform: translateY(0);
    letter-spacing: normal;
    transition:
        transform 0.9s var(--ease-out),
        letter-spacing 0.9s var(--ease-out);
}

/* ---------- H5 适配 ---------- */
html[data-mode="h5"] .second {
    padding: 0.6rem 0.4rem 0.4rem;
}

html[data-mode="h5"] .second__title {
    font-size: 0.44rem;
}

html[data-mode="h5"] .second__desc {
    margin-top: 0.24rem;
    font-size: 0.32rem;
}

/* ============================================================
   3. 服务卡片（Figma 747_1092：3×2 网格，上下外边距 70px）
   ============================================================ */
.third__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.4rem 0.35rem;
    margin: 0.7rem 0 0;
    list-style: none;
}

.third__card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 7.36rem;
    overflow: hidden;
    background: #ffffff;
    border: 1px solid #d9d9d9;
    border-radius: 0.2rem;
    transition:
        transform 0.5s var(--ease-out),
        box-shadow 0.5s var(--ease-out),
        border-color 0.5s var(--ease-out);
}

/* 悬浮：上浮 + 品牌蓝描边 + 大投影 */
.third__card:hover {
    transform: translateY(-0.14rem);
    border-color: #03528d;
    box-shadow:
        0 0.24rem 0.48rem rgba(3, 82, 141, 0.18),
        0 0.08rem 0.16rem rgba(3, 82, 141, 0.1);
}

/* 悬浮：高光斜向扫过整卡 */
.third__card::after {
    content: "";
    position: absolute;
    top: 0;
    left: -75%;
    z-index: 3;
    width: 50%;
    height: 100%;
    background: linear-gradient(105deg,
            transparent,
            rgba(255, 255, 255, 0.5),
            transparent);
    transform: skewX(-20deg);
    transition: left 0.9s ease;
    pointer-events: none;
}

.third__card:hover::after {
    left: 130%;
}

/* ---------- 图片：容器裁切 + 悬浮缓慢放大 ---------- */
.third__media {
    overflow: hidden;
    aspect-ratio: 510 / 255;
}

.third__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.001);
    transition: transform 0.8s var(--ease-out);
}

.third__card:hover .third__media img {
    transform: scale(1.08);
}

/* ---------- 内容区 ---------- */
.third__body {
    position: relative;
    z-index: 1;
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 0 0.37rem 0.46rem;
}

/* 品牌蓝竖条：锚定标题左侧，悬浮生长 + 发光 */
.third__body::before {
    content: "";
    position: absolute;
    top: 0.41rem;
    left: 0;
    width: 0.06rem;
    height: 0.67rem;
    background: #03528d;
    transform-origin: top;
    transition:
        transform 0.4s var(--ease-out),
        box-shadow 0.4s var(--ease-out);
}

.third__card:hover .third__body::before {
    transform: scaleY(1.3);
    box-shadow: 0 0 0.12rem rgba(3, 82, 141, 0.6);
}

.third__card--contact .third__body::before {
    content: none;
}

.third__card-title {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2; /* 最多显示两行 */
    line-clamp: 2;
    overflow: hidden;
    margin-top: 0.3rem;
    font-size: 0.3rem;
    font-weight: 600;
    line-height: 1.35;
    color: #333333;
    transition: color 0.4s var(--ease-out);
}

.third__card:hover .third__card-title {
    color: #03528d;
}

.third__card-desc {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    /*line-clamp: 5;*/
    overflow: hidden;
    margin-top: 0.3rem;
    font-size: 0.2rem;
    line-height: 1.5;
    color: #666666;
}

/* 勾选列表：8px 品牌蓝圆点，悬浮逐条右移（阶梯延迟） */
.third__list {
    margin-top: auto;
    padding-top: 0.3rem;
    list-style: none;
}

.third__list li {
    position: relative;
    padding-left: 0.22rem;
    font-size: 0.2rem;
    line-height: 0.3rem;
    color: #666666;
    transition: transform 0.3s var(--ease-out);
}

.third__list li::before {
    content: "";
    position: absolute;
    top: 0.11rem;
    left: 0;
    width: 0.08rem;
    height: 0.08rem;
    border-radius: 50%;
    background: #03528d;
}

.third__list li:nth-child(2) {
    transition-delay: 0.05s;
}

.third__list li:nth-child(3) {
    transition-delay: 0.1s;
}

.third__card:hover .third__list li {
    transform: translateX(0.08rem);
}

/* ---------- 联系卡：E-mail 按钮（悬浮上浮 + 变亮 + 扫光） ---------- */
.third__mail {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    margin-top: auto;
    width: 4.04rem;
    height: 0.56rem;
    padding: 0 0.25rem;
    background-color: #03528d;
    border: 1px solid #d9d9d9;
    border-radius: 0.1rem;
    color: #ffffff;
    font-size: 0.2rem;
    font-weight: 500;
    white-space: nowrap;
    transition:
        transform 0.4s var(--ease-out),
        background-color 0.4s var(--ease-out),
        box-shadow 0.4s var(--ease-out);
}

.third__mail::after {
    content: "";
    position: absolute;
    top: 0;
    left: -80%;
    width: 40%;
    height: 100%;
    background: linear-gradient(105deg,
            transparent,
            rgba(255, 255, 255, 0.45),
            transparent);
    transform: skewX(-20deg);
    transition: left 0.7s ease;
}

.third__mail:hover {
    transform: translateY(-0.04rem);
    background-color: #0a63a8;
    box-shadow: 0 0.12rem 0.24rem rgba(3, 82, 141, 0.35);
}

.third__mail:hover::after {
    left: 140%;
}

/* ---------- 入场：逐卡上滑淡入（阶梯延迟，不影响悬浮过渡） ---------- */
@keyframes thirdCardUp {
    from {
        opacity: 0;
        transform: translateY(0.4rem);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

html.js .third__card[data-reveal]:not(.is-in-view) {
    opacity: 0;
}

.third__card[data-reveal].is-in-view {
    animation: thirdCardUp 0.8s var(--ease-out) var(--d, 0s) backwards;
}

.third__grid>.third__card:nth-child(2) {
    --d: 0.12s;
}

.third__grid>.third__card:nth-child(3) {
    --d: 0.24s;
}

.third__grid>.third__card:nth-child(4) {
    --d: 0.1s;
}

.third__grid>.third__card:nth-child(5) {
    --d: 0.22s;
}

.third__grid>.third__card:nth-child(6) {
    --d: 0.34s;
}

/* ---------- H5 适配 ---------- */
html[data-mode="h5"] .third__grid {
    grid-template-columns: 1fr;
    gap: 0.4rem;
    margin-top: 0.4rem;
}

html[data-mode="h5"] .third__card {
    min-height: 0;
}

html[data-mode="h5"] .third__body {
    padding: 0 0.3rem 0.4rem;
}

html[data-mode="h5"] .third__body::before {
    top: 0.3rem;
}

html[data-mode="h5"] .third__card-title {
    font-size: 0.4rem;
}

html[data-mode="h5"] .third__card-desc {
    margin-top: 0.24rem;
    font-size: 0.32rem;
}

html[data-mode="h5"] .third__list li {
    padding-left: 0.3rem;
    font-size: 0.32rem;
    line-height: 0.4rem;
}

html[data-mode="h5"] .third__list li::before {
    top: 0.16rem;
}

html[data-mode="h5"] .third__mail {
    width: 100%;
    height: 0.72rem;
    font-size: 0.32rem;
    margin-top: 0.2rem;
}

/* ============================================================
   4. 留言表单（Figma 747_1058：品牌蓝圆角面板，左文案右表单）
   ============================================================ */
.fourth {
    margin-top: 0.7rem;
}

.fourth__panel {
    display: grid;
    grid-template-columns: 1fr 6.59rem;
    gap: 0.5rem;
    align-items: center;
    min-height: 5.72rem;
    padding: 0.8rem 1rem 0.9rem 1.02rem;
    background: #03528d;
    border-radius: 0.2rem;
}

/* ---------- 左侧文案 ---------- */
.fourth__intro {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.fourth__title {
    overflow: hidden; /* 遮罩：文字从下方滑入 */
    max-width: 6.87rem;
    font-size: 0.48rem;
    font-weight: 600;
    line-height: 1.3;
    color: #ffffff;
}

.fourth__title span {
    display: inline-block;
}

.fourth__desc {
    max-width: 5.34rem;
    margin-top: 0.4rem;
    font-size: 0.2rem;
    line-height: 1.5;
    color: #cccccc;
}

/* Contact Us：橙底 + 白箭头，悬浮上浮 + 变亮 + 箭头右移 + 扫光 */
.fourth__contact {
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    gap: 0.12rem;
    margin-top: 1.4rem;
    height: 0.44rem;
    padding: 0 0.16rem;
    background: #f5770b;
    border-radius: 0.1rem;
    color: #ffffff;
    font-size: 0.16rem;
    transition:
        transform 0.4s var(--ease-out),
        background-color 0.4s var(--ease-out),
        box-shadow 0.4s var(--ease-out);
}

.fourth__contact svg {
    width: 0.2rem;
    height: 0.2rem;
    transition: transform 0.4s var(--ease-out);
}

.fourth__contact:hover {
    transform: translateY(-0.04rem);
    background: #ff8a24;
    box-shadow: 0 0.12rem 0.24rem rgba(245, 119, 11, 0.4);
}

.fourth__contact:hover svg {
    transform: translateX(0.05rem);
}

.fourth__contact::after {
    content: "";
    position: absolute;
    top: 0;
    left: -80%;
    width: 40%;
    height: 100%;
    background: linear-gradient(105deg,
            transparent,
            rgba(255, 255, 255, 0.45),
            transparent);
    transform: skewX(-20deg);
    transition: left 0.7s ease;
    pointer-events: none;
}

.fourth__contact:hover::after {
    left: 140%;
}

/* ---------- 右侧表单（结构沿用 common.html，仅样式） ---------- */

/* 行盒修复：p 去默认外边距，内层 span 用纵向 flex——
   flex 项高度由内容决定，包装层不再被拉伸出多余高度 */
.fourth__form li p {
    margin: 0;
}

.fourth__form li p>span {
    display: flex;
    flex-direction: column;
}

.fourth__form form>ul {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.25rem 0.14rem;
    list-style: none;
}

/* Message 独占一行 */
.fourth__form form>ul>li:nth-child(7) {
    grid-column: 1 / -1;
}

.fourth__form li label {
    display: block;
    margin-bottom: 0.18rem;
    font-size: 0.16rem;
    line-height: 1;
    color: #cccccc;
}

.fourth__form input[type="text"],
.fourth__form input[type="email"] {
    width: 100%;
    height: 0.4rem;
    padding: 0 0.16rem;
    background: #ffffff;
    border: none;
    border-radius: 0;
    color: #333333;
    font-size: 0.16rem;
}

.fourth__form textarea {
    width: 100%;
    height: 0.96rem;
    padding: 0.1rem 0.16rem;
    background: #ffffff;
    border: none;
    border-radius: 0;
    color: #333333;
    font-size: 0.16rem;
    resize: vertical;
}

/* 聚焦：品牌橙描边 */
.fourth__form input:focus,
.fourth__form textarea:focus {
    outline: none;
    box-shadow: 0 0 0 2px #f5770b;
}

/* 提交按钮：橙底，悬浮上浮 + 变亮 + 橙色辉光 + 扫光 */
.fourth__form form>p {
    margin: 0.32rem 0 0;
    display: flex;
}

.fourth__form [type="submit"] {
    position: relative;
    overflow: hidden;
    height: 0.44rem;
    padding: 0 0.3rem;
    background: #f5770b;
    border: none;
    border-radius: 0.1rem;
    color: #ffffff;
    font-size: 0.18rem;
    cursor: pointer;
    transition:
        transform 0.4s var(--ease-out),
        background-color 0.4s var(--ease-out),
        box-shadow 0.4s var(--ease-out);
}

.fourth__form [type="submit"]::after {
    content: "";
    position: absolute;
    top: 0;
    left: -80%;
    width: 40%;
    height: 100%;
    background: linear-gradient(105deg,
            transparent,
            rgba(255, 255, 255, 0.45),
            transparent);
    transform: skewX(-20deg);
    transition: left 0.7s ease;
    pointer-events: none;
}

.fourth__form [type="submit"]:hover {
    transform: translateY(-0.04rem);
    background: #ff8a24;
    box-shadow: 0 0.12rem 0.28rem rgba(245, 119, 11, 0.45);
}

.fourth__form [type="submit"]:hover::after {
    left: 140%;
}

.fourth__form [type="submit"]:active {
    transform: translateY(0);
}

/* 提交结果在蓝底上改白色可读 */
.fourth__form .wpcf7-response-output {
    color: #ffffff !important;
}

/* ---------- 入场：标题遮罩上滑 + 文案/表单淡入上移 ---------- */
@keyframes fourthTitleUp {
    from {
        transform: translateY(110%);
    }

    to {
        transform: translateY(0);
    }
}

@keyframes fourthFadeUp {
    from {
        opacity: 0;
        transform: translateY(0.4rem);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

html.js .fourth [data-reveal]:not(.is-in-view) {
    opacity: 0;
}

html.js .fourth__title[data-reveal]:not(.is-in-view) span {
    transform: translateY(110%);
}

.fourth__title[data-reveal].is-in-view span {
    animation: fourthTitleUp 0.9s var(--ease-out) backwards;
}

.fourth__desc[data-reveal].is-in-view {
    animation: fourthFadeUp 0.8s var(--ease-out) 0.15s backwards;
}

.fourth__contact[data-reveal].is-in-view {
    animation: fourthFadeUp 0.8s var(--ease-out) 0.25s backwards;
}

.fourth__form[data-reveal].is-in-view {
    animation: fourthFadeUp 0.9s var(--ease-out) 0.2s backwards;
}

/* ---------- H5 适配 ---------- */
html[data-mode="h5"] .fourth__panel {
    grid-template-columns: 1fr;
    gap: 0.5rem;
    min-height: 0;
    padding: 0.5rem 0.3rem 0.6rem;
    border-radius: 0.24rem;
}

html[data-mode="h5"] .fourth__title {
    font-size: 0.44rem;
}

html[data-mode="h5"] .fourth__desc {
    font-size: 0.32rem;
}

html[data-mode="h5"] .fourth__contact {
    margin-top: 0.5rem;
    height: 0.72rem;
    padding: 0 0.3rem;
    font-size: 0.32rem;
}

html[data-mode="h5"] .fourth__contact svg {
    width: 0.28rem;
    height: 0.28rem;
}

html[data-mode="h5"] .fourth__form form>ul {
    grid-template-columns: 1fr 1fr;
    gap: 0.3rem 0.2rem;
}

html[data-mode="h5"] .fourth__form li label {
    font-size: 0.32rem;
}

html[data-mode="h5"] .fourth__form input[type="text"],
html[data-mode="h5"] .fourth__form input[type="email"] {
    height: 0.68rem;
    font-size: 0.32rem;
}

html[data-mode="h5"] .fourth__form textarea {
    height: 1.6rem;
    font-size: 0.32rem;
}

html[data-mode="h5"] .fourth__form [type="submit"] {
    height: 0.72rem;
    padding: 0 0.4rem;
    font-size: 0.32rem;
}
