/* ==========================================================================
   通用页面组件 —— Catalog / Videos 页
   --------------------------------------------------------------------------
   这两个页面是迁移到 WordPress 后新增的，main.css 里原本没有对应类。
   全部复用 :root 里的设计 token，保持与首页/产品页同一套视觉。
   ========================================================================== */

/* ---------- 无大图的页头：用主色渐变，与 .p-banner 视觉连贯 ---------- */
.page-hero {
  position: relative;
  background: linear-gradient(135deg, var(--c-900) 0%, var(--c-700) 100%);
  color: #fff;
  overflow: hidden;
}

.page-hero .p-banner__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.page-hero .p-banner__inner {
  position: relative;
  z-index: 1;
  padding: clamp(56px, 7vw, 96px) 0;
}

.page-hero .p-banner__title { color: #fff; }
.page-hero .p-banner__text { color: rgba(255, 255, 255, .84); max-width: 62ch; }
.page-hero .p-banner__crumbs a { color: rgba(255, 255, 255, .82); }
.page-hero .p-banner__crumbs span { color: rgba(255, 255, 255, .58); }

/* ---------- 分类切换（Catalog 内容随分类变化） ---------- */
.p-catswitch { padding-top: clamp(28px, 3vw, 44px); }

.filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
}

.filter-tab {
  display: inline-block;
  padding: 9px 18px;
  border: 1px solid var(--c-150);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font-size: .9rem;
  font-weight: 500;
  text-decoration: none;
  transition: border-color .25s var(--ease), color .25s var(--ease),
              background .25s var(--ease);
}

.filter-tab:hover {
  border-color: var(--c-500);
  color: var(--c-700);
}

.filter-tab.is-active {
  background: var(--c-900);
  border-color: var(--c-900);
  color: #fff;
}

/* ---------- 下载资源列表 ---------- */
.resource-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.resource-list .p-resource {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* ---------- 视频卡 ---------- */
.video-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.video-card {
  padding: 0;
  overflow: hidden;
}

.video-card__link {
  display: block;
  height: 100%;
  color: inherit;
  text-decoration: none;
}

.video-card__media {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--c-50);
}

.video-card__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .6s var(--ease);
}

.video-card__link:hover .video-card__media img { transform: scale(1.05); }

.video-card__play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
}

.video-card__play .icon {
  width: 54px;
  height: 54px;
  padding: 15px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .92);
  color: var(--c-900);
  box-shadow: 0 6px 20px rgba(1, 25, 58, .28);
  transition: transform .3s var(--ease), background .3s var(--ease);
}

.video-card__link:hover .video-card__play .icon {
  transform: scale(1.08);
  background: var(--c-500);
  color: #fff;
}

.video-card__length {
  position: absolute;
  right: 10px;
  bottom: 10px;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(1, 25, 58, .72);
  color: #fff;
  font-size: .74rem;
  font-weight: 600;
  letter-spacing: .02em;
}

.video-card__body {
  display: block;
  padding: 16px 18px 20px;
}

.video-card__body strong {
  display: block;
  margin-bottom: 6px;
  font-family: var(--font-head);
  font-weight: 700;
  color: var(--ink);
}

.video-card__body em {
  display: block;
  margin-bottom: 10px;
  font-style: normal;
  font-size: .88rem;
  color: var(--body);
}

.video-card__platform {
  font-size: .8rem;
  font-weight: 600;
  color: var(--c-600);
}

@media (max-width: 620px) {
  .filter-tabs { gap: 8px; }
  .filter-tab { padding: 8px 14px; font-size: .84rem; }
  .video-card__play .icon { width: 46px; height: 46px; padding: 12px; }
}

/* ============================================================
   About 页面（/about/）
   ============================================================ */

.about-figures {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin: clamp(28px, 3.4vw, 44px) 0 0;
  padding: 0;
  list-style: none;
}
.about-fig {
  padding: 20px 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.about-fig strong {
  display: block;
  font-family: var(--font-head);
  font-size: clamp(1.35rem, 2.4vw, 1.9rem);
  line-height: 1.1;
  color: var(--c-600);
}
.about-fig span {
  display: block;
  margin-top: 5px;
  font-size: .82rem;
  line-height: 1.45;
  color: #7B8CA1;
}

/* ---------- 发展史：左右交错卡片 + 中线 ---------- */
.history {
  position: relative;
  max-width: 1080px;
  margin: clamp(34px, 4vw, 56px) auto 0;
  padding: 0;
  list-style: none;
}
.history::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 10px;
  bottom: 10px;
  width: 2px;
  transform: translateX(-50%);
  background: linear-gradient(var(--c-150), var(--c-500));
}

.history__item {
  position: relative;
  width: calc(50% - 36px);
  margin-bottom: clamp(18px, 2.2vw, 30px);
  padding: 22px 26px 24px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.history__item:last-child { margin-bottom: 0; }

/* 左一右一交替 */
.history__item:nth-child(odd) {
  margin-right: auto;
  text-align: right;
}
.history__item:nth-child(even) {
  margin-left: auto;
  text-align: left;
}

/* 中线上的圆点 */
.history__item::before {
  content: '';
  position: absolute;
  top: 28px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--c-500);
  box-sizing: border-box;
  z-index: 1;
}
.history__item:nth-child(odd)::before { left: calc(100% + 30.5px); }
.history__item:nth-child(even)::before { right: calc(100% + 30.5px); }

/* 标题：2016 · Foundation */
.history__head {
  display: block;
  margin-bottom: 8px;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.3;
  color: var(--c-500);
}
.history__year { font-weight: 700; }
.history__phase { font-weight: 700; }
.history__phase::before { content: ' \00b7  '; }
.history__phase:empty { display: none; }

.history__text {
  margin: 0;
  font-size: .92rem;
  line-height: 1.65;
  color: #46586C;
}

@media (max-width: 820px) {
  .history { margin-top: clamp(26px, 3vw, 38px); }
  .history::before { left: 5px; transform: none; }
  .history__item {
    width: auto;
    margin: 0 0 16px 26px;
    padding: 18px 20px 20px;
  }
  .history__item:nth-child(odd),
  .history__item:nth-child(even) {
    margin-left: 26px;
    margin-right: 0;
    text-align: left;
  }
  .history__item:nth-child(odd)::before,
  .history__item:nth-child(even)::before {
    left: -30.5px;
    right: auto;
    top: 22px;
  }
  .history__head { font-size: .95rem; }
  .history__text { font-size: .88rem; }
}

/* ---------- 工厂实景 ---------- */
.factory-figs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: clamp(24px, 3vw, 34px) 0 0;
  padding: 0;
  list-style: none;
}
.factory-figs figure { margin: 0; }
.factory-figs img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius);
  background: var(--c-50);
  border: 1px solid var(--line);
}
.factory-figs figcaption {
  margin-top: 8px;
  font-size: .82rem;
  line-height: 1.45;
  color: #7B8CA1;
}

/* ---------- 九道工序 ---------- */
.factory-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}
.factory-step {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.factory-step img {
  display: block;
  width: 100%;
  aspect-ratio: 5 / 3;
  object-fit: cover;
  background: var(--c-50);
}
.factory-step__body { padding: 14px 16px 16px; }
.factory-step__num {
  font-family: var(--font-head);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .08em;
  color: var(--c-500);
}
.factory-step h3 {
  margin: 2px 0 5px;
  font-size: .95rem;
  line-height: 1.3;
}
.factory-step p {
  margin: 0;
  font-size: .82rem;
  line-height: 1.55;
  color: #7B8CA1;
}

/* ---------- 五项测试 ---------- */
.factory-tests {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}
.factory-test {
  display: flex;
  gap: 12px;
  padding: 16px 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-left: 3px solid var(--c-500);
  border-radius: var(--radius);
}
.factory-test > .icon {
  flex: none;
  width: 20px;
  height: 20px;
  margin-top: 2px;
  stroke: var(--c-600);
  fill: none;
  stroke-width: 1.6;
}
.factory-test strong {
  display: block;
  font-family: var(--font-head);
  font-size: .9rem;
  color: var(--c-900);
}
.factory-test span span {
  display: block;
  margin-top: 3px;
  font-size: .84rem;
  line-height: 1.55;
  color: #5C6E82;
}

@media (max-width: 900px) {
  .about-figures { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .factory-figs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .factory-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .factory-tests { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .about-figures { grid-template-columns: 1fr; }
  .factory-figs { grid-template-columns: 1fr; }
  .factory-steps { grid-template-columns: 1fr; }
  .history__item { padding-bottom: 22px; }
}

/* ============================================================
   Certifications 页（/certifications/）
   证书卡片规则与分类页一致，页面不加载 product.css 所以在此重定义
   ============================================================ */
.p-cert__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  margin-top: clamp(24px, 3vw, 36px);
  padding: 0;
  list-style: none;
}
.p-cert__item {
  display: flex;
  flex-direction: column;
}
.p-cert__media {
  display: block;
  margin: 0 0 14px;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border: 1px solid var(--c-150);
  border-radius: var(--radius-md);
  background: #fff;
  box-shadow: 0 1px 2px rgba(1, 19, 45, .05);
  transition: box-shadow .22s var(--ease), transform .22s var(--ease);
}
.p-cert__item:hover .p-cert__media {
  box-shadow: 0 6px 20px rgba(1, 19, 45, .10);
  transform: translateY(-2px);
}
.p-cert__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: top center;
  background: #fff;
}
.p-cert__item strong {
  display: block;
  font-family: var(--font-head);
  font-size: 0.95rem;
  line-height: 1.3;
  color: var(--ink);
  margin-bottom: 4px;
}
.p-cert__item em {
  display: block;
  font-style: normal;
  font-size: 0.8rem;
  line-height: 1.5;
  color: var(--muted);
}

/* 证书编号清单 */
.cert-list {
  display: grid;
  gap: 14px;
  margin: clamp(22px, 3vw, 32px) 0 0;
  padding: 0;
  list-style: none;
}
.cert-list__item {
  padding: 18px 20px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.cert-list__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px;
}
.cert-list__head strong {
  font-family: var(--font-head);
  font-size: .95rem;
  color: var(--c-900);
}
.cert-list__no {
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: .78rem;
  color: var(--c-600);
  background: var(--c-50);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 2px 8px;
}
.cert-list__item p {
  margin: 6px 0 0;
  font-size: .88rem;
  line-height: 1.6;
  color: #5C6E82;
}

/* ============================================================
   Contact 页（/contact/）
   ============================================================ */
.contact-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 430px);
  gap: clamp(28px, 4vw, 56px);
  align-items: start;
}

.contact-list {
  display: grid;
  gap: 16px;
  margin: clamp(22px, 3vw, 30px) 0 0;
  padding: 0;
  list-style: none;
}
.contact-list > li {
  display: flex;
  gap: 14px;
}
.contact-list > li > .icon {
  flex: none;
  width: 20px;
  height: 20px;
  margin-top: 3px;
  stroke: var(--c-600);
  fill: none;
  stroke-width: 1.6;
}
.contact-list strong {
  display: block;
  font-family: var(--font-head);
  font-size: .86rem;
  color: var(--c-900);
}
.contact-list span span {
  display: block;
  margin-top: 2px;
  font-size: .92rem;
  line-height: 1.55;
  color: #51647C;
}
.contact-list a { color: var(--c-700); text-decoration: none; }
.contact-list a:hover { text-decoration: underline; }

.contact-note {
  margin-top: clamp(22px, 3vw, 30px);
  padding: 18px 20px;
  background: var(--c-50);
  border: 1px solid var(--line);
  border-left: 3px solid var(--c-500);
  border-radius: var(--radius);
}
.contact-note p {
  margin: 0;
  font-size: .9rem;
  line-height: 1.65;
  color: #46586C;
}

/* 三步流程 */
.contact-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin: clamp(24px, 3vw, 34px) 0 0;
  padding: 0;
  list-style: none;
}
.contact-step {
  padding: 22px 22px 24px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.contact-step__num {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: .75rem;
  letter-spacing: .08em;
  color: var(--c-500);
}
.contact-step h3 {
  margin: 6px 0;
  font-size: 1rem;
  line-height: 1.35;
}
.contact-step p {
  margin: 0;
  font-size: .88rem;
  line-height: 1.6;
  color: #5C6E82;
}

@media (max-width: 1000px) {
  .p-cert__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .contact-split { grid-template-columns: minmax(0, 1fr); }
  .contact-steps { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  .p-cert__grid { grid-template-columns: minmax(0, 1fr); }
  .p-cert__media { aspect-ratio: 4 / 3; }
}

/* ============================================================
   FAQ 汇总页（/faq/）—— 复刻分类页底部的 FAQ 区块
   这些规则原先只在 product.css 里，归档页不加载 product.css
   ============================================================ */
.p-prose { max-width: 900px; margin-inline: auto; }
.p-prose p { font-size: 1rem; }
.p-prose p:last-child { margin-bottom: 0; }
.p-prose--left { max-width: none; margin-inline: 0; }

.p-faq-split {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr);
  gap: clamp(30px, 4vw, 58px);
  align-items: start;
}
.p-faq-split__sub { font-size: clamp(1.1rem, 1.8vw, 1.35rem); margin: 36px 0 18px; }
.p-faq-split__form { position: sticky; top: calc(var(--header-h) + 22px); }
.p-faq-section .faq__item { background: #fff; }

@media (max-width: 1024px) {
  .p-faq-split__form { position: static; }
}
@media (max-width: 900px) {
  .p-faq-split { grid-template-columns: minmax(0, 1fr); }
}

/* ============================================================
   News 列表页（/news/）与文章详情页
   ============================================================ */
.container--narrow { max-width: 860px; margin-inline: auto; }

.news-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(20px, 2.6vw, 32px);
  margin: 0;
  padding: 0;
  list-style: none;
}
.news-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform .22s var(--ease), box-shadow .22s var(--ease);
}
.news-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 26px rgba(1, 19, 45, .10);
}
.news-card__media { display: block; overflow: hidden; }
.news-card__media img {
  display: block;
  width: 100%;
  aspect-ratio: 9 / 7;
  object-fit: cover;
}
.news-card__body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 22px 22px 24px;
  flex: 1;
}
.news-card__meta {
  margin: 0;
  font-size: .78rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #7B8CA1;
  font-family: var(--font-head);
  font-weight: 600;
}
.news-card__title {
  margin: 0;
  font-size: 1.12rem;
  line-height: 1.35;
}
.news-card__title a { color: var(--ink); text-decoration: none; }
.news-card__title a:hover { color: var(--c-600); }
.news-card__excerpt { font-size: .92rem; line-height: 1.6; color: #5C6E82; }
.news-card__excerpt p { margin: 0 0 .6em; }
.news-card__excerpt p:last-child { margin-bottom: 0; }
.news-card .link-arrow { margin-top: auto; }

.news-pager {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: clamp(28px, 3.5vw, 44px);
}
.news-pager__item a,
.news-pager__item span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 42px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--c-700);
  font-family: var(--font-head);
  font-size: .9rem;
  font-weight: 600;
  text-decoration: none;
}
.news-pager__item span.current {
  background: var(--c-700);
  border-color: var(--c-700);
  color: #fff;
}
.news-pager__item a:hover { border-color: var(--c-400); }

.news-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  padding: clamp(40px, 6vw, 72px) 20px;
  text-align: center;
  font-size: 1rem;
  color: #5C6E82;
}

/* 文章详情 */
.article-media { margin: 0 0 clamp(26px, 3.5vw, 40px); }
.article-media img {
  display: block;
  width: 100%;
  border-radius: var(--radius-md);
}

.article { font-size: 1.02rem; line-height: 1.75; color: #3E5269; }
.article > * + * { margin-top: 1.1em; }
.article h2 {
  font-size: clamp(1.25rem, 2vw, 1.5rem);
  color: var(--ink);
  margin-top: 1.8em;
  line-height: 1.3;
}
.article h3 {
  font-size: clamp(1.08rem, 1.6vw, 1.22rem);
  color: var(--ink);
  margin-top: 1.6em;
  line-height: 1.35;
}
.article ul,
.article ol { padding-left: 1.25em; }
.article li + li { margin-top: .45em; }
.article a { color: var(--c-600); }
.article img,
.article figure img { max-width: 100%; height: auto; border-radius: var(--radius-md); }
.article blockquote {
  margin: 1.6em 0;
  padding: 4px 0 4px 20px;
  border-left: 3px solid var(--c-400);
  color: #46586C;
}
.article figcaption {
  font-size: .84rem;
  color: #7B8CA1;
  margin-top: .6em;
  text-align: center;
}

.article-nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: clamp(34px, 4vw, 52px);
  padding-top: 26px;
  border-top: 1px solid var(--line);
}
.article-nav__next { text-align: right; }
.article-nav span {
  display: block;
  font-size: .76rem;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: #7B8CA1;
  margin-bottom: 6px;
  font-family: var(--font-head);
  font-weight: 600;
}
.article-nav a {
  color: var(--c-700);
  font-family: var(--font-head);
  font-weight: 600;
  font-size: .95rem;
  text-decoration: none;
  line-height: 1.4;
}
.article-nav a:hover { text-decoration: underline; }

.article-back { margin-top: 28px; }

@media (max-width: 1024px) {
  .news-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  .news-list { grid-template-columns: minmax(0, 1fr); }
  .article-nav { grid-template-columns: minmax(0, 1fr); }
  .article-nav__next { text-align: left; }
}

/* ---------- 视频列表的网格与卡片外壳（原先只在 product.css） ---------- */
.p-resources__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 26px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.p-resource {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s var(--ease);
}
.p-resource:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
  border-color: var(--c-200);
}
@media (max-width: 1024px) {
  .p-resources__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  .p-resources__grid { grid-template-columns: minmax(0, 1fr); gap: 18px; }
}

