/* --- Base Styles & Variables --- */
:root {
  --primary-color: #F2C14E;
  --secondary-color: #FFD36B;
  --text-main-color: #FFF6D6;
  --card-bg-color: #111111;
  --background-color-page: #0A0A0A; /* Specific for page-blog main content */
  --border-color: #3A2A12;
  --glow-color: #FFD36B;
  --button-gradient: linear-gradient(180deg, #FFD86A 0%, #DDA11D 100%);
  --padding-section: 60px 0;
  --max-width-content: 1200px;
}

.page-blog {
  font-family: 'Arial', sans-serif;
  color: var(--text-main-color); /* Apply main text color from custom scheme */
  background-color: var(--background-color-page); /* Apply page specific background */
  line-height: 1.6;
}

.page-blog__container {
  max-width: var(--max-width-content);
  margin: 0 auto;
  padding: 0 20px;
  box-sizing: border-box;
}

.page-blog__section {
  padding: var(--padding-section);
  text-align: center;
}

.page-blog__section-title {
  font-size: clamp(28px, 4vw, 38px);
  color: var(--secondary-color);
  margin-bottom: 20px;
  font-weight: 700;
  line-height: 1.2;
}

.page-blog__section-subtitle {
  font-size: clamp(16px, 2vw, 20px);
  color: var(--text-main-color);
  margin-bottom: 40px;
  opacity: 0.8;
}

.page-blog__text-block {
  font-size: 17px;
  color: var(--text-main-color);
  margin-bottom: 20px;
  line-height: 1.8;
  text-align: justify;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

/* --- Buttons --- */
.page-blog__btn-primary,
.page-blog__btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 30px;
  border-radius: 8px;
  font-size: 18px;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.3s ease;
  cursor: pointer;
  border: 2px solid transparent;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
  max-width: 100%;
}

.page-blog__btn-primary {
  background: var(--button-gradient);
  color: #ffffff;
  box-shadow: 0 4px 15px rgba(255, 211, 107, 0.4);
}

.page-blog__btn-primary:hover {
  filter: brightness(1.1);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 211, 107, 0.6);
}

.page-blog__btn-secondary {
  background: transparent;
  color: var(--secondary-color);
  border-color: var(--secondary-color);
}

.page-blog__btn-secondary:hover {
  background: rgba(255, 211, 107, 0.1);
  transform: translateY(-2px);
  border-color: var(--secondary-color);
}

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

/* --- Hero Section --- */
.page-blog__hero-section {
  position: relative;
  padding: 10px 0 60px; /* 約10px頂距 */
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.page-blog__hero-image-wrapper {
  width: 100%;
  height: 600px; /* Fixed height for desktop */
  overflow: hidden;
  position: relative;
}

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

.page-blog__hero-content {
  position: relative; 
  z-index: 2;
  text-align: center;
  padding: 40px 20px;
  max-width: 900px;
  margin-top: -100px; 
  background: rgba(10, 10, 10, 0.85); /* Semi-transparent background for readability */
  border-radius: 15px;
  backdrop-filter: blur(5px);
  border: 1px solid var(--border-color);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
}

.page-blog__main-title {
  font-size: clamp(36px, 5vw, 56px);
  color: var(--secondary-color);
  margin-bottom: 20px;
  font-weight: 800;
  line-height: 1.1;
}

.page-blog__description {
  font-size: clamp(18px, 2.5vw, 22px);
  color: var(--text-main-color);
  margin-bottom: 30px;
  opacity: 0.9;
}

/* --- Introduction Section --- */
.page-blog__introduction-section .page-blog__container {
  max-width: 900px;
}

/* --- Article Grid (Featured Articles) --- */
.page-blog__article-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.page-blog__article-card {
  background: var(--card-bg-color);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid var(--border-color);
  text-align: left;
}

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

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

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

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

.page-blog__article-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--secondary-color);
  margin-bottom: 10px;
  line-height: 1.4;
}

.page-blog__article-excerpt {
  font-size: 15px;
  color: var(--text-main-color);
  opacity: 0.8;
  margin-bottom: 15px;
}

.page-blog__article-meta {
  font-size: 13px;
  color: var(--text-main-color);
  opacity: 0.6;
}

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

/* --- Latest News Section (Article List) --- */
.page-blog__latest-news .page-blog__container {
  max-width: 900px;
}

.page-blog__article-list {
  margin-top: 40px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.page-blog__list-item {
  background: var(--card-bg-color);
  border-radius: 10px;
  padding: 25px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid var(--border-color);
  text-align: left;
}

.page-blog__list-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4);
}

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

.page-blog__list-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--secondary-color);
  margin-bottom: 10px;
  line-height: 1.3;
}

.page-blog__list-excerpt {
  font-size: 16px;
  color: var(--text-main-color);
  opacity: 0.8;
  margin-bottom: 10px;
}

.page-blog__list-meta {
  font-size: 14px;
  color: var(--text-main-color);
  opacity: 0.6;
}

/* --- CTA Section --- */
.page-blog__cta-section {
  background: var(--card-bg-color);
  padding: 80px 0;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

.page-blog__cta-section .page-blog__container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 50px;
  text-align: left;
}

.page-blog__cta-content {
  flex: 1;
}

.page-blog__cta-content .page-blog__section-title {
  text-align: left;
  font-size: clamp(30px, 4vw, 42px);
  margin-bottom: 25px;
}

.page-blog__cta-content .page-blog__text-block {
  text-align: left;
  font-size: 18px;
  max-width: none;
}

.page-blog__cta-buttons-inline {
  display: flex;
  gap: 20px;
  margin-top: 30px;
  flex-wrap: wrap;
}

.page-blog__cta-image-wrapper {
  flex-shrink: 0;
  width: 500px;
  height: 375px;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-color);
}

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

/* --- FAQ Section --- */
.page-blog__faq-section .page-blog__container {
  max-width: 900px;
}

.page-blog__faq-list {
  margin-top: 40px;
}

details.page-blog__faq-item {
  margin-bottom: 15px;
  border-radius: 10px;
  border: 1px solid var(--border-color);
  overflow: hidden;
  background: var(--card-bg-color);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

details.page-blog__faq-item summary.page-blog__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 25px;
  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(var(--secondary-color-rgb), 0.05); /* Lighter hover for dark background */
}

.page-blog__faq-qtext {
  flex: 1;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.5;
  text-align: left;
  color: var(--secondary-color);
}

.page-blog__faq-toggle {
  font-size: 28px;
  font-weight: bold;
  color: var(--secondary-color);
  flex-shrink: 0;
  margin-left: 15px;
  width: 30px;
  text-align: center;
}

details.page-blog__faq-item .page-blog__faq-answer {
  padding: 0 25px 25px;
  background: rgba(var(--card-bg-color-rgb), 0.8); /* Slightly lighter background for answer */
  border-radius: 0 0 10px 10px;
  color: var(--text-main-color);
  text-align: left;
}

/* --- Generic Image Styles for responsiveness --- */
.page-blog img {
  max-width: 100%;
  height: auto;
  display: block;
}

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

  .page-blog__container {
    padding: 0 15px;
  }

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

  .page-blog__section-title {
    font-size: 26px;
    margin-bottom: 15px;
  }

  .page-blog__section-subtitle {
    font-size: 15px;
    margin-bottom: 25px;
  }

  .page-blog__text-block {
    font-size: 15px;
    text-align: left;
  }

  /* HERO 主图区域 */
  .page-blog__hero-section {
    padding: 10px 0 40px; /* 約10px頂距 */
  }

  .page-blog__hero-image-wrapper {
    height: 300px; /* Smaller height for mobile hero */
  }

  .page-blog__hero-image {
    object-fit: contain !important; /* 禁止裁切 */
    aspect-ratio: unset !important;
  }

  .page-blog__hero-content {
    padding: 25px 15px;
    margin-top: -60px; /* Adjust overlap */
  }

  .page-blog__main-title {
    font-size: 28px;
  }

  .page-blog__description {
    font-size: 16px;
  }

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

  /* 产品展示图区域 (Article Grid) */
  .page-blog__article-grid {
    grid-template-columns: 1fr 1fr; /* 2 列 */
    gap: 20px;
    overflow-x: hidden;
  }

  .page-blog__article-card {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  }

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

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

  .page-blog__article-excerpt {
    font-size: 13px;
  }

  .page-blog__article-meta {
    font-size: 11px;
  }

  /* 装饰主标题 + 长文 SEO 区 (Latest News / CTA Section content) */
  .page-blog__latest-news .page-blog__container,
  .page-blog__introduction-section .page-blog__container {
    padding-left: 15px;
    padding-right: 15px;
  }

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

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

  .page-blog__list-excerpt {
    font-size: 14px;
  }

  .page-blog__list-meta {
    font-size: 12px;
  }

  .page-blog__cta-section .page-blog__container {
    flex-direction: column;
    text-align: center;
    gap: 30px;
  }

  .page-blog__cta-content .page-blog__section-title,
  .page-blog__cta-content .page-blog__text-block {
    text-align: center;
  }

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

  .page-blog__cta-image-wrapper {
    width: 100%;
    height: 250px;
  }

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

  .page-blog__section,
  .page-blog__card,
  .page-blog__container,
  .page-blog__article-card,
  .page-blog__list-item,
  .page-blog__cta-section .page-blog__container,
  .page-blog__cta-image-wrapper {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 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__cta-buttons,
  .page-blog__button-group,
  .page-blog__btn-container,
  .page-blog__cta-buttons-inline {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    flex-wrap: wrap !important;
    gap: 10px;
    flex-direction: column; /* Ensure vertical stacking for buttons */
  }

  /* 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: 24px;
    width: 24px;
  }
  details.page-blog__faq-item .page-blog__faq-answer {
    padding: 0 15px 15px;
  }
}

/* --- Color Contrast Fixes (if needed, based on body background is dark) --- */
/* As body is dark, text-main-color is already light (#FFF6D6). Cards are #111111, also dark. */
/* Buttons have gradient background with white text, which is good contrast. */
/* Secondary button has transparent background with secondary-color text, which is yellow. On dark background #0A0A0A, this should be fine. */
/* WCAG AA contrast check for #FFD36B on #0A0A0A is 8.41:1, which is excellent. */