/* style/support-faq.css */

/* Thiết lập màu sắc cơ bản dựa trên body background #0d1117 (dark) */
.page-support-faq {
  color: #f0f0f0; /* Chữ màu sáng cho nền tối */
  background-color: #0d1117; /* Nền body từ shared.css */
  font-family: 'Arial', sans-serif;
}

/* Đảm bảo khoảng cách với header cố định */
.page-support-faq__hero-banner {
  padding-top: 120px; /* Khoảng cách cho desktop */
  padding-bottom: 60px;
  background: linear-gradient(135deg, #003366, #1a4d80); /* Nền gradient từ màu chủ đạo */
  color: #ffffff;
  text-align: center;
}

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

.page-support-faq__hero-title {
  font-size: 3.2em;
  margin-bottom: 20px;
  color: #FFD700; /* Màu vàng phụ trợ */
  font-weight: 700;
  line-height: 1.2;
}

.page-support-faq__hero-description {
  font-size: 1.1em;
  line-height: 1.6;
  max-width: 800px;
  margin: 0 auto 30px auto;
}

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

.page-support-faq__btn-primary,
.page-support-faq__btn-secondary {
  display: inline-block;
  padding: 12px 28px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1.05em;
  transition: all 0.3s ease;
  border: 2px solid transparent;
  cursor: pointer;
}

.page-support-faq__btn-primary {
  background: #FFD700; /* Màu vàng */
  color: #003366; /* Chữ màu xanh đậm */
  border-color: #FFD700;
}

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

.page-support-faq__btn-secondary {
  background: transparent;
  color: #FFD700; /* Chữ màu vàng */
  border-color: #FFD700;
}

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

.page-support-faq__section-title {
  font-size: 2.5em;
  color: #FFD700; /* Màu vàng phụ trợ */
  text-align: center;
  margin-bottom: 50px;
  font-weight: 700;
  line-height: 1.2;
}

.page-support-faq__faq-section {
  padding: 60px 0;
  background-color: #0d1117;
}

.page-support-faq__faq-list {
  max-width: 900px;
  margin: 0 auto;
}

.page-support-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.2);
}

.page-support-faq__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 25px;
  background: #1a2a3a; /* Nền câu hỏi tối hơn */
  color: #ffffff;
  border-radius: 8px;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.3s ease, border-color 0.3s ease;
  position: relative;
}

.page-support-faq__faq-question:hover {
  background: #2a3d50;
  border-color: #FFD700;
}

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

.page-support-faq__faq-toggle {
  font-size: 28px;
  font-weight: bold;
  line-height: 1;
  color: #FFD700; /* Màu vàng cho dấu +/-
  transition: transform 0.3s ease, color 0.3s ease;
  flex-shrink: 0;
  margin-left: 15px;
  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;
}

.page-support-faq__faq-item.active .page-support-faq__faq-toggle {
  color: #ffffff;
  transform: rotate(45deg); /* Xoay dấu + thành X hoặc - */
}

.page-support-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; /* Màu chữ sáng hơn cho câu trả lời */
  background: #12202e; /* Nền câu trả lời nhẹ hơn */
  border-radius: 0 0 8px 8px;
}

/* FAQ展开状态 - 🚨 使用!important和足够大的max-height确保一定能展开 */
.page-support-faq__faq-item.active .page-support-faq__faq-answer {
  max-height: 2000px !important; /* Giá trị đủ lớn để chứa mọi nội dung */
  padding: 20px 25px !important;
  opacity: 1;
}

.page-support-faq__faq-answer p {
  margin-bottom: 15px;
  line-height: 1.7;
  font-size: 1em;
}

.page-support-faq__faq-answer p:last-child {
  margin-bottom: 0;
}

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

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

.page-support-faq__image-wrapper {
  margin: 20px 0;
  text-align: center;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.page-support-faq__image-wrapper img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
  object-fit: cover;
}

.page-support-faq__cta-section {
  text-align: center;
  padding: 60px 0;
  margin-top: 60px;
  background: #003366;
  border-radius: 12px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.page-support-faq__cta-title {
  font-size: 2em;
  color: #FFD700;
  margin-bottom: 20px;
  font-weight: 700;
}

.page-support-faq__cta-description {
  font-size: 1.1em;
  color: #e0e0e0;
  max-width: 700px;
  margin: 0 auto 30px auto;
  line-height: 1.6;
}

.page-support-faq__related-articles-section {
  padding: 60px 0;
  background-color: #0d1117;
}

.page-support-faq__articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  max-width: 1200px;
  margin: 0 auto;
}

.page-support-faq__article-card {
  background: #1a2a3a;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid rgba(255, 215, 0, 0.2);
}

.page-support-faq__article-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.page-support-faq__article-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.page-support-faq__article-image {
  width: 100%;
  height: 200px;
  overflow: hidden;
}

.page-support-faq__article-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.page-support-faq__article-title {
  font-size: 1.4em;
  color: #FFD700;
  margin: 20px 20px 10px 20px;
  font-weight: 600;
  line-height: 1.4;
}

.page-support-faq__article-excerpt {
  font-size: 0.95em;
  color: #e0e0e0;
  margin: 0 20px 20px 20px;
  line-height: 1.6;
}

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

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

@media (max-width: 768px) {
  .page-support-faq__hero-banner {
    padding-top: 100px; /* Khoảng cách cho mobile */
    padding-bottom: 40px;
  }

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

  .page-support-faq__hero-description {
    font-size: 1em;
  }

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

  .page-support-faq__btn-primary,
  .page-support-faq__btn-secondary {
    width: 80%;
    max-width: 300px;
    margin: 0 auto;
    font-size: 1em;
    padding: 10px 20px;
  }

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

  .page-support-faq__faq-section,
  .page-support-faq__related-articles-section {
    padding: 40px 0;
  }

  .page-support-faq__faq-list {
    max-width: 100%;
    padding: 0 15px;
  }

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

  .page-support-faq__faq-question h3 {
    font-size: 1em;
    width: calc(100% - 40px);
  }

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

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

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

  .page-support-faq__image-wrapper {
    margin: 15px 0;
  }

  .page-support-faq__cta-section {
    padding: 40px 20px;
    margin-top: 40px;
  }

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

  .page-support-faq__cta-description {
    font-size: 0.95em;
    margin-bottom: 25px;
  }

  .page-support-faq__articles-grid {
    gap: 20px;
    padding: 0 15px;
  }

  .page-support-faq__article-title {
    font-size: 1.2em;
    margin: 15px 15px 8px 15px;
  }

  .page-support-faq__article-excerpt {
    font-size: 0.9em;
    margin: 0 15px 15px 15px;
  }

  /* 🚨 Mobile image responsive adaptation (MUST include) */
  .page-support-faq img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }

  .page-support-faq__hero-banner,
  .page-support-faq__faq-section,
  .page-support-faq__related-articles-section,
  .page-support-faq__cta-section,
  .page-support-faq__container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }
}