/* style/blog.css */
/* body 已 padding-top: var(--header-offset)；页面禁止再写该变量 */
.page-blog {
  background-color: #08160F; /* Custom background color */
  color: #F2FFF6; /* Main text color for dark background */
  font-family: Arial, sans-serif;
  line-height: 1.6;
}

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

.page-blog__hero-section {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column; /* Image on top, content below */
  align-items: center;
  padding-bottom: 60px; /* Space below content */
  padding-top: 10px; /* Small top padding, body handles header offset */
  overflow: hidden; /* Ensure no image overflow */
}

.page-blog__hero-image-wrapper {
  width: 100%;
  position: relative;
  margin-bottom: 30px; /* Space between image and text */
}

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

.page-blog__hero-content {
  text-align: center;
  z-index: 1; /* Ensure content is above any potential background elements */
  padding: 0 20px; /* Inner padding */
}

.page-blog__main-title {
  font-size: clamp(2.5rem, 5vw, 3.5rem); /* Responsive H1 font size */
  color: #F2FFF6; /* Light text for dark background */
  margin-bottom: 15px;
  font-weight: 700;
  line-height: 1.2;
}

.page-blog__description {
  font-size: 1.1rem;
  color: #A7D9B8; /* Secondary text color */
  margin-bottom: 30px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.page-blog__btn-primary {
  display: inline-block;
  background: linear-gradient(180deg, #2AD16F 0%, #13994A 100%); /* Custom button gradient */
  color: #F2FFF6; /* Light text on button */
  padding: 15px 30px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: bold;
  transition: background 0.3s ease, transform 0.3s ease;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.page-blog__btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.page-blog__btn-secondary {
  display: inline-block;
  background: transparent;
  color: #57E38D; /* Glow color for secondary button text */
  padding: 15px 30px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: bold;
  transition: all 0.3s ease;
  border: 2px solid #2E7A4E; /* Border color */
  cursor: pointer;
  margin-left: 15px;
}

.page-blog__btn-secondary:hover {
  background: rgba(87, 227, 141, 0.1); /* Light hover effect */
  color: #F2FFF6;
}

.page-blog__section-title {
  font-size: clamp(2rem, 4vw, 2.8rem);
  color: #F2FFF6;
  text-align: center;
  margin-bottom: 40px;
  font-weight: 700;
}

.page-blog__section-title--light {
  color: #F2FFF6;
}

.page-blog__section-intro {
  font-size: 1.05rem;
  color: #A7D9B8;
  text-align: center;
  margin-bottom: 50px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.page-blog__featured-posts {
  padding: 60px 0;
}

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

.page-blog__post-card {
  background-color: #11271B; /* Card BG color */
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid #2E7A4E; /* Border color */
}

.page-blog__post-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
}

.page-blog__post-thumbnail {
  width: 100%;
  height: 220px; /* Fixed height for consistency */
  object-fit: cover;
  display: block;
}

.page-blog__card-content {
  padding: 25px;
}

.page-blog__card-title {
  font-size: 1.5rem;
  margin-bottom: 10px;
  line-height: 1.3;
}

.page-blog__card-title a {
  color: #F2FFF6; /* Light text for card title link */
  text-decoration: none;
  transition: color 0.3s ease;
}

.page-blog__card-title a:hover {
  color: #57E38D; /* Glow color on hover */
}

.page-blog__post-meta {
  font-size: 0.9rem;
  color: #A7D9B8; /* Secondary text color */
  margin-bottom: 15px;
}

.page-blog__card-excerpt {
  font-size: 1rem;
  color: #A7D9B8; /* Secondary text color */
  margin-bottom: 20px;
}

.page-blog__read-more {
  display: inline-block;
  color: #57E38D; /* Glow color */
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s ease;
}

.page-blog__read-more:hover {
  color: #F2C14E; /* Gold color on hover */
}

.page-blog__latest-posts {
  padding: 60px 0;
}

.page-blog__post-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.page-blog__list-item {
  display: flex;
  align-items: center;
  background-color: #11271B; /* Card BG color */
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid #2E7A4E; /* Border color */
  padding: 15px;
}

.page-blog__list-item:hover {
  transform: translateX(5px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.page-blog__list-thumbnail {
  width: 200px; /* Adjusted to meet min-size requirement */
  min-width: 200px;
  height: 150px; /* Adjusted to meet min-size requirement */
  object-fit: cover;
  border-radius: 8px;
  margin-right: 20px;
  display: block;
}

.page-blog__list-content {
  flex-grow: 1;
}

.page-blog__list-title {
  font-size: 1.2rem;
  margin-bottom: 5px;
  line-height: 1.3;
}

.page-blog__list-title a {
  color: #F2FFF6; /* Light text for list title link */
  text-decoration: none;
  transition: color 0.3s ease;
}

.page-blog__list-title a:hover {
  color: #57E38D; /* Glow color on hover */
}

.page-blog__list-excerpt {
  font-size: 0.95rem;
  color: #A7D9B8; /* Secondary text color */
}

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

.page-blog__cta-section {
  background-color: #0A4B2C; /* Deep Green for CTA background */
  padding: 80px 0;
  text-align: center;
}

.page-blog__cta-description {
  font-size: 1.1rem;
  color: #A7D9B8;
  margin-bottom: 40px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.page-blog__cta-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap; /* Allow wrapping on small screens */
}

.page-blog__faq-section {
  padding: 60px 0;
}

.page-blog__faq-list {
  max-width: 900px;
  margin: 0 auto;
}

.page-blog__faq-item {
  background-color: #11271B; /* Card BG color */
  border: 1px solid #2E7A4E; /* Border color */
  border-radius: 10px;
  margin-bottom: 15px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
}

.page-blog__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  cursor: pointer;
  font-size: 1.2rem;
  font-weight: bold;
  color: #F2FFF6;
  background-color: #11271B;
  user-select: none;
  list-style: none; /* For <details> summary */
}

.page-blog__faq-question::-webkit-details-marker {
  display: none; /* For <details> summary */
}

.page-blog__faq-toggle {
  font-size: 1.5rem;
  line-height: 1;
  color: #57E38D; /* Glow color */
  margin-left: 15px;
}

.page-blog__faq-answer {
  padding: 0 25px 20px;
  font-size: 1rem;
  color: #A7D9B8;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out, padding-top 0.3s ease-out;
}

.page-blog__faq-item[open] .page-blog__faq-answer {
  max-height: 500px; /* Adjust as needed */
  padding-top: 10px;
}

/* Ensure content images are at least 200px */
.page-blog__card-content img,
.page-blog__list-content img {
    min-width: 200px;
    min-height: 200px;
    max-width: 100%;
    height: auto;
}

/* Responsive adjustments */
@media (max-width: 992px) {
  .page-blog__post-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }
}

@media (max-width: 768px) {
  .page-blog__hero-section {
    padding-bottom: 40px;
    padding-top: 10px !important; /* Ensure small top padding */
  }

  .page-blog__main-title {
    font-size: clamp(2rem, 8vw, 2.5rem);
  }

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

  .page-blog__btn-primary,
  .page-blog__btn-secondary {
    padding: 12px 25px;
    font-size: 0.95rem;
    margin-left: 0; /* Remove margin for stacked buttons */
  }

  .page-blog__cta-buttons {
    flex-direction: column;
    gap: 15px;
    align-items: center;
  }

  .page-blog__section-title {
    font-size: clamp(1.8rem, 7vw, 2.2rem);
    margin-bottom: 30px;
  }

  .page-blog__post-grid {
    grid-template-columns: 1fr; /* Stack cards on mobile */
  }

  .page-blog__list-item {
    flex-direction: column;
    align-items: flex-start;
    padding: 15px;
  }

  .page-blog__list-thumbnail {
    width: 100% !important;
    height: auto !important;
    max-width: 100% !important;
    margin-right: 0;
    margin-bottom: 15px;
  }

  .page-blog__list-content {
    width: 100%;
  }

  .page-blog__faq-question {
    font-size: 1.1rem;
    padding: 15px 20px;
  }

  /* Mobile image and video responsiveness */
  .page-blog img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  
  .page-blog__section,
  .page-blog__card,
  .page-blog__container,
  .page-blog__hero-section,
  .page-blog__featured-posts,
  .page-blog__latest-posts,
  .page-blog__cta-section,
  .page-blog__faq-section,
  .page-blog__post-card,
  .page-blog__list-item,
  .page-blog__faq-item,
  .page-blog__cta-buttons,
  .page-blog__post-grid,
  .page-blog__post-list {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    overflow: hidden !important; /* Prevent overflow */
  }

  /* Mobile button responsiveness */
  .page-blog__cta-button,
  .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-left: 15px;
    padding-right: 15px;
  }
  
  .page-blog__cta-buttons {
    flex-wrap: wrap !important;
    gap: 10px;
    flex-direction: column; /* Ensure vertical stacking for buttons */
  }
}