/* ==========================================================================
   STYLE CHO TRANG TIN TỨC (ĐỒNG BỘ VỚI HOMEPAGE)
   File: assets/css/news-style.css
   NOTE: Đã quy đổi theo chuẩn 62.5% (1.6rem = 16px)
   ========================================================================== */

/* --- PHẦN 1: GRID LAYOUT & CARD (Danh sách tin tức) --- */

.news__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 55px; /* Giữ nguyên */
  margin-bottom: 64px;
}

.news-card {
  border: 1px solid var(--border-light, #e5e5e5);
  border-radius: 16px;
  background: #fff;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.3s ease;
}

.news-card:hover {
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.news-card__media {
  position: relative;
  height: 208px;
  overflow: hidden;
}

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

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

.news-date-badge {
  position: absolute;
  top: 16px;
  left: 16px;
  background-color: var(--primary-color);
  color: #fff;
  padding: 4px 12px;
  border-radius: 4px;
  /* Quy đổi: 12px */
  font-size: 1.2rem;
  font-weight: 700;
  text-transform: uppercase;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.news-card__body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.news-card__title {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text-heading, #333);
  line-height: 1.4;
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-align: left;
}

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

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

.news-card__excerpt {
  font-size: 1.4rem;
  color: #666;
  line-height: 1.6;
  text-align: left;
  margin-bottom: 24px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex-grow: 1;
}

.news-card__link {
  font-size: 1rem;
  font-weight: 700;
  color: var(--secondary-color);
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  margin-top: auto;
}

.news-card__link i {
  margin-left: 8px;
  transition: transform 0.3s ease;
}

.news-card__link:hover i {
  transform: translateX(5px);
}

/* --- PHẦN 2: PAGINATION & SECTION STYLE (Phân trang & Khung) --- */

.pagination-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 50px;
}

.pagination-btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  background-color: #fff;
  border: 1px solid #e5e5e5;
  color: #666;
  text-decoration: none;
  font-weight: 600;
  /* Quy đổi: 16px */
  font-size: 1.6rem;
  transition: all 0.3s ease;
  cursor: pointer;
}

.pagination-btn:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
  background-color: rgba(15, 79, 140, 0.05);
}

.pagination-btn.active {
  background-color: var(--primary-color);
  color: #fff;
  border-color: var(--primary-color);
  box-shadow: 0 4px 10px rgba(15, 79, 140, 0.3);
  pointer-events: none;
}

.page-header .section-line {
  width: 96px;
  height: 4px;
  background-color: var(--secondary-color);
  margin: -20px auto 21px;
}

/* --- TÙY CHỈNH SLIDER TIN LIÊN QUAN --- */

.related-news-swiper {
  padding: 10px 40px; /* Thêm padding 2 bên để nút không đè lên nội dung */
  position: relative;
}

/* Chỉnh kích thước khung nút bấm */
.related-news-swiper .swiper-button-next,
.related-news-swiper .swiper-button-prev {
  width: 30px; /* Chiều rộng nút */
  height: 30px; /* Chiều cao nút */
  background-color: transparent;
  border-radius: 50%; /* Bo tròn */
  color: var(--primary-color);
  transition: all 0.3s ease;
}

.related-news-swiper .swiper-button-next:hover,
.related-news-swiper .swiper-button-prev:hover {
  background-color: var(--primary-color);
  color: #fff;
}

/* Chỉnh kích thước icon mũi tên bên trong */
.related-news-swiper .swiper-button-next::after,
.related-news-swiper .swiper-button-prev::after {
  font-size: 14px !important; /* Kích thước icon nhỏ lại */
  font-weight: bold;
}
/* ==========================================================================
   PHẦN BỔ SUNG: NEWS DETAIL (Trang chi tiết bài viết)
   Đã quy đổi font-size theo chuẩn 62.5%
   ========================================================================== */

.news-detail-wrapper {
  max-width: 900px;
  margin: 0 auto;
  background: #fff;
  padding: 40px;
  border-radius: 12px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.article-header {
  border-bottom: 1px solid #eee;
  padding-bottom: 20px;
  margin-bottom: 30px;
}

.article-title {
  /* Quy đổi: 32px (Tiêu đề lớn) */
  font-size: 3.2rem;
  color: var(--primary-color);
  margin-bottom: 15px;
  line-height: 1.3;
  font-weight: 700;
}

.article-meta {
  color: #666;
  /* Quy đổi: 14px */
  font-size: 1.4rem;
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.article-meta i {
  color: var(--secondary-color);
  margin-right: 5px;
}

/* Style cho nội dung Rich Text */
.article-body {
  /* Quy đổi: 16px (Cỡ chữ chuẩn văn bản) */
  font-size: 1.6rem;
  line-height: 1.8;
  color: #333;
}

.article-body p {
  margin-bottom: 20px;
  text-align: justify;
}

/* Sapo (Đoạn mở đầu) */
.article-body p.lead {
  /* Quy đổi: 18px */
  font-size: 1.8rem;
  font-weight: 600;
  color: #444;
}

.article-body img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 20px 0;
  display: block;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.article-body h3 {
  /* Quy đổi: 24px */
  font-size: 2.4rem;
  color: var(--text-heading, #222);
  margin-top: 35px;
  margin-bottom: 15px;
  border-left: 4px solid var(--secondary-color);
  padding-left: 15px;
  font-weight: 700;
}

.article-body blockquote {
  background: #f8f9fa;
  border-left: 5px solid var(--primary-color);
  padding: 20px;
  font-style: italic;
  /* Quy đổi: 18px */
  font-size: 1.8rem;
  margin: 25px 0;
  color: #555;
  border-radius: 0 8px 8px 0;
}

.article-body ul,
.article-body ol {
  margin-bottom: 20px;
  padding-left: 20px;
}

.article-body li {
  margin-bottom: 10px;
}

.article-share {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid #eee;
  display: flex;
  align-items: center;
  /* Quy đổi: 16px */
  font-size: 1.6rem;
}

.share-link {
  margin-left: 15px;
  /* Quy đổi: 18px */
  font-size: 1.8rem;
  color: #666;
  transition: color 0.3s;
}

.share-link:hover {
  color: var(--primary-color);
}

.section-padding {
  padding: 64px; /* Giữ nguyên */
}

/* --- PHẦN 3: RESPONSIVE (Dành cho Grid) --- */

@media (max-width: 992px) {
  .news__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
  }
}

@media (max-width: 576px) {
  .news__grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .news-card__media {
    height: 200px;
  }
}

/* Responsive riêng cho trang chi tiết */
@media (max-width: 768px) {
  .news-detail-wrapper {
    padding: 25px;
  }
  .article-title {
    /* Mobile: 24px */
    font-size: 2.4rem;
  }
  .article-body {
    /* Mobile: 15px */
    font-size: 1.5rem;
  }
  .section-padding {
    padding: 40px 20px;
  }
}
