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

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

.page-blog__section-spacing {
  padding: 60px 0;
}

.page-blog__section-title {
  font-size: clamp(28px, 4vw, 38px);
  font-weight: 700;
  color: #E53935;
  text-align: center;
  margin-bottom: 20px;
  line-height: 1.2;
}

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

.page-blog__section-intro {
  font-size: 18px;
  line-height: 1.6;
  color: #555555;
  text-align: center;
  max-width: 800px;
  margin: 0 auto 40px;
}

.page-blog__section-intro--light {
  color: #f0f0f0;
}

/* Hero Section */
.page-blog__hero-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 10px; /* Small top padding, body handles header offset */
  position: relative;
  overflow: hidden;
  background-color: #f0f0f0;
}

.page-blog__hero-image-wrapper {
  width: 100%;
  max-height: 600px; /* Limit height on desktop */
  overflow: hidden;
}

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

.page-blog__hero-content {
  position: relative;
  z-index: 1;
  padding: 40px 20px;
  text-align: center;
  max-width: 900px;
  margin-top: -100px; /* Overlap slightly with image for visual appeal */
  background: #ffffff;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.page-blog__main-title {
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 800;
  color: #E53935;
  margin-bottom: 15px;
  line-height: 1.2;
}

.page-blog__hero-description {
  font-size: 20px;
  line-height: 1.7;
  color: #333333;
  margin-bottom: 30px;
}

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

.page-blog__cta-buttons--centered {
  margin-top: 40px;
}

/* Buttons */
.page-blog__btn-primary,
.page-blog__btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 15px 30px;
  border-radius: 8px;
  font-size: 18px;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.3s ease;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
  max-width: 100%;
  min-width: 200px;
  text-align: center;
}

.page-blog__btn-primary {
  background: linear-gradient(180deg, #FF5A4F 0%, #E53935 100%);
  color: #ffffff;
  border: none;
  box-shadow: 0 4px 15px rgba(229, 57, 53, 0.4);
}

.page-blog__btn-primary:hover {
  background: linear-gradient(180deg, #E53935 0%, #FF5A4F 100%);
  box-shadow: 0 6px 20px rgba(229, 57, 53, 0.6);
  transform: translateY(-2px);
}

.page-blog__btn-secondary {
  background: #ffffff;
  color: #E53935;
  border: 2px solid #E53935;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.page-blog__btn-secondary:hover {
  background: #E53935;
  color: #ffffff;
  box-shadow: 0 6px 20px rgba(229, 57, 53, 0.2);
  transform: translateY(-2px);
}

/* Latest Articles Section */
.page-blog__articles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.page-blog__article-card {
  background: #ffffff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 5px 20px rgba(0,0,0,0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

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

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

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

.page-blog__card-title {
  font-size: 22px;
  font-weight: 700;
  color: #333333;
  margin-bottom: 10px;
  line-height: 1.4;
}

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

.page-blog__card-meta {
  font-size: 14px;
  color: #888888;
  margin-bottom: 15px;
}

.page-blog__card-excerpt {
  font-size: 16px;
  color: #555555;
  line-height: 1.6;
}

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

/* Categories Section */
.page-blog__category-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 25px;
  justify-content: center;
}

.page-blog__category-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  text-decoration: none;
  color: #333333;
  background: #ffffff;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 3px 15px rgba(0,0,0,0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  min-height: 200px;
}

.page-blog__category-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.1);
  color: #E53935;
}

.page-blog__category-image {
  width: 100%;
  max-width: 150px;
  height: auto;
  object-fit: contain;
  margin-bottom: 15px;
}

.page-blog__category-name {
  font-size: 18px;
  font-weight: 600;
  line-height: 1.3;
}

/* Why Choose Section */
.page-blog__features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

.page-blog__feature-item {
  background: #ffffff;
  border-radius: 10px;
  padding: 30px;
  box-shadow: 0 5px 20px rgba(0,0,0,0.08);
  text-align: center;
}

.page-blog__feature-image {
  width: 100%;
  max-width: 200px;
  height: auto;
  object-fit: contain;
  margin-bottom: 20px;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.page-blog__feature-title {
  font-size: 24px;
  font-weight: 700;
  color: #E53935;
  margin-bottom: 15px;
}

.page-blog__feature-description {
  font-size: 16px;
  color: #555555;
  line-height: 1.7;
}

/* FAQ Section */
details.page-blog__faq-item {
  margin-bottom: 15px;
  border-radius: 5px;
  border: 1px solid #e0e0e0;
  overflow: hidden;
  background: #fff;
}
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: 18px;
  font-weight: 600;
  line-height: 1.5;
  text-align: left;
  color: #333333;
}
.page-blog__faq-toggle {
  font-size: 24px;
  font-weight: bold;
  color: #E53935;
  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;
  font-size: 16px;
  line-height: 1.7;
}

/* Contact CTA Section */
.page-blog__contact-cta {
  background: #E53935; /* Using brand primary color */
  color: #ffffff;
  text-align: center;
}

.page-blog__contact-cta-content {
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Responsive Styles */

/* Tablet and Mobile */
@media (max-width: 1024px) {
  .page-blog__hero-content {
    margin-top: -60px;
    padding: 30px 15px;
  }

  .page-blog__main-title {
    font-size: clamp(28px, 4.5vw, 42px);
  }

  .page-blog__hero-description {
    font-size: 18px;
  }

  .page-blog__cta-buttons {
    gap: 15px;
  }

  .page-blog__btn-primary, .page-blog__btn-secondary {
    min-width: unset;
    width: calc(50% - 7.5px);
    font-size: 16px;
    padding: 12px 20px;
  }

  .page-blog__articles-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

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

  .page-blog__category-list {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
  }

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

  .page-blog__faq-qtext {
    font-size: 17px;
  }

  .page-blog__section-spacing {
    padding: 40px 0;
  }
}

/* Mobile Styles (max-width: 768px) - MUST INCLUDE ALL REQUIRED BLOCKS */
@media (max-width: 768px) {
  /* 1. HERO 主图区域 */
  .page-blog__hero-section {
    padding-top: 10px; /* Small top padding, body handles header offset */
  }

  .page-blog__hero-image {
    object-fit: contain !important; /* Prevent cropping on mobile */
    aspect-ratio: unset !important; /* Allow natural aspect ratio */
    height: auto !important;
  }

  .page-blog__hero-image-wrapper {
    max-height: unset;
  }

  .page-blog__hero-content {
    margin-top: -40px;
    padding: 25px 15px;
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
    border-radius: 0;
  }

  .page-blog__main-title {
    font-size: clamp(26px, 8vw, 36px);
    margin-bottom: 10px;
  }

  .page-blog__hero-description {
    font-size: 16px;
    line-height: 1.5;
    margin-bottom: 20px;
  }

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

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

  /* 2. 产品展示图区域 (Latest Articles Grid acts as a content grid) */
  .page-blog__articles-grid {
    grid-template-columns: 1fr; /* Single column for mobile */
    gap: 20px;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 0 15px;
    overflow-x: hidden; /* Prevent horizontal scroll */
  }
  
  .page-blog__article-card {
    box-sizing: border-box;
  }

  .page-blog__card-image {
    height: 180px; /* Adjust height for mobile cards */
  }

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

  .page-blog__card-excerpt {
    font-size: 14px;
  }

  .page-blog__view-all-button-container {
    margin-top: 30px;
    padding: 0 15px;
    box-sizing: border-box;
  }

  /* 3. 装饰主标题 + 长文 SEO 区 (General Section Titles and Intros) */
  .page-blog__section-title {
    font-size: clamp(24px, 7vw, 32px);
    padding: 0 15px;
  }

  .page-blog__section-intro {
    font-size: 15px;
    margin-bottom: 20px;
    padding: 0 15px;
  }

  /* Categories Section */
  .page-blog__category-list {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 0 15px;
  }

  .page-blog__category-item {
    padding: 15px;
    min-height: 150px;
  }

  .page-blog__category-image {
    max-width: 100px;
    margin-bottom: 10px;
  }

  .page-blog__category-name {
    font-size: 16px;
  }

  /* Why Choose Section */
  .page-blog__features-grid {
    grid-template-columns: 1fr;
    gap: 20px;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 0 15px;
  }

  .page-blog__feature-item {
    padding: 25px;
  }

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

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

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

  /* Contact CTA Section */
  .page-blog__contact-cta-content {
    padding: 0 15px;
  }

  /* 4. 通用图片与容器 */
  .page-blog img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    box-sizing: border-box !important; /* Ensure padding doesn't cause overflow */
  }

  .page-blog__container,
  .page-blog__section,
  .page-blog__card {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px !important;
    padding-right: 15px !important;
  }
  /* Override padding for container specifically for sections that define their own */
  .page-blog__container {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  .page-blog__section-spacing {
    padding: 30px 0;
  }

  /* Ensure no horizontal scroll for content areas */
  .page-blog__latest-articles,
  .page-blog__categories-section,
  .page-blog__why-choose-section,
  .page-blog__faq-section,
  .page-blog__contact-cta {
    overflow-x: hidden;
  }
}