.page-blog {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: #333333; /* Default text color for light background */
  background-color: #FFFFFF; /* Default body background */
}

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

.page-blog__hero-section {
  padding-top: 10px; /* Small top padding, body handles header offset */
  padding-bottom: 60px;
  text-align: center;
  background-color: #f5f5f5;
  color: #333333;
}

.page-blog__main-title {
  font-size: 2.8em;
  font-weight: 700;
  line-height: 1.2;
  color: #017439;
  max-width: 900px;
  margin: 20px auto 15px auto;
  letter-spacing: -0.02em;
}

.page-blog__description {
  font-size: 1.1em;
  max-width: 800px;
  margin: 0 auto 30px auto;
  color: #555555;
}

.page-blog__cta-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 30px;
  flex-wrap: wrap;
}

.page-blog__btn-primary,
.page-blog__btn-secondary {
  display: inline-block;
  padding: 14px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.05em;
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
  white-space: normal; /* Allow text wrapping */
  word-wrap: break-word; /* Allow text wrapping */
  box-sizing: border-box;
  max-width: 300px; /* Max width for individual buttons */
}

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

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

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

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

.page-blog__latest-articles {
  padding: 80px 0;
  background-color: #ffffff;
}

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

.page-blog__section-title--white {
  color: #ffffff;
}

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

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

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

.page-blog__article-image {
  width: 100%;
  height: 250px; /* Fixed height for consistency */
  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;
  line-height: 1.4;
}

.page-blog__card-title a {
  color: #333333;
  text-decoration: none;
  transition: color 0.3s ease;
}

.page-blog__card-title a:hover {
  color: #017439;
}

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

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

.page-blog__read-more-btn {
  display: inline-block;
  padding: 10px 20px;
  background-color: #017439;
  color: #ffffff;
  text-decoration: none;
  border-radius: 5px;
  font-weight: 600;
  transition: background-color 0.3s ease;
  align-self: flex-start;
}

.page-blog__read-more-btn:hover {
  background-color: #005a2d;
}

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

.page-blog__why-follow {
  background-color: #017439; /* Brand color as background */
  padding: 80px 0;
  color: #ffffff; /* White text for contrast */
}

.page-blog__text-block {
  max-width: 900px;
  margin: 30px auto 40px auto;
  font-size: 1.1em;
  line-height: 1.7;
  text-align: justify;
}

.page-blog__text-block--white p {
  color: #ffffff;
}

.page-blog__categories {
  padding: 80px 0;
  background-color: #f9f9f9;
}

.page-blog__category-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
  margin-top: 40px;
}

.page-blog__category-item {
  display: inline-block;
  padding: 10px 25px;
  background-color: #e0e0e0;
  color: #333333;
  text-decoration: none;
  border-radius: 25px;
  font-weight: 600;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.page-blog__category-item:hover {
  background-color: #017439;
  color: #ffffff;
}

/* --- Responsive Styles --- */

@media (max-width: 1024px) {
  .page-blog__main-title {
    font-size: 2.5em;
  }

  .page-blog__section-title {
    font-size: 2em;
  }

  .page-blog__article-image {
    height: 220px;
  }

  .page-blog__card-title {
    font-size: 1.3em;
  }

  .page-blog__text-block {
    font-size: 1em;
  }
}

@media (max-width: 768px) {
  /* 1. 顶区标题 + 双 CTA */
  .page-blog__hero-section {
    padding-top: 10px !important; /* Small top padding, body handles header offset */
    padding-bottom: 40px;
  }

  .page-blog__main-title {
    font-size: 2em;
    margin-top: 15px;
    margin-bottom: 10px;
  }

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

  .page-blog__cta-buttons {
    flex-direction: column;
    gap: 15px;
    margin-top: 20px;
    padding: 0 15px; /* Add padding to container */
  }

  /* 4. 按钮与按钮容器 */
  .page-blog__btn-primary,
  .page-blog__btn-secondary,
  .page-blog a[class*="button"],
  .page-blog a[class*="btn"] {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    padding: 12px 20px !important;
    font-size: 1em !important;
  }

  .page-blog__cta-buttons,
  .page-blog__button-group,
  .page-blog__btn-container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    flex-wrap: wrap !important;
    gap: 10px;
    flex-direction: column;
  }

  /* 2. 单栏长文容器 */
  .page-blog__container {
    padding: 0 15px;
  }

  .page-blog__latest-articles,
  .page-blog__why-follow,
  .page-blog__categories {
    padding: 50px 0;
  }

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

  .page-blog__article-grid {
    grid-template-columns: 1fr;
    gap: 25px;
  }

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

  .page-blog__article-image {
    height: 200px; /* Adjust height for smaller screens */
  }

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

  .page-blog__card-excerpt {
    font-size: 0.95em;
  }

  .page-blog__text-block {
    font-size: 0.95em;
    text-align: left; /* Align text left on mobile for better readability */
    margin-left: 0;
    margin-right: 0;
    max-width: 100%;
  }

  .page-blog__category-grid {
    gap: 10px;
    justify-content: flex-start;
    overflow-x: auto; /* Allow horizontal scroll if too many items */
    flex-wrap: nowrap; /* Prevent wrapping for horizontal scroll */
    padding-bottom: 10px;
  }

  .page-blog__category-item {
    flex-shrink: 0;
  }

  .page-blog__view-all-button-container {
    margin-top: 40px;
    padding: 0 15px;
  }

  /* No specific FAQ section with accordion in this blog page content */
  /* Therefore, no specific 5. 注册教程与 FAQ 区块 media queries for accordion JS */
}