/* ==========================================================================
   拓冰网站优化 - 组件库
   风格：汽车改装风 · 碳纤维卡片 + 红色高亮 + 金属切边
   ========================================================================== */

/* ---------- 通用卡片 ---------- */
.card {
  background: var(--carbon-texture), linear-gradient(160deg, var(--carbon-3) 0%, var(--carbon) 100%);
  border: 1px solid var(--carbon-line);
  border-radius: var(--r-md);
  padding: 32px;
  transition: all 0.35s ease;
  position: relative;
  overflow: hidden;
}

.card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 3px;
  height: 100%;
  background: var(--red);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 0.35s ease;
}

.card:hover {
  border-color: rgba(228, 0, 16, 0.4);
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.card:hover::before {
  transform: scaleY(1);
}

/* ---------- 通用网格 ---------- */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

/* ---------- 数据指标卡（仪表盘风格） ---------- */
.metric-card {
  background: var(--carbon-texture), linear-gradient(160deg, var(--carbon-3), var(--carbon));
  border: 1px solid var(--carbon-line);
  border-radius: var(--r-md);
  padding: 28px 24px;
  text-align: center;
  transition: all 0.35s ease;
  position: relative;
  overflow: hidden;
}

.metric-card::after {
  content: "";
  position: absolute;
  right: -20px;
  bottom: -20px;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--red-glow) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.35s ease;
}

.metric-card:hover {
  border-color: var(--red);
  transform: translateY(-4px);
}

.metric-card:hover::after {
  opacity: 1;
}

.metric-card .num {
  font-size: 40px;
  font-weight: 800;
  color: var(--red-bright);
  font-family: var(--font-en);
  letter-spacing: 1px;
  line-height: 1;
  text-shadow: 0 0 20px var(--red-glow);
}

.metric-card .label {
  margin-top: 10px;
  font-size: 13px;
  color: var(--silver-2);
  letter-spacing: 0.5px;
}

/* ---------- 资讯列表项 ---------- */
.news-item {
  display: flex;
  gap: 22px;
  background: var(--carbon-texture), linear-gradient(160deg, var(--carbon-3), var(--carbon));
  border: 1px solid var(--carbon-line);
  border-radius: var(--r-md);
  overflow: hidden;
  transition: all 0.35s ease;
  margin-bottom: 22px;
}

.news-item:hover {
  border-color: rgba(228, 0, 16, 0.4);
  transform: translateX(6px);
  box-shadow: var(--shadow-md);
}

.news-item .n-thumb {
  flex-shrink: 0;
  width: 220px;
  position: relative;
  overflow: hidden;
}

.news-item .n-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.news-item:hover .n-thumb img {
  transform: scale(1.08);
}

.news-item .n-thumb::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 4px;
  height: 100%;
  background: var(--red);
}

.news-item .n-body {
  padding: 22px 24px;
  flex: 1;
  min-width: 0;
}

.news-item .n-body h4 {
  font-size: 17px;
  color: var(--ink);
  margin-bottom: 8px;
  transition: color 0.25s ease;
}

.news-item:hover .n-body h4 {
  color: var(--red-bright);
}

.news-item .n-excerpt {
  font-size: 13.5px;
  color: var(--silver-2);
  line-height: 1.7;
  margin-bottom: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-item .n-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12.5px;
}

.news-item .n-foot .date {
  color: var(--muted);
  font-family: var(--font-en);
  letter-spacing: 1px;
}

.news-item .n-foot .read {
  color: var(--red-bright);
  font-weight: 600;
}

/* ---------- 资讯列表包装（首页多条） ---------- */
.news-list {
  margin-bottom: 22px;
}

/* ---------- 资讯迷你项（侧边栏） ---------- */
.news-mini {
  margin-bottom: 14px;
}

.mini-item {
  display: flex;
  gap: 12px;
  padding: 10px;
  border-radius: var(--r-sm);
  transition: background 0.25s ease;
}

.mini-item:hover {
  background: var(--carbon-3);
}

.mini-item .m-thumb {
  flex-shrink: 0;
  width: 84px;
  height: 64px;
  border-radius: var(--r-sm);
  overflow: hidden;
}

.mini-item .m-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mini-item .m-body {
  flex: 1;
  min-width: 0;
}

.mini-item .m-body h5 {
  font-size: 13px;
  color: var(--ink);
  line-height: 1.5;
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.25s ease;
}

.mini-item:hover .m-body h5 {
  color: var(--red-bright);
}

.mini-item .m-date {
  font-size: 11px;
  color: var(--muted);
  font-family: var(--font-en);
}

/* ---------- 侧边栏卡片 ---------- */
.side-card {
  background: var(--carbon-texture), linear-gradient(160deg, var(--carbon-3), var(--carbon));
  border: 1px solid var(--carbon-line);
  border-radius: var(--r-md);
  padding: 22px;
  margin-bottom: 22px;
}

.side-card h4 {
  font-size: 15px;
  color: var(--silver-bright);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--carbon-line);
  letter-spacing: 1px;
}

/* ---------- 资讯页网格布局 ---------- */
.news-page-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 32px;
  align-items: start;
}

.news-page-main {
  min-width: 0;
}

.news-side {
  position: sticky;
  top: 20px;
}

/* ---------- 面包屑下分隔 ---------- */
.breadcrumb + .news-page-grid,
.breadcrumb + * {
  margin-top: 8px;
}

/* ---------- 文章详情 ---------- */
.article-wrap {
  background: var(--carbon-texture), linear-gradient(160deg, var(--carbon-3), var(--carbon));
  border: 1px solid var(--carbon-line);
  border-radius: var(--r-md);
  padding: 40px;
  position: relative;
}

.article-wrap::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(180deg, var(--red) 0%, transparent 100%);
  border-radius: var(--r-md) 0 0 var(--r-md);
}

.article-head h1 {
  font-size: 28px;
  color: var(--ink);
  margin-bottom: 16px;
  line-height: 1.4;
}

.article-meta {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--muted);
  padding-bottom: 20px;
  border-bottom: 1px solid var(--carbon-line);
  margin-bottom: 24px;
}

.article-meta span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.article-meta svg {
  stroke: var(--red-bright);
}

.article-content {
  font-size: 15px;
  line-height: 1.9;
  color: var(--body);
}

.article-content img {
  border-radius: var(--r-md);
  margin-bottom: 24px;
  border: 1px solid var(--carbon-line);
}

.article-content p {
  margin-bottom: 18px;
}

.article-content h2,
.article-content h3 {
  color: var(--ink);
  margin: 28px 0 14px;
}

.article-foot {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--carbon-line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.article-tags {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.article-tags a {
  font-size: 12.5px;
  color: var(--silver-2);
  padding: 5px 14px;
  background: var(--carbon-3);
  border: 1px solid var(--carbon-line);
  border-radius: var(--r-pill);
  transition: all 0.25s ease;
}

.article-tags a:hover {
  background: var(--red-deep);
  border-color: var(--red);
  color: #fff;
}

/* ---------- 通用图标圆（服务/优势） ---------- */
.icon-ring {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle, rgba(228, 0, 16, 0.15) 0%, transparent 70%);
  border: 1px solid rgba(228, 0, 16, 0.3);
  margin-bottom: 18px;
}

/* ---------- 标签徽章 ---------- */
.badge-tag {
  display: inline-block;
  position: absolute;
  top: 14px;
  left: 14px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  color: #fff;
  padding: 5px 12px;
  background: linear-gradient(135deg, var(--red), var(--red-deep));
  border-radius: var(--r-pill);
  text-transform: uppercase;
  font-family: var(--font-en);
  z-index: 2;
}

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
  .news-page-grid {
    grid-template-columns: 1fr;
  }
  .news-side {
    position: static;
  }
  .news-item {
    flex-direction: column;
  }
  .news-item .n-thumb {
    width: 100%;
    height: 200px;
  }
  .article-wrap {
    padding: 26px;
  }
  .article-head h1 {
    font-size: 22px;
  }
}

@media (max-width: 560px) {
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }
}
