/* ==========================================================================
   Video list page (ldcms template: list_video.html)
   Sections: video hero, section heading + intro, 3-column video grid
   Design ref: 1920px artboard, content column 1520px centered.
   ========================================================================== */

/* ---------- Hero ---------- */
.video-hero {
    background-color: #101318;
    background-size: cover;
    background-position: center;
    color: #fff;
    /* 设计稿实测 hero 高度 492px，标题 + 面包屑在区域内垂直居中 */
    height: 492px;
    padding: 0;
}
.video-hero h1 {
    margin: 0 0 12px;
    font-size: var(--fs-h2);
    line-height: 1.2;
    font-weight: 800;
    color: #fff;
}
/* 面包屑字号仅作用于本页（全局 .page-breadcrumb 保持 14px） */
.video-hero .page-breadcrumb {
    font-size: var(--fs-small);
}

/* ---------- Child category tabs (样式与 Solutions 页 tabs 一致) ---------- */
.video-tabs {
    background: #f4f4f4;
    border-bottom: 1px solid #eef0f2;
}
.video-tab-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0 45px;
    list-style: none;
    margin: 0;
    padding: 0;
}
.video-tab {
    display: inline-block;
    padding: 19px 0;
    font-size: var(--fs-body);
    font-weight: 600;
    color: #333;
    border-bottom: 2px solid transparent;
    transition: color .25s ease, border-color .25s ease;
}
.video-tab:hover { color: var(--red); }
.video-tab.is-active {
    color: var(--red);
    border-bottom-color: var(--red);
}

/* ---------- Section ---------- */
.video-sec {
    padding: 70px 0 70px;
    background: #fff;
}
.video-sec-title,
.video-intro h2 {
    position: relative;
    margin: 0 0 25px;
    text-align: center;
    font-size: var(--fs-h3);
    line-height: 1.2;
    font-weight: 800;
    color: var(--ink);
    padding-bottom: 30px;
}
.video-sec-title::after,
.video-intro h2::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0px;
    transform: translateX(-50%);
    display: block;
    width: 120px;
    height: 2px;
    background: var(--red);
}
.video-sec-desc,
.video-intro p {
    max-width: 1290px;
    margin: 0 auto 60px;
    text-align: center;
    font-size: var(--fs-body);
    line-height: 30px;
    color: #14191f;
}
/* 富文本（richText1）归一化：覆盖编辑器写入的内联字号 / 行距 / 颜色 */
.video-intro :where(span, font, div, li, td) {
    font-family: inherit !important;
    font-size: inherit !important;
    line-height: inherit !important;
    color: inherit !important;
}
.video-intro img {
    max-width: 100%;
    height: auto;
}

/* ---------- Video grid ---------- */
.video-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px 28px;
}
.video-card {
    min-width: 0;
}
/* 封面：16:9，与设计稿 488×274 一致 */
.video-thumb {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: #f4f4f4;
}
.video-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .5s ease;
}
.video-thumb:hover img,
.video-thumb:focus-visible img {
    transform: scale(1.04);
}

/* 可播放卡片：整块封面作为播放触发区 */
.video-thumb.is-playable {
    cursor: pointer;
}
.video-thumb.is-playable:focus-visible {
    outline: 2px solid var(--red);
    outline-offset: 3px;
}

/* ---------- Video lightbox（弹窗播放） ---------- */
.video-modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}
.video-modal[hidden] {
    display: none;
}
.video-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .78);
}
.video-modal__dialog {
    position: relative;
    width: min(960px, 100%);
    max-height: 90vh;
}
.video-modal__video {
    display: block;
    width: 100%;
    max-height: 86vh;
    background: #000;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .45);
}
.video-modal__close {
    position: absolute;
    top: -46px;
    right: 0;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, .45);
    background: transparent;
    transition: background-color .25s ease, color .25s ease, border-color .25s ease;
}
.video-modal__close svg {
    width: 18px;
    height: 18px;
}
.video-modal__close:hover,
.video-modal__close:focus-visible {
    background: #fff;
    color: var(--ink);
    border-color: #fff;
}

/* 播放按钮：64px 圆形 + CSS 绘制的白色三角形 */
.video-play {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 64px;
    height: 64px;
    margin: -32px 0 0 -32px;
    border-radius: 50%;
    /* 默认黑色播放按钮（80% 不透明度），hover / 键盘聚焦时变红 */
    background: rgba(20, 25, 31, .8);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color .3s ease, transform .3s ease;
}
.video-play::after {
    content: "";
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 9px 0 9px 15px;
    border-color: transparent transparent transparent #fff;
    margin-left: 4px;
}
.video-thumb:hover .video-play,
.video-thumb:focus-visible .video-play {
    background: rgba(200, 16, 46, .8);
    transform: scale(1.06);
}

/* 卡片标题 */
.video-title {
    margin: 28px 0 0;
    font-size: var(--fs-h5);
    line-height: 1.4;
    font-weight: 500;
    color: var(--ink);
}
.video-title a {
    color: inherit;
    text-decoration: none;
    transition: color .3s;
}
.video-title a:hover {
    color: var(--red);
}

/* ---------- Responsive ---------- */
@media (max-width: 1200px) {
    .video-sec-title { font-size: 38px; margin-bottom: 40px; }
    .video-sec-desc { margin-bottom: 50px; }
    .video-grid { grid-template-columns: repeat(2, 1fr); gap: 34px 24px; }
}
@media (max-width: 991px) {
    .video-hero { height: 380px; }
    /* tabs 在窄屏改为横向滚动，避免多栏目换行挤压 */
    .video-tabs .container { padding-left: 0; padding-right: 0; }
    .video-tab-list {
        flex-wrap: nowrap;
        overflow-x: auto;
        gap: 0 30px;
        padding: 0 15px;
        scrollbar-width: none;
    }
    .video-tab-list::-webkit-scrollbar { display: none; }
    .video-tab { white-space: nowrap; }
    .video-sec { padding: 55px 0 60px; }
    .video-sec-title { font-size: 34px; }
    .video-sec-desc { font-size: 16px; line-height: 28px; }
}
@media (max-width: 767px) {
    .video-hero { height: 300px; }
    .video-hero h1 { font-size: 32px; }
    .video-sec-title { font-size: 30px; margin-bottom: 28px; }
    .video-sec-desc { margin-bottom: 36px; }
    .video-grid { grid-template-columns: 1fr; gap: 32px; }
    .video-title { margin-top: 18px; font-size: 18px; }
    .video-play { width: 56px; height: 56px; margin: -28px 0 0 -28px; }
    .video-modal { padding: 16px; }
    .video-modal__close { top: -42px; width: 34px; height: 34px; }
}
