/* style/faq.css */
.page-faq {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: #ffffff; /* Default text color for dark body background */
  background-color: transparent; /* Body background from shared.css */
}

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

.page-faq__hero-intro-section {
  padding: 120px 0 60px; /* Adjusted padding for fixed header */
  background: linear-gradient(135deg, var(--dark-bg-1), var(--primary-color-darker));
  text-align: center;
}

.page-faq__main-title {
  font-size: 3.2em;
  color: var(--secondary-color);
  margin-bottom: 20px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
  line-height: 1.2;
}

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

.page-faq__highlight-text {
  color: var(--secondary-color);
  font-weight: bold;
}

.page-faq__cta-group {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

.page-faq__btn-primary,
.page-faq__btn-secondary {
  display: inline-block;
  padding: 15px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  transition: all 0.3s ease;
  font-size: 1.1em;
  border: 2px solid transparent;
}

.page-faq__btn-primary {
  background: var(--secondary-color);
  color: var(--dark-bg-1);
}

.page-faq__btn-primary:hover {
  background: var(--secondary-color-darker);
  transform: translateY(-3px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

.page-faq__btn-secondary {
  background: transparent;
  color: var(--secondary-color);
  border-color: var(--secondary-color);
}

.page-faq__btn-secondary:hover {
  background: var(--secondary-color);
  color: var(--dark-bg-1);
  transform: translateY(-3px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

.page-faq__questions-section {
  padding: 60px 0;
  background-color: var(--dark-bg-2);
}

.page-faq__section-title {
  font-size: 2.5em;
  color: var(--secondary-color);
  text-align: center;
  margin-bottom: 50px;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.2);
}

/* FAQ容器样式 */
.page-faq__faq-item {
  margin-bottom: 15px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  background-color: #1a1a1a; /* Darker background for item */
}

/* 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 25px;
  opacity: 0;
  color: #e0e0e0;
  font-size: 1.05em;
}

/* FAQ展开状态 - 🚨 使用!important和足够大的max-height đảm bảo一定能展开 */
.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 25px !important;
  opacity: 1;
  background: #2a2a2a; /* Slightly lighter background for answer */
  border-radius: 0 0 8px 8px;
}

.page-faq__faq-answer p {
    margin-bottom: 1em;
}

.page-faq__faq-answer ol,
.page-faq__faq-answer ul {
    margin-left: 20px;
    margin-bottom: 1em;
}

.page-faq__faq-answer li {
    margin-bottom: 0.5em;
}

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

.page-faq__faq-question:hover {
  background: #444444;
  border-color: var(--secondary-color);
}

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

/* 问题标题样式 */
.page-faq__faq-question h3 {
  margin: 0;
  padding: 0;
  flex: 1;
  font-size: 1.2em;
  font-weight: 600;
  line-height: 1.5;
  pointer-events: none; /* Ngăn h3 chặn sự kiện click */
  color: #ffffff;
}

/* 切换图标 */
.page-faq__faq-toggle {
  font-size: 28px;
  font-weight: bold;
  line-height: 1;
  color: var(--secondary-color);
  transition: transform 0.3s ease, color 0.3s ease;
  flex-shrink: 0;
  margin-left: 20px;
  pointer-events: none; /* Ngăn biểu tượng chặn sự kiện click */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
}

.page-faq__faq-item.active .page-faq__faq-toggle {
  color: var(--secondary-color-darker);
  transform: rotate(45deg); /* Change to X or rotate */
}

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

.page-faq__link-inline:hover {
  color: var(--secondary-color-darker);
  text-decoration: underline;
}

.page-faq__image-content {
  width: 100%;
  height: auto;
  max-width: 100%;
  display: block;
  border-radius: 8px;
  margin-top: 20px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.page-faq__contact-cta-section {
  padding: 80px 0;
  background: linear-gradient(45deg, var(--primary-color-darker), var(--dark-bg-1));
  text-align: center;
}

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

/* 移动端响应式设计 */
@media (max-width: 1024px) {
  .page-faq__main-title {
    font-size: 2.8em;
  }

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

@media (max-width: 768px) {
  .page-faq__hero-intro-section {
    padding: 100px 0 40px; /* Adjusted padding for mobile fixed header */
  }

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

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

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

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

  .page-faq__btn-primary,
  .page-faq__btn-secondary {
    width: 100%;
    padding: 12px 20px;
    font-size: 1em;
  }

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

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

  .page-faq__faq-question {
    padding: 15px 20px;
    flex-wrap: wrap;
  }
  
  .page-faq__faq-question h3 {
    font-size: 1.1em;
    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 20px;
    font-size: 0.95em;
  }
  
  .page-faq__faq-item.active .page-faq__faq-answer {
    padding: 15px 20px !important;
  }

  .page-faq__contact-cta-section {
    padding: 50px 0;
  }

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

  /* Tất cả hình ảnh phải thích ứng với màn hình di động */
  .page-faq img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  
  .page-faq__hero-intro-section .page-faq__container,
  .page-faq__questions-section .page-faq__container,
  .page-faq__contact-cta-section .page-faq__container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }
}