/* style/faq.css */

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

.page-faq {
  font-family: Arial, sans-serif;
  color: var(--color-text-main); /* Default text color for dark background */
  background-color: var(--color-background-dark); /* Assuming body background is dark */
}

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

/* Hero Section */
.page-faq__hero-section {
  padding-top: 10px; /* Small top padding, relying on body for header offset */
  padding-bottom: 40px;
  text-align: center;
  background-color: var(--color-background-dark);
  position: relative;
  overflow: hidden;
}

.page-faq__hero-image-wrapper {
  width: 100%;
  height: auto;
  max-height: 400px; /* Limit height for aesthetic */
  overflow: hidden;
  position: relative;
}

.page-faq__hero-image {
  width: 100%;
  height: auto;
  object-fit: cover;
  display: block;
  opacity: 0.3; /* Slightly dim the image to make text pop */
}

.page-faq__hero-content {
  position: relative;
  z-index: 1;
  max-width: 900px;
  margin-top: -200px; /* Pull content up over the image */
  background: rgba(8, 22, 15, 0.7); /* Semi-transparent dark background */
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.5);
}

.page-faq__main-title {
  font-size: 2.8em;
  font-weight: 700;
  line-height: 1.2;
  color: var(--color-gold);
  margin-bottom: 20px;
  text-shadow: 0 0 10px rgba(242, 193, 78, 0.5);
}

.page-faq__intro-text {
  font-size: 1.1em;
  line-height: 1.6;
  color: var(--color-text-secondary);
  margin-bottom: 30px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

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

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

.page-faq__btn-primary {
  background: var(--button-gradient);
  color: var(--color-text-main);
  box-shadow: 0 4px 15px rgba(42, 209, 111, 0.4);
}

.page-faq__btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(42, 209, 111, 0.6);
}

.page-faq__btn-secondary {
  background: var(--color-card-bg);
  color: var(--color-primary);
  border: 2px solid var(--color-primary);
  box-shadow: 0 4px 15px rgba(17, 168, 78, 0.2);
}

.page-faq__btn-secondary:hover {
  background: var(--color-primary);
  color: var(--color-text-main);
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(17, 168, 78, 0.4);
}

/* FAQ Section */
.page-faq__faq-section {
  padding: 60px 0;
  background-color: var(--color-background-dark);
  color: var(--color-text-main);
}

.page-faq__section-title {
  font-size: 2.2em;
  color: var(--color-gold);
  text-align: center;
  margin-bottom: 40px;
  text-shadow: 0 0 8px rgba(242, 193, 78, 0.3);
}

.page-faq__faq-list {
  max-width: 900px;
  margin: 0 auto;
}

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

.page-faq__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  font-size: 1.2em;
  font-weight: bold;
  color: var(--color-text-main);
  cursor: pointer;
  background-color: var(--color-card-bg);
  user-select: none;
  list-style: none;
}

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

.page-faq__faq-qtext {
  flex-grow: 1;
  color: var(--color-text-main);
}

.page-faq__faq-toggle {
  font-size: 1.5em;
  line-height: 1;
  margin-left: 15px;
  transition: transform 0.3s ease;
  color: var(--color-primary);
}

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

.page-faq__faq-answer {
  padding: 0 25px 20px 25px;
  font-size: 1em;
  line-height: 1.7;
  color: var(--color-text-secondary);
  border-top: 1px solid var(--color-divider);
  background-color: rgba(17, 39, 27, 0.8); /* Slightly lighter than card bg */
}

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

.page-faq__answer-link {
  color: var(--color-secondary);
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s ease;
}

.page-faq__answer-link:hover {
  color: var(--color-glow);
  text-decoration: underline;
}

/* CTA Bottom Section */
.page-faq__cta-bottom {
  padding: 60px 0;
  text-align: center;
  background-color: var(--color-deep-green);
  color: var(--color-text-main);
}

.page-faq__cta-title {
  font-size: 2.5em;
  color: var(--color-gold);
  margin-bottom: 20px;
  text-shadow: 0 0 10px rgba(242, 193, 78, 0.4);
}

.page-faq__cta-description {
  font-size: 1.1em;
  line-height: 1.6;
  color: var(--color-text-secondary);
  margin-bottom: 40px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

/* General Image and Button styles */
.page-faq img {
  max-width: 100%;
  height: auto;
  display: block;
}

.page-faq a[class*="button"],
.page-faq a[class*="btn"] {
  max-width: 100%;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

.page-faq__cta-buttons {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

/* --- Responsive Styles --- */
@media (max-width: 1024px) {
  .page-faq__main-title {
    font-size: 2.4em;
  }

  .page-faq__intro-text {
    font-size: 1em;
  }

  .page-faq__hero-content {
    margin-top: -150px;
    padding: 25px;
  }

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

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

  .page-faq__cta-title {
    font-size: 2.2em;
  }

  .page-faq__cta-description {
    font-size: 1em;
  }
}

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

  /* General Image and Button overrides */
  .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;
  }

  .page-faq__cta-button,
  .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;
    flex-direction: column !important; /* Force vertical stacking for buttons */
  }

  /* Hero Section */
  .page-faq__hero-section {
    padding-top: 10px !important; /* Small top padding, relying on body for header offset */
    padding-bottom: 20px;
  }

  .page-faq__hero-image-wrapper {
    max-height: 250px;
  }

  .page-faq__hero-content {
    margin-top: -100px;
    padding: 20px;
  }

  .page-faq__main-title {
    font-size: 1.8em;
    margin-bottom: 15px;
  }

  .page-faq__intro-text {
    font-size: 0.95em;
    margin-bottom: 20px;
  }

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

  /* FAQ Section */
  .page-faq__faq-section {
    padding: 40px 0;
  }

  .page-faq__section-title {
    font-size: 1.8em;
    margin-bottom: 30px;
  }

  .page-faq__faq-question {
    font-size: 1em;
    padding: 15px 20px;
  }

  .page-faq__faq-answer {
    padding: 0 20px 15px 20px;
  }

  /* CTA Bottom Section */
  .page-faq__cta-bottom {
    padding: 40px 0;
  }

  .page-faq__cta-title {
    font-size: 2em;
  }

  .page-faq__cta-description {
    font-size: 0.95em;
  }

  /* --- Placeholder for other required sections from '必写清单' --- */
  /* Although not directly used on FAQ page, these must be present as per instructions */

  /* Top Carousel (adapted to general section for non-homepage) */
  .page-faq__hero-carousel-section {
    /* If this were a carousel, its mobile styles would go here */
    padding-top: 10px !important; 
    padding-bottom: 20px;
  }

  /* Five Vertical Team Cards (adapted to general section for non-homepage) */
  .page-faq__guide-box {
    padding: 15px;
  }
  .page-faq__guide-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
  }
  .page-faq__guide-card {
    flex: 0 0 calc(50% - 10px);
    max-width: calc(50% - 10px);
    padding-top: 0 !important; /* Reset specific padding */
    margin-bottom: 10px; /* Add some vertical spacing */
  }
  .page-faq__guide-card img {
    aspect-ratio: 250/350;
    object-fit: cover;
    width: 100%;
    height: auto;
  }
  /* Specific overrides for 2-3 layout - for 5 items, 2+3 or 3+2 */
  .page-faq__guide-card:nth-child(1),
  .page-faq__guide-card:nth-child(2) {
    flex: 0 0 calc(50% - 10px);
    max-width: calc(50% - 10px);
  }
  .page-faq__guide-card:nth-child(3),
  .page-faq__guide-card:nth-child(4),
  .page-faq__guide-card:nth-child(5) {
    flex: 0 0 calc(33.333% - 10px);
    max-width: calc(33.333% - 10px);
  }

  /* Home Content Box (adapted to general section for non-homepage) */
  .page-faq__home-content-box {
    max-width: 100% !important;
    height: auto !important;
    padding: 15px;
    border-radius: 8px;
  }
  .page-faq__home-content-inner {
    height: auto !important;
    overflow-y: visible !important;
  }

  /* Blog Card Section (adapted to general section for non-homepage) */
  .page-faq__blog-section {
    padding: 40px 0;
  }
  .page-faq__blog-grid {
    grid-template-columns: 1fr !important; /* Single column on mobile */
    gap: 20px;
  }
  .page-faq__blog-card {
    margin-bottom: 15px;
  }
}

/* Placeholder for default guide box styles, to ensure desktop is also covered */
.page-faq__guide-box {
  padding: 16px 20px 24px;
  background: var(--color-card-bg);
  border-radius: 4px;
  margin-top: 40px;
}
.page-faq__guide-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}
.page-faq__guide-card {
  flex: 0 0 18%; /* Adjusted for 5 cards with gap */
  max-width: 18%;
  text-align: center;
}
.page-faq__guide-card img {
  aspect-ratio: 250/350;
  object-fit: contain;
  width: 100%;
  height: auto;
  border-radius: 8px;
}
.page-faq__guide-card--pos-1, .page-faq__guide-card--pos-5 {
  padding-top: 50px;
}
.page-faq__guide-card--pos-2, .page-faq__guide-card--pos-4 {
  padding-top: 25px;
}

/* Placeholder for home content box desktop styles */
.page-faq__home-content-box {
  max-width: 91%;
  margin: 40px auto;
  padding: 20px 30px;
  border: 2px solid var(--color-border);
  border-radius: 15px;
  box-shadow: 0 0 25px var(--color-glow);
  height: 700px;
  background-color: var(--color-card-bg);
}
.page-faq__home-content-inner {
  height: 100%;
  overflow-y: auto;
  padding-right: 15px; /* For scrollbar space */
}
.page-faq__home-content-inner::-webkit-scrollbar {
  width: 8px;
}
.page-faq__home-content-inner::-webkit-scrollbar-track {
  background: var(--color-background-dark);
  border-radius: 10px;
}
.page-faq__home-content-inner::-webkit-scrollbar-thumb {
  background: var(--color-primary);
  border-radius: 10px;
}

/* Placeholder for blog grid desktop styles */
.page-faq__blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* Example desktop layout */
  gap: 20px;
  margin-top: 40px;
}
.page-faq__blog-card {
  background-color: var(--color-card-bg);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  text-decoration: none;
  color: inherit;
}
.page-faq__blog-card img {
  width: 100%;
  height: 200px; /* Example fixed height */
  object-fit: cover;
}
.page-faq__blog-card-content {
  padding: 15px;
}
.page-faq__blog-card-title {
  font-size: 1.2em;
  font-weight: bold;
  color: var(--color-text-main);
  margin-bottom: 10px;
}
.page-faq__blog-card-text {
  font-size: 0.9em;
  color: var(--color-text-secondary);
  line-height: 1.5;
}