/* style/faq.css */

:root {
  --page-faq-primary-color: #2F6BFF;
  --page-faq-secondary-color: #6FA3FF;
  --page-faq-text-main: #1F2D3D;
  --page-faq-text-black: #000000;
  --page-faq-card-bg: #FFFFFF;
  --page-faq-background: #F4F7FB;
  --page-faq-border-color: #D6E2FF;
  --page-faq-glow-color: #A5C4FF;
  --page-faq-button-gradient: linear-gradient(180deg, #4A8BFF 0%, #2F6BFF 100%);
}

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

.page-faq__hero-section {
  padding-top: 10px; /* Small top padding, body handles header offset */
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  min-height: 450px;
  margin-bottom: 40px;
}

.page-faq__hero-image-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

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

.page-faq__hero-content-wrapper {
  position: relative;
  z-index: 2;
  color: #ffffff;
  padding: 40px 20px;
  background: rgba(0, 0, 0, 0.4); /* Dark overlay for text readability */
  border-radius: 10px;
  max-width: 900px;
  margin: 20px;
}

.page-faq__main-title {
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 700;
  margin-bottom: 15px;
  line-height: 1.2;
  text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.page-faq__hero-description {
  font-size: clamp(16px, 1.8vw, 20px);
  margin-bottom: 30px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

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

.page-faq__section {
  padding: 40px 0;
  margin-bottom: 20px;
}

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

.page-faq__section-title {
  font-size: clamp(24px, 3vw, 36px);
  font-weight: 700;
  color: var(--page-faq-text-black);
  text-align: center;
  margin-bottom: 25px;
}

.page-faq__section-title--light {
  color: #ffffff;
}

.page-faq__section-description {
  font-size: 17px;
  text-align: center;
  max-width: 800px;
  margin: 0 auto 30px;
  color: var(--page-faq-text-main);
}

.page-faq__section-description--light {
  color: rgba(255, 255, 255, 0.9);
}

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

details.page-faq__faq-item {
  margin-bottom: 15px;
  border-radius: 8px;
  border: 1px solid var(--page-faq-border-color);
  overflow: hidden;
  background: var(--page-faq-card-bg);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}

details.page-faq__faq-item[open] {
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.1);
}

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;
  position: relative;
}

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: var(--page-faq-background);
}

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

.page-faq__faq-toggle {
  font-size: 28px;
  font-weight: bold;
  color: var(--page-faq-primary-color);
  flex-shrink: 0;
  margin-left: 15px;
  width: 30px;
  text-align: center;
  line-height: 1;
  transition: transform 0.3s ease;
}

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

details.page-faq__faq-item .page-faq__faq-answer {
  padding: 0 25px 20px;
  background: #fdfdfe;
  border-top: 1px solid var(--page-faq-border-color);
  border-radius: 0 0 8px 8px;
  color: var(--page-faq-text-main);
}

.page-faq__faq-answer p {
  margin-top: 10px;
  margin-bottom: 0;
  font-size: 16px;
}

.page-faq__inline-link {
  color: var(--page-faq-primary-color);
  text-decoration: underline;
  font-weight: 500;
}

.page-faq__inline-link:hover {
  text-decoration: none;
}

.page-faq__btn-primary,
.page-faq__btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 25px;
  border-radius: 30px;
  text-decoration: none;
  font-weight: 600;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-sizing: border-box;
  max-width: 100%;
  white-space: normal;
  word-wrap: break-word;
  text-align: center;
}

.page-faq__btn-primary {
  background: var(--page-faq-button-gradient);
  color: #ffffff;
  border: 2px solid transparent;
  box-shadow: 0 4px 15px rgba(47, 107, 255, 0.3);
}

.page-faq__btn-primary:hover {
  background: linear-gradient(180deg, #5C9AFF 0%, #3A7EFF 100%);
  box-shadow: 0 6px 20px rgba(47, 107, 255, 0.4);
}

.page-faq__btn-secondary {
  background: var(--page-faq-card-bg);
  color: var(--page-faq-primary-color);
  border: 2px solid var(--page-faq-primary-color);
}

.page-faq__btn-secondary:hover {
  background: var(--page-faq-primary-color);
  color: #ffffff;
  box-shadow: 0 4px 15px rgba(47, 107, 255, 0.2);
}

.page-faq__btn-primary--large {
  padding: 15px 35px;
  font-size: 18px;
  min-width: 200px;
}

.page-faq__cta-bottom-section {
  background: var(--page-faq-primary-color);
  padding: 60px 0;
  text-align: center;
  border-radius: 10px;
  margin: 40px auto;
  box-shadow: 0 8px 25px rgba(47, 107, 255, 0.4);
  max-width: 1160px;
}

.page-faq__cta-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.page-faq__dark-bg {
  background: var(--page-faq-primary-color);
  color: #ffffff; /* Forced white text for dark background */
}

/* Ensure images are responsive */
.page-faq img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* --- Mobile Responsive Styles --- */
@media (max-width: 1024px) {
  .page-faq__hero-content-wrapper {
    padding: 30px 15px;
    margin: 15px;
  }
  .page-faq__main-title {
    font-size: clamp(26px, 3.5vw, 42px);
  }
  .page-faq__hero-description {
    font-size: clamp(15px, 1.6vw, 18px);
  }
  .page-faq__section-title {
    font-size: clamp(22px, 2.8vw, 32px);
  }
  .page-faq__faq-qtext {
    font-size: 17px;
  }
  .page-faq__faq-answer p {
    font-size: 15px;
  }
  .page-faq__btn-primary,
  .page-faq__btn-secondary {
    padding: 10px 20px;
    font-size: 15px;
  }
  .page-faq__btn-primary--large {
    padding: 12px 30px;
    font-size: 16px;
  }
  .page-faq__cta-bottom-section {
    padding: 50px 0;
  }
}

@media (max-width: 768px) {
  /* HERO 主图区域 */
  .page-faq__hero-section {
    padding-top: 10px; /* Small top padding */
    min-height: 400px;
  }
  .page-faq__hero-image {
    object-fit: contain !important; /* Prevent cropping on mobile */
    aspect-ratio: unset !important; /* Allow natural aspect ratio */
  }
  .page-faq__hero-content-wrapper {
    padding: 20px 10px;
    margin: 10px;
    max-width: 95%;
  }
  .page-faq__main-title {
    font-size: clamp(24px, 6vw, 36px);
    margin-bottom: 10px;
  }
  .page-faq__hero-description {
    font-size: 15px;
    margin-bottom: 20px;
  }
  .page-faq__hero-buttons {
    flex-direction: column;
    gap: 10px;
    width: 100%;
    max-width: 300px; /* Constrain button group width */
    margin: 0 auto;
  }

  /* 通用内容区和图片 */
  .page-faq__container {
    padding: 0 15px;
  }
  .page-faq__section {
    padding: 30px 0;
  }
  .page-faq__section-title {
    font-size: clamp(20px, 5vw, 28px);
    margin-bottom: 20px;
  }
  .page-faq__section-description {
    font-size: 16px;
    margin-bottom: 25px;
  }
  .page-faq img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  .page-faq__section,
  .page-faq__card,
  .page-faq__container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }

  /* FAQ items */
  details.page-faq__faq-item summary.page-faq__faq-question {
    padding: 15px 20px;
  }
  .page-faq__faq-qtext {
    font-size: 16px;
  }
  .page-faq__faq-toggle {
    font-size: 24px;
    width: 25px;
    margin-left: 10px;
  }
  details.page-faq__faq-item .page-faq__faq-answer {
    padding: 0 20px 15px;
  }
  .page-faq__faq-answer p {
    font-size: 14px;
  }

  /* 按钮和按钮容器 */
  .page-faq__btn-primary,
  .page-faq__btn-secondary,
  .page-faq a[class*="button"],
  .page-faq 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-faq__cta-buttons,
  .page-faq__button-group,
  .page-faq__btn-container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    flex-wrap: wrap !important;
    gap: 10px;
  }
  .page-faq__cta-bottom-section {
    padding: 40px 15px;
    margin: 30px auto;
  }
  .page-faq__btn-primary--large {
    padding: 12px 25px;
    font-size: 16px;
  }
}