/* ==========================================================================
   CERTIFICATIONS PAGE (list_honor.html)
   依赖：style.css（变量、头部、页脚）、partner.css（page-hero / page-breadcrumb）
   内容区最大宽度 1520px 居中，断点：1520 / 1200 / 992 / 768 / 576
   图片滚动特效参考 show_product.html「技术优势」：scroll-snap 轨道 + 单卡步进 +
   左/右缘渐隐（按剩余滚动量显隐）
   ========================================================================== */

/* ---------- hero ---------- */
.honor-hero { height: 420px; }

/* ---------- 同级页签（About Us / Certifications / Team & Exhibitions / Contact Us） ---------- */
.honor-tabs {
    background: #F2F2F2;
    border-bottom: 1px solid #eceef1;
}
.honor-tab-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0 45px;
}
.honor-tab {
    display: inline-block;
    padding: 20px 0;
    font-size: var(--fs-body);
    font-weight: 600;
    color: #333;
    border-bottom: 2px solid transparent;
    transition: color .25s ease, border-color .25s ease;
}
.honor-tab:hover { color: var(--red); }
.honor-tab.is-active {
    color: var(--red);
    border-bottom-color: var(--red);
}

/* ---------- 证书分组（标题 + 说明 + 横向滚动证书墙） ---------- */
.honor-sec { padding: 65px 0 65px; }
.honor-sec + .honor-sec { padding-top: 0; }

/* 头部：左标题，右说明文字 + 切换按钮 */
.honor-sec-head {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: 40px;
    align-items: start;
}
.honor-title {
    font-size: var(--fs-h3);
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -.01em;
    color: var(--ink);
}
.honor-desc {
    font-size: var(--fs-body);
    line-height: 1.75;
    color: #14191f;
    overflow-wrap: break-word;
}
/* richText1 富文本内段落去默认间距，连续块级元素统一留白 */
.honor-desc p { margin: 0; }
.honor-desc > * + * { margin-top: 10px; }
.honor-desc :where(img) { max-width: 100%; height: auto; }
/* 滚动进度条 + 圆形切换按钮（位于说明文字右下方） */
.honor-sec-nav {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 18px;
    margin-top: 40px;
}
/* 进度条轨道：浅灰底，红色填充随横向滚动从 0% 延伸到 100%（宽度由页面 JS 按 scrollLeft/最大滚动距离计算） */
.honor-progress {
    position: relative;
    flex: 0 1 auto;
    width: 445px;
    height: 2px;
    background: #e3e5e8;
}
.honor-progress i {
    position: absolute;
    left: 0;
    top: 0;
    width: 0;
    height: 2px;
    background: var(--red);
    transition: width .12s linear;
}
.honor-nav {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: none;
    cursor: pointer;
    transition: opacity .25s ease;
}
/* 箭头按钮使用设计稿图片，图片自带圆形边框 */
.honor-nav img { width: 44px; height: 44px; object-fit: contain; }
.honor-nav:hover { opacity: .8; }
/* 滚动到头/尾时按钮不可用 */
.honor-nav:disabled {
    opacity: 1;
    cursor: default;
}

/* ---------- 横向滚动轨道（通屏，右缘露出下一张） ---------- */
.honor-xscroll { position: relative; margin-top: 70px; }
.honor-track {
    display: flex;
    gap: 30px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    /* 左边界与版心对齐，右侧通屏延伸（参照技术优势实现） */
    margin-left: max(15px, calc((100% - 1520px) / 2));
    padding-right: max(15px, calc((100% - 1520px) / 2));
}
.honor-track::-webkit-scrollbar { display: none; }

/* 左右边缘半透明遮罩：提示两侧还有内容（JS 按剩余滚动量显隐）
   宽度 = (视口宽度 - .container 内容宽度) / 2，内容宽度不含左右内边距（即 1520px） */
.honor-xscroll::after,
.honor-xscroll::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    width: max(0px, calc((100vw - (min(100vw, var(--container)) - 2 * var(--gutter))) / 2));
    background: rgba(255, 255, 255, .7);
    pointer-events: none;
    z-index: 1;
    opacity: 0;
    transition: opacity .3s ease;
}
.honor-xscroll::after { right: 0; }
.honor-xscroll::before { left: 0; }
.honor-xscroll.is-fadeable::after { opacity: 1; }
.honor-xscroll.is-fadeable-left::before { opacity: 1; }

/* ---------- 证书卡片 ---------- */
.honor-card {
    flex: 0 0 340px;
    scroll-snap-align: start;
}
.honor-card-media {
    aspect-ratio: 3 / 4;
    overflow: hidden;
    /* 白底 + contain：完整展示整张证书，避免宽幅证书被左右裁切 */
    background: #fff;
    border: 1px solid var(--line);
}
.honor-card-media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform .5s ease;
}
.honor-card:hover .honor-card-media img { transform: scale(1.04); }
.honor-card-name {
    display: block;
    margin-top: 18px;
    font-size: var(--fs-small);
    color: #5b6167;
    text-align: center;
}

/* ---------- 响应式 ---------- */
@media (max-width: 1200px) {
    .honor-title { font-size: 34px; }
    .honor-card { flex-basis: 300px; }
}

@media (max-width: 992px) {
    .honor-hero { height: 320px; }
    .honor-sec { padding: 52px 0 58px; }
    .honor-sec-head { grid-template-columns: 1fr; gap: 22px; }
    .honor-sec-nav { margin-top: 20px; }
    .honor-xscroll { margin-top: 38px; }
    .honor-card { flex-basis: 260px; }
}

@media (max-width: 768px) {
    .honor-title { font-size: 28px; }
    .honor-track { gap: 16px; }
    .honor-card { flex-basis: 230px; }
}

@media (max-width: 576px) {
    .honor-hero { height: 240px; }
    .honor-tab { padding: 14px 0; font-size: 15px; }
    .honor-tab-list { gap: 0 24px; }
    .honor-sec { padding: 40px 0 46px; }
    .honor-title { font-size: 24px; }
    .honor-desc { font-size: 14px; }
    /* 手机端一屏约 1.3 张，露出下一张提示可滑动 */
    .honor-card { flex-basis: 72%; }
    .honor-card-name { margin-top: 12px; font-size: 14px; }
    .honor-nav,
    .honor-nav img { width: 38px; height: 38px; }
}
