.news-tab {
  padding: 40px 20px;
  max-width: 1316px;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
}

.news-tab h2 {
  font-size: 24px;
  line-height: 32px;
}

a {
  text-decoration: none;
  color: rgba(16, 32, 49, 1);
}

.news-tab .tabs-list {
  display: flex;
  justify-content: center;
  border-bottom: 1px solid rgba(216, 216, 217, 1);
  padding-bottom: 24px;
  margin-bottom: 32px;
  margin-top: 24px;
  gap: 20px;
}

.news-tab .tabs-list button {
  border: none;
  background-color: transparent;
  padding: 8px 16px;
  cursor: pointer;
  font-size: 16px;
  color: rgba(157, 157, 157, 1);
  transition: color 0.3s;
  font-size: 18px;
  line-height: 28px;
  padding: 0;
}

.news-tab .tabs-list button.active {
  color: rgba(206, 122, 88, 1) !important;
  font-weight: 500;
}

.no-post-message {
  text-align: center;
  width: 100%;
  margin: 20px 0;
  font-style: italic;
}

/* --- Cấu trúc carousel --- */
.news-tab .carousel-container {
  position: relative;
  overflow: hidden;
  width: 100%;
  transform: translateZ(0);
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% + 20px);
}

.news-tab .carousel-track {
  display: flex;
  transform: translateZ(0);
  transition: transform 0.6s ease-in-out;
  width: 100%;
}

.news-tab .carousel-track:not(.active) {
  display: none;
}

.news-tab .carousel-track .items {
  flex: 0 0 100%;
  /* Mặc định mobile: 1 item */
  box-sizing: border-box;
  position: relative;
  overflow: hidden;
  min-width: 0;
  padding: 0 10px;
}

.news-tab .carousel-track .items .image-container {
  position: relative;
  overflow: hidden;
  height: 275px;
}

.news-tab .carousel-track .items img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.news-tab .carousel-track .items:hover img {
  transform: scale(1.03);
}

.news-tab .carousel-track .items h2 {
  color: rgba(16, 32, 49, 1);
  margin-top: 12px;
  font-weight: 500;
  font-size: 16px;
  line-height: 24px;

  cursor: pointer;
  transition: color 0.3s;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.news-tab .carousel-track .items h2:hover {
  color: var(--primary-color);
}

.news-tab .carousel-track .items .date {
  color: rgba(78, 92, 113, 1);
  font-size: 12px;
  display: block;
  margin-top: 8px;
  line-height: 16px;
}

.news-tab .carousel-track .items .desc {
  color: rgba(78, 92, 113, 1);
  font-size: 16px;
  margin-top: 12px;
  display: none;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-tab .carousel-track .items .btn-detail {
  display: flex;
  gap: 4px;
  align-items: center;
  color: rgba(206, 122, 88, 1) !important;
  font-size: 16px;
  font-weight: 500;
  margin-top: 12px;
  cursor: pointer;
  transition: transform 0.2s ease;
  text-decoration: none;
}

.news-tab .carousel-track .items .btn-detail:hover {
  transform: translateX(5px);
}

.news-tab .list-action {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 32px;
}

.news-tab .list-action button {
  background-color: var(--primary-color);
  color: var(--white-color);
  width: 44px;
  height: 44px;
  border: none;
  padding: 10px 20px;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.news-tab .list-action button:hover {
  background-color: rgba(180, 100, 70, 1);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.news-tab .list-action button:active {
  transform: translateY(0);
}

.pagination {
  display: flex;
  justify-content: center;
  margin-top: 20px;
  gap: 8px;
}

.pagination-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #ddd;
  cursor: pointer;
  transition: background-color 0.3s;
}

.pagination-dot.active {
  background-color: #ce7a58;
}

.news-tab .carousel-track .items .btn-detail {
  display: none;
}

/* --- BREAKPOINTS THEO MOBILE FIRST --- */

/* Tablet nhỏ: >= 576px */
@media (min-width: 576px) {
  .news-tab .carousel-track .items {
    flex: 0 0 50%;
  }
}

@media (min-width: 768px) {
  .news-tab .carousel-track .items {
    flex: 0 0 50%;
  }

  .news-tab {
    padding-top: 68px;
    padding-bottom: 68px;
  }

  .news-tab .tabs-list button {
    font-size: 24px;
    line-height: 40px;
  }

  .news-tab h2 {
    font-size: 32px;
    line-height: 44px;
  }

  .news-tab .carousel-track .items .desc {
    display: -webkit-box;
  }

  .news-tab .carousel-track .items h2 {
    font-size: 20px;
    line-height: 28px;
  }

  .news-tab .tabs-list {
    gap: 40px;
    margin-top: 32px;
  }

  .news-tab .carousel-track .items .btn-detail {
    display: flex;
  }
}

/* Tablet lớn: >= 992px */
@media (min-width: 992px) {
  .news-tab .carousel-track .items {
    flex: 0 0 33.333%;
  }
}

/* Desktop rộng: >= 1600px */
@media (min-width: 1600px) {
  .news-tab {
    max-width: 1276px;
    margin: 0 auto;
    padding: 68px 0;
  }
}