/* ==========================================================================
   APEXAI 新闻中心 —— 列表页 / 详情页专用样式
   仅由 news/index.html 与新闻详情页引用，不参与站点其余页面加载。

   说明：
   1. 头部、导航、页脚统一复用站点 header.html / footer.html，样式来自 css.css
      与 media.css，此文件不再重复定义，避免与站点同名选择器互相覆盖。
   2. 断点与站点保持一致：1200 / 1240 / 900 / 600。
   3. body 的上边距、字体、全局重置由 css.css 负责，此处不再声明。
   ========================================================================== */

:root {
  --brand-blue: #103b95;
  --brand-cyan: #00a5ff;
  --ink: #333333;
  --line: #e5ebf3;
  --soft-blue: #f5f9ff;
}

/* 内容栅格：与站点 .wrapper2 的侧边距体系保持一致，保证与 logo、导航左边缘对齐 */
.shell {
  width: 1240px;
  max-width: 100%;
  margin: 0 auto;
  padding: 0;
}

/* 字体链修正
   ------------------------------------------------------------------
   站点 css.css 里写的是 * { font-family: HarmonyOS_Sans_SC }，而系统实际安装的
   字体族名是 HarmonyOS_Sans_SC_Regular / HarmonyOS_Sans_SC_Bold，两者不匹配，
   等于没有声明字体链，于是整页由浏览器回退字体渲染；粗体标题会回退到
   Microsoft YaHei 的 Bold 字面，而该字面缺少 U+00B7「·」字形，标题里的
   分隔点就会显示成方块（正文用的是常规字重，所以不受影响）。

   这里为新闻页显式声明一条能命中的字体链，并把实际含有 U+00B7 字形的字体
   （HarmonyOS / Arial 等）排在 Microsoft YaHei 之前，保证分隔点正常显示。 */
.news-list-page,
.news-list-page *,
.article-page,
.article-page * {
  font-family: HarmonyOS_Sans_SC_Regular, "HarmonyOS Sans SC", "PingFang SC",
    "Noto Sans SC", "Segoe UI", Arial, "Microsoft YaHei", sans-serif;
}

/* 图文基础表现：站点未对 img 设 display，此处局部声明 */
.news-list-page img,
.article-page img {
  display: block;
  max-width: 100%;
}

.news-list-page a,
.article-page a {
  color: inherit;
  text-decoration: none;
}

/* ==========================================================================
   列表页
   ========================================================================== */

.news-list-page {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: #ffffff url("../images/apex-news-scene.jpg") no-repeat center top / 100% 900px;
}

.page-hero {
  position: relative;
  min-height: 322px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: transparent;
}

.page-hero .shell {
  position: relative;
  z-index: 1;
  transform: translateY(-10px);
}

.page-hero h1 {
  display: inline-block;
  font-size: clamp(42px, 3.4vw, 50px);
  line-height: 1.18;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--brand-blue);
  background: linear-gradient(268deg, var(--brand-cyan) 0%, #3c60ac 70%, var(--brand-blue) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.news-section {
  position: relative;
  z-index: 2;
  margin-top: -34px;
  padding: 0 0 120px;
}

.news-section > .shell {
  position: relative;
  z-index: 1;
}

.featured-card {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(420px, 0.9fr);
  min-height: 400px;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 18px 55px rgba(35, 90, 167, 0.11);
  transition: transform 0.28s ease, box-shadow 0.28s ease;
}

.featured-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 70px rgba(35, 90, 167, 0.15);
}

.featured-card + .featured-card {
  margin-top: 34px;
}

.featured-card--reverse .featured-media {
  order: 2;
}

.featured-card--reverse .featured-content {
  order: 1;
}

.featured-media {
  position: relative;
  min-height: 400px;
  overflow: hidden;
  background: #eaf2fc;
}

.featured-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.featured-card:hover .featured-media img {
  transform: scale(1.018);
}

.featured-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 64%, rgba(4, 33, 91, 0.22) 100%);
}

.featured-content {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 52px 48px;
  background: linear-gradient(145deg, #ffffff 0%, #fbfdff 54%, #f2f7ff 100%);
}

.featured-content::before {
  content: "";
  position: absolute;
  top: 56px;
  left: 0;
  width: 4px;
  height: 64px;
  background: linear-gradient(180deg, var(--brand-cyan), var(--brand-blue));
}

.news-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
  color: #6d7784;
  font-size: 14px;
  letter-spacing: 0.03em;
}

.news-tag {
  padding: 6px 11px;
  color: var(--brand-blue);
  background: #edf5ff;
  border-radius: 2px;
  font-weight: 700;
}

.featured-content h3 {
  color: #16355f;
  font-size: 30px;
  line-height: 1.5;
  font-weight: 700;
}

.title-line {
  display: block;
}

.title-line + .title-line {
  margin-top: 2px;
}

.featured-content .summary {
  margin-top: 20px;
  color: #5e6875;
  font-size: 17px;
  line-height: 1.9;
}

.read-more {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  align-self: flex-start;
  margin-top: 34px;
  color: var(--brand-blue);
  font-size: 16px;
  font-weight: 700;
}

.read-more .arrow {
  position: relative;
  display: inline-block;
  width: 36px;
  height: 1px;
  background: var(--brand-blue);
  transition: width 0.2s ease;
}

.read-more .arrow::after {
  content: "";
  position: absolute;
  top: -3px;
  right: 0;
  width: 7px;
  height: 7px;
  border-top: 1px solid var(--brand-blue);
  border-right: 1px solid var(--brand-blue);
  transform: rotate(45deg);
}

.featured-card:hover .arrow {
  width: 46px;
}

/* ==========================================================================
   详情页
   ========================================================================== */

.article-page {
  padding: 58px 0 132px;
}

.breadcrumb {
  margin-bottom: 42px;
  color: #89919c;
  font-size: 14px;
}

.breadcrumb a:hover {
  color: var(--brand-blue);
}

.breadcrumb span {
  margin: 0 11px;
  color: #b2b8c1;
}

/* 末级「正文」由前一个分隔符的右间距撑开，不再重复加边距 */
.breadcrumb .crumb-current {
  margin: 0;
  color: inherit;
}

.article-header {
  width: min(920px, 100%);
  margin: 0 auto;
  text-align: center;
}

.article-header .news-meta {
  justify-content: center;
  margin-bottom: 26px;
}

.article-header h1 {
  color: #153660;
  font-size: clamp(34px, 3.2vw, 42px);
  line-height: 1.46;
  letter-spacing: 0.01em;
}

.article-deck {
  max-width: 760px;
  margin: 24px auto 0;
  color: #66717e;
  font-size: 18px;
  line-height: 1.85;
}

.article-rule {
  width: 64px;
  height: 3px;
  margin: 38px auto 0;
  background: linear-gradient(90deg, var(--brand-blue), var(--brand-cyan));
}

.article-cover {
  width: min(1060px, 100%);
  margin: 52px auto 58px;
}

.article-cover img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: 0 18px 50px rgba(29, 64, 111, 0.12);
}

.article-cover figcaption {
  margin-top: 14px;
  color: #89919c;
  font-size: 13px;
  line-height: 1.6;
  text-align: center;
}

.article-body {
  width: min(840px, 100%);
  margin: 0 auto;
  color: #3a424c;
  font-size: 18px;
  line-height: 2.06;
}

.article-body p {
  margin-bottom: 28px;
  text-align: justify;
}

.article-body .lead {
  color: #2e3946;
  font-size: 19px;
}

.article-body blockquote {
  position: relative;
  margin: 46px 0;
  padding: 32px 38px 32px 44px;
  color: #214878;
  background: linear-gradient(135deg, #f4f8ff 0%, #fbfdff 100%);
  border-left: 4px solid var(--brand-blue);
  font-size: 20px;
  line-height: 1.9;
  font-weight: 500;
}

.article-body blockquote p {
  margin: 0;
  text-align: left;
}

/* 站点全局禁用了文字选择，新闻正文需要允许选中复制 */
.article-body,
.article-body * {
  -webkit-user-select: text;
  -moz-user-select: text;
  -ms-user-select: text;
  user-select: text;
}

.about-company {
  margin-top: 60px;
  padding-top: 42px;
  border-top: 1px solid var(--line);
}

.about-company h2 {
  margin-bottom: 18px;
  color: var(--brand-blue);
  font-size: 28px;
  line-height: 1.4;
}

.back-row {
  width: min(840px, 100%);
  margin: 66px auto 0;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}

.back-row a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--brand-blue);
  font-size: 15px;
  font-weight: 700;
}

/* ==========================================================================
   焦点可见性
   ========================================================================== */

.news-list-page a:focus-visible,
.article-page a:focus-visible {
  outline: 3px solid rgba(0, 165, 255, 0.38);
  outline-offset: 4px;
}

/* ==========================================================================
   响应式
   ========================================================================== */

@media (max-width: 1240px) {
  .shell {
    width: 100%;
    padding: 0 calc(20 / 1240 * 100vw);
  }

  .featured-content {
    padding: 44px 40px;
  }

  .featured-content h3 {
    font-size: 28px;
  }
}

@media (max-width: 900px) {
  .page-hero {
    min-height: 292px;
  }

  .page-hero .shell {
    transform: translateY(-8px);
  }

  .page-hero h1 {
    font-size: 40px;
  }

  .news-section {
    margin-top: -28px;
    padding: 0 0 92px;
  }

  .featured-card {
    grid-template-columns: 1fr;
  }

  .featured-card--reverse .featured-media,
  .featured-card--reverse .featured-content {
    order: initial;
  }

  .featured-media {
    min-height: 0;
    aspect-ratio: 16 / 9;
  }

  .featured-content {
    padding: 40px 34px 44px;
  }

  .featured-content::before {
    top: 42px;
  }

  .article-page {
    padding: 46px 0 96px;
  }

  .article-cover {
    margin-top: 46px;
  }
}

@media (max-width: 600px) {
  .shell {
    padding: 0 calc(20 / 600 * 100vw);
  }

  .news-list-page {
    background-image: url("../images/apex-news-scene-mobile.jpg");
    background-position: 54% top;
    background-size: 100% auto;
  }

  .page-hero {
    min-height: 255px;
  }

  .page-hero .shell {
    transform: translateY(-5px);
  }

  .page-hero h1 {
    font-size: 36px;
  }

  .news-section {
    margin-top: -22px;
  }

  .featured-content {
    padding: 34px 26px 38px;
  }

  .featured-content::before {
    top: 34px;
    height: 52px;
  }

  .featured-content h3 {
    font-size: 25px;
  }

  .featured-content .summary {
    font-size: 16px;
  }

  .article-page {
    padding-top: 38px;
  }

  .breadcrumb {
    margin-bottom: 36px;
  }

  .article-header h1 {
    font-size: 28px;
    line-height: 1.5;
  }

  .article-deck {
    font-size: 16px;
  }

  .article-cover {
    margin: 38px auto 42px;
  }

  .article-cover img {
    border-radius: 4px;
  }

  .article-body {
    font-size: 17px;
    line-height: 1.95;
  }

  .article-body p {
    margin-bottom: 24px;
  }

  .article-body blockquote {
    margin: 36px 0;
    padding: 26px 22px 26px 26px;
    font-size: 17px;
  }

  .about-company h2 {
    font-size: 24px;
  }
}

/* ==========================================================================
   语言相关排版微调
   i18n.js 切换语言时会写入 body[data-lang]，据此微调中英文的排版差异
   ========================================================================== */

/* 英文两端对齐会产生过大的字间距，改为左对齐 */
body[data-lang="en"] .article-body p {
  text-align: left;
}

@media (min-width: 901px) {
  /* 英文标题较长，桌面端收一点字号，避免在重点卡片里占到四行 */
  body[data-lang="en"] .featured-content h3 {
    font-size: 27px;
    line-height: 1.45;
  }
}

@media (prefers-reduced-motion: reduce) {
  .news-list-page *,
  .news-list-page *::before,
  .news-list-page *::after,
  .article-page *,
  .article-page *::before,
  .article-page *::after {
    transition-duration: 0.01ms !important;
  }
}
