/* ==========================================================================
   tintuc.css — Trang Tin tức & Sự kiện (Figma node 1270:18856)
   Heading dùng Montserrat (tải local), body dùng Inter. Màu lấy từ token.
   ========================================================================== */

.tt-page {
  --tt-font-heading: "Montserrat", var(--font-heading);
  /* Palette riêng của trang tin tức (xác nhận từ Figma) */
  --tt-ink:        #191c1d; /* tiêu đề đậm */
  --tt-body:       #59413f; /* chữ mô tả (nâu) */
  --tt-meta:       #5f5e5e; /* ngày đăng */
  --tt-red-deep:   #730011; /* heading sidebar + mục active */
  --tt-line:       #e1bebc; /* viền card sidebar */
  --tt-skeleton:   #edeeef; /* nền ảnh */
  --tt-card-soft:  #f3f4f5; /* nền featured card */
}

/* ---- Tiện ích tiêu đề section dùng chung ---- */
.tt-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 40px;
}

.tt-section-title {
  font-family: var(--tt-font-heading);
  font-weight: 700;
  font-size: clamp(1.75rem, 3vw, 36px);
  line-height: 1.1;
  margin: 0;
}

.tt-more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  color: var(--dsh-red);
  font-size: 16px;
  letter-spacing: 1px;
  text-decoration: none;
  transition: gap var(--transition-base), color var(--transition-base);
}

.tt-more:hover { color: var(--dsh-red-dark); }
.tt-more img {
  width: 12px;
  height: 12px;
  transition: transform .35s var(--ease-out-soft);
}
.tt-more:hover img { transform: translateX(5px); }

/* ==========================================================================
   Section: Nổi bật (Light Mode)
   ========================================================================== */
.tt-featured {
  background: #ffffff;
  padding-block: var(--section-py);
}

.tt-featured .tt-section-title { color: var(--tt-ink); }

/* ---- Thẻ tin cột trên ---- */
.tt-news-card { display: flex; flex-direction: column; height: 100%; }

.tt-news-card .tt-thumb {
  aspect-ratio: 16 / 9;
  width: 100%;
  background: var(--tt-skeleton);
  overflow: hidden;
}

.tt-thumb img { width: 100%; height: 100%; object-fit: cover; }

.tt-news-card h3 {
  font-family: var(--tt-font-heading);
  font-weight: 700;
  font-size: 20px;
  line-height: 28px;
  color: var(--tt-ink);
  margin: 12px 0 0;
}

.tt-news-card p {
  font-size: 16px;
  line-height: 24px;
  color: var(--tt-body);
  margin: 8px 0 0;
}

.tt-date {
  font-weight: 600;
  font-size: 14px;
  line-height: 20px;
  letter-spacing: 0.7px;
  text-transform: uppercase;
  color: var(--tt-meta);
  margin-top: auto;
  padding-top: 12px;
}

/* ---- Featured full card (ảnh lớn trái + nội dung phải) ---- */
.tt-feature-card {
  display: flex;
  flex-wrap: wrap;
  background: var(--tt-card-soft);
  border-radius: 2px;
  overflow: hidden;
}

.tt-feature-card .tt-feature-media {
  flex: 1 1 55%;
  min-width: 280px;
}

.tt-feature-card .tt-feature-media img {
  width: 100%;
  height: 100%;
  min-height: 260px;
  object-fit: cover;
  display: block;
}

.tt-feature-body {
  flex: 1 1 40%;
  min-width: 280px;
  padding: 32px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.tt-badge {
  align-self: flex-start;
  background: var(--dsh-red);
  color: #ffffff;
  font-weight: 700;
  font-size: 10px;
  line-height: 15px;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 4px 12px;
  margin-bottom: 16px;
}

.tt-feature-body h3 {
  font-family: var(--tt-font-heading);
  font-weight: 700;
  font-size: clamp(1.25rem, 2vw, 24px);
  line-height: 1.25;
  color: var(--tt-ink);
  margin: 0 0 24px;
}

.tt-feature-body p {
  font-size: 16px;
  line-height: 24px;
  color: var(--tt-body);
  margin: 0 0 24px;
}

.tt-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: -0.7px;
  text-transform: uppercase;
  color: var(--tt-ink);
}

.tt-meta .tt-dot { opacity: 0.3; }

/* ---- Sidebar Danh mục tin tức ---- */
.tt-categories {
  background: #ffffff;
  border: 1px solid var(--tt-line);
  padding: 33px;
}

.tt-categories h4 {
  font-weight: 600;
  font-size: 14px;
  line-height: 14px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--tt-red-deep);
  padding-bottom: 9px;
  margin: 0 0 24px;
  border-bottom: 1px solid var(--tt-line);
}

.tt-cat-list { list-style: none; margin: 0; padding: 0; }
.tt-cat-list li { margin-bottom: 16px; }
.tt-cat-list li:last-child { margin-bottom: 0; }

.tt-cat-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 16px;
  line-height: 24px;
  color: var(--tt-body);
  text-decoration: none;
  transition: color var(--transition-base);
}

.tt-cat-list a:hover { color: var(--tt-red-deep); }

.tt-cat-list li.is-active a {
  font-weight: 600;
  color: var(--tt-red-deep);
  border-left: 3px solid var(--tt-red-deep);
  padding-left: 15px;
}

/* ==========================================================================
   Section: Dự án trọng điểm (Dark Mode Transition)
   ========================================================================== */
.tt-projects {
  position: relative;
  background: #7e101b; /* Figma 1272:19775 — nền đỏ đậm thương hiệu */
  padding-block: var(--section-py);
  overflow: hidden;
  isolation: isolate;
}

.tt-projects-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.08;
  z-index: -1;
}

.tt-projects .tt-section-title { color: #ffffff; }

/* Link "Xem thêm" trên nền đỏ: chữ + mũi tên màu trắng (Figma 1272:19863) */
.tt-projects .tt-more { color: #ffffff; }
.tt-projects .tt-more:hover { color: var(--dsh-gold); }
.tt-projects .tt-more img { filter: brightness(0) invert(1); }

/* Card lớn: ảnh (badge overlay) trên, tiêu đề + mô tả dưới — khớp Figma 1272:19786 */
.tt-project-feature {
  display: flex;
  flex-direction: column;
  gap: 16px;
  height: 100%;
}

.tt-project-media {
  position: relative;
  background: #1f2937;
  border-radius: 8px;
  overflow: hidden;
  aspect-ratio: 800 / 431;
  width: 100%;
}

.tt-project-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Badge nằm đè lên góc trên trái của ảnh */
.tt-project-media .tt-badge {
  position: absolute;
  top: 17px;
  left: 23px;
  margin: 0;
}

.tt-project-feature .tt-project-body { padding: 0; color: #ffffff; }

.tt-project-body h3 {
  font-family: var(--tt-font-heading);
  font-weight: 700;
  font-size: clamp(1.375rem, 2.2vw, 30px);
  line-height: 1.2;
  text-transform: uppercase;
  margin: 0 0 12px;
}

.tt-project-body p {
  font-size: clamp(1rem, 1.4vw, 20px);
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.7);
  margin: 0;
}

/* Danh sách 3 tin bên phải — thumbnail lớn + tiêu đề + ngày */
.tt-project-list { display: flex; flex-direction: column; gap: 40px; }

.tt-project-item {
  display: flex;
  gap: 24px;
  align-items: center;
  text-decoration: none;
}

.tt-project-item .tt-thumb-sm {
  flex: 0 0 clamp(160px, 18vw, 250px);
  width: clamp(160px, 18vw, 250px);
  aspect-ratio: 250 / 165;
  border-radius: 8px;
  overflow: hidden;
  background: var(--dsh-navy-2);
}

.tt-thumb-sm img { width: 100%; height: 100%; object-fit: cover; }

.tt-project-item h4 {
  font-family: var(--tt-font-heading);
  font-weight: 700;
  font-size: clamp(1rem, 1.4vw, 20px);
  line-height: 1.4;
  color: #ffffff;
  margin: 0 0 8px;
  transition: color var(--transition-base);
}

.tt-project-item:hover h4 { color: var(--dsh-gold); }

.tt-project-item .tt-date-sm {
  font-weight: 600;
  font-size: clamp(0.8125rem, 1vw, 16px);
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
}

/* ==========================================================================
   Micro-interactions — mượt (dùng chung easing từ animations.css)
   ========================================================================== */

/* Nhấc thẻ + đổ bóng khi hover */
.tt-news-card,
.tt-feature-card,
.tt-categories {
  transition: transform .5s var(--ease-out-soft), box-shadow .5s var(--ease-out-soft);
}

.tt-news-card:hover { transform: translateY(-6px); }

.tt-feature-card:hover,
.tt-categories:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 40px rgba(8, 15, 29, 0.14);
}

/* Ảnh trong khung phóng nhẹ khi hover thẻ cha */
.tt-feature-media { overflow: hidden; }

.tt-thumb img,
.tt-feature-media img,
.tt-project-media img,
.tt-thumb-sm img {
  transition: transform .8s var(--ease-out-soft);
}

.tt-news-card:hover .tt-thumb img,
.tt-feature-card:hover .tt-feature-media img,
.tt-project-feature:hover .tt-project-media img,
.tt-project-item:hover .tt-thumb-sm img {
  transform: scale(1.06);
}

/* Tiêu đề đổi màu brand khi hover */
.tt-news-card h3,
.tt-feature-body h3 { transition: color .3s ease; }
.tt-news-card:hover h3,
.tt-feature-card:hover .tt-feature-body h3 { color: var(--dsh-red); }

/* Mục danh mục trượt nhẹ khi hover */
.tt-cat-list a { transition: color .3s ease, padding-left .35s var(--ease-out-soft); }
.tt-cat-list li:not(.is-active) a:hover { padding-left: 6px; }

/* Tin nhỏ (cột phải section dự án) trượt sang phải khi hover */
.tt-project-item { transition: transform .4s var(--ease-out-soft), border-color .4s ease; }
.tt-project-item:hover { transform: translateX(5px); }

/* ---- Responsive ---- */
@media (max-width: 991.98px) {
  .tt-categories { margin-top: 32px; }
}

/* Tôn trọng prefers-reduced-motion (khớp animations.css) */
@media (prefers-reduced-motion: reduce) {
  .tt-news-card,
  .tt-feature-card,
  .tt-categories,
  .tt-project-item,
  .tt-thumb img,
  .tt-feature-media img,
  .tt-project-media img,
  .tt-thumb-sm img,
  .tt-more img { transition: none !important; transform: none !important; }
}

@media (max-width: 575.98px) {
  .tt-feature-body,
  .tt-categories { padding: 24px; }
  .tt-project-feature .tt-project-body { padding: 24px; }
}

/* ===== Phân trang tin tức — tông màu thương hiệu ===== */
.tt-pagination .pagination {
  --bs-pagination-color: var(--dsh-ink);
  --bs-pagination-border-color: var(--dsh-line);
  --bs-pagination-border-radius: 8px;
  --bs-pagination-hover-color: var(--dsh-red);
  --bs-pagination-hover-bg: rgba(154, 18, 32, .06);
  --bs-pagination-hover-border-color: var(--dsh-red);
  --bs-pagination-focus-color: var(--dsh-red);
  --bs-pagination-focus-box-shadow: 0 0 0 .2rem rgba(154, 18, 32, .18);
  --bs-pagination-active-color: var(--dsh-white);
  --bs-pagination-active-bg: var(--dsh-red);
  --bs-pagination-active-border-color: var(--dsh-red);
  --bs-pagination-disabled-color: var(--dsh-slate);
  --bs-pagination-disabled-border-color: var(--dsh-line);
  gap: 8px;
}

.tt-pagination .page-link {
  min-width: 42px;
  text-align: center;
  font-weight: 600;
  border-radius: 8px;
  transition: color .2s ease, background-color .2s ease, border-color .2s ease;
}
