/* ============================================================
 * 频道栏目页专属样式 page-channel-programs.css
 * 用于 channel/programs.html，通过 $pageCss 注入
 * 依赖 common.css（频道页骨架/变量等）
 * ============================================================ */

/* ========== 节目列表 ========== */
.wv-program-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 40px;
    width: 100%;
    clear: both;
}

.wv-program-grid::after {
    content: '';
    display: block;
    clear: both;
}

.wv-program-item {
    cursor: pointer;
    transition: var(--transition);
}

.wv-program-item:hover {
    transform: translateY(-3px);
}

.wv-program-thumb {
    width: 100%;
    aspect-ratio: 16 / 10;
    border-radius: 2px;
    margin-bottom: 10px;
}

.wv-program-title {
    font-size: 13px;
    color: var(--color-text-light);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.wv-program-item:hover .wv-program-title {
    color: var(--color-primary);
}

/* ========== 节目简介（位于节目列表上方，底部分隔线） ========== */
.wv-program-intro {
    padding-bottom: 20px;
    margin-bottom: 24px;
    border-bottom: 1px dashed var(--color-border);
}

.wv-intro-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 16px;
    position: relative;
    padding-left: 12px;
}

.wv-intro-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 20px;
    background: var(--color-primary);
}

.wv-intro-text {
    font-size: 14px;
    color: var(--color-text-light);
    line-height: 1.8;
    text-indent: 2em;
}

/* ========== 响应式 ========== */
@media (min-width: 769px) and (max-width: 1024px) {
    .wv-program-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    /* ---------- 手机端：横向滚动 Tab + 卡片式节目网格 ---------- */

    /* 主内容区收紧 */
    .wv-channel-main {
        padding: 16px 0 32px;
    }
    .wv-channel-inner {
        gap: 14px;
    }

    /* 侧栏标题：隐藏 PC 大红条 */
    .wv-channel-inner .wv-sidebar-title {
        display: none;
    }

    /* 侧栏：与首页"频道节目"一致的 3 列网格 tab */
    .wv-channel-inner .wv-channel-sidebar {
        width: 100%;
        background: transparent;
    }
    .wv-channel-inner .wv-sidebar-menu {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }
    .wv-channel-inner .wv-sidebar-menu li {
        display: block;
    }
    .wv-channel-inner .wv-sidebar-item {
        display: block;
        width: 100%;
        padding: 10px 6px;
        font-size: 13px;
        line-height: 1.4;
        text-align: center;
        color: var(--color-text);
        background: #f0f0f0;
        border-radius: 4px;
        border-bottom: none;
        border-left: none;
    }
    .wv-channel-inner .wv-sidebar-item:hover {
        padding-left: 6px;
        background: #f0f0f0;
        color: var(--color-text);
    }
    .wv-channel-inner .wv-sidebar-active,
    .wv-channel-inner .wv-sidebar-active:hover {
        background: var(--color-primary);
        color: #fff !important;
        font-weight: 400;
        border: none;
        padding-left: 6px;
    }

    /* 内容区 */
    .wv-channel-inner .wv-channel-content {
        padding: 0;
    }

    /* 面板标题与 tab 重复，手机端隐藏 */
    .wv-programs-channel-content .wv-channel-title {
        display: none;
    }

    /* 节目网格：一行两个卡片 */
    .wv-program-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        margin-bottom: 0;
    }
    .wv-program-item {
        background: #fff;
        border-radius: 8px;
        overflow: hidden;
        box-shadow: 0 1px 8px rgba(0, 0, 0, 0.06);
    }
    .wv-program-item:hover {
        transform: none;
    }
    .wv-program-thumb {
        aspect-ratio: 16 / 10;
        border-radius: 0;
        margin-bottom: 0;
    }
    .wv-program-title {
        font-size: 13px;
        line-height: 1.45;
        text-align: center;
        color: var(--color-text);
        padding: 8px 6px 10px;
        /* 单行省略（不依赖 -webkit-box，兼容 Chrome 新内核） */
        display: block;
        white-space: nowrap;
        text-overflow: ellipsis;
        overflow: hidden;
    }

    /* 节目简介：间距收紧 */
    .wv-program-intro {
        display: block;
        padding-bottom: 16px;
        margin-bottom: 16px;
    }
    .wv-intro-title {
        font-size: 15px;
        margin-bottom: 8px;
    }
    .wv-intro-text {
        font-size: 13px;
        line-height: 1.7;
        text-indent: 2em;
    }
}
