/* style/news.css */

/* Base Styles for page-news */
.page-news {
  color: #ffffff; /* Light text for dark body background */
  background-color: transparent; /* Body background handled by shared.css #121212 */
  font-family: Arial, sans-serif;
  line-height: 1.6;
}

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

.page-news__section-title {
  font-size: 36px;
  font-weight: bold;
  color: #E5B80B; /* Auxiliary color for titles */
  text-align: center;
  margin-bottom: 40px;
  padding-top: 20px;
}

/* Hero Section (News Specific) */
.page-news__hero-section {
  position: relative;
  padding-top: 0; /* Assumed shared.css handles body padding */
  padding-bottom: 60px;
  background: linear-gradient(135deg, #0A2463, #000000); /* Dark background with brand color */
  overflow: hidden;
}

.page-news__hero-container {
  display: flex;
  align-items: center;
  gap: 40px;
  max-width: 1400px;
  margin: 0 auto;
  padding: 80px 20px;
  box-sizing: border-box;
}

.page-news__hero-content {
  flex: 1;
  max-width: 60%;
  text-align: left;
}

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

.page-news__hero-description {
  font-size: 18px;
  color: #f0f0f0;
  margin-bottom: 30px;
}

.page-news__hero-cta {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.page-news__hero-image {
  flex: 1;
  max-width: 40%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.page-news__hero-image img {
  width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
  object-fit: cover;
  min-width: 200px;
  min-height: 200px;
}

/* Latest Articles Section */
.page-news__latest-articles-section {
  padding: 80px 0;
  background-color: #1a1a1a; /* Slightly lighter dark background */
}

.page-news__featured-article {
  display: flex;
  gap: 30px;
  background-color: #222222;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  margin-bottom: 60px;
}

.page-news__featured-image {
  flex-shrink: 0;
  width: 50%;
}

.page-news__featured-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  min-width: 200px;
  min-height: 200px;
}

.page-news__featured-content {
  flex-grow: 1;
  padding: 30px;
  color: #f0f0f0;
}

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

.page-news__article-title .page-news__article-link {
  color: #E5B80B;
  text-decoration: none;
  transition: color 0.3s ease;
}

.page-news__article-title .page-news__article-link:hover {
  color: #ffd700;
}

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

.page-news__article-excerpt {
  font-size: 16px;
  margin-bottom: 25px;
}

.page-news__btn-read-more {
  display: inline-block;
  background-color: #0A2463;
  color: #ffffff;
  padding: 12px 25px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.3s ease, transform 0.2s ease;
}

.page-news__btn-read-more:hover {
  background-color: #0c3385;
  transform: translateY(-2px);
}

.page-news__article-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.page-news__article-card {
  background-color: #222222;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-news__article-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}

.page-news__card-image {
  width: 100%;
  height: 200px;
  overflow: hidden;
}

.page-news__card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  min-width: 200px;
  min-height: 200px;
}

.page-news__card-content {
  padding: 20px;
  color: #f0f0f0;
}

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

.page-news__card-title .page-news__article-link {
  color: #E5B80B;
  text-decoration: none;
  transition: color 0.3s ease;
}

.page-news__card-title .page-news__article-link:hover {
  color: #ffd700;
}

.page-news__card-meta {
  font-size: 13px;
  color: #aaaaaa;
  margin-bottom: 10px;
}

.page-news__card-excerpt {
  font-size: 15px;
  margin-bottom: 15px;
}

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

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

.page-news__pagination-link:hover {
  background-color: #E5B80B;
  color: #0A2463;
}

.page-news__pagination-link--active {
  background-color: #E5B80B;
  color: #0A2463;
}

/* CTA Section */
.page-news__cta-section {
  padding: 80px 0;
  background: #0A2463;
  text-align: center;
}

.page-news__cta-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
}

.page-news__cta-text {
  max-width: 800px;
  color: #ffffff;
}

.page-news__cta-title {
  font-size: 38px;
  font-weight: bold;
  margin-bottom: 20px;
  color: #E5B80B;
}

.page-news__cta-description {
  font-size: 18px;
  line-height: 1.5;
  margin-bottom: 30px;
}

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

/* Buttons */
.page-news__btn-primary,
.page-news__btn-secondary {
  display: inline-block;
  padding: 15px 30px;
  border-radius: 10px;
  font-size: 18px;
  font-weight: bold;
  text-decoration: none;
  text-align: center;
  transition: background-color 0.3s ease, color 0.3s ease, transform 0.2s ease;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
  max-width: 100%;
}

.page-news__btn-primary {
  background-color: #E5B80B;
  color: #0A2463;
  border: 2px solid #E5B80B;
}

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

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

.page-news__btn-secondary:hover {
  background-color: #E5B80B;
  color: #0A2463;
  transform: translateY(-3px);
}

/* FAQ Section */
.page-news__faq-section {
  padding: 80px 0;
  background-color: #1a1a1a;
}

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

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

/* 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;
  padding: 0 20px;
  opacity: 0;
  color: #f0f0f0;
}

/* 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 !important;
  opacity: 1;
  background: #333333; /* Slightly different background for expanded answer */
  border-radius: 0 0 5px 5px;
}

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

.page-news__faq-question:hover {
  background: #333333;
  border-color: #4a4a4a;
}

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

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

/* 切换图标 */
.page-news__faq-toggle {
  font-size: 24px;
  font-weight: bold;
  line-height: 1;
  color: #E5B80B;
  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: 28px;
  height: 28px;
}

.page-news__faq-item.active .page-news__faq-toggle {
  color: #ffd700;
  transform: rotate(45deg); /* Change to minus sign */
}

/* General image responsiveness */
.page-news img {
  max-width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

/* Media Queries for Responsiveness */

/* Tablet/Smaller Desktop */
@media (max-width: 1024px) {
  .page-news__hero-container {
    flex-direction: column;
    text-align: center;
    padding: 60px 20px;
  }

  .page-news__hero-content {
    max-width: 100%;
    order: 2;
  }

  .page-news__hero-title {
    font-size: 40px;
  }

  .page-news__hero-description {
    font-size: 16px;
  }

  .page-news__hero-image {
    max-width: 80%;
    margin-bottom: 30px;
    order: 1;
  }

  .page-news__featured-article {
    flex-direction: column;
  }

  .page-news__featured-image {
    width: 100%;
  }

  .page-news__article-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
  }

  .page-news__article-title {
    font-size: 24px;
  }

  .page-news__card-title {
    font-size: 18px;
  }

  .page-news__section-title {
    font-size: 32px;
  }

  .page-news__cta-title {
    font-size: 32px;
  }
}

/* Mobile */
@media (max-width: 768px) {
  .page-news {
    font-size: 15px;
    line-height: 1.5;
  }

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

  .page-news__section-title {
    font-size: 28px !important;
    margin-bottom: 30px !important;
    padding-top: 15px !important;
  }

  /* HERO Section */
  .page-news__hero-section {
    padding-top: 0 !important;
    padding-bottom: 40px !important;
  }

  .page-news__hero-container {
    padding: 40px 15px !important;
    gap: 20px !important;
  }

  .page-news__hero-content {
    max-width: 100% !important;
  }

  .page-news__hero-title {
    font-size: 32px !important;
    margin-bottom: 15px !important;
  }

  .page-news__hero-description {
    font-size: 15px !important;
    margin-bottom: 20px !important;
  }

  .page-news__hero-cta {
    flex-direction: column !important;
    gap: 15px !important;
  }

  .page-news__hero-image {
    max-width: 100% !important;
    margin-bottom: 20px !important;
  }

  .page-news__hero-image img {
    width: 100% !important;
    height: auto !important;
    max-width: 100% !important;
  }

  /* Latest Articles Section */
  .page-news__latest-articles-section {
    padding: 50px 0 !important;
  }

  .page-news__featured-article {
    gap: 20px !important;
    margin-bottom: 40px !important;
  }

  .page-news__featured-image {
    width: 100% !important;
  }

  .page-news__featured-image img {
    width: 100% !important;
    height: auto !important;
    max-width: 100% !important;
  }

  .page-news__featured-content {
    padding: 20px !important;
  }

  .page-news__article-title {
    font-size: 22px !important;
    margin-bottom: 10px !important;
  }

  .page-news__article-meta {
    font-size: 12px !important;
    margin-bottom: 10px !important;
  }

  .page-news__article-excerpt {
    font-size: 14px !important;
    margin-bottom: 20px !important;
  }

  .page-news__btn-read-more {
    padding: 10px 20px !important;
    font-size: 15px !important;
  }

  .page-news__article-grid {
    grid-template-columns: 1fr !important;
    gap: 20px !important;
  }

  .page-news__article-card {
    max-width: 100% !important;
  }

  .page-news__card-image {
    height: 180px !important;
  }

  .page-news__card-image img {
    width: 100% !important;
    height: auto !important;
    max-width: 100% !important;
  }

  .page-news__card-content {
    padding: 15px !important;
  }

  .page-news__card-title {
    font-size: 16px !important;
    margin-bottom: 8px !important;
  }

  .page-news__card-meta {
    font-size: 11px !important;
    margin-bottom: 8px !important;
  }

  .page-news__card-excerpt {
    font-size: 13px !important;
    margin-bottom: 15px !important;
  }

  .page-news__pagination {
    margin-top: 40px !important;
  }

  .page-news__pagination-link {
    width: 35px !important;
    height: 35px !important;
    font-size: 14px !important;
  }

  /* CTA Section */
  .page-news__cta-section {
    padding: 50px 0 !important;
  }

  .page-news__cta-title {
    font-size: 28px !important;
    margin-bottom: 15px !important;
  }

  .page-news__cta-description {
    font-size: 15px !important;
    margin-bottom: 20px !important;
  }

  .page-news__cta-buttons {
    flex-direction: column !important;
    gap: 15px !important;
    padding: 0 15px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .page-news__btn-primary, .page-news__btn-secondary {
    font-size: 16px !important;
    padding: 12px 25px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
  }

  /* FAQ Section */
  .page-news__faq-section {
    padding: 50px 0 !important;
  }

  .page-news__faq-list {
    padding: 0 15px !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .page-news__faq-question {
    padding: 15px !important;
  }

  .page-news__faq-question h3 {
    font-size: 16px !important;
  }

  .page-news__faq-toggle {
    font-size: 20px !important;
    width: 24px !important;
    height: 24px !important;
  }

  .page-news__faq-item.active .page-news__faq-answer {
    padding: 15px !important;
  }

  /* General image and container responsiveness for mobile */
  .page-news img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }

  .page-news__container,
  .page-news__featured-article,
  .page-news__article-card,
  .page-news__cta-container,
  .page-news__faq-item {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
}