/* style/news.css */
/* body 已 padding-top: var(--header-offset)；页面禁止再写该变量 */
.page-news {
  font-family: 'Arial', sans-serif;
  color: var(--text-main, #1F2D3D); /* Default text color for light background */
  background-color: var(--background, #F4F7FB); /* Default background color */
  line-height: 1.6;
}

.page-news__hero-section {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-bottom: 60px;
  padding-top: 10px; /* Small top padding for first section */
  background-color: #F4F7FB; /* Consistent with body background */
}

.page-news__hero-image-wrapper {
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  margin-bottom: 40px;
}

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

.page-news__hero-content {
  max-width: 900px;
  text-align: center;
  padding: 0 20px;
}

.page-news__main-title {
  font-size: clamp(2.2rem, 4vw + 1rem, 3.5rem); /* H1 font size clamp */
  font-weight: 700;
  color: var(--text-main, #1F2D3D);
  margin-bottom: 20px;
  line-height: 1.2;
}

.page-news__description {
  font-size: 1.1rem;
  color: var(--text-main, #1F2D3D);
  margin-bottom: 30px;
}

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

.page-news__btn-primary,
.page-news__btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 25px;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  box-sizing: border-box;
  max-width: 100%; /* Ensure button responsiveness */
  white-space: normal; /* Allow text wrapping */
  word-wrap: break-word; /* Allow long words to break */
}

.page-news__btn-primary {
  background: linear-gradient(180deg, #4A8BFF 0%, #2F6BFF 100%);
  color: #ffffff;
  border: 2px solid transparent;
}

.page-news__btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-2px);
}

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

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

.page-news__latest-news-section {
  padding: 80px 0;
  background-color: var(--card-bg, #FFFFFF); /* Card background for this section */
}

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

.page-news__section-title {
  font-size: clamp(1.8rem, 3vw + 1rem, 2.8rem);
  font-weight: 700;
  color: var(--text-main, #1F2D3D);
  text-align: center;
  margin-bottom: 50px;
}

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

.page-news__news-card {
  background: #ffffff;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid var(--border, #D6E2FF);
}

.page-news__news-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

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

.page-news__card-image {
  width: 100%;
  height: 225px; /* Fixed height for consistent card image display */
  object-fit: cover;
  display: block;
  min-width: 200px;
  min-height: 200px;
}

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

.page-news__card-title {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--text-main, #1F2D3D);
  margin-bottom: 10px;
  line-height: 1.4;
}

.page-news__card-title:hover {
  color: var(--primary-color, #2F6BFF);
}

.page-news__card-excerpt {
  font-size: 0.95rem;
  color: var(--text-main, #1F2D3D);
  margin-bottom: 15px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.page-news__card-date {
  font-size: 0.85rem;
  color: #666;
}

.page-news__view-all-cta {
  text-align: center;
}

.page-news__cta-section.page-news__dark-bg {
  background-color: var(--primary-color, #2F6BFF); /* Dark background */
  padding: 80px 20px;
  text-align: center;
  color: #ffffff; /* White text for dark background */
}

.page-news__cta-section .page-news__section-title {
  color: #ffffff;
}

.page-news__cta-section .page-news__description {
  color: #f0f0f0;
  max-width: 800px;
  margin: 0 auto 40px auto;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .page-news {
    font-size: 16px;
    line-height: 1.6;
  }

  .page-news__hero-section {
    padding-top: 10px !important;
    padding-bottom: 40px;
  }

  .page-news__main-title {
    font-size: clamp(1.8rem, 6vw + 1rem, 2.5rem);
  }

  .page-news__description {
    font-size: 1rem;
  }

  .page-news__cta-group {
    flex-direction: column;
    gap: 15px;
    padding-left: 15px;
    padding-right: 15px;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }

  .page-news__btn-primary,
  .page-news__btn-secondary {
    width: 100% !important;
    max-width: 100% !important;
    padding-left: 15px !important;
    padding-right: 15px !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
  }

  .page-news__latest-news-section {
    padding: 40px 0;
  }

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

  .page-news__section-title {
    font-size: clamp(1.5rem, 5vw + 1rem, 2rem);
    margin-bottom: 30px;
  }

  .page-news__news-grid {
    grid-template-columns: 1fr;
  }

  .page-news__hero-image,
  .page-news__card-image {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    min-width: 200px !important;
    min-height: 200px !important;
  }

  .page-news__cta-section.page-news__dark-bg {
    padding: 40px 15px;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
}

/* Ensure all content-area images meet min size requirements */
.page-news img {
  min-width: 200px;
  min-height: 200px;
}