/* ============================================================
   News / Blog 页面样式（AnqiCMS article 模板）
   作用域：.news-page（article/index.html、article/list.html）
   ============================================================ */
.news-page {
  --np-teal: #009b91;
  --np-teal-dark: #007c74;
  --np-ink: #14252f;
  --np-muted: #5c6b77;
  --np-line: #e5ecf0;
  --np-canvas: #f4f7f8;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ---------- Banner ---------- */
.news-page .news-banner {
  position: relative;
  height: 337px;
  overflow: hidden;
  background: var(--np-ink);
}
.news-page .news-banner > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transform: scale(1.03);
  transition: transform 8s cubic-bezier(0.2, 0.7, 0.3, 1);
}
.news-page .news-banner:hover > img {
  transform: scale(1.0);
}
.news-page .news-banner::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(10, 24, 30, 0.58) 0%, rgba(10, 24, 30, 0.28) 55%, rgba(10, 24, 30, 0.08) 100%);
}
.news-page .news-banner-inner {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.news-page .news-banner-title {
  margin: 0 0 12px;
  font-family: 'Archivo', 'Arial Black', Arial, sans-serif;
  font-weight: 800;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.1;
  letter-spacing: 0.5px;
  color: #fff;
  text-transform: uppercase;
  opacity: 0;
  transform: translateY(24px);
  animation: newsBannerFadeUp 0.9s cubic-bezier(0.2, 0.7, 0.3, 1) 0.15s forwards;
}
.news-page .news-banner-title::after {
  content: "";
  display: block;
  width: 52px;
  height: 4px;
  margin-top: 16px;
  border-radius: 2px;
  background: var(--np-teal);
  transform: scaleX(0);
  transform-origin: left;
  animation: newsBannerLineGrow 0.7s cubic-bezier(0.2, 0.7, 0.3, 1) 0.8s forwards;
}
.news-page .news-banner-sub {
  margin: 14px 0 0;
  max-width: 620px;
  font-size: 16px;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.82);
  opacity: 0;
  transform: translateY(20px);
  animation: newsBannerFadeUp 0.9s cubic-bezier(0.2, 0.7, 0.3, 1) 0.45s forwards;
}

@keyframes newsBannerFadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes newsBannerLineGrow {
  to {
    transform: scaleX(1);
  }
}

/* ---------- 面包屑 ---------- */
.news-page .pd-breadcrumb {
  padding: 16px 0;
  font-size: 13.5px;
  color: #8a99a5;
  border-bottom: 1px solid var(--np-line);
}
.news-page .p_breadcrumbList {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.news-page .p_breadcrumbItem:not(:last-child)::after {
  content: "/";
  margin-left: 6px;
  color: #c3cfd6;
}
.news-page .p_breadcrumbItem a {
  color: #8a99a5;
  text-decoration: none;
  transition: color 0.25s;
}
.news-page .p_breadcrumbItem a:hover {
  color: var(--np-teal);
}
.news-page .p_breadcrumbItem[aria-current] {
  color: var(--np-ink);
  font-weight: 500;
}

/* ---------- 区块 ---------- */
.news-page .pd-section {
  padding: 64px 0;
  border-bottom: 0;
}
/* banner 也是 section，pd-section 从第 2 个 section 起算，偶数位上灰底 */
.news-page .pd-section:nth-of-type(odd) {
  background: var(--np-canvas);
}
.news-page .pd-title {
  margin: 0 0 8px;
  padding-bottom: 14px;
  font-family: 'Archivo', Arial, sans-serif;
  font-weight: 700;
  font-size: clamp(24px, 2.6vw, 32px);
  line-height: 1.2;
  letter-spacing: -0.4px;
  color: var(--np-ink);
}
.news-page .pd-title a {
  color: inherit;
  text-decoration: none;
  transition: color 0.25s;
}
.news-page .pd-title a:hover {
  color: var(--np-teal);
}
.news-page .pd-prose p {
  margin: 0 0 28px;
  font-size: 15px;
  line-height: 1.7;
  color: var(--np-muted);
}

/* ---------- 文章卡片网格 ---------- */
.news-page .p_list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 26px;
}
.news-page .p_loopitem {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--np-line);
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.35s cubic-bezier(0.2, 0.7, 0.3, 1),
              box-shadow 0.35s cubic-bezier(0.2, 0.7, 0.3, 1),
              border-color 0.35s;
}
.news-page .p_loopitem:hover {
  transform: translateY(-6px);
  border-color: #d3dfe4;
  box-shadow: 0 22px 46px -22px rgba(20, 37, 47, 0.3);
}

/* 封面 */
.news-page .p_thumb {
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #dfe7ea;
}
.news-page .p_thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.7s cubic-bezier(0.2, 0.7, 0.3, 1);
}
.news-page .p_loopitem:hover .p_thumb img {
  transform: scale(1.06);
}

/* 文本区 */
.news-page .p_meta {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  padding: 20px 22px 22px;
}
.news-page .p_postTitle {
  margin: 0 0 10px;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}
.news-page .p_postTitle a {
  font-family: 'Archivo', Arial, sans-serif;
  font-weight: 700;
  font-size: 18px;
  line-height: 1.4;
  letter-spacing: -0.2px;
  color: var(--np-ink);
  text-decoration: none;
  transition: color 0.25s;
}
.news-page .p_loopitem:hover .p_postTitle a {
  color: var(--np-teal);
}
.news-page .p_excerpt {
  margin: 0 0 16px;
  font-size: 14px;
  line-height: 1.65;
  color: var(--np-muted);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}
.news-page .p_meta .pd-btn {
  align-self: flex-start;
  margin-top: auto;
}

/* ---------- 按钮（覆盖 site.css 的蓝色，回归品牌青） ---------- */
.news-page .pd-btn {
  padding: 10px 22px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}
.news-page .pd-btn-primary,
.news-page .pd-btn-primary:visited {
  background: var(--np-teal);
  border-color: var(--np-teal);
  color: #fff;
}
.news-page .pd-btn-primary:hover {
  background: var(--np-teal-dark);
  border-color: var(--np-teal-dark);
  color: #fff;
}
.news-page .pd-btn-outline,
.news-page .pd-btn-outline:visited {
  background: transparent;
  border: 1px solid var(--np-teal);
  color: var(--np-teal);
}
.news-page .pd-btn-outline:hover {
  background: var(--np-teal);
  border-color: var(--np-teal);
  color: #fff;
}
.news-page .pd-btn-light,
.news-page .pd-btn-light:visited {
  background: #fff;
  border: 1px solid #fff;
  color: var(--np-teal);
}
.news-page .pd-btn-light:hover {
  background: #f0f9f8;
  color: var(--np-teal-dark);
}
.news-page .news-more {
  margin-top: 34px;
  text-align: center;
}

/* ---------- CTA 带 ---------- */
.news-page .pd-cta-band {
  background: linear-gradient(120deg, #009b91 0%, #007c74 100%);
  padding: 64px 0;
}
.news-page .pd-cta-band h2 {
  font-family: 'Archivo', Arial, sans-serif;
  font-weight: 700;
  letter-spacing: -0.3px;
}

/* ---------- 详情页 ---------- */
.news-page .news-banner--sm {
  height: 240px;
}
.news-page .pd-article-wrap {
  max-width: 860px;
}
.news-page .pd-lead p {
  font-size: 17px;
  line-height: 1.75;
  color: var(--np-muted);
}
/* 正文排版 */
.news-page .pd-article {
  margin-top: 26px;
  padding-top: 30px;
  border-top: 1px solid var(--np-line);
  font-size: 16px;
  line-height: 1.85;
  color: #33454f;
}
.news-page .pd-article p {
  margin: 0 0 20px;
}
.news-page .pd-article h2,
.news-page .pd-article h3,
.news-page .pd-article h4 {
  margin: 38px 0 16px;
  font-family: 'Archivo', Arial, sans-serif;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.2px;
  color: var(--np-ink);
}
.news-page .pd-article h2 { font-size: 26px; }
.news-page .pd-article h3 { font-size: 21px; }
.news-page .pd-article h4 { font-size: 18px; }
.news-page .pd-article h2:first-child,
.news-page .pd-article h3:first-child {
  margin-top: 0;
}
.news-page .pd-article ul,
.news-page .pd-article ol {
  margin: 0 0 20px;
  padding-left: 22px;
}
.news-page .pd-article li {
  margin-bottom: 10px;
  line-height: 1.75;
}
.news-page .pd-article ul li::marker {
  color: var(--np-teal);
}
.news-page .pd-article img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 26px auto;
  border-radius: 10px;
}
.news-page .pd-article a {
  color: var(--np-teal);
  text-decoration: none;
  border-bottom: 1px solid rgba(0, 155, 145, 0.35);
  transition: color 0.25s, border-color 0.25s;
}
.news-page .pd-article a:hover {
  color: var(--np-teal-dark);
  border-bottom-color: var(--np-teal-dark);
}
.news-page .pd-article blockquote {
  margin: 26px 0;
  padding: 18px 24px;
  border-left: 4px solid var(--np-teal);
  border-radius: 0 8px 8px 0;
  background: #f0f9f8;
  color: var(--np-muted);
}
.news-page .pd-article table {
  width: 100%;
  margin: 0 0 24px;
  border-collapse: collapse;
  font-size: 15px;
}
.news-page .pd-article th,
.news-page .pd-article td {
  padding: 12px 15px;
  border: 1px solid var(--np-line);
  text-align: left;
}
.news-page .pd-article th {
  background: var(--np-canvas);
  font-weight: 600;
  color: var(--np-ink);
}
/* 上一篇 / 下一篇 */
.news-page .pd-nav-section {
  padding: 40px 0;
}
.news-page .pd-nav-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
}

/* ---------- 响应式 ---------- */
@media (max-width: 1024px) {
  .news-page .p_list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
  }
}
@media (max-width: 768px) {
  .news-page .news-banner {
    height: 220px;
  }
  .news-page .news-banner--sm {
    height: 180px;
  }
  .news-page .news-banner-sub {
    font-size: 14px;
  }
  .news-page .pd-nav-bar {
    flex-wrap: wrap;
    justify-content: center;
  }
  .news-page .pd-article h2 { font-size: 22px; }
  .news-page .pd-article h3 { font-size: 19px; }
}
@media (max-width: 640px) {
  .news-page .p_list {
    grid-template-columns: 1fr;
  }
  .news-page .pd-section {
    padding: 44px 0;
  }
  .news-page .news-banner {
    height: 200px;
  }
  .news-page .news-banner--sm {
    height: 170px;
  }
  .news-page .news-banner-sub {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
  }
  .news-page .pd-btn {
    width: auto;
  }
}
