/* ============================================================
   Videos 页面
   ============================================================ */
.videos-main {
    background: #fff;
}

/* ---------- 第一屏 banner（1920×600） ---------- */
.first {
    position: relative;
    width: 19.2rem;
    max-width: 100%;
    height: 6rem;
    margin: 0 auto;
    background: url("../assets/images/videos/first-img.png") no-repeat center center / cover;
    /* 内边距：上 392px，左右 310px，下 0
       rem 换算（基准 100px / rem）：
         392 / 100 = 3.92rem
         310 / 100 = 3.1rem   */
    padding: 3.92rem 0 0 3.1rem;
    box-sizing: border-box;
    overflow: hidden;
    color: #fff;
}

.first__content {
    /* 内容块紧贴 padding 内侧即可 */
    color: #fff;
}

.first__title {
    color: #FFF;
    font-family: Gabarito;
    font-size: 0.56rem;
    font-style: normal;
    font-weight: 700;
    line-height: normal;
    margin: 0 0 0.1rem;
}

.first__desc {
    color: #CCC;
    font-family: Gabarito;
    font-size: 0.16rem;
    font-style: normal;
    font-weight: 400;
    line-height: 150%;
    margin: 0;
}

/* ============================================================
   第二屏：视频列表（1920×1268）
   - 容器高度 12.68rem，内边距 0.82rem / 3.1rem / 0
   - 3 列 × 3 行网格（每页 9 个槽位），与 faq 分页结构一致
   ============================================================ */
.second {
    position: relative;
    width: 100%;
    max-width: 19.2rem;
    height: 12.68rem;
    margin: 0 auto;
    background: #fff;
    overflow: hidden;
    box-sizing: border-box;
}

.second__inner {
    width: 100%;
    height: 100%;
    padding: 0.82rem 3.1rem 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-sizing: border-box;
}

.second__list {
    width: 100%;
    display: grid;
    /* 3 列固定 4.02rem 宽（402px），间隙 0.47rem，9 槽位 */
    grid-template-columns: repeat(3, 4.02rem);
    column-gap: 0.47rem;
    row-gap: 0.6rem;
    /* 列表项下边距 60px（与 row-gap 共同控制 item 间距） */
    justify-content: space-between;
    align-content: start;
}

.second__item {
    width: 4.02rem;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.second__cover {
    position: relative;
    display: block;
    width: 4.02rem;
    height: 2.27rem;
    overflow: hidden;
    border-radius: 0.04rem;
    background: #000;
    text-decoration: none;
    margin-bottom: 0.2rem;
}

.second__cover > img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.second__cover:hover > img {
    transform: scale(1.05);
}

/* 封面中央播放按钮（80×80 图标） */
.second__play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(1);
    width: 0.8rem;
    height: 0.8rem;
    background: url("../assets/images/videos/second-img10.svg") no-repeat center center / 100% 100%;
    pointer-events: none;
}

.second__cover:hover .second__play {
    transform: translate(-50%, -50%) scale(1.1);
    transition: transform 0.3s ease;
}

.second__item-desc {
    color: #333;
    font-family: Gabarito;
    font-size: 0.2rem;
    font-style: normal;
    font-weight: 400;
    line-height: normal;
    margin: 0;
    width: 100%;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 4.02rem;
    transition: color 0.3s ease;
}

/* 悬浮时：描述文字呈现蓝色渐变（流光动效） */
.second__item:hover .second__item-desc,
.second__cover:hover ~ .second__item-desc {
    color: transparent;
    background-image: linear-gradient(90deg, #00B8E2 0%, #0063C3 50%, #00B8E2 100%);
    background-size: 200% 100%;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: secondDescShimmer 1.2s linear infinite;
}

/* hover 时描述文字的蓝色流光关键帧 */
@keyframes secondDescShimmer {
    from {
        background-position: 200% 0;
    }
    to {
        background-position: -200% 0;
    }
}

/* ============================================================
   第二屏：滚动进入视口触发入场动画
   - 未播放前（无 .is-in-view 且无 .second--played）：
     items / 播放按钮隐藏
   - JS 加 .is-in-view 时：secondFadeUp 依次上浮，播放按钮弹入
   - 同帧加 .second--played 标记，重复进入不再回放
   ============================================================ */
html.js .second:not(.is-in-view):not(.second--played) .second__item {
    opacity: 0;
    transform: translateY(0.2rem);
    will-change: opacity, transform;
}

html.js .second:not(.is-in-view):not(.second--played) .second__play {
    opacity: 0;
}

html.js .second.is-in-view .second__item {
    animation-name: secondFadeUp;
    animation-duration: 0.65s;
    animation-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
    animation-fill-mode: both;
}

html.js .second.is-in-view .second__item:nth-child(1) { animation-delay: 0.06s; }
html.js .second.is-in-view .second__item:nth-child(2) { animation-delay: 0.12s; }
html.js .second.is-in-view .second__item:nth-child(3) { animation-delay: 0.18s; }
html.js .second.is-in-view .second__item:nth-child(4) { animation-delay: 0.24s; }
html.js .second.is-in-view .second__item:nth-child(5) { animation-delay: 0.3s; }
html.js .second.is-in-view .second__item:nth-child(6) { animation-delay: 0.36s; }
html.js .second.is-in-view .second__item:nth-child(7) { animation-delay: 0.42s; }
html.js .second.is-in-view .second__item:nth-child(8) { animation-delay: 0.48s; }
html.js .second.is-in-view .second__item:nth-child(9) { animation-delay: 0.54s; }

html.js .second.is-in-view .second__play {
    animation-name: secondPlayIn;
    animation-duration: 0.45s;
    animation-timing-function: cubic-bezier(0.22, 0.61, 0.36, 1);
    animation-delay: 0.2s;
    animation-fill-mode: both;
}

@keyframes secondFadeUp {
    from {
        opacity: 0;
        transform: translateY(0.2rem);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes secondPlayIn {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.4);
    }
    60% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.12);
    }
    100% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

/* 无障碍：prefers-reduced-motion 由 JS 检测后直接添加 .second--played，
   跳过动画并保证内容可见（见 videos.js initEntrance） */

/* ============================================================
   Video Display 轮播（与首页第五屏完全一致）
   结构/类名/样式均与 index.css 中 .fifth 保持一致，
   仅容器改为固定 1920×763、内容上下居中。
   ============================================================ */
.fifth {
    position: relative;
    width: 19.2rem;
    max-width: 100%;
    height: 7.63rem;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: #fff;
    overflow: hidden;
    box-sizing: border-box;
}

.fifth__title {
    color: #333;
    font-family: Gabarito;
    font-size: 0.56rem;
    font-style: normal;
    font-weight: 700;
    line-height: normal;
    margin-bottom: 0.32rem;
    padding-left: 3.1rem;
}

/* 轮播容器：撑满整屏宽度，屏幕两侧不留边距 */
.fifth__card-scroll {
    position: relative;
    z-index: 1;
}

/* 视口：宽 100% = 整屏 19.2rem，左右贴边
   居中显示选中卡，两侧露出上一张/下一张 */
.fifth__card-scroll-viewport {
    width: 100%;
    overflow: hidden;
}

/* 轨道：padding-left/right = (整屏宽 19.2 - 卡宽 8.66) / 2 = 5.27rem
   让首张卡片初始即位于视口正中，之后每次位移一个 STEP */
.fifth__card-scroll-track {
    display: flex;
    align-items: center;
    gap: 0.16rem;
    padding: 0 5.27rem;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    /* 过渡写死在 CSS：JS 只改 transform，点击圆点/卡片时始终平滑滑动 */
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

/* 单张卡片：active 放大、两侧缩小变暗（整卡为 a，点击弹出视频弹窗） */
.fifth__card-scroll-item {
    display: block;
    flex: 0 0 auto;
    position: relative;
    width: 8.66rem;
    height: 4.88rem;
    box-sizing: border-box;
    border-radius: 0.12rem;
    overflow: hidden;
    background: #000;
    cursor: pointer;
    text-decoration: none;
    transform: scale(0.88);
    transform-origin: center center;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1),
        opacity 0.5s ease;
    opacity: 0.5;
}

.fifth__card-scroll-item.is-active {
    transform: scale(1);
    opacity: 1;
}

.fifth__card-scroll-item > img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    pointer-events: none;
    /* 让深色热成像画面与黑色容器无明显接缝 */
    background: #000;
}

/* 播放按钮：绝对居中 */
.fifth__card-scroll-play {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 0.9rem;
    height: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.3s ease;
    z-index: 2;
}

.fifth__card-scroll-play:hover,
.fifth__card-scroll-item:hover .fifth__card-scroll-play {
    transform: translate(-50%, -50%) scale(1.06);
}

.fifth__card-scroll-play img {
    width: 0.9rem;
    height: 0.9rem;
    pointer-events: none;
}

/* 卡片底部标题：渐变遮罩，始终显示 */
.fifth__card-scroll-title {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 0.2rem 0.26rem 0.24rem;
    color: #fff;
    font-family: "Gabarito", "PingFang SC", "Microsoft YaHei", sans-serif;
    font-size: 0.2rem;
    font-weight: 500;
    line-height: 1.4;
    letter-spacing: 0.005rem;
    background: linear-gradient(to top,
            rgba(0, 0, 0, 0.85) 0%,
            rgba(0, 0, 0, 0.45) 60%,
            rgba(0, 0, 0, 0) 100%);
    pointer-events: none;
    z-index: 2;
    /* 防止长标题换行破坏排版 */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 圆点指示器 */
.fifth__dots {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.12rem;
    margin-top: 0.34rem;
}

.fifth__dot {
    width: 0.34rem;
    height: 0.06rem;
    border: none;
    padding: 0;
    border-radius: 0.04rem;
    background: rgba(26, 29, 35, 0.18);
    cursor: pointer;
    transition: background 0.3s ease, width 0.3s ease;
}

.fifth__dot:hover {
    background: rgba(26, 29, 35, 0.36);
}

.fifth__dot.is-active {
    width: 0.5rem;
    background: #333333;
}

@media (max-width: 1280px) {
    .fifth__title {
        padding-left: 1rem;
        font-size: 0.5rem;
    }

    /* 注意：卡片尺寸与间距不随断点变化，
       JS 步长常量 STEP = 8.82rem 与这里始终一致，与首屏同策略。 */
}

/* 入场动画：JS 给 .fifth 加 .is-in-view 后触发。
   html.js 用于无 JS 兜底显示；fifth--played 用于重复进入不再回放。 */
html.js .fifth:not(.is-in-view):not(.fifth--played) .fifth__title,
html.js .fifth:not(.is-in-view):not(.fifth--played) .fifth__card-scroll {
    opacity: 0;
    transform: translateY(0.3rem);
}

.fifth.is-in-view .fifth__title {
    animation: fifthFadeUp 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0s both;
}

.fifth.is-in-view .fifth__card-scroll {
    animation: fifthFadeUp 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.12s both;
}

@keyframes fifthFadeUp {
    from {
        opacity: 0;
        transform: translateY(0.3rem);
    }

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

/* ============================================================
   H5（移动端）适配
   设计稿基准：750px
   ============================================================ */

/* ---------- 顶部导航：汉堡菜单按钮 ---------- */
/* 桌面端默认隐藏，仅移动端显示 */
.menu-btn {
    display: none;
}

html[data-mode="h5"] .menu-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.09rem;
    width: 0.44rem;
    height: 0.44rem;
    margin-left: auto;
    padding: 0;
    border: none;
    border-radius: 0.1rem;
    background: rgba(255, 255, 255, 0.24);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

html[data-mode="h5"] .menu-btn span {
    display: block;
    width: 0.22rem;
    height: 0.03rem;
    border-radius: 0.03rem;
    background: #fff;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

html[data-mode="h5"] .header.is-scrolled .menu-btn {
    background: rgba(51, 51, 51, 0.08);
}

html[data-mode="h5"] .header.is-scrolled .menu-btn span {
    background: #333;
}

html[data-mode="h5"] .menu-btn.is-open span:nth-child(1) {
    transform: translateY(0.12rem) rotate(45deg);
}

html[data-mode="h5"] .menu-btn.is-open span:nth-child(2) {
    opacity: 0;
}

html[data-mode="h5"] .menu-btn.is-open span:nth-child(3) {
    transform: translateY(-0.12rem) rotate(-45deg);
}

/* 移动端：隐藏桌面导航，保留搜索与 Get a Quote 等右侧按钮 */
html[data-mode="h5"] .header__inner-nav {
    display: none;
}

/* 移动端：导航栏紧凑布局（避免右侧按钮换行，菜单按钮靠最右） */
html[data-mode="h5"] .header__inner {
    justify-content: space-between;
}

html[data-mode="h5"] .logo {
    order: 1;
    margin-left: 0;
    flex-shrink: 0;
}

html[data-mode="h5"] .logo img {
    width: 1.1rem;
    height: auto;
}

html[data-mode="h5"] .header__inner-right {
    order: 2;
    margin-right: 0;
    margin-left: auto;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.08rem;
}

html[data-mode="h5"] .menu-btn {
    order: 3;
    width: 0.4rem;
    height: 0.4rem;
    margin-left: 0.08rem;
    margin-right: 0;
    flex-shrink: 0;
}

/* 右侧按钮统一不换行 */
html[data-mode="h5"] .header__inner-right-search,
html[data-mode="h5"] .header__inner-right-language,
html[data-mode="h5"] .header__inner-right-msg,
html[data-mode="h5"] .header__inner-right > a:last-child {
    flex-shrink: 0;
    white-space: nowrap;
}

html[data-mode="h5"] .header__inner-right-search {
    width: 0.36rem;
    height: 0.36rem;
    margin-right: 0;
}

html[data-mode="h5"] .header__inner-right-language {
    width: auto;
    min-width: 0.62rem;
    height: 0.36rem;
    padding: 0 0.08rem;
    margin-right: 0;
    font-size: 0.2rem;
}

html[data-mode="h5"] .header__inner-right-msg {
    height: 0.36rem;
    padding: 0 0.14rem;
    margin-right: 0;
    font-size: 0.2rem;
}

html[data-mode="h5"] .header__inner-right > a:last-child {
    height: 0.36rem;
    padding: 0 0.14rem;
    margin-right: 0;
    font-size: 0.2rem;
}

/* 移动端：展开后的全屏下拉菜单 */
html[data-mode="h5"] .header__inner-nav.is-open {
    position: fixed;
    top: 0.8rem;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 7.5rem;
    height: calc(100vh - 0.8rem);
    z-index: 99;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0;
    padding: 0.3rem 0.6rem 0.6rem;
    box-sizing: border-box;
    background: #fff;
    overflow-y: auto;
    animation: h5NavFadeIn 0.25s ease both;
}

@keyframes h5NavFadeIn {
    from {
        opacity: 0;
        transform: translate(-50%, -0.2rem);
    }
    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

html[data-mode="h5"] .header__inner-nav.is-open .header__inner-nav-item {
    width: 100%;
    padding: 0.22rem 0;
    border-bottom: 0.01rem solid #f0f2f5;
}

html[data-mode="h5"] .header__inner-nav.is-open .header__inner-nav-item a {
    color: #333;
    font-size: 0.3rem;
}

html[data-mode="h5"] .header__inner-nav.is-open .header__inner-nav-item:active a,
html[data-mode="h5"] .header__inner-nav.is-open .header__inner-nav-item a:active {
    color: #00B8E2;
}

/* ---------- 第一屏 banner（与 oem-odm 页高度对齐） ---------- */
html[data-mode="h5"] .first {
    height: auto;
    min-height: 5.85rem;
    padding: 3.4rem 0.4rem 0.6rem;
    align-items: flex-start;
    box-sizing: border-box;
}

html[data-mode="h5"] .first__title {
    font-size: 0.42rem;
    margin-bottom: 0.15rem;
}

html[data-mode="h5"] .first__desc {
    font-size: 0.26rem;
    line-height: 1.6;
    max-width: 100%;
}

/* ---------- 第二屏 视频列表（两列网格） ---------- */
html[data-mode="h5"] .second {
    height: auto;
    min-height: auto;
}

html[data-mode="h5"] .second__inner {
    height: auto;
    padding: 0.7rem 0.4rem 0.6rem;
}

html[data-mode="h5"] .second__list {
    grid-template-columns: repeat(2, 1fr);
    column-gap: 0.28rem;
    row-gap: 0.42rem;
    justify-content: stretch;
}

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

html[data-mode="h5"] .second__cover {
    width: 100%;
    height: 1.9rem;
    margin-bottom: 0.14rem;
}

html[data-mode="h5"] .second__item-desc {
    font-size: 0.22rem;
    line-height: 1.5;
    max-width: 100%;
}

/* ---------- 第五屏 Video Display 轮播 ----------
   注意：H5 卡片宽 6.4rem、步长 6.56rem，
   与 videos.js 中 isH5 的 STEP 严格一致（PC 不变）。 */
html[data-mode="h5"] .fifth {
    height: auto;
    padding: 0.6rem 0 0.5rem;
}

html[data-mode="h5"] .fifth__title {
    font-size: 0.4rem;
    margin-bottom: 0.3rem;
    padding-left: 0.4rem;
}

html[data-mode="h5"] .fifth__card-scroll-track {
    gap: 0.16rem;
    padding: 0 0.55rem; /* (7.5 - 6.4) / 2 */
}

html[data-mode="h5"] .fifth__card-scroll-item {
    width: 6.4rem;
    height: 3.6rem;
    border-radius: 0.12rem;
}

html[data-mode="h5"] .fifth__card-scroll-play,
html[data-mode="h5"] .fifth__card-scroll-play img {
    width: 0.72rem;
    height: 0.72rem;
}

html[data-mode="h5"] .fifth__card-scroll-title {
    font-size: 0.22rem;
    padding: 0.16rem 0.22rem 0.2rem;
}

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

/* ---------- 页脚 ---------- */
html[data-mode="h5"] .footer__main {
    padding: 0.6rem 0.4rem 0.5rem;
}

html[data-mode="h5"] .footer__links {
    flex-wrap: wrap;
    gap: 0.3rem 0.2rem;
}

html[data-mode="h5"] .footer__col {
    flex: 1 1 40%;
    min-width: 2.6rem;
}

html[data-mode="h5"] .footer__contact-item {
    font-size: 0.2rem;
}

html[data-mode="h5"] .footer__bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.3rem;
    margin-top: 0.4rem;
    padding-top: 0.3rem;
}

html[data-mode="h5"] .footer__logo {
    width: 4rem;
    height: auto;
}

html[data-mode="h5"] .footer__bar {
    flex-direction: column;
    height: auto;
    padding: 0.18rem 0.4rem;
    gap: 0.1rem;
}
