/* 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 */
  color: #f0f0f0; /* Màu chữ mặc định cho nền tối */
}

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

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

.page-news__hero-banner {
  background: linear-gradient(135deg, #8B0000 0%, #FFD700 100%); /* Màu chủ đạo */
  padding: 60px 0;
  text-align: center;
  color: #ffffff;
}

.page-news__main-title {
  font-size: 3.2em;
  margin-bottom: 20px;
  line-height: 1.2;
  font-weight: 700;
}

.page-news__subtitle {
  font-size: 1.2em;
  max-width: 800px;
  margin: 0 auto;
  line-height: 1.6;
}

.page-news__highlight {
  color: #FFD700; /* Màu vàng nổi bật */
}

.page-news__section-title {
  font-size: 2.2em;
  color: #FFD700; /* Màu vàng cho tiêu đề phần */
  text-align: center;
  margin: 60px 0 40px;
  position: relative;
}

.page-news__section-title::after {
  content: '';
  display: block;
  width: 80px;
  height: 4px;
  background: #8B0000; /* Màu đỏ đậm làm đường kẻ dưới */
  margin: 15px auto 0;
  border-radius: 2px;
}

/* Latest Articles */
.page-news__latest-articles {
  padding: 40px 0;
  background: var(--dark-bg-1); /* Nền tối */
}

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

.page-news__article-card {
  background: #2a2a2a; /* Nền tối hơn cho thẻ bài viết */
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

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

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

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

.page-news__article-title {
  font-size: 1.5em;
  color: #ffffff;
  margin-bottom: 10px;
  line-height: 1.4;
}

.page-news__article-excerpt {
  font-size: 0.95em;
  color: #cccccc;
  line-height: 1.6;
  margin-bottom: 15px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.page-news__read-more {
  display: inline-block;
  color: #FFD700; /* Màu vàng cho nút đọc thêm */
  font-weight: 600;
  text-decoration: none;
  transition: color 0.3s ease;
}

.page-news__read-more:hover {
  color: #ffffff;
}

/* News Categories */
.page-news__news-categories {
  padding: 60px 0;
  background: #1a1a1a; /* Nền màu đen xám */
}

.page-news__categories-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
}

.page-news__category-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #2a2a2a;
  border: 1px solid #444444;
  border-radius: 10px;
  padding: 20px 30px;
  text-decoration: none;
  color: #ffffff;
  font-weight: 600;
  font-size: 1.1em;
  transition: background-color 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
  min-width: 180px;
  text-align: center;
}

.page-news__category-item:hover {
  background-color: #8B0000; /* Màu đỏ khi hover */
  border-color: #FFD700; /* Viền vàng khi hover */
  transform: translateY(-5px);
}

.page-news__category-icon {
  width: 64px;
  height: 64px;
  margin-bottom: 15px;
  object-fit: contain;
  display: block;
}

.page-news__category-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 150px; /* Giới hạn chiều rộng tên danh mục */
}

/* All Articles List */
.page-news__all-articles {
  padding: 40px 0;
  background: var(--dark-bg-1);
}

.page-news__article-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 25px;
}

.page-news__article-item {
  display: flex;
  background: #2a2a2a;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.page-news__article-thumb {
  flex-shrink: 0;
  width: 250px;
  height: 180px;
  overflow: hidden;
}

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

.page-news__article-details {
  padding: 20px;
  flex-grow: 1;
}

.page-news__article-list-title {
  font-size: 1.3em;
  color: #ffffff;
  margin-bottom: 10px;
  line-height: 1.4;
}

.page-news__article-list-title a {
  text-decoration: none;
  color: inherit;
  transition: color 0.3s ease;
}

.page-news__article-list-title a:hover {
  color: #FFD700;
}

.page-news__article-list-excerpt {
  font-size: 0.9em;
  color: #cccccc;
  line-height: 1.6;
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.page-news__article-date {
  font-size: 0.85em;
  color: #999999;
}

.page-news__pagination {
  display: flex;
  justify-content: center;
  margin-top: 40px;
  gap: 10px;
}

.page-news__pagination-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: #333333;
  color: #ffffff;
  text-decoration: none;
  border-radius: 5px;
  transition: background-color 0.3s ease, color 0.3s ease;
  font-weight: 600;
}

.page-news__pagination-link:hover {
  background: #8B0000;
  color: #ffffff;
}

.page-news__pagination-link--active {
  background: #FFD700;
  color: #333333;
}

.page-news__pagination-link--disabled {
  background: #444444;
  color: #999999;
  cursor: not-allowed;
}

/* Call to Action */
.page-news__call-to-action {
  background: #1a1a1a;
  padding: 80px 0;
  text-align: center;
}

.page-news__cta-content {
  max-width: 900px;
}

.page-news__cta-title {
  font-size: 2.5em;
  color: #ffffff;
  margin-bottom: 20px;
  line-height: 1.3;
}

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

.page-news__cta-button {
  display: inline-block;
  background: #FFD700;
  color: #333333;
  padding: 15px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.1em;
  margin: 0 10px;
  transition: background-color 0.3s ease, color 0.3s ease, transform 0.3s ease;
  border: 2px solid transparent;
}

.page-news__cta-button:hover {
  background: #ffffff;
  color: #8B0000;
  transform: translateY(-3px);
}

.page-news__cta-button--secondary {
  background: transparent;
  color: #FFD700;
  border-color: #FFD700;
}

.page-news__cta-button--secondary:hover {
  background: #FFD700;
  color: #333333;
  border-color: #FFD700;
}

/* FAQ Section */
.page-news__faq-section {
  padding: 60px 0;
  background: var(--dark-bg-1);
}

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

/* FAQ容器样式 */
.page-news__faq-item {
  margin-bottom: 15px;
  border-radius: 8px;
  overflow: hidden;
  background: #2a2a2a;
  border: 1px solid #444444;
}

/* 问题样式 */
.page-news__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 25px;
  background: #2a2a2a;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.3s ease;
  position: relative;
}

.page-news__faq-question:hover {
  background: #3a3a3a;
}

/* 问题标题样式 */
.page-news__faq-question h3 {
  margin: 0;
  padding: 0;
  flex: 1;
  font-size: 1.15em;
  font-weight: 600;
  line-height: 1.5;
  color: #ffffff;
  pointer-events: none; /* 防止h3标签阻止点击事件 */
}

/* 切换图标 */
.page-news__faq-toggle {
  font-size: 28px;
  font-weight: bold;
  line-height: 1;
  color: #FFD700;
  transition: transform 0.3s ease, color 0.3s ease;
  flex-shrink: 0;
  margin-left: 15px;
  pointer-events: none; /* 防止图标阻止点击事件 */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
}

.page-news__faq-item.active .page-news__faq-toggle {
  color: #8B0000;
  transform: rotate(45deg); /* Xoay để tạo hiệu ứng dấu trừ */
}

/* 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.4s ease;
  padding: 0 25px;
  opacity: 0;
  color: #cccccc;
  font-size: 0.95em;
  line-height: 1.7;
}

/* FAQ展开状态 - 🚨 使用!important和足够大的max-height确保一定能展开 */
.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 25px !important;
  opacity: 1;
  background: #333333; /* Nền tối hơn cho câu trả lời */
  border-radius: 0 0 8px 8px;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .page-news__main-title {
    font-size: 2.8em;
  }
  .page-news__section-title {
    font-size: 2em;
  }
  .page-news__article-card {
    margin: 0 10px;
  }
  .page-news__category-item {
    padding: 15px 20px;
    font-size: 1em;
    min-width: 160px;
  }
  .page-news__article-thumb {
    width: 200px;
    height: 150px;
  }
  .page-news__article-details {
    padding: 15px;
  }
  .page-news__article-list-title {
    font-size: 1.2em;
  }
  .page-news__cta-title {
    font-size: 2.2em;
  }
}

@media (max-width: 768px) {
  .page-news__container {
    padding: 0 15px !important; /* Đảm bảo padding trên mobile */
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  .page-news__hero-banner {
    padding: 40px 0;
  }
  .page-news__main-title {
    font-size: 2.2em;
  }
  .page-news__subtitle {
    font-size: 1em;
  }
  .page-news__section-title {
    font-size: 1.8em;
    margin: 40px 0 30px;
  }
  .page-news__articles-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .page-news__article-image {
    height: 180px;
  }
  .page-news__article-title {
    font-size: 1.3em;
  }
  .page-news__news-categories {
    padding: 40px 0;
  }
  .page-news__categories-list {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
  }
  .page-news__category-item {
    width: calc(50% - 15px);
    max-width: 160px;
    padding: 15px;
    font-size: 0.9em;
    min-width: unset;
  }
  .page-news__category-icon {
    width: 50px;
    height: 50px;
    margin-bottom: 10px;
  }
  .page-news__all-articles {
    padding: 30px 0;
  }
  .page-news__article-item {
    flex-direction: column;
  }
  .page-news__article-thumb {
    width: 100%;
    height: 200px;
  }
  .page-news__article-details {
    padding: 15px;
  }
  .page-news__article-list-title {
    font-size: 1.1em;
  }
  .page-news__article-list-excerpt {
    font-size: 0.85em;
  }
  .page-news__pagination {
    margin-top: 30px;
    gap: 8px;
  }
  .page-news__pagination-link {
    width: 36px;
    height: 36px;
    font-size: 0.9em;
  }
  .page-news__call-to-action {
    padding: 60px 0;
  }
  .page-news__cta-title {
    font-size: 1.8em;
  }
  .page-news__cta-description {
    font-size: 0.95em;
    margin-bottom: 30px;
  }
  .page-news__cta-button {
    padding: 12px 25px;
    font-size: 1em;
    margin: 5px;
  }
  .page-news__faq-section {
    padding: 40px 0;
  }
  .page-news__faq-question {
    padding: 15px 20px;
  }
  .page-news__faq-question h3 {
    font-size: 1em;
  }
  .page-news__faq-toggle {
    font-size: 24px;
    width: 28px;
    height: 28px;
  }
  .page-news__faq-item.active .page-news__faq-answer {
    padding: 15px 20px !important;
  }

  /* Responsive images */
  .page-news img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
}