/* style/news.css */
/* body đã padding-top: var(--header-offset)；trang này cấm viết lại biến đó */
.page-news {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #ffffff; /* Nền body là #0a0a0a (tối), nên dùng chữ sáng */
  background-color: #0a0a0a; /* Đảm bảo tính nhất quán, mặc dù body đã xử lý */
}

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

.page-news__section-title {
  font-size: clamp(1.8rem, 2.5vw, 2.5rem); /* Sử dụng clamp cho H2 */
  color: #26A9E0;
  text-align: center;
  margin-bottom: 40px;
  font-weight: bold;
}

/* Phần Hero */
.page-news__hero-section {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column; /* Hình ảnh ở trên, văn bản ở dưới */
  align-items: center;
  padding: 60px 20px;
  padding-top: 10px; /* Đệm trên nhỏ, body xử lý bù đắp header */
  background-color: #0a0a0a;
}

.page-news__hero-image-wrapper {
  width: 100%;
  max-width: 1200px; /* Giới hạn chiều rộng hình ảnh */
  margin-bottom: 30px;
  border-radius: 8px;
  overflow: hidden;
}

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

.page-news__hero-content {
  text-align: center;
  max-width: 900px;
  color: #ffffff;
}

.page-news__main-title {
  font-size: clamp(2.5rem, 4vw, 3.2rem); /* Sử dụng clamp cho H1 */
  color: #ffffff;
  margin-bottom: 20px;
  font-weight: bold;
  line-height: 1.2;
  letter-spacing: 1px;
}

.page-news__intro-text {
  font-size: 1.1rem;
  margin-bottom: 30px;
  color: #f0f0f0;
}

.page-news__cta-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap; /* Cho phép xuống dòng trên di động */
}

.page-news__btn-primary,
.page-news__btn-secondary {
  display: inline-block;
  padding: 14px 30px;
  border-radius: 30px;
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
  box-sizing: border-box;
  max-width: 100%; /* Đảm bảo nút không tràn */
  white-space: normal; /* Cho phép ngắt dòng văn bản */
  word-wrap: break-word; /* Cho phép ngắt từ */
}

.page-news__btn-primary {
  background-color: #26A9E0; /* Màu chính */
  color: #ffffff;
  border: 2px solid #26A9E0;
}

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

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

.page-news__btn-secondary:hover {
  background-color: #26A9E0;
  color: #ffffff;
}

/* Phần Tin tức Mới nhất */
.page-news__latest-news-section,
.page-news__promotions-section,
.page-news__industry-insights-section,
.page-news__faq-section,
.page-news__cta-bottom-section {
  padding: 80px 0;
  background-color: #0a0a0a; /* Nền tối cho tất cả các phần */
  color: #ffffff; /* Chữ sáng cho tất cả các phần */
}

.page-news__news-grid,
.page-news__insights-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-bottom: 40px;
}

.page-news__news-card,
.page-news__insight-card {
  background-color: rgba(255, 255, 255, 0.05); /* Nền thẻ hơi sáng hơn để tạo độ tương phản */
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease;
}

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

.page-news__news-card-image,
.page-news__insight-card-image {
  width: 100%;
  height: 220px; /* Chiều cao cố định để nhất quán */
  object-fit: cover;
  display: block;
}

.page-news__news-card-content,
.page-news__insight-card-content {
  padding: 20px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.page-news__news-card-title,
.page-news__insight-card-title {
  font-size: 1.3rem;
  margin-bottom: 10px;
  font-weight: bold;
  line-height: 1.4;
}

.page-news__news-card-title a,
.page-news__insight-card-title a {
  color: #26A9E0; /* Màu liên kết */
  text-decoration: none;
  transition: color 0.3s ease;
}

.page-news__news-card-title a:hover,
.page-news__insight-card-title a:hover {
  color: #ffffff;
}

.page-news__news-card-meta,
.page-news__insight-card-meta {
  font-size: 0.9rem;
  color: #bbbbbb;
  margin-bottom: 15px;
}

.page-news__news-card-description,
.page-news__insight-card-description {
  font-size: 1rem;
  color: #cccccc;
  margin-bottom: 15px;
  flex-grow: 1;
}

.page-news__news-card-link,
.page-news__insight-card-link {
  display: inline-block;
  color: #26A9E0;
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s ease;
}

.page-news__news-card-link:hover,
.page-news__insight-card-link:hover {
  color: #ffffff;
}

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

/* Phần Khuyến mãi */
.page-news__promo-content {
  display: flex;
  align-items: center;
  gap: 40px;
  flex-wrap: wrap;
}

.page-news__promo-image {
  flex: 1;
  min-width: 300px;
  max-width: 50%; /* Điều chỉnh cho màn hình desktop */
  height: auto;
  border-radius: 8px;
  object-fit: cover;
}

.page-news__promo-text {
  flex: 1;
  min-width: 300px;
  color: #cccccc;
}

.page-news__promo-text p {
  margin-bottom: 15px;
}

/* Phần Câu hỏi thường gặp */
.page-news__faq-list {
  max-width: 800px;
  margin: 0 auto;
}

.page-news__faq-item {
  background-color: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
}

.page-news__faq-item summary {
  display: block; /* Để hành vi gốc của <details> */
  list-style: none;
}

.page-news__faq-item summary::-webkit-details-marker {
  display: none;
}

.page-news__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  font-size: 1.1rem;
  font-weight: bold;
  color: #26A9E0;
  cursor: pointer;
  background-color: rgba(255, 255, 255, 0.08); /* Hơi tối hơn cho câu hỏi */
  transition: background-color 0.3s ease;
}

.page-news__faq-question:hover {
  background-color: rgba(255, 255, 255, 0.12);
}

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

.page-news__faq-toggle {
  font-size: 1.5rem;
  margin-left: 15px;
  color: #ffffff;
}

.page-news__faq-answer {
  padding: 0 20px 20px;
  font-size: 1rem;
  color: #cccccc;
  max-height: 0; /* Cho dự phòng JS */
  overflow: hidden; /* Cho dự phòng JS */
  transition: max-height 0.3s ease-out, padding 0.3s ease-out; /* Cho dự phòng JS */
}

.page-news__faq-item[open] .page-news__faq-answer {
  max-height: 2000px; /* Giá trị đủ lớn cho trạng thái mở với <details> */
  padding-top: 15px;
}

/* Cho FAQ được điều khiển bằng JS (dựa trên div) */
.page-news__faq-item.active .page-news__faq-answer {
  max-height: 2000px !important;
  padding-top: 15px;
}

/* Phần CTA dưới cùng */
.page-news__cta-bottom-section .page-news__container {
  display: flex;
  align-items: center;
  gap: 40px;
  flex-wrap: wrap;
}

.page-news__cta-bottom-content {
  flex: 1;
  min-width: 300px;
  color: #cccccc;
  text-align: left;
}

.page-news__cta-bottom-content .page-news__section-title {
  text-align: left;
  color: #26A9E0;
}

.page-news__cta-bottom-content .page-news__cta-buttons {
  justify-content: flex-start;
}

.page-news__cta-bottom-image {
  flex: 1;
  min-width: 300px;
  max-width: 40%; /* Điều chỉnh cho màn hình desktop */
  height: auto;
  border-radius: 8px;
  object-fit: cover;
}

/* Điều chỉnh responsive */
@media (max-width: 992px) {
  .page-news__hero-section {
    padding: 40px 15px;
  }

  .page-news__latest-news-section,
  .page-news__promotions-section,
  .page-news__industry-insights-section,
  .page-news__faq-section,
  .page-news__cta-bottom-section {
    padding: 60px 0;
  }

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

  .page-news__promo-content,
  .page-news__cta-bottom-section .page-news__container {
    flex-direction: column;
    text-align: center;
  }

  .page-news__promo-image,
  .page-news__cta-bottom-image {
    max-width: 100%;
    margin-bottom: 30px;
  }

  .page-news__cta-bottom-content .page-news__section-title {
    text-align: center;
  }

  .page-news__cta-bottom-content .page-news__cta-buttons {
    justify-content: center;
  }
}

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

  .page-news__container {
    padding: 0 15px;
  }

  .page-news__section-title {
    font-size: 2rem;
    margin-bottom: 30px;
  }

  .page-news__main-title {
    font-size: 2.2rem;
  }

  .page-news__intro-text {
    font-size: 1rem;
  }

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

  .page-news__btn-primary,
  .page-news__btn-secondary {
    width: 100% !important; /* Đảm bảo nút chiếm toàn bộ chiều rộng trên di động */
    max-width: 100% !important;
    box-sizing: border-box !important;
    padding: 12px 20px;
  }
  
  /* Responsive hình ảnh trên di động */
  .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/nội dung */
  .page-news__hero-image-wrapper,
  .page-news__news-card,
  .page-news__insight-card,
  .page-news__promo-content,
  .page-news__cta-bottom-section .page-news__container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 0;
    padding-right: 0;
    overflow: hidden !important;
  }

  .page-news__hero-section {
    padding-top: 10px !important; /* body xử lý bù đắp header, đệm trang trí nhỏ ở đây */
  }

  .page-news__promo-image,
  .page-news__cta-bottom-image {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }

  .page-news__news-card-image,
  .page-news__insight-card-image {
    height: auto !important; /* Cho phép chiều cao điều chỉnh */
  }

  .page-news__faq-question {
    font-size: 1rem;
    padding: 15px;
  }
}