/* style/news.css */
/* body đã padding-top: var(--header-offset)；trang này không được viết lại biến đó */
.page-news {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #333333; /* Màu chữ mặc định cho nền body sáng */
  background-color: #ffffff; /* Đặt rõ ràng cho khu vực nội dung nếu cần */
}

.page-news__container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  box-sizing: border-box;
}

.page-news__hero-section {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-bottom: 60px; /* Khoảng trống bên dưới nội dung */
  padding-top: 10px; /* Padding trên nhỏ, body xử lý --header-offset */
  background-color: #ffffff;
}

.page-news__hero-image {
  width: 100%;
  height: auto;
  display: block;
  max-width: 100%;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 30px; /* Khoảng trống giữa hình ảnh và nội dung */
}

.page-news__hero-content {
  text-align: center;
  max-width: 800px;
}

.page-news__main-title {
  font-size: 2.5em;
  font-weight: 700;
  line-height: 1.2;
  color: #26A9E0; /* Màu thương hiệu cho H1 */
  margin-bottom: 15px;
  max-width: 100%; /* Đảm bảo H1 không tràn */
}

.page-news__description {
  font-size: 1.1em;
  margin-bottom: 30px;
  color: #555555;
}

.page-news__cta-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 20px;
}

.page-news__btn-primary,
.page-news__btn-secondary,
.page-news__read-more,
.page-news__category-item {
  display: inline-block;
  padding: 12px 25px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: 600;
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
  box-sizing: border-box; /* Rất quan trọng cho khả năng phản hồi trên di động */
  text-align: center;
}

.page-news__btn-primary {
  background-color: #26A9E0;
  color: #ffffff;
  border: 2px solid #26A9E0;
}

.page-news__btn-primary:hover {
  background-color: #1a8cc7;
  border-color: #1a8cc7;
}

.page-news__btn-secondary {
  background-color: #ffffff;
  color: #26A9E0;
  border: 2px solid #26A9E0;
}

.page-news__btn-secondary:hover {
  background-color: #f0f0f0;
  color: #1a8cc7;
  border-color: #1a8cc7;
}

.page-news__latest-news,
.page-news__featured-news,
.page-news__faq-section {
  padding: 60px 0;
  background-color: #ffffff;
}

.page-news__section-title {
  font-size: 2em;
  font-weight: 700;
  color: #000000;
  text-align: center;
  margin-bottom: 20px;
}

.page-news__section-description {
  font-size: 1.1em;
  color: #555555;
  text-align: center;
  margin-bottom: 40px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.page-news__news-grid,
.page-news__featured-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  margin-top: 30px;
}

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

.page-news__news-card:hover,
.page-news__featured-card:hover {
  transform: translateY(-5px);
}

.page-news__card-image,
.page-news__featured-image {
  width: 100%;
  height: 225px; /* Chiều cao cố định để nhất quán, object-fit xử lý tỷ lệ */
  object-fit: cover;
  display: block;
  max-width: 100%; /* Đảm bảo khả năng phản hồi */
  min-width: 200px; /* Kích thước tối thiểu cho hình ảnh */
  min-height: 200px;
}

.page-news__featured-image {
  height: 337px; /* Chiều cao cố định lớn hơn cho phần nổi bật */
}

.page-news__card-content,
.page-news__featured-content {
  padding: 20px;
  flex-grow: 1; /* Cho phép nội dung phát triển */
  display: flex;
  flex-direction: column;
}

.page-news__card-title,
.page-news__featured-title {
  font-size: 1.25em;
  font-weight: 600;
  margin-bottom: 10px;
  line-height: 1.4;
}

.page-news__card-title a,
.page-news__featured-title a {
  color: #26A9E0;
  text-decoration: none;
}

.page-news__card-title a:hover,
.page-news__featured-title a:hover {
  text-decoration: underline;
}

.page-news__card-meta {
  font-size: 0.9em;
  color: #888888;
  margin-bottom: 15px;
}

.page-news__card-excerpt,
.page-news__featured-excerpt {
  font-size: 1em;
  color: #555555;
  margin-bottom: 20px;
  flex-grow: 1; /* Cho phép đoạn trích phát triển */
}

.page-news__read-more {
  color: #26A9E0;
  text-decoration: none;
  font-weight: 600;
  align-self: flex-start; /* Căn chỉnh theo đầu của vùng flex */
}

.page-news__read-more:hover {
  text-decoration: underline;
}

.page-news__view-all-button {
  text-align: center;
  margin-top: 50px;
}

.page-news__categories {
  padding: 60px 0;
  background-color: #26A9E0; /* Nền tối hơn để tạo độ tương phản */
  color: #ffffff; /* Chữ sáng cho nền tối */
}

.page-news__categories .page-news__section-title {
  color: #ffffff;
}

.page-news__category-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
  margin-top: 30px;
}

.page-news__category-item {
  background-color: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.5);
  padding: 10px 20px;
  border-radius: 25px;
  font-weight: 500;
}

.page-news__category-item:hover {
  background-color: #ffffff;
  color: #26A9E0;
}

.page-news__cta-bottom {
  padding: 80px 0;
  background-color: #26A9E0;
  color: #ffffff;
  text-align: center;
}

.page-news__cta-bottom .page-news__section-title,
.page-news__cta-bottom .page-news__section-description {
  color: #ffffff;
}

/* Phần FAQ */
.page-news__faq-section {
  padding: 60px 0;
  background-color: #f9f9f9;
}

.page-news__faq-list {
  max-width: 800px;
  margin: 30px auto 0;
}

.page-news__faq-item {
  background-color: #ffffff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.page-news__faq-item summary {
  list-style: none; /* Ẩn dấu mặc định */
  cursor: pointer;
  padding: 20px 25px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  font-size: 1.1em;
  color: #333333;
  position: relative;
}

.page-news__faq-item summary::-webkit-details-marker {
  display: none; /* Ẩn dấu mặc định cho trình duyệt webkit */
}

.page-news__faq-qtext {
  flex-grow: 1;
}

.page-news__faq-toggle {
  font-size: 1.5em;
  line-height: 1;
  margin-left: 15px;
  color: #26A9E0;
}

.page-news__faq-answer {
  padding: 0 25px 20px;
  font-size: 1em;
  color: #555555;
  border-top: 1px solid #eee;
  margin-top: -1px; /* Chồng lấp viền để có giao diện sạch */
}

.page-news__faq-answer p {
  margin-top: 15px;
  margin-bottom: 0;
}

/* Kiểu phản hồi */
@media (max-width: 1024px) {
  .page-news__main-title {
    font-size: 2em;
  }
  .page-news__section-title {
    font-size: 1.8em;
  }
}

@media (max-width: 768px) {
  .page-news__container {
    padding: 0 15px; /* Thêm padding cho các container di động */
  }

  .page-news__hero-section {
    padding-bottom: 40px;
    padding-top: 10px !important; /* body đã có padding-top */
  }

  .page-news__hero-image,
  .page-news__card-image,
  .page-news__featured-image,
  .page-news img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  
  /* Tất cả các container chứa hình ảnh/video/nút */
  .page-news__section,
  .page-news__card,
  .page-news__container,
  .page-news__news-grid,
  .page-news__featured-grid,
  .page-news__category-list,
  .page-news__faq-list,
  .page-news__cta-buttons,
  .page-news__video-section,
  .page-news__video-container,
  .page-news__video-wrapper {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    overflow: hidden !important; /* Ngăn chặn cuộn ngang */
  }

  .page-news__main-title {
    font-size: 1.8em;
  }

  .page-news__description,
  .page-news__section-description {
    font-size: 1em;
  }

  .page-news__cta-buttons {
    flex-direction: column;
    gap: 15px;
  }

  .page-news__btn-primary,
  .page-news__btn-secondary,
  .page-news a[class*="button"],
  .page-news a[class*="btn"] {
    max-width: 100% !important;
    width: 100% !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    padding-left: 15px;
    padding-right: 15px;
  }

  .page-news__news-grid {
    grid-template-columns: 1fr;
  }

  .page-news__news-card,
  .page-news__featured-card {
    margin-left: 0;
    margin-right: 0;
  }
  
  .page-news__card-image {
    height: 200px; /* Điều chỉnh cho màn hình nhỏ hơn */
  }

  .page-news__featured-image {
    height: 250px;
  }
  
  .page-news__card-image,
  .page-news__featured-image,
  .page-news img {
    min-width: 200px; /* Đảm bảo kích thước tối thiểu */
    min-height: 200px;
  }

  .page-news__category-list {
    flex-direction: column;
  }
  
  .page-news__category-item {
    width: 100%;
  }

  .page-news__faq-item summary {
    font-size: 1em;
    padding: 15px 20px;
  }

  .page-news__faq-answer {
    padding: 0 20px 15px;
  }
}

@media (max-width: 480px) {
  .page-news__main-title {
    font-size: 1.5em;
  }
  .page-news__section-title {
    font-size: 1.5em;
  }
}

/* Đảm bảo hình ảnh khu vực nội dung không quá nhỏ */
.page-news img {
    min-width: 200px;
    min-height: 200px;
}
.page-news__card-image {
    min-width: 200px;
    min-height: 200px;
}
.page-news__featured-image {
    min-width: 200px;
    min-height: 200px;
}

/* Quy tắc màu cụ thể */
.page-news__btn-login {
  background-color: #EA7C07; /* Màu đăng nhập */
  color: #FFFFFF;
  border: 2px solid #EA7C07;
}
.page-news__btn-login:hover {
  background-color: #e06c00;
  border-color: #e06c00;
}