/* Base styles for the blog page */
.page-blog {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #333333; /* Default text color for light background */
  background-color: #F5F7FA; /* Default background color */
}

/* Hero Section */
.page-blog__hero-section {
  position: relative;
  width: 100%;
  padding-top: 10px; /* Small top padding, relying on body for header offset */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  color: #ffffff;
  background: linear-gradient(180deg, #FF5A4F 0%, #E53935 100%); /* Brand color gradient */
}

.page-blog__hero-image {
  width: 100%;
  height: auto;
  max-height: 600px; /* Limit height of hero image container */
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

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

.page-blog__hero-content {
  position: relative;
  padding: 40px 20px;
  max-width: 900px;
  margin: 0 auto;
  z-index: 2;
}

.page-blog__main-title {
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: 700;
  margin-bottom: 15px;
  line-height: 1.2;
  color: #ffffff;
}

.page-blog__subtitle {
  font-size: clamp(1rem, 2vw, 1.25rem);
  margin-bottom: 30px;
  color: #f0f0f0;
}

.page-blog__btn-primary {
  display: inline-block;
  padding: 14px 30px;
  background: linear-gradient(180deg, #FF5A4F 0%, #E53935 100%);
  color: #ffffff;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 600;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  font-size: 1rem;
}

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

/* General Section Styles */
.page-blog__section-title {
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 700;
  text-align: center;
  margin-bottom: 20px;
  color: #333333;
}

.page-blog__section-description {
  font-size: 1.1rem;
  text-align: center;
  margin-bottom: 40px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  color: #555555;
}

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

.page-blog__light-bg {
  background-color: #F5F7FA;
  color: #333333;
}

.page-blog__dark-bg {
  background-color: #E53935;
  color: #ffffff;
}

/* Posts Section */
.page-blog__posts-section {
  padding: 60px 0;
}

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

.page-blog__post-card {
  background: #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;
}

.page-blog__post-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

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

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

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

.page-blog__post-title {
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 10px;
  color: #333333;
}

.page-blog__post-meta {
  font-size: 0.9rem;
  color: #666666;
  margin-bottom: 15px;
}

.page-blog__post-excerpt {
  font-size: 1rem;
  color: #555555;
  margin-bottom: 20px;
}

.page-blog__read-more {
  color: #E53935;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.3s ease;
}

.page-blog__read-more:hover {
  color: #FF5A4F;
}

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

.page-blog__btn-secondary {
  display: inline-block;
  padding: 12px 25px;
  background: #FFFFFF;
  color: #E53935;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 600;
  transition: all 0.3s ease;
  border: 2px solid #E53935;
  font-size: 1rem;
}

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

/* About Blog Section */
.page-blog__about-blog-section {
  padding: 60px 0;
}

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

.page-blog__content-area {
  max-width: 900px;
  margin: 0 auto;
  font-size: 1.1rem;
  line-height: 1.8;
  text-align: justify;
}

.page-blog__text-block p {
  margin-bottom: 20px;
  color: #f0f0f0;
}

.page-blog__text-block .page-blog__btn-primary {
  margin-top: 30px;
}

/* Popular Topics Section */
.page-blog__popular-topics-section {
  padding: 60px 0;
}

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

.page-blog__topic-card {
  background: #FFFFFF;
  border-radius: 10px;
  padding: 30px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  text-align: center;
}

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

.page-blog__topic-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 15px;
  color: #E53935;
}

.page-blog__topic-description {
  font-size: 1rem;
  color: #555555;
  margin-bottom: 20px;
}

.page-blog__btn-text {
  color: #E53935;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.3s ease;
}

.page-blog__btn-text:hover {
  color: #FF5A4F;
}

/* CTA Section */
.page-blog__cta-section {
  padding: 60px 0;
  text-align: center;
}

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

.page-blog__cta-content .page-blog__section-title,
.page-blog__cta-content p {
  color: #ffffff;
}

.page-blog__cta-content p {
  font-size: 1.1rem;
  margin-bottom: 30px;
}

/* FAQ Section */
.page-blog__faq-section {
  padding: 60px 0;
}

details.page-blog__faq-item {
  margin-bottom: 15px;
  border-radius: 5px;
  border: 1px solid #E0E0E0;
  overflow: hidden;
  background: #FFFFFF;
}

details.page-blog__faq-item summary.page-blog__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  cursor: pointer;
  user-select: none;
  list-style: none;
  transition: background-color 0.3s ease;
}

details.page-blog__faq-item summary.page-blog__faq-question::-webkit-details-marker {
  display: none;
}

details.page-blog__faq-item summary.page-blog__faq-question:hover {
  background: #F5F5F5;
}

.page-blog__faq-qtext {
  flex: 1;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.5;
  text-align: left;
  color: #333333;
}

.page-blog__faq-toggle {
  font-size: 24px;
  font-weight: bold;
  color: #666666;
  flex-shrink: 0;
  margin-left: 15px;
  width: 28px;
  text-align: center;
}

details.page-blog__faq-item .page-blog__faq-answer {
  padding: 0 20px 20px;
  background: #F9F9F9;
  border-radius: 0 0 5px 5px;
  color: #555555;
}

/* General Image styles for content areas */
.page-blog img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Responsive Styles */
@media (max-width: 1024px) {
  .page-blog__hero-content {
    padding: 30px 15px;
  }

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

  .page-blog__subtitle {
    font-size: clamp(0.9rem, 1.8vw, 1.1rem);
  }

  .page-blog__section-title {
    font-size: clamp(1.8rem, 3.5vw, 2.5rem);
  }

  .page-blog__posts-grid {
    gap: 20px;
  }

  .page-blog__topic-card {
    padding: 25px;
  }
}

@media (max-width: 768px) {
  /* HERO 主图区域 */
  .page-blog__hero-section {
    padding-top: 10px;
  }
  .page-blog__hero-image img {
    object-fit: contain !important; /* Prevent cropping on mobile */
    aspect-ratio: unset !important;
    max-height: 300px !important;
  }
  .page-blog__hero-content {
    padding: 25px 15px;
  }
  .page-blog__main-title {
    font-size: clamp(1.8rem, 7vw, 2.5rem);
    max-width: 100%;
    word-wrap: break-word;
  }
  .page-blog__subtitle {
    font-size: clamp(0.9rem, 3.5vw, 1.1rem);
    max-width: 100%;
  }
  
  /* 产品展示图区域 (Blog Post Grid) */
  .page-blog__posts-section {
    overflow-x: hidden;
    padding: 40px 0;
  }
  .page-blog__posts-grid {
    grid-template-columns: 1fr;
    gap: 25px;
  }
  .page-blog__post-image {
    height: auto;
    max-height: 200px;
    object-fit: cover;
  }
  .page-blog__post-title {
    font-size: 1.1rem;
  }

  /* 装饰主标题 + 长文 SEO 区 */
  .page-blog__section-title {
    font-size: clamp(1.6rem, 6vw, 2.2rem);
    padding: 0 10px;
    max-width: 100%;
  }
  .page-blog__section-description {
    font-size: 0.95rem;
    padding: 0 15px;
    max-width: 100%;
  }
  .page-blog__content-area {
    font-size: 1rem;
    padding: 0 15px;
    text-align: left; /* Adjust text alignment for readability on mobile */
    max-width: 100%;
    box-sizing: border-box;
  }
  .page-blog__text-block p {
    color: #f8f8f8;
  }

  /* 通用图片与容器 */
  .page-blog img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  .page-blog__container,
  .page-blog__post-card,
  .page-blog__topic-card,
  .page-blog__cta-content {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }

  /* 按钮与按钮容器 */
  .page-blog__btn-primary,
  .page-blog__btn-secondary,
  .page-blog__btn-text {
    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;
    text-align: center;
  }
  .page-blog__view-all-posts,
  .page-blog__cta-content {
    padding-left: 15px;
    padding-right: 15px;
  }
  .page-blog__cta-content .page-blog__btn-primary {
    margin-left: auto;
    margin-right: auto;
  }

  /* Popular Topics Section */
  .page-blog__popular-topics-section {
    padding: 40px 0;
  }
  .page-blog__topics-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .page-blog__topic-card {
    padding: 20px;
  }

  /* FAQ Section */
  details.page-blog__faq-item summary.page-blog__faq-question {
    padding: 15px;
  }
  .page-blog__faq-qtext {
    font-size: 15px;
  }
  details.page-blog__faq-item .page-blog__faq-answer {
    padding: 0 15px 15px;
  }
}