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

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

.page-blog__hero-section {
  padding-top: 10px; /* Small top padding, relies on body padding-top for header offset */
  padding-bottom: 40px;
  text-align: center;
  background-color: #FFFFFF;
}

.page-blog__header-content {
  padding: 40px 0;
}

.page-blog__main-title {
  font-size: clamp(28px, 4vw, 48px);
  font-weight: bold;
  color: #017439;
  margin-bottom: 20px;
  line-height: 1.2;
}

.page-blog__description {
  font-size: 18px;
  color: #555555;
  margin-bottom: 30px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

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

.page-blog__btn {
  display: inline-block;
  padding: 12px 25px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  font-size: 16px;
  transition: background-color 0.3s ease, color 0.3s ease;
  white-space: normal;
  word-wrap: break-word;
  box-sizing: border-box;
  max-width: 100%;
}

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

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

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

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

/* Custom colors for Register/Login buttons */
.page-blog__btn-register {
  background-color: #C30808;
  color: #FFFF00;
  border: 2px solid transparent;
}

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

.page-blog__btn-login {
  background-color: #C30808;
  color: #FFFF00;
  border: 2px solid transparent;
}

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

.page-blog__articles-section {
  padding: 60px 0;
  background-color: #f9f9f9;
}

.page-blog__section-title {
  font-size: clamp(24px, 3.5vw, 36px);
  font-weight: bold;
  color: #017439;
  text-align: center;
  margin-bottom: 40px;
}

.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.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  height: 100%; /* Ensure cards have equal height */
  display: flex;
  flex-direction: column;
}

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

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

.page-blog__article-figure {
  margin: 0;
  width: 100%;
  overflow: hidden;
}

.page-blog__article-image {
  width: 100%;
  height: 200px; /* Fixed height for consistency */
  object-fit: cover;
  display: block;
}

.page-blog__article-content {
  padding: 20px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.page-blog__article-title {
  font-size: 20px;
  font-weight: bold;
  color: #017439;
  margin-bottom: 10px;
}

.page-blog__article-excerpt {
  font-size: 15px;
  color: #555555;
  margin-bottom: 15px;
}

.page-blog__article-date {
  font-size: 14px;
  color: #777777;
  text-align: right;
}

.page-blog__view-all-wrapper {
  text-align: center;
  margin-top: 40px;
}

.page-blog__featured-section {
  padding: 60px 0;
  background-color: #017439; /* Dark background */
  color: #ffffff; /* Light text */
}

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

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

.page-blog__feature-item {
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, background-color 0.3s ease;
  text-align: center;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.page-blog__feature-item:hover {
  transform: translateY(-5px);
  background-color: rgba(255, 255, 255, 0.2);
}

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

.page-blog__feature-image {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
}

.page-blog__feature-title {
  font-size: 22px;
  font-weight: bold;
  margin: 15px 0 10px;
  color: #ffffff;
}

.page-blog__feature-description {
  font-size: 15px;
  color: #f0f0f0;
  padding: 0 20px 20px;
  flex-grow: 1;
}

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

.page-blog__cta-content {
  max-width: 800px;
  margin: 0 auto;
}

.page-blog__cta-title {
  font-size: clamp(24px, 3.5vw, 36px);
  font-weight: bold;
  color: #017439;
  margin-bottom: 20px;
}

.page-blog__cta-description {
  font-size: 18px;
  color: #555555;
  margin-bottom: 30px;
}

/* General image responsiveness */
.page-blog img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
  .page-blog {
    font-size: 16px;
    line-height: 1.6;
  }

  .page-blog__container {
    padding-left: 15px;
    padding-right: 15px;
  }

  /* 顶区标题 + 双 CTA */
  .page-blog__hero-section {
    padding-top: 10px !important; /* Small top padding for mobile */
    padding-bottom: 30px;
  }

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

  .page-blog__description {
    font-size: 16px;
    padding: 0 10px;
  }

  .page-blog__cta-buttons {
    flex-direction: column;
    gap: 10px;
    padding: 0 15px;
  }

  .page-blog__btn {
    width: 100% !important;
    max-width: 100% !important;
    padding-left: 15px;
    padding-right: 15px;
  }

  /* 单栏长文容器 */
  .page-blog__articles-section,
  .page-blog__featured-section,
  .page-blog__cta-section {
    padding: 40px 0;
  }

  .page-blog__section-title {
    font-size: 28px;
    margin-bottom: 30px;
    padding: 0 10px;
  }

  .page-blog__article-grid,
  .page-blog__feature-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .page-blog__article-card,
  .page-blog__feature-item {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

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

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

  .page-blog__feature-image {
    height: 150px;
  }

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

  .page-blog__feature-description {
    font-size: 14px;
  }

  .page-blog__cta-title {
    font-size: 28px;
  }

  .page-blog__cta-description {
    font-size: 16px;
    padding: 0 10px;
  }

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

  .page-blog__article-figure,
  .page-blog__feature-item figure {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }

  /* 按钮与按钮容器 */
  .page-blog__cta-buttons,
  .page-blog__view-all-wrapper {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    flex-wrap: wrap !important;
    gap: 10px;
  }

  .page-blog__cta-buttons {
    flex-direction: column; /* Stack buttons vertically on mobile */
  }

  /* No specific registration tutorial or FAQ blocks required for this blog page content */
}

/* Contrast Fixes */
.page-blog__contrast-fix {
  background: #ffffff !important;
  color: #333333 !important;
  border: 1px solid #e0e0e0 !important;
}

.page-blog__text-contrast-fix {
  color: #333333 !important;
  text-shadow: none !important;
}