/* style/blog.css */
/* body 已 padding-top: var(--header-offset)；页面禁止再写该变量 */
.page-blog {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #333333; /* Default text color for light background */
  background-color: #FFFFFF; /* Assuming shared.css sets a light background */
}

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

.page-blog__hero-section {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 10px; /* Small top padding, body handles --header-offset */
  padding-bottom: 60px;
  background-color: #f5f5f5;
}

.page-blog__hero-image-wrapper {
    width: 100%;
    max-height: 500px;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

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

.page-blog__hero-content {
  text-align: center;
  padding-top: 40px;
}

.page-blog__main-title {
  font-size: clamp(2em, 4vw, 3.5em);
  font-weight: 700;
  color: #26A9E0;
  margin-bottom: 15px;
  line-height: 1.2;
}

.page-blog__intro-description {
  font-size: 1.1em;
  color: #555555;
  margin-bottom: 30px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

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

.page-blog__btn-primary,
.page-blog__btn-secondary {
  display: inline-block;
  padding: 12px 25px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  box-sizing: border-box;
  max-width: 100%;
  white-space: normal;
  word-wrap: break-word;
  text-align: center;
}

.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: #e0f2f7;
}

.page-blog__latest-posts-section,
.page-blog__featured-guides-section,
.page-blog__video-section,
.page-blog__faq-section,
.page-blog__cta-bottom-section {
  padding: 60px 0;
}

.page-blog__section-title {
  font-size: 2.5em;
  color: #26A9E0;
  text-align: center;
  margin-bottom: 20px;
  font-weight: 700;
}

.page-blog__section-description {
  font-size: 1.1em;
  color: #555555;
  text-align: center;
  margin-bottom: 40px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

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

.page-blog__post-card,
.page-blog__guide-card {
  background-color: #ffffff;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
}

.page-blog__post-card:hover,
.page-blog__guide-card:hover {
  transform: translateY(-5px);
}

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

.page-blog__post-image,
.page-blog__guide-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

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

.page-blog__post-title,
.page-blog__guide-title {
  font-size: 1.4em;
  font-weight: 600;
  margin-bottom: 10px;
  line-height: 1.3;
}

.page-blog__post-title a,
.page-blog__guide-title a {
  color: #26A9E0;
  text-decoration: none;
}

.page-blog__post-title a:hover,
.page-blog__guide-title a:hover {
  text-decoration: underline;
}

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

.page-blog__post-excerpt,
.page-blog__guide-excerpt {
  font-size: 1em;
  color: #555555;
  margin-bottom: 20px;
  flex-grow: 1;
}

.page-blog__read-more {
  display: inline-block;
  color: #26A9E0;
  text-decoration: none;
  font-weight: 600;
}

.page-blog__read-more:hover {
  text-decoration: underline;
}

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

.page-blog__video-wrapper {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
  height: 0;
  overflow: hidden;
  max-width: 100%;
  background: #000;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.page-blog__video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  cursor: pointer;
}

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

.page-blog__faq-item {
  background-color: #ffffff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
}

.page-blog__faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 20px;
  font-weight: 600;
  font-size: 1.1em;
  color: #26A9E0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
}

.page-blog__faq-item summary::-webkit-details-marker {
  display: none;
}

.page-blog__faq-toggle {
  font-size: 1.5em;
  line-height: 1;
  margin-left: 10px;
}

.page-blog__faq-answer {
  padding: 0 20px 20px 20px;
  color: #555555;
  font-size: 1em;
}

.page-blog__cta-bottom-section {
  background-color: #26A9E0;
  color: #ffffff;
  text-align: center;
}

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

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

.page-blog__cta-bottom-section .page-blog__btn-primary {
  background-color: #EA7C07; /* Login color */
  border-color: #EA7C07;
}

.page-blog__cta-bottom-section .page-blog__btn-primary:hover {
  background-color: #d86c00;
  border-color: #d86c00;
}

.page-blog__cta-bottom-section .page-blog__btn-secondary {
  background-color: #ffffff;
  color: #26A9E0;
  border-color: #ffffff;
}

.page-blog__cta-bottom-section .page-blog__btn-secondary:hover {
  background-color: #e0f2f7;
  border-color: #e0f2f7;
}

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

  .page-blog__hero-section {
    padding-bottom: 40px;
  }

  .page-blog__main-title {
    font-size: clamp(1.8em, 7vw, 2.5em);
  }

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

  .page-blog__hero-cta-buttons {
    flex-direction: column;
    gap: 15px;
  }

  .page-blog__btn-primary,
  .page-blog__btn-secondary,
  .page-blog a[class*="button"],
  .page-blog a[class*="btn"] {
    max-width: 100% !important;
    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__section-title {
    font-size: 2em;
  }

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

  .page-blog__post-grid,
  .page-blog__guide-grid {
    grid-template-columns: 1fr;
  }

  .page-blog__post-card,
  .page-blog__guide-card {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  }

  .page-blog img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  
  .page-blog__section,
  .page-blog__card,
  .page-blog__container,
  .page-blog__hero-image-wrapper,
  .page-blog__post-image-wrapper,
  .page-blog__guide-image-wrapper,
  .page-blog__video-section,
  .page-blog__video-container,
  .page-blog__video-wrapper,
  .page-blog__cta-buttons,
  .page-blog__button-group,
  .page-blog__btn-container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    overflow: hidden !important;
  }

  .page-blog__video-section {
    padding-top: 10px !important; /* body 已承担 --header-offset，此处禁止 var(--header-offset) */
  }
  
  .page-blog video,
  .page-blog__video {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  
  .page-blog__video-wrapper {
    padding-bottom: 56.25% !important; /* 16:9 Aspect Ratio */
    height: 0 !important;
  }

  .page-blog__faq-item summary {
    font-size: 1em;
    padding: 15px;
  }

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