/* style/faq.css */
.page-faq {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
}

.page-faq__hero-intro {
  padding-top: 120px; /* Adjust for fixed header */
  padding-bottom: 60px;
  text-align: center;
  background: #1A202C;
  color: #ffffff;
  position: relative;
  overflow: hidden;
}

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

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

.page-faq__intro-text {
  font-size: 1.1em;
  margin-bottom: 30px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.page-faq__intro-text a {
  color: #FFD700;
  text-decoration: underline;
}

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

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

.page-faq__btn--primary {
  background: #FFD700;
  color: #1A202C;
  border-color: #FFD700;
}

.page-faq__btn--primary:hover {
  background: #e6c200;
  border-color: #e6c200;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.page-faq__btn--secondary {
  background: #1A202C;
  color: #FFD700;
  border-color: #FFD700;
}

.page-faq__btn--secondary:hover {
  background: #2c3a4e;
  border-color: #e6c200;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.page-faq__hero-image-wrapper, .page-faq__support-image-wrapper {
  margin-top: 40px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.page-faq__hero-image, .page-faq__support-image {
  max-width: 800px;
  width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
  object-fit: cover;
}

.page-faq__faq-list-section {
  padding: 60px 0;
  background: #f8f9fa; /* Light background for FAQ items */
  color: #333333;
}

.page-faq__section-title {
  font-size: 2.2em;
  color: #1A202C;
  text-align: center;
  margin-bottom: 40px;
  position: relative;
  padding-bottom: 15px;
}

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

.page-faq__faq-category {
  margin-bottom: 40px;
}

.page-faq__category-title {
  font-size: 1.8em;
  color: #1A202C;
  margin-bottom: 25px;
  border-bottom: 2px solid #e0e0e0;
  padding-bottom: 10px;
}

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

/* 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 15px;
  opacity: 0;
  background: #f9f9f9;
  color: #333333;
  font-size: 1em;
}

/* FAQ展开状态 - 🚨 使用!important và đủ lớn max-height để đảm bảo có thể 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 15px !important;
  opacity: 1;
  background: #f9f9f9;
  border-radius: 0 0 5px 5px;
}

/* Vấn đề phong cách */
.page-faq__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 5px;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.3s ease, border-color 0.3s ease;
  position: relative;
}

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

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

/* Vấn đề tiêu đề phong cách */
.page-faq__faq-question h3 {
  margin: 0;
  padding: 0;
  flex: 1;
  font-size: 1.1em;
  font-weight: 600;
  line-height: 1.5;
  color: #1A202C;
  pointer-events: none; /* Ngăn chặn thẻ h3 chặn sự kiện nhấp */
}

/* Chuyển đổi biểu tượng */
.page-faq__faq-toggle {
  font-size: 24px;
  font-weight: bold;
  line-height: 1;
  color: #666;
  transition: transform 0.3s ease, color 0.3s ease;
  flex-shrink: 0;
  margin-left: 15px;
  pointer-events: none; /* Ngăn chặn biểu tượng chặn sự kiện nhấp */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
}

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

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

.page-faq__faq-answer a {
  color: #1A202C;
  text-decoration: underline;
}

.page-faq__contact-promo {
  padding: 60px 0;
  background: #1A202C;
  color: #ffffff;
  text-align: center;
}

.page-faq__text-center {
  font-size: 1.1em;
  margin-bottom: 30px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.page-faq__text-center a {
  color: #FFD700;
  text-decoration: underline;
}

.page-faq__copyright {
  padding: 20px 0;
  text-align: center;
  font-size: 0.9em;
  background: #1A202C;
  color: #ffffff;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Responsive Design */
@media (max-width: 1024px) {
  .page-faq__main-title {
    font-size: 2.8em;
  }

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

  .page-faq__category-title {
    font-size: 1.6em;
  }

  .page-faq__btn {
    padding: 12px 25px;
    font-size: 1em;
  }
  
  .page-faq__hero-image, .page-faq__support-image {
    max-width: 600px;
  }
}

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

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

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

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

  .page-faq__btn {
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
    padding: 12px 20px;
    font-size: 0.95em;
  }

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

  .page-faq__category-title {
    font-size: 1.4em;
  }

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

  .page-faq__faq-list-section, .page-faq__contact-promo {
    padding: 40px 0;
  }

  .page-faq__hero-image, .page-faq__support-image {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    border-radius: 8px;
  }

  .page-faq__hero-image-wrapper,
  .page-faq__support-image-wrapper,
  .page-faq__container,
  .page-faq__faq-list-section,
  .page-faq__contact-promo {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }
  .page-faq img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
}

@media (max-width: 480px) {
  .page-faq__main-title {
    font-size: 1.8em;
  }

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

  .page-faq__category-title {
    font-size: 1.2em;
  }

  .page-faq__btn {
    font-size: 0.9em;
    padding: 10px 15px;
  }
}