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

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

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

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

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

.page-blog__description {
  font-size: 18px;
  color: #1F2D3D;
  text-align: center;
  max-width: 800px;
  margin: 0 auto 30px;
}

/* CTA Button styles */
.page-blog__cta-button {
  display: inline-block;
  padding: 15px 30px;
  border-radius: 8px;
  font-size: 18px;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  transition: all 0.3s ease;
  cursor: pointer;
  max-width: 100%; /* Ensure responsiveness */
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

.page-blog__btn-primary {
  background: linear-gradient(180deg, #4A8BFF 0%, #2F6BFF 100%); /* Button gradient */
  color: #ffffff;
  border: none;
}

.page-blog__btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(47, 107, 255, 0.3);
}

.page-blog__btn-secondary {
  background: #ffffff;
  color: #2F6BFF;
  border: 2px solid #2F6BFF;
}

.page-blog__btn-secondary:hover {
  background: #f0f0f0;
  color: #2F6BFF;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(47, 107, 255, 0.1);
}

/* Hero Section */
.page-blog__hero-section {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 10px; /* Small top padding */
  padding-bottom: 60px;
  background: #F4F7FB;
}

.page-blog__hero-image {
  width: 100%;
  max-height: 500px;
  overflow: hidden;
  margin-bottom: 30px;
}

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

.page-blog__hero-content {
  text-align: center;
  max-width: 900px;
  padding: 0 20px;
}

.page-blog__main-title {
  font-size: 48px;
  font-weight: 800;
  color: #1F2D3D;
  margin-bottom: 20px;
  line-height: 1.1;
}

.page-blog__hero-content .page-blog__cta-button {
  margin-top: 30px;
}

/* Latest Posts Section */
.page-blog__latest-posts {
  background: #F4F7FB;
}

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

.page-blog__post-card {
  background: #ffffff; /* Card BG */
  border: 1px solid #D6E2FF; /* Border */
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

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

.page-blog__post-thumbnail {
  width: 100%;
  height: 225px; /* Fixed height for consistency */
  overflow: hidden;
}

.page-blog__post-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.page-blog__post-card:hover .page-blog__post-thumbnail img {
  transform: scale(1.05);
}

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

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

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

.page-blog__post-excerpt {
  font-size: 16px;
  color: #444;
}

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

/* Categories Section */
.page-blog__categories {
  background: #2F6BFF; /* Main color */
  color: #ffffff;
}

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

.page-blog__category-card {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 25px;
  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;
  justify-content: center;
}

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

.page-blog__category-card img {
  
  
  object-fit: contain;
  margin-bottom: 15px;
  border-radius: 8px;
}

.page-blog__category-title {
  font-size: 20px;
  font-weight: 600;
  margin: 0;
}

/* CTA Section */
.page-blog__cta-section {
  background: #F4F7FB;
  text-align: center;
}

.page-blog__cta-section .page-blog__description {
  margin-bottom: 40px;
}

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

/* FAQ Section */
.page-blog__faq-section {
  background: #F4F7FB;
}

details.page-blog__faq-item {
  margin-bottom: 15px;
  border-radius: 5px;
  border: 1px solid #D6E2FF; /* Border */
  overflow: hidden;
  background: #fff; /* Card BG */
}
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; /* Adjusted from 16px for better readability on desktop */
  font-weight: 600;
  line-height: 1.5;
  text-align: left;
  color: #1F2D3D; /* Text Main */
}
.page-blog__faq-toggle {
  font-size: 24px;
  font-weight: bold;
  color: #666;
  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: #444;
}
.page-blog__faq-answer p {
  margin-bottom: 0;
}


/* --- Responsive Styles --- */

/* For smaller desktops and tablets (up to 1024px) */
@media (max-width: 1024px) {
  .page-blog__main-title {
    font-size: 42px;
  }
  .page-blog__section-title {
    font-size: 32px;
  }
  .page-blog__post-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }
  .page-blog__category-grid {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  }
}

/* Mobile specific styles (up to 768px) */
@media (max-width: 768px) {
  /* General */
  .page-blog__container {
    padding: 0 15px !important;
  }
  .page-blog__section {
    padding: 40px 0 !important;
  }

  /* HERO 主图区域 */
  .page-blog__hero-section {
    padding-top: 10px !important; /* Small top padding */
    padding-bottom: 40px !important;
  }
  .page-blog__hero-image img {
    object-fit: contain !important; /* Prevent cropping */
    aspect-ratio: unset !important; /* Allow natural aspect ratio */
    width: 100% !important;
    height: auto !important;
    border-radius: 8px !important;
  }
  .page-blog__main-title {
    font-size: clamp(28px, 8vw, 36px) !important; /* Use clamp for H1 */
    margin-bottom: 15px !important;
  }
  .page-blog__description {
    font-size: 16px !important;
    margin-bottom: 20px !important;
    padding: 0 5px !important;
  }
  .page-blog__hero-content .page-blog__cta-button {
    margin-top: 20px !important;
  }

  /* Latest Posts */
  .page-blog__section-title {
    font-size: clamp(24px, 7vw, 30px) !important;
    margin-bottom: 30px !important;
  }
  .page-blog__post-grid {
    grid-template-columns: 1fr !important; /* Single column */
    gap: 20px !important;
  }
  .page-blog__post-thumbnail {
    height: 180px !important; /* Smaller height for mobile cards */
  }
  .page-blog__post-title {
    font-size: 18px !important;
  }
  .page-blog__post-meta {
    font-size: 13px !important;
  }
  .page-blog__post-excerpt {
    font-size: 15px !important;
  }

  /* Categories */
  .page-blog__category-grid {
    grid-template-columns: repeat(2, 1fr) !important; /* Two columns */
    gap: 15px !important;
  }
  .page-blog__category-card {
    padding: 15px !important;
  }
  .page-blog__category-card img {
    
    
  }
  .page-blog__category-title {
    font-size: 16px !important;
  }

  /* CTA Section */
  .page-blog__cta-buttons {
    flex-direction: column !important; /* Stack buttons vertically */
    gap: 15px !important;
    padding: 0 15px !important; /* Add padding to container */
  }
  .page-blog__cta-button {
    max-width: 100% !important;
    width: 100% !important;
    padding: 12px 20px !important;
    font-size: 16px !important;
    white-space: normal !important; /* Allow text wrap */
    word-wrap: break-word !important;
  }
  /* General image and container rules for mobile */
  .page-blog img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
    box-sizing: border-box !important;
  }
  .page-blog__section,
  .page-blog__card,
  .page-blog__container,
  .page-blog__post-card,
  .page-blog__category-card,
  .page-blog__faq-item {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

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

/* Mobile landscape (up to 849px) for hero image */
@media (max-width: 849px) {
  .page-blog__hero-image img {
    object-fit: contain !important;
    aspect-ratio: unset !important;
  }
}