/* style/news.css */
/* Base styles for the news page, scoped within .page-news */
.page-news {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: #333333; /* Dark text for light body background #f4f4f4 */
  background-color: #f4f4f4; /* Ensures consistency with shared body background */
}

/* Section styling */
.page-news__section {
  padding: 60px 0;
  margin-bottom: 20px;
}

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

.page-news__section-title {
  font-size: 36px;
  color: #1a0033; /* Brand primary color for titles */
  text-align: center;
  margin-bottom: 20px;
  font-weight: bold;
}

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

/* Hero Banner Section */
.page-news__hero-banner {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-top: var(--header-offset, 120px); /* Ensures content is not hidden by fixed header */
  padding-bottom: 60px;
  background-color: #1a0033; /* Dark background for the banner section */
  color: #ffffff; /* White text for dark background */
  overflow: hidden; /* Prevent content from overflowing */
}

.page-news__hero-container {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 1; /* Ensure content is above image overlay */
}

.page-news__hero-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.3; /* Subtle overlay for text readability */
  z-index: 0;
}

.page-news__hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  width: 100%;
  padding: 20px;
}

.page-news__main-title {
  font-size: 48px;
  margin-bottom: 20px;
  font-weight: bold;
  color: #ffcc00; /* Auxiliary color for main title */
  line-height: 1.2;
}

.page-news__intro-text {
  font-size: 20px;
  margin-bottom: 40px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  color: #f0f0f0;
}

.page-news__cta-button {
  display: inline-block;
  padding: 15px 40px;
  background: #ffcc00; /* Auxiliary color for CTA button */
  color: #1a0033; /* Primary color for text on auxiliary button */
  text-decoration: none;
  border-radius: 8px;
  font-size: 20px;
  font-weight: bold;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.page-news__cta-button:hover {
  background: #e6b800; /* Slightly darker yellow on hover */
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* Latest Articles Section */
.page-news__latest-articles {
  background-color: #ffffff;
}

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

.page-news__article-card {
  background: #f9f9f9;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}

.page-news__article-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.page-news__article-image {
  width: 100%;
  height: 220px; /* Fixed height for consistency */
  object-fit: cover;
  display: block;
}

.page-news__article-content {
  padding: 20px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.page-news__article-title {
  font-size: 22px;
  font-weight: bold;
  margin-bottom: 10px;
  line-height: 1.3;
}

.page-news__article-title a {
  color: #1a0033; /* Primary color for article titles */
  text-decoration: none;
  transition: color 0.3s ease;
}

.page-news__article-title a:hover {
  color: #ffcc00; /* Auxiliary color on hover */
}

.page-news__article-meta {
  font-size: 14px;
  color: #888888;
  margin-bottom: 15px;
}

.page-news__article-summary {
  font-size: 16px;
  color: #555555;
  margin-bottom: 20px;
  flex-grow: 1;
}

.page-news__read-more-button {
  display: inline-block;
  padding: 10px 20px;
  background: #1a0033; /* Primary color for read more button */
  color: #ffffff;
  text-decoration: none;
  border-radius: 5px;
  font-size: 15px;
  font-weight: 600;
  transition: background-color 0.3s ease, transform 0.3s ease;
  align-self: flex-start;
}

.page-news__read-more-button:hover {
  background: #ffcc00; /* Auxiliary color on hover */
  color: #1a0033;
  transform: translateY(-2px);
}

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

.page-news__pagination-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 15px;
  background: #f0f0f0;
  color: #1a0033;
  text-decoration: none;
  border-radius: 5px;
  font-weight: bold;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.page-news__pagination-link:hover {
  background: #e0e0e0;
}

.page-news__pagination-link--active {
  background: #1a0033;
  color: #ffffff;
}

.page-news__pagination-link--active:hover {
  background: #1a0033; /* Keep active state on hover */
  color: #ffffff;
}

/* FAQ Section */
.page-news__faq-section {
  background-color: #f9f9f9;
}

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

/* FAQ容器样式 */
.page-news__faq-item {
  margin-bottom: 15px;
  border-radius: 5px;
  overflow: hidden;
}

/* FAQ默认状态 - 答案隐藏 */
.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.3s ease;
  padding: 0 15px;
  opacity: 0;
}

/* FAQ展开状态 - 🚨 使用!important và đủ lớn max-height để đảm bảo có thể mở rộng */
.page-news__faq-item.active .page-news__faq-answer {
  max-height: 2000px !important; /* 🚨 Sử dụng!important để đảm bảo ưu tiên, giá trị đủ lớn để chứa mọi nội dung */
  padding: 20px 15px !important;
  opacity: 1;
  background: #ffffff;
  border-radius: 0 0 5px 5px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

/* Câu hỏi FAQ */
.page-news__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  background: #ffffff;
  border: 1px solid #e0e0e0;
  border-radius: 5px;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
  position: relative;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.page-news__faq-question:hover {
  background: #f5f5f5;
  border-color: #d0d0d0;
  box-shadow: 0 4px 10px rgba(0,0,0,0.08);
}

.page-news__faq-question:active {
  background: #eeeeee;
}

/* Tiêu đề câu hỏi */
.page-news__faq-question h3 {
  margin: 0;
  padding: 0;
  flex: 1;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.5;
  color: #1a0033;
  pointer-events: none; /* Ngăn h3 chặn sự kiện click */
}

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

.page-news__faq-item.active .page-news__faq-toggle {
  color: #1a0033; /* Màu chính khi hoạt động */
  transform: rotate(45deg); /* Tùy chọn: xoay để tạo dấu 'x' hoặc chỉ thay đổi thành dấu trừ */
}


/* Call to Action Section */
.page-news__cta-section {
  background-color: #1a0033; /* Primary brand color */
  color: #ffffff; /* White text for dark background */
  text-align: center;
  padding: 80px 0;
}

.page-news__cta-section .page-news__section-title {
  color: #ffcc00; /* Auxiliary color for title on dark background */
}

.page-news__cta-section .page-news__section-description {
  color: #f0f0f0;
  margin-bottom: 50px;
}

.page-news__button-group {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 30px;
}

.page-news__btn-primary {
  background: #ffcc00;
  color: #1a0033;
  border: none;
}

.page-news__btn-primary:hover {
  background: #e6b800;
  color: #1a0033;
}

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

.page-news__btn-secondary:hover {
  background: #ffcc00;
  color: #1a0033;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .page-news__hero-banner {
    padding-top: var(--header-offset, 100px); /* Adjust for smaller screens */
    padding-bottom: 50px;
  }
  .page-news__main-title {
    font-size: 40px;
  }
  .page-news__intro-text {
    font-size: 18px;
  }
  .page-news__section-title {
    font-size: 30px;
  }
  .page-news__article-title {
    font-size: 20px;
  }
}

@media (max-width: 768px) {
  .page-news__hero-banner {
    padding-top: var(--header-offset, 120px) !important; /* Ensure mobile header offset */
    padding-bottom: 40px;
  }
  .page-news__main-title {
    font-size: 32px;
  }
  .page-news__intro-text {
    font-size: 16px;
  }
  .page-news__cta-button {
    padding: 12px 30px;
    font-size: 18px;
  }
  .page-news__section {
    padding: 40px 0;
  }
  .page-news__section-title {
    font-size: 26px;
  }
  .page-news__section-description {
    font-size: 16px;
    margin-bottom: 30px;
  }
  .page-news__articles-grid {
    grid-template-columns: 1fr; /* Single column on mobile */
  }
  .page-news__article-image {
    height: 180px;
  }
  .page-news__article-title {
    font-size: 18px;
  }
  .page-news__read-more-button {
    padding: 8px 15px;
    font-size: 14px;
  }

  /* FAQ Mobile styles */
  .page-news__faq-question {
    padding: 15px;
    flex-wrap: wrap;
  }
  .page-news__faq-question h3 {
    font-size: 16px;
    margin-bottom: 0;
    width: calc(100% - 40px);
  }
  .page-news__faq-toggle {
    margin-left: 10px;
    width: 24px;
    height: 24px;
    font-size: 20px;
  }
  .page-news__faq-answer {
    padding: 0 15px;
  }
  .page-news__faq-item.active .page-news__faq-answer {
    padding: 15px !important;
  }

  /* CTA Section Mobile */
  .page-news__cta-section {
    padding: 60px 0;
  }
  .page-news__button-group {
    flex-direction: column; /* Stack buttons vertically */
    gap: 15px;
  }
  .page-news__cta-button,
  .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;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    padding-left: 15px;
    padding-right: 15px;
  }
  .page-news__container {
    padding-left: 15px;
    padding-right: 15px;
  }

  /* Global image responsive rules for mobile */
  .page-news img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
}