/* 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: #ffffff; /* Explicitly white for clarity */
}

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

.page-blog__section-title {
  font-size: 36px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 20px;
  color: #26A9E0; /* Brand color for titles */
}

.page-blog__section-intro {
  font-size: 18px;
  text-align: center;
  margin-bottom: 40px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.page-blog__btn-primary,
.page-blog__btn-secondary,
.page-blog a[class*="button"],
.page-blog a[class*="btn"] {
  display: inline-block;
  padding: 12px 25px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  cursor: pointer;
  text-align: center;
  max-width: 100%;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

.page-blog__btn-primary {
  background-color: #26A9E0;
  color: #ffffff;
  border: 2px solid #26A9E0;
}

.page-blog__btn-primary:hover {
  background-color: #1e87c0;
  border-color: #1e87c0;
}

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

.page-blog__btn-secondary:hover {
  background-color: #f0f8ff;
  color: #1e87c0;
  border-color: #1e87c0;
}

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

/* Hero Section */
.page-blog__hero-section {
  padding-top: 10px; /* Small top padding, relying on body for header offset */
  margin-bottom: 60px;
  display: flex;
  flex-direction: column; /* Ensure image is above text */
  align-items: center;
  background-color: #f5f5f5;
}

.page-blog__hero-image {
  width: 100%;
  overflow: hidden;
}

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

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

.page-blog__main-title {
  font-size: clamp(32px, 4vw, 48px); /* H1 font size clamp */
  font-weight: 800;
  color: #26A9E0;
  margin-bottom: 20px;
  line-height: 1.2;
}

.page-blog__description {
  font-size: 18px;
  margin-bottom: 30px;
  color: #555;
}

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

/* Latest Blog Posts Section */
.page-blog__latest-posts-section {
  padding: 60px 0;
  background-color: #ffffff;
}

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

.page-blog__post-card {
  background: #f9f9f9;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

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

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

.page-blog__post-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

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

.page-blog__post-title {
  font-size: 20px;
  font-weight: 700;
  color: #26A9E0;
  margin-bottom: 10px;
  line-height: 1.3;
}

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

.page-blog__post-excerpt {
  font-size: 15px;
  color: #555;
  margin-bottom: 15px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.page-blog__read-more {
  display: inline-flex;
  align-items: center;
  color: #26A9E0;
  font-weight: 600;
}

.page-blog__read-more span {
  margin-left: 5px;
}

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

/* Categories Section */
.page-blog__categories-section {
  padding: 60px 0;
  background-color: #26A9E0; /* Dark background */
  color: #ffffff; /* Light text */
}

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

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

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

.page-blog__category-card {
  background: rgba(255, 255, 255, 0.15); /* Slightly transparent white */
  border-radius: 10px;
  overflow: hidden;
  text-align: center;
  text-decoration: none;
  color: #ffffff;
  padding-bottom: 20px;
  transition: background-color 0.3s ease;
}

.page-blog__category-card:hover {
  background: rgba(255, 255, 255, 0.25);
}

.page-blog__category-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  margin-bottom: 15px;
}

.page-blog__category-title {
  font-size: 22px;
  font-weight: 700;
  color: #ffffff;
  padding: 0 15px;
}

/* CTA Section (Why Choose tot88) */
.page-blog__cta-section {
  padding: 60px 0;
  background-color: #f9f9f9;
}

.page-blog__benefits-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 30px;
  list-style: none;
  padding: 0;
  margin-bottom: 40px;
}

.page-blog__benefit-item {
  background: #ffffff;
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  border-left: 5px solid #26A9E0;
}

.page-blog__benefit-title {
  font-size: 22px;
  color: #26A9E0;
  margin-bottom: 10px;
}

.page-blog__benefit-item p {
  font-size: 16px;
  color: #555;
}

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

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: 16px;
  font-weight: 600;
  line-height: 1.5;
  text-align: left;
  color: #333333; /* Ensure contrast */
}
.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: #555; /* Ensure contrast */
}

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

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

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

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

  .page-blog__benefits-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  /* HERO 主图区域 */
  .page-blog__hero-section {
    padding-top: 10px; /* Small top padding, relying on body for header offset */
    margin-bottom: 40px;
  }
  .page-blog__hero-image img {
    object-fit: contain !important; /* Mobile: prevent cropping */
    aspect-ratio: unset !important;
    width: 100% !important;
    height: auto !important;
  }
  .page-blog__hero-content {
    padding: 20px 15px;
  }
  .page-blog__main-title {
    font-size: clamp(24px, 7vw, 36px);
  }
  .page-blog__description {
    font-size: 16px;
  }
  .page-blog__cta-buttons {
    flex-direction: column; /* Buttons stack vertically */
    gap: 15px;
    padding: 0 15px;
  }
  .page-blog__cta-buttons .page-blog__btn-primary,
  .page-blog__cta-buttons .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__container,
  .page-blog__section,
  .page-blog__card,
  .page-blog__text-block,
  .page-blog__post-card,
  .page-blog__category-card,
  .page-blog__benefit-item {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }

  /* 产品展示图区域 (Latest Blog Posts acts as this for non-homepage) */
  .page-blog__latest-posts-section {
    padding: 40px 0;
  }
  .page-blog__posts-grid {
    grid-template-columns: 1fr; /* Single column */
    gap: 20px;
  }
  .page-blog__post-image-wrap {
    height: 180px; /* Adjust height for mobile */
  }
  .page-blog__post-title {
    font-size: 18px;
  }
  .page-blog__post-excerpt {
    font-size: 14px;
  }

  /* 装饰主标题 + 长文 SEO 区 (General sections, titles, intros) */
  .page-blog__section-title {
    font-size: 28px;
    margin-bottom: 15px;
    line-height: 1.2;
  }
  .page-blog__section-intro {
    font-size: 16px;
    margin-bottom: 30px;
  }

  /* Categories Section */
  .page-blog__categories-section {
    padding: 40px 0;
  }
  .page-blog__categories-grid {
    grid-template-columns: 1fr; /* Single column */
    gap: 20px;
  }
  .page-blog__category-card img {
    
  }
  .page-blog__category-title {
    font-size: 18px;
  }

  /* CTA Section */
  .page-blog__cta-section {
    padding: 40px 0;
  }
  .page-blog__benefits-list {
    gap: 20px;
  }
  .page-blog__benefit-item {
    padding: 25px 20px;
  }
  .page-blog__benefit-title {
    font-size: 20px;
  }
  .page-blog__benefit-item p {
    font-size: 15px;
  }

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