/* ════════════════════════════════════════════════════════════════
   TIN TỨC — news module (theme lmhapksx)
   Dùng lại design token của theme: --surface --border --text --muted
   --accent --red --font --r --shadow. Tất cả class prefix .tt-
   ════════════════════════════════════════════════════════════════ */

.tt-wrap {
  --tt-cat: var(--cat, #ef4444);
}
.tt-wrap, .tt-wrap * { box-sizing: border-box; }

/* ── Đầu trang: breadcrumb + kicker + tiêu đề ───────────────────── */
.tt-page-head { margin-bottom: 18px; }

.tt-breadcrumb {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
  font-size: 12.5px; color: var(--muted); margin-bottom: 14px;
}
.tt-breadcrumb a { color: var(--muted); text-decoration: none; }
.tt-breadcrumb a:hover { color: var(--accent); }
.tt-breadcrumb .sep { opacity: .5; }

.tt-kicker {
  display: inline-block; font-size: 11px; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase;
  color: var(--accent); background: var(--accent-bg);
  padding: 4px 10px; border-radius: var(--r-xs);
}
.tt-page-title {
  font-size: 30px; font-weight: 700; line-height: 1.2;
  color: var(--text); margin: 12px 0 0;
}
.tt-page-desc, .tt-page-intro {
  margin-top: 12px; color: var(--muted); font-size: 14px; line-height: 1.6;
}
.tt-page-head + .tt-grid,
.tt-page-head { border-bottom: 2px solid var(--text); padding-bottom: 16px; }
.tt-empty { color: var(--muted); padding: 24px 0; }

/* ── GRID & CARD (giống ảnh mẫu) ────────────────────────────────── */
.tt-grid {
  display: grid; grid-template-columns: 1fr; gap: 26px 22px;
  margin-top: 22px;
}

.tt-card { display: flex; flex-direction: column; }

.tt-card__media {
  position: relative; display: block; overflow: hidden;
  border-radius: var(--r); aspect-ratio: 16 / 10; background: var(--bg);
  box-shadow: var(--shadow);
}
.tt-card__media img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .35s ease;
}
.tt-card:hover .tt-card__media img { transform: scale(1.05); }
.tt-card .tt-noimg {
  display: block; width: 100%; height: 100%;
  background: linear-gradient(135deg, #e8eaf0, #f5f6fa);
}

/* nhãn chuyên mục đỏ góc trên-trái */
.tt-card__cat {
  position: absolute; top: 12px; left: 12px; z-index: 2;
  font-size: 10.5px; font-weight: 700; letter-spacing: .04em;
  text-transform: uppercase; color: #fff;
  background: var(--tt-cat, #ef4444);
  padding: 5px 10px; border-radius: var(--r-xs);
  box-shadow: 0 2px 8px rgba(0,0,0,.25);
}

.tt-card__title {
  margin: 14px 0 0; font-size: 17px; font-weight: 700; line-height: 1.35;
}
.tt-card__title a {
  color: var(--text); text-decoration: none;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
  overflow: hidden;
}
.tt-card__title a:hover { color: var(--accent); }

.tt-card__excerpt {
  margin: 8px 0 0; color: var(--muted); font-size: 13.5px; line-height: 1.55;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

.tt-card__meta {
  margin-top: 10px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
  font-size: 12.5px; color: var(--muted);
}
.tt-card__meta a { color: var(--muted); font-weight: 600; text-decoration: none; }
.tt-card__meta a:hover { color: var(--accent); }
.tt-dot { opacity: .55; }

/* Bài lead (ảnh to + sapo) — chiếm cả hàng */
.tt-card.is-lead .tt-card__media { aspect-ratio: 16 / 8; }
.tt-card.is-lead .tt-card__title { font-size: 22px; }

/* ── KHỐI CHUYÊN MỤC (trang mẫu Tin tức) ───────────────────────── */
.tt-section { margin: 0 0 40px; }
.tt-section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 12px; border-bottom: 2px solid var(--tt-cat, var(--text));
  padding-bottom: 10px;
}
.tt-section-title { font-size: 21px; font-weight: 700; margin: 0; }
.tt-section-title a { color: var(--text); text-decoration: none; }
.tt-section-title a:hover { color: var(--tt-cat, var(--accent)); }
.tt-section-more {
  flex-shrink: 0; font-size: 13px; font-weight: 600;
  color: var(--tt-cat, var(--accent)); text-decoration: none;
}
.tt-section-more:hover { opacity: .8; }

/* ── NÚT XEM THÊM (AJAX) ────────────────────────────────────────── */
.tt-loadmore-wrap { display: flex; justify-content: center; margin: 34px 0 8px; }
.tt-loadmore {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--font); font-size: 14px; font-weight: 600; color: #fff;
  background: var(--accent); border: none; cursor: pointer;
  padding: 12px 28px; border-radius: 999px; transition: background .15s, opacity .15s;
}
.tt-loadmore:hover { background: var(--accent-dark); }
.tt-loadmore:disabled { cursor: default; opacity: .6; }
.tt-loadmore.tt-ended { background: var(--muted); }
.tt-spinner {
  width: 15px; height: 15px; border: 2px solid rgba(255,255,255,.4);
  border-top-color: #fff; border-radius: 50%; display: none;
}
.tt-loadmore.loading .tt-spinner { display: inline-block; animation: tt-spin .7s linear infinite; }
.tt-loadmore.loading .tt-label { opacity: .85; }
@keyframes tt-spin { to { transform: rotate(360deg); } }

/* hiệu ứng card mới chèn vào */
.tt-reveal { animation: tt-fade .45s ease both; }
@keyframes tt-fade { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ════════════════════════════════════════════════════════════════
   BÀI VIẾT ĐƠN (đọc báo)
   ════════════════════════════════════════════════════════════════ */
.tt-single .tt-article { max-width: 760px; margin: 0 auto; }

.tt-article-head { margin-bottom: 20px; }
.tt-article-cat {
  display: inline-block; margin: 10px 0; font-size: 11px; font-weight: 700;
  letter-spacing: .05em; text-transform: uppercase; color: #fff;
  background: var(--tt-cat, #ef4444); padding: 5px 11px; border-radius: var(--r-xs);
  text-decoration: none;
}
.tt-article-title { font-size: 32px; font-weight: 800; line-height: 1.22; margin: 8px 0 0; color: var(--text); }
.tt-article-dek { margin: 14px 0 0; font-size: 17px; line-height: 1.55; color: var(--muted); }

.tt-article-byline { display: flex; align-items: center; gap: 11px; margin-top: 20px; }
.tt-article-byline img { width: 40px; height: 40px; border-radius: 50%; }
.tt-byline-author { font-size: 14px; font-weight: 600; color: var(--text); display: block; }
.tt-byline-author a { color: var(--accent); text-decoration: none; }
.tt-byline-meta { font-size: 12.5px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }

.tt-hero-img {
  margin: 24px auto; max-width: 920px; border-radius: var(--r); overflow: hidden;
}
.tt-hero-img img { width: 100%; height: auto; display: block; }
.tt-hero-img figcaption { font-size: 12.5px; color: var(--muted); text-align: center; padding: 8px 4px 0; }

.tt-article-body { max-width: 760px; margin: 0 auto; }

/* Mục lục */
.tt-toc {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r); padding: 16px 18px; margin: 0 0 26px;
}
.tt-toc-title { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin-bottom: 10px; }
.tt-toc-list { list-style: none; margin: 0; padding: 0; }
.tt-toc-list li { margin: 6px 0; line-height: 1.4; }
.tt-toc-list li.lvl-3 { padding-left: 16px; }
.tt-toc-list a { color: var(--text); text-decoration: none; font-size: 14px; }
.tt-toc-list a:hover { color: var(--accent); }

/* Nội dung */
.tt-content { font-size: 16.5px; line-height: 1.75; color: #2a2d3e; }
.tt-content > * { margin-bottom: 1.1em; }
.tt-content h2 { font-size: 24px; font-weight: 700; line-height: 1.3; margin: 1.6em 0 .6em; scroll-margin-top: calc(var(--shell-h-dsk, 110px) + 16px); }
.tt-content h3 { font-size: 20px; font-weight: 700; margin: 1.4em 0 .5em; scroll-margin-top: calc(var(--shell-h-dsk, 110px) + 16px); }
.tt-content a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.tt-content img { border-radius: var(--r-sm); height: auto; }
.tt-content figcaption { font-size: 12.5px; color: var(--muted); text-align: center; }
.tt-content blockquote {
  border-left: 3px solid var(--accent); background: var(--accent-bg);
  padding: 14px 18px; border-radius: 0 var(--r-sm) var(--r-sm) 0; color: var(--text);
}
.tt-content ul, .tt-content ol { padding-left: 1.4em; }
.tt-content li { margin-bottom: .4em; }
.tt-content table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.tt-content th, .tt-content td { border: 1px solid var(--border); padding: 9px 12px; text-align: left; }
.tt-content th { background: var(--bg); font-weight: 700; }

/* Tags */
.tt-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 26px 0; }
.tt-tags a {
  font-size: 13px; color: var(--muted); background: var(--bg);
  border: 1px solid var(--border); padding: 5px 12px; border-radius: 999px; text-decoration: none;
}
.tt-tags a:hover { color: var(--accent); border-color: var(--accent); }

/* Chia sẻ */
.tt-share { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; margin: 24px 0; padding: 16px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.tt-share-label { font-weight: 700; font-size: 13px; color: var(--text); }
.tt-share a, .tt-share button {
  font-family: var(--font); font-size: 13px; font-weight: 600; cursor: pointer;
  color: var(--text); background: var(--bg); border: 1px solid var(--border);
  padding: 7px 14px; border-radius: 999px; text-decoration: none;
}
.tt-share a:hover, .tt-share button:hover { border-color: var(--accent); color: var(--accent); }
.tt-share-copy.copied { color: var(--green); border-color: var(--green); }

/* Hộp tác giả */
.tt-author-box {
  display: flex; gap: 16px; margin: 30px 0; padding: 20px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r);
}
.tt-author-avatar img { width: 72px; height: 72px; border-radius: 50%; }
.tt-author-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.tt-author-name { font-size: 18px; font-weight: 700; margin: 4px 0 6px; }
.tt-author-name a { color: var(--text); text-decoration: none; }
.tt-author-name a:hover { color: var(--accent); }
.tt-author-bio { font-size: 13.5px; color: var(--muted); line-height: 1.55; margin: 0; }

/* Liên quan + bình luận */
.tt-related { max-width: 1100px; margin: 44px auto 0; }
.tt-comments { max-width: 760px; margin: 44px auto 0; }
.tt-pagelinks { margin-top: 18px; font-weight: 600; }
.tt-pagelinks a { color: var(--accent); padding: 0 4px; }

/* ════════════════════════════════════════════════════════════════
   RESPONSIVE
   ════════════════════════════════════════════════════════════════ */
@media (min-width: 600px) {
  .tt-grid { grid-template-columns: repeat(2, 1fr); }
  .tt-card.is-lead { grid-column: 1 / -1; flex-direction: row; gap: 22px; align-items: center; }
  .tt-card.is-lead .tt-card__media { flex: 0 0 55%; }
}
@media (min-width: 900px) {
  .tt-grid { grid-template-columns: repeat(3, 1fr); }
  .tt-page-title { font-size: 36px; }
  .tt-card.is-lead .tt-card__media { flex: 0 0 58%; }
}

/* ════════════════════════════════════════════════════════════════
   KHỐI GOM BÀI VIẾT ("Thông tin thêm" + Xem thêm)
   ════════════════════════════════════════════════════════════════ */
.tt-group {
  background: #f4f5f7;
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 24px 28px;
  margin: 28px 0;
}
.tt-group-title {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.45;
  color: var(--text);
  margin: 0 0 16px;
}
.tt-group-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.tt-group-list li {
  position: relative;
  padding-left: 18px;
  margin: 0 0 14px;
  line-height: 1.5;
}
.tt-group-list li:last-child { margin-bottom: 0; }
.tt-group-list li::before {
  content: "•";
  position: absolute;
  left: 2px;
  top: -1px;
  color: var(--accent);
  font-weight: 700;
}
.tt-group-list a {
  color: var(--accent);
  text-decoration: none;
  font-size: 15px;
}
.tt-group-list a:hover { text-decoration: underline; }

/* nút Xem thêm kiểu viền trắng (khác nút card xanh đặc) */
.tt-group-more { margin-top: 18px; }
.tt-group-btn {
  background: #fff;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 9px 20px;
  font-size: 14px;
  font-weight: 600;
}
.tt-group-btn:hover { background: var(--bg); border-color: var(--muted); }
.tt-group-btn.tt-ended { background: #fff; color: var(--muted); }
.tt-group-btn .tt-spinner { border-color: rgba(0,0,0,.2); border-top-color: var(--text); }

@media (max-width: 600px) {
  .tt-group { padding: 18px 18px; }
}

/* ── Khối "Tin tức mới nhất" ở cuối trang chủ: đẩy xuống hàng full-width ──
   (.lmh-page-wrap là flex trên desktop nên cần flex-wrap để section xuống dòng) */
.tt-has-home-news .lmh-page-wrap { flex-wrap: wrap; }
.tt-home-news-wrap { flex: 0 0 100%; width: 100%; }
