/* News Detail page styles - rebuilt for new layout */

/* 整个页面内容区域宽度：news-detail 页统一为 1360px */

.detail-layout {
  margin-inline: auto;
  max-width: 1440px;
  padding: 56px 64px 40px;
}

.detail-hero {
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 6px 18px rgba(15, 36, 63, 0.16);
}

.detail-hero__media {
  position: relative;
  width: 100%;
  height: 420px;
  overflow: hidden;
}

.detail-hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.detail-hero__chip {
  position: absolute;
  left: 20px;
  bottom: 20px;
  background-color: #004494;
  color: #ffffff;
}

.detail-hero__body {
  padding: 20px 24px 24px;
  background-color: #ffffff;
}

.detail-hero__title {
  font-size: 28px;
  line-height: 1.5;
  margin-bottom: 16px;
}

.detail-hero__meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  font-size: 14px;
}

.detail-hero__meta-left {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.detail-hero__author {
  display: flex;
  align-items: center;
  gap: 8px;
}

.detail-hero__avatar {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background-color: #d9e3f3;
}

.detail-hero__author-label {
  color: #666666;
}

.detail-hero__author-name {
  font-weight: 600;
}

.detail-hero__time {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #666666;
}

.detail-hero__meta-label {
  color: #004494;
}

.detail-hero__time-text {
  color: #333333;
}

.detail-hero__meta-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.detail-hero__stat {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 10px;
  border-radius: 999px;
  background-color: #f1f4f8;
  color: #333333;
}

.detail-hero__stat i {
  font-size: 16px;
}

.detail-hero__stat-value {
  font-weight: 600;
}

.detail-hero__share {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid #004494;
  background-color: transparent;
  color: #004494;
  font-size: 13px;
  cursor: pointer;
}

.detail-hero__share i {
  font-size: 16px;
}

.detail-content {
  border-radius: 8px;
  box-shadow: 0 6px 18px rgba(15, 36, 63, 0.12);
  background-color: #ffffff;
  padding: 24px 28px 28px;
}

.detail-content__body {
  font-size: 16px;
  line-height: 1.8;
  color: #333333;
}

.detail-content__body p+p {
  margin-top: 14px;
}

.detail-inline-banner {
  margin: 24px -28px;
}

.detail-inline-banner img {
  width: 100%;
  display: block;
}

.detail-content__body--bottom {
  padding-top: 8px;
  border-top: 1px solid #e0e6f0;
  margin-top: 12px;
}

.detail-full-banner {
  margin-top: 12px;
  border-radius: 8px;
  overflow: hidden;
}

.detail-full-banner img {
  width: 100%;
  display: block;
}

.detail-related {
  margin-top: 20px;
  padding: 20px 24px 24px;
  border-radius: 8px;
  background-color: #ffffff;
  box-shadow: 0 6px 18px rgba(15, 36, 63, 0.12);
}

.detail-related__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.detail-related__title {
  font-size: 20px;
}

.detail-related__link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 14px;
  color: #004494;
}

.detail-related__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.detail-related-card .card-media {
  height: 180px;
}

.detail-related-card .card-title {
  font-size: 14px;
}

.detail-side-tools {
  display: flex;
  justify-content: flex-start;
}

.detail-side-tools__button {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: none;
  background-color: #004494;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.detail-side-tools__button i {
  font-size: 18px;
}

@media (max-width: 1200px) {
  .detail-page {
    grid-template-columns: minmax(0, 1fr);
  }

  .detail-side-tools {
    justify-content: flex-end;
  }
}

@media (max-width: 1024px) {
  .detail-hero__media {
    height: auto;
  }

  .detail-related__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .detail-page {
    padding-top: 16px;
  }

  .detail-hero__title {
    font-size: 22px;
  }

  .detail-hero__meta {
    flex-direction: column;
    align-items: flex-start;
  }

  .detail-content {
    padding: 20px 18px 24px;
  }

  .detail-inline-banner {
    margin: 20px -18px;
  }

  .detail-related__grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* === New news-detail layout styles based on latest design === */

.detail-layout {
  background-color: #ffffff;
  padding-bottom: 40px;
}

.news-detail-shell {
  background-color: #ffffff;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.news-detail-cover img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 10px;
}

.news-detail-title {
  font-weight: 700;
  font-size: 38px;
  line-height: 1.35;
  margin: 0;
}

.news-detail-summary {
  margin: 2px 0 10px;
  font-size: 20px;
  line-height: 1.6;
  color: #374151;
}

.news-detail-summary--empty {
  display: none;
}

.news-detail-author-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  font-size: 18px;
  background-color: #f1f6ff;
  border-radius: 12px;
  padding: 10px 18px;
}

.news-detail-author {
  display: flex;
  align-items: center;
  gap: 10px;
}

.news-detail-author__avatar-link {
  display: inline-flex;
  text-decoration: none;
}

.news-detail-author__avatar {
  width: 50px;
  height: 50px;
  border-radius: 999px;
  overflow: hidden;
  background-color: #eaf0f7;
}

.news-detail-author__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.news-detail-author__info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.news-detail-author__label {
  color: #666666;
}

.news-detail-author__name {
  font-weight: 600;
}

.news-detail-publish {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #666666;
}

.news-detail-publish__label {
  color: #004494;
}

.news-detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

.news-detail-tag {
  padding: 4px 10px;
  border-radius: 5px;
  background-color: #004494;
  color: #ffffff;
  font-size: 14px;
}

.news-detail-body {
  font-size: 18px;
  line-height: 1.8;
  color: #333333;
}

.news-detail-body img {
  max-width: 100% !important;
  height: auto !important;
  display: block;
  object-fit: contain;
}

.news-detail-body figure,
.news-detail-body figure.image {
  max-width: 100%;
}

.news-detail-body figure img,
.news-detail-body figure.image img {
  max-width: 100% !important;
  height: auto !important;
}

.news-detail-body > :first-child {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

/* Paywall Styles */
.news-detail-content-wrapper {
  position: relative;
  min-height: 400px;
}

.news-detail-body--blurred {
  filter: blur(8px);
  -webkit-filter: blur(8px);
  user-select: none;
  pointer-events: none;
  opacity: 0.5;
  overflow: hidden;
  max-height: 600px;
}

.paywall-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  /* Gradient to fade out the bottom of the blurred text */
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.6) 40%, rgba(255, 255, 255, 1) 100%);
}

.paywall-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  margin-top: 50px;
  /* Push it down a bit to be over the blurred text */
}

.paywall-lock {
  font-size: 32px;
  color: #004494;
  /* Dark blue matching theme */
}

.paywall-action-btn {
  display: inline-block;
  background-color: #004494;
  color: #ffffff;
  padding: 12px 30px;
  border-radius: 4px;
  font-size: 16px;
  text-decoration: none;
  font-weight: 500;
  transition: background-color 0.3s;
  box-shadow: 0 4px 6px rgba(0, 68, 148, 0.2);
  text-align: center;
  min-width: 280px;
}

.paywall-action-btn:hover {
  background-color: #003377;
  color: #ffffff;
}

.news-detail-body p+p {
  margin-top: 10px;
  padding-top: 10px;
}

/* 标签与分享同一行布局 */
.news-detail-tags-share-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

/* 分享栏水平布局（取消垂直） */
.news-detail-share {
  display: flex;
  flex-direction: row;
  gap: 8px;
  align-items: center;
  flex-shrink: 0;
}

.news-detail-share__item {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid #d6deea;
  background-color: #ffffff;
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 3px 10px rgba(15, 23, 42, 0.06);
  transition: background-color 0.2s, color 0.2s, border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.news-detail-share__item i {
  font-size: 20px;
}

.news-detail-share__item--wechat {
  color: #07c160;
}

.news-detail-share__item--linkedin {
  color: #0a66c2;
}

.news-detail-share__item--twitter {
  color: #111111;
}

.news-detail-share__item--primary {
  background-color: #004494;
  border-color: #004494;
  color: #ffffff;
}

.news-detail-share__item:hover,
.news-detail-share__item:focus-visible {
  border-color: #b8c7db;
  background-color: #f8fafc;
  box-shadow: 0 7px 16px rgba(15, 23, 42, 0.16);
  transform: translateY(-1px);
}

.news-detail-share__item--wechat:hover,
.news-detail-share__item--wechat:focus-visible {
  background-color: #ecfdf3;
  border-color: #91e4bf;
}

.news-detail-share__item--linkedin:hover,
.news-detail-share__item--linkedin:focus-visible {
  background-color: #eff6ff;
  border-color: #9ac3f5;
}

.news-detail-share__item--twitter:hover,
.news-detail-share__item--twitter:focus-visible {
  background-color: #f4f4f5;
  border-color: #cbd5e1;
}

.news-detail-share__item--primary:hover,
.news-detail-share__item--primary:focus-visible {
  background-color: #003a80;
  border-color: #003a80;
  color: #ffffff;
}

/* 顶部和底部广告块 */
.detail-ad {
  background-color: #E6E6E6;
  padding: 50px;
  position: relative;
}

.detail-ad--top .detail-ad__layout {
  position: relative;
  width: 100%;
}

.detail-ad--top .detail-ad__card {
  width: 100%;
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(15, 36, 63, 0.22);
  overflow: hidden;
}

.detail-ad__image-wrap {
  position: relative;
  width: 100%;
}

.detail-ad__image-wrap img {
  width: 100%;
  height: auto;
  display: block;
}

.detail-ad__badge {
  position: absolute;
  left: 16px;
  bottom: 16px;
  padding: 0px 12px;
  border-radius: 4px;
  background-color: #0057b8;
  color: #ffffff;
  font-size: 10px;
  letter-spacing: 0.8px;
}

/* 关闭按钮定位到右上角 */
.detail-ad__close-block {
  position: absolute;
  top: 16px;
  right: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  background: transparent;
  border: none;
  color: #777777;
  font-size: 10px;
  letter-spacing: 0.8px;
  cursor: pointer;
  z-index: 10;
}

.detail-ad__close-circle {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(255, 255, 255, 0.9);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.detail-ad__close-circle i {
  font-size: 16px;
  color: #666;
}

.detail-ad__close-text {
  text-transform: uppercase;
  color: #777777;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.detail-ad__close-block:hover .detail-ad__close-circle {
  background-color: #ffffff;
}

.detail-ad__close-block:hover .detail-ad__close-circle i {
  color: #004494;
}

.detail-ad--bottom .detail-ad__inner {
  background-color: #ffffff;
}

/* 内联广告（插入到正文中间） - 外层撑满 xinde-container-md，内层图片最大 1000px 靠左 */
.news-detail-inline-ad {
  margin: 32px 0;
  padding: 50px 40px;
  background-color: #e6e6e6;
  position: relative;
  /* 突破父容器限制，撑满 xinde-container-md 的宽度 (1440px) */
  width: 100vw;
  max-width: 1440px;
  left: 50%;
  transform: translateX(-50%);
  box-sizing: border-box;
}

.news-detail-inline-ad .detail-ad__layout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.news-detail-inline-ad .detail-ad__card {
  flex: 0 1 auto;
  width: 1440px;
  border-radius: 8px;
  overflow: hidden;
  background: transparent;
  box-shadow: none;
}

.news-detail-inline-ad .detail-ad__card a {
  display: block;
  line-height: 0;
}

.news-detail-inline-ad .detail-ad__card img {
  max-width: 100%;
  height: auto;
  display: block;
}

.news-detail-inline-ad .detail-ad__close-block {
  flex-shrink: 0;
}

/* 关联文章三条 */
.detail-related-block {
  background-color: #ffffff;
  padding: 24px 0 32px;
}

.detail-related-block__inner {
  background-color: #ffffff;
  padding-top: 0;
}

.detail-related-divider {
  height: 1px;
  background-color: #EEEEEE;
  margin: 16px 0;
}

.detail-related-block__label {
  margin: 30px 0 20px 0;
  font-size: 14px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #999999;
}

.detail-related-block__copyright {
  margin: 10px 0 8px;
}

.detail-related-block__copyright a {
  font-size: 14px;
  color: #35567f;
  text-decoration: underline !important;
}

.detail-related-block__copyright a:hover {
  color: #004494;
}

.detail-related-item {
  display: flex;
  gap: 15px;
  margin: 8px 0;
  text-decoration: none;
  color: inherit;
  padding: 15px;
  border-radius: 8px;
  background-color: #EEEEEE;
}

.detail-related-item:hover,
.detail-related-item:focus-visible {
  box-shadow: 0 0 0 2px #004494;
}

.detail-related-item__image {
  flex: 0 0 160px;
  width: 160px;
  height: 90px;
  border-radius: 6px;
  overflow: hidden;
}

.detail-related-item__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.detail-related-item__content {
  flex: 1;
  padding: 6px 0;
  display: flex;
  align-items: center;
}

.detail-related-item__title {
  font-size: 20px;
  line-height: 1.7;
  display: -webkit-box;
  color: #000;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.detail-related-block__more {
  margin-top: 30px;
  text-align: right;
}

.detail-related-block__button {
  min-width: 150px;
  border-radius: 12px;
  border: 1px solid #004494;
  background-color: transparent;
  color: #004494;
  font-size: 16px;
  cursor: pointer;
  padding: 12px 20px;
}

/* 底部查看更多 3x3 */
.detail-more-grid {
  padding: 30px 0 40px;
}

.detail-more-grid__title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 16px;
}

.detail-more-grid__list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.detail-more-card {
  background-color: #ffffff;
  border-radius: 8px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 6px 18px rgba(15, 36, 63, 0.08);
}

.detail-more-card__image {
  height: 160px;
  overflow: hidden;
}

.detail-more-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.detail-more-card__body {
  padding: 12px 14px 16px;
}

.detail-more-card__title {
  font-size: 14px;
  line-height: 1.6;
}


@media (max-width: 1200px) {
  .detail-layout {
    padding: 32px 24px;
  }

  .news-detail-shell {
    padding: 24px 12px;
  }

  .detail-ad {
    padding: 30px;
  }
}

@media (max-width: 1024px) {
  .detail-more-grid__list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .detail-ad {
    padding: 20px;
  }
}

@media (max-width: 768px) {
  .detail-layout {
    padding: 14px 10px;
  }

  .news-detail-shell {
    padding: 10px 6px;
    gap: 8px;
  }

  .breadcrumb-bar .page-title {
    font-size: 15px;
    line-height: 1.2;
  }

  .news-detail-title {
    font-size: 24px;
    line-height: 1.35;
  }

  .news-detail-summary {
    font-size: 20px;
    line-height: 1.5;
    margin: 2px 0 6px;
    color: #374151;
  }

  .news-detail-author-bar {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 10px;
    font-size: 14px;
  }

  .news-detail-author {
    gap: 8px;
    min-width: 0;
  }

  .news-detail-author__avatar {
    width: 38px;
    height: 38px;
  }

  .news-detail-author__name {
    font-size: 16px;
    line-height: 1.2;
  }

  .news-detail-publish {
    gap: 6px;
    white-space: nowrap;
    flex-shrink: 0;
    font-size: 14px;
  }

  .news-detail-publish__label,
  .news-detail-publish time,
  .news-detail-publish__time {
    font-size: 14px;
  }

  /* 移动端：标签和分享改为垂直排列 */
  .news-detail-tags-share-row {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    margin-bottom: 8px;
  }

  .news-detail-share {
    justify-content: flex-start;
  }

  .news-detail-body {
    font-size: 20px;
    line-height: 1.85;
  }

  /* 编辑器常见的内联大字号在移动端做统一收敛 */
  .news-detail-body p,
  .news-detail-body li,
  .news-detail-body div,
  .news-detail-body span {
    font-size: inherit !important;
    line-height: inherit !important;
  }

  .news-detail-body p,
  .news-detail-body li,
  .news-detail-body blockquote {
    max-width: none;
    margin-left: 0;
    margin-right: 0;
  }

  .news-detail-body h1,
  .news-detail-body h2,
  .news-detail-body h3,
  .news-detail-body h4,
  .news-detail-body h5,
  .news-detail-body h6 {
    line-height: 1.35 !important;
  }

  .news-detail-body h1 {
    font-size: 1.5em !important;
  }

  .news-detail-body h2 {
    font-size: 1.35em !important;
  }

  .news-detail-body h3 {
    font-size: 1.2em !important;
  }

  .detail-ad {
    padding: 10px;
  }

  .detail-ad__inner {
    padding: 20px 12px;
  }

  .detail-related-block {
    padding: 16px 0 24px;
  }

  .detail-related-item {
    flex-direction: column;
    padding: 12px;
  }

  .detail-related-item__image {
    flex: none;
    width: 100%;
    height: auto;
    aspect-ratio: 16/9;
  }

  .detail-related-item__title {
    font-size: 16px;
  }

  .detail-more-grid__list {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }

  .detail-more-card__body {
    padding: 10px 12px 14px;
  }
}

@media (max-width: 480px) {
  .detail-layout {
    padding: 10px 6px;
  }

  .news-detail-shell {
    padding: 10px 4px;
  }

  .news-detail-title {
    font-size: 22px;
    line-height: 1.35;
  }

  .news-detail-summary {
    font-size: 20px;
    line-height: 1.45;
    margin: 2px 0 6px;
  }

  .news-detail-body {
    font-size: 20px;
    line-height: 1.8;
  }

  .news-detail-body p,
  .news-detail-body li,
  .news-detail-body blockquote {
    max-width: none;
    margin-left: 0;
    margin-right: 0;
  }

  .news-detail-cover img {
    border-radius: 6px;
  }

  .news-detail-author-bar {
    padding: 8px 10px;
    border-radius: 8px;
    gap: 8px;
    font-size: 13px;
  }

  .news-detail-author__avatar {
    width: 34px;
    height: 34px;
  }

  .news-detail-author__name {
    font-size: 14px;
  }

  .news-detail-publish,
  .news-detail-publish__label,
  .news-detail-publish time,
  .news-detail-publish__time {
    font-size: 13px;
  }

  .news-detail-tags {
    gap: 6px;
  }

  .news-detail-tag {
    font-size: 11px;
    padding: 3px 8px;
  }

  .news-detail-share {
    gap: 6px;
  }

  .news-detail-share__item {
    width: 36px;
    height: 36px;
  }

  .news-detail-share__item i {
    font-size: 18px;
  }
}

/* 分享弹窗样式 */
.share-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
}

.share-modal {
  background-color: #ffffff;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  min-width: 320px;
  max-width: 90vw;
  overflow: hidden;
}

.share-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid #eee;
}

.share-modal__header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: #333;
}

.share-modal__close {
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #666;
  transition: background-color 0.2s;
}

.share-modal__close:hover {
  background-color: #f5f5f5;
}

.share-modal__close i {
  font-size: 20px;
}

.share-modal__body {
  padding: 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.share-modal__qrcode {
  width: 200px;
  height: 200px;
  background-color: #f5f5f5;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.share-modal__qrcode img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.share-modal__tip {
  margin: 0;
  font-size: 14px;
  color: #666;
  text-align: center;
}

/* Toast 提示样式 */
.share-toast {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background-color: rgba(0, 0, 0, 0.8);
  color: #ffffff;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 14px;
  z-index: 10001;
  opacity: 0;
  transition: opacity 0.3s, transform 0.3s;
  pointer-events: none;
}

.share-toast--visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
