.page-faq {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #333333; /* Dark text for light body background */
  background-color: #f4f4f4; /* Inherited from shared.css */
}

.page-faq__hero-section {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 20px;
  padding-top: var(--header-offset, 120px); /* Ensure content is below fixed header */
  background-color: #8B0000; /* Auxiliary color for hero background */
  color: #ffffff;
}

.page-faq__hero-container {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.page-faq__hero-title {
  font-size: 42px;
  font-weight: bold;
  margin-bottom: 20px;
  color: #FFD700; /* Gold for main title on dark background */
  line-height: 1.2;
}

.page-faq__hero-description {
  font-size: 18px;
  max-width: 800px;
  margin-bottom: 40px;
  color: #f0f0f0; /* Slightly lighter white for description */
}

.page-faq__hero-buttons {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: center;
  width: 100%;
}

.page-faq__cta-button {
  display: inline-block;
  padding: 15px 40px;
  text-decoration: none;
  border-radius: 5px;
  font-size: 18px;
  font-weight: bold;
  transition: all 0.3s ease;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

.page-faq__cta-button--register {
  background: #FFD700;
  color: #8B0000; /* Darker text for gold button */
  border: 2px solid #FFD700;
}

.page-faq__cta-button--register:hover {
  background: #f0c200;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.page-faq__cta-button--login {
  background: transparent;
  color: #FFD700;
  border: 2px solid #FFD700;
}

.page-faq__cta-button--login:hover {
  background: #FFD700;
  color: #8B0000;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.page-faq__section {
  padding: 60px 20px;
  background-color: #f4f4f4;
}

.page-faq__container {
  max-width: 1000px;
  margin: 0 auto;
  width: 100%;
}

.page-faq__section-title {
  font-size: 32px;
  font-weight: bold;
  color: #8B0000; /* Auxiliary color for section titles */
  text-align: center;
  margin-bottom: 40px;
  padding-bottom: 10px;
  position: relative;
}

.page-faq__section-title::after {
  content: '';
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0;
  width: 80px;
  height: 4px;
  background-color: #FFD700; /* Gold underline */
  border-radius: 2px;
}

.page-faq__faq-list {
  margin-top: 30px;
}

/* FAQ容器样式 */
.page-faq__faq-item {
  margin-bottom: 15px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

/* FAQ默认状态 - 答案隐藏 */
.page-faq__faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), padding 0.4s ease, opacity 0.4s ease;
  padding: 0 20px;
  opacity: 0;
}

/* FAQ展开状态 - 🚨 使用!important và đủ lớn max-height đảm bảo chắc chắn mở rộng */
.page-faq__faq-item.active .page-faq__faq-answer {
  max-height: 2000px !important; /* 🚨 Sử dụng!important đảm bảo ưu tiên, giá trị đủ lớn để chứa mọi nội dung */
  padding: 20px !important;
  opacity: 1;
  background: #ffffff;
  border-radius: 0 0 8px 8px;
}

/* 问题样式 */
.page-faq__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  background: #ffffff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.3s ease, border-color 0.3s ease;
  position: relative;
}

.page-faq__faq-question:hover {
  background: #f9f9f9;
  border-color: #d0d0d0;
}

.page-faq__faq-question:active {
  background: #eeeeee;
}

/* 问题标题样式 */
.page-faq__faq-question h3 {
  margin: 0;
  padding: 0;
  flex: 1;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.5;
  color: #333333;
  pointer-events: none; /* 防止h3标签阻止点击事件 */
}

/* 切换图标 */
.page-faq__faq-toggle {
  font-size: 28px;
  font-weight: bold;
  line-height: 1;
  color: #8B0000; /* Auxiliary color for toggle icon */
  transition: transform 0.3s ease, color 0.3s ease;
  flex-shrink: 0;
  margin-left: 15px;
  pointer-events: none; /* 防止图标阻止点击事件 */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid #FFD700; /* Gold border for toggle */
}

.page-faq__faq-item.active .page-faq__faq-toggle {
  color: #FFD700; /* Gold when active */
  transform: rotate(45deg); /* Plus to X effect */
  border-color: #8B0000; /* Red border when active */
}

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

.page-faq__faq-answer ol, .page-faq__faq-answer ul {
  margin-left: 20px;
  margin-bottom: 10px;
  color: #555555;
}

.page-faq__faq-answer li {
  margin-bottom: 5px;
}

.page-faq__image-content {
  width: 100%;
  height: auto;
  border-radius: 8px;
  margin-top: 20px;
  display: block;
  object-fit: cover;
}

.page-faq__cta-section {
  background-color: #FFD700; /* Main color for CTA section */
  color: #8B0000; /* Dark text for gold background */
  text-align: center;
  padding: 80px 20px;
}

.page-faq__cta-section .page-faq__container {
  max-width: 900px;
}

.page-faq__cta-title {
  font-size: 36px;
  font-weight: bold;
  margin-bottom: 20px;
  color: #8B0000;
}

.page-faq__cta-description {
  font-size: 18px;
  max-width: 700px;
  margin: 0 auto 40px auto;
  color: #333333;
}

.page-faq__cta-buttons {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
  width: 100%;
}

.page-faq__cta-button--primary {
  background: #8B0000;
  color: #FFD700;
  border: 2px solid #8B0000;
}

.page-faq__cta-button--primary:hover {
  background: #a00000;
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.page-faq__cta-button--secondary {
  background: transparent;
  color: #8B0000;
  border: 2px solid #8B0000;
}

.page-faq__cta-button--secondary:hover {
  background: #8B0000;
  color: #FFD700;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* 移动端适配 */
@media (max-width: 768px) {
  .page-faq__hero-section {
    padding-top: var(--header-offset, 120px) !important;
    padding-bottom: 40px;
    padding-left: 15px;
    padding-right: 15px;
  }

  .page-faq__hero-title {
    font-size: 28px;
    margin-bottom: 15px;
  }

  .page-faq__hero-description {
    font-size: 16px;
    margin-bottom: 30px;
  }

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

  .page-faq__cta-button {
    padding: 12px 30px;
    font-size: 16px;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
  }

  .page-faq__section {
    padding: 40px 15px;
  }

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

  .page-faq__faq-question {
    padding: 15px;
    flex-wrap: wrap;
  }
  
  .page-faq__faq-question h3 {
    font-size: 16px;
    margin-bottom: 0;
    width: calc(100% - 40px);
  }
  
  .page-faq__faq-toggle {
    margin-left: 10px;
    width: 28px;
    height: 28px;
    font-size: 24px;
  }
  
  .page-faq__faq-answer {
    padding: 0 15px;
  }
  
  .page-faq__faq-item.active .page-faq__faq-answer {
    padding: 15px !important;
  }

  .page-faq__image-content {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }

  .page-faq__cta-section {
    padding: 60px 15px;
  }

  .page-faq__cta-title {
    font-size: 28px;
  }

  .page-faq__cta-description {
    font-size: 16px;
    margin-bottom: 30px;
  }

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

  .page-faq__container,
  .page-faq__hero-container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 0px;
    padding-right: 0px;
  }

  .page-faq__section .page-faq__container {
    padding-left: 15px;
    padding-right: 15px;
  }
}

/* Ensure all images and their containers are responsive and prevent overflow */
.page-faq img {
  max-width: 100%;
  height: auto;
  display: block;
}

.page-faq__section,
.page-faq__card,
.page-faq__container,
.page-faq__faq-item {
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  box-sizing: border-box;
}

/* Additional contrast for specific elements if needed */
.page-faq__dark-bg {
  background-color: #8B0000;
  color: #FFD700;
}

.page-faq__dark-bg p {
  color: #f0f0f0;
}

.page-faq__cta-section .page-faq__dark-bg {
  background-color: #FFD700;
  color: #8B0000;
}

.page-faq__cta-section .page-faq__dark-bg .page-faq__cta-title {
  color: #8B0000;
}

.page-faq__cta-section .page-faq__dark-bg .page-faq__cta-description {
  color: #333333;
}