/* ============================================================
 * news.css
 * 上海禹亮信息科技有限公司 - 新闻动态列表与详情页专属样式
 * 设计语言完全对齐 service.css / company.css / about.css
 * ============================================================ */

#news_page {
  --nws-bg: #ffffff;
  --nws-bg-2: #f8fafc;
  --nws-bg-3: #f1f5f9;
  --nws-surface: #ffffff;
  --nws-border: #e2e8f0;
  --nws-border-strong: rgba(0,212,255,0.4);
  --nws-text: #1e293b;
  --nws-text-2: #334155;
  --nws-text-3: #475569;
  --nws-text-4: #94a3b8;
  --nws-accent: #00d4ff;
  --nws-accent-2: #0ea5e9;
  --nws-accent-soft: rgba(0,212,255,0.08);
  --nws-radius: 12px;
  --nws-radius-lg: 16px;
  --nws-shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.05);
  --nws-shadow-md: 0 4px 16px rgba(15, 23, 42, 0.08);
  --nws-shadow-lg: 0 12px 32px rgba(15, 23, 42, 0.10);
  --nws-shadow-glow: 0 8px 28px rgba(0, 212, 255, 0.16);

  background: var(--nws-bg-2);
  color: var(--nws-text);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC",
               "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  line-height: 1.7;
  letter-spacing: 0.01em;
  padding-bottom: 80px;
  /* 防溢出 - 强制让 news_page 不会被内部元素撑破视口 */
  max-width: 100vw;
  overflow-x: hidden;
  box-sizing: border-box;
}

/* 全局盒模型重置 - 让所有子元素的 width/padding 计算更可控 */
#news_page,
#news_page *,
#news_page *::before,
#news_page *::after {
  box-sizing: border-box;
}

/* 文章正文图片防溢出 */
#news_page .nws_article_body img,
#news_page .nws_article_body video,
#news_page .nws_article_body iframe {
  max-width: 100%;
  height: auto;
}

/* 文章正文表格强制限宽 */
#news_page .nws_article_body table {
  max-width: 100%;
  display: block;
  overflow-x: auto;
}

#news_page .containe {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

/* 通用 eyebrow */
#news_page .svc_eyebrow {
  display: inline-block;
  font-size: 12px;
  letter-spacing: 0.25em;
  color: var(--nws-accent);
  font-weight: 600;
  margin-bottom: 14px;
  padding: 6px 14px;
  background: var(--nws-accent-soft);
  border-radius: 4px;
}


/* ============ 面包屑 ============ */
#news_page .nws_crumb {
  background: var(--nws-bg);
  border-bottom: 1px solid var(--nws-border);
  padding: 18px 0;
  font-size: 13.5px;
}
#news_page .nws_crumb .containe {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  overflow: hidden;
}
#news_page .nws_crumb a {
  color: var(--nws-text-3);
  text-decoration: none;
  transition: color 0.2s ease;
  flex-shrink: 0;
  white-space: nowrap;
}
#news_page .nws_crumb a:hover {
  color: var(--nws-accent);
}
#news_page .nws_crumb .sep {
  margin: 0 10px;
  color: var(--nws-text-4);
  flex-shrink: 0;
}
#news_page .nws_crumb .current {
  color: var(--nws-text);
  font-weight: 500;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}


/* ============ 整体两栏布局 ============ */
#news_page .nws_main {
  padding: 48px 0 0;
}
#news_page .nws_layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 36px;
  align-items: flex-start;
}


/* ============ 左侧：新闻列表 ============ */
#news_page .nws_content {
  background: var(--nws-surface);
  border: 1px solid var(--nws-border);
  border-radius: var(--nws-radius-lg);
  padding: 40px 40px 32px;
  box-shadow: var(--nws-shadow-sm);
}

#news_page .nws_section_head {
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--nws-border);
}
#news_page .nws_section_title {
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 700;
  margin: 0 0 8px;
  color: var(--nws-text);
  letter-spacing: -0.01em;
}
#news_page .nws_section_desc {
  font-size: 14.5px;
  color: var(--nws-text-3);
  margin: 0;
}


/* 新闻列表 item */
#news_page .nws_list {
  list-style: none;
  margin: 0;
  padding: 0;
}
#news_page .nws_item {
  border-bottom: 1px solid var(--nws-border);
  transition: background 0.25s ease;
}
#news_page .nws_item:last-child {
  border-bottom: 0;
}
#news_page .nws_item:hover {
  background: var(--nws-bg-2);
}

#news_page .nws_item_link {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 28px;
  padding: 24px 0;
  text-decoration: none;
  color: inherit;
}

#news_page .nws_item_thumb {
  width: 220px;
  height: 140px;
  border-radius: var(--nws-radius);
  overflow: hidden;
  background: var(--nws-bg-3);
  position: relative;
}
#news_page .nws_item_thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
#news_page .nws_item:hover .nws_item_thumb img {
  transform: scale(1.06);
}

#news_page .nws_item_body {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-width: 0;
}

#news_page .nws_item_meta {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 10px;
  font-size: 13px;
  color: var(--nws-text-4);
}
#news_page .nws_item_date {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
#news_page .nws_item_date i.iconfont {
  font-size: 13px;
}
#news_page .nws_item_tag {
  display: inline-block;
  padding: 2px 10px;
  font-size: 12px;
  color: var(--nws-accent);
  background: var(--nws-accent-soft);
  border-radius: 999px;
}

#news_page .nws_item_title {
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 8px;
  color: var(--nws-text);
  line-height: 1.5;
  letter-spacing: -0.005em;
  /* 标题最多 2 行 */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.25s ease;
}
#news_page .nws_item:hover .nws_item_title {
  color: var(--nws-accent);
}

#news_page .nws_item_desc {
  font-size: 14px;
  color: var(--nws-text-3);
  line-height: 1.7;
  margin: 0 0 12px;
  /* 摘要最多 2 行 */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

#news_page .nws_item_more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--nws-accent);
  transition: gap 0.25s ease;
}
#news_page .nws_item_more svg {
  width: 14px;
  height: 14px;
  transition: transform 0.25s ease;
}
#news_page .nws_item:hover .nws_item_more {
  gap: 10px;
}


/* 列表为空 */
#news_page .nws_empty {
  padding: 80px 20px;
  text-align: center;
  color: var(--nws-text-3);
}
#news_page .nws_empty_icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 20px;
  color: var(--nws-text-4);
  opacity: 0.6;
}
#news_page .nws_empty_icon svg {
  width: 100%;
  height: 100%;
}
#news_page .nws_empty h4 {
  font-size: 17px;
  font-weight: 600;
  color: var(--nws-text-2);
  margin: 0 0 8px;
}
#news_page .nws_empty p {
  font-size: 14px;
  margin: 0;
}
#news_page .nws_empty p a {
  color: var(--nws-accent);
  text-decoration: none;
}
#news_page .nws_empty p a:hover {
  text-decoration: underline;
}


/* ============ 分页 ============ */
#news_page .nws_pagination {
  margin-top: 40px;
  padding-top: 28px;
  border-top: 1px solid var(--nws-border);
  text-align: center;
}
#news_page .nws_pagination .page {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
}
#news_page .nws_pagination a,
#news_page .nws_pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 12px;
  font-size: 14px;
  color: var(--nws-text-2);
  background: var(--nws-surface);
  border: 1px solid var(--nws-border);
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.2s ease;
}
#news_page .nws_pagination a:hover {
  color: var(--nws-accent);
  border-color: var(--nws-border-strong);
}
#news_page .nws_pagination .pageinfo,
#news_page .nws_pagination strong,
#news_page .nws_pagination .current {
  background: linear-gradient(135deg, var(--nws-accent) 0%, var(--nws-accent-2) 100%);
  color: #ffffff;
  border-color: transparent;
}


/* ============ 右侧：侧边栏 ============ */
#news_page .nws_sidebar {
  display: flex;
  flex-direction: column;
  gap: 24px;
  position: sticky;
  top: 80px;
}

#news_page .nws_widget {
  background: var(--nws-surface);
  border: 1px solid var(--nws-border);
  border-radius: var(--nws-radius);
  padding: 24px 22px;
  box-shadow: var(--nws-shadow-sm);
}
#news_page .nws_widget_head {
  display: flex;
  align-items: center;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--nws-border);
}
#news_page .nws_widget_head h4 {
  font-size: 16px;
  font-weight: 700;
  margin: 0;
  color: var(--nws-text);
  position: relative;
  padding-left: 12px;
}
#news_page .nws_widget_head h4::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 16px;
  background: linear-gradient(180deg, var(--nws-accent) 0%, var(--nws-accent-2) 100%);
  border-radius: 2px;
}

/* 侧边栏 - 关于禹亮导航 */
#news_page .nws_widget_nav {
  list-style: none;
  margin: 0;
  padding: 0;
}
#news_page .nws_widget_nav li {
  border-bottom: 1px solid var(--nws-border);
}
#news_page .nws_widget_nav li:last-child {
  border-bottom: 0;
}
#news_page .nws_widget_nav li a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 4px;
  font-size: 14.5px;
  color: var(--nws-text-2);
  text-decoration: none;
  transition: all 0.25s ease;
}
#news_page .nws_widget_nav li a .arr {
  font-style: normal;
  color: var(--nws-text-4);
  font-size: 14px;
  transition: transform 0.25s ease, color 0.25s ease;
}
#news_page .nws_widget_nav li a:hover {
  color: var(--nws-accent);
  padding-left: 8px;
}
#news_page .nws_widget_nav li a:hover .arr {
  color: var(--nws-accent);
  transform: translateX(4px);
}
#news_page .nws_widget_nav li.active a {
  color: var(--nws-accent);
  font-weight: 600;
}
#news_page .nws_widget_nav li.active a .arr {
  color: var(--nws-accent);
}

/* 侧边栏 - 热门推荐 */
#news_page .nws_widget_hot {
  list-style: none;
  margin: 0;
  padding: 0;
}
#news_page .nws_widget_hot li {
  margin-bottom: 14px;
}
#news_page .nws_widget_hot li:last-child {
  margin-bottom: 0;
}
#news_page .nws_widget_hot li a {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 12px;
  text-decoration: none;
  color: inherit;
  transition: transform 0.25s ease;
}
#news_page .nws_widget_hot li a:hover {
  transform: translateX(2px);
}
#news_page .nws_widget_hot .hot_thumb {
  width: 88px;
  height: 64px;
  border-radius: 8px;
  overflow: hidden;
  background: var(--nws-bg-3);
}
#news_page .nws_widget_hot .hot_thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
#news_page .nws_widget_hot .hot_body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 2px 0;
}
#news_page .nws_widget_hot .hot_body h5 {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--nws-text);
  margin: 0 0 6px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.25s ease;
}
#news_page .nws_widget_hot li a:hover .hot_body h5 {
  color: var(--nws-accent);
}
#news_page .nws_widget_hot .hot_date {
  font-size: 12px;
  color: var(--nws-text-4);
}

/* 侧边栏 - 联系咨询 CTA */
#news_page .nws_widget_cta {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  border-color: transparent;
  color: #ffffff;
  position: relative;
  overflow: hidden;
}
#news_page .nws_widget_cta::before {
  content: "";
  position: absolute;
  top: -40%;
  right: -40%;
  width: 280px;
  height: 280px;
  background: radial-gradient(circle, rgba(0,212,255,0.22) 0%, rgba(0,212,255,0) 60%);
  pointer-events: none;
}
#news_page .nws_widget_cta .nws_cta_eyebrow {
  position: relative;
  display: inline-block;
  font-size: 11px;
  letter-spacing: 0.25em;
  color: var(--nws-accent);
  font-weight: 600;
  margin-bottom: 12px;
  padding: 4px 10px;
  background: rgba(0,212,255,0.12);
  border-radius: 4px;
}
#news_page .nws_widget_cta h4 {
  position: relative;
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 10px;
  color: #ffffff;
}
#news_page .nws_widget_cta p {
  position: relative;
  font-size: 13.5px;
  color: rgba(255,255,255,0.72);
  margin: 0 0 18px;
  line-height: 1.7;
}
#news_page .nws_cta_btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px 20px;
  background: linear-gradient(135deg, var(--nws-accent) 0%, var(--nws-accent-2) 100%);
  color: #ffffff;
  border-radius: 8px;
  font-size: 14.5px;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(0, 212, 255, 0.25);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  box-sizing: border-box;
}
#news_page .nws_cta_btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 212, 255, 0.32);
}
#news_page .nws_cta_btn i.iconfont {
  font-size: 16px;
}


/* ============================================================
 * 详情页样式
 * ============================================================ */

#news_page .nws_article_head {
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--nws-border);
}
#news_page .nws_article_title {
  font-size: clamp(22px, 2.6vw, 30px);
  font-weight: 700;
  margin: 0 0 16px;
  color: var(--nws-text);
  line-height: 1.4;
  letter-spacing: -0.01em;
}
#news_page .nws_article_meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 18px;
  font-size: 13px;
  color: var(--nws-text-4);
}
#news_page .nws_article_meta .meta_item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
#news_page .nws_article_meta .meta_item i.iconfont {
  font-size: 13px;
}
#news_page .nws_article_subtitle {
  margin-top: 16px;
  padding: 14px 18px;
  background: var(--nws-bg-2);
  border-left: 3px solid var(--nws-accent);
  border-radius: 0 8px 8px 0;
  font-size: 14.5px;
  color: var(--nws-text-2);
  line-height: 1.7;
}

/* 文章正文 */
#news_page .nws_article_body {
  font-size: 15.5px;
  color: var(--nws-text-2);
  line-height: 1.9;
  word-break: break-word;
}
#news_page .nws_article_body p {
  margin: 0 0 18px;
}
#news_page .nws_article_body h2 {
  font-size: 22px;
  font-weight: 700;
  margin: 36px 0 18px;
  color: var(--nws-text);
  letter-spacing: -0.01em;
  position: relative;
  padding-left: 14px;
}
#news_page .nws_article_body h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 22px;
  background: linear-gradient(180deg, var(--nws-accent) 0%, var(--nws-accent-2) 100%);
  border-radius: 2px;
}
#news_page .nws_article_body h3 {
  font-size: 18px;
  font-weight: 700;
  margin: 28px 0 14px;
  color: var(--nws-text);
}
#news_page .nws_article_body h4 {
  font-size: 16px;
  font-weight: 700;
  margin: 22px 0 12px;
  color: var(--nws-text);
}
#news_page .nws_article_body img {
  max-width: 100%;
  height: auto;
  border-radius: var(--nws-radius);
  margin: 16px 0;
}
#news_page .nws_article_body a {
  color: var(--nws-accent);
  text-decoration: none;
  border-bottom: 1px solid var(--nws-accent-soft);
  transition: border-color 0.2s ease;
}
#news_page .nws_article_body a:hover {
  border-bottom-color: var(--nws-accent);
}
#news_page .nws_article_body ul,
#news_page .nws_article_body ol {
  margin: 0 0 18px;
  padding-left: 24px;
}
#news_page .nws_article_body li {
  margin-bottom: 8px;
}
#news_page .nws_article_body blockquote {
  margin: 20px 0;
  padding: 16px 20px;
  background: var(--nws-bg-2);
  border-left: 4px solid var(--nws-accent);
  border-radius: 0 8px 8px 0;
  color: var(--nws-text-3);
}
#news_page .nws_article_body table {
  width: 100%;
  border-collapse: collapse;
  margin: 18px 0;
  font-size: 14px;
}
#news_page .nws_article_body table th,
#news_page .nws_article_body table td {
  padding: 12px 14px;
  border: 1px solid var(--nws-border);
  text-align: left;
}
#news_page .nws_article_body table th {
  background: var(--nws-bg-2);
  font-weight: 600;
  color: var(--nws-text);
}

/* 上下篇 */
#news_page .nws_article_nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 40px;
  padding-top: 28px;
  border-top: 1px solid var(--nws-border);
}
#news_page .nws_nav_item {
  padding: 16px 18px;
  background: var(--nws-bg-2);
  border: 1px solid var(--nws-border);
  border-radius: var(--nws-radius);
  transition: all 0.25s ease;
}
#news_page .nws_nav_item:hover {
  border-color: var(--nws-border-strong);
  box-shadow: var(--nws-shadow-sm);
}
#news_page .nws_nav_next {
  text-align: right;
}
#news_page .nws_nav_item .nav_label {
  display: block;
  font-size: 12px;
  color: var(--nws-text-4);
  letter-spacing: 0.1em;
  margin-bottom: 6px;
}
#news_page .nws_nav_item .nav_link {
  display: block;
  font-size: 14px;
  color: var(--nws-text);
  text-decoration: none;
  font-weight: 500;
  line-height: 1.5;
  /* 单行省略 */
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: color 0.25s ease;
}
#news_page .nws_nav_item .nav_link:hover {
  color: var(--nws-accent);
}
#news_page .nws_nav_item .nav_link.disabled {
  color: var(--nws-text-4);
  cursor: default;
}

/* 返回列表 */
#news_page .nws_article_back {
  margin-top: 28px;
  text-align: center;
}
#news_page .nws_article_back .back_link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  background: var(--nws-surface);
  border: 1px solid var(--nws-border);
  border-radius: 999px;
  color: var(--nws-text-2);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.25s ease;
}
#news_page .nws_article_back .back_link svg {
  width: 16px;
  height: 16px;
  transition: transform 0.25s ease;
}
#news_page .nws_article_back .back_link:hover {
  background: var(--nws-accent);
  border-color: var(--nws-accent);
  color: #ffffff;
}
#news_page .nws_article_back .back_link:hover svg {
  transform: translateX(-3px);
}


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

@media (max-width: 1024px) {
  #news_page .nws_layout {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  #news_page .nws_sidebar {
    position: static;
    width: 100%;
  }
  #news_page .nws_widget {
    width: 100%;
    box-sizing: border-box;
  }
  #news_page .nws_content {
    padding: 32px 28px 28px;
  }
}

@media (max-width: 768px) {
  #news_page .nws_main {
    padding: 32px 0 0;
  }
  #news_page .nws_content {
    padding: 24px 20px 24px;
    border-radius: var(--nws-radius);
  }
  #news_page .nws_section_head {
    margin-bottom: 24px;
    padding-bottom: 20px;
  }

  /* 新闻列表 - 移动端图文上下堆叠 */
  #news_page .nws_item_link {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 20px 0;
  }
  #news_page .nws_item_thumb {
    width: 100%;
    height: 200px;
  }
  #news_page .nws_item_title {
    font-size: 16px;
  }

  /* 面包屑 - 移动端字号略缩，间距收紧 */
  #news_page .nws_crumb {
    font-size: 12.5px;
    padding: 14px 0;
  }
  #news_page .nws_crumb .sep {
    margin: 0 6px;
  }

  /* 详情上下篇 */
  #news_page .nws_article_nav {
    grid-template-columns: 1fr;
  }
  #news_page .nws_nav_next {
    text-align: left;
  }
  #news_page .nws_article_title {
    font-size: 22px;
  }
  #news_page .nws_article_body {
    font-size: 15px;
  }
  #news_page .nws_article_body h2 {
    font-size: 19px;
    margin: 28px 0 14px;
  }
  #news_page .nws_article_body h3 {
    font-size: 16.5px;
  }

  /* 侧边栏 */
  #news_page .nws_widget {
    padding: 20px 18px;
  }
}

@media (max-width: 480px) {
  #news_page .nws_pagination a,
  #news_page .nws_pagination span {
    min-width: 34px;
    height: 34px;
    padding: 0 10px;
    font-size: 13px;
  }
}

/* 强制修复：确保文章在移动端有左右边距 */
@media (max-width: 768px) {
    /* 1. 确保最外层容器有内缩 */
    #news_page .containe {
        padding: 0 20px !important; 
        box-sizing: border-box;
    }

    /* 2. 确保白色内容卡片内部有内缩 */
    #news_page .nws_content {
        padding: 20px !important; /* 强制覆盖可能失效的样式 */
        margin-left: 0;
        margin-right: 0;
        width: 100% !important;
        box-sizing: border-box;
    }
}



