/* Base styles for the FAQ page */
.page-faq {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #FFF5E1; /* Text Main color, suitable for #B71C1C body background */
  background-color: transparent; /* Body background is handled by shared.css */
  padding-bottom: 50px; /* General bottom padding */
}

/* Hero Section */
.page-faq__hero-section {
  position: relative;
  display: flex;
  flex-direction: column; /* Ensure image is above content */
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 10px 20px 50px; /* Approx 10px top padding for hero */
  overflow: hidden;
  background: linear-gradient(180deg, #7A0E0E 0%, #B71C1C 100%); /* Deep Red to Background color */
}

.page-faq__hero-image {
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  margin-bottom: 20px; /* Space between image and text */
}

.page-faq__hero-image img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover; /* Default cover for desktop */
  max-height: 500px; /* Limit hero image height */
  border-radius: 10px;
}

.page-faq__hero-content {
  max-width: 900px;
  width: 100%;
  z-index: 1;
}

.page-faq__main-title {
  font-size: clamp(2.5rem, 5vw, 3.5rem); /* Using clamp for H1 */
  font-weight: 700;
  color: #FFD86A; /* Gold color for main title */
  margin-bottom: 15px;
  line-height: 1.2;
}

.page-faq__intro-text {
  font-size: 1.15rem;
  color: #FFF5E1; /* Text Main color */
  margin-bottom: 30px;
}

.page-faq__cta-button {
  display: inline-block;
  background: linear-gradient(180deg, #FFD86A 0%, #E6B800 100%); /* Button gradient */
  color: #7A0E0E; /* Deep Red for button text for contrast */
  padding: 15px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.1rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.page-faq__cta-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* Content Section */
.page-faq__content-section {
  padding: 50px 0;
  background-color: #D32F2F; /* Card BG for this section */
  color: #FFF5E1; /* Text Main color */
}

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

.page-faq__section-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  color: #FFCC66; /* Glow color for section titles */
  text-align: center;
  margin-bottom: 20px;
}

.page-faq__section-description {
  font-size: 1.05rem;
  text-align: center;
  max-width: 800px;
  margin: 0 auto 40px;
  color: #FFF5E1; /* Text Main color */
}

.page-faq__faq-list {
  margin-bottom: 50px;
}

/* FAQ Item Styles */
details.page-faq__faq-item {
  margin-bottom: 15px;
  border-radius: 5px;
  border: 1px solid #F2B544; /* Border color */
  overflow: hidden;
  background: #D32F2F; /* Card BG for item */
  color: #FFF5E1; /* Text Main for item */
}
details.page-faq__faq-item summary.page-faq__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  cursor: pointer;
  user-select: none;
  list-style: none;
  transition: background-color 0.3s ease;
  background-color: #D32F2F; /* Card BG */
}
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: #7A0E0E; /* Deep Red on hover */
}
.page-faq__faq-qtext {
  flex: 1;
  font-size: 18px; /* Slightly larger for questions */
  font-weight: 600;
  line-height: 1.5;
  text-align: left;
  color: #FFD86A; /* Gold color for question text */
}
.page-faq__faq-toggle {
  font-size: 24px;
  font-weight: bold;
  color: #FFCC66; /* Glow color for toggle */
  flex-shrink: 0;
  margin-left: 15px;
  width: 28px;
  text-align: center;
}
details.page-faq__faq-item .page-faq__faq-answer {
  padding: 0 20px 20px;
  background: #7A0E0E; /* Deep Red for answer background */
  border-radius: 0 0 5px 5px;
  color: #FFF5E1; /* Text Main for answer text */
}
.page-faq__faq-answer p {
    margin: 0; /* Remove default paragraph margin within answer */
}
.page-faq__faq-answer a {
    color: #F4D34D; /* Gold for links in answers */
    text-decoration: underline;
}
.page-faq__faq-answer a:hover {
    color: #FFCC66; /* Glow on hover */
}

.page-faq__sub-section-title {
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 600;
  color: #FFCC66; /* Glow color */
  text-align: center;
  margin-top: 50px;
  margin-bottom: 30px;
}

.page-faq__content-image {
  width: 100%;
  height: auto;
  display: block;
  margin: 30px auto;
  border-radius: 8px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  max-width: 800px; /* Ensure images don't stretch too wide */
}

/* CTA Section at bottom */
.page-faq__cta-section {
  text-align: center;
  padding: 50px 0;
  background-color: #7A0E0E; /* Deep Red for CTA background */
  border-radius: 10px;
  margin-top: 50px;
  box-shadow: 0 5px 20px rgba(0,0,0,0.4);
}

.page-faq__cta-title {
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 700;
  color: #FFD86A; /* Gold color */
  margin-bottom: 15px;
}

.page-faq__cta-description {
  font-size: 1.1rem;
  color: #FFF5E1; /* Text Main */
  max-width: 700px;
  margin: 0 auto 30px;
}

.page-faq__cta-buttons {
  display: flex;
  flex-wrap: wrap; /* For mobile responsiveness */
  justify-content: center;
  gap: 20px;
}

.page-faq__btn-primary,
.page-faq__btn-secondary {
  display: inline-block;
  padding: 15px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.1rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  min-width: 220px; /* Ensure buttons have a minimum width */
  text-align: center;
  box-sizing: border-box; /* Crucial for responsive buttons */
  white-space: normal; /* Allow text to wrap */
  word-wrap: break-word; /* Allow long words to break */
}

.page-faq__btn-primary {
  background: linear-gradient(180deg, #FFD86A 0%, #E6B800 100%); /* Button gradient */
  color: #7A0E0E; /* Deep Red for contrast */
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

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

.page-faq__btn-secondary {
  background: transparent;
  color: #FFD86A; /* Gold for text */
  border: 2px solid #F2B544; /* Border color */
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.page-faq__btn-secondary:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
  background-color: rgba(255, 255, 255, 0.1);
}

/* --- Responsive Design --- */
@media (max-width: 1024px) {
  .page-faq__hero-section {
    padding-left: 15px;
    padding-right: 15px;
  }

  .page-faq__main-title {
    font-size: clamp(2rem, 4.5vw, 3rem);
  }

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

  .page-faq__content-section {
    padding: 40px 0;
  }

  .page-faq__container {
    padding: 0 15px;
  }

  .page-faq__section-title {
    font-size: clamp(1.8rem, 3.5vw, 2.5rem);
  }

  .page-faq__section-description {
    font-size: 0.95rem;
  }

  .page-faq__faq-qtext {
    font-size: 17px;
  }

  .page-faq__sub-section-title {
    font-size: clamp(1.4rem, 2.8vw, 2rem);
  }

  .page-faq__cta-title {
    font-size: clamp(1.8rem, 3.5vw, 2.5rem);
  }

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

@media (max-width: 768px) {
  /* HERO 主图区域 */
  .page-faq__hero-section {
    padding-top: 10px; /* Approx 10px top padding, not var(--header-offset) */
    padding-bottom: 30px;
  }
  .page-faq__hero-image img {
    object-fit: contain !important; /* Mobile: contain, not cover */
    aspect-ratio: unset !important; /* Remove aspect ratio */
    max-height: 300px; /* Adjust max height for mobile */
    width: 100% !important; /* Ensure full width */
    height: auto !important; /* Maintain aspect ratio */
  }

  .page-faq__main-title {
    font-size: clamp(1.8rem, 6vw, 2.5rem); /* Smaller H1 for mobile */
  }

  .page-faq__intro-text {
    font-size: 0.95rem;
  }

  /* 通用图片与容器 */
  .page-faq img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    box-sizing: border-box !important;
  }
  .page-faq__container,
  .page-faq__hero-content,
  .page-faq__cta-section {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }
  /* Ensure content images also adhere to mobile rules */
  .page-faq__content-image {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    margin-left: auto;
    margin-right: auto;
  }

  /* 按钮与按钮容器 */
  .page-faq__cta-buttons {
    flex-direction: column !important; /* Stack buttons vertically */
    gap: 15px; /* Spacing between stacked buttons */
    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: 12px 20px !important; /* Adjust padding for mobile buttons */
    font-size: 1rem !important; /* Adjust font size for mobile buttons */
    min-width: unset !important; /* Remove min-width for mobile */
  }

  /* FAQ specific mobile styles */
  details.page-faq__faq-item summary.page-faq__faq-question { padding: 15px; }
  .page-faq__faq-qtext { font-size: 15px; }
  details.page-faq__faq-item .page-faq__faq-answer { padding: 0 15px 15px; }

  /* General section titles and descriptions */
  .page-faq__section-title,
  .page-faq__sub-section-title,
  .page-faq__cta-title {
    text-align: center;
    padding-left: 10px;
    padding-right: 10px;
  }
  .page-faq__section-description,
  .page-faq__cta-description {
    padding-left: 10px;
    padding-right: 10px;
  }
}