/* style/faq.css */

/* Variables (if needed, but using direct color values as per instruction) */
:root {
  --primary-color: #E53935;
  --secondary-color: #FF5A4F;
  --text-main: #333333;
  --card-bg: #FFFFFF;
  --background-page: #F5F7FA;
  --border-color: #E0E0E0;
}

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

/* Hero Section - Main Title and Intro Text */
.page-faq__hero-section {
  padding: 10px 0 40px 0; /* Rely on body for header offset, add small top padding */
  background: linear-gradient(180deg, var(--secondary-color) 0%, var(--primary-color) 100%);
  color: #ffffff; /* White text on brand color gradient */
  text-align: center;
}

.page-faq__hero-content-wrapper {
  max-width: 900px;
  margin: 0 auto;
  padding: 20px;
}

.page-faq__main-title {
  font-size: clamp(2em, 4vw, 2.5em); /* Responsive font size for H1 */
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 15px;
  color: #ffffff;
}

.page-faq__intro-text {
  font-size: 1.1em;
  max-width: 700px;
  margin: 0 auto;
  color: #f0f0f0;
}

/* General Section Styling */
.page-faq__section {
  padding: 40px 0;
}

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

.page-faq__section-title {
  font-size: 2em;
  color: var(--primary-color);
  text-align: center;
  margin-bottom: 30px;
  font-weight: 700;
}

.page-faq__content-wrapper {
  display: flex;
  gap: 30px;
  align-items: flex-start;
  margin-bottom: 30px;
}

.page-faq__image-block {
  flex: 1;
  min-width: 300px;
}

.page-faq__text-block {
  flex: 2;
}

.page-faq__sub-title {
  font-size: 1.5em;
  color: var(--primary-color);
  margin-top: 20px;
  margin-bottom: 15px;
  font-weight: 600;
}

.page-faq__paragraph {
  margin-bottom: 15px;
  color: var(--text-main);
}

.page-faq__list {
  list-style-type: disc;
  margin-left: 20px;
  margin-bottom: 20px;
  color: var(--text-main);
}

.page-faq__list-item {
  margin-bottom: 8px;
}

/* Images */
.page-faq__image {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.page-faq__image--inline {
  margin-top: 15px;
  margin-bottom: 15px;
}

/* Buttons */
.page-faq__btn-primary,
.page-faq__btn-secondary {
  display: inline-block;
  padding: 12px 25px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: 600;
  text-align: center;
  transition: all 0.3s ease;
  cursor: pointer;
  max-width: 100%; /* Ensure responsive */
  box-sizing: border-box; /* Ensure responsive */
  white-space: normal; /* Allow text wrap */
  word-wrap: break-word; /* Allow text wrap */
}

.page-faq__btn-primary {
  background: linear-gradient(180deg, var(--secondary-color) 0%, var(--primary-color) 100%);
  color: #ffffff;
  border: none;
  margin-top: 20px;
}

.page-faq__btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-2px);
}

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

.page-faq__btn-secondary:hover {
  background: var(--primary-color);
  color: #ffffff;
}

/* FAQ List */
.page-faq__faq-list {
  margin-top: 30px;
}

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

.page-faq__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  font-size: 1.15em;
  font-weight: 600;
  color: var(--primary-color);
  cursor: pointer;
  list-style: none; /* For details/summary */
}

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

.page-faq__faq-qtext {
  flex-grow: 1;
}

.page-faq__faq-toggle {
  font-size: 1.5em;
  line-height: 1;
  margin-left: 10px;
  transition: transform 0.3s ease;
}

.page-faq__faq-item[open] .page-faq__faq-toggle {
  transform: rotate(45deg); /* Rotate plus to form an X or minus */
}

.page-faq__faq-answer {
  padding: 0 20px 15px 20px;
  font-size: 1em;
  color: var(--text-main);
}

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

/* Specific section layouts */
.page-faq__section-overview .page-faq__content-wrapper,
.page-faq__section-promotions .page-faq__content-wrapper {
  align-items: center;
}

.page-faq__section-support .page-faq__content-wrapper {
  flex-direction: row-reverse; /* Image on right, text on left */
  align-items: center;
}

/* Responsive Styles */
@media (max-width: 1024px) {
  .page-faq__container {
    padding: 0 15px;
  }

  .page-faq__section-title {
    font-size: 1.8em;
  }

  .page-faq__sub-title {
    font-size: 1.3em;
  }

  .page-faq__content-wrapper {
    flex-direction: column;
    gap: 20px;
  }

  .page-faq__image-block,
  .page-faq__text-block {
    flex: none;
    width: 100%;
  }

  .page-faq__section-support .page-faq__content-wrapper {
    flex-direction: column; /* Revert to column for mobile */
  }
}

@media (max-width: 768px) {
  /* 1. Hero 奖池区 - Not applicable for FAQ page */
  /* If this were a homepage, it would contain rules for hero image object-fit:contain, aspect-ratio:unset, max-height:none */
  .page-faq__hero-section {
    padding-top: 10px !important; /* Small top padding */
    padding-bottom: 20px;
  }
  .page-faq__main-title {
    font-size: 1.8em !important;
  }
  .page-faq__intro-text {
    font-size: 1em !important;
  }

  /* 2. 游戏图库区 - Not applicable for FAQ page */
  /* If this were a homepage, it would contain rules for __game-grid, __game-tile (2 columns, aspect-ratio:1/1, overflow-x:hidden) */

  /* 3. 通用图片与容器 */
  .page-faq__container {
    padding-left: 15px !important;
    padding-right: 15px !important;
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: 100% !important;
  }
  .page-faq__image {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
    box-sizing: border-box !important;
  }
  .page-faq__image-block,
  .page-faq__text-block {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  .page-faq__section,
  .page-faq__card {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }

  /* 4. 按钮与按钮容器 */
  .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;
    margin-top: 15px !important;
  }
  .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;
    display: flex;
    flex-direction: column; /* Stack buttons vertically */
    gap: 10px;
  }

  /* 5. 中奖榜（模块 7、8） - Not applicable for FAQ page */
  /* If this were a homepage, it would contain rules for __winner-list (1 column, thumbnail 70px + text flex:1, overflow-x:hidden) */

  /* 6. 其他内容模块 */
  .page-faq__section {
    padding: 30px 0;
  }
  .page-faq__section-title {
    font-size: 1.5em !important;
    margin-bottom: 20px;
  }
  .page-faq__sub-title {
    font-size: 1.2em !important;
  }
  .page-faq__faq-question {
    font-size: 1em !important;
    padding: 12px 15px;
  }
  .page-faq__faq-answer {
    padding: 0 15px 12px 15px;
  }
  .page-faq__faq-toggle {
    font-size: 1.2em !important;
  }
  .page-faq__content-wrapper--reverse-mobile {
    flex-direction: column !important; /* Ensure it's column, not row-reverse */
  }
}

/* Color Contrast Fixes (as per instructions) */
/* Assuming var(--background-page) is light, and sections with brand colors are dark. */
.page-faq__dark-section {
  background: var(--primary-color);
  color: #ffffff; /* Forced white text */
}

/* Buttons already handle their own colors */