:root {
  --primary-color: #0A192F;
  --secondary-color: #FFD700;
  --accent-red: #E53E3E;
  --text-dark: #333333;
  --text-light: #ffffff;
  --bg-light: #f5f5f5;
  --bg-white: #ffffff;
  --border-color: #e0e0e0;
}

.page-news {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: var(--text-dark);
  background-color: var(--bg-white);
  padding-top: var(--header-offset, 120px); /* Ensures content is below fixed header */
}

.page-news__hero-section {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 20px;
  background-color: var(--primary-color);
  color: var(--text-light);
  overflow: hidden;
}

.page-news__hero-content {
  position: relative;
  z-index: 2;
  max-width: 900px;
  margin-bottom: 40px;
}

.page-news__main-title {
  font-size: 48px;
  font-weight: bold;
  margin-bottom: 20px;
  color: var(--secondary-color);
  text-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.page-news__hero-description {
  font-size: 20px;
  margin-bottom: 30px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.9);
}

.page-news__hero-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.3;
  z-index: 1;
}

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

.page-news__section-title {
  font-size: 38px;
  font-weight: bold;
  text-align: center;
  margin-bottom: 20px;
  color: var(--primary-color);
}

.page-news__section-description {
  font-size: 18px;
  text-align: center;
  margin-bottom: 50px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  color: var(--text-dark);
}

/* Buttons */
.page-news__cta-button {
  display: inline-block;
  padding: 15px 35px;
  background-color: var(--accent-red);
  color: var(--text-light);
  text-decoration: none;
  border-radius: 8px;
  font-size: 18px;
  font-weight: bold;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  border: none;
  cursor: pointer;
  text-transform: uppercase;
}

.page-news__cta-button:hover {
  background-color: #c0392b;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.page-news__cta-button--secondary {
  background-color: var(--secondary-color);
  color: var(--primary-color);
}

.page-news__cta-button--secondary:hover {
  background-color: #e6c200;
  color: var(--primary-color);
}

/* Latest Articles Section */
.page-news__latest-articles {
  padding: 80px 0;
  background-color: var(--bg-white);
}

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

.page-news__article-item {
  background-color: var(--bg-white);
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

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

.page-news__article-image {
  width: 100%;
  height: 220px; /* Fixed height for consistent card appearance */
  object-fit: cover;
}

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

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

.page-news__article-excerpt {
  font-size: 15px;
  color: #666;
  margin-bottom: 15px;
  display: -webkit-box;
  -webkit-line-clamp: 3; /* Limit excerpt to 3 lines */
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.page-news__article-date {
  font-size: 14px;
  color: #999;
}

.page-news__view-more-cta {
  text-align: center;
  margin-top: 60px;
}

/* Categories Section */
.page-news__categories-section {
  padding: 80px 0;
  background-color: var(--primary-color);
  color: var(--text-light);
}

.page-news__categories-section .page-news__section-title {
  color: var(--secondary-color);
}

.page-news__categories-section .page-news__section-description {
  color: rgba(255, 255, 255, 0.9);
}

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

.page-news__category-item {
  background-color: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  padding: 25px;
  text-align: center;
  text-decoration: none;
  color: var(--text-light);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.page-news__category-item:hover {
  background-color: rgba(255, 255, 255, 0.2);
  border-color: var(--secondary-color);
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.page-news__category-title {
  font-size: 22px;
  font-weight: bold;
  margin-bottom: 10px;
  color: var(--secondary-color);
}

.page-news__category-desc {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.7);
}

/* Why Follow Section */
.page-news__why-follow-section {
  padding: 80px 0;
  background-color: var(--bg-light);
}

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

.page-news__benefit-item {
  background-color: var(--bg-white);
  border-radius: 10px;
  padding: 30px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  text-align: center;
}

.page-news__benefit-title {
  font-size: 24px;
  font-weight: bold;
  margin-bottom: 15px;
  color: var(--primary-color);
}

.page-news__benefit-item p {
  font-size: 16px;
  color: var(--text-dark);
}

/* FAQ Section */
.page-news__faq-section {
  padding: 80px 0;
  background-color: var(--bg-white);
}

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

/* FAQ容器样式 */
.page-news__faq-item {
  margin-bottom: 15px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

/* 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;
  background-color: var(--bg-light);
}

/* FAQ展开状态 - 🚨 使用!important và đủ lớn max-height để đảm bảo 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-color: var(--bg-light);
  border-radius: 0 0 8px 8px;
}

/* Vấn đề phong cách */
.page-news__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  background-color: var(--bg-white);
  border: 1px solid var(--border-color);
  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-color: var(--bg-light);
  border-color: #d0d0d0;
}

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

/* Vấn đề tiêu đề phong cách */
.page-news__faq-question h3 {
  margin: 0;
  padding: 0;
  flex: 1;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.5;
  color: var(--primary-color);
  pointer-events: none; /* Ngăn thẻ h3 chặn sự kiện click */
}

/* Chuyển đổi biểu tượng */
.page-news__faq-toggle {
  font-size: 28px;
  font-weight: bold;
  line-height: 1;
  color: var(--secondary-color);
  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: 32px;
  height: 32px;
}

.page-news__faq-item.active .page-news__faq-toggle {
  color: var(--primary-color);
  transform: rotate(45deg); /* Xoay để tạo hiệu ứng 'x' */
}

/* Final CTA Section */
.page-news__cta-section {
  padding: 80px 0;
  background-color: var(--primary-color);
  color: var(--text-light);
  text-align: center;
}

.page-news__cta-section .page-news__section-title {
  color: var(--secondary-color);
}

.page-news__cta-section .page-news__section-description {
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 40px;
}

/* Global image reset to prevent small icons */
.page-news img {
  min-width: 200px;
  min-height: 200px;
  object-fit: cover;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .page-news__main-title {
    font-size: 42px;
  }

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

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

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

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

  .page-news__category-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  }
}

@media (max-width: 768px) {
  .page-news {
    padding-top: var(--header-offset, 120px) !important;
    font-size: 16px;
    line-height: 1.6;
  }

  .page-news__hero-section {
    padding: 60px 15px;
  }

  .page-news__main-title {
    font-size: 32px;
    margin-bottom: 15px;
  }

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

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

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

  .page-news__section-title {
    font-size: 28px;
    margin-bottom: 15px;
  }

  .page-news__section-description {
    font-size: 15px;
    margin-bottom: 40px;
  }

  .page-news__latest-articles, .page-news__categories-section, .page-news__why-follow-section, .page-news__faq-section, .page-news__cta-section {
    padding: 50px 0;
  }

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

  .page-news__article-image {
    height: 180px; 
  }

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

  .page-news__article-excerpt {
    font-size: 14px;
  }

  .page-news__view-more-cta {
    margin-top: 40px;
  }

  .page-news__category-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .page-news__category-item {
    padding: 20px;
  }

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

  .page-news__category-desc {
    font-size: 14px;
  }

  .page-news__benefit-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .page-news__benefit-item {
    padding: 25px;
  }

  .page-news__benefit-title {
    font-size: 20px;
  }

  .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: 28px;
    height: 28px;
    font-size: 24px;
  }
  
  .page-news__faq-answer {
    padding: 0 15px;
  }
  
  .page-news__faq-item.active .page-news__faq-answer {
    padding: 15px !important;
  }

  /* Image responsive rules for mobile */
  .page-news img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  
  .page-news__hero-image {
    min-width: unset;
    min-height: unset;
  }

  .page-news__section, .page-news__card, .page-news__container, .page-news__hero-section, .page-news__latest-articles, .page-news__categories-section, .page-news__why-follow-section, .page-news__faq-section, .page-news__cta-section {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    overflow: hidden !important;
  }
}

@media (max-width: 480px) {
  .page-news__main-title {
    font-size: 28px;
  }

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