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

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

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

.page-blog__section-title {
  font-size: 36px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 20px;
  color: #F2C14E; /* Primary color */
  text-shadow: 0 0 8px rgba(242, 193, 78, 0.4);
}

.page-blog__section-intro,
.page-blog__description {
  font-size: 18px;
  text-align: center;
  max-width: 800px;
  margin: 0 auto 40px;
  color: #FFF6D6;
}

/* Hero Section */
.page-blog__hero-section {
  position: relative;
  padding-top: 10px; /* Small top padding, assuming body has header offset */
  padding-bottom: 60px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.page-blog__hero-image-wrapper {
  width: 100%;
  height: 500px;
  overflow: hidden;
  position: relative;
  margin-bottom: 40px;
}

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

.page-blog__hero-content {
  position: relative; /* Ensure content is above image if any overlap */
  z-index: 1;
  padding: 0 20px;
  max-width: 900px;
}

.page-blog__main-title {
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: 900;
  color: #FFD36B; /* Glow color */
  margin-bottom: 20px;
  line-height: 1.2;
  text-shadow: 0 0 15px rgba(255, 211, 107, 0.6);
}

/* Featured Categories */
.page-blog__featured-categories {
  background-color: #0A0A0A;
}

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

.page-blog__category-card {
  background-color: #111111; /* Card BG */
  border: 1px solid #3A2A12; /* Border */
  border-radius: 10px;
  overflow: hidden;
  text-decoration: none;
  color: #FFF6D6;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}

.page-blog__category-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2), 0 0 15px rgba(242, 193, 78, 0.4);
}

.page-blog__category-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}

.page-blog__category-title {
  font-size: 22px;
  font-weight: 700;
  padding: 15px 20px 10px;
  color: #F2C14E;
}

.page-blog__category-text {
  font-size: 15px;
  padding: 0 20px 20px;
  color: #FFF6D6;
  flex-grow: 1;
}

/* Latest Articles */
.page-blog__latest-articles {
  background-color: #0A0A0A;
}

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

.page-blog__article-card {
  background-color: #111111; /* Card BG */
  border: 1px solid #3A2A12; /* Border */
  border-radius: 10px;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-blog__article-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2), 0 0 15px rgba(255, 211, 107, 0.4);
}

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

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

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

.page-blog__article-title {
  font-size: 20px;
  font-weight: 700;
  color: #F2C14E;
  margin-bottom: 10px;
  line-height: 1.4;
}

.page-blog__article-meta {
  font-size: 13px;
  color: #FFD36B;
  margin-bottom: 10px;
}

.page-blog__article-summary {
  font-size: 15px;
  color: #FFF6D6;
}

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

/* Why Read Us Section */
.page-blog__why-read-us {
  background-color: #111111; /* Card BG */
  border-top: 1px solid #3A2A12;
  border-bottom: 1px solid #3A2A12;
}

.page-blog__why-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.page-blog__why-item {
  background-color: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(242, 193, 78, 0.2);
  border-radius: 8px;
  padding: 30px;
  text-align: center;
}

.page-blog__why-heading {
  font-size: 24px;
  font-weight: 700;
  color: #FFD36B;
  margin-bottom: 15px;
}

.page-blog__why-text {
  font-size: 16px;
  color: #FFF6D6;
}

/* FAQ Section */
details.page-blog__faq-item {
  margin-bottom: 15px;
  border-radius: 8px;
  border: 1px solid #3A2A12; /* Border */
  overflow: hidden;
  background: #111111; /* Card BG */
  color: #FFF6D6;
}
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: rgba(242, 193, 78, 0.1);
}
.page-blog__faq-qtext {
  flex: 1;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.5;
  text-align: left;
  color: #F2C14E;
}
.page-blog__faq-toggle {
  font-size: 24px;
  font-weight: bold;
  color: #FFD36B;
  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: rgba(255, 255, 255, 0.05);
  border-top: 1px solid rgba(242, 193, 78, 0.2);
  border-radius: 0 0 8px 8px;
}

/* CTA Section */
.page-blog__cta-section {
  background: #111111; /* Card BG */
  padding: 80px 0;
  text-align: center;
  border-top: 1px solid #3A2A12;
}

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

/* Buttons */
.page-blog__btn-primary {
  display: inline-block;
  background: linear-gradient(180deg, #FFD86A 0%, #DDA11D 100%);
  color: #111111;
  padding: 15px 30px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 700;
  font-size: 18px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: none;
  cursor: pointer;
  max-width: 100%;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

.page-blog__btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 15px rgba(255, 216, 106, 0.4);
}

/* Responsive Styles */
@media (max-width: 1024px) {
  .page-blog__container {
    padding: 0 15px;
  }

  .page-blog__section-title {
    font-size: 32px;
  }

  .page-blog__hero-image-wrapper {
    height: 400px;
  }

  .page-blog__category-card,
  .page-blog__article-card {
    margin-bottom: 20px;
  }

  .page-blog__hero-image {
    object-fit: cover !important; /* Default to cover for larger screens */
    aspect-ratio: unset !important;
  }
}

@media (max-width: 849px) {
  .page-blog__hero-image img {
    object-fit: contain !important; /* Prevent cropping on smaller screens */
    aspect-ratio: unset !important;
  }
}

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

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

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

  .page-blog__section-title {
    font-size: clamp(24px, 6vw, 28px);
    margin-bottom: 15px;
  }

  .page-blog__section-intro,
  .page-blog__description {
    font-size: 16px;
    margin-bottom: 30px;
  }

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

  .page-blog__hero-image-wrapper {
    height: 250px;
    margin-bottom: 20px;
  }

  .page-blog__hero-image {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    object-fit: contain !important; /* Ensure image is fully visible */
    aspect-ratio: unset !important;
  }

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

  /* Categories Grid */
  .page-blog__categories-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .page-blog__category-image {
    height: 180px;
  }

  .page-blog__category-title {
    font-size: 18px;
    padding: 12px 15px 8px;
  }

  .page-blog__category-text {
    font-size: 14px;
    padding: 0 15px 15px;
  }

  /* Articles Grid */
  .page-blog__articles-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .page-blog__article-image {
    height: 180px;
  }

  .page-blog__article-title {
    font-size: 18px;
  }

  .page-blog__view-all-button-wrapper {
    margin-top: 30px;
  }

  /* Why Read Us Section */
  .page-blog__why-list {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .page-blog__why-item {
    padding: 20px;
  }

  .page-blog__why-heading {
    font-size: 20px;
    margin-bottom: 10px;
  }

  .page-blog__why-text {
    font-size: 15px;
  }

  /* FAQ Section */
  details.page-blog__faq-item summary.page-blog__faq-question {
    padding: 15px;
  }

  .page-blog__faq-qtext {
    font-size: 16px;
  }

  .page-blog__faq-toggle {
    font-size: 20px;
    width: 24px;
    margin-left: 10px;
  }

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

  /* CTA Section */
  .page-blog__cta-section {
    padding: 60px 0;
  }

  /* Buttons */
  .page-blog__btn-primary {
    padding: 12px 20px;
    font-size: 16px;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    margin: 0 auto; /* Center button if it's the only one */
  }

  /* General Image and container responsive */
  .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-section,
  .page-blog__featured-categories,
  .page-blog__latest-articles,
  .page-blog__why-read-us,
  .page-blog__faq-section,
  .page-blog__cta-section,
  .page-blog__categories-grid,
  .page-blog__articles-grid,
  .page-blog__why-list,
  .page-blog__faq-list {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    overflow-x: hidden; /* Ensure no horizontal scroll */
  }
}