.cases-main {
    background: #fff;
}

/* ---------- 第一屏 banner ---------- */
.first {
    position: relative;
    width: 19.2rem;
    max-width: 100%;
    height: 6rem;
    margin: 0 auto;
    background: url("../assets/images/Cases/first-img.png") no-repeat center center / cover;
    padding: 3.92rem 3.1rem 0;
    box-sizing: border-box;
    overflow: hidden;
    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;
}

/* ---------- 第二屏 案例列表 ---------- */
.second {
    position: relative;
    width: 19.2rem;
    max-width: 100%;
    margin: 0 auto;
    padding: 1rem 3.1rem 1rem;
    box-sizing: border-box;
    background: #fff;
}

.second__pages {
    position: relative;
    width: 100%;
}

.second__page-panel {
    display: none;
    width: 100%;
    flex-direction: column;
}

.second__page-panel.is-active {
    display: flex;
}

.second__list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 0.63rem;
    row-gap: 0.65rem;
    width: 100%;
}

.second__item {
    position: relative;
    width: 100%;
    min-width: 0;
    cursor: pointer;
    overflow: hidden;
}

.second__media {
    position: relative;
    width: 100%;
    height: 3rem;
    overflow: hidden;
}

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

.second__item:hover .second__media img {
    transform: scale(1.04);
}

/* 视频播放按钮：居中覆盖在封面上 */
.second__play {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 2;
    width: 0.7rem;
    height: 0.7rem;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    opacity: 0.92;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.second__play img {
    width: 100%;
    height: 100%;
    display: block;
}

.second__item:hover .second__play {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.1);
}

.second__desc {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 1rem;
    padding: 0 0.1rem;
    box-sizing: border-box;
    background: #F5F5F5;
    color: #333;
    text-align: center;
    font-family: Gabarito, sans-serif;
    font-size: 0.2rem;
    font-style: normal;
    font-weight: 400;
    line-height: normal;
    transition: background 0.3s ease, color 0.3s ease;
}

.second__desc-text {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.second__item:hover .second__desc {
    background: linear-gradient(135deg, #00B8E2 0%, #0063C3 100%);
    color: #FFF;
}

/* ---------- 第二屏 分页器 ---------- */
.second__pagination {
    margin-top: 0.76rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.12rem;
    flex-shrink: 0;
}

/* 对应目标站 <span class='pages'>，保留结构、页面中隐藏不占位 */
.second__pagination > span:first-child {
    display: none;
}

.second__pagination a,
.second__pagination [data-page] {
    width: 0.45rem;
    height: 0.45rem;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #D9D9D9;
    border-radius: 0.04rem;
    background: #fff;
    color: #666;
    text-align: center;
    font-family: Roboto, sans-serif;
    font-size: 0.18rem;
    font-style: normal;
    font-weight: 400;
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
    outline: none;
    transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease;
    box-sizing: border-box;
}

.second__pagination a:not([aria-current]):not([aria-disabled="true"]):hover,
.second__pagination [data-page]:not([aria-current]):not([aria-disabled="true"]):hover {
    border-color: #0063C3;
    color: #0063C3;
}

.second__pagination [data-page][aria-current] {
    background: linear-gradient(135deg, #00B8E2 0%, #0063C3 100%);
    border: none;
    color: #FFF;
}

.second__pagination [aria-disabled="true"] {
    opacity: 0.35;
    cursor: not-allowed;
}

/* ---------- 第二屏 滚动入场动效 ---------- */
html.js .second:not(.second--played) .second__item,
html.js .second:not(.second--played) .second__pagination {
    opacity: 0;
    transform: translateY(0.2rem);
    will-change: opacity, transform;
}

html.js .second.is-in-view .second__item,
html.js .second.is-in-view .second__pagination {
    animation-name: casesSecondFadeUp;
    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__pagination {
    animation-delay: 0.54s;
}

@keyframes casesSecondFadeUp {
    from {
        opacity: 0;
        transform: translateY(0.2rem);
    }

    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 {
    padding: 0.7rem 0.4rem;
}

html[data-mode="h5"] .second__list {
    grid-template-columns: 1fr;
    row-gap: 0.4rem;
}

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

html[data-mode="h5"] .second__media {
    width: 100%;
    height: 3.8rem;
}

html[data-mode="h5"] .second__play {
    width: 0.9rem;
    height: 0.9rem;
}

html[data-mode="h5"] .second__desc {
    height: 1.1rem;
    font-size: 0.24rem;
}

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

/* ---------- 页脚 ---------- */
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;
}
