/* ==========================================================================
   News listing page (.news-page) — /tin-tuc
   Source: .article-page (pc_style.css) — category chips, featured grid
   (1 big + 4 small), per-category boxes of 3-column article cards.
   ========================================================================== */
/* The visually-hidden h1 must be positioned against .news-page, not the
   initial containing block: otherwise Chrome resets the scroll position to 0
   whenever the sticky header collapses, so the page can't be scrolled. */
.news-page {
  position: relative;
}

.news-page__h1 {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- Category chips ---------- */
.news-cats {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  padding: 10px 0 12px;
}

.news-cats__item {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 20px;
  border-radius: 5px;
  background: var(--color-bg-white);
  color: #353535;
  font-size: 18px;
  font-weight: 700;
  line-height: 40px;
  text-decoration: none;
  transition: background var(--transition-fast), color var(--transition-fast);
}

.news-cats__item:hover,
.news-cats__item.is-current {
  background: var(--color-brand-blue);
  color: #ffffff;
}

.news-cats__icon {
  width: 20px;
  height: 20px;
  object-fit: contain;
  transition: filter var(--transition-fast);
}

.news-cats__item:hover .news-cats__icon,
.news-cats__item.is-current .news-cats__icon {
  filter: brightness(100);
}

/* ---------- White body ---------- */
.news-page__body {
  background: var(--color-bg-white);
  padding-bottom: 30px;
}

/* ---------- Featured grid ---------- */
.news-top {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3);
  padding-top: var(--space-3);
  margin-bottom: var(--space-3);
}

.news-top__small {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3);
}

.news-feature {
  display: flex;
  flex-direction: column;
  color: #353535;
  text-decoration: none;
}

.news-feature__media {
  position: relative;
  display: block;
  overflow: hidden;
  border: 1px solid #edf2f7;
  border-radius: 12px;
  background: #ffffff;
  aspect-ratio: 100 / 64;
}

.news-feature--big .news-feature__media {
  flex: 1 1 auto;
  min-height: 300px;
  aspect-ratio: auto;
}

.news-feature__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.4s ease;
}

.news-feature:hover .news-feature__img {
  transform: scale(1.06);
}

.news-feature__text {
  display: block;
  padding-top: 10px;
}

.news-feature__title {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  font-size: 16px;
  font-weight: 700;
  line-height: 22px;
  transition: color var(--transition-fast);
}

.news-feature--big .news-feature__title {
  font-size: 22px;
  line-height: 30px;
}

.news-feature:hover .news-feature__title {
  color: var(--color-brand-blue);
}

/* Shared date line: calendar icon + date, sits right above a title. */
.news-date {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
  color: #718096;
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
}

.news-date__icon {
  flex-shrink: 0;
  color: var(--color-brand-blue);
}

/* ---------- Category box ---------- */
.news-box {
  margin: 45px 0 20px;
}

.news-box__title {
  position: relative;
  margin: 0 0 16px;
  padding-left: 16px;
  color: #353535;
  font-size: 22px;
  font-weight: 700;
  line-height: 26px;
  text-transform: uppercase;
}

.news-box__title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 5px;
  height: 26px;
  border-radius: 3px;
  background: linear-gradient(180deg, var(--color-brand-blue), #39a0ff);
  transform: translateY(-50%);
}

.news-box__head {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 0 0 18px;
}

.news-box__head .news-box__title {
  margin: 0;
  flex-shrink: 0;
}

.news-box__line {
  flex: 1;
  height: 1px;
  min-width: 24px;
  background: linear-gradient(90deg, #cfdcec, rgba(207, 220, 236, 0));
}

.news-box__all {
  flex-shrink: 0;
  padding: 6px 14px;
  border: 1px solid var(--color-brand-blue);
  border-radius: 999px;
  color: var(--color-brand-blue);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}

.news-box__all:hover {
  background: var(--color-brand-blue);
  color: #ffffff;
}

.news-box__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-3);
}

.news-box__more {
  display: block;
  max-width: 215px;
  margin: var(--space-3) auto 0;
  border: 1px solid transparent;
  border-radius: 6px;
  background: var(--color-bg-white);
  color: var(--color-brand-blue);
  font-size: 16px;
  line-height: 43px;
  text-align: center;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}

.news-box__more::after {
  content: "";
  display: inline-block;
  margin-left: 4px;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  border-left: 5px solid;
}

.news-box__more:hover {
  background: var(--color-brand-blue);
  color: #ffffff;
}

/* ---------- Article card ---------- */
.news-card {
  padding-bottom: 30px;
  color: #222222;
  font-size: 15px;
  line-height: 23px;
}

.news-card__img {
  position: relative;
  display: block;
  margin-bottom: 10px;
  border: 1px solid #edf2f7;
  border-radius: 10px;
  background: #ffffff;
  overflow: hidden;
  aspect-ratio: 100 / 64;
}

.news-card__img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.5s ease;
}

.news-card:hover .news-card__img img {
  transform: scale(1.06);
}

.news-card__title {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
  margin: 0 0 11px;
  color: #353535;
  font-size: 18px;
  font-weight: 700;
  line-height: 24.5px;
}

.news-card__title a {
  color: inherit;
  text-decoration: none;
}

.news-card__title a:hover {
  color: var(--color-brand-blue);
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .news-top {
    grid-template-columns: minmax(0, 1fr);
  }

  .news-feature--big .news-feature__media {
    min-height: 0;
    aspect-ratio: 100 / 64;
  }
}

@media (max-width: 768px) {
  .news-box__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .news-cats__item {
    padding: 0 14px;
    font-size: 15px;
    line-height: 36px;
  }

  .news-top__small {
    gap: var(--space-2);
  }

  .news-feature__title,
  .news-feature--big .news-feature__title {
    font-size: 15px;
    line-height: 20px;
  }

  .news-date {
    font-size: 13px;
  }

  .news-box {
    margin-top: 30px;
  }

  .news-box__title {
    font-size: 18px;
  }

  .news-box__grid {
    gap: var(--space-2);
  }

  .news-card {
    padding-bottom: var(--space-4);
  }

  .news-card__title {
    font-size: 15px;
    line-height: 20px;
  }
}

.news-box {
  scroll-margin-top: 90px;
}

/* ---------- Category page /<category-slug>/ ---------- */
.news-cat-hero {
  position: relative;
  display: flex;
  align-items: center;
  gap: 20px;
  margin: 32px 0 8px;
  padding: 26px 30px;
  overflow: hidden;
  border-radius: 14px;
  background: linear-gradient(120deg, #0057a6 0%, var(--color-brand-blue) 45%, #2b95f0 100%);
  color: #ffffff;
  box-shadow: 0 10px 28px rgba(0, 100, 189, 0.18);
}

.news-cat-hero::before,
.news-cat-hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  pointer-events: none;
}

.news-cat-hero::before {
  width: 220px;
  height: 220px;
  right: -60px;
  top: -90px;
}

.news-cat-hero::after {
  width: 140px;
  height: 140px;
  right: 120px;
  bottom: -80px;
}

.news-cat-hero__icon {
  position: relative;
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: #ffffff;
  color: var(--color-brand-blue);
  box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.18);
}

.news-cat-hero__icon img {
  width: 34px;
  height: 34px;
  object-fit: contain;
}

.news-cat-hero__text {
  position: relative;
  flex: 1;
  min-width: 0;
}

.news-cat-hero__label {
  margin: 0 0 4px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  opacity: 0.85;
}

.news-cat-hero__title {
  margin: 0;
  font-size: 28px;
  font-weight: 700;
  line-height: 1.25;
}

.news-cat-hero__desc {
  margin: 8px 0 0;
  font-size: 15px;
  line-height: 1.6;
  opacity: 0.92;
}

.news-cat-hero__count {
  position: relative;
  flex-shrink: 0;
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}

.news-box--category {
  margin-top: 28px;
}

@media (max-width: 600px) {
  .news-cat-hero {
    flex-wrap: wrap;
    gap: 14px;
    padding: 20px;
  }

  .news-cat-hero__icon {
    width: 54px;
    height: 54px;
  }

  .news-cat-hero__title {
    font-size: 22px;
  }

  .news-box__title {
    font-size: 18px;
  }
}

.news-page__empty {
  padding: var(--space-8) 0;
  color: var(--color-text-muted);
  text-align: center;
}
