/* 新闻动态：只加新闻自己的几条样式，其余沿用 v2.css / v2-courses.css / service-page.css / case-page.css */

/* 分类和日期：首页、列表、详情同一种写法（分类品牌红在前，日期灰色在后） */
.news-meta{display:flex;flex-wrap:wrap;align-items:center;gap:4px 10px;color:var(--muted);font-size:13px;line-height:1.4}
.news-meta-cat{color:var(--red);font-weight:600}
.news-meta time{font-variant-numeric:tabular-nums}

/* 列表页：照 AI 课程列表页的卡片；ul 包 li，卡片等高，“阅读全文”贴底 */
.news-list{padding:48px 0 72px}
.news-list-hero h1{font-weight:700;letter-spacing:-.02em}
.news-grid{margin:0;padding:0;list-style:none}
.news-item{display:flex;min-width:0}
.news-item>.news-card{flex:1;min-width:0}
.news-grid .news-item[hidden]{display:none}
.news-card .v2-course-body{padding:20px 22px 22px}
.news-card .news-meta{margin:0 0 8px}
.news-video-badge{position:absolute;right:12px;bottom:12px;display:inline-flex;align-items:center;gap:4px;padding:4px 10px;border-radius:999px;background:rgba(20,10,10,.78);color:#fff;font-size:12px;line-height:1.4}
.news-video-badge.is-small{right:8px;bottom:8px;padding:2px 8px;font-size:12px}
.news-more{display:block;margin:32px auto 0;padding:10px 24px;border:1px solid var(--line);border-radius:999px;background:#fff;color:var(--red);font:inherit;font-size:14px;cursor:pointer}
.news-more:hover{border-color:var(--red)}
.news-filter-empty{margin-top:24px}
.news-list .filter-bar{margin-bottom:24px}

/* 详情页首屏：照案例详情页的深色底；分类在深色底上用浅金色 */
.news-hero{background:radial-gradient(900px 420px at 88% -10%,rgba(184,24,32,.38),transparent 62%),linear-gradient(rgba(255,255,255,.03) 1px,transparent 1px) 0 0/56px 56px,linear-gradient(90deg,rgba(255,255,255,.03) 1px,transparent 1px) 0 0/56px 56px,var(--ink);color:#f3ece6}
.news-hero-meta{margin:6px 0 14px}
.news-hero-meta .news-meta{color:var(--muted-d);font-size:14.5px;font-weight:500}
.news-hero-meta .news-meta-cat{color:var(--gold-soft)}
/* 视频：只留一层白框（和案例图一样）；案例样式给 img 加的白边和阴影在这里去掉，不然会叠成两层 */
.news-hero-figure img,.news-hero-figure .mvp-preview-media{aspect-ratio:16/9}
.news-hero-figure .mvp-preview-media{position:relative;display:block;width:100%;border:8px solid #fff;box-shadow:0 24px 48px rgba(40,15,15,.18);background:#000}
.news-hero-figure .mvp-preview-trigger{display:block;width:100%;padding:0;border:0;background:#000;cursor:pointer}
.news-hero-figure .mvp-preview-trigger img{display:block;width:100%;aspect-ratio:16/9;object-fit:cover;border:0;box-shadow:none}
.news-hero-figure .mvp-preview-media video{display:block;width:100%;aspect-ratio:16/9;background:#000}

/* 详情页正文：左右两栏用案例页的 .case-body2-grid；左栏正文 + 现场照片，右栏“新闻信息”卡 */
.news-body{background:#fff}
.news-text{color:#333;font-size:17px;line-height:1.95}
.news-text>p{margin:0 0 1.2em}
.news-text>p:last-child{margin-bottom:0}
.news-gallery{margin-top:48px}
.news-gallery:first-child{margin-top:0}
.news-gallery-title{margin:0 0 18px}
.news-photos{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.news-photo{display:block;padding:0;border:0;border-radius:12px;background:#eee;cursor:zoom-in;overflow:hidden}
.news-photo img{display:block;width:100%;aspect-ratio:4/3;object-fit:cover;transition:transform .25s ease}
.news-photo:hover img,.news-photo:focus-visible img{transform:scale(1.04)}
.news-photo:focus-visible{outline:2px solid var(--red);outline-offset:3px}
/* 正文插图：横图随正文宽，竖图限高居中；不裁切，图注另起一行 */
.news-text>.news-figure{margin:40px 0}
.news-text>.news-figure:first-child{margin-top:0}
.news-text>.news-figure:last-child{margin-bottom:0}
.news-figure .news-photo{display:block;max-width:100%;margin:0 auto;border-radius:12px}
.news-figure .news-photo img{width:auto;max-width:100%;height:auto;max-height:640px;aspect-ratio:auto;object-fit:contain}
.news-figure .news-photo:hover img,.news-figure .news-photo:focus-visible img{transform:none}
.news-figure figcaption{margin-top:12px;color:var(--muted);font-size:14px;line-height:1.6;text-align:center}
.news-aside .button+.button{margin-top:12px}
/* 本篇信息：分类和日期一行，视频是可回看的入口；下半部分单独承接咨询 */
.news-info-top{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:18px 0 20px}
.news-info-category{display:inline-flex;align-items:center;min-height:28px;padding:4px 10px;border-radius:999px;background:#f8eceb;color:var(--red);font-size:13px;font-weight:700}
.news-info-top time{margin-left:auto;color:var(--muted);font-size:13px;font-variant-numeric:tabular-nums}
.news-info-video{display:flex;align-items:center;gap:12px;padding:14px;border:1px solid #eadfda;border-radius:12px;background:#faf7f5;color:inherit;text-decoration:none;transition:border-color .2s,background .2s}
.news-info-video:hover,.news-info-video:focus-visible{border-color:#caa9a5;background:#f7efec}
.news-info-video-mark{display:grid;place-items:center;width:34px;height:34px;flex:none;padding-left:2px;border-radius:50%;background:var(--red);color:#fff;font-size:11px}
.news-info-video-text{display:grid;gap:2px;min-width:0}
.news-info-video-text b{font-size:14px;line-height:1.4}
.news-info-video-text small{color:var(--muted);font-size:12px}
.news-info-video-arrow{margin-left:auto;color:var(--red);font-size:17px}
.news-aside .news-aside-link{margin-top:12px}
.news-aside-cta{margin-top:22px;padding-top:22px;border-top:1px solid #efe9e6}
.news-aside-cta h2{margin:0 0 8px;font-size:18px;line-height:1.45}
.news-aside-cta p{margin:0 0 18px;color:var(--muted);font-size:13px;line-height:1.7}
.news-aside-cta .button{margin:0}
#news-video{scroll-margin-top:96px}

/* 上一条 / 下一条：照案例页，第二行是日期；只有一张时留在自己那一侧 */
.news-pn{padding-top:28px}
.news-pn-card em{color:var(--muted)}
.news-pn .case-pn.is-prev{grid-column:1}
.news-pn .case-pn.is-next{grid-column:2}
/* 返回新闻中心：整块可点击；上间距放在 padding 内，避免穿透白底露出页面底色 */
.news-all-link{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-top:40px;padding:20px 24px;border:1px solid #e4dcd8;border-radius:14px;background:#faf7f5;color:inherit;text-decoration:none;transition:border-color .2s,background .2s}
.news-all-link:hover,.news-all-link:focus-visible{border-color:#caa9a5;background:#f7efec}
.news-all-link-text{display:grid;gap:4px;min-width:0}
.news-all-link-text small{color:var(--muted);font-size:12px;font-weight:400}
.news-all-link-text b{color:#2b2725;font-size:17px;line-height:1.4}
.news-all-link-arrow{display:grid;place-items:center;width:38px;height:38px;flex:none;border-radius:50%;background:var(--red);color:#fff;font-size:20px;transition:transform .2s}
.news-all-link:hover .news-all-link-arrow{transform:translateX(3px)}
@media(prefers-reduced-motion:reduce){.news-info-video,.news-all-link,.news-all-link-arrow{transition:none}.news-all-link:hover .news-all-link-arrow{transform:none}}

/* 看大图：dialog 全屏，左右切换，Esc 关闭，手机可滑 */
.news-lightbox{position:fixed;inset:0;width:100%;height:100%;max-width:none;max-height:none;margin:0;padding:0;border:0;background:rgba(10,5,5,.94);color:#fff;overflow:hidden}
.news-lightbox::backdrop{background:rgba(10,5,5,.9)}
.news-lightbox img{position:absolute;inset:0;margin:auto;max-width:90vw;max-height:86vh;width:auto;height:auto;object-fit:contain;box-shadow:0 20px 60px rgba(0,0,0,.5)}
.news-lightbox button{position:absolute;z-index:2;display:grid;place-items:center;width:44px;height:44px;padding:0;border:0;border-radius:50%;background:rgba(255,255,255,.14);color:#fff;font-size:28px;line-height:1;cursor:pointer}
.news-lightbox button:hover{background:rgba(255,255,255,.28)}
.news-lightbox-close{top:18px;right:18px}
.news-lightbox-prev{left:18px;top:50%;transform:translateY(-50%)}
.news-lightbox-next{right:18px;top:50%;transform:translateY(-50%)}

@media(max-width:900px){
  .news-hero-figure{margin:12px 16px 20px 0}
  .news-hero-figure .mvp-preview-media{border-width:5px}
}
@media(max-width:640px){
  .news-list{padding:32px 0 48px}
  .news-text{font-size:16px;line-height:1.9}
  .news-text>.news-figure{margin:28px 0}
  .news-figure .news-photo{border-radius:10px}
  .news-figure .news-photo img{max-height:70vh}
  .news-figure figcaption{margin-top:8px;font-size:13px}
  .news-photos{grid-template-columns:repeat(2,minmax(0,1fr))}
  .news-info-top{padding-top:16px}
  .news-all-link{margin-top:28px;padding:16px 18px}
  .news-all-link-text b{font-size:16px}
  .news-pn .case-pn.is-prev,.news-pn .case-pn.is-next{grid-column:auto}
  .news-lightbox-prev,.news-lightbox-next{top:auto;bottom:20px;transform:none}
  .news-lightbox-prev{left:20px}
  .news-lightbox-next{right:20px}
}

/* 首页“最新动态”：公司介绍之后、产品服务之前，编号 02（server.js 拼首页时由 news.cjs 的 placeHome 插入、重排编号）；内容宽和全站一样（1200） */
.home-news{padding:clamp(56px,6vw,80px) 0;background:var(--paper-2)}
/* 首页浅色块是两种米色一块隔一块交替的：新闻块插进来以后，后面三块对调底色；新闻块不显示时这三条不生效，自动恢复原样 */
#news~#services{background:var(--paper)}
#news~#scenarios{background:var(--paper-2)}
/* 资质只在“业务场景”出现时才对调；没有案例时业务场景不出，资质保持原色，正好和产品服务错开 */
#news~#scenarios~#credentials{background:var(--paper)}
.home-news .home-head{margin-bottom:32px}
.home-news-grid{display:grid;gap:20px}
.home-news-grid.is-2{grid-template-columns:1fr 1fr}
.home-news-grid.is-1{grid-template-columns:1fr}
/* 3 条以上：左边头条大卡，右边清单（横的 4:3 小图 + 标题，条与条之间细线，没有卡片外框） */
.home-news-grid.is-lead{grid-template-columns:minmax(0,1.12fr) minmax(0,1fr);gap:44px;align-items:start}
.home-news-card{display:flex;flex-direction:column;overflow:hidden;border:1px solid var(--line);border-radius:16px;background:#fff;box-shadow:var(--sh-sm);color:inherit;text-decoration:none;transition:transform .2s ease,box-shadow .2s ease,border-color .2s ease}
.home-news-card:hover,.home-news-card:focus-visible{transform:translateY(-2px);box-shadow:var(--sh-md);border-color:var(--red)}
.home-news-cover{position:relative;display:block;aspect-ratio:16/9;overflow:hidden;background:#e9e1d6}
.home-news-cover img{display:block;width:100%;height:100%;object-fit:cover}
.home-news-body{display:flex;flex:1;flex-direction:column;padding:20px 24px 24px}
.home-news-body .news-meta{margin-bottom:10px}
.home-news-card h3{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;margin:0 0 8px;font-size:20px;line-height:1.35}
.home-news-sum{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;margin:0;color:var(--muted);font-size:14.5px;line-height:1.7}
.home-news-card.is-big h3{font-size:22px}
.home-news-list{display:flex;flex-direction:column;border-top:1px solid var(--line)}
.home-news-row{display:grid;grid-template-columns:168px minmax(0,1fr);gap:20px;align-items:center;padding:20px 0;border-bottom:1px solid var(--line);color:inherit;text-decoration:none}
.home-news-thumb{position:relative;display:block;aspect-ratio:4/3;overflow:hidden;border-radius:10px;background:#e9e1d6}
.home-news-thumb img{display:block;width:100%;height:100%;object-fit:cover;transition:transform .25s ease}
.home-news-row-text{display:flex;flex-direction:column;gap:8px;min-width:0}
.home-news-row h3{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;margin:0;font-size:17px;line-height:1.45;transition:color .2s ease}
.home-news-row:hover h3,.home-news-row:focus-visible h3{color:var(--red)}
.home-news-row:hover .home-news-thumb img{transform:scale(1.04)}
.home-news-row:focus-visible{outline:2px solid var(--red);outline-offset:4px}
.home-news-card.is-one{display:grid;grid-template-columns:minmax(0,1.1fr) minmax(0,1fr);align-items:stretch}
.home-news-card.is-one .home-news-cover{height:100%;aspect-ratio:auto}
.home-news-card.is-one .home-news-body{justify-content:center;padding:32px}
.home-news-card.is-one h3{font-size:24px}
.home-news-card.is-one .home-news-sum{-webkit-line-clamp:3;font-size:15.5px}
@media(prefers-reduced-motion:reduce){.home-news-card,.home-news-thumb img,.home-news-row h3{transition:none}.home-news-card:hover{transform:none}.home-news-row:hover .home-news-thumb img{transform:none}}
@media(max-width:900px){
  .home-news-grid.is-lead{grid-template-columns:1fr;gap:12px}
  .home-news-row{grid-template-columns:112px minmax(0,1fr);gap:14px;padding:14px 0}
  .home-news-row h3{font-size:16px}
  .home-news-grid.is-2{grid-template-columns:1fr}
  .home-news-grid.is-2 .home-news-card.is-two:last-child{display:grid;grid-template-columns:minmax(0,38%) minmax(0,1fr)}
  .home-news-grid.is-2 .home-news-card.is-two:last-child .home-news-cover{height:100%;aspect-ratio:auto}
  .home-news-grid.is-2 .home-news-card.is-two:last-child .home-news-sum{display:none}
  .home-news-card.is-one{grid-template-columns:1fr}
  .home-news-card.is-one .home-news-cover{aspect-ratio:16/9;height:auto}
  .home-news-card.is-one .home-news-body{padding:20px 22px 22px}
}
@media(max-width:640px){
  .home-news{padding:36px 0}
  .home-news .home-head{margin-bottom:28px}
  .home-news-grid{gap:14px}
  .home-news-card.is-big .home-news-body{padding:14px 16px}
  .home-news-card h3,.home-news-card.is-big h3{font-size:18px}
  .home-news-grid.is-2 .home-news-card.is-two:last-child h3{-webkit-line-clamp:2;font-size:17px}
  .home-news-grid.is-2 .home-news-card.is-two:last-child .home-news-body{padding:12px 14px}
}
