/* style/blog.css */

/* Base Styles */
.page-blog {
  font-family: 'Arial', sans-serif;
  color: #1F2D3D; /* Text Main */
  background-color: #F4F7FB; /* Background */
  line-height: 1.6;
}

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

.page-blog__section-title {
  font-size: 3em;
  color: #1F2D3D; /* Text Main */
  text-align: center;
  margin-bottom: 20px;
  font-weight: bold;
  line-height: 1.2;
}

.page-blog__section-description {
  font-size: 1.2em;
  color: #1F2D3D;
  text-align: center;
  margin-bottom: 40px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.page-blog__btn-primary {
  display: inline-block;
  padding: 15px 30px;
  border-radius: 8px;
  background: linear-gradient(180deg, #4A8BFF 0%, #2F6BFF 100%); /* Button */
  color: #ffffff;
  text-decoration: none;
  font-weight: bold;
  font-size: 1.1em;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  text-align: center;
  box-shadow: 0 4px 10px rgba(47, 107, 255, 0.3);
}

.page-blog__btn-primary:hover {
  background: linear-gradient(180deg, #2F6BFF 0%, #4A8BFF 100%);
  box-shadow: 0 6px 15px rgba(47, 107, 255, 0.4);
}

.page-blog__btn-secondary {
  display: inline-block;
  padding: 15px 30px;
  border-radius: 8px;
  background: #ffffff;
  color: #2F6BFF; /* Main Color */
  text-decoration: none;
  font-weight: bold;
  font-size: 1.1em;
  transition: all 0.3s ease;
  border: 2px solid #2F6BFF;
  cursor: pointer;
  text-align: center;
}

.page-blog__btn-secondary:hover {
  background: #2F6BFF;
  color: #ffffff;
}

/* Hero Section */
.page-blog__hero-section {
  position: relative;
  width: 100%;
  overflow: hidden;
  text-align: center;
  padding-top: 10px; /* Small top padding, relying on body for header offset */
  padding-bottom: 60px;
  box-sizing: border-box;
}

.page-blog__hero-image {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  max-height: 600px;
  border-radius: 10px;
  margin-bottom: 40px;
}

.page-blog__hero-content {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 20px;
}

.page-blog__main-title {
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  color: #1F2D3D; /* Text Main */
  margin-bottom: 20px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -1px;
}

.page-blog__hero-description {
  font-size: 1.3em;
  color: #1F2D3D;
  margin-bottom: 40px;
  line-height: 1.5;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

/* Recent Posts Section */
.page-blog__recent-posts-section {
  background-color: #F4F7FB; /* Background */
  padding: 60px 0;
}

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

.page-blog__post-card {
  background-color: #FFFFFF; /* Card BG */
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}

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

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

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

.page-blog__post-content {
  padding: 25px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.page-blog__post-title {
  font-size: 1.6em;
  color: #1F2D3D; /* Text Main */
  margin-bottom: 10px;
  font-weight: 700;
  line-height: 1.3;
}

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

.page-blog__post-excerpt {
  font-size: 1em;
  color: #1F2D3D;
  margin-bottom: 20px;
  line-height: 1.5;
  flex-grow: 1;
}

.page-blog__read-more-btn {
  display: inline-block;
  color: #2F6BFF; /* Main Color */
  font-weight: bold;
  text-decoration: none;
  transition: color 0.3s ease;
}

.page-blog__read-more-btn:hover {
  color: #1a4b9e;
}

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

/* Categories Section */
.page-blog__categories-section {
  background-color: #2F6BFF; /* Main Color */
  color: #ffffff;
  padding: 60px 0;
}

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

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

.page-blog__category-card {
  background-color: rgba(255, 255, 255, 0.15);
  padding: 30px;
  border-radius: 10px;
  text-align: center;
  text-decoration: none;
  color: #ffffff;
  transition: background-color 0.3s ease, transform 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.page-blog__category-card:hover {
  background-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-5px);
}

.page-blog__category-icon {
  font-size: 3em;
  margin-bottom: 15px;
}

.page-blog__category-title {
  font-size: 1.5em;
  font-weight: 700;
  margin-bottom: 10px;
}

.page-blog__category-desc {
  font-size: 0.95em;
  opacity: 0.9;
}

/* CTA Section */
.page-blog__cta-section {
  background-color: #F4F7FB; /* Background */
  padding: 80px 0;
}

.page-blog__cta-section .page-blog__container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
}

.page-blog__cta-content {
  flex: 1;
  text-align: left;
}

.page-blog__cta-content .page-blog__section-title {
  text-align: left;
  font-size: 2.5em;
}

.page-blog__cta-content .page-blog__section-description {
  text-align: left;
  margin-left: 0;
  margin-right: 0;
  margin-bottom: 30px;
  font-size: 1.1em;
}

.page-blog__cta-image {
  flex-shrink: 0;
  width: 600px;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

/* FAQ Section */
.page-blog__faq-section {
  background-color: #FFFFFF; /* Card BG */
  padding: 60px 0;
}

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

.page-blog__faq-item {
  background-color: #F4F7FB;
  border: 1px solid #D6E2FF; /* Border */
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
  transition: all 0.3s ease;
}

.page-blog__faq-item[open] {
  background-color: #ffffff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.page-blog__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  font-size: 1.2em;
  font-weight: 600;
  color: #1F2D3D; /* Text Main */
  cursor: pointer;
  list-style: none; /* For details/summary */
}

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

.page-blog__faq-toggle {
  font-size: 1.5em;
  font-weight: bold;
  color: #2F6BFF;
  transition: transform 0.3s ease;
}

.page-blog__faq-item[open] .page-blog__faq-toggle {
  transform: rotate(45deg);
}

.page-blog__faq-answer {
  padding: 0 25px 20px;
  font-size: 1em;
  color: #1F2D3D;
  line-height: 1.5;
}

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

/* Responsive Styles */

@media (max-width: 1024px) {
  .page-blog__hero-image {
    max-height: 500px;
  }

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

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

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

  .page-blog__cta-section .page-blog__container {
    flex-direction: column;
    text-align: center;
  }

  .page-blog__cta-content {
    text-align: center;
  }

  .page-blog__cta-content .page-blog__section-title {
    text-align: center;
  }

  .page-blog__cta-content .page-blog__section-description {
    text-align: center;
  }

  .page-blog__cta-image {
    width: 80%;
    max-width: 500px;
  }
}

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

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

  .page-blog__section-title {
    font-size: 2.2em;
    margin-bottom: 15px;
  }

  .page-blog__section-description {
    font-size: 1em;
    margin-bottom: 30px;
  }

  /* HERO 主图区域 */
  .page-blog__hero-section {
    padding-top: 10px !important; /* Small top padding */
    padding-bottom: 40px;
  }

  .page-blog__hero-image {
    max-height: 300px;
    margin-bottom: 30px;
  }

  .page-blog__main-title {
    font-size: clamp(1.8rem, 8vw, 2.5rem);
    margin-bottom: 15px;
  }

  .page-blog__hero-description {
    font-size: 1em;
    margin-bottom: 30px;
  }

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

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

  .page-blog__section,
  .page-blog__card,
  .page-blog__container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }

  /* 博客文章列表 */
  .page-blog__posts-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .page-blog__post-card {
    margin-bottom: 0;
  }

  .page-blog__post-thumbnail {
    height: 180px;
  }

  .page-blog__post-title {
    font-size: 1.4em;
  }

  /* 博客分类 */
  .page-blog__categories-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  /* CTA Section */
  .page-blog__cta-section .page-blog__container {
    flex-direction: column;
    text-align: center;
  }

  .page-blog__cta-content .page-blog__section-title {
    font-size: 1.8em;
    text-align: center;
  }

  .page-blog__cta-content .page-blog__section-description {
    font-size: 0.9em;
    text-align: center;
  }

  .page-blog__cta-image {
    width: 100%;
    max-width: 400px;
  }

  /* FAQ Section */
  .page-blog__faq-question {
    font-size: 1.1em;
    padding: 15px 20px;
  }

  .page-blog__faq-answer {
    padding: 0 20px 15px;
  }

  /* 按钮容器移动端适配 */
  .page-blog__view-all-button-container,
  .page-blog__cta-button {
    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 {
    display: flex;
    flex-direction: column; /* 移动端垂直排列 */
  }
}