/* ===== Cards CSS v2 ===== */

/* 全站卡片圆角统一 4px（按钮/药丸/圆形除外） */
.case-card,
.solution-card,
.algo-card,
.news-item,
.home-sol-card,
.home-news-card,
.ph-ip-card,
.ph-trio-card,
.ph-series-card--link,
.ph-series-media,
.cs-page .case-card,
.cs-page .cs-ind-card,
.cs-page .cs-bench-card,
.ai-page .honor-card,
.ai-page .tl-hist__card,
.ai-page .tl-hist__card-inner {
  border-radius: var(--av-radius-card, 4px);
}

/* ----- Unified chip：了解更多 / 查看全部 / 查看详情（无箭头） ----- */
.view-all,
.more-link,
.news-item .more,
.nw-page .news-item .more,
.cs-page .view-all,
.cs-page .case-detail,
.home-section-foot .view-all,
.home-news-footer .view-all,
.home-products-all,
.home-cases-feature-link,
.ps-card-cta,
.pd-page .pd-case-link,
.ai-page .section-head .view-all,
.iv-page .investor-card .view-all,
.fq-page .faq-card .more,
.cs-page.cs-detail .results-more a,
.cs-page.cs-detail .case-product-more,
.cs-page.cs-detail .case-sol-item__more,
.sol-product-more,
.sol-detail-page #cases .sol-case-item__more,
.sol-algo-more,
.sol-hub-view-all .view-all {
  display: inline-flex !important;
  align-items: center;
  align-self: flex-start;
  width: fit-content !important;
  max-width: 100%;
  box-sizing: border-box;
  gap: 0;
  padding: 6px 12px !important;
  background: #e2e8f0 !important;
  border-radius: 4px !important;
  /* caption 13 via type tokens — no hard 12px readable UI */
  font-size: var(--av-fs-caption, 13px);
  font-weight: var(--av-fw-regular, 400);
  color: var(--av-color-body, #404040);
  text-decoration: none !important;
  line-height: 1.4;
  white-space: nowrap;
  border: none !important;
  box-shadow: none !important;
  transition: background 0.2s, color 0.2s;
}
.view-all:hover,
.more-link:hover,
.news-item:hover .more,
.nw-page .news-item:hover .more,
.cs-page .view-all:hover,
.cs-page a.case-card:hover .case-detail,
.cs-page .case-detail:hover,
.home-section-foot .view-all:hover,
.home-news-footer .view-all:hover,
.home-products-all:hover,
.home-cases-feature-card:hover .home-cases-feature-link,
.ps-card:hover .ps-card-cta,
.pd-page .pd-case-card:hover .pd-case-link,
.ai-page .section-head .view-all:hover,
.iv-page .investor-card .view-all:hover,
.fq-page .faq-card .more:hover,
.cs-page.cs-detail .results-more a:hover,
.cs-page.cs-detail a:hover .case-product-more,
.cs-page.cs-detail .case-sol-item:hover .case-sol-item__more,
.sol-product-card:hover .sol-product-more,
.sol-detail-page #cases .sol-case-item:hover .sol-case-item__more,
.sol-algo-card:hover .sol-algo-more,
.sol-hub-view-all .view-all:hover {
  background: #cbd5e1 !important;
  color: var(--av-color-body, #404040);
  text-decoration: none !important;
}
.cs-page .view-all-wrap { display: flex; justify-content: flex-end; margin-top: 28px; }
.cs-page .view-all.is-pending,
.cs-page .case-detail--disabled {
  opacity: 0.65;
  cursor: not-allowed;
}
.cs-page .case-detail--disabled:hover {
  background: #e2e8f0 !important;
  color: var(--av-color-body, #404040);
  text-decoration: none !important;
}

/* ----- News cards ----- */
.news-list { list-style: none; padding: 0; margin: 0; }
.news-item { position: relative; display: flex; gap: 28px; align-items: center; min-height: 0; height: auto; text-decoration: none; color: inherit; background: #fff; border: 1px solid rgba(15,23,42,0.08); border-radius: 4px; padding: 18px; margin-bottom: 30px; transition: all 0.25s; }
.news-item:hover { transform: translateY(-4px); box-shadow: 0 12px 32px rgba(15,23,42,0.1); border-color: rgba(195,13,35,0.35); }
.news-item .thumb { flex: 0 0 38%; width: 38%; max-width: 420px; aspect-ratio: 16 / 9; height: auto; border-radius: 4px; overflow: hidden; position: relative; background: #f0f2f6; }
.news-item .thumb img { width: 100%; height: 100%; object-fit: contain; object-position: center; display: block; background: #f0f2f6; }
.news-item .content { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; }
.news-item .cat-tag { align-self: flex-start; padding: 3px 11px; border-radius: 4px; margin-bottom: 10px; }
.news-item .cat-tag.cat-type1 { color: #a3000f; background: rgba(195,13,35,0.08); }
.news-item .cat-tag.cat-type2 { color: #0369a1; background: rgba(14,165,233,0.08); }
.news-item .cat-tag.cat-type3 { color: #047857; background: rgba(16,185,129,0.08); }
.news-item .date { order: 3; margin-top: 10px; margin-bottom: 0; }
.news-item .title { order: 1; line-height: 1.45; margin-bottom: 10px; transition: color 0.2s; }
.news-item .desc { order: 2; line-height: 1.7; margin-bottom: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.news-item .more { position: absolute; right: 18px; bottom: 18px; /* chip base in unified block above */ }
.news-item:hover .more { /* chip hover in unified block above */ }

/* ----- Case cards ----- */
.case-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: 20px; }
.case-card { background: #fff; border: 1px solid rgba(15,23,42,0.08); border-radius: 4px; overflow: hidden; transition: all 0.3s; display: flex; flex-direction: column; text-decoration: none; color: inherit; }
.case-card:hover { border-color: rgba(195,13,35,0.35); transform: translateY(-4px); box-shadow: 0 12px 32px rgba(15,23,42,0.1); }
.case-img { width: 100%; aspect-ratio: 16 / 10; height: auto; position: relative; display: flex; align-items: flex-start; justify-content: flex-end; padding: 14px 16px; background-size: contain; background-position: center; background-repeat: no-repeat; background-color: #f0f2f6; }
.case-img::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(15,23,42,0.02) 0%, rgba(15,23,42,0.12) 100%); pointer-events: none; }
.case-tag { position: relative; z-index: 1; color: #fff; background: rgba(0,0,0,0.35); padding: 4px 10px; border-radius: 4px; backdrop-filter: blur(2px); }
.case-body { padding: 18px 20px 20px; display: flex; flex-direction: column; flex: 1; }
.case-title { margin-bottom: 8px; line-height: 1.4; }
.case-desc { line-height: 1.65; margin-bottom: 16px; flex: 1; }
.case-meta { display: flex; align-items: center; justify-content: space-between; padding-top: 12px; border-top: 1px solid rgba(15,23,42,0.06); }
.type-badge { padding: 3px 10px; border-radius: 4px; }
.type-ai { background: #e0f2fe; color: #0369a1; }
.type-av { background: #fdeaea; color: #c2000e; }
.case-detail { /* chip base in unified block above */ }
.case-detail:hover { /* chip hover in unified block above */ }

/* ----- Solution cards ----- */
.solution-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.solution-card { background: #fff; border: 1px solid rgba(15,23,42,0.08); border-radius: 4px; padding: 26px; transition: all 0.25s; text-decoration: none; color: inherit; display: block; }
.solution-card:hover { box-shadow: 0 12px 32px rgba(15,23,42,0.1); transform: translateY(-4px); border-color: rgba(195,13,35,0.35); }
.solution-card .sc-icon { width: 48px; height: 48px; border-radius: 4px; background: rgba(195,13,35,0.08); display: flex; align-items: center; justify-content: center; color: #c30d23; font-size: 20px; margin-bottom: 16px; }
.solution-card h4 { margin-bottom: 8px; /* card title via type-v2 */ }
.solution-card p { line-height: 1.7; margin-bottom: 16px; /* card sub via type-v2 */ }
.solution-card .sc-link { color: #c30d23; /* size/weight via btn/body tokens */ }

/* ----- Algo cards ----- */
.algo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.algo-card { background: #ffffff; border: 1px solid rgba(15,23,42,0.08); border-radius: 4px; overflow: hidden; transition: all 0.3s; display: flex; flex-direction: column; cursor: pointer; text-decoration: none; color: inherit; }
.algo-card:hover { border-color: rgba(195,13,35,0.35); background: #fff; transform: translateY(-4px); box-shadow: 0 12px 32px rgba(15,23,42,0.1); }
.algo-card .card-img { width: 100%; aspect-ratio: 16 / 10; height: auto; display: flex; align-items: flex-start; justify-content: flex-end; padding: 14px 16px; border-bottom: 1px solid rgba(15,23,42,0.06); background-size: contain; background-position: center; background-repeat: no-repeat; background-color: #f0f2f6; position: relative; }
.algo-card .card-img::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(15,23,42,0.02) 0%, rgba(15,23,42,0.12) 100%); pointer-events: none; }
.algo-card .card-body { padding: 16px 20px 20px; display: flex; flex-direction: column; flex: 1; }
.algo-card .card-title { line-height: 1.4; margin-bottom: 8px; }
.algo-card .card-desc { line-height: 1.6; margin-bottom: 12px; flex: 1; }
.algo-card .card-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.algo-card .tag-item { padding: 3px 10px; border-radius: 4px; background: #f1f5f9; border: 1px solid rgba(15,23,42,0.08); }
.algo-card .card-footer { display: flex; justify-content: space-between; align-items: center; padding-top: 10px; border-top: 1px solid rgba(15,23,42,0.06); }
.algo-card .card-scene { /* caption via type-v2 / inherit */ }

/* ----- Responsive ----- */
@media (max-width: 900px) {
  .news-item { flex-direction: column; gap: 14px; padding: 14px; height: auto; }
  .news-item .thumb { flex: none; width: 100%; max-width: none; aspect-ratio: 16 / 9; height: auto; }
  .solution-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .case-grid, .algo-grid { grid-template-columns: 1fr; }
  .solution-grid { grid-template-columns: 1fr; }
  .news-item .more { position: static; margin-top: 12px; }
}

/* av-fold-mobile */
/* Dual/triple fold (Mate XT unfolded CSS size, or a hinge). Excludes 1920 desktop and 1440x900 laptop. */
@media (min-width: 1200px) and (max-width: 1650px) and (min-aspect-ratio: 4/3) and (max-aspect-ratio: 29/20),
       (min-width: 769px) and (max-width: 1199px) and (max-aspect-ratio: 3/2),
       (min-width: 769px) and (max-width: 1200px) and (max-aspect-ratio: 3/4),
       (spanning: single-fold-vertical),
       (spanning: single-fold-horizontal),
       (horizontal-viewport-segments: 2),
       (horizontal-viewport-segments: 3),
       (vertical-viewport-segments: 2),
       (vertical-viewport-segments: 3) {

  .news-item { flex-direction: column; gap: 14px; padding: 14px; height: auto; }
  .news-item .thumb { flex: none; width: 100%; max-width: none; aspect-ratio: 16 / 9; height: auto; }
  .solution-grid { grid-template-columns: repeat(2, 1fr); }


  .case-grid, .algo-grid { grid-template-columns: 1fr; }
  .solution-grid { grid-template-columns: 1fr; }
  .news-item .more { position: static; margin-top: 12px; }
}
