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

.page-blog__hero-section {
  padding-top: 10px; /* Small top padding, relying on body for header offset */
  position: relative;
  overflow: hidden;
  margin-bottom: 40px;
}

.page-blog__hero-image-wrapper {
  width: 100%;
  height: 0;
  padding-bottom: 56.25%; /* 16:9 aspect ratio */
  position: relative;
}

.page-blog__hero-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.7); /* Slightly dim the image for text readability */
}

.page-blog__hero-content {
  max-width: 900px;
  margin: -200px auto 0 auto; /* Pull content up over the image */
  padding: 40px;
  text-align: center;
  background: rgba(23, 25, 31, 0.8); /* Card BG with transparency */
  border-radius: 10px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
  position: relative;
  z-index: 1;
  border: 1px solid #A84F0C; /* Border */
}

.page-blog__main-title {
  font-size: 2.8em;
  font-weight: bold;
  color: #FFB04D; /* Glow */
  margin-bottom: 20px;
  line-height: 1.2;
  text-shadow: 0 0 10px rgba(255, 176, 77, 0.6);
}

.page-blog__description {
  font-size: 1.1em;
  color: #FFF3E6;
  margin-bottom: 30px;
}

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

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

.page-blog__section-title {
  font-size: 2.2em;
  color: #FFB04D; /* Glow */
  text-align: center;
  margin-bottom: 20px;
  font-weight: bold;
}

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

.page-blog__blog-masonry {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  align-items: stretch;
}

.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;
  border: 1px solid #A84F0C; /* Border */
  display: flex;
  flex-direction: column;
}

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

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

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

.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: #FFA53A; /* Auxiliary */
  margin-bottom: 10px;
  font-weight: bold;
  line-height: 1.3;
}

.page-blog__blog-card-meta {
  font-size: 0.9em;
  color: #A84F0C; /* Border */
  margin-bottom: 15px;
}

.page-blog__blog-card-excerpt {
  font-size: 1em;
  color: #FFF3E6;
  margin-bottom: 20px;
  flex-grow: 1;
}

.page-blog__btn-outline {
  display: inline-block;
  padding: 10px 20px;
  background: transparent;
  color: #FFA53A;
  border: 2px solid #FFA53A;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
  text-align: center;
  margin-top: auto;
}

.page-blog__btn-outline:hover {
  background-color: #FFA53A;
  color: #17191F;
}

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

.page-blog__btn-primary {
  display: inline-block;
  padding: 15px 30px;
  background: linear-gradient(180deg, #FFA53A 0%, #D96800 100%);
  color: #ffffff;
  border: none;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  font-size: 1.1em;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 4px 10px rgba(255, 165, 58, 0.4);
  margin: 0 10px;
}

.page-blog__btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(255, 165, 58, 0.6);
}

.page-blog__btn-secondary {
  display: inline-block;
  padding: 15px 30px;
  background: #17191F;
  color: #FFA53A;
  border: 2px solid #FFA53A;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  font-size: 1.1em;
  transition: transform 0.3s ease, background-color 0.3s ease;
  margin: 0 10px;
}

.page-blog__btn-secondary:hover {
  transform: translateY(-3px);
  background-color: #FFA53A;
  color: #17191F;
}

.page-blog__cta-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 30px;
}

.page-blog__categories {
  background-color: #17191F; /* Card BG */
  padding: 60px 0;
  border-top: 1px solid #A84F0C;
}

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

.page-blog__category-card {
  background: #0D0E12; /* Background */
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  text-decoration: none;
  color: inherit;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid #A84F0C; /* Border */
  display: flex;
  flex-direction: column;
}

.page-blog__category-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
}

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

.page-blog__category-title {
  font-size: 1.5em;
  color: #FFA53A; /* Auxiliary */
  margin: 20px 0 10px;
  font-weight: bold;
}

.page-blog__category-description {
  font-size: 0.95em;
  color: #FFF3E6;
  padding: 0 20px 20px;
}

.page-blog__cta-section {
  text-align: center;
  padding: 80px 0;
  background: linear-gradient(180deg, #D96800 0%, #FF8C1A 100%); /* Button gradient for CTA background */
  color: #ffffff;
}

.page-blog__cta-content {
  max-width: 800px;
  margin: 0 auto;
}

.page-blog__cta-title {
  font-size: 2.5em;
  color: #ffffff;
  margin-bottom: 20px;
  font-weight: bold;
}

.page-blog__cta-description {
  font-size: 1.2em;
  color: #f0f0f0;
  margin-bottom: 40px;
}

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

/* Mobile responsiveness */
@media (max-width: 768px) {
  .page-blog {
    font-size: 15px;
  }

  /* HERO 主图区域 */
  .page-blog__hero-section {
    margin-bottom: 20px;
  }

  .page-blog__hero-content {
    padding: 20px;
    margin-top: -100px; /* Adjust pull-up for mobile */
  }

  .page-blog__main-title {
    font-size: 1.8em;
  }

  .page-blog__description {
    font-size: 0.95em;
    margin-bottom: 20px;
  }

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

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

  .page-blog__section-description {
    font-size: 0.9em;
    margin-bottom: 30px;
  }

  /* 博客卡片区 */
  .page-blog__blog-masonry {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .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__view-all-button {
    margin-top: 30px;
  }

  /* 按钮与按钮容器 */
  .page-blog__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: 12px 20px !important;
    font-size: 1em !important;
    margin: 0 !important; /* Remove horizontal margin */
  }

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

  /* 分类卡片区 */
  .page-blog__category-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

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

  .page-blog__category-title {
    font-size: 1.3em;
  }

  .page-blog__category-description {
    font-size: 0.9em;
  }

  .page-blog__cta-title {
    font-size: 1.8em;
  }

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

  /* 通用图片与容器 */
  .page-blog img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  
  .page-blog__container,
  .page-blog__section,
  .page-blog__card,
  .page-blog__category-card,
  .page-blog__blog-card {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }

  /* Adjust padding for elements that might have negative margins or specific positioning */
  .page-blog__hero-content {
    margin-left: 15px;
    margin-right: 15px;
    width: calc(100% - 30px);
  }
}

/* Additional rules for larger tablets/desktops, if needed */
@media (max-width: 1024px) and (min-width: 769px) {
  .page-blog__hero-content {
    max-width: 700px;
    margin-top: -150px;
  }
  .page-blog__main-title {
    font-size: 2.2em;
  }
  .page-blog__blog-masonry {
    grid-template-columns: repeat(2, 1fr);
  }
  .page-blog__category-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}