/* ==========================================================================
   Downloads page (ldcms template: list_down.html)
   Sections: page hero, Resources tabs, grouped download card grid
   Depends on: style.css (tokens / container), partner.css (page hero)
   Design ref: 1920px artboard, content column 1520px centered.
   ========================================================================== */

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

/* ---------- Resources tabs（与视频页 tabs 视觉一致） ---------- */
.down-tabs {
    background: #f4f4f4;
    border-bottom: 1px solid #eef0f2;
}
.down-tab-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0 45px;
    list-style: none;
    margin: 0;
    padding: 0;
}
.down-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;
}
.down-tab:hover { color: var(--red); }
.down-tab.is-active {
    color: var(--red);
    border-bottom-color: var(--red);
}

/* ---------- Section ---------- */
.down-sec {
    padding: 70px 0 70px;
    background: #fff;
}
/* 栏目介绍：输出当前栏目 richText1 富文本
   标题 46px/800 居中，下方 26px 处居中 120×2 红色装饰线；
   说明 18px/30px #6b6b6c，距装饰线 13px
   （用 !important 覆盖编辑器写入的内联字号与颜色） */
.down-intro {
    text-align: center;
}
.down-intro h2 {
    margin: 0;
    font-size: var(--fs-h2) !important;
    line-height: 1.2;
    font-weight: 800;
    color: var(--ink) !important;
}
.down-intro h2::after {
    content: "";
    display: block;
    width: 120px;
    height: 2px;
    margin: 26px auto 0;
    background: var(--red);
}
.down-intro p {
    max-width: 1240px;
    margin: 13px auto 0;
    font-size: var(--fs-body) !important;
    line-height: 30px;
    color: #6b6b6c !important;
}
/* 富文本归一化：覆盖编辑器写入的内联字号 / 行距 / 颜色 */
.down-intro :where(span, font, div, li, td) {
    font-family: inherit !important;
    font-size: inherit !important;
    line-height: inherit !important;
    color: inherit !important;
}
.down-intro img { max-width: 100%; height: auto; }

/* ---------- Group ---------- */
.down-group {
    margin-top: 36px;
}
.down-group + .down-group {
    margin-top: 65px;
}
.down-group-title {
    margin: 0 0 40px;
    font-size: var(--fs-h3);
    line-height: 1.2;
    font-weight: 700;
    color: var(--ink);
}

/* ---------- Card grid：设计稿 4 列，列间距 32px，行间距 42px ---------- */
.down-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 42px 32px;
}

/* ---------- Card ---------- */
.down-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 24px 18px 26px;
    background: #fff;
    border: 1px solid #e5e7eb;
    transition: border-color .3s ease, box-shadow .3s ease;
    border-radius: 10px;
}
.down-card:hover {
    border-color: #d3d7de;
    box-shadow: 0 8px 24px rgba(15, 20, 25, .06);
}

/* 缩略图：设计稿 258×285，浅灰底 + contain 保证任意比例图片不裁切 */
.down-thumb {
    width: 258px;
    max-width: 100%;
    margin: 0 auto;
    aspect-ratio: 258 / 285;
    background: #f7f8fa;
    overflow: hidden;
}
.down-thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform .45s ease;
}
.down-card:hover .down-thumb img {
    transform: scale(1.03);
}

/* 信息区：上分隔线 + 左侧标题/日期 + 右侧下载图标 */
.down-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 32px;
    padding-top: 18px;
    border-top: 1px solid #e5e7eb;
}
.down-meta {
    min-width: 0;
}
.down-name {
    margin: 0;
    font-size: var(--fs-h5);
    line-height: 1.4;
    font-weight: 700;
    color: var(--ink);
    /* 长标题最多两行，避免撑破卡片高度 */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.down-date {
    margin: 8px 0 0;
    font-size: var(--fs-body);
    line-height: 1.4;
    font-weight: 400;
    color: var(--ink);
}

/* 下载按钮：设计稿为 35px 箭头图标（images/102.png） */
.down-btn {
    flex: 0 0 35px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 35px;
    height: 35px;
}
.down-btn img {
    display: block;
    width: 35px;
    height: 35px;
    object-fit: contain;
}
.down-btn:focus-visible {
    outline: 2px solid var(--red);
    outline-offset: 4px;
}

/* ---------- Empty state（栏目暂无下载内容时） ---------- */
.down-empty {
    margin: 0;
    padding: 40px 0;
    text-align: center;
    font-size: var(--fs-small);
    color: #6b6b6c;
}

/* ---------- Responsive ---------- */
@media (max-width: 1200px) {
    .down-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 38px 28px; }
    .down-intro h2 { font-size: 38px !important; }
    .down-group { margin-top: 32px; }
    .down-group + .down-group { margin-top: 55px; }
    .down-group-title { margin-bottom: 40px; }
}
@media (max-width: 991px) {
    .down-hero { height: 380px; }
    /* tabs 在窄屏改为横向滚动，避免多栏目换行挤压 */
    .down-tabs .container { padding-left: 0; padding-right: 0; }
    .down-tab-list {
        flex-wrap: nowrap;
        overflow-x: auto;
        gap: 0 30px;
        padding: 0 15px;
        scrollbar-width: none;
    }
    .down-tab-list::-webkit-scrollbar { display: none; }
    .down-tab { white-space: nowrap; }
    .down-sec { padding: 50px 0 55px; }
    .down-intro h2 { font-size: 34px !important; }
    .down-intro h2::after { margin-top: 20px; }
    .down-intro p { font-size: 16px !important; line-height: 28px; }
    .down-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 30px 24px; }
    .down-group-title { margin-bottom: 30px; font-size: 19px; }
    .down-card { padding: 20px 16px 22px; }
    .down-info { margin-top: 24px; padding-top: 16px; }
}
@media (max-width: 767px) {
    .down-hero { height: 300px; }
    .down-hero h1 { font-size: 32px; }
    .down-sec { padding: 40px 0 45px; }
    .down-intro h2 { font-size: 30px !important; }
    .down-intro h2::after { margin-top: 16px; width: 90px; }
    .down-intro p { font-size: 15px !important; line-height: 26px; }
    .down-group { margin-top: 26px; }
    .down-group + .down-group { margin-top: 40px; }
    .down-group-title { margin-bottom: 24px; }
    .down-grid { gap: 24px 20px; }
    .down-name { font-size: 15px; }
    .down-date { font-size: 13px; }
}
@media (max-width: 575px) {
    .down-grid { grid-template-columns: minmax(0, 1fr); gap: 24px; }
    .down-thumb { width: 100%; }
    .down-group-title { margin-bottom: 20px; }
}
