/* style/faq.css */

/* 🚨 Cần thiết để đảm bảo nội dung không bị che bởi header cố định */
.page-faq__intro-section {
  padding-top: 120px; /* Khoảng cách cho desktop */
}

/* 🚨 移动端响应式设计 */
@media (max-width: 768px) {
  .page-faq__intro-section {
    padding-top: 100px; /* Khoảng cách cho mobile */
  }
}

.page-faq {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: #f0f0f0; /* Màu chữ nhạt cho nền tối */
  background-color: var(--dark-bg-1); /* Sử dụng biến từ shared.css */
}

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

.page-faq__main-title {
  font-size: 3em;
  color: #FFD700; /* Màu vàng chủ đạo */
  text-align: center;
  margin-bottom: 20px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.page-faq__section-title {
  font-size: 2.2em;
  color: #FFD700;
  text-align: center;
  margin-top: 40px;
  margin-bottom: 15px;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.4);
}

.page-faq__section-description,
.page-faq__description {
  font-size: 1.1em;
  text-align: center;
  margin-bottom: 30px;
  color: #e0e0e0;
}

.page-faq__description a,
.page-faq__section-description a {
  color: #FFD700;
  text-decoration: none;
  font-weight: bold;
}

.page-faq__description a:hover,
.page-faq__section-description a:hover {
  text-decoration: underline;
}

/* Quick Links Section */
.page-faq__quick-links-section {
  background-color: rgba(255, 255, 255, 0.05); /* Nền hơi sáng hơn */
  padding: 60px 0;
  border-radius: 8px;
  margin: 40px auto;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.page-faq__links-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 25px;
  margin-top: 30px;
}

.page-faq__link-card {
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid #FFD700;
  border-radius: 10px;
  padding: 20px;
  text-align: center;
  text-decoration: none;
  color: #ffffff;
  transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.page-faq__link-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 8px 25px rgba(255, 215, 0, 0.3);
  background-color: rgba(255, 215, 0, 0.1);
}

.page-faq__link-card-image {
  width: 100%; /* Đảm bảo hình ảnh chiếm toàn bộ chiều rộng có sẵn */
  max-width: 150px; /* Giới hạn kích thước tối đa của hình ảnh */
  height: auto;
  margin-bottom: 15px;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.page-faq__link-card-image img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

.page-faq__link-card-title {
  font-size: 1.4em;
  color: #FFD700;
  margin: 0;
}

/* FAQ Section */
.page-faq__faq-section {
  padding: 60px 0;
}

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

.page-faq__faq-item {
  margin-bottom: 15px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.page-faq__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  background: rgba(255, 255, 255, 0.08); /* Nền câu hỏi */
  border: 1px solid rgba(255, 215, 0, 0.3);
  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: rgba(255, 255, 255, 0.15);
  border-color: #FFD700;
}

.page-faq__faq-question:active {
  background: rgba(255, 255, 255, 0.2);
}

.page-faq__faq-question h3 {
  margin: 0;
  padding: 0;
  flex: 1;
  font-size: 1.3em;
  font-weight: 600;
  line-height: 1.5;
  color: #FFD700;
  pointer-events: none;
}

.page-faq__faq-toggle {
  font-size: 2.2em;
  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;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
}

.page-faq__faq-item.active .page-faq__faq-toggle {
  color: #ffffff;
  transform: rotate(45deg); /* Biểu tượng '+' xoay thành 'x' */
}

.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: rgba(0, 0, 0, 0.4); /* Nền câu trả lời */
  color: #e0e0e0;
  border-radius: 0 0 8px 8px;
}

.page-faq__faq-item.active .page-faq__faq-answer {
  max-height: 2000px !important;
  padding: 25px !important;
  opacity: 1;
  border: 1px solid rgba(255, 215, 0, 0.3);
  border-top: none;
}

.page-faq__faq-answer p {
  margin-bottom: 15px;
  font-size: 1.05em;
}

.page-faq__faq-answer a {
  color: #FFD700;
  text-decoration: none;
  font-weight: bold;
}

.page-faq__faq-answer a:hover {
  text-decoration: underline;
}

/* Contact Section */
.page-faq__contact-section {
  background-color: rgba(255, 255, 255, 0.05);
  padding: 60px 0;
  border-radius: 8px;
  margin: 40px auto;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  text-align: center;
}

.page-faq__contact-methods p {
  font-size: 1.1em;
  margin-bottom: 10px;
}

.page-faq__contact-methods a {
  color: #FFD700;
  text-decoration: none;
  font-weight: bold;
}

.page-faq__contact-methods a:hover {
  text-decoration: underline;
}

.page-faq__live-chat-link {
  display: inline-block;
  margin-top: 20px;
  padding: 12px 25px;
  background-color: #FFD700;
  color: #1A202C;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.3s ease, transform 0.3s ease;
}

.page-faq__live-chat-link:hover {
  background-color: #e6c200;
  transform: translateY(-2px);
}

/* Buttons */
.page-faq__btn-primary {
  display: inline-block;
  padding: 12px 25px;
  background-color: #FFD700;
  color: #1A202C; /* Chữ tối trên nền vàng */
  border: 2px solid transparent;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.3s ease, transform 0.3s ease, border-color 0.3s ease;
  margin-top: 15px;
}

.page-faq__btn-primary:hover {
  background-color: #e6c200;
  transform: translateY(-2px);
  border-color: #e6c200;
}

.page-faq__btn-secondary {
  display: inline-block;
  padding: 12px 25px;
  background-color: transparent;
  color: #FFD700; /* Chữ vàng trên nền tối */
  border: 2px solid #FFD700;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.3s ease, transform 0.3s ease, color 0.3s ease, border-color 0.3s ease;
  margin-top: 15px;
}

.page-faq__btn-secondary:hover {
  background-color: #FFD700;
  color: #1A202C;
  transform: translateY(-2px);
  border-color: #FFD700;
}

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

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

  .page-faq__faq-question h3 {
    font-size: 1.2em;
  }
}

@media (max-width: 768px) {
  .page-faq__container {
    padding: 15px;
  }

  .page-faq__main-title {
    font-size: 2em;
    margin-bottom: 15px;
  }

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

  .page-faq__description,
  .page-faq__section-description {
    font-size: 1em;
    margin-bottom: 20px;
  }

  .page-faq__quick-links-section,
  .page-faq__faq-section,
  .page-faq__contact-section {
    padding: 40px 0;
    margin: 20px auto;
  }

  .page-faq__links-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }
  
  .page-faq__link-card-image {
    max-width: 120px;
  }

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

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

  .page-faq__faq-question h3 {
    font-size: 1.1em;
  }

  .page-faq__faq-toggle {
    font-size: 1.8em;
    width: 25px;
    height: 25px;
    margin-left: 15px;
  }

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

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

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

  .page-faq__live-chat-link,
  .page-faq__btn-primary,
  .page-faq__btn-secondary {
    padding: 10px 20px;
    font-size: 0.95em;
  }
}

/* 🚨 Mobile image responsive adaptation (MUST BE STRICTLY FOLLOWED) */
@media (max-width: 768px) {
  .page-faq img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  
  .page-faq__section,
  .page-faq__card,
  .page-faq__container,
  .page-faq__quick-links-section,
  .page-faq__faq-section,
  .page-faq__contact-section {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px !important;
    padding-right: 15px !important;
  }
  .page-faq__link-card-image {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
  }
}