/* =========================================================
 * News Detail 详情页改版 v1
 * Banner 封面 + mask 遮罩 + 居中白卡正文
 * ========================================================= */

/* ---------- Banner ---------- */
.nd-banner {
  position: relative;
  height: 482px;
  overflow: hidden;
  background: #1a1518;
  color: #fff;
}

.nd-banner__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
  transition: transform 0.8s cubic-bezier(0.2, 0, 0, 1);
}

/* 主遮罩：左上亮 → 右下深，保证标题可读 */
.nd-banner__veil {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(100deg, rgba(14, 10, 9, 0.55) 0%, rgba(14, 10, 9, 0.18) 42%, rgba(14, 10, 9, 0.05) 68%, rgba(14, 10, 9, 0.38) 100%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.32) 0%, rgba(0, 0, 0, 0.08) 38%, rgba(0, 0, 0, 0.18) 66%, rgba(0, 0, 0, 0.88) 100%);
  z-index: 1;
}

/* 暗角 vignette：让视觉收束到中心 */
.nd-banner__vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0) 52%, rgba(0, 0, 0, 0.42) 100%);
  z-index: 1;
}

.nd-banner__in {
  position: relative;
  z-index: 2;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--s5);
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding-bottom: 120px;
}

.nd-banner__crumb {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  letter-spacing: 0.3px;
  color: rgba(255, 255, 255, 0.58);
  margin-bottom: 18px;
}

.nd-banner__crumb a {
  color: inherit;
  text-decoration: none;
  transition: color var(--t) var(--ease);
}

.nd-banner__crumb a:hover {
  color: #fff;
}

.nd-banner__crumb span:not(:first-child) {
  opacity: 0.7;
}

.nd-banner__cat {
  display: inline-block;
  align-self: flex-start;
  padding: 6px 16px;
  border-radius: var(--r-full);
  background: rgba(200, 16, 46, 0.92);
  font-size: 12px;
  letter-spacing: 2px;
  line-height: 1;
  color: #fff;
  margin-bottom: 18px;
  box-shadow: 0 4px 16px rgba(200, 16, 46, 0.35);
}

.nd-banner__title {
  font-size: clamp(1.75rem, 3.2vw, 2.75rem);
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: #fff;
  margin: 0 0 22px;
  max-width: 28ch;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.28);
}

.nd-banner__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  align-items: center;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.72);
}

.nd-banner__meta > span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.nd-banner__date svg {
  opacity: 0.85;
}

.nd-banner__scroll {
  position: absolute;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  letter-spacing: 2px;
  color: rgba(255, 255, 255, 0.45);
  pointer-events: none;
}

.nd-banner__scroll i {
  width: 1px;
  height: 28px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.65), rgba(255, 255, 255, 0));
  animation: ndPulse 2s var(--ease) infinite;
}

@keyframes ndPulse {
  0%, 100% { opacity: 0.4; transform: scaleY(0.9); }
  50% { opacity: 1; transform: scaleY(1); }
}

/* ---------- Wrap ---------- */
.nd-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--s5) var(--s8);
}

/* ---------- Body 卡片 ---------- */
.nd-body {
  position: relative;
  z-index: 3;
  margin-top: -84px;
  padding: var(--s7);
  background: #fff;
  border-radius: var(--r-xxl);
  box-shadow: 0 20px 60px -20px rgba(20, 17, 15, 0.18), 0 4px 12px rgba(20, 17, 15, 0.06);
  border: 1px solid rgba(20, 17, 15, 0.04);
}

.nd-body__inner {
  max-width: 780px;
  margin: 0 auto;
  font-size: 16.5px;
  line-height: 1.95;
  color: var(--ink-700);
}

/* 正文排版 */
.nd-body__inner > *:first-child { margin-top: 0 !important; }
.nd-body__inner > *:last-child  { margin-bottom: 0 !important; }

.nd-body__inner h1,
.nd-body__inner h2,
.nd-body__inner h3,
.nd-body__inner h4 {
  color: var(--ink);
  font-weight: 700;
  margin: 40px 0 16px;
  letter-spacing: 0.2px;
}
.nd-body__inner h2 { font-size: 24px; }
.nd-body__inner h3 { font-size: 20px; }
.nd-body__inner h4 { font-size: 17.5px; }

.nd-body__inner p {
  margin: 0 0 18px;
  text-align: justify;
  text-justify: inter-ideograph;
}

.nd-body__inner img {
  max-width: 100%;
  height: auto;
  border-radius: var(--r-l);
  display: inline-block;
  margin: 16px 0;
  box-shadow: var(--sh1);
}

.nd-body__inner ul,
.nd-body__inner ol {
  padding-left: 1.4em;
  margin: 0 0 18px;
}
.nd-body__inner li { margin-bottom: 6px; }

.nd-body__inner blockquote {
  border-left: 3px solid var(--brand-600);
  background: linear-gradient(180deg, var(--brand-50), #fff);
  padding: 16px 20px;
  border-radius: 0 var(--r-l) var(--r-l) 0;
  color: var(--ink-700);
  margin: 24px 0;
  position: relative;
}
.nd-body__inner blockquote::before {
  content: open-quote;
  position: absolute;
  top: -4px;
  right: 16px;
  font-size: 60px;
  font-family: Georgia, serif;
  color: rgba(200, 16, 46, 0.08);
  line-height: 1;
}

.nd-body__inner table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 15px;
  border-radius: var(--r-l);
  overflow: hidden;
  box-shadow: 0 0 0 1px var(--line);
}
.nd-body__inner th,
.nd-body__inner td {
  border: 1px solid var(--line);
  padding: 10px 14px;
}
.nd-body__inner th {
  background: var(--bg-alt);
  color: var(--ink);
  font-weight: 600;
}

.nd-body__inner a {
  color: var(--brand-600);
  text-decoration: none;
  border-bottom: 1px solid rgba(200, 16, 46, 0.25);
  transition: color var(--t) var(--ease), border-color var(--t) var(--ease);
}
.nd-body__inner a:hover {
  color: var(--brand-700);
  border-bottom-color: var(--brand-700);
}

.nd-body__inner hr {
  border: none;
  border-top: 1px solid var(--line);
  margin: 36px 0;
}

.nd-body__inner code {
  background: var(--bg-alt);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.92em;
  color: var(--brand-700);
}

/* ---------- Tags ---------- */
.nd-tags {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 44px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}

.nd-tags__k {
  flex-shrink: 0;
  font-size: 12px;
  letter-spacing: 2px;
  color: var(--ink-500);
  padding-top: 4px;
}

.nd-tags__list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.nd-tag {
  display: inline-flex;
  align-items: center;
  padding: 7px 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-full);
  font-size: 13px;
  color: var(--ink-500);
  text-decoration: none;
  transition: border-color var(--t) var(--ease), color var(--t) var(--ease), background-color var(--t) var(--ease);
}

.nd-tag:hover {
  border-color: var(--brand-100);
  background: var(--brand-50);
  color: var(--brand-600);
}

/* ---------- Nav 上/下一篇 ---------- */
.nd-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 32px;
}

.nd-nav__item {
  padding: 22px 24px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-l);
  text-decoration: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: border-color var(--t) var(--ease), transform var(--t) var(--ease), box-shadow var(--t) var(--ease);
  position: relative;
  overflow: hidden;
}

.nd-nav__item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(200, 16, 46, 0), rgba(200, 16, 46, 0));
  transition: background var(--t) var(--ease);
  pointer-events: none;
}

.nd-nav__item:hover {
  border-color: var(--brand-100);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px -12px rgba(200, 16, 46, 0.28);
}

.nd-nav__item:hover::after {
  background: linear-gradient(135deg, rgba(200, 16, 46, 0.04), rgba(200, 16, 46, 0));
}

.nd-nav__item.nd-nav__next {
  text-align: right;
}

.nd-nav__empty {
  opacity: 0.45;
  min-height: 86px;
}

.nd-nav__empty {
  border-style: dashed;
  justify-content: center;
  align-items: center;
  font-size: 13px;
  color: var(--ink-500);
}
.nd-nav__empty::before {
  content: '没有更多了';
}

.nd-nav__dir {
  font-size: 12px;
  letter-spacing: 1px;
  color: var(--ink-500);
  font-weight: 400;
}

.nd-nav__title {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.5;
  color: var(--ink);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
  overflow: hidden;
}

/* ---------- 响应式 ---------- */
@media (max-width: 960px) {
  .nd-banner { height: 480px; }
  .nd-banner__title { max-width: none; }
  .nd-body { padding: var(--s7) var(--s5); margin-top: -64px; }
}

@media (max-width: 720px) {
  .nd-banner { height: 420px; }
  .nd-banner__in { padding-bottom: 48px; }
  .nd-banner__scroll { display: none; }
  .nd-banner__meta { gap: 14px; font-size: 12px; }

  .nd-wrap { padding: 0 16px 64px; }
  .nd-body {
    padding: 28px 20px;
    margin-top: -48px;
    border-radius: 20px;
  }
  .nd-body__inner { font-size: 15.5px; }
  .nd-body__inner h2 { font-size: 21px; }
  .nd-body__inner h3 { font-size: 18px; }

  .nd-nav { grid-template-columns: 1fr; gap: 12px; }
  .nd-nav__item.nd-nav__next { text-align: left; }

  .nd-tags { flex-direction: column; gap: 10px; }
}
