/* style/faq.css */

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

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

.page-faq__hero-section {
  position: relative;
  padding-top: 10px; /* Adjusted to 10px as per instructions, assuming body handles header-offset */
  padding-bottom: 60px;
  background-color: var(--primary-color);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.page-faq__hero-image {
  width: 100%;
  max-height: 450px;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  z-index: 1;
}

.page-faq__hero-image img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  filter: brightness(0.8);
}

.page-faq__hero-content {
  position: relative;
  z-index: 2;
  color: #ffffff;
  padding: 20px 20px 0;
  max-width: 900px;
  margin-top: -150px; /* Pull content up over image for visual effect, but not text on image */
}

.page-faq__main-title {
  font-size: 3.2em;
  font-weight: 700;
  margin-bottom: 20px;
  line-height: 1.2;
  color: #ffffff;
}

.page-faq__description {
  font-size: 1.1em;
  margin-bottom: 30px;
  opacity: 0.9;
}

.page-faq__cta-buttons {
  display: flex;
  gap: 20px;
  justify-content: center;
  margin-top: 20px;
  width: 100%;
  max-width: 600px;
  box-sizing: border-box;
}

.page-faq__btn-primary,
.page-faq__btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  border-radius: 8px;
  font-size: 1.1em;
  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;
  max-width: 100%;
}

.page-faq__btn-primary {
  background: var(--button-gradient);
  color: #ffffff;
  border: none;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.page-faq__btn-primary:hover {
  background: linear-gradient(180deg, #2F6BFF 0%, #4A8BFF 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

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

.page-faq__btn-secondary:hover {
  background: var(--primary-color);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.page-faq__btn-small {
  padding: 10px 20px;
  font-size: 1em;
}

.page-faq__section {
  padding: 60px 0;
}

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

.page-faq__section-title {
  font-size: 2.5em;
  font-weight: 700;
  color: var(--text-dark-color);
  text-align: center;
  margin-bottom: 20px;
  line-height: 1.3;
}

.page-faq__section-intro {
  font-size: 1.1em;
  color: var(--text-main-color);
  text-align: center;
  margin-bottom: 40px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

/* FAQ Styles */
details.page-faq__faq-item {
  margin-bottom: 15px;
  border-radius: 10px;
  border: 1px solid var(--border-color);
  overflow: hidden;
  background: var(--card-background-color);
  box-shadow: 0 2px 10px 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 0.3s ease;
  position: relative;
  color: var(--text-dark-color);
}

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(--background-color);
  color: var(--primary-color);
}

.page-faq__faq-qtext {
  flex: 1;
  font-size: 1.15em;
  font-weight: 600;
  line-height: 1.5;
  text-align: left;
}

.page-faq__faq-toggle {
  font-size: 28px;
  font-weight: bold;
  color: var(--primary-color);
  flex-shrink: 0;
  margin-left: 15px;
  width: 30px;
  text-align: center;
  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 25px;
  background: var(--background-color);
  border-top: 1px solid var(--border-color);
  border-radius: 0 0 10px 10px;
  color: var(--text-main-color);
}

details.page-faq__faq-item .page-faq__faq-answer p {
  margin-top: 15px;
  margin-bottom: 0;
  font-size: 1em;
}

.page-faq__illustration-img {
  width: 100%;
  height: auto;
  display: block;
  margin-top: 20px;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* Responsive Styles */

/* Tablet and Mobile adjustments */
@media (max-width: 1024px) {
  .page-faq__hero-content {
    margin-top: -100px;
  }
  .page-faq__main-title {
    font-size: 2.8em;
  }
  .page-faq__description {
    font-size: 1em;
  }
  .page-faq__section-title {
    font-size: 2em;
  }
  .page-faq__faq-qtext {
    font-size: 1.1em;
  }
}

@media (max-width: 768px) {
  /* HERO 主图区域 */
  .page-faq__hero-section {
    padding-top: 10px; /* Consistent with 10px top padding */
    padding-bottom: 40px;
  }
  .page-faq__hero-image img {
    object-fit: contain !important; /* Must use contain */
    aspect-ratio: unset !important;
    width: 100% !important;
    height: auto !important;
    max-height: 300px;
  }
  .page-faq__hero-content {
    padding: 15px 15px 0;
    margin-top: -80px;
  }
  .page-faq__main-title {
    font-size: 2.2em !important;
    margin-bottom: 15px;
    line-height: 1.3;
  }
  .page-faq__description {
    font-size: 0.95em !important;
    margin-bottom: 20px;
  }

  /* 按钮与按钮容器 */
  .page-faq__cta-buttons {
    flex-direction: column !important; /* Multiple buttons stack vertically */
    gap: 15px;
    padding: 0 15px;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }
  .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: 12px 20px;
    font-size: 1em;
  }

  /* 通用图片与容器 */
  .page-faq__section,
  .page-faq__container {
    padding: 30px 0;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  .page-faq__container {
    padding: 0 15px;
  }
  .page-faq img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    box-sizing: border-box !important;
  }

  /* 装饰主标题 + 长文 SEO 区 */
  .page-faq__section-title {
    font-size: 1.8em !important;
    margin-bottom: 15px;
  }
  .page-faq__section-intro {
    font-size: 0.9em !important;
    margin-bottom: 25px;
  }
  .page-faq__article-body {
    max-width: 100% !important;
    padding: 0 15px;
    box-sizing: border-box !important;
  }

  /* FAQ specific mobile styles */
  details.page-faq__faq-item summary.page-faq__faq-question {
    padding: 15px 18px;
  }
  .page-faq__faq-qtext {
    font-size: 1em !important;
  }
  .page-faq__faq-toggle {
    font-size: 24px;
    width: 24px;
    margin-left: 10px;
  }
  details.page-faq__faq-item .page-faq__faq-answer {
    padding: 0 18px 18px;
  }
  details.page-faq__faq-item .page-faq__faq-answer p {
    font-size: 0.95em;
  }

  /* Product grid (not present on this FAQ page, but for completeness as per checklist) */
  /* If .page-faq__products-grid were present, it would need: */
  /* .page-faq__products-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 15px; overflow-x: hidden; } */
  /* .page-faq__products-section { overflow-x: hidden; } */

  /* Ensuring content areas don't cause overflow */
  .page-faq__general-questions,
  .page-faq__account-management,
  .page-faq__transactions,
  .page-faq__games-entertainment,
  .page-faq__promotions,
  .page-faq__security-support,
  .page-faq__other-info,
  .page-faq__contact-cta {
    padding-left: 0;
    padding-right: 0;
    box-sizing: border-box;
    max-width: 100%;
    width: 100%;
    overflow-x: hidden;
  }
}