/* style/news.css */
.page-news {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: #333333; /* Dark text for light body background #f4f4f4 */
  background-color: #f4f4f4;
  padding-top: var(--header-offset, 120px); /* Ensure content is below fixed header */
}

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

.page-news__section-title {
  font-size: 2.5em;
  color: #8B0000; /* Dark red for titles */
  text-align: center;
  margin-bottom: 40px;
  position: relative;
  padding-bottom: 15px;
}

.page-news__section-title::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background-color: #FFD700;
  border-radius: 2px;
}

.page-news__intro-text {
    text-align: center;
    max-width: 800px;
    margin: -20px auto 60px auto;
    font-size: 1.1em;
    color: #555555;
}

/* Hero Banner Section */
.page-news__hero-banner {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 20px;
  background: linear-gradient(135deg, #ffd70030, #8b000030);
}

.page-news__hero-container {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.page-news__hero-image img {
  width: 100%;
  height: auto;
  max-width: 100%;
  display: block;
  border-radius: 8px;
  object-fit: cover;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

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

.page-news__main-title {
  font-size: 3.2em;
  color: #8B0000; /* Dark red for main title */
  margin-bottom: 20px;
  line-height: 1.2;
}

.page-news__description {
  font-size: 1.3em;
  color: #555555;
  max-width: 900px;
  margin: 0 auto 30px auto;
}

.page-news__cta-button {
  display: inline-block;
  padding: 15px 40px;
  background: #FFD700;
  color: #ffffff;
  text-decoration: none;
  border-radius: 50px;
  font-size: 1.2em;
  font-weight: bold;
  margin-top: 20px;
  transition: all 0.3s ease;
  box-shadow: 0 5px 15px rgba(255, 215, 0, 0.4);
  border: none;
  cursor: pointer;
}

.page-news__cta-button:hover {
  background: #e6c200;
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(255, 215, 0, 0.6);
}

/* Latest Articles Section */
.page-news__latest-articles {
  padding: 80px 0;
  background-color: #fcfcfc;
}

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

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

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

.page-news__article-card img {
  width: 100%;
  height: 225px;
  object-fit: cover;
  display: block;
}

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

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

.page-news__article-title a {
  color: #8B0000;
  text-decoration: none;
  transition: color 0.3s ease;
}

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

.page-news__article-meta {
    font-size: 0.9em;
    color: #777777;
    margin-bottom: 15px;
}

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

.page-news__read-more {
  display: inline-block;
  color: #FFD700;
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s ease;
}

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

/* Categories Section */
.page-news__categories {
  padding: 80px 0;
  background-color: #f4f4f4;
}

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

.page-news__category-card {
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  text-decoration: none;
  color: #333333;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.page-news__category-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}

.page-news__category-title {
  font-size: 1.4em;
  color: #8B0000;
  padding: 15px 20px 10px;
  margin: 0;
}

.page-news__category-description {
    font-size: 0.95em;
    color: #555555;
    padding: 0 20px 20px;
    margin: 0;
}

/* Featured Articles Section */
.page-news__featured-articles {
    padding: 80px 0;
    background-color: #fcfcfc;
}

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

.page-news__featured-card {
    background: #ffffff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.page-news__featured-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
}

.page-news__featured-card img {
    width: 100%;
    height: 281px; /* 16:9 aspect ratio for 500px width */
    object-fit: cover;
    display: block;
}

/* CTA Section */
.page-news__cta-section {
  padding: 80px 0;
  background: linear-gradient(90deg, #FFD700, #8B0000);
  color: #ffffff;
  text-align: center;
}

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

.page-news__cta-title {
  font-size: 2.8em;
  margin-bottom: 20px;
  color: #ffffff;
}

.page-news__cta-description {
  font-size: 1.2em;
  margin-bottom: 40px;
  line-height: 1.8;
}

.page-news__btn-large {
  padding: 18px 50px;
  font-size: 1.3em;
  background: #333333; /* Dark button on colorful background for contrast */
  color: #FFD700;
  border-radius: 50px;
  text-decoration: none;
  font-weight: bold;
  transition: all 0.3s ease;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  border: none;
  cursor: pointer;
}

.page-news__btn-large:hover {
  background: #000000;
  color: #ffffff;
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
}

.page-news__cta-bottom {
    background: #8B0000; /* Dark red background for better contrast with light text */
}

.page-news__cta-bottom .page-news__cta-title,
.page-news__cta-bottom .page-news__cta-description {
    color: #ffffff;
}

.page-news__cta-bottom .page-news__cta-button {
    background: #FFD700;
    color: #8B0000;
    box-shadow: 0 5px 15px rgba(255, 215, 0, 0.4);
}

.page-news__cta-bottom .page-news__cta-button:hover {
    background: #e6c200;
    color: #333333;
    box-shadow: 0 8px 20px rgba(255, 215, 0, 0.6);
}

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

.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.08);
}

/* 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: #555555;
  font-size: 1.05em;
}

/* FAQ展开状态 - 🚨 使用!important和足够大的max-height确保一定能展开 */
.page-news__faq-item.active .page-news__faq-answer {
  max-height: 2000px !important; /* 🚨 使用!important确保优先级，值足够大以容纳任何内容 */
  padding: 20px !important;
  opacity: 1;
  background: #ffffff;
  border-top: 1px solid #e0e0e0;
  border-radius: 0 0 8px 8px;
}

/* 问题样式 */
.page-news__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  background: #FFD700;
  border: 1px solid #FFD700;
  border-radius: 8px;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
  position: relative;
  color: #ffffff;
}

.page-news__faq-item.active .page-news__faq-question {
    border-radius: 8px 8px 0 0;
    background: #8B0000;
    border-color: #8B0000;
}

.page-news__faq-question:hover {
  background: #e6c200;
  border-color: #e6c200;
  box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
}

.page-news__faq-item.active .page-news__faq-question:hover {
    background: #6a0000;
    border-color: #6a0000;
}

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

/* 切换图标 */
.page-news__faq-toggle {
  font-size: 28px;
  font-weight: bold;
  line-height: 1;
  color: #ffffff;
  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 {
  transform: rotate(45deg); /* Plus to X for active state */
  color: #ffffff;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .page-news__main-title {
        font-size: 2.8em;
    }
    .page-news__description {
        font-size: 1.15em;
    }
    .page-news__section-title {
        font-size: 2em;
    }
    .page-news__articles-grid, .page-news__category-grid, .page-news__article-row {
        gap: 20px;
    }
    .page-news__article-card img, .page-news__category-card img, .page-news__featured-card img {
        
    }
    .page-news__featured-card img {
        height: 250px;
    }
    .page-news__cta-title {
        font-size: 2.2em;
    }
    .page-news__btn-large {
        padding: 15px 40px;
        font-size: 1.2em;
    }
}

@media (max-width: 768px) {
  .page-news {
    padding-top: var(--header-offset, 120px) !important; /* Mobile padding-top */
    font-size: 15px;
  }
  .page-news__container {
    padding: 0 15px;
  }
  .page-news__hero-banner {
    padding: 40px 15px;
  }
  .page-news__main-title {
    font-size: 2.2em;
    margin-bottom: 15px;
  }
  .page-news__description {
    font-size: 1em;
    margin-bottom: 20px;
  }
  .page-news__cta-button {
    padding: 12px 25px;
    font-size: 1em;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
  }

  .page-news__section-title {
    font-size: 1.8em;
    margin-bottom: 30px;
  }
  .page-news__intro-text {
      margin-bottom: 40px;
      font-size: 1em;
  }

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

  .page-news__articles-grid, .page-news__category-grid, .page-news__article-row {
    grid-template-columns: 1fr;
    gap: 25px;
  }

  .page-news__article-card img, .page-news__category-card img, .page-news__featured-card img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }

  .page-news__article-title {
    font-size: 1.3em;
  }
  .page-news__article-excerpt {
    font-size: 0.95em;
  }

  .page-news__category-title {
      font-size: 1.2em;
  }

  .page-news__cta-title {
    font-size: 2em;
  }
  .page-news__cta-description {
    font-size: 1em;
    margin-bottom: 30px;
  }
  .page-news__btn-large {
    padding: 15px 30px;
    font-size: 1.1em;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
  }

  /* FAQ Mobile */
  .page-news__faq-question {
    padding: 15px 20px;
  }
  .page-news__faq-question h3 {
    font-size: 1.1em;
  }
  .page-news__faq-toggle {
    font-size: 24px;
    width: 28px;
    height: 28px;
  }
  .page-news__faq-item.active .page-news__faq-answer {
    padding: 15px !important;
  }

  /* Ensure all content containers are responsive */
  .page-news__section,
  .page-news__card,
  .page-news__container,
  .page-news__hero-banner,
  .page-news__latest-articles,
  .page-news__categories,
  .page-news__featured-articles,
  .page-news__cta-section,
  .page-news__faq-section,
  .page-news__articles-grid,
  .page-news__category-grid,
  .page-news__article-row,
  .page-news__article-card,
  .page-news__category-card,
  .page-news__featured-card,
  .page-news__faq-list,
  .page-news__faq-item {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    overflow-x: hidden;
  }
}

/* Global image responsiveness for all content area images */
.page-news img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* CSS for buttons to prevent overflow */
.page-news__cta-button,
.page-news__btn-large,
.page-news a[class*="button"],
.page-news a[class*="btn"] {
  max-width: 100%;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

.page-news__cta-buttons,
.page-news__button-group,
.page-news__btn-container {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}