/* Tin tức — trang danh sách (/tin-tuc) và trang bài viết (/tin-tuc/<slug>). HTML do cms-server dựng sẵn. */

.news-section { padding: 40px 0 80px; }

/* Nút dùng riêng ở trang tin tức */
.news-section .btn-outline { background: var(--white); color: var(--navy); border: 2px solid var(--gold); }
.news-section .btn-outline:hover { background: var(--menu-hover); }
.news-section .btn-sm { padding: 8px 14px; font-size: .82rem; }

/* Thanh chủ đề */
.news-topics { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 32px; }
.news-topics a {
  padding: 8px 18px; border-radius: 999px; font-size: .88rem; font-weight: 600;
  color: var(--navy-soft); background: var(--white); border: 1px solid var(--menu-border);
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}
.news-topics a:hover { border-color: var(--gold); color: var(--gold-dark); }
.news-topics a.active { background: var(--navy); border-color: var(--navy); color: var(--white); }

/* Lưới bài viết */
.news-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
.news-card {
  display: flex; flex-direction: column; background: var(--white); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow-sm); border: 1px solid var(--gray-light);
  transition: transform var(--transition), box-shadow var(--transition);
}
.news-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.news-card-media { display: block; aspect-ratio: 16 / 9; background: var(--gray-pale); overflow: hidden; }
.news-card-media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .6s ease; }
.news-card:hover .news-card-media img { transform: scale(1.04); }
.news-card-noimg {
  display: flex; width: 100%; height: 100%; align-items: center; justify-content: center;
  font-weight: 900; letter-spacing: .2em; color: var(--menu-border); background: var(--gradient-dark);
}
.news-card-body { display: flex; flex-direction: column; gap: 10px; padding: 20px 22px 22px; flex: 1; }
.news-card-topic { align-self: flex-start; font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--gold-dark); }
.news-card-title { font-size: 1.12rem; font-weight: 800; line-height: 1.4; color: var(--navy); }
.news-card-title a:hover { color: var(--gold-dark); }
.news-card-excerpt {
  font-size: .9rem; line-height: 1.65; color: var(--gray);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.news-card-meta { margin-top: auto; font-size: .8rem; color: var(--gray); }

.news-empty { text-align: center; padding: 60px 20px; color: var(--gray); background: var(--white); border-radius: var(--radius); border: 1px dashed var(--menu-border); }
.news-empty h2 { font-size: 1.2rem; color: var(--navy); margin-bottom: 8px; }

/* Phân trang */
.news-pager { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin-top: 40px; }
.news-pager a, .news-pager span {
  min-width: 40px; height: 40px; padding: 0 12px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 10px; font-weight: 700; font-size: .9rem; border: 1px solid var(--gray-light); background: var(--white); color: var(--navy-soft);
}
.news-pager a:hover { border-color: var(--gold); color: var(--gold-dark); }
.news-pager span[aria-current] { background: var(--gold); border-color: var(--gold); color: var(--white); }

/* Trang bài viết */
.news-article-narrow { max-width: 820px; }
.news-article-hero h1 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); line-height: 1.3; }
.news-article-topic { display: inline-block; margin-bottom: 12px; font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--gold-dark); }
.news-article-meta { font-size: .88rem; color: var(--gray); }
.news-article-cover { margin: 0 0 32px; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.news-article-cover img { width: 100%; display: block; }

.news-article-body { font-size: 1.05rem; line-height: 1.85; color: var(--navy-soft); }
.news-article-body > * + * { margin-top: 1.1em; }
.news-article-body h2 { font-size: 1.5rem; line-height: 1.35; font-weight: 800; color: var(--navy); margin-top: 1.8em; }
.news-article-body h3 { font-size: 1.22rem; line-height: 1.4; font-weight: 800; color: var(--navy); margin-top: 1.5em; }
.news-article-body h4 { font-size: 1.05rem; font-weight: 800; color: var(--navy); margin-top: 1.3em; }
.news-article-body a { color: var(--gold-dark); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.news-article-body ul, .news-article-body ol { padding-left: 1.4em; }
.news-article-body ul { list-style: disc; }
.news-article-body ol { list-style: decimal; }
.news-article-body li + li { margin-top: .4em; }
.news-article-body img { max-width: 100%; height: auto; border-radius: var(--radius-sm); display: block; margin-left: auto; margin-right: auto; }
.news-article-body figcaption { font-size: .85rem; color: var(--gray); text-align: center; margin-top: 8px; }
.news-article-body blockquote { border-left: 4px solid var(--gold); background: var(--white); padding: 14px 20px; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; font-style: italic; }
.news-article-body hr { border: none; border-top: 1px solid var(--gray-light); margin: 2em 0; }
.news-article-body table { width: 100%; border-collapse: collapse; font-size: .95rem; display: block; overflow-x: auto; }
.news-article-body th, .news-article-body td { border: 1px solid var(--gray-light); padding: 10px 12px; text-align: left; }
.news-article-body th { background: var(--gray-pale); color: var(--navy); }
.news-article-body .ql-align-center { text-align: center; }
.news-article-body .ql-align-right { text-align: right; }
.news-article-body .ql-align-justify { text-align: justify; }
.news-article-body .ql-indent-1 { padding-left: 2em; }
.news-article-body .ql-indent-2 { padding-left: 4em; }
.news-article-body .ql-indent-3 { padding-left: 6em; }

.news-products { margin-top: 48px; padding: 28px; background: var(--white); border-radius: var(--radius); border: 1px solid var(--gray-light); }
.news-products h2 { font-size: 1.2rem; font-weight: 800; color: var(--navy); margin-bottom: 20px; }
.news-products-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 20px; }
.news-product { display: flex; flex-direction: column; gap: 10px; }
.news-product-media { display: block; aspect-ratio: 1; background: var(--gray-pale); border-radius: var(--radius-sm); overflow: hidden; }
.news-product-media img { width: 100%; height: 100%; object-fit: contain; }
.news-product-name { font-weight: 700; font-size: .95rem; color: var(--navy); line-height: 1.4; }
.news-product-name:hover { color: var(--gold-dark); }
.news-product-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.news-article-cta {
  margin-top: 40px; padding: 24px 28px; border-radius: var(--radius); background: var(--gradient-dark); color: var(--white);
  display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap;
}
.news-article-cta strong { display: block; font-size: 1.08rem; margin-bottom: 4px; }
.news-article-cta span { font-size: .9rem; opacity: .8; }
.news-article-cta-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.news-article-cta .btn-outline { background: transparent; color: var(--white); border-color: rgba(255,255,255,.7); }
.news-article-cta .btn-outline:hover { background: rgba(255,255,255,.12); }

.news-related { margin-top: 64px; }
.news-related h2 { font-size: 1.5rem; font-weight: 800; color: var(--navy); margin-bottom: 24px; }

@media (max-width: 1024px) { .news-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) {
  .news-grid { grid-template-columns: 1fr; gap: 20px; }
  .news-section { padding: 28px 0 60px; }
  .news-topics { flex-wrap: nowrap; overflow-x: auto; margin: 0 -20px 24px; padding: 0 20px 4px; }
  .news-topics a { white-space: nowrap; }
  .news-article-body { font-size: 1rem; }
  .news-products, .news-article-cta { padding: 20px; }
}
