/* style/news.css */
.page-news {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: #f0f0f0; /* Light text for dark body background */
  background-color: var(--dark-bg-1); /* Inherited from shared.css, assumed dark */
}

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

.page-news__section-title {
  font-size: 32px;
  font-weight: bold;
  color: #FF4500; /* Main brand color for titles */
  text-align: center;
  margin-bottom: 40px;
  text-transform: uppercase;
}

.page-news__main-title {
  font-size: 48px;
  font-weight: bold;
  color: #FF4500; /* Main brand color for primary title */
  text-align: center;
  margin-bottom: 20px;
  line-height: 1.2;
}

.page-news__intro-section {
  padding-top: 10px; /* To clear fixed header */
  padding-bottom: 60px;
  background: #1A202C; /* Auxiliary dark background */
  margin-bottom: 40px;
}

.page-news__intro-text {
  font-size: 18px;
  text-align: center;
  margin-bottom: 30px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  color: #f0f0f0;
}

.page-news__highlight-text {
  color: #ffd700; /* Gold for highlights */
  font-weight: bold;
}

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

.page-news__btn-primary,
.page-news__btn-secondary {
  display: inline-block;
  padding: 15px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  font-size: 18px;
  transition: all 0.3s ease;
  text-align: center;
}

.page-news__btn-primary {
  background-color: #FF4500; /* Main brand color */
  color: #ffffff;
  border: 2px solid #FF4500;
}

.page-news__btn-primary:hover {
  background-color: #e63900;
  border-color: #e63900;
  transform: translateY(-2px);
}

.page-news__btn-secondary {
  background-color: transparent;
  color: #FF4500; /* Main brand color */
  border: 2px solid #FF4500;
}

.page-news__btn-secondary:hover {
  background-color: #FF4500;
  color: #ffffff;
  transform: translateY(-2px);
}

.page-news__articles-section {
  padding: 60px 0;
  background-color: var(--dark-bg-1);
}

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

.page-news__article-card {
  background: #1A202C; /* Auxiliary dark background for cards */
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.page-news__article-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
}

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

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

.page-news__article-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.page-news__article-card:hover .page-news__article-image {
  transform: scale(1.05);
}

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

.page-news__article-title {
  font-size: 22px;
  font-weight: bold;
  margin-bottom: 10px;
  color: #FF4500; /* Main brand color for article titles */
  line-height: 1.4;
}

.page-news__article-excerpt {
  font-size: 16px;
  color: #cccccc;
  margin-bottom: 15px;
}

.page-news__article-date {
  font-size: 14px;
  color: #999999;
  display: block;
}

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

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

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

.page-news__pagination-link--active {
  background-color: #FF4500;
  color: #ffffff;
  border-color: #FF4500;
}

.page-news__cta-bottom-section {
  padding: 80px 0;
  background: linear-gradient(135deg, #1A202C, #000000); /* Dark gradient background */
  text-align: center;
  margin-top: 40px;
}

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

.page-news__btn-primary--large {
  padding: 18px 40px;
  font-size: 20px;
}

.page-news__faq-section {
  padding: 60px 0;
  background-color: 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;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #1A202C; /* Auxiliary dark background */
}

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

/* FAQ展开状态 - 🚨 Sử dụng!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 !important;
  opacity: 1;
  background: rgba(255, 255, 255, 0.05); /* Slightly lighter dark background */
  border-radius: 0 0 8px 8px;
}

/* Question style */
.page-news__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  background: #1A202C;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.3s ease, border-color 0.3s ease;
  position: relative;
}

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

.page-news__faq-question:active {
  background: rgba(255, 255, 255, 0.15);
}

/* Question title style */
.page-news__faq-question h3 {
  margin: 0;
  padding: 0;
  flex: 1;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.5;
  pointer-events: none; /* Prevent h3 tag from blocking click events */
  color: #f0f0f0; /* Light text */
}

/* Toggle icon */
.page-news__faq-toggle {
  font-size: 28px;
  font-weight: bold;
  line-height: 1;
  color: #FF4500; /* Main brand color for toggle */
  transition: transform 0.3s ease, color 0.3s ease;
  flex-shrink: 0;
  margin-left: 15px;
  pointer-events: none; /* Prevent icon from blocking click events */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
}

.page-news__faq-item.active .page-news__faq-toggle {
  color: #ffd700; /* Gold when active */
  transform: rotate(45deg); /* Optional: rotate for 'X' effect */
}

.page-news__link {
  color: #FF4500;
  text-decoration: none;
  transition: color 0.3s ease;
}

.page-news__link:hover {
  color: #ffd700;
  text-decoration: underline;
}

/* Contrast assurance for various elements */
.page-news__article-content {
  color: #f0f0f0; /* Ensure light text on dark card background */
}
.page-news__article-excerpt {
  color: #cccccc;
}
.page-news__article-date {
  color: #999999;
}

/* 🚨 Mobile responsive design */
@media (max-width: 1024px) {
  .page-news__main-title {
    font-size: 40px;
  }
  .page-news__section-title {
    font-size: 28px;
  }
  .page-news__articles-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }
  .page-news__article-image-wrapper {
    height: 220px;
  }
  .page-news__article-title {
    font-size: 20px;
  }
  .page-news__intro-text, .page-news__cta-text {
    font-size: 17px;
  }
  .page-news__faq-question h3 {
    font-size: 17px;
  }
}

@media (max-width: 768px) {
  .page-news__container {
    padding: 0 15px;
  }
  .page-news__main-title {
    font-size: 32px;
  }
  .page-news__section-title {
    font-size: 24px;
    margin-bottom: 30px;
  }
  .page-news__intro-text, .page-news__cta-text {
    font-size: 16px;
  }
  .page-news__cta-group {
    flex-direction: column;
    gap: 15px;
  }
  .page-news__btn-primary, .page-news__btn-secondary {
    width: 100%;
    padding: 12px 20px;
    font-size: 16px;
  }
  .page-news__articles-grid {
    grid-template-columns: 1fr;
  }
  .page-news__article-image-wrapper {
    height: 200px;
  }
  .page-news__article-title {
    font-size: 18px;
  }
  .page-news__article-excerpt {
    font-size: 15px;
  }
  .page-news__faq-list {
    padding: 0;
  }
  .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;
  }

  /* 🚨 Mobile image responsive adaptation enforcement */
  .page-news img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  
  .page-news__intro-section,
  .page-news__articles-section,
  .page-news__cta-bottom-section,
  .page-news__faq-section,
  .page-news__container,
  .page-news__article-card,
  .page-news__article-image-wrapper,
  .page-news__faq-item {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  /* Specific padding for container to prevent horizontal scroll */
  .page-news__intro-section .page-news__container,
  .page-news__articles-section .page-news__container,
  .page-news__cta-bottom-section .page-news__container,
  .page-news__faq-section .page-news__container {
    padding-left: 15px !important;
    padding-right: 15px !important;
  }
}

/* Ensure all links have sufficient contrast on dark background */
.page-news a {
  color: #FF4500;
}
.page-news a:hover {
  color: #ffd700;
}

/* Contrast assurance for various elements */
.page-news__article-content {
  color: #f0f0f0; /* Ensure light text on dark card background */
}
.page-news__article-excerpt {
  color: #cccccc;
}
.page-news__article-date {
  color: #999999;
}

/* Emergency repair mechanism - If needed */
.page-news__contrast-fix {
  background: #ffffff !important;
  color: #333333 !important;
  border: 1px solid #e0e0e0 !important;
}

.page-news__text-contrast-fix {
  color: #333333 !important;
  text-shadow: none !important;
}