.first {
    position: relative;
    height: 6rem;
    overflow: hidden;
    background: url("../assets/images/video/video.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;
}

.second {
    padding: 0.68rem 1.6rem 1rem;
}

.second__cats {
    display: flex;
    justify-content: flex-end;
    gap: 0.1rem;
    margin-bottom: 0.6rem;
    list-style: none;
}

html[data-mode="h5"] .second {
    padding: 0.3rem 0.4rem 0.5rem;
}

html[data-mode="h5"] .second__cats {
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 0.16rem;
    margin-bottom: 0.4rem;
}

/* ---------- 入场动画（自右错峰滑入，与 faq.css 同名同步） ---------- */
@keyframes second-cat-in {
    from {
        opacity: 0;
        transform: translateX(0.5rem);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.second__cat-item {
    opacity: 0;
    display: flex;
    animation: second-cat-in 0.6s var(--ease-out) forwards;
}

.second__cat-item:nth-child(1) {
    animation-delay: 0.05s;
}

.second__cat-item:nth-child(2) {
    animation-delay: 0.15s;
}

.second__cat-item:nth-child(3) {
    animation-delay: 0.25s;
}

.second__cat-item:nth-child(4) {
    animation-delay: 0.35s;
}

html[data-mode="h5"] .second__cat {
    height: 0.64rem;
    padding: 0 0.36rem;
    border-radius: 0.12rem;
    font-size: 0.32rem;
}

html[data-mode="h5"] .second__cat-item {
    animation-duration: 0.5s;
}

html[data-mode="h5"] .second__cat-item:nth-child(1) {
    animation-delay: 0.04s;
}

html[data-mode="h5"] .second__cat-item:nth-child(2) {
    animation-delay: 0.12s;
}

html[data-mode="h5"] .second__cat-item:nth-child(3) {
    animation-delay: 0.2s;
}

html[data-mode="h5"] .second__cat-item:nth-child(4) {
    animation-delay: 0.28s;
}

.second__cat {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 0.48rem;
    padding: 0 0.4rem;
    overflow: hidden;
    background: #f6f6f6;
    border-radius: 0.1rem;
    color: #333;
    font-size: 0.16rem;
    font-weight: 500;
    white-space: nowrap;
    /* 建立层叠上下文，保证 ::before 色块垫在文字之下 */
    isolation: isolate;
    transition: color 0.35s ease, transform 0.35s var(--ease-out), box-shadow 0.35s ease;
}

/* 悬浮：蓝色色块自左扫入 */
.second__cat::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: #0265B2;
    border-radius: inherit;
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform 0.4s var(--ease-out);
}

.second__cat:hover {
    color: #fff;
    transform: translateY(-0.04rem);
    box-shadow: 0 0.08rem 0.2rem rgba(2, 101, 178, 0.35);
}

.second__cat:hover::before {
    transform: scaleX(1);
}

/* ---------- 选中态（设计稿末项 Faq） ---------- */
.second__cat.is-active {
    background: #0265B2;
    color: #fff;
}

/* 选中项不再播放扫入色块，仅保留轻微上浮 */
.second__cat.is-active::before {
    display: none;
}

.second__cat.is-active:hover {
    color: #fff;
    transform: translateY(-0.04rem);
    box-shadow: 0 0.1rem 0.24rem rgba(2, 101, 178, 0.45);
}

/* ============================================================
   视频卡片列表（设计稿 1600 画布：卡 514×548，列距 29 / 行距 60）
   ============================================================ */
.second__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.6rem 0.29rem;
    list-style: none;
}

/* ---------- 入场动画：复用 common.js data-reveal，模糊淡入 + 上浮 ---------- */
.second__cell {
    opacity: 0;
    transform: translateY(0.5rem) scale(0.96);
    filter: blur(0.06rem);
    transition:
        opacity 0.8s var(--ease-out),
        transform 0.8s var(--ease-out),
        filter 0.8s var(--ease-out);
    /* 悬浮效果均作用于卡片内部节点，不会被入场过渡干扰 */
    will-change: opacity, transform;
}

.second__cell.is-in-view {
    opacity: 1;
    transform: none;
    filter: none;
}

/* ---------- 卡片本体：底部 2px 分隔线（设计稿 546/548） ---------- */
.vcard {
    position: relative;
    display: block;
    padding-bottom: 0.42rem;
    border-bottom: 0.02rem solid #d9d9d9;
    outline: none;
    transition:
        transform 0.45s var(--ease-out),
        border-color 0.45s ease;
}

.vcard:hover,
.vcard:focus-visible {
    transform: translateY(-0.1rem);
    border-color: #0265b2;
}

.vcard:focus-visible {
    border-radius: 0.12rem;
    box-shadow: 0 0 0 0.02rem #0265b2;
}

/* ---------- 封面 ---------- */
.vcard__media {
    position: relative;
    overflow: hidden;
    border-radius: 0.1rem;
    /* 设计稿 514×370 */
    aspect-ratio: 514 / 370;
    isolation: isolate;
    transition: box-shadow 0.45s ease;
}

.vcard__img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1);
    transition: transform 0.7s var(--ease-out);
}

/* 悬浮：封面放大 + 蓝色渐变压暗，衬托播放按钮 */
.vcard__media::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(180deg, rgba(2, 52, 125, 0) 30%, rgba(2, 52, 125, 0.55) 100%);
    opacity: 0;
    transition: opacity 0.5s ease;
}

/* 悬浮：高光扫过（炫酷 shine sweep） */
.vcard__media::after {
    content: "";
    position: absolute;
    top: -20%;
    left: -80%;
    z-index: 2;
    width: 45%;
    height: 140%;
    background: linear-gradient(100deg,
            rgba(255, 255, 255, 0) 0%,
            rgba(255, 255, 255, 0.35) 50%,
            rgba(255, 255, 255, 0) 100%);
    transform: skewX(-20deg);
    transition: left 0.75s var(--ease-out);
    pointer-events: none;
}

.vcard:hover .vcard__img,
.vcard:focus-visible .vcard__img {
    transform: scale(1.08);
}

.vcard:hover .vcard__media::before,
.vcard:focus-visible .vcard__media::before {
    opacity: 1;
}

.vcard:hover .vcard__media::after,
.vcard:focus-visible .vcard__media::after {
    left: 130%;
}

.vcard:hover .vcard__media,
.vcard:focus-visible .vcard__media {
    box-shadow: 0 0.16rem 0.4rem rgba(2, 52, 125, 0.28);
}

/* ---------- 播放按钮（设计稿 72px，左下角） ---------- */
.vcard__play {
    position: absolute;
    left: 0.15rem;
    bottom: 0.18rem;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 0.72rem;
    height: 0.72rem;
    overflow: visible;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(0.06rem);
    -webkit-backdrop-filter: blur(0.06rem);
    border-radius: 9999px;
    transition: background-color 0.4s ease, transform 0.4s var(--ease-out);
}

.vcard__play-ico {
    display: block;
    width: 100%;
    height: 100%;
}

.vcard__play-disc {
    fill: #fff;
    transition: fill 0.4s ease;
}

.vcard__play-tri {
    fill: #0265b2;
    transition: fill 0.4s ease;
}

/* 悬浮脉冲光环：一圈白环扩散消失 */
.vcard__play::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    border: 0.02rem solid rgba(255, 255, 255, 0.9);
    opacity: 0;
    transform: scale(1);
}

.vcard:hover .vcard__play,
.vcard:focus-visible .vcard__play {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.12);
}

/* 悬浮：内圆变品牌蓝、三角变白 */
.vcard:hover .vcard__play-disc,
.vcard:focus-visible .vcard__play-disc {
    fill: #0265b2;
    opacity: 1;
}

.vcard:hover .vcard__play-tri,
.vcard:focus-visible .vcard__play-tri {
    fill: #fff;
}

.vcard:hover .vcard__play::after,
.vcard:focus-visible .vcard__play::after {
    animation: vcard-play-ping 1s var(--ease-out) infinite;
}

@keyframes vcard-play-ping {
    0% {
        opacity: 0.9;
        transform: scale(1);
    }

    100% {
        opacity: 0;
        transform: scale(1.65);
    }
}

/* ---------- 文案区 ---------- */
.vcard__title {
    margin-top: 0.3rem;
    color: #333;
    font-family: "Poppins", var(--font-base);
    font-size: 0.2rem;
    font-weight: 600;
    line-height: 1.5;
    transition: color 0.35s ease;
}

/* 标题最多两行（clamp 作用于内层文本，避免伪元素干扰截断） */
.vcard__title-text {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}

/* 悬浮：标题变主题蓝，下方细线自左扫入 */
.vcard__title::after {
    content: "";
    display: block;
    width: 0.4rem;
    height: 0.02rem;
    margin-top: 0.1rem;
    background: #0265b2;
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform 0.45s var(--ease-out);
}

.vcard:hover .vcard__title,
.vcard:focus-visible .vcard__title {
    color: #0265b2;
}

.vcard:hover .vcard__title::after,
.vcard:focus-visible .vcard__title::after {
    transform: scaleX(1);
}

.vcard__date {
    display: block;
    margin-top: 0.24rem;
    color: #999;
    font-size: 0.16rem;
    font-weight: 500;
    transition: color 0.35s ease;
}

.vcard:hover .vcard__date,
.vcard:focus-visible .vcard__date {
    color: #666;
}

/* ============================================================
   H5 适配（750 设计稿基准）
   ============================================================ */
html[data-mode="h5"] .second__grid {
    grid-template-columns: 1fr;
    gap: 0.5rem;
}

html[data-mode="h5"] .second__cell {
    transform: translateY(0.4rem) scale(0.97);
}

html[data-mode="h5"] .vcard {
    padding-bottom: 0.3rem;
}

html[data-mode="h5"] .vcard__play {
    width: 0.8rem;
    height: 0.8rem;
    left: 0.2rem;
    bottom: 0.2rem;
}

html[data-mode="h5"] .vcard__play svg,
html[data-mode="h5"] .vcard__play-ico {
    width: 100%;
    height: 100%;
}

html[data-mode="h5"] .vcard__title {
    margin-top: 0.24rem;
    font-size: 0.32rem;
}

html[data-mode="h5"] .vcard__title::after {
    height: 0.03rem;
    margin-top: 0.12rem;
}

html[data-mode="h5"] .vcard__date {
    margin-top: 0.2rem;
    font-size: 0.32rem;
}
