/* style/blog.css */
.page-blog {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #FFF3E6; /* Text Main */
  background: #0D0E12; /* Background */
}

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

/* Hero Section */
.page-blog__hero-section {
  position: relative;
  padding-top: 10px; /* Adjust based on shared.css body padding */
  width: 100%;
  overflow: hidden;
  display: flex;
  flex-direction: column; /* Image above text */
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 400px; /* Ensure visibility */
}

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

.page-blog__hero-image {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  filter: none; /* No image filters */
}

.page-blog__hero-content-wrapper {
  position: relative; /* Not absolute to avoid overlay */
  padding: 40px 20px;
  background: rgba(13, 14, 18, 0.8); /* Slightly opaque dark background for text */
  width: 100%;
  box-sizing: border-box;
}

.page-blog__main-title {
  font-size: clamp(2.2em, 3.5vw, 3.5em); /* H1 font size control */
  color: #FF8C1A; /* Main color for emphasis */
  margin-bottom: 15px;
  font-weight: bold;
  line-height: 1.2;
}

.page-blog__intro-text {
  font-size: 1.1em;
  color: #FFF3E6;
  max-width: 800px;
  margin: 0 auto 30px auto;
}

.page-blog__cta-button {
  display: inline-block;
  padding: 15px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  font-size: 1.1em;
  transition: background-color 0.3s ease, transform 0.2s ease;
  cursor: pointer;
  max-width: 100%; /* Button responsive */
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

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

.page-blog__btn-primary:hover {
  transform: translateY(-2px);
  opacity: 0.9;
}

.page-blog__btn-secondary {
  background: #17191F; /* Card BG */
  color: #FF8C1A; /* Main color */
  border: 2px solid #A84F0C; /* Border */
}

.page-blog__btn-secondary:hover {
  transform: translateY(-2px);
  background: #FF8C1A;
  color: #ffffff;
}

/* Intro Section */
.page-blog__intro-section {
  padding: 80px 0;
  background: #0D0E12; /* Background */
  text-align: center;
}

.page-blog__section-title {
  font-size: 2.5em;
  color: #FF8C1A;
  margin-bottom: 30px;
  font-weight: bold;
}

.page-blog__description {
  font-size: 1.1em;
  color: #FFF3E6;
  max-width: 900px;
  margin: 0 auto 20px auto;
}

/* Latest Posts Section */
.page-blog__latest-posts {
  padding: 80px 0;
  background: #0D0E12; /* Background */
}

.page-blog__blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* 3 columns for blog cards */
  gap: 30px;
  margin-top: 40px;
}

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

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

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

.page-blog__blog-card-image {
  width: 100%;
  height: 200px; /* Fixed height for consistency */
  object-fit: cover;
  display: block;
  filter: none; /* No image filters */
}

.page-blog__blog-card-content {
  padding: 20px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.page-blog__blog-card-title {
  font-size: 1.4em;
  color: #FF8C1A; /* Main color */
  margin-bottom: 10px;
  line-height: 1.3;
  flex-grow: 1;
}

.page-blog__blog-card-excerpt {
  font-size: 0.95em;
  color: #FFF3E6;
  margin-bottom: 15px;
}

.page-blog__blog-card-date {
  font-size: 0.85em;
  color: #A84F0C; /* Border color for subtle date */
  display: block;
  margin-top: auto;
}

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

/* CTA Section */
.page-blog__cta-section {
  padding: 80px 0;
  background: #17191F; /* Card BG */
  text-align: center;
}

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

/* FAQ Section */
.page-blog__faq-section {
  padding: 80px 0;
  background: #0D0E12; /* Background */
}

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

.page-blog__faq-item {
  background: #17191F; /* Card BG */
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.page-blog__faq-item summary {
  list-style: none; /* Hide default marker */
  cursor: pointer;
  padding: 20px 25px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: bold;
  font-size: 1.2em;
  color: #FF8C1A; /* Main color */
  position: relative;
}

.page-blog__faq-item summary::-webkit-details-marker {
  display: none; /* Hide default marker for webkit browsers */
}

.page-blog__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.page-blog__faq-qtext {
  flex-grow: 1;
}

.page-blog__faq-toggle {
  font-size: 1.5em;
  line-height: 1;
  margin-left: 15px;
  transition: transform 0.3s ease;
  color: #A84F0C; /* Border color */
}

.page-blog__faq-item[open] .page-blog__faq-toggle {
  transform: rotate(45deg); /* Rotate plus to cross */
}

.page-blog__faq-answer {
  padding: 0 25px 20px 25px;
  font-size: 1em;
  color: #FFF3E6;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
}

.page-blog__faq-item[open] .page-blog__faq-answer {
  max-height: 500px; /* Sufficient height for content */
  transition: max-height 0.5s ease-in;
}

.page-blog__faq-answer p {
  margin-bottom: 0;
}

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

/* --- Responsive Design --- */

/* Tablet and smaller desktops */
@media (max-width: 1024px) {
  .page-blog__container {
    padding: 0 15px;
  }

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

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

  .page-blog__blog-grid {
    grid-template-columns: repeat(2, 1fr); /* 2 columns for tablets */
    gap: 25px;
  }
}

/* Mobile devices */
@media (max-width: 768px) {
  /* HERO 主图区域 */
  .page-blog__hero-section {
    padding-top: 10px !important; /* Fixed header spacing */
    min-height: auto;
  }

  .page-blog__hero-content-wrapper {
    padding: 30px 15px;
  }

  .page-blog__main-title {
    font-size: clamp(1.8em, 7vw, 2.5em) !important;
    margin-bottom: 10px;
  }

  .page-blog__intro-text {
    font-size: 1em;
    margin-bottom: 20px;
  }

  /* 深色导语区 */
  .page-blog__intro-section {
    padding: 50px 0;
  }

  .page-blog__section-title {
    font-size: 1.8em;
    margin-bottom: 20px;
  }

  .page-blog__description {
    font-size: 1em;
    padding: 0 15px;
  }

  /* 博客网格 */
  .page-blog__blog-grid {
    grid-template-columns: 1fr !important; /* 1 column for mobile */
    gap: 20px;
    padding: 0 15px;
  }

  .page-blog__blog-card-image {
    height: 180px;
  }

  .page-blog__blog-card-title {
    font-size: 1.2em;
  }

  .page-blog__blog-card-excerpt {
    font-size: 0.9em;
  }

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

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

  /* 按钮与按钮容器 */
  .page-blog__cta-button,
  .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: 12px 20px !important;
    font-size: 1em !important;
  }
  
  .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;
    flex-direction: column !important; /* Stack buttons vertically */
    gap: 15px !important;
  }

  /* FAQ 与其他模块 */
  .page-blog__faq-section {
    padding: 50px 0;
  }

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

  .page-blog__faq-answer {
    padding: 0 20px 15px 20px;
    font-size: 0.95em;
  }
}

/* Mobile devices (even smaller) */
@media (max-width: 549px) {
  .page-blog__blog-grid {
    grid-template-columns: 1fr !important; /* Force single column */
  }
}