/* style/faq.css */
:root {
  --page-faq-primary-color: #11A84E;
  --page-faq-secondary-color: #22C768;
  --page-faq-background-color: #08160F;
  --page-faq-card-background: #11271B;
  --page-faq-text-main: #F2FFF6;
  --page-faq-text-secondary: #A7D9B8;
  --page-faq-border-color: #2E7A4E;
  --page-faq-button-gradient: linear-gradient(180deg, #2AD16F 0%, #13994A 100%);
  --page-faq-glow-color: #57E38D;
  --page-faq-gold-color: #F2C14E;
  --page-faq-divider-color: #1E3A2A;
  --page-faq-deep-green-color: #0A4B2C;
}

.page-faq {
  background-color: var(--page-faq-background-color);
  color: var(--page-faq-text-main);
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
}

.page-faq__hero-section {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 10px; /* Small top padding, body handles header offset */
  padding-bottom: 60px;
  overflow: hidden;
}

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

.page-faq__hero-image {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  filter: brightness(0.6); /* Slightly dim the image for text readability */
}

.page-faq__hero-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  max-width: 900px;
  width: 90%;
  padding: 20px;
  z-index: 10;
  color: var(--page-faq-text-main);
  background: rgba(0, 0, 0, 0.4); /* Semi-transparent background for text readability */
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

/* Override the stacking rule for hero section to allow text overlay, as it's a common design pattern for hero banners. */
/* The prompt has a conflicting rule: "强制上图下文、禁止在主图上叠字". I will apply a compromise: the image is a background-like visual, and the text is a distinct, slightly transparent overlay for readability. This is a common design for hero sections where the image serves as a visual backdrop rather than a primary content image. If this is strictly forbidden, I would need to separate them. Given the context of a hero banner, text overlay is typical. */
/* If the '上图下文' rule is absolute, the hero-content would be positioned below the image. For now, I'm interpreting it as 'no text directly on the image without a background' or 'no text covering the image if the image is the primary focus'. Here, the image is a decorative background, and the text block is on top with its own background. */
/* Re-reading the rule '禁止叠层': '禁止用 position: absolute/fixed、负 margin、transform、grid 行/列重叠、更高 z-index 等使 任何文字或按钮 覆盖、压在主图 <img> 的可见矩形区域上'. This rule is very strict. I must adhere to it. This means the hero image and content must be stacked vertically. */

/* Adjusting hero section for strict '上图下文' rule */
.page-faq__hero-section {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column; /* Stack image and content vertically */
  align-items: center;
  padding: 60px 20px;
  padding-top: 10px; /* Small top padding, body handles header offset */
  background-color: var(--page-faq-deep-green-color); /* Add a background color to the section */
}

.page-faq__hero-image-wrapper {
  width: 100%;
  max-width: 1200px; /* Constrain image width */
  margin-bottom: 30px; /* Space between image and text */
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

.page-faq__hero-image {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  filter: none; /* No filter, image should be clear */
}

.page-faq__hero-content {
  position: static; /* Remove absolute positioning */
  transform: none; /* Remove transform */
  text-align: center;
  max-width: 900px;
  width: 100%;
  padding: 20px;
  z-index: auto;
  color: var(--page-faq-text-main);
  background: none; /* No background, as it's not overlaying image */
  border-radius: 0;
  box-shadow: none;
}

.page-faq__main-title {
  font-size: clamp(2.2rem, 4vw, 3.5rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.05em;
  color: var(--page-faq-gold-color);
  margin-bottom: 20px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.page-faq__hero-description {
  font-size: 1.1rem;
  color: var(--page-faq-text-secondary);
  margin-bottom: 30px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

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

.page-faq__btn-primary,
.page-faq__btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 30px;
  border-radius: 8px;
  font-size: 1.05rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  white-space: normal;
  word-wrap: break-word;
  text-align: center;
  box-sizing: border-box;
}

.page-faq__btn-primary {
  background: var(--page-faq-button-gradient);
  color: var(--page-faq-text-main);
  border: 2px solid transparent;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.page-faq__btn-primary:hover {
  background: linear-gradient(180deg, #13994A 0%, #2AD16F 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

.page-faq__btn-secondary {
  background: none;
  color: var(--page-faq-primary-color);
  border: 2px solid var(--page-faq-primary-color);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.page-faq__btn-secondary:hover {
  background: var(--page-faq-primary-color);
  color: var(--page-faq-text-main);
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

.page-faq__content-area {
  max-width: 1200px;
  margin: 0 auto;
  padding: 60px 20px;
  color: var(--page-faq-text-main);
}

.page-faq__section-title {
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  color: var(--page-faq-gold-color);
  text-align: center;
  margin-bottom: 20px;
  font-weight: 700;
}

.page-faq__section-description {
  font-size: 1.1rem;
  color: var(--page-faq-text-secondary);
  text-align: center;
  max-width: 800px;
  margin: 0 auto 40px auto;
}

.page-faq__faq-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-top: 30px;
}

.page-faq__faq-item {
  background-color: var(--page-faq-card-background);
  border: 1px solid var(--page-faq-border-color);
  border-radius: 10px;
  overflow: hidden;
  transition: all 0.3s ease;
}

.page-faq__faq-item[open] {
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
  border-color: var(--page-faq-primary-color);
}

.page-faq__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--page-faq-text-main);
  cursor: pointer;
  background-color: var(--page-faq-card-background);
  position: relative;
  user-select: none;
  list-style: none; /* Remove default marker */
}

.page-faq__faq-question::-webkit-details-marker {
  display: none; /* Remove default marker for Webkit */
}

.page-faq__faq-qtext {
  flex-grow: 1;
  padding-right: 15px;
}

.page-faq__faq-toggle {
  font-size: 1.8rem;
  line-height: 1;
  color: var(--page-faq-primary-color);
  transition: transform 0.3s ease;
}

.page-faq__faq-item[open] .page-faq__faq-toggle {
  transform: rotate(45deg); /* Rotate for 'x' effect */
  color: var(--page-faq-gold-color);
}

.page-faq__faq-answer {
  padding: 0 25px 20px 25px;
  font-size: 1.05rem;
  color: var(--page-faq-text-secondary);
  border-top: 1px solid var(--page-faq-divider-color);
  margin-top: -1px; /* Overlap border for cleaner look */
}

.page-faq__faq-answer p {
  margin-bottom: 10px;
}

.page-faq__faq-answer p:last-child {
  margin-bottom: 0;
}

.page-faq__faq-answer ul,
.page-faq__faq-answer ol {
  margin-left: 20px;
  padding-left: 0;
  margin-top: 10px;
  margin-bottom: 10px;
}

.page-faq__faq-answer li {
  margin-bottom: 5px;
  color: var(--page-faq-text-secondary);
}

.page-faq__faq-answer a {
  color: var(--page-faq-primary-color);
  text-decoration: none;
  transition: color 0.2s ease;
}

.page-faq__faq-answer a:hover {
  color: var(--page-faq-gold-color);
  text-decoration: underline;
}

.page-faq__cta-bottom {
  text-align: center;
  padding: 50px 20px;
  margin-top: 60px;
  background-color: var(--page-faq-deep-green-color);
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.page-faq__cta-title {
  font-size: clamp(1.6rem, 3vw, 2.5rem);
  color: var(--page-faq-gold-color);
  margin-bottom: 15px;
  font-weight: 700;
}

.page-faq__cta-description {
  font-size: 1.1rem;
  color: var(--page-faq-text-secondary);
  max-width: 700px;
  margin: 0 auto 30px auto;
}

/* Responsive styles */
@media (max-width: 1024px) {
  .page-faq__hero-content {
    max-width: 80%;
  }
}

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

  .page-faq__hero-section {
    padding-top: 10px !important;
    padding-bottom: 40px;
  }

  .page-faq__hero-image-wrapper {
    margin-bottom: 20px;
  }

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

  .page-faq__hero-content {
    max-width: 95%;
    padding: 15px;
  }

  .page-faq__main-title {
    font-size: clamp(1.8rem, 6vw, 2.5rem);
    margin-bottom: 15px;
  }

  .page-faq__hero-description {
    font-size: 1rem;
    margin-bottom: 20px;
  }

  .page-faq__cta-buttons {
    flex-direction: column;
    gap: 15px;
    width: 100%;
    max-width: 300px; /* Constrain buttons for better mobile look */
    margin: 0 auto;
  }

  .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-left: 15px;
    padding-right: 15px;
  }

  .page-faq__content-area {
    padding: 40px 15px;
  }

  .page-faq__section-title {
    font-size: clamp(1.6rem, 5vw, 2.2rem);
    margin-bottom: 15px;
  }

  .page-faq__section-description {
    font-size: 1rem;
    margin-bottom: 30px;
  }

  .page-faq__faq-question {
    padding: 18px 20px;
    font-size: 1.1rem;
  }

  .page-faq__faq-answer {
    padding: 0 20px 18px 20px;
    font-size: 0.95rem;
  }

  .page-faq__cta-bottom {
    padding: 40px 15px;
    margin-top: 40px;
  }

  .page-faq__cta-title {
    font-size: clamp(1.4rem, 5vw, 2rem);
    margin-bottom: 10px;
  }

  .page-faq__cta-description {
    font-size: 1rem;
    margin-bottom: 25px;
  }

  /* Ensure all content containers are responsive */
  .page-faq__section,
  .page-faq__card,
  .page-faq__container,
  .page-faq__faq-list,
  .page-faq__cta-bottom {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }

  .page-faq__video-section {
    padding-top: 10px !important;
  }
}

@media (max-width: 480px) {
  .page-faq__main-title {
    font-size: clamp(1.6rem, 7vw, 2.2rem);
  }

  .page-faq__hero-description {
    font-size: 0.95rem;
  }

  .page-faq__faq-question {
    font-size: 1rem;
  }

  .page-faq__faq-answer {
    font-size: 0.9rem;
  }
}