/* Base styles for the FAQ page */
.page-faq {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #333333; /* Default text color for light backgrounds */
  background-color: #F5F7FA; /* Page background */
}

/* Hero Section */
.page-faq__hero-section {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-top: 10px; /* Small top padding, relying on body for header offset */
  background-color: #F5F7FA;
  overflow: hidden;
}

.page-faq__hero-image-wrapper {
  width: 100%;
  max-height: 500px;
  overflow: hidden;
}

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

.page-faq__hero-content {
  padding: 40px 20px;
  max-width: 900px;
  margin: 0 auto;
  background-color: #FFFFFF;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transform: translateY(-50px);
  position: relative;
  z-index: 1;
}

.page-faq__hero-title {
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 700;
  color: #E53935;
  margin-bottom: 20px;
  line-height: 1.2;
}

.page-faq__hero-description {
  font-size: 18px;
  color: #333333;
  margin-bottom: 30px;
}

.page-faq__hero-cta {
  display: inline-block;
  padding: 15px 30px;
  font-size: 18px;
  font-weight: 600;
  border-radius: 8px;
  text-decoration: none;
  color: #ffffff;
  background: linear-gradient(180deg, #FF5A4F 0%, #E53935 100%);
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 10px rgba(229, 57, 53, 0.3);
}

.page-faq__hero-cta:hover {
  background: linear-gradient(180deg, #E53935 0%, #FF5A4F 100%);
  box-shadow: 0 6px 15px rgba(229, 57, 53, 0.4);
  transform: translateY(-2px);
}

/* FAQ List Section */
.page-faq__faq-list-section {
  padding: 60px 0;
  background-color: #F5F7FA;
  margin-top: -50px; /* Adjust to pull up content under hero */
  position: relative;
  z-index: 0;
}

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

.page-faq__section-title {
  font-size: clamp(26px, 3.5vw, 36px);
  font-weight: 700;
  color: #E53935;
  text-align: center;
  margin-bottom: 20px;
}

.page-faq__section-intro {
  font-size: 17px;
  color: #333333;
  text-align: center;
  margin-bottom: 40px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.page-faq__faq-grid {
  display: grid;
  gap: 15px;
}

/* FAQ Item Styles (using <details> for native behavior) */
details.page-faq__faq-item {
  margin-bottom: 15px;
  border-radius: 8px;
  border: 1px solid #E0E0E0;
  overflow: hidden;
  background: #FFFFFF;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

details.page-faq__faq-item summary.page-faq__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;
  color: #333333;
}

details.page-faq__faq-item summary.page-faq__faq-question::-webkit-details-marker {
  display: none;
}

details.page-faq__faq-item summary.page-faq__faq-question:hover {
  background: #f5f5f5;
}

.page-faq__faq-qtext {
  flex: 1;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.5;
  text-align: left;
  color: #333333;
}

.page-faq__faq-toggle {
  font-size: 26px;
  font-weight: bold;
  color: #E53935;
  flex-shrink: 0;
  margin-left: 15px;
  width: 30px;
  text-align: center;
  line-height: 1;
}

details.page-faq__faq-item[open] summary.page-faq__faq-question {
  background-color: #fff;
  border-bottom: 1px solid #E0E0E0;
  border-radius: 8px 8px 0 0;
}

details.page-faq__faq-item .page-faq__faq-answer {
  padding: 0 25px 20px;
  background: #f9f9f9;
  border-radius: 0 0 8px 8px;
  color: #555555;
  font-size: 16px;
}

.page-faq__faq-answer p {
  margin: 0;
  padding-top: 15px;
}

/* Call to Action Section */
.page-faq__cta-section {
  padding: 60px 0;
  background-color: #E53935;
  color: #ffffff;
  text-align: center;
  border-radius: 8px;
  margin: 40px auto 60px;
  max-width: 1000px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.page-faq__cta-title {
  font-size: clamp(24px, 3vw, 38px);
  font-weight: 700;
  margin-bottom: 20px;
  line-height: 1.2;
  color: #ffffff;
}

.page-faq__cta-description {
  font-size: 18px;
  margin-bottom: 40px;
  color: #f0f0f0;
}

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

.page-faq__btn-primary,
.page-faq__btn-secondary {
  display: inline-block;
  padding: 15px 30px;
  font-size: 18px;
  font-weight: 600;
  border-radius: 8px;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s ease;
  box-sizing: border-box;
  max-width: 100%;
  white-space: normal;
  word-wrap: break-word;
}

.page-faq__btn-primary {
  color: #ffffff;
  background: linear-gradient(180deg, #FF5A4F 0%, #E53935 100%);
  border: 2px solid transparent;
  box-shadow: 0 4px 10px rgba(229, 57, 53, 0.3);
}

.page-faq__btn-primary:hover {
  background: linear-gradient(180deg, #E53935 0%, #FF5A4F 100%);
  box-shadow: 0 6px 15px rgba(229, 57, 53, 0.4);
  transform: translateY(-2px);
}

.page-faq__btn-secondary {
  color: #E53935;
  background: #ffffff;
  border: 2px solid #E53935;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.page-faq__btn-secondary:hover {
  background: #f5f5f5;
  color: #FF5A4F;
  border-color: #FF5A4F;
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
  transform: translateY(-2px);
}

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

/* Responsive Styles */
@media (max-width: 1024px) {
  .page-faq__hero-content {
    padding: 30px 20px;
    transform: translateY(-40px);
  }

  .page-faq__hero-title {
    font-size: clamp(26px, 3.8vw, 38px);
  }

  .page-faq__hero-description {
    font-size: 17px;
  }

  .page-faq__section-title {
    font-size: clamp(24px, 3.2vw, 32px);
  }

  .page-faq__faq-item {
    border-radius: 6px;
  }

  details.page-faq__faq-item summary.page-faq__faq-question {
    padding: 16px 20px;
  }

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

  .page-faq__faq-toggle {
    font-size: 24px;
    width: 28px;
  }

  details.page-faq__faq-item .page-faq__faq-answer {
    padding: 0 20px 18px;
  }

  .page-faq__cta-section {
    margin: 30px auto 50px;
    padding: 50px 20px;
  }

  .page-faq__cta-title {
    font-size: clamp(22px, 2.8vw, 34px);
  }

  .page-faq__cta-description {
    font-size: 17px;
  }

  .page-faq__cta-buttons {
    gap: 15px;
  }

  .page-faq__btn-primary, .page-faq__btn-secondary {
    padding: 14px 28px;
    font-size: 17px;
  }
}

@media (max-width: 768px) {
  /* HERO 主图区域 */
  .page-faq__hero-section {
    padding-top: 10px;
  }
  .page-faq__hero-image-wrapper {
    max-height: 300px;
  }
  .page-faq__hero-image {
    object-fit: contain !important; /* 禁止 cover 裁切两侧 */
    aspect-ratio: unset !important;
    width: 100% !important;
    height: auto !important;
  }
  .page-faq__hero-content {
    padding: 25px 15px;
    transform: translateY(-30px);
    max-width: calc(100% - 30px); /* Adjust for padding */
    margin-left: 15px;
    margin-right: 15px;
  }
  .page-faq__hero-title {
    font-size: clamp(24px, 6vw, 32px);
  }
  .page-faq__hero-description {
    font-size: 16px;
  }
  .page-faq__hero-cta {
    padding: 12px 25px;
    font-size: 16px;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
  }

  /* 产品展示图区域 - Not applicable for FAQ, but general image rules apply */
  /* Decorative title + long text SEO area - General content area styles */
  .page-faq__container {
    padding: 0 15px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
  .page-faq__section-title {
    font-size: clamp(22px, 5vw, 28px);
    padding: 0 10px;
  }
  .page-faq__section-intro {
    font-size: 15px;
    padding: 0 10px;
  }

  /* 通用图片与容器 */
  .page-faq img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  .page-faq__faq-list-section, .page-faq__cta-section {
    padding: 40px 0;
  }

  /* FAQ Item Styles */
  details.page-faq__faq-item {
    margin-bottom: 10px;
    border-radius: 6px;
  }
  details.page-faq__faq-item summary.page-faq__faq-question {
    padding: 15px 18px;
  }
  .page-faq__faq-qtext {
    font-size: 15px;
  }
  .page-faq__faq-toggle {
    font-size: 22px;
    width: 26px;
  }
  details.page-faq__faq-item .page-faq__faq-answer {
    padding: 0 18px 15px;
    font-size: 15px;
  }

  /* 按钮与按钮容器 */
  .page-faq__cta-section {
    margin: 20px auto 40px;
    padding: 40px 15px;
  }
  .page-faq__cta-title {
    font-size: clamp(20px, 5.5vw, 28px);
  }
  .page-faq__cta-description {
    font-size: 16px;
  }
  .page-faq__cta-buttons {
    flex-direction: column !important; /* 移动端垂直排列 */
    gap: 15px;
  }
  .page-faq__btn-primary,
  .page-faq__btn-secondary {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    padding: 14px 20px;
    font-size: 16px;
  }
}