.news-detail-body .breadcrumbs h2 {
  font-size: clamp(32px, 4vw, 44px);
}

.news-detail-body .breadcrumbs ol {
  max-width: 100%;
}

.news-detail-body .breadcrumbs ol li:last-child {
  max-width: min(520px, 50vw);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.news-detail-page {
  padding: 48px 0 72px;
  background: #f5f8fb;
}

.news-detail-page .news-detail-back {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
  font-size: 14px;
  font-weight: 600;
}

.news-detail-page .blog-details,
.news-detail-page .sidebar-item,
.news-detail-page .post-author {
  background: #fff;
  border: 1px solid #e1e9f0;
  border-radius: 16px;
  box-shadow: 0 6px 24px rgba(21, 77, 124, 0.05);
}

.news-detail-page .blog-details {
  padding: 32px;
  min-width: 0;
}

.news-detail-page .article-category {
  display: inline-block;
  padding: 6px 12px;
  margin-bottom: 16px;
  border-radius: 6px;
  background: #edf5fb;
  color: var(--color-primary);
  font-size: 13px;
  font-weight: 600;
}

.news-detail-page .blog-details .title {
  margin: 0;
  color: #20384b;
  font-size: clamp(24px, 2.5vw, 34px);
  line-height: 1.4;
  text-align: left;
  overflow-wrap: anywhere;
}

.news-detail-page .blog-details .meta-top {
  margin: 20px 0 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid #e8eef4;
  color: #607383;
  font-size: 13px;
}

.news-detail-page .blog-details .meta-top ul {
  gap: 12px 20px;
}

.news-detail-page .blog-details .meta-top ul li + li {
  padding-left: 0;
}

.news-detail-page .blog-details .meta-top li {
  min-width: 0;
  overflow-wrap: anywhere;
}

.news-detail-page .blog-details .meta-top a {
  color: #607383;
  font-size: inherit;
  line-height: 1.6;
}

.news-detail-page .blog-details .post-img {
  height: auto;
  margin: 0 0 28px;
  border-radius: 12px;
  background: #f1f5f9;
}

.news-detail-page .blog-details .post-img img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 600px;
  object-fit: contain;
}

.news-detail-page .blog-details .content {
  margin: 0;
  color: #364d59;
  font-size: 16px;
  line-height: 1.85;
  text-align: left;
  overflow-wrap: anywhere;
}

.news-detail-page .blog-details .content p,
.news-detail-page .blog-details .content ul,
.news-detail-page .blog-details .content ol {
  margin-bottom: 20px;
}

.news-detail-page .blog-details .content h2,
.news-detail-page .blog-details .content h3,
.news-detail-page .blog-details .content h4 {
  margin: 28px 0 14px;
  color: #20384b;
  line-height: 1.5;
}

/* CMS images may have fixed dimensions; keep them within the article column. */
.news-detail-page .blog-details .content img {
  max-width: 100% !important;
  height: auto !important;
  border-radius: 10px;
}

.news-detail-page .blog-details .content figure {
  max-width: 100%;
  margin: 28px 0;
}

.news-detail-page .blog-details .content figcaption {
  margin-top: 10px;
  color: #607383;
  font-size: 13px;
  line-height: 1.7;
  text-align: center;
}

.news-detail-page .blog-details .content iframe,
.news-detail-page .blog-details .content video {
  max-width: 100%;
}

.news-detail-page .blog-details .content table,
.news-detail-page .blog-details .content pre {
  display: block;
  max-width: 100%;
  overflow-x: auto;
}

.news-detail-page .blog-details .content blockquote {
  padding: 24px;
  margin: 24px 0;
  border-radius: 10px;
  background: #edf5fb;
  text-align: left;
}

.news-detail-page .blog-details .content blockquote p {
  font-size: 18px;
  line-height: 1.75;
  text-align: left;
}

.news-detail-page .blog-details .meta-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 28px;
  padding-top: 24px;
  border-color: #e8eef4;
}

.news-detail-page .blog-details .meta-bottom .cats,
.news-detail-page .blog-details .meta-bottom .tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
}

.news-detail-page .blog-details .meta-bottom .tags li + li::before {
  content: none;
}

.news-detail-page .blog-details .meta-bottom a {
  display: inline-block;
  padding: 5px 10px;
  border-radius: 6px;
  background: #f1f5f9;
  color: var(--color-primary);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.news-detail-page .sidebar {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 0;
  box-shadow: none;
}

.news-detail-page .sidebar .sidebar-item {
  padding: 24px;
  margin: 0;
}

.news-detail-page .sidebar .sidebar-item + .sidebar-item {
  margin-top: 0;
}

.news-detail-page .sidebar .sidebar-title {
  padding-bottom: 14px;
  border-bottom: 1px solid #e8eef4;
  color: #20384b;
  font-size: 19px;
}

.news-detail-page .sidebar h5 {
  font-size: 15px;
  font-weight: 600;
}

.news-detail-page .sidebar p {
  line-height: 1.7;
  overflow-wrap: anywhere;
}

.news-detail-page .sidebar .search-form form {
  display: flex;
  padding: 0;
  border: 1px solid #d7e2ec;
  border-radius: 8px;
  overflow: hidden;
}

.news-detail-page .sidebar .search-form input[type=search] {
  flex: 1;
  min-width: 0;
  width: 100%;
  padding: 12px;
  border: 0;
  background: #fbfcfe;
  font-size: 14px;
}

.news-detail-page .sidebar .search-form form:focus-within {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(21, 77, 124, 0.12);
}

.news-detail-page .sidebar .search-form input[type=search]:focus {
  outline: none;
}

.news-detail-page .sidebar .search-form form button {
  position: static;
  flex: 0 0 44px;
  min-height: 44px;
  margin: 0;
  padding: 0;
  border-radius: 0;
}

.news-detail-page .sidebar .categories ul li + li {
  padding-top: 12px;
}

.news-detail-page .sidebar .categories ul a {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  color: #435b6d;
  font-size: 14px;
  line-height: 1.7;
  overflow-wrap: anywhere;
}

.news-detail-page .sidebar .categories ul a span {
  flex-shrink: 0;
  color: #607383;
}

.news-detail-page .sidebar .recent-posts .post-item {
  position: relative;
  gap: 12px;
  align-items: flex-start;
}

.news-detail-page .sidebar .recent-posts .post-item > div {
  min-width: 0;
}

.news-detail-page .sidebar .recent-posts img {
  flex: 0 0 88px;
  width: 88px;
  min-width: 88px;
  height: 66px;
  margin: 0;
  border-radius: 8px;
}

.news-detail-page .sidebar .recent-posts h4 {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
  margin: 0 0 6px;
  font-size: 14px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.news-detail-page .sidebar .recent-posts h4 a {
  color: #20384b;
}

.news-detail-page .sidebar .recent-posts time {
  color: #607383;
  font-size: 12px;
  font-style: normal;
  line-height: 1.6;
}

.news-detail-page .post-author {
  gap: 16px;
  padding: 24px;
  margin-top: 24px;
}

.news-detail-page .post-author img {
  width: 72px;
  height: 72px;
  margin: 0;
  object-fit: cover;
}

.news-detail-page .post-author > div {
  min-width: 0;
  overflow-wrap: anywhere;
}

.news-detail-page .post-author h4 {
  font-size: 18px;
  line-height: 1.5;
}

.news-detail-page .post-author p {
  font-size: 14px;
  font-style: normal;
  line-height: 1.7;
}

.news-detail-page a:focus-visible,
.news-detail-page button:focus-visible {
  outline: 3px solid #2a7bc4;
  outline-offset: 3px;
}

@media (max-width: 767px) {
  .news-detail-body .breadcrumbs ol li:last-child {
    display: none;
  }

  .news-detail-page {
    padding: 32px 0 48px;
  }

  .news-detail-page .blog-details,
  .news-detail-page .sidebar .sidebar-item,
  .news-detail-page .post-author {
    padding: 20px;
  }

  .news-detail-page .blog-details .content {
    font-size: 15px;
    line-height: 1.8;
  }

  .news-detail-page .blog-details .content blockquote {
    padding: 20px;
  }

  .news-detail-page .post-author {
    align-items: flex-start !important;
  }
}

/* ------------------------------------------------------------------
   Bố cục kiểu bài báo (06/11/2026): ảnh bìa lớn, chữ cột vừa mắt,
   ảnh nằm đúng chỗ trong bài, cụm ảnh thành lưới, bấm để phóng to
------------------------------------------------------------------- */
.news-detail-page .article-cover {
  margin: 0 0 32px;
  border-radius: 14px;
  overflow: hidden;
  background: #eef2f6;
}

.news-detail-page .article-cover img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 520px;
  object-fit: cover;
  border-radius: 0 !important;
}

/* Dòng chữ khoảng 70 ký tự cho dễ đọc; ảnh vẫn rộng hết cột */
.news-detail-page .blog-details .content {
  font-size: 17px;
}

.news-detail-page .blog-details .content > p,
.news-detail-page .blog-details .content > ul,
.news-detail-page .blog-details .content > ol,
.news-detail-page .blog-details .content > h2,
.news-detail-page .blog-details .content > h3,
.news-detail-page .blog-details .content > h4,
.news-detail-page .blog-details .content > blockquote {
  max-width: 70ch;
}

.news-detail-page .article-lightbox {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 10px;
  background: #eef2f6;
  cursor: zoom-in;
}

.news-detail-page .article-lightbox img {
  display: block;
  width: 100%;
  border-radius: 0 !important;
  transition: transform 0.5s ease;
}

.news-detail-page .article-lightbox:hover img {
  transform: scale(1.03);
}

.news-detail-page .article-photo {
  margin: 28px 0;
}

.news-detail-page .article-photo img {
  max-height: 560px;
  object-fit: cover;
}

.news-detail-page .article-inline {
  display: inline-block;
  max-width: 100%;
  vertical-align: middle;
}

/* Lưới ảnh: 2 ảnh = 2 cột; 3 ảnh = 1 lớn + 2 nhỏ; 4 ảnh = 2x2; 5 ảnh trở lên = 1 lớn + 4 nhỏ */
.news-detail-page .article-photos {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-auto-rows: 200px;
  gap: 8px;
  margin: 28px 0;
}

.news-detail-page .article-photos .article-lightbox {
  height: 100%;
  border-radius: 8px;
}

.news-detail-page .blog-details .content .article-photos img {
  height: 100% !important;
  object-fit: cover;
}

.news-detail-page .article-photos[data-count="2"] {
  grid-auto-rows: 260px;
}

.news-detail-page .article-photos[data-count="3"] .article-lightbox:first-child {
  grid-row: span 2;
}

.news-detail-page .article-photos[data-count="5"] {
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 170px;
}

.news-detail-page .article-photos[data-count="5"] .article-lightbox:first-child {
  grid-column: span 2;
  grid-row: span 2;
}

.news-detail-page .article-photos .is-hidden {
  display: none;
}

/* Ô cuối có ảnh dư: phủ tối và hiện "+N" */
.news-detail-page .article-photos .has-more::after {
  content: attr(data-more);
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(8, 25, 45, 0.55);
  color: #fff;
  font-size: 28px;
  font-weight: 700;
  transition: background 0.3s ease;
}

.news-detail-page .article-photos .has-more:hover::after {
  background: rgba(8, 25, 45, 0.4);
}

@media (max-width: 575px) {
  .news-detail-page .blog-details .content {
    font-size: 16px;
  }

  .news-detail-page .article-photos,
  .news-detail-page .article-photos[data-count="2"] {
    grid-auto-rows: 140px;
  }

  .news-detail-page .article-photos[data-count="5"] {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 120px;
  }

  .news-detail-page .article-photos[data-count="5"] .article-lightbox:first-child {
    grid-row: span 1;
  }
}
