/* style/blog.css */

/* Base styles */
.page-blog {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: #ffffff; /* Light text for dark body background */
  background-color: transparent; /* Body background is handled by shared.css */
}

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

.page-blog__section-title {
  font-size: 2.5em;
  color: #017439;
  text-align: center;
  margin-bottom: 40px;
  font-weight: bold;
  line-height: 1.2;
}

.page-blog__section-description {
  font-size: 1.1em;
  text-align: center;
  max-width: 800px;
  margin: 0 auto 50px auto;
  color: #f0f0f0;
}

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

.page-blog__btn-primary {
  background-color: #C30808; /* Custom color for Register/Login */
  color: #FFFF00; /* Custom color for Register/Login font */
  border: 2px solid #C30808;
}

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

.page-blog__btn-secondary {
  background-color: transparent;
  color: #017439;
  border: 2px solid #017439;
}

.page-blog__btn-secondary:hover {
  background-color: #017439;
  color: #ffffff;
}

/* Hero Section */
.page-blog__hero-section {
  position: relative;
  padding-top: 10px; /* Small top padding, body handles --header-offset */
  padding-bottom: 40px;
  background-color: #1a1a1a;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.page-blog__hero-image-wrapper {
  width: 100%;
  max-height: 600px; /* Limit height for hero image */
  overflow: hidden;
  margin-bottom: 30px;
}

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

.page-blog__hero-content {
  max-width: 900px;
  padding: 0 20px;
  position: relative;
  z-index: 1;
}

.page-blog__main-title {
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  color: #FFFFFF;
  margin-bottom: 20px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

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

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

/* Articles Section */
.page-blog__articles-section {
  padding: 80px 0;
  background-color: #1a1a1a;
}

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

.page-blog__article-card {
  background-color: rgba(255, 255, 255, 0.08); /* Slightly transparent white for cards */
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.page-blog__article-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

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

.page-blog__article-image {
  width: 100%;
  height: 220px; /* Fixed height for consistent card images */
  object-fit: cover;
  display: block;
}

.page-blog__article-content {
  padding: 25px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.page-blog__article-title {
  font-size: 1.4em;
  color: #FFFFFF;
  margin-bottom: 10px;
  font-weight: bold;
  line-height: 1.3;
}

.page-blog__article-date {
  font-size: 0.9em;
  color: #b0b0b0;
  margin-bottom: 15px;
  display: block;
}

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

.page-blog__read-more-btn {
  display: inline-block;
  color: #017439;
  font-weight: bold;
  text-decoration: none;
  transition: color 0.3s ease;
}

.page-blog__read-more-btn:hover {
  color: #00a04a;
}

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

.page-blog__view-all-btn {
  min-width: 200px;
}

/* About Section */
.page-blog__about-section {
  padding: 80px 0;
  background-color: #1a1a1a;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.page-blog__about-content {
  display: flex;
  align-items: flex-start;
  gap: 40px;
  flex-wrap: wrap;
}

.page-blog__about-image {
  width: 100%;
  max-width: 500px;
  height: auto;
  border-radius: 12px;
  object-fit: cover;
  flex-shrink: 0;
}

.page-blog__about-text {
  flex-grow: 1;
  color: #e0e0e0;
}

.page-blog__about-text p {
  margin-bottom: 20px;
  font-size: 1.1em;
}

/* Why Choose Us Section */
.page-blog__why-choose-us-section {
  padding: 80px 0;
  background-color: #1a1a1a;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

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

.page-blog__feature-item {
  background-color: rgba(255, 255, 255, 0.08);
  padding: 30px;
  border-radius: 12px;
  text-align: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.page-blog__feature-icon {
  width: 100px;
  height: 100px;
  object-fit: contain;
  margin-bottom: 20px;
  filter: brightness(1.2); /* Allowed for icons, not color change */
}

.page-blog__feature-title {
  font-size: 1.5em;
  color: #017439;
  margin-bottom: 15px;
  font-weight: bold;
}

.page-blog__feature-item p {
  color: #e0e0e0;
  font-size: 1em;
}

/* FAQ Section */
.page-blog__faq-section {
  padding: 80px 0;
  background-color: #1a1a1a;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

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

.page-blog__faq-item {
  background-color: rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.page-blog__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  font-size: 1.15em;
  font-weight: bold;
  color: #FFFFFF;
  cursor: pointer;
  list-style: none;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -khtml-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  position: relative;
}

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

.page-blog__faq-toggle {
  font-size: 1.5em;
  line-height: 1;
  transition: transform 0.3s ease;
  color: #017439;
}

.page-blog__faq-item[open] .page-blog__faq-toggle {
  transform: rotate(45deg);
}

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

.page-blog__faq-item[open] .page-blog__faq-answer {
  max-height: 500px; /* Sufficiently large to show content */
  padding-top: 10px;
}

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

/* CTA Banner Section */
.page-blog__cta-banner-section {
  padding: 80px 0;
  background-color: #1a1a1a;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.page-blog__cta-banner-content {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  text-align: center;
}

.page-blog__cta-banner-image {
  width: 100%;
  height: 400px; /* Fixed height for banner image */
  object-fit: cover;
  display: block;
}

.page-blog__cta-banner-text-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6); /* Dark overlay for text readability */
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 20px;
  box-sizing: border-box;
}

.page-blog__cta-banner-title {
  font-size: 2.2em;
  color: #FFFFFF;
  margin-bottom: 15px;
  font-weight: bold;
  line-height: 1.2;
}

.page-blog__cta-banner-description {
  font-size: 1.1em;
  color: #f0f0f0;
  max-width: 700px;
  margin-bottom: 30px;
}

.page-blog__btn-banner {
  background-color: #C30808;
  color: #FFFF00;
  border: 2px solid #C30808;
}

.page-blog__btn-banner:hover {
  background-color: #a00606;
  border-color: #a00606;
}

/* Responsive Styles */

@media (max-width: 1024px) {
  .page-blog__main-title {
    font-size: clamp(2rem, 4.5vw, 3rem);
  }

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

  .page-blog__articles-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }

  .page-blog__about-content {
    flex-direction: column;
    align-items: center;
  }

  .page-blog__about-image {
    max-width: 100%;
  }

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

@media (max-width: 768px) {
  /* HERO 主图区域 */
  .page-blog__hero-section {
    padding-top: 10px !important; /* Small top padding, body handles --header-offset */
    padding-bottom: 30px !important;
  }

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

  .page-blog__hero-image {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }

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

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

  .page-blog__cta-buttons {
    flex-direction: column !important;
    gap: 15px !important;
  }

  /* 产品展示图区域 (applied to blog cards grid) */
  .page-blog__articles-grid {
    grid-template-columns: 1fr !important; /* Single column for blog cards */
    gap: 25px !important;
  }

  .page-blog__article-card {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  /* 通用图片与容器 */
  .page-blog img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  
  .page-blog__container,
  .page-blog__section,
  .page-blog__card,
  .page-blog__cta-banner-content,
  .page-blog__about-content,
  .page-blog__features-grid,
  .page-blog__faq-list {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px !important;
    padding-right: 15px !important;
    overflow-x: hidden !important;
  }

  /* 按钮与按钮容器 */
  .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 !important;
    padding-right: 15px !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: 0 !important;
    padding-right: 0 !important;
    flex-wrap: wrap !important;
    gap: 10px !important;
    flex-direction: column !important; /* Force vertical stacking for buttons */
  }

  /* 其他内容模块 */
  .page-blog__section-title {
    font-size: 1.8em !important;
    margin-bottom: 25px !important;
  }

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

  .page-blog__about-image {
    width: 100% !important;
    height: auto !important;
    max-width: 100% !important;
  }

  .page-blog__feature-item {
    padding: 20px !important;
  }

  .page-blog__feature-title {
    font-size: 1.3em !important;
  }

  .page-blog__faq-question {
    font-size: 1em !important;
    padding: 15px 20px !important;
  }

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

  .page-blog__cta-banner-image {
    height: 250px !important;
  }

  .page-blog__cta-banner-title {
    font-size: 1.5em !important;
  }

  .page-blog__cta-banner-description {
    font-size: 0.9em !important;
    margin-bottom: 20px !important;
  }
  .page-blog__articles-section, .page-blog__about-section, .page-blog__why-choose-us-section, .page-blog__faq-section, .page-blog__cta-banner-section {
    padding: 40px 0 !important;
  }
}