/* ==========================================================================
   ENH-041 — Trang Tin tức: slider featured (multi-card) + danh sách dọc
   Dùng token theme (var --color-*, --font-*, --header-h) để khớp giao diện.
   ========================================================================== */

/* Clear fixed header (.site-header position:fixed, cao --header-h). */
.news-page { padding: calc(var(--header-h, 104px) + 2rem) 0 clamp(3rem, 6vw, 5rem); }

/* --- Heading --- */
.news-head { max-width: 760px; margin: 0 auto clamp(1.6rem, 3vw, 2.6rem); text-align: center; }
.news-head__title {
  font-family: var(--font-heading); font-weight: 800;
  font-size: var(--text-h2); line-height: 1.14; letter-spacing: -0.01em;
  color: var(--color-text); margin: 0 0 .6rem;
}
.news-head__lead { color: var(--color-text-muted); line-height: 1.7; margin: 0; }

/* --- Featured slider (multi-card: 1.15 mobile → 2 tablet → 4 desktop) --- */
.news-featured { position: relative; margin-bottom: clamp(2rem, 4vw, 3rem); }
.news-featured__track {
  display: flex; gap: 1rem; overflow-x: auto; scroll-snap-type: x mandatory;
  scroll-behavior: smooth; -webkit-overflow-scrolling: touch;
  scrollbar-width: none; padding: 2px 2px 4px;
}
.news-featured__track::-webkit-scrollbar { display: none; }
.news-featured__slide {
  position: relative; flex: 0 0 78%; scroll-snap-align: start;
  aspect-ratio: 4 / 3; border-radius: 14px; overflow: hidden;
  background-size: cover; background-position: center;
  text-decoration: none; display: block;
  box-shadow: 0 14px 34px rgba(12, 48, 82, .12);
}
.news-featured__slide:hover { text-decoration: none; }
@media (min-width: 640px)  { .news-featured__slide { flex-basis: calc((100% - 1rem) / 2); } }
@media (min-width: 1024px) { .news-featured__slide { flex-basis: calc((100% - 3rem) / 4); aspect-ratio: 3 / 4; } }
.news-featured__slide::before {
  content: ""; position: absolute; inset: 0;
  /* Tối hơn + bắt đầu cao hơn → chữ trắng đọc rõ kể cả trên thumbnail màu sáng */
  background: linear-gradient(180deg, rgba(4,10,20,0) 14%, rgba(4,10,20,.42) 48%, rgba(4,10,20,.92) 100%);
}
.news-featured__overlay { position: absolute; inset: auto 0 0 0; z-index: 1; padding: clamp(.9rem, 2vw, 1.3rem); }
.news-featured__cat {
  display: inline-block; font-size: .68rem; font-weight: 700; letter-spacing: .04em;
  text-transform: uppercase; color: #fff; background: rgba(255,255,255,.18);
  border: 1px solid rgba(255,255,255,.32); padding: .2rem .6rem; border-radius: 999px; margin-bottom: .5rem;
}
.news-featured__title {
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
  color: #fff; font-family: var(--font-heading); font-weight: 700;
  font-size: clamp(.95rem, 1.3vw, 1.12rem); line-height: 1.28; margin: 0 0 .35rem;
  text-shadow: 0 1px 6px rgba(4,10,20,.6);
}
.news-featured__date { color: rgba(245,248,255,.9); font-size: .78rem; text-shadow: 0 1px 5px rgba(4,10,20,.6); }

/* prev/next */
.news-featured__nav {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
  width: 44px; height: 44px; border-radius: 999px; border: 1px solid var(--color-border);
  background: rgba(255,255,255,.94); color: var(--color-text); font-size: 1.4rem; line-height: 1;
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
  transition: background .25s ease, color .25s ease; box-shadow: 0 6px 18px rgba(12,48,82,.18);
}
.news-featured__nav:hover { background: var(--color-primary); color: #fff; border-color: var(--color-primary); }
.news-featured__nav--prev { left: -6px; }
.news-featured__nav--next { right: -6px; }
@media (max-width: 640px) {
  /* Mobile: ẩn arrow (slider vuốt được) — tránh đè chữ overlay trên card */
  .news-featured__nav { display: none; }
}

/* --- Vertical list (thumbnail-left) --- */
.news-list { display: flex; flex-direction: column; gap: 1.1rem; }
.news-list__item {
  display: flex; gap: clamp(1rem, 2.5vw, 1.6rem); text-decoration: none;
  background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 14px; overflow: hidden;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.news-list__item:hover { transform: translateY(-3px); box-shadow: 0 16px 36px rgba(12,48,82,.12); border-color: var(--color-primary-light); text-decoration: none; }
.news-list__item:hover * { text-decoration: none; }
.news-list__thumb {
  flex: 0 0 clamp(160px, 28%, 300px); align-self: stretch; min-height: 150px;
  background-size: cover; background-position: center; background-color: #eef3f8;
}
.news-list__body { flex: 1; min-width: 0; padding: clamp(1rem, 2.2vw, 1.5rem) clamp(1rem, 2.2vw, 1.5rem) clamp(1rem, 2.2vw, 1.5rem) 0; display: flex; flex-direction: column; gap: .5rem; }
.news-list__cat { font-size: .72rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--color-primary); }
.news-list__title { font-family: var(--font-heading); font-weight: 700; font-size: clamp(1.05rem, 2vw, 1.3rem); line-height: 1.3; color: var(--color-text); margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.news-list__excerpt { color: var(--color-text-muted); line-height: 1.62; margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.news-list__date { margin-top: auto; color: var(--color-text-muted); font-size: .82rem; }

@media (max-width: 640px) {
  .news-list__item { flex-direction: column; }
  .news-list__thumb { flex-basis: auto; width: 100%; aspect-ratio: 16 / 9; min-height: 0; }
  .news-list__body { padding: 1rem 1.1rem 1.2rem; }
}
