/* style/faq.css */

/* Thiết lập màu sắc và font chữ chung cho trang FAQ */
.page-faq {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  background-color: var(--secondary-color); /* Nền tối */
  color: #ffffff; /* Chữ sáng trên nền tối */
  padding-bottom: 60px;
}

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

/* Phần giới thiệu đầu trang */
.page-faq__intro-section {
  padding: 120px 0 60px 0; /* Đảm bảo khoảng cách với header cố định */
  background-color: var(--secondary-color);
  position: relative;
  overflow: hidden;
}

.page-faq__intro-container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 40px;
}

.page-faq__intro-content {
  flex: 1;
  min-width: 300px;
  padding-right: 20px;
}

.page-faq__main-title {
  font-size: 38px;
  font-weight: 700;
  color: #FFD700; /* Màu vàng thương hiệu */
  margin-bottom: 20px;
  line-height: 1.2;
}

.page-faq__description {
  font-size: 17px;
  margin-bottom: 15px;
  color: #f0f0f0;
}

.page-faq__intro-image {
  flex: 1;
  min-width: 400px;
  text-align: center;
}

.page-faq__intro-image img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
  display: block;
  margin: 0 auto;
}

/* Phần danh sách FAQ */
.page-faq__faq-list-section {
  padding: 60px 0;
  background-color: var(--secondary-color);
}

.page-faq__section-title {
  font-size: 32px;
  font-weight: 700;
  color: #FFD700;
  text-align: center;
  margin-bottom: 40px;
  position: relative;
}

.page-faq__section-title::after {
  content: '';
  display: block;
  width: 80px;
  height: 4px;
  background: #FFD700;
  margin: 15px auto 0 auto;
  border-radius: 2px;
}

/* FAQ item styles */
.page-faq__faq-item {
  margin-bottom: 15px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 215, 0, 0.3);
}

.page-faq__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 25px;
  background: #1A1A2E; /* Nền tối */
  color: #FFD700; /* Chữ vàng */
  border-bottom: 1px solid rgba(255, 215, 0, 0.2);
  cursor: pointer;
  user-select: none;
  transition: background-color 0.3s ease, border-color 0.3s ease;
  position: relative;
}

.page-faq__faq-question:hover {
  background: #2a2a4a; /* Nền hơi sáng hơn khi hover */
  border-color: #FFD700;
}

.page-faq__faq-question h3 {
  margin: 0;
  padding: 0;
  flex: 1;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.5;
  pointer-events: none; /* Ngăn h3 chặn sự kiện click */
  color: #FFD700; /* Chữ vàng */
}

.page-faq__faq-toggle {
  font-size: 28px;
  font-weight: bold;
  line-height: 1;
  color: #FFD700;
  transition: transform 0.3s ease, color 0.3s ease;
  flex-shrink: 0;
  margin-left: 20px;
  pointer-events: none; /* Ngăn icon chặn sự kiện click */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 2px solid #FFD700;
  border-radius: 50%;
}

.page-faq__faq-item.active .page-faq__faq-toggle {
  color: #ffffff;
  transform: rotate(45deg); /* Dấu + xoay thành X, hoặc có thể dùng - */
  border-color: #ffffff;
  background-color: #FFD700;
}

.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;
  background: #2a2a4a; /* Nền hơi sáng hơn cho câu trả lời */
  color: #f0f0f0; /* Chữ sáng */
  border-radius: 0 0 8px 8px;
}

.page-faq__faq-item.active .page-faq__faq-answer {
  max-height: 2000px !important; /* Đảm bảo đủ cao cho mọi nội dung */
  padding: 20px 25px !important;
  opacity: 1;
}

.page-faq__faq-answer p {
  margin-bottom: 10px;
  font-size: 16px;
  color: #f0f0f0;
}

.page-faq__faq-answer ul,
.page-faq__faq-answer ol {
  margin-left: 20px;
  margin-bottom: 10px;
  list-style-type: disc;
  color: #f0f0f0;
}

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

.page-faq__faq-answer strong {
  color: #FFD700;
}

/* Call to Action Section */
.page-faq__cta-section {
  padding: 80px 0;
  background-color: #1A1A2E; /* Nền tối */
  text-align: center;
}

.page-faq__cta-container {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.page-faq__cta-title {
  font-size: 38px;
  font-weight: 700;
  color: #FFD700;
  margin-bottom: 25px;
  line-height: 1.2;
}

.page-faq__cta-description {
  font-size: 18px;
  color: #f0f0f0;
  margin-bottom: 40px;
  max-width: 800px;
}

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

/* Button Styles */
.page-faq__btn-primary,
.page-faq__btn-secondary {
  display: inline-block;
  padding: 15px 30px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 700;
  font-size: 18px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.page-faq__btn-primary {
  background-color: #FFD700;
  color: #1A1A2E;
  border: 2px solid #FFD700;
}

.page-faq__btn-primary:hover {
  background-color: #e6c200;
  color: #0d0d1a;
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

.page-faq__btn-secondary {
  background-color: transparent;
  color: #FFD700;
  border: 2px solid #FFD700;
}

.page-faq__btn-secondary:hover {
  background-color: #FFD700;
  color: #1A1A2E;
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

/* Link styles within content */
.page-faq__link {
  color: #FFD700;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 215, 0, 0.5);
  transition: color 0.3s ease, border-color 0.3s ease;
}

.page-faq__link:hover {
  color: #e6c200;
  border-color: #e6c200;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .page-faq__intro-container {
    flex-direction: column;
    text-align: center;
  }

  .page-faq__intro-content {
    padding-right: 0;
  }

  .page-faq__main-title {
    font-size: 32px;
  }

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

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

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

  .page-faq__intro-section {
    padding: 100px 0 40px 0; /* Giảm padding-top cho mobile */
  }

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

  .page-faq__description {
    font-size: 15px;
  }

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

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

  .page-faq__faq-question h3 {
    font-size: 16px;
  }

  .page-faq__faq-toggle {
    font-size: 24px;
    width: 28px;
    height: 28px;
    margin-left: 15px;
  }

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

  .page-faq__faq-item.active .page-faq__faq-answer {
    padding: 15px 20px !important;
  }

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

  .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__btn-primary,
  .page-faq__btn-secondary {
    width: 100%;
    max-width: 300px;
    font-size: 16px;
    padding: 12px 25px;
  }
  
  /* 移动端图片响应式适配强制要求 */
  .page-faq img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    box-sizing: border-box !important;
  }
  
  .page-faq__intro-section,
  .page-faq__faq-list-section,
  .page-faq__cta-section,
  .page-faq__container,
  .page-faq__intro-container,
  .page-faq__intro-content,
  .page-faq__intro-image {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }
  .page-faq__intro-section {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
}

/* Contrast Fixes */
.page-faq__contrast-fix {
  background: #ffffff !important;
  color: #333333 !important;
  border: 1px solid #e0e0e0 !important;
}

.page-faq__text-contrast-fix {
  color: #333333 !important;
  text-shadow: none !important;
}