/* style/news.css */

/* Căn chỉnh khoảng cách cho nội dung chính để tránh bị che bởi header cố định */
.page-news {
  padding-top: 120px; /* Khoảng cách cho desktop */
  background-color: #121212; /* Nền tối của body */
  color: #ffffff; /* Chữ màu sáng trên nền tối */
}

@media (max-width: 768px) {
  .page-news {
    padding-top: 100px; /* Khoảng cách cho mobile */
  }
}

/* Hero Banner Section */
.page-news__hero-banner {
  background: linear-gradient(135deg, #007bff, #ffc107); /* Màu sắc thương hiệu */
  padding: 60px 20px;
  text-align: center;
  border-bottom: 5px solid rgba(255, 255, 255, 0.1);
}

.page-news__hero-container {
  max-width: 900px;
  margin: 0 auto;
}

.page-news__hero-title {
  font-size: 42px;
  font-weight: 700;
  margin-bottom: 20px;
  color: #ffffff;
  line-height: 1.2;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.page-news__hero-description {
  font-size: 18px;
  line-height: 1.6;
  color: #f0f0f0;
  max-width: 700px;
  margin: 0 auto;
}

/* Main Content Wrapper */
.page-news__main-content-wrapper {
  padding: 60px 0;
}

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

/* Articles Grid */
.page-news__articles-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
}

/* Featured Article */
.page-news__featured-article {
  display: flex;
  flex-direction: column;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  background: rgba(0, 123, 255, 0.2); /* Nền xanh nhẹ */
  color: #ffffff; /* Chữ trắng */
}

.page-news__featured-article:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
}

.page-news__featured-article .page-news__article-link {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
}

.page-news__featured-article .page-news__article-image-wrapper {
  width: 100%;
  height: 450px;
  overflow: hidden;
}

.page-news__featured-article .page-news__article-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.page-news__featured-article .page-news__article-content {
  padding: 30px;
}

.page-news__featured-article .page-news__article-title {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 15px;
  color: #ffc107; /* Màu vàng phụ trợ */
  line-height: 1.3;
}

.page-news__featured-article .page-news__article-excerpt {
  font-size: 18px;
  line-height: 1.7;
  margin-bottom: 20px;
  color: #e0e0e0;
}

/* Latest Articles */
.page-news__latest-articles {
  margin-top: 40px;
}

.page-news__section-title {
  font-size: 36px;
  font-weight: 700;
  margin-bottom: 30px;
  color: #ffc107; /* Màu vàng phụ trợ */
  text-align: center;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

.page-news__articles-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

.page-news__article-item {
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  background: #222222; /* Nền tối cho card */
  color: #ffffff; /* Chữ trắng */
}

.page-news__article-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}

.page-news__article-item .page-news__article-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.page-news__article-item .page-news__article-image-wrapper {
  width: 100%;
  height: 250px;
  overflow: hidden;
}

.page-news__article-item .page-news__article-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.page-news__article-item .page-news__article-content {
  padding: 20px;
}

.page-news__article-item .page-news__article-title {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 10px;
  color: #ffffff;
  line-height: 1.4;
}

.page-news__article-item .page-news__article-excerpt {
  font-size: 15px;
  line-height: 1.6;
  color: #cccccc;
  margin-bottom: 15px;
  display: -webkit-box;
  -webkit-line-clamp: 3; /* Giới hạn 3 dòng */
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.page-news__read-more {
  display: inline-block;
  color: #007bff; /* Màu xanh thương hiệu */
  font-weight: 600;
  text-decoration: underline;
  transition: color 0.3s ease;
}

.page-news__read-more:hover {
  color: #ffc107; /* Màu vàng phụ trợ khi hover */
}

/* Pagination */
.page-news__pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 50px;
  gap: 10px;
}

.page-news__pagination-link {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 15px;
  border-radius: 6px;
  background: #333333;
  color: #ffffff;
  text-decoration: none;
  font-size: 16px;
  font-weight: 500;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.page-news__pagination-link:hover {
  background: #007bff;
  color: #ffffff;
}

.page-news__pagination-link.active {
  background: #007bff;
  color: #ffffff;
  font-weight: 700;
  pointer-events: none;
}

/* Call to Action Section */
.page-news__cta-section {
  background: #1a1a1a; /* Nền tối hơn */
  padding: 80px 20px;
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.page-news__cta-content {
  max-width: 800px;
  margin: 0 auto;
}

.page-news__cta-title {
  font-size: 38px;
  font-weight: 700;
  margin-bottom: 20px;
  color: #ffc107; /* Màu vàng phụ trợ */
  line-height: 1.3;
}

.page-news__cta-description {
  font-size: 18px;
  line-height: 1.6;
  color: #e0e0e0;
  margin-bottom: 40px;
}

.page-news__btn-primary {
  display: inline-block;
  background: #007bff;
  color: #ffffff;
  padding: 15px 35px;
  border-radius: 8px;
  text-decoration: none;
  font-size: 20px;
  font-weight: 700;
  transition: background-color 0.3s ease, transform 0.3s ease;
  border: none;
  cursor: pointer;
}

.page-news__btn-primary:hover {
  background: #0056b3;
  transform: translateY(-3px);
}

/* FAQ Section */
.page-news__faq-section {
  padding: 60px 0;
  background: #121212; /* Nền giống body */
  color: #ffffff; /* Chữ trắng */
}

.page-news__faq-list {
  margin-top: 30px;
}

.page-news__faq-item {
  margin-bottom: 15px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.page-news__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 25px;
  background: #1a1a1a; /* Nền tối hơn cho câu hỏi */
  border-radius: 8px;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.3s ease, border-color 0.3s ease;
  position: relative;
}

.page-news__faq-question:hover {
  background: #2a2a2a;
  border-color: #007bff;
}

.page-news__faq-question h3 {
  margin: 0;
  padding: 0;
  flex: 1;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.5;
  color: #ffffff; /* Chữ trắng */
  pointer-events: none; /* Ngăn chặn h3 chặn sự kiện click */
}

.page-news__faq-toggle {
  font-size: 28px;
  font-weight: bold;
  line-height: 1;
  color: #ffc107; /* Màu vàng phụ trợ */
  transition: transform 0.3s ease, color 0.3s ease;
  flex-shrink: 0;
  margin-left: 15px;
  pointer-events: none; /* Ngăn chặn biểu tượng chặn sự kiện click */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
}

.page-news__faq-item.active .page-news__faq-toggle {
  color: #007bff; /* Màu xanh khi active */
  transform: rotate(45deg); /* Xoay để tạo dấu X */
}

.page-news__faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), padding 0.4s ease, opacity 0.4s ease;
  padding: 0 25px;
  opacity: 0;
  background: #222222; /* Nền tối cho câu trả lời */
  color: #cccccc; /* Chữ xám nhẹ */
  border-radius: 0 0 8px 8px;
}

.page-news__faq-item.active .page-news__faq-answer {
  max-height: 2000px !important; /* Đủ lớn để chứa mọi nội dung, !important để đảm bảo ưu tiên */
  padding: 20px 25px !important;
  opacity: 1;
}

.page-news__faq-answer p {
  margin: 0;
  line-height: 1.7;
  font-size: 16px;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .page-news__hero-title {
    font-size: 36px;
  }
  .page-news__hero-description {
    font-size: 16px;
  }
  .page-news__featured-article .page-news__article-image-wrapper {
    height: 350px;
  }
  .page-news__featured-article .page-news__article-title {
    font-size: 28px;
  }
  .page-news__featured-article .page-news__article-excerpt {
    font-size: 16px;
  }
  .page-news__section-title {
    font-size: 30px;
  }
  .page-news__articles-list {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }
  .page-news__article-item .page-news__article-image-wrapper {
    height: 220px;
  }
  .page-news__article-item .page-news__article-title {
    font-size: 18px;
  }
  .page-news__article-item .page-news__article-excerpt {
    font-size: 14px;
  }
  .page-news__cta-title {
    font-size: 32px;
  }
  .page-news__cta-description {
    font-size: 16px;
  }
  .page-news__btn-primary {
    padding: 12px 30px;
    font-size: 18px;
  }
  .page-news__faq-question h3 {
    font-size: 16px;
  }
}

@media (max-width: 768px) {
  .page-news__hero-banner {
    padding: 40px 15px;
  }
  .page-news__hero-title {
    font-size: 28px;
  }
  .page-news__hero-description {
    font-size: 15px;
  }
  .page-news__main-content-wrapper {
    padding: 40px 0;
  }
  .page-news__container {
    padding: 0 15px !important; /* Quan trọng để tránh tràn ngang */
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
  .page-news__articles-grid {
    gap: 30px;
  }
  .page-news__featured-article .page-news__article-image-wrapper {
    height: 250px;
  }
  .page-news__featured-article .page-news__article-content {
    padding: 20px;
  }
  .page-news__featured-article .page-news__article-title {
    font-size: 22px;
  }
  .page-news__featured-article .page-news__article-excerpt {
    font-size: 15px;
  }
  .page-news__section-title {
    font-size: 26px;
    margin-bottom: 25px;
  }
  .page-news__articles-list {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .page-news__article-item .page-news__article-image-wrapper {
    height: 200px;
  }
  .page-news__article-item .page-news__article-content {
    padding: 15px;
  }
  .page-news__article-item .page-news__article-title {
    font-size: 17px;
  }
  .page-news__article-item .page-news__article-excerpt {
    font-size: 13px;
    -webkit-line-clamp: 4;
  }
  .page-news__pagination {
    margin-top: 30px;
    gap: 5px;
  }
  .page-news__pagination-link {
    min-width: 35px;
    height: 35px;
    padding: 0 10px;
    font-size: 14px;
  }
  .page-news__cta-section {
    padding: 50px 15px;
  }
  .page-news__cta-title {
    font-size: 26px;
  }
  .page-news__cta-description {
    font-size: 15px;
    margin-bottom: 30px;
  }
  .page-news__btn-primary {
    padding: 10px 25px;
    font-size: 16px;
  }
  .page-news__faq-section {
    padding: 40px 0;
  }
  .page-news__faq-question {
    padding: 15px 20px;
  }
  .page-news__faq-question h3 {
    font-size: 15px;
  }
  .page-news__faq-toggle {
    font-size: 24px;
    width: 28px;
    height: 28px;
  }
  .page-news__faq-item.active .page-news__faq-answer {
    padding: 15px 20px !important;
  }
  /* Tất cả hình ảnh trong .page-news phải responsive */
  .page-news img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
}