/* =========================================================================
   News page — List with category tabs + pagination
   ========================================================================= */

.news-list {
  padding: 72px 0;
  background: #FAFAFA;
}

.news-list .container {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

/* --- Head ------------------------------------------------------------------ */
.news-list__head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
}

.news-list__title {
  margin: 0;
  color: #293948;
  font-family: var(--font-hn);
  font-weight: 700;
  font-size: 30px;
  line-height: 136%;
  letter-spacing: 0.01em;
  text-align: center;
}

.news-list__desc {
  margin: 0;
  color: #616161;
  font-family: var(--font-hn);
  font-weight: 300;
  font-size: 16px;
  line-height: 150%;
  letter-spacing: 0.01em;
  text-align: center;
}

/* --- Tabs ------------------------------------------------------------------ */
.news-list__tabs {
  display: inline-flex;
  align-self: center;
  align-items: center;
  gap: 8px;
  padding: 4px;
  border-radius: 24px;
  background: #FFFFFF;
  border: 1px solid #F5F5F5;
  max-width: 100%;
  overflow-x: auto;
  scrollbar-width: none;
}

.news-list__tabs::-webkit-scrollbar {
  display: none;
}

.news-list__tab {
  padding: 8px 20px;
  border-radius: 20px;
  color: #9E9E9E;
  font-family: var(--font-hn);
  font-weight: 500;
  font-size: 16px;
  line-height: 150%;
  letter-spacing: 0.02em;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.25s ease, color 0.25s ease;
  cursor: pointer;
}

.news-list__tab:hover,
.news-list__tab.is-active {
  background: #293948;
  color: #FFFFFF;
}

/* --- Wrap ------------------------------------------------------------------ */
.news-list__wrap {
  display: flex;
  flex-direction: column;
  gap: 32px;
  position: relative;
}

.news-list__wrap.is-loading {
  opacity: 0.5;
  pointer-events: none;
}

/* Khi doi tab (AJAX swap section) */
.news-list__wrap,
.news-list__grid {
  transition: opacity 0.2s ease;
}

.news-list.is-loading .news-list__wrap,
.news-list.is-loading .news-list__grid {
  opacity: 0.45;
  pointer-events: none;
}

/* --- Grid ------------------------------------------------------------------ */
.news-list__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
}

.news-list__empty {
  grid-column: 1 / -1;
  padding: 40px 0;
  text-align: center;
  color: #9E9E9E;
  font-family: var(--font-hn);
  font-size: 16px;
}

/* --- Card (reuse hp-news__card structure) --------------------------------- */
.news-list__grid .hp-news__card {
  background: #FFFFFF;
  border-radius: 20px;
  overflow: hidden;
  gap: 0;
}

.news-list__grid .hp-news__image-link {
  border-radius: 0;
}

.news-list__grid .hp-news__meta {
  padding: 20px 20px 0;
}

.news-list__grid .hp-news__title {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.news-list__grid .hp-news__more {
  padding: 0 20px 20px;
  margin-top: 12px;
}

/* --- Pagination ------------------------------------------------------------ */
.news-list__pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 16px;
}

.news-list__pg-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  border: 1px solid #EEEEEE;
  border-radius: 24px;
  background: transparent;
  color: #BDBDBD;
  font-family: var(--font-hn);
  font-weight: 500;
  font-size: 16px;
  line-height: 150%;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: color 0.25s ease, border-color 0.25s ease;
}

.news-list__pg-btn:hover:not(:disabled) {
  color: #293948;
  border-color: #293948;
}

.news-list__pg-btn:hover:not(:disabled) svg path {
  stroke: #293948;
}

.news-list__pg-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.news-list__pg-btn svg {
  display: block;
  flex-shrink: 0;
}

.news-list__pg-numbers {
  display: flex;
  align-items: center;
  gap: 10px;
}

.news-list__pg-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  padding: 8px;
  border-radius: 24px;
  border: 0;
  background: transparent;
  color: #BDBDBD;
  font-family: var(--font-hn);
  font-weight: 500;
  font-size: 16px;
  line-height: 150%;
  letter-spacing: 0.02em;
  text-align: center;
  cursor: pointer;
  box-sizing: content-box;
  transition: background-color 0.25s ease, color 0.25s ease;
}

.news-list__pg-num.is-wide {
  min-width: 32px;
  width: auto;
  padding-left: 12px;
  padding-right: 12px;
}

.news-list__pg-num:hover:not(.is-active) {
  color: #293948;
}

.news-list__pg-num.is-active {
  background: #293948;
  color: #FFFFFF;
}

.news-list__pg-ellipsis {
  color: #BDBDBD;
  font-family: var(--font-hn);
  font-weight: 500;
  font-size: 16px;
  line-height: 150%;
  letter-spacing: 0.02em;
  padding: 0 4px;
  user-select: none;
}

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

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

@media screen and (max-width: 640px) {
  .news-list {
    padding: 48px 0;
  }

  .news-list__title {
    font-size: 24px;
  }

  .news-list__grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .news-list__pg-btn {
    display: none;
  }

  .news-list__pagination {
    justify-content: center;
  }
}
