/* CSS cho trang Tin Tức */
.page-tin-tuc {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  color: #333333; /* Màu chữ mặc định cho nền sáng */
  line-height: 1.6;
  background-color: #ffffff; /* Nền trắng mặc định */
}

.page-tin-tuc__container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
  box-sizing: border-box;
}

/* Hero Section */
.page-tin-tuc__hero-section {
  padding-top: 10px; /* Khoảng đệm nhỏ phía trên cho header cố định */
  padding-bottom: 40px;
  background-color: #f8f8f8;
  text-align: center;
  border-bottom: 1px solid #e0e0e0;
}

.page-tin-tuc__hero-image {
  max-width: 100%;
  overflow: hidden;
  margin-bottom: 20px;
}

.page-tin-tuc__hero-image img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

.page-tin-tuc__main-title {
  font-size: clamp(2em, 4vw, 3.5em); /* Kích thước font chữ linh hoạt */
  font-weight: 700;
  color: #017439; /* Màu xanh lá thương hiệu */
  margin-bottom: 15px;
  line-height: 1.2;
}

.page-tin-tuc__hero-description {
  font-size: 1.1em;
  max-width: 800px;
  margin: 0 auto 30px auto;
  color: #555555;
}

.page-tin-tuc__cta-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap; /* Cho phép xuống dòng trên màn hình nhỏ */
  width: 100%;
  max-width: 600px; /* Giới hạn chiều rộng nhóm nút */
  margin: 0 auto;
  box-sizing: border-box;
}

.page-tin-tuc__btn-primary,
.page-tin-tuc__btn-secondary {
  display: inline-block;
  padding: 12px 25px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 700;
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
  max-width: 100%; /* Đảm bảo nút thích ứng với chiều rộng */
  box-sizing: border-box;
  white-space: normal; /* Cho phép chữ xuống dòng */
  word-wrap: break-word;
  text-align: center;
  cursor: pointer;
}

.page-tin-tuc__btn-primary {
  background-color: #C30808; /* Màu đỏ cho nút chính */
  color: #FFFF00; /* Màu vàng cho chữ nút chính */
  border: 2px solid #C30808;
}

.page-tin-tuc__btn-primary:hover {
  background-color: #a30606;
  border-color: #a30606;
}

.page-tin-tuc__btn-secondary {
  background-color: #ffffff;
  color: #C30808; /* Màu đỏ cho chữ nút phụ */
  border: 2px solid #C30808;
}

.page-tin-tuc__btn-secondary:hover {
  background-color: #f0f0f0;
  color: #a30606;
  border-color: #a30606;
}

/* Section common styles */
.page-tin-tuc__latest-news-section,
.page-tin-tuc__featured-article-section,
.page-tin-tuc__categories-section,
.page-tin-tuc__cta-bottom-section {
  padding: 60px 0;
}

.page-tin-tuc__section-title {
  font-size: clamp(1.8em, 3.5vw, 2.5em);
  font-weight: 700;
  color: #017439;
  text-align: center;
  margin-bottom: 20px;
}

.page-tin-tuc__section-description {
  font-size: 1.05em;
  text-align: center;
  max-width: 900px;
  margin: 0 auto 40px auto;
  color: #555555;
}

/* Latest News Grid */
.page-tin-tuc__news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  margin-bottom: 40px;
}

.page-tin-tuc__news-card {
  background-color: #ffffff;
  border: 1px solid #e0e0e0;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}

.page-tin-tuc__news-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

.page-tin-tuc__news-image {
  width: 100%;
  height: 225px; /* Chiều cao cố định cho thẻ tin tức */
  overflow: hidden;
}

.page-tin-tuc__news-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.page-tin-tuc__news-content {
  padding: 20px;
  flex-grow: 1; /* Cho phép nội dung mở rộng để lấp đầy không gian */
  display: flex;
  flex-direction: column;
}

.page-tin-tuc__news-title {
  font-size: 1.3em;
  font-weight: 600;
  margin-bottom: 10px;
  line-height: 1.3;
}

.page-tin-tuc__news-title a {
  color: #017439;
  text-decoration: none;
  transition: color 0.3s ease;
}

.page-tin-tuc__news-title a:hover {
  color: #005f2c;
}

.page-tin-tuc__news-date {
  font-size: 0.9em;
  color: #777777;
  margin-bottom: 15px;
}

.page-tin-tuc__news-excerpt {
  font-size: 1em;
  color: #555555;
  margin-bottom: 20px;
  flex-grow: 1;
}

.page-tin-tuc__read-more-btn {
  display: inline-block;
  padding: 8px 15px;
  background-color: #017439;
  color: #ffffff;
  text-decoration: none;
  border-radius: 5px;
  font-weight: 600;
  transition: background-color 0.3s ease;
  align-self: flex-start; /* Căn chỉnh nút về phía đầu */
  max-width: 100%;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
  text-align: center;
}

.page-tin-tuc__read-more-btn:hover {
  background-color: #005f2c;
}

.page-tin-tuc__view-all-news {
  text-align: center;
}

/* Featured Article Section */
.page-tin-tuc__featured-content {
  display: flex;
  gap: 40px;
  align-items: flex-start;
  background-color: #f8fcf8;
  border-radius: 10px;
  padding: 30px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.page-tin-tuc__featured-image {
  flex: 0 0 50%;
  max-width: 50%;
  border-radius: 8px;
  overflow: hidden;
}

.page-tin-tuc__featured-image img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

.page-tin-tuc__featured-text {
  flex: 1;
}

.page-tin-tuc__featured-title {
  font-size: 1.8em;
  font-weight: 700;
  margin-bottom: 10px;
  line-height: 1.3;
}

.page-tin-tuc__featured-title a {
  color: #017439;
  text-decoration: none;
  transition: color 0.3s ease;
}

.page-tin-tuc__featured-title a:hover {
  color: #005f2c;
}

.page-tin-tuc__featured-date {
  font-size: 0.95em;
  color: #777777;
  margin-bottom: 15px;
}

.page-tin-tuc__featured-excerpt {
  font-size: 1.05em;
  color: #555555;
  margin-bottom: 15px;
}

/* Categories Section */
.page-tin-tuc__categories-section {
  background-color: #f0fdf5;
}

.page-tin-tuc__category-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
}

.page-tin-tuc__category-item {
  display: inline-block;
  padding: 10px 20px;
  background-color: #e6f7ed;
  color: #017439;
  text-decoration: none;
  border-radius: 25px;
  font-weight: 600;
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
  border: 1px solid #017439;
}

.page-tin-tuc__category-item:hover {
  background-color: #017439;
  color: #ffffff;
}

/* CTA Bottom Section */
.page-tin-tuc__cta-bottom-section {
  background-color: #017439;
  color: #ffffff;
  padding: 80px 0;
  text-align: center;
}

.page-tin-tuc__cta-bottom-section .page-tin-tuc__section-title {
  color: #ffffff;
  margin-bottom: 20px;
}

.page-tin-tuc__cta-bottom-section .page-tin-tuc__section-description {
  color: #e0e0e0;
  margin-bottom: 40px;
}

/* --- Responsive Styles --- */
@media (max-width: 1024px) {
  .page-tin-tuc__container {
    padding: 0 20px;
  }
}

@media (max-width: 768px) {
  .page-tin-tuc {
    font-size: 16px;
    line-height: 1.6;
  }

  /* HERO Chủ đề chính */
  .page-tin-tuc__hero-section {
    padding-top: 10px !important; /* Giữ padding nhỏ */
    padding-bottom: 30px !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  .page-tin-tuc__main-title {
    font-size: 2em !important; /* Ép buộc tiêu đề nhỏ hơn trên di động */
    padding: 0 15px;
  }

  .page-tin-tuc__hero-description {
    font-size: 1em !important;
    margin-bottom: 20px !important;
    padding: 0 15px;
  }

  .page-tin-tuc__cta-buttons {
    flex-direction: column !important; /* Xếp chồng các nút theo chiều dọc */
    gap: 15px !important;
    max-width: 100% !important;
    padding: 0 15px !important; /* Thêm padding vào container */
  }

  .page-tin-tuc__btn-primary,
  .page-tin-tuc__btn-secondary {
    width: 100% !important;
    max-width: 100% !important;
    padding: 12px 15px !important; /* Điều chỉnh padding */
    font-size: 1em !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
  }

  /* Phần nội dung dài */
  .page-tin-tuc__latest-news-section,
  .page-tin-tuc__featured-article-section,
  .page-tin-tuc__categories-section,
  .page-tin-tuc__cta-bottom-section {
    padding: 40px 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  .page-tin-tuc__section-title {
    font-size: 1.8em !important;
    margin-bottom: 15px !important;
    padding: 0 15px;
  }

  .page-tin-tuc__section-description {
    font-size: 0.95em !important;
    margin-bottom: 30px !important;
    padding: 0 15px;
  }

  /* Khu vực Blog (Tin tức) */
  .page-tin-tuc__news-grid {
    grid-template-columns: 1fr !important; /* Một cột duy nhất */
    gap: 25px !important;
    padding: 0 15px !important;
  }

  .page-tin-tuc__news-card {
    max-width: 100% !important;
    width: 100% !important;
  }

  .page-tin-tuc__news-image {
    height: 180px !important; /* Điều chỉnh chiều cao cho di động */
  }

  .page-tin-tuc__news-content {
    padding: 15px !important;
  }

  /* Phần bài viết nổi bật */
  .page-tin-tuc__featured-content {
    flex-direction: column !important; /* Xếp chồng ảnh và văn bản theo chiều dọc */
    gap: 25px !important;
    padding: 20px !important;
    margin: 0 15px !important;
  }

  .page-tin-tuc__featured-image {
    flex: 0 0 100% !important;
    max-width: 100% !important;
  }

  .page-tin-tuc__featured-title {
    font-size: 1.5em !important;
  }

  .page-tin-tuc__featured-excerpt {
    font-size: 0.95em !important;
  }

  /* Phần danh mục */
  .page-tin-tuc__category-list {
    justify-content: flex-start !important;
    padding: 0 15px !important; /* Thêm padding vào container */
  }

  .page-tin-tuc__category-item {
    font-size: 0.9em !important;
    padding: 8px 15px !important;
  }

  /* Phần CTA cuối trang */
  .page-tin-tuc__cta-bottom-section {
    padding: 50px 0 !important;
  }

  /* Quy tắc chung cho hình ảnh và container trên di động */
  .page-tin-tuc img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  
  .page-tin-tuc__section,
  .page-tin-tuc__card,
  .page-tin-tuc__container,
  .page-tin-tuc__hero-section,
  .page-tin-tuc__latest-news-section,
  .page-tin-tuc__featured-article-section,
  .page-tin-tuc__categories-section,
  .page-tin-tuc__cta-bottom-section,
  .page-tin-tuc__news-card {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  /* Điều chỉnh padding cho các section để tránh lỗi tràn */
  .page-tin-tuc__latest-news-section .page-tin-tuc__container,
  .page-tin-tuc__featured-article-section .page-tin-tuc__container,
  .page-tin-tuc__categories-section .page-tin-tuc__container,
  .page-tin-tuc__cta-bottom-section .page-tin-tuc__container {
      padding-left: 15px !important;
      padding-right: 15px !important;
  }
}