.page-blog {
  color: #ffffff; /* Default text color for dark body background */
  font-family: Arial, sans-serif;
  line-height: 1.6;
  background-color: var(--accent-color); /* Ensure consistency with body background */
}

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

.page-blog__hero-section {
  padding-top: 10px; /* Small top padding, body handles --header-offset */
  padding-bottom: 40px;
  background-color: #017439;
  color: #ffffff;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.page-blog__hero-content-wrapper {
  max-width: 1200px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 15px;
  box-sizing: border-box;
}

.page-blog__hero-image {
  width: 100%;
  margin-bottom: 20px;
}

.page-blog__hero-image img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
  object-fit: cover;
}

.page-blog__hero-text-container {
  max-width: 800px;
  margin: 0 auto;
}

.page-blog__main-title {
  font-size: clamp(2em, 4vw, 2.8em);
  font-weight: 700;
  margin-bottom: 15px;
  color: #ffffff;
  line-height: 1.2;
}

.page-blog__description {
  font-size: 1.1em;
  margin-bottom: 30px;
  color: #f0f0f0;
}

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

.page-blog__btn-primary,
.page-blog__btn-secondary {
  display: inline-block;
  padding: 12px 25px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
  max-width: 100%;
}

.page-blog__btn-primary {
  background-color: #C30808; /* Custom color for register/login */
  color: #FFFF00; /* Custom font color for register/login */
  border: 2px solid #C30808;
}

.page-blog__btn-primary:hover {
  background-color: #a30606;
  border-color: #a30606;
}

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

.page-blog__btn-secondary:hover {
  background-color: #f0f0f0;
  border-color: #f0f0f0;
}

.page-blog__latest-posts {
  background-color: #ffffff;
  padding: 60px 0;
  color: #333333;
}

.page-blog__section-title {
  font-size: 2.2em;
  font-weight: 700;
  text-align: center;
  margin-bottom: 40px;
  color: #017439;
}

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

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

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

.page-blog__card-link {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.page-blog__card-image-wrapper {
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
  position: relative;
  overflow: hidden;
}

.page-blog__card-image-wrapper img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

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

.page-blog__card-title {
  font-size: 1.4em;
  font-weight: 600;
  margin-bottom: 10px;
  color: #017439;
  line-height: 1.3;
}

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

.page-blog__card-date {
  font-size: 0.85em;
  color: #777777;
  margin-top: auto;
  display: block;
}

.page-blog__read-more {
  color: #017439;
  font-weight: 600;
  margin-top: 10px;
  display: inline-block;
}

.page-blog__read-more:hover {
  text-decoration: underline;
}

.page-blog__view-all-button-container {
  text-align: center;
  margin-top: 20px;
}

.page-blog__content-section {
  background-color: #f8f8f8;
  padding: 60px 0;
  color: #333333;
}

.page-blog__article-detail {
  background-color: #ffffff;
  padding: 40px;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.page-blog__article-heading {
  font-size: 2em;
  font-weight: 700;
  color: #017439;
  margin-bottom: 25px;
  line-height: 1.3;
}

.page-blog__sub-heading {
  font-size: 1.6em;
  font-weight: 600;
  color: #017439;
  margin-top: 35px;
  margin-bottom: 15px;
  line-height: 1.4;
}

.page-blog__article-detail p {
  font-size: 1.05em;
  margin-bottom: 20px;
  color: #444444;
}

.page-blog__image-wrapper {
  margin: 30px 0;
  text-align: center;
}

.page-blog__image-wrapper img {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  margin: 0 auto;
  min-width: 200px;
  min-height: 200px;
}

.page-blog__cta-section {
  background-color: #017439;
  padding: 60px 0;
  text-align: center;
  color: #ffffff;
}

.page-blog__cta-title {
  font-size: 2.5em;
  font-weight: 700;
  margin-bottom: 20px;
  color: #ffffff;
  line-height: 1.2;
}

.page-blog__cta-description {
  font-size: 1.2em;
  max-width: 800px;
  margin: 0 auto 30px auto;
  color: #f0f0f0;
}

/* Responsive styles */
@media (max-width: 1024px) {
  .page-blog__main-title {
    font-size: clamp(2em, 5vw, 2.5em);
  }
  .page-blog__article-heading {
    font-size: 1.8em;
  }
  .page-blog__sub-heading {
    font-size: 1.4em;
  }
  .page-blog__cta-title {
    font-size: 2.2em;
  }
}

@media (max-width: 768px) {
  .page-blog {
    font-size: 16px !important;
    line-height: 1.6 !important;
  }

  .page-blog__container {
    padding-left: 15px !important;
    padding-right: 15px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  /* HERO 主图区域 */
  .page-blog__hero-section {
    padding-top: 10px !important; /* Small top padding for mobile */
    padding-bottom: 30px !important;
  }

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

  .page-blog__main-title {
    font-size: clamp(1.8em, 6vw, 2.2em) !important;
    margin-bottom: 10px !important;
  }

  .page-blog__description {
    font-size: 1em !important;
    margin-bottom: 20px !important;
  }

  /* 通用图片与容器 */
  .page-blog img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }

  .page-blog__image-wrapper img {
    min-width: 200px !important;
    min-height: 200px !important;
  }

  /* 按钮与按钮容器 */
  .page-blog__cta-group {
    flex-direction: column !important;
    gap: 10px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    padding: 0 15px !important;
  }

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

  /* 长文区 */
  .page-blog__latest-posts,
  .page-blog__content-section,
  .page-blog__cta-section {
    padding: 40px 0 !important;
  }

  .page-blog__section-title {
    font-size: 1.8em !important;
    margin-bottom: 30px !important;
  }

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

  .page-blog__article-card {
    margin-bottom: 0 !important;
  }

  .page-blog__article-detail {
    padding: 25px !important;
  }

  .page-blog__article-heading {
    font-size: 1.6em !important;
    margin-bottom: 20px !important;
  }

  .page-blog__sub-heading {
    font-size: 1.3em !important;
    margin-top: 30px !important;
    margin-bottom: 10px !important;
  }

  .page-blog__article-detail p {
    font-size: 0.95em !important;
  }

  .page-blog__cta-title {
    font-size: 1.8em !important;
  }

  .page-blog__cta-description {
    font-size: 1em !important;
  }
}