.first {
    position: relative;
    height: 6rem;
    overflow: hidden;
    background: url("../assets/images/testimonials/img1.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;
    padding: 0 0.2rem;
    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;
}

/* ============================================================
   第三屏：What Our Clients Say（设计稿 373_2385，1920×1316）
   - 背景：#D7E5F0 → 白(30%) → 白(70%) → #D7E5F0 全屏渐变
   - 标题 48px #131841 居中 + 副标题 16px #666（宽 1031）
   - 三列错落卡片墙：卡 508×381 / 圆角 20 / 列距 38 / 卡距 44；
     列间垂直错位：列1 +151、列3 +257（相对列2）
   - 卡内：头像 100 圆形右上、姓名 24px #333、国家 16px #0265B2、
     引言 16px #666（宽 415，top 173）；首卡 #0265B2 蓝描边高亮
   - 入场：head 与各卡 data-reveal 错峰淡入上浮
   ============================================================ */
.third {
    padding: 0.8rem 0 0.6rem;
    overflow: hidden;
    background: linear-gradient(180deg, #d7e5f0 0%, #fff 30%, #fff 70%, #d7e5f0 100%);
}

/* ---------- 标题区 ---------- */
.third__head {
    width: 10.31rem;
    margin: 0 auto;
    text-align: center;
}

.third__title {
    color: #131841;
    font-size: 0.48rem;
    font-weight: 600;
    line-height: 1.2;
}

.third__sub {
    margin-top: 0.22rem;
    color: #666;
    font-size: 0.16rem;
    font-weight: 500;
    line-height: 1.5;
}

/* ---------- 三列错落卡片墙 ---------- */
.third__masonry {
    display: flex;
    align-items: flex-start;
    gap: 0.38rem;
    margin-top: 0.4rem;
    padding: 0 1.6rem;
    /* 设计稿边缘渐隐（跑马灯遮罩）：顶部卡片向上渐隐、底部卡片向下渐隐
       （18%/82% ≈ 设计稿首卡 18%、底卡 30%-60% / 19% 的渐隐范围） */
    -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 18%, #000 82%, transparent 100%);
    mask-image: linear-gradient(180deg, transparent 0, #000 18%, #000 82%, transparent 100%);
}

.third__col {
    display: flex;
    flex-direction: column;
    flex: 0 0 5.08rem;
    gap: 0.44rem;
}

/* 垂直错位：列2 为基准，列1 +151 / 列3 +257 */
.third__col--1 {
    margin-top: 1.51rem;
}

.third__col--3 {
    margin-top: 2.57rem;
}

/* ---------- 评价卡片 ---------- */
.third-card {
    box-sizing: border-box;
    height: 3.81rem;
    padding: 0.45rem 0.43rem 0 0.5rem;
    background: #fff;
    border: 1px solid #d9d9d9;
    border-radius: 0.2rem;
    transition: transform 0.4s var(--ease-out), box-shadow 0.4s ease, border-color 0.4s ease;
}

.third-card--active {
    border-color: #0265b2;
}

.third-card:hover {
    transform: translateY(-0.06rem);
    border-color: #0265b2;
    box-shadow: 0 0.16rem 0.4rem rgba(2, 101, 178, 0.15);
}

.third-card__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
}

.third-card__author {
    margin-top: 0.24rem;
}

.third-card__name {
    color: #333;
    font-size: 0.24rem;
    font-weight: 600;
    line-height: 1.3;
}

.third-card__country {
    color: #0265b2;
    font-size: 0.16rem;
    font-weight: 500;
    line-height: 1;
}

.third-card__avatar {
    flex: 0 0 1rem;
    width: 1rem;
    height: 1rem;
    object-fit: cover;
    background: #d7e5f0;
    border-radius: 50%;
}

.third-card__quote {
    margin-top: 0.28rem;
    color: #666;
    font-size: 0.16rem;
    font-weight: 500;
    line-height: 1.5;
}

/* ---------- 入场动画：animation 实现错峰，不占用 transition（避免影响悬浮动效） ---------- */
@keyframes third-card-in {
    from {
        opacity: 0;
        transform: translateY(0.4rem);
    }

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

.third-card[data-reveal] {
    opacity: 0;
    transform: translateY(0.4rem);
}

.third-card[data-reveal].is-in-view {
    opacity: 1;
    transform: translateY(0);
    animation: third-card-in 0.7s var(--ease-out) var(--reveal-delay, 0s) backwards;
}

/* 错峰延迟：按设计稿三列顺序依次入场 */
.third__col--1 .third-card:nth-child(1) {
    --reveal-delay: 0.1s;
}

.third__col--2 .third-card:nth-child(1) {
    --reveal-delay: 0.18s;
}

.third__col--3 .third-card:nth-child(1) {
    --reveal-delay: 0.26s;
}

.third__col--1 .third-card:nth-child(2) {
    --reveal-delay: 0.3s;
}

.third__col--2 .third-card:nth-child(2) {
    --reveal-delay: 0.38s;
}

.third__col--3 .third-card:nth-child(2) {
    --reveal-delay: 0.46s;
}

.third__col--2 .third-card:nth-child(3) {
    --reveal-delay: 0.58s;
}

/* ---------- H5（read.md 规范：模块主标题 0.44rem，内容不小于 0.32rem） ---------- */
html[data-mode="h5"] .third {
    padding: 0.6rem 0.4rem;
}

html[data-mode="h5"] .third__head {
    width: 100%;
}

html[data-mode="h5"] .third__title {
    font-size: 0.44rem;
    line-height: 1.3;
}

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

html[data-mode="h5"] .third__masonry {
    flex-direction: column;
    gap: 0.3rem;
    margin-top: 0.4rem;
    padding: 0;
    /* H5 单列平铺，取消边缘渐隐 */
    -webkit-mask-image: none;
    mask-image: none;
}

html[data-mode="h5"] .third__col {
    flex: 0 0 auto;
    width: 100%;
    gap: 0.3rem;
}

/* H5 下取消三列错位，顺序平铺 */
html[data-mode="h5"] .third__col--1,
html[data-mode="h5"] .third__col--3 {
    margin-top: 0;
}

html[data-mode="h5"] .third-card {
    height: auto;
    padding: 0.4rem;
}

html[data-mode="h5"] .third-card__author {
    margin-top: 0.08rem;
}

html[data-mode="h5"] .third-card__name {
    font-size: 0.36rem;
}

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

html[data-mode="h5"] .third-card__avatar {
    flex: 0 0 0.9rem;
    width: 0.9rem;
    height: 0.9rem;
}

html[data-mode="h5"] .third-card__quote {
    margin-top: 0.3rem;
    font-size: 0.32rem;
    line-height: 1.6;
}

/* ============================================================
   第四屏：Trusted by Global Partners（设计稿 373_2358）
   - 全宽背景横幅 1920×469：背景图 img3.webp
   - 居中标题（48px #131841）+ 副标题（16px #666）+ 6 个 Logo 卡片
     （220×127，间距 16，整行 1400 居中）
   - 入场：复用 common.js data-reveal，模糊淡入上浮错峰（动画实现，
     不占 transition，避免影响悬浮动效）
   - 悬浮（个性化炫酷）：卡片上浮 + 蓝色光晕投影 + 图片轻微放大
     + 底部青色高光扫过
   ============================================================ */
.fourth {
    height: 4.69rem;
    overflow: hidden;
    background: url("../assets/images/testimonials/img4.webp") center / cover no-repeat;
}

.fourth__inner {
    height: 100%;
    padding-top: 0.91rem;
}

.fourth__title {
    color: #131841;
    font-size: 0.48rem;
    font-weight: 600;
    line-height: 1.2;
    text-align: center;
}

.fourth__sub {
    margin-top: 0.11rem;
    color: #666;
    font-size: 0.16rem;
    font-weight: 400;
    text-align: center;
}

.fourth__grid {
    display: flex;
    justify-content: center;
    gap: 0.16rem;
    margin-top: 0.4rem;
    padding: 0;
    list-style: none;
}

/* ---------- Logo 卡片 ---------- */
.fourth-card {
    position: relative;
    width: 2.2rem;
    height: 1.27rem;
    overflow: hidden;
    background: #fff;
    transition: transform 0.4s var(--ease-out), box-shadow 0.4s ease;
}

.fourth-card img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.45s var(--ease-out);
}

/* 底部高光：悬浮时从左扫过 */
.fourth-card::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 0.03rem;
    background: linear-gradient(90deg, transparent, #00B8E2, transparent);
    transform: translateX(-100%);
    transition: transform 0.55s var(--ease-out);
}

.fourth-card:hover {
    transform: translateY(-0.08rem);
    box-shadow: 0 0.16rem 0.4rem rgba(2, 101, 178, 0.28);
}

.fourth-card:hover img {
    transform: scale(1.04);
}

.fourth-card:hover::after {
    transform: translateX(100%);
}

/* ---------- 入场动画：模糊淡入 + 上浮，错峰延迟（动画实现，不占 transition） ---------- */
@keyframes fourth-card-in {
    from {
        opacity: 0;
        transform: translateY(0.4rem) scale(0.94);
        filter: blur(0.06rem);
    }

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

.fourth__title[data-reveal],
.fourth__sub[data-reveal],
.fourth-card[data-reveal] {
    opacity: 0;
    transform: translateY(0.4rem);
    filter: blur(0.06rem);
}

.fourth__title[data-reveal].is-in-view,
.fourth__sub[data-reveal].is-in-view,
.fourth-card[data-reveal].is-in-view {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
    animation: fourth-card-in 0.7s var(--ease-out) var(--reveal-delay, 0s) backwards;
}

/* 错峰延迟：标题 → 副标题 → 6 个 Logo 依次入场 */
.fourth__sub[data-reveal] {
    --reveal-delay: 0.12s;
}

.fourth__grid .fourth-card:nth-child(1) {
    --reveal-delay: 0.2s;
}

.fourth__grid .fourth-card:nth-child(2) {
    --reveal-delay: 0.3s;
}

.fourth__grid .fourth-card:nth-child(3) {
    --reveal-delay: 0.4s;
}

.fourth__grid .fourth-card:nth-child(4) {
    --reveal-delay: 0.5s;
}

.fourth__grid .fourth-card:nth-child(5) {
    --reveal-delay: 0.6s;
}

.fourth__grid .fourth-card:nth-child(6) {
    --reveal-delay: 0.7s;
}

/* ---------- H5（read.md 规范：模块主标题 0.44rem，内容不小于 0.32rem） ---------- */
html[data-mode="h5"] .fourth {
    height: auto;
}

html[data-mode="h5"] .fourth__inner {
    padding: 0.6rem 0.4rem;
}

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

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

html[data-mode="h5"] .fourth__grid {
    flex-wrap: wrap;
    gap: 0.24rem;
    margin-top: 0.4rem;
}

html[data-mode="h5"] .fourth-card {
    flex: 0 0 calc(50% - 0.12rem);
    width: auto;
    height: auto;
    aspect-ratio: 220 / 127;
}

/* ============================================================
   第二屏：Meeting Our Clients（设计稿 373_2370）
   - 内边距 100/0/100/320 → padding: 1rem 0 1rem 3.2rem
   - 居中标题（48px #131841）+ 副标题（16px #666）
   - 无限轮播：5 张卡片（351×444，圆角 10px，间距 30），一张卡片
     即一张轮播图；整条轨道通栏（负外边距抵消左侧内边距，通向右边缘）
   - 指示器：5 个 36×4 胶囊（间距 10，#E6E6E6 / 激活 #131841）
   - 入场：复用 common.js data-reveal，模糊淡入上浮错峰
   - 悬浮：卡片上浮 + 蓝色光晕 + 图片放大 + 蓝色渐层渐显，
     悬浮时自动轮播暂停（见 js/testimonials.js）
   ============================================================ */
.second {
    padding: 1rem 0;
    background: #fff;
    overflow: hidden;
}

.second__head {
    text-align: center;
}

.second__title {
    color: #131841;
    font-size: 0.48rem;
    font-weight: 600;
    line-height: 1.2;
    text-align: center;
}

.second__sub {
    max-width: 10.31rem;
    margin: 0.22rem auto 0;
    color: #666;
    font-size: 0.16rem;
    font-weight: 500;
    line-height: 1.5;
    text-align: center;
}

/* ---------- 轮播区：通栏轨道（左侧内边距由负外边距抵消） ---------- */
.second__carousel {
    margin: 0.84rem -3.2rem 0;
    overflow: visible;
}

.second__track {
    display: flex;
    gap: 0.3rem;
    width: max-content;
    padding: 0;
    margin: 0;
    list-style: none;
    will-change: transform;
}

/* ---------- 轮播卡片 ---------- */
.second-card {
    position: relative;
    flex: 0 0 3.51rem;
    width: 3.51rem;
    height: 4.44rem;
    overflow: hidden;
    border-radius: 0.1rem;
    transition: transform 0.4s var(--ease-out), box-shadow 0.4s ease;
}

.second-card img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s var(--ease-out);
}

/* 蓝色渐层：悬浮渐显 */
.second-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(2, 101, 178, 0) 50%, rgba(2, 101, 178, 0.35) 100%);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.second-card:hover {
    transform: translateY(-0.08rem);
    box-shadow: 0 0.2rem 0.5rem rgba(2, 101, 178, 0.3);
}

.second-card:hover img {
    transform: scale(1.06);
}

.second-card:hover::after {
    opacity: 1;
}

/* ---------- 指示器：36×4 胶囊 ---------- */
.second__dots {
    display: flex;
    justify-content: center;
    gap: 0.1rem;
    margin-top: 0.78rem;
}

.second__dot {
    width: 0.36rem;
    height: 0.04rem;
    padding: 0;
    border: 0;
    border-radius: 0.02rem;
    background: #E6E6E6;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.second__dot:hover {
    transform: scaleY(2);
}

.second__dot.is-active {
    background: #131841;
}

.second__dot:focus-visible {
    outline: 0.02rem solid #0265B2;
    outline-offset: 0.04rem;
}

/* ---------- 入场动画：模糊淡入 + 上浮（动画实现，不占 transition） ---------- */
@keyframes second-block-in {
    from {
        opacity: 0;
        transform: translateY(0.4rem);
        filter: blur(0.06rem);
    }

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

.second__title[data-reveal],
.second__sub[data-reveal],
.second__carousel[data-reveal] {
    opacity: 0;
    transform: translateY(0.4rem);
    filter: blur(0.06rem);
}

.second__title[data-reveal].is-in-view,
.second__sub[data-reveal].is-in-view,
.second__carousel[data-reveal].is-in-view {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
    animation: second-block-in 0.7s var(--ease-out) var(--reveal-delay, 0s) backwards;
}

.second__sub[data-reveal] {
    --reveal-delay: 0.12s;
}

.second__carousel[data-reveal] {
    --reveal-delay: 0.24s;
}

/* ---------- H5（read.md 规范：模块主标题 0.44rem，内容不小于 0.32rem） ---------- */
html[data-mode="h5"] .second {
    padding: 0.6rem 0;
}

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

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

html[data-mode="h5"] .second__sub {
    max-width: 100%;
    margin-top: 0.16rem;
    font-size: 0.32rem;
}

html[data-mode="h5"] .second__carousel {
    /* 两侧 0.4rem 留白，使 6.7rem 卡片在 7.5rem 视口内居中 */
    margin: 0.4rem 0.4rem 0;
    overflow: hidden;
}

/* H5 一屏一张轮播卡：卡宽 = 视口 7.5rem - 两侧 0.4rem 留白，
   间距 0.8rem 使下一张恰好从视口右缘开始（不露边） */
html[data-mode="h5"] .second__track {
    gap: 0.8rem;
}

html[data-mode="h5"] .second-card {
    flex: 0 0 6.7rem;
    width: 6.7rem;
    height: auto;
    aspect-ratio: 351 / 444;
}

html[data-mode="h5"] .second__dots {
    margin-top: 0.4rem;
}

html[data-mode="h5"] .second__dot {
    width: 0.56rem;
    height: 0.06rem;
}