/* ===== hero card layout final fix start ===== */

/* 首页大图首屏整体 */
.tpl-hero,
.hero-section,
.home-hero,
.index-hero {
    position: relative !important;
    max-width: 1200px !important;
    margin: 32px auto 28px auto !important;
    min-height: 360px !important;
    padding: 56px 72px !important;
    border-radius: 22px !important;
    overflow: hidden !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(420px, 50%) !important;
    gap: 34px !important;
    align-items: center !important;
}

/* 大图背景只做背景，不参与布局 */
.tpl-hero .hero-bg,
.hero-section .hero-bg,
.home-hero .hero-bg,
.index-hero .hero-bg {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    z-index: 0 !important;
    background-size: cover !important;
    background-position: center !important;
    filter: none !important;
}

/* 背景遮罩 */
.tpl-hero::before,
.hero-section::before,
.home-hero::before,
.index-hero::before {
    content: "" !important;
    position: absolute !important;
    inset: 0 !important;
    z-index: 1 !important;
    background: linear-gradient(90deg, rgba(15,23,42,.82), rgba(15,23,42,.55), rgba(15,23,42,.36)) !important;
    pointer-events: none !important;
}

/* 左侧文字和右侧推荐卡片都在遮罩上方 */
.tpl-hero .hero-content,
.tpl-hero .hero-drag-scroll,
.tpl-hero .hero-cards,
.tpl-hero .hero-list,
.hero-section .hero-content,
.hero-section .hero-drag-scroll,
.hero-section .hero-cards,
.hero-section .hero-list,
.home-hero .hero-content,
.home-hero .hero-drag-scroll,
.home-hero .hero-cards,
.home-hero .hero-list,
.index-hero .hero-content,
.index-hero .hero-drag-scroll,
.index-hero .hero-cards,
.index-hero .hero-list {
    position: relative !important;
    z-index: 2 !important;
}

/* 右侧推荐卡片横向排列 */
.tpl-hero .hero-drag-scroll,
.tpl-hero .hero-cards,
.tpl-hero .hero-list,
.hero-section .hero-drag-scroll,
.hero-section .hero-cards,
.hero-section .hero-list,
.home-hero .hero-drag-scroll,
.home-hero .hero-cards,
.home-hero .hero-list,
.index-hero .hero-drag-scroll,
.index-hero .hero-cards,
.index-hero .hero-list {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    gap: 16px !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    max-width: 100% !important;
    padding: 8px 4px 12px 4px !important;
    scrollbar-width: thin !important;
}

/* 大图区域里的小卡片固定合理宽度，禁止被压成细条 */
.tpl-hero .vod-card,
.tpl-hero .movie-card,
.tpl-hero .video-card,
.tpl-hero .card-app,
.tpl-hero .card-media,
.tpl-hero .card-wide,
.tpl-hero .card-poster,
.hero-section .vod-card,
.hero-section .movie-card,
.hero-section .video-card,
.hero-section .card-app,
.hero-section .card-media,
.hero-section .card-wide,
.hero-section .card-poster,
.home-hero .vod-card,
.home-hero .movie-card,
.home-hero .video-card,
.home-hero .card-app,
.home-hero .card-media,
.home-hero .card-wide,
.home-hero .card-poster,
.index-hero .vod-card,
.index-hero .movie-card,
.index-hero .video-card,
.index-hero .card-app,
.index-hero .card-media,
.index-hero .card-wide,
.index-hero .card-poster {
    flex: 0 0 108px !important;
    width: 108px !important;
    min-width: 108px !important;
    max-width: 108px !important;
    display: block !important;
    height: auto !important;
    padding: 8px !important;
    border-radius: 16px !important;
    overflow: hidden !important;
    writing-mode: horizontal-tb !important;
    text-orientation: mixed !important;
}

/* 大图区域小海报 */
.tpl-hero .vod-card img,
.tpl-hero .movie-card img,
.tpl-hero .video-card img,
.tpl-hero .card-app img,
.tpl-hero .card-media img,
.tpl-hero .card-wide img,
.tpl-hero .card-poster img,
.hero-section .vod-card img,
.hero-section .movie-card img,
.hero-section .video-card img,
.hero-section .card-app img,
.hero-section .card-media img,
.hero-section .card-wide img,
.hero-section .card-poster img,
.home-hero .vod-card img,
.home-hero .movie-card img,
.home-hero .video-card img,
.home-hero .card-app img,
.home-hero .card-media img,
.home-hero .card-wide img,
.home-hero .card-poster img,
.index-hero .vod-card img,
.index-hero .movie-card img,
.index-hero .video-card img,
.index-hero .card-app img,
.index-hero .card-media img,
.index-hero .card-wide img,
.index-hero .card-poster img {
    display: block !important;
    width: 100% !important;
    height: 138px !important;
    min-height: 138px !important;
    max-height: 138px !important;
    aspect-ratio: auto !important;
    object-fit: cover !important;
    border-radius: 12px !important;
}

/* 大图区域所有文字禁止竖排 */
.tpl-hero .vod-card *,
.tpl-hero .movie-card *,
.tpl-hero .video-card *,
.tpl-hero .card-app *,
.tpl-hero .card-media *,
.tpl-hero .card-wide *,
.tpl-hero .card-poster *,
.hero-section .vod-card *,
.hero-section .movie-card *,
.hero-section .video-card *,
.hero-section .card-app *,
.hero-section .card-media *,
.hero-section .card-wide *,
.hero-section .card-poster *,
.home-hero .vod-card *,
.home-hero .movie-card *,
.home-hero .video-card *,
.home-hero .card-app *,
.home-hero .card-media *,
.home-hero .card-wide *,
.home-hero .card-poster *,
.index-hero .vod-card *,
.index-hero .movie-card *,
.index-hero .video-card *,
.index-hero .card-app *,
.index-hero .card-media *,
.index-hero .card-wide *,
.index-hero .card-poster * {
    writing-mode: horizontal-tb !important;
    text-orientation: mixed !important;
}

/* 大图区域标题最多两行 */
.tpl-hero .vod-card strong,
.tpl-hero .movie-card strong,
.tpl-hero .video-card strong,
.tpl-hero .card-app strong,
.tpl-hero .card-media strong,
.tpl-hero .card-wide strong,
.tpl-hero .card-poster strong,
.hero-section .vod-card strong,
.hero-section .movie-card strong,
.hero-section .video-card strong,
.hero-section .card-app strong,
.hero-section .card-media strong,
.hero-section .card-wide strong,
.hero-section .card-poster strong,
.home-hero .vod-card strong,
.home-hero .movie-card strong,
.home-hero .video-card strong,
.home-hero .card-app strong,
.home-hero .card-media strong,
.home-hero .card-wide strong,
.home-hero .card-poster strong,
.index-hero .vod-card strong,
.index-hero .movie-card strong,
.index-hero .video-card strong,
.index-hero .card-app strong,
.index-hero .card-media strong,
.index-hero .card-wide strong,
.index-hero .card-poster strong {
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    white-space: normal !important;
    word-break: break-word !important;
    line-height: 1.35 !important;
    font-size: 13px !important;
    min-height: 35px !important;
    margin: 8px 0 0 0 !important;
}

/* 大图区域年份、清晰度、地区只显示一行 */
.tpl-hero .vod-card span,
.tpl-hero .vod-card small,
.tpl-hero .vod-card em,
.tpl-hero .movie-card span,
.tpl-hero .movie-card small,
.tpl-hero .movie-card em,
.tpl-hero .card-app span,
.tpl-hero .card-app small,
.tpl-hero .card-app em,
.tpl-hero .card-media span,
.tpl-hero .card-media small,
.tpl-hero .card-media em,
.hero-section .vod-card span,
.hero-section .vod-card small,
.hero-section .vod-card em,
.home-hero .vod-card span,
.home-hero .vod-card small,
.home-hero .vod-card em,
.index-hero .vod-card span,
.index-hero .vod-card small,
.index-hero .vod-card em {
    display: block !important;
    overflow: hidden !important;
    white-space: nowrap !important;
    text-overflow: ellipsis !important;
    line-height: 1.35 !important;
    max-width: 100% !important;
}

/* 大图区域简介不展示，避免撑高 */
.tpl-hero .vod-card p,
.tpl-hero .movie-card p,
.tpl-hero .video-card p,
.tpl-hero .card-app p,
.tpl-hero .card-media p,
.tpl-hero .card-wide p,
.tpl-hero .card-poster p,
.hero-section .vod-card p,
.hero-section .movie-card p,
.hero-section .video-card p,
.hero-section .card-app p,
.hero-section .card-media p,
.hero-section .card-wide p,
.hero-section .card-poster p,
.home-hero .vod-card p,
.home-hero .movie-card p,
.home-hero .video-card p,
.home-hero .card-app p,
.home-hero .card-media p,
.home-hero .card-wide p,
.home-hero .card-poster p,
.index-hero .vod-card p,
.index-hero .movie-card p,
.index-hero .video-card p,
.index-hero .card-app p,
.index-hero .card-media p,
.index-hero .card-wide p,
.index-hero .card-poster p {
    display: none !important;
}

/* 移动端 */
@media (max-width: 768px) {
    .tpl-hero,
    .hero-section,
    .home-hero,
    .index-hero {
        display: block !important;
        min-height: auto !important;
        padding: 28px 18px !important;
        margin: 18px 12px !important;
        border-radius: 18px !important;
    }

    .tpl-hero .hero-content,
    .hero-section .hero-content,
    .home-hero .hero-content,
    .index-hero .hero-content {
        margin-bottom: 22px !important;
    }

    .tpl-hero .hero-drag-scroll,
    .tpl-hero .hero-cards,
    .tpl-hero .hero-list,
    .hero-section .hero-drag-scroll,
    .hero-section .hero-cards,
    .hero-section .hero-list,
    .home-hero .hero-drag-scroll,
    .home-hero .hero-cards,
    .home-hero .hero-list,
    .index-hero .hero-drag-scroll,
    .index-hero .hero-cards,
    .index-hero .hero-list {
        gap: 12px !important;
    }

    .tpl-hero .vod-card,
    .tpl-hero .movie-card,
    .tpl-hero .video-card,
    .tpl-hero .card-app,
    .tpl-hero .card-media,
    .tpl-hero .card-wide,
    .tpl-hero .card-poster,
    .hero-section .vod-card,
    .hero-section .movie-card,
    .hero-section .video-card,
    .hero-section .card-app,
    .hero-section .card-media,
    .hero-section .card-wide,
    .hero-section .card-poster {
        flex-basis: 92px !important;
        width: 92px !important;
        min-width: 92px !important;
        max-width: 92px !important;
    }

    .tpl-hero .vod-card img,
    .tpl-hero .movie-card img,
    .tpl-hero .video-card img,
    .tpl-hero .card-app img,
    .tpl-hero .card-media img,
    .tpl-hero .card-wide img,
    .tpl-hero .card-poster img,
    .hero-section .vod-card img,
    .hero-section .movie-card img,
    .hero-section .video-card img,
    .hero-section .card-app img,
    .hero-section .card-media img,
    .hero-section .card-wide img,
    .hero-section .card-poster img {
        height: 122px !important;
        min-height: 122px !important;
        max-height: 122px !important;
    }
}

/* ===== hero card layout final fix end ===== */
