/* ========== Detail Hero ========== */
.page-hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #0d2133;
}

.page-hero__bg {
  position: absolute;
  inset: 0;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}

.page-hero__overlay {
  position: absolute;
  inset: 0;
}

.page-hero--detail {
  height: 560px;
}

.page-hero--detail .page-hero__overlay {
  background: rgba(0, 0, 0, 0.35);
}

.page-hero--detail .page-hero__content {
  display: none;
}

/* ========== Detail Layout ========== */
.news-detail {
  position: relative;
  z-index: 2;
  padding-bottom: 80px;
}

.news-detail__panel {
  padding: 48px 40px 56px;
  background: var(--color-white);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
}

.news-detail__article.news-detail__panel {
  min-width: 0;
  margin-top: -120px;
}

.news-detail__layout {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr) 240px;
  gap: 40px 32px;
  align-items: start;
}

/* ========== Left TOC ========== */
.news-detail__toc {
  position: sticky;
  top: 112px;
  align-self: start;
  padding-top: 48px;
}

.news-detail__toc-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  font-size: 14px;
  font-weight: 700;
  color: var(--color-text);
}

.news-detail__toc-head span {
  color: var(--color-border);
  font-weight: 400;
}

.news-detail__toc-toggle {
  padding: 0;
  background: none;
  border: none;
  font-size: 14px;
  font-weight: 400;
  color: var(--color-text-muted);
  cursor: pointer;
  transition: color var(--transition);
}

.news-detail__toc-toggle:hover {
  color: var(--color-primary);
}

.news-detail__toc-nav {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.news-detail__toc-nav.is-hidden {
  display: none;
}

.news-detail__toc-nav a {
  font-size: 14px;
  line-height: 1.5;
  color: var(--color-text-muted);
  transition: color var(--transition);
}

.news-detail__toc-nav a:hover {
  color: var(--color-primary);
}

/* ========== Article ========== */
.news-detail__title {
  margin-bottom: 20px;
  font-size: clamp(24px, 2.4vw, 32px);
  font-weight: 700;
  line-height: 1.35;
  color: var(--color-text);
}

.news-detail__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--color-border);
  font-size: 14px;
  color: var(--color-text-muted);
}

.news-detail__meta-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.news-detail__meta-item svg {
  flex-shrink: 0;
  opacity: 0.7;
}

.news-detail__meta-item a {
  color: var(--color-primary);
  font-weight: 500;
}

.news-detail__meta-item a:hover {
  opacity: 0.85;
}

.news-detail__content {
  font-size: 16px;
  line-height: 1.75;
  color: var(--color-text);
}

.news-detail__content p {
  margin-bottom: 20px;
}

.news-detail__content h2 {
  margin: 36px 0 16px;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--color-text);
}

.news-detail__content h2:first-child {
  margin-top: 0;
}

.news-detail__content img {
  display: block;
  width: 100%;
  margin: 28px 0;
  border-radius: 4px;
}

.news-detail__content ul {
  margin: 0 0 20px 20px;
}

.news-detail__content li {
  margin-bottom: 8px;
}

/* ========== Right Sidebar ========== */
.news-detail__sidebar {
  display: flex;
  flex-direction: column;
  gap: 36px;
  padding-top: 48px;
}

.news-detail__search {
  display: flex;
  align-items: stretch;
}

.news-detail__search-input {
  flex: 1;
  min-width: 0;
  padding: 12px 16px;
  background: #eef0f2;
  border: none;
  border-radius: 4px 0 0 4px;
  font-size: 15px;
  color: var(--color-text);
  outline: none;
}

.news-detail__search-input::placeholder {
  color: #999999;
}

.news-detail__search-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  background: #222222;
  border: none;
  border-radius: 0 4px 4px 0;
  color: var(--color-white);
  cursor: pointer;
  transition: background var(--transition);
}

.news-detail__search-btn:hover {
  background: #000000;
}

.news-detail__author {
  text-align: center;
}

.news-detail__author-avatar,
.news-detail__author-avatar-img {
  display: block;
  width: 120px;
  height: 120px;
  margin: 0 auto 16px;
  border-radius: 50%;
}

.news-detail__author-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #dde3e8 0%, #c5cdd4 100%);
  font-size: 36px;
  font-weight: 700;
  color: #5a6670;
}

.news-detail__author-avatar-img {
  object-fit: cover;
}

.news-detail__author-name {
  margin-bottom: 14px;
  font-size: 22px;
  font-weight: 700;
  color: var(--color-text);
}

.news-detail__author-bio {
  margin-bottom: 14px;
  font-size: 15px;
  line-height: 1.65;
  color: var(--color-text-muted);
}

.news-detail__author-link {
  font-size: 15px;
  font-weight: 600;
  color: var(--color-primary);
}

.news-detail__author-link:hover {
  opacity: 0.85;
}

.news-detail__widget-title {
  margin-bottom: 20px;
  font-size: 18px;
  font-weight: 700;
  color: var(--color-text);
}

.news-detail__recent {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.news-detail__recent-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.news-detail__recent-thumb {
  flex-shrink: 0;
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 2px;
}

.news-detail__recent-title {
  font-size: 14px;
  font-weight: 500;
  line-height: 1.45;
  color: var(--color-text);
  transition: color var(--transition);
}

.news-detail__recent-item:hover .news-detail__recent-title {
  color: var(--color-primary);
}

.news-detail__share-list {
  display: flex;
  gap: 12px;
}

.news-detail__share-list a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #eef0f2;
  color: var(--color-text-muted);
  transition: background var(--transition), color var(--transition);
}

.news-detail__share-list a:hover {
  background: var(--color-primary);
  color: var(--color-white);
}

.news-detail__share-list img {
  display: block;
  width: 18px;
  height: 18px;
  object-fit: contain;
}

.news-detail__follow-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.news-detail__follow-list a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--color-border);
  border-radius: 50%;
  color: var(--color-text-muted);
  transition: border-color var(--transition), color var(--transition);
}

.news-detail__follow-list a:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.news-detail__follow-list img {
  display: block;
  width: 18px;
  height: 18px;
  object-fit: contain;
}


@media (max-width: 1100px) {
  .news-detail__layout {
    grid-template-columns: 160px minmax(0, 1fr) 220px;
    gap: 32px 28px;
  }
}

@media (max-width: 960px) {
  .news-detail__article.news-detail__panel {
    margin-top: -60px;
  }

  .news-detail__panel {
    padding: 32px 24px 48px;
  }

  .news-detail__layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 40px;
  }

  .news-detail__toc {
    position: static;
    padding-top: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--color-border);
  }

  .news-detail__sidebar {
    padding-top: 0;
    border-top: 1px solid var(--color-border);
  }
}

@media (max-width: 640px) {
  .page-hero--detail {
    height: 320px;
  }

  .news-detail__article.news-detail__panel {
    margin-top: -40px;
  }
}
