/* news-detail-refactor.css */

.zs-page-banner {
  position: relative;
  text-align: center; /* Original title was centered */
  padding: 100px 0;
  display: flex;
  justify-content: center;
  align-items: center;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.zs-page-banner::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  /* background: rgba(0, 0, 0, 0.4); */
}

.zs-page-banner .zs-container {
  position: relative;
  z-index: 1;
}

.zs-page-title {
  font-size: 40px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 20px;
  text-align: center;
}

.zs-post-info {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  color: #fff;
  font-size: 15px;
}

.zs-post-info span {
  display: flex;
  align-items: center;
  gap: 8px;
}

.zs-post-info svg {
  color: #4285f4;
}

/* Detail Layout */
.zs-news-detail-section {
  padding: 60px 0;
  background: #fcfcfc;
}

.zs-news-detail-layout {
  display: flex;
  gap: 40px;
  align-items: flex-start;
}

.zs-article-content {
  flex: 1;
  font-size: 16px;
  line-height: 1.8;
  color: #333;
  max-width: 100%;
}

.zs-article-content h2 {
  font-size: 28px;
  font-weight: 600;
  color: #222;
  margin: 40px 0 20px;
}

.zs-article-content h3 {
  font-size: 22px;
  font-weight: 600;
  color: #222;
  margin: 30px 0 15px;
}

.zs-article-content p {
  margin-bottom: 20px;
}

.zs-article-content ul, .zs-article-content ol {
  margin-bottom: 20px;
  padding-left: 20px;
}

.zs-article-content li {
  margin-bottom: 10px;
}

.zs-article-content img {
  max-width: 100%;
  height: auto;
  margin: 20px 0;
}

.zs-article-content figure {
  margin: 0 0 30px;
}

/* Sidebar / TOC */
.zs-sidebar {
  width: 300px;
  flex-shrink: 0;
  position: sticky;
  top: 100px; /* For sticky effect */
}

.zs-toc {
  background: #f8f9fa;
  border-radius: 8px;
  border: 1px solid #eaeaea;
  overflow: hidden;
}

.zs-toc-title {
  font-size: 18px;
  font-weight: 700;
  color: #333;
  margin: 0;
  padding: 15px 20px;
  background: #f1f1f1;
  border-bottom: 1px solid #eaeaea;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.zs-toc-title::after {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  border-top: 2px solid #666;
  border-left: 2px solid #666;
  transform: rotate(45deg);
  margin-top: 4px;
}

.zs-toc-body {
  padding: 20px;
}

.zs-toc-body ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.zs-toc-body li {
  margin-bottom: 16px;
}

.zs-toc-body li:last-child {
  margin-bottom: 0;
}

.zs-toc-body a {
  color: #666;
  text-decoration: none;
  font-size: 15px;
  transition: color 0.3s;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  line-height: 1.4;
}

.zs-toc-body a:hover,
.zs-toc-body a.is-active {
  color: #4285f4;
}

.zs-toc-number {
  flex-shrink: 0;
  font-weight: 400;
}

.zs-toc-text {
  font-weight: 400;
}

/* Related Posts */
.zs-related-posts {
  padding: 60px 0;
  background: #fff;
}

.zs-related-title {
  font-size: 32px;
  font-weight: 600;
  text-align: center;
  margin-bottom: 40px;
  color: #222;
}

.zs-related-posts .zs-news-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.zs-news-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  box-shadow: 0px 4px 15px 0px rgba(0, 0, 0, 0.1);
  transition: box-shadow 0.3s ease;
  height: 100%;
  border-radius: 3px;
  overflow: hidden;
  padding: 0;
}

.zs-news-card:hover {
  box-shadow: 0px 2px 25px 0px rgba(0, 0, 0, 0.2);
}

.zs-news-card-img {
  width: 100%;
  height: 200px;
  overflow: hidden;
  margin-bottom: 20px;
}

.zs-news-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: all 0.3s ease;
}

.zs-news-card:hover .zs-news-card-img img {
  transform: scale(1.05);
}

.zs-news-card-title {
  font-size: 18px;
  font-weight: 500;
  color: #333;
  margin: 0 20px 20px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.zs-news-card-title a {
  color: inherit;
  text-decoration: none;
}

.zs-news-card-title a:hover {
  color: #4285f4;
}

.zs-btn-readmore {
  margin-top: auto;
  align-self: flex-start;
  padding: 0 20px 25px;
  font-size: 13px;
  color: #4285f4;
  text-decoration: none;
  font-weight: 400;
  text-transform: uppercase;
  transition: color 0.3s ease;
}

.zs-btn-readmore:hover {
  color: #0056b3;
}

@media (max-width: 1024px) {
  .zs-news-detail-layout {
    flex-direction: column;
  }
  .zs-sidebar {
    width: 100%;
    position: static;
  }
  .zs-related-posts .zs-news-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 767px) {
  .zs-related-posts .zs-news-grid {
    grid-template-columns: 1fr;
  }
}
