/* ============================================================
   B&N International — 新闻详情页 局部美化增强
   ------------------------------------------------------------
   作用页面：news-detail.php
   设计意图：与产品详情页（bn-product.css）共用同一套设计语言
            （品牌色 / 圆角 / 阴影 / 区块标题左边条 / 卡片画框），
            建立「封面画框 → 编辑式正文 → 侧栏元信息 + CTA → 相关新闻」
            的清晰信息层级；统一配色、字体与留白；桌面 / 移动端一致。
   说明：本文件不在构建 manifest 中，bn_asset() 直接回退到源文件
         （路径?=mtime），无需触动 dist 产物，改完即生效。
   ============================================================ */

body[data-page="news-detail.php"] {

  /* ----------------------------------------------------------
     1. Hero 精炼：收紧行高、限定阅读宽度、标签适配深色底
     ---------------------------------------------------------- */
  .page-hero.detail-hero { padding-top: 8rem; padding-bottom: 2.75rem; }
  .detail-hero-body { max-width: 900px; }
  .page-hero.detail-hero .section-title {
    font-size: clamp(1.95rem, 4.4vw, 3rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.12;
  }
  .page-hero.detail-hero .section-lead {
    font-size: 1.1rem;
    max-width: 660px;
    margin-top: 1rem;
    opacity: 0.94;
  }
  /* 深色 hero 上的标签：半透明浅色 chip，保证对比度 */
  .page-hero.detail-hero .tags { margin-top: 1.25rem; }
  .page-hero.detail-hero .tag {
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.22);
    padding: 0.4rem 0.85rem;
    backdrop-filter: blur(2px);
  }

  /* ----------------------------------------------------------
     2. 内容栅格：拉大主栏与侧栏间距，主栏内部不再留白割裂
     ---------------------------------------------------------- */
  .detail-layout { gap: 3.25rem; align-items: start; }
  .detail-main { display: flex; flex-direction: column; }

  /* 封面：装裱画框（细边框 + 柔影 + 内衬），与产品页视觉一致 */
  .detail-cover.nd-cover {
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    background: var(--surface);
    padding: 0.7rem;
    box-shadow: var(--shadow-sm);
    margin-bottom: 2.5rem;
  }
  .detail-cover.nd-cover img {
    width: 100%;
    height: auto;
    border-radius: var(--radius);
    display: block;
    margin-bottom: 0;
  }

  /* ----------------------------------------------------------
     3. 文章排版：编辑式层级，舒适阅读宽度与行距
     ---------------------------------------------------------- */
  .detail-block { margin-bottom: 0; }
  .detail-text {
    font-size: 1.06rem;
    line-height: 1.95;
    color: var(--ink-700);
    max-width: 760px;                /* 舒适阅读测量宽度 */
  }
  /* 首段作导语：略大、加重、与正文拉开层级 */
  .detail-text > p:first-of-type {
    font-size: 1.16rem;
    line-height: 1.85;
    color: var(--ink);
    margin-bottom: 1.5rem;
  }
  .detail-text p { margin-bottom: 1.25rem; }
  .detail-text h3,
  .detail-text h4,
  .detail-text h5 {
    position: relative;
    padding-left: 1rem;
    margin: 2rem 0 0.9rem;
    line-height: 1.4;
    color: var(--ink);
  }
  .detail-text h3::before,
  .detail-text h4::before,
  .detail-text h5::before {
    content: "";
    position: absolute;
    left: 0; top: 0.12em; bottom: 0.12em;
    width: 4px;
    border-radius: 2px;
    background: linear-gradient(180deg, var(--brand) 0%, var(--brand-light) 100%);
  }
  .detail-text h3 { font-size: 1.4rem; }
  .detail-text h4 { font-size: 1.18rem; }
  .detail-text h5 { font-size: 1.04rem; }
  .detail-text ul { padding-left: 1.4rem; margin-bottom: 1.25rem; }
  .detail-text li { margin-bottom: 0.5rem; }
  /* 文内链接：品牌色 + 下划线，hover 提亮 */
  .detail-text a {
    color: var(--brand);
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-thickness: 1px;
  }
  .detail-text a:hover { color: var(--brand-light); }
  /* 引用块：左侧品牌条 + 浅底，突出但不喧宾夺主 */
  .detail-text blockquote {
    margin: 1.6rem 0;
    padding: 1rem 1.4rem;
    border-left: 4px solid var(--brand);
    background: var(--bg-soft);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    color: var(--ink-800);
    font-style: normal;
  }
  /* 文内插图：圆角 + 柔影 */
  .detail-text img {
    width: 100%;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    margin: 1.5rem 0;
  }

  /* ----------------------------------------------------------
     4. 文末返回：幽灵按钮（与产品详情页返回按钮一致）
     ---------------------------------------------------------- */
  .article-foot {
    margin-top: 2.75rem;
    padding-top: 1.75rem;
    border-top: 1px solid var(--border-light);
  }
  .article-foot .btn-outline {
    background: var(--surface);
    border: 1.5px solid var(--border);
    color: var(--ink-800);
    min-width: 190px;
    justify-content: center;
  }
  .article-foot .btn-outline:hover {
    border-color: var(--brand);
    color: var(--brand);
    background: rgba(10, 31, 68, 0.04);
  }

  /* ----------------------------------------------------------
     5. 侧栏卡片：统一区块标题节奏 + 发布信息精修 + CTA 品牌渐变
     ---------------------------------------------------------- */
  .detail-side { gap: 1.5rem; }
  .side-card {
    background: var(--surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    padding: 1.5rem 1.6rem;
    box-shadow: var(--shadow-sm);
  }
  .side-card h3 {
    position: relative;
    padding-left: 1rem;
    margin: 0 0 1.1rem;
    font-size: 1.08rem;
    font-weight: 700;
    color: var(--ink);
    line-height: 1.35;
  }
  .side-card h3::before {
    content: "";
    position: absolute;
    left: 0; top: 0.12em; bottom: 0.12em;
    width: 4px;
    border-radius: 2px;
    background: linear-gradient(180deg, var(--brand) 0%, var(--brand-light) 100%);
  }
  /* 发布信息：精修定义表（发丝虚线分隔，层级清晰） */
  .detail-side .spec-table { font-size: 0.94rem; }
  .detail-side .spec-table th {
    width: 38%;
    color: var(--muted);
    font-weight: 600;
    font-size: 0.85rem;
    border-bottom: 1px dashed var(--border);
    padding: 10px 0;
  }
  .detail-side .spec-table td {
    color: var(--ink);
    font-weight: 600;
    border-bottom: 1px dashed var(--border);
    padding: 10px 0;
  }
  .detail-side .spec-table tr:last-child th,
  .detail-side .spec-table tr:last-child td { border-bottom: 0; }

  /* CTA 卡片：品牌渐变 + 白字 + 白色按钮，形成侧栏视觉焦点 */
  .side-card-cta {
    background: linear-gradient(150deg, var(--brand) 0%, var(--brand-light) 100%);
    border: none;
    color: #fff;
    box-shadow: var(--shadow);
  }
  .side-card-cta h3 { color: #fff; }
  .side-card-cta h3::before { background: var(--gold); }
  .side-card-cta p { color: rgba(255, 255, 255, 0.9); margin-bottom: 1.25rem; }
  .side-card-cta .btn-primary {
    background: #fff;
    color: var(--brand);
    border: none;
    width: 100%;
    justify-content: center;
  }
  .side-card-cta .btn-primary:hover {
    background: var(--accent-dark);
    color: var(--brand-dark);
  }

  /* ----------------------------------------------------------
     6. 相关新闻：卡片精修（封面缩略图 + 标题 hover 提亮 + 摘要两行省略）
     ---------------------------------------------------------- */
  .card-grid .info-card {
    border-color: var(--border-light);
    box-shadow: var(--shadow-sm);
  }
  .info-card-media { display: block; overflow: hidden; }
  .info-card-media img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: var(--radius) var(--radius) 0 0;
    transition: transform var(--transition);
  }
  .card-grid .info-card:hover .info-card-media img { transform: scale(1.06); }
  .card-grid .info-card .body { padding: 1.35rem 1.5rem 1.6rem; }
  .card-grid .info-card h3 {
    font-size: 1.12rem;
    line-height: 1.45;
    margin-bottom: 0.6rem;
    transition: color var(--transition);
  }
  .card-grid .info-card h3 a { color: var(--ink); }
  .card-grid .info-card:hover h3 a { color: var(--brand); }
  .card-grid .info-card p {
    font-size: 0.92rem;
    line-height: 1.7;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .card-grid .info-card .tags { margin-top: 0.9rem; }

  /* ----------------------------------------------------------
     7. 响应式：窄屏堆叠、间距收敛、字号微调
     ---------------------------------------------------------- */
  @media (max-width: 960px) {
    .detail-layout { gap: 2rem; }
    .detail-side { order: 2; }
  }
  @media (max-width: 560px) {
    .page-hero.detail-hero { padding-top: 7rem; padding-bottom: 2rem; }
    .detail-cover.nd-cover { padding: 0.5rem; margin-bottom: 1.75rem; }
    .detail-text { font-size: 1rem; line-height: 1.85; }
    .detail-text > p:first-of-type { font-size: 1.08rem; }
    .side-card { padding: 1.25rem 1.3rem; }
  }
}
