:root {
  --primary-color: #2F6BFF;
  --secondary-color: #6FA3FF;
  --text-main-color: #1F2D3D;
  --background-color: #F4F7FB; /* Assuming a light body background from shared.css */
  --card-bg-color: #FFFFFF;
  --border-color: #D6E2FF;
  --glow-color: #A5C4FF;
  --button-gradient: linear-gradient(180deg, #4A8BFF 0%, #2F6BFF 100%);
}

.page-blog {
  font-family: 'Arial', sans-serif;
  color: var(--text-main-color); /* Default text color for light backgrounds */
  line-height: 1.6;
  font-size: 16px;
}

/* 🚨 HERO主图区域样式 */
.page-blog__hero-section {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 20px;
  /* body已留白；此处仅用小额顶距，禁止 var(--header-offset) 以免双倍空白 */
  padding-top: 10px;
  background-color: var(--background-color);
}

.page-blog__hero-container {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%; /* Ensure full width on desktop before max-width */
}

.page-blog__hero-image {
  width: 100%;
  margin-bottom: 30px;
}

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

.page-blog__hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  width: 100%;
}

.page-blog__main-title {
  font-size: clamp(2.2em, 4vw, 3em);
  color: var(--primary-color);
  margin-bottom: 15px;
  font-weight: 700;
  line-height: 1.2;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.page-blog__hero-description {
  font-size: 1.1em;
  color: var(--text-main-color);
  max-width: 800px;
  margin: 0 auto 30px auto;
}

.page-blog__cta-button {
  display: inline-block;
  padding: 15px 40px;
  background: var(--button-gradient);
  color: #ffffff;
  text-decoration: none;
  border-radius: 5px;
  font-size: 18px;
  font-weight: bold;
  margin-top: 30px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  max-width: 100%;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

.page-blog__cta-button:hover {
  opacity: 0.9;
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
}

/* Common Section Styles */
.page-blog__container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.page-blog__section-title {
  font-size: clamp(1.8em, 3.5vw, 2.5em);
  color: var(--primary-color);
  text-align: center;
  margin-bottom: 20px;
  font-weight: 700;
}

.page-blog__section-description {
  font-size: 1.1em;
  color: var(--text-main-color);
  text-align: center;
  max-width: 900px;
  margin: 0 auto 40px auto;
}

.page-blog__light-bg {
  background-color: var(--card-bg-color);
  padding: 60px 0;
  color: var(--text-main-color);
}

.page-blog__dark-bg {
  background-color: var(--primary-color);
  padding: 60px 0;
  color: #ffffff; /* White text for dark background */
}

/* Intro Section */
.page-blog__intro-section {
  padding-top: 40px;
  padding-bottom: 40px;
}

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

.page-blog__feature-item {
  background: var(--card-bg-color);
  padding: 30px;
  border-radius: 10px;
  text-align: center;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease;
  border: 1px solid var(--border-color);
}

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

.page-blog__feature-item img {
  width: 100%;
  max-width: 200px;
  height: auto;
  margin-bottom: 20px;
  border-radius: 8px;
}

.page-blog__feature-title {
  font-size: 1.4em;
  color: var(--primary-color);
  margin-bottom: 10px;
  font-weight: 600;
}

.page-blog__feature-item p {
  font-size: 1em;
  color: var(--text-main-color);
}

/* Categories Section */
.page-blog__categories-section {
  padding-top: 60px;
  padding-bottom: 60px;
}

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

.page-blog__categories-section .page-blog__section-description {
  color: #f0f0f0;
}

.page-blog__category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.page-blog__category-card {
  display: block;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  overflow: hidden;
  text-decoration: none;
  color: #ffffff;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.page-blog__category-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.page-blog__category-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}

.page-blog__category-card h3 {
  font-size: 1.3em;
  margin: 15px 15px 5px 15px;
  font-weight: 600;
  color: #ffffff;
}

.page-blog__category-card p {
  font-size: 0.95em;
  margin: 0 15px 15px 15px;
  color: #f0f0f0;
}

/* Featured Posts Section */
.page-blog__featured-posts {
  padding-top: 60px;
  padding-bottom: 60px;
}

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

.page-blog__post-card {
  background: var(--card-bg-color);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid var(--border-color);
}

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

.page-blog__post-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
}

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

.page-blog__post-title {
  font-size: 1.3em;
  margin-bottom: 10px;
  font-weight: 600;
}

.page-blog__post-title a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

.page-blog__post-title a:hover {
  color: var(--secondary-color);
}

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

.page-blog__post-excerpt {
  font-size: 1em;
  color: var(--text-main-color);
  margin-bottom: 20px;
}

.page-blog__read-more {
  display: inline-block;
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease;
}

.page-blog__read-more:hover {
  color: var(--secondary-color);
}

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

/* All Posts Section - shares styles with featured posts */
.page-blog__all-posts-section {
  padding-top: 60px;
  padding-bottom: 60px;
}

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

.page-blog__all-posts-section .page-blog__section-description {
  color: #f0f0f0;
}

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

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

details.page-blog__faq-item {
  margin-bottom: 15px;
  border-radius: 5px;
  border: 1px solid var(--border-color);
  overflow: hidden;
  background: var(--card-bg-color);
  box-shadow: 0 2px 5px rgba(0,0,0,0.03);
}
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;
  color: var(--text-main-color);
}
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: var(--primary-color);
}
.page-blog__faq-toggle {
  font-size: 24px;
  font-weight: bold;
  color: var(--primary-color);
  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: var(--background-color);
  border-radius: 0 0 5px 5px;
  color: var(--text-main-color);
}
details.page-blog__faq-item .page-blog__faq-answer p {
  margin: 0;
  padding-top: 10px;
}


/* Conclusion Section */
.page-blog__conclusion-section {
  padding-top: 60px;
  padding-bottom: 60px;
  text-align: center;
}

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

.page-blog__conclusion-section .page-blog__section-description {
  color: #f0f0f0;
}

.page-blog__cta-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 40px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

.page-blog__btn-primary,
.page-blog__btn-secondary {
  display: inline-block;
  padding: 15px 30px;
  text-decoration: none;
  border-radius: 5px;
  font-size: 17px;
  font-weight: bold;
  transition: all 0.3s ease;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  max-width: 100%;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

.page-blog__btn-primary {
  background: var(--button-gradient);
  color: #ffffff;
  border: 2px solid transparent;
}

.page-blog__btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
}

.page-blog__btn-secondary {
  background: #ffffff;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
}

.page-blog__btn-secondary:hover {
  background: var(--primary-color);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
}

/* 🚨 移动端响应式设计（必须严格遵守） */
@media (max-width: 768px) {
  .page-blog__hero-section {
    padding-top: 10px !important;
    padding-bottom: 40px;
    padding-left: 15px;
    padding-right: 15px;
  }
  
  .page-blog__hero-image img {
    border-radius: 4px;
  }
  
  .page-blog__main-title {
    font-size: 1.8em;
  }

  .page-blog__hero-description {
    font-size: 1em;
  }

  .page-blog__cta-button {
    padding: 12px 30px;
    font-size: 16px;
    width: 100% !important;
  }

  .page-blog__container {
    padding: 0 15px;
  }

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

  .page-blog__section-description {
    font-size: 0.95em;
  }

  .page-blog__light-bg,
  .page-blog__dark-bg {
    padding: 40px 0;
  }

  .page-blog__feature-item,
  .page-blog__category-card,
  .page-blog__post-card {
    margin-bottom: 20px;
  }
  
  .page-blog__feature-item img {
    
  }

  .page-blog__category-card img {
    
  }

  .page-blog__post-card img {
    
  }

  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; }

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

  .page-blog__btn-primary,
  .page-blog__btn-secondary {
    width: 100% !important;
    max-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 img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  
  .page-blog__section,
  .page-blog__card,
  .page-blog__container,
  .page-blog__hero-container,
  .page-blog__features-grid,
  .page-blog__category-grid,
  .page-blog__post-grid,
  .page-blog__faq-list,
  .page-blog__cta-buttons {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }
}