/* style/faq.css */

/* Base styles for the FAQ page */
.page-faq {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #FFF1E8; /* Text Main from custom palette */
  background-color: #140C0C; /* Background from custom palette */
}

/* Section spacing for consistency */
.page-faq__section-spacing {
  padding: 60px 0;
}

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

/* Hero Section */
.page-faq__hero-section {
  display: flex;
  flex-direction: column; /* Image above text */
  align-items: center;
  text-align: center;
  padding-top: 10px; /* Small top padding, relying on body padding-top from shared.css */
  padding-bottom: 60px;
  background-color: #140C0C;
  overflow: hidden; /* Ensure no overflow issues */
}

.page-faq__hero-image-wrapper {
  width: 100%;
  max-height: 675px; /* Limit height for aesthetic */
  overflow: hidden;
  margin-bottom: 30px;
}

.page-faq__hero-image {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover; /* Cover the area, may crop */
  border-radius: 8px;
}

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

.page-faq__main-title {
  font-size: clamp(2.2em, 3.5vw, 3.2em); /* Responsive font size */
  font-weight: 700;
  color: #F3C54D; /* Gold from custom palette */
  margin-bottom: 20px;
  line-height: 1.2;
}

.page-faq__hero-description {
  font-size: 1.1em;
  color: #FFF1E8; /* Text Main */
  margin-bottom: 30px;
}

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

.page-faq__btn-primary,
.page-faq__btn-secondary,
.page-faq__download-button {
  display: inline-block;
  padding: 15px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 700;
  font-size: 1em;
  transition: all 0.3s ease;
  cursor: pointer;
  max-width: 100%; /* Ensure responsiveness */
  box-sizing: border-box; /* Include padding in width */
  white-space: normal; /* Allow text to wrap */
  word-wrap: break-word; /* Break long words */
  text-align: center;
}

.page-faq__btn-primary {
  background: linear-gradient(180deg, #FFB04A 0%, #D86A14 100%); /* Button from custom palette */
  color: #ffffff;
  border: none;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.page-faq__btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.page-faq__btn-secondary {
  background: #2A1212; /* Card BG from custom palette */
  color: #FFF1E8; /* Text Main */
  border: 2px solid #6A1E1E; /* Border from custom palette */
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.page-faq__btn-secondary:hover {
  background: #3A2222;
  color: #F3C54D; /* Gold */
  border-color: #F3C54D; /* Gold */
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* Section headings */
.page-faq__section-heading,
.page-faq__cta-title {
  font-size: clamp(1.8em, 3vw, 2.5em);
  color: #F3C54D; /* Gold */
  text-align: center;
  margin-bottom: 40px;
  font-weight: 600;
}

/* FAQ List */
.page-faq__faq-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

details.page-faq__faq-item {
  margin-bottom: 0; /* Gap handled by parent */
  border-radius: 8px;
  border: 1px solid #6A1E1E; /* Border from custom palette */
  overflow: hidden;
  background: #2A1212; /* Card BG */
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}
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: #FFF1E8; /* Text Main */
}
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: #3A2222; /* Slightly lighter Card BG on hover */
}
.page-faq__faq-qtext {
  flex: 1;
  font-size: 1.1em;
  font-weight: 600;
  line-height: 1.5;
  text-align: left;
  color: #FFF1E8; /* Text Main */
}
.page-faq__faq-toggle {
  font-size: 24px;
  font-weight: bold;
  color: #F3C54D; /* Gold */
  flex-shrink: 0;
  margin-left: 15px;
  width: 28px;
  text-align: center;
}
details.page-faq__faq-item .page-faq__faq-answer {
  padding: 0 25px 25px;
  background: #1F0F0F; /* Slightly lighter than background for contrast */
  border-radius: 0 0 8px 8px;
  color: #FFF1E8; /* Text Main */
}

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

.page-faq__faq-image {
  width: 100%;
  height: auto;
  display: block;
  margin-top: 20px;
  border-radius: 8px;
  object-fit: cover;
  min-width: 200px; /* Minimum size requirement */
  min-height: 200px; /* Minimum size requirement */
}

/* CTA Section */
.page-faq__cta-section {
  background-color: #1F0F0F; /* Slightly different dark background */
  padding: 80px 0;
  text-align: center;
}

.page-faq__cta-content {
  max-width: 800px;
}

.page-faq__cta-description {
  font-size: 1.1em;
  color: #FFF1E8; /* Text Main */
  margin-bottom: 40px;
}

/* General images (ensure they meet min size and are responsive) */
.page-faq img {
  max-width: 100%;
  height: auto;
  display: block;
  box-sizing: border-box;
}

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

  .page-faq__section-spacing {
    padding: 40px 0;
  }

  .page-faq__hero-content {
    padding: 0 15px;
  }

  .page-faq__main-title {
    font-size: clamp(2em, 4vw, 2.8em);
  }

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

  .page-faq__btn-primary,
  .page-faq__btn-secondary,
  .page-faq__download-button {
    padding: 12px 25px;
    font-size: 0.95em;
  }

  details.page-faq__faq-item summary.page-faq__faq-question {
    padding: 15px 20px;
  }

  .page-faq__faq-qtext {
    font-size: 1em;
  }

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

@media (max-width: 768px) {
  /* HERO 主图区域 */
  .page-faq__hero-section {
    padding-bottom: 40px;
  }
  .page-faq__hero-image {
    object-fit: contain !important; /* Prevent cropping on mobile */
    aspect-ratio: unset !important; /* Allow natural aspect ratio */
    border-radius: 0;
  }
  .page-faq__hero-image-wrapper {
    max-height: none; /* Remove max-height for mobile */
    margin-bottom: 20px;
  }

  .page-faq__main-title {
    font-size: clamp(1.8em, 6vw, 2.5em); /* Adjust for smaller screens */
    margin-bottom: 15px;
  }

  .page-faq__hero-description {
    font-size: 0.95em;
    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;
  }

  /* 按钮与按钮容器 */
  .page-faq__cta-buttons {
    flex-direction: column; /* Stack buttons vertically */
    gap: 15px;
    padding: 0 15px; /* Add padding to container */
  }

  .page-faq__btn-primary,
  .page-faq__btn-secondary,
  .page-faq__download-button {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    padding: 12px 20px !important;
    font-size: 1em !important;
  }

  /* Section spacing and headings */
  .page-faq__section-spacing {
    padding: 30px 0;
  }

  .page-faq__section-heading,
  .page-faq__cta-title {
    font-size: clamp(1.5em, 5vw, 2em);
    margin-bottom: 30px;
  }

  /* FAQ items */
  details.page-faq__faq-item summary.page-faq__faq-question {
    padding: 15px;
    flex-wrap: wrap;
  }
  .page-faq__faq-qtext {
    font-size: 0.95em;
    margin-bottom: 5px; /* Add some space if text wraps */
    width: calc(100% - 40px); /* Make room for toggle */
  }
  .page-faq__faq-toggle {
    margin-left: 10px;
    width: 24px;
    height: 24px;
    font-size: 20px;
  }
  details.page-faq__faq-item .page-faq__faq-answer {
    padding: 0 15px 15px;
  }
  .page-faq__faq-answer p {
    font-size: 0.9em;
  }

  /* CTA Section */
  .page-faq__cta-section {
    padding: 50px 0;
  }
  .page-faq__cta-description {
    font-size: 0.95em;
    margin-bottom: 30px;
  }
}