/* style/faq.css */
/* 页面完整样式代码 - 注意：所有选择器必须使用BEM命名规则（双下划线__连接） */

:root {
  --primary-color: #F2C14E;
  --secondary-color: #FFD36B;
  --card-bg: #111111;
  --body-bg: #0A0A0A;
  --text-main: #FFF6D6;
  --border-color: #3A2A12;
  --glow-color: #FFD36B;
  --button-gradient: linear-gradient(180deg, #FFD86A 0%, #DDA11D 100%);
}

.page-faq {
  font-family: 'Arial', sans-serif;
  color: var(--text-main); /* Sử dụng màu chữ chính */
  background-color: var(--body-bg); /* Sử dụng màu nền chính */
  line-height: 1.6;
}

.page-faq__hero-section {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 20px;
  padding-top: 10px; /* Nhỏ hơn var(--header-offset) */
  background-color: var(--card-bg);
  border-bottom: 1px solid var(--border-color);
}

.page-faq__hero-container {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.page-faq__hero-image {
  width: 100%;
  margin-bottom: 30px;
}

.page-faq__hero-image img {
  width: 100%;
  height: auto;
  max-width: 100%;
  display: block;
  border-radius: 8px;
  object-fit: cover;
  min-width: 200px;
  min-height: 200px;
}

.page-faq__hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  width: 100%;
  padding: 0 20px;
}

.page-faq__main-title {
  font-size: 3em;
  font-weight: bold;
  margin-bottom: 20px;
  color: var(--secondary-color);
  line-height: 1.2;
  text-shadow: 0 0 8px rgba(255, 211, 107, 0.4);
}

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

.page-faq__cta-button {
  display: inline-block;
  padding: 15px 40px;
  background: var(--button-gradient);
  color: #0A0A0A; /* Màu chữ đen để tương phản với nền vàng */
  text-decoration: none;
  border-radius: 5px;
  font-size: 18px;
  font-weight: bold;
  margin-top: 20px;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(242, 193, 78, 0.4);
}

.page-faq__cta-button:hover {
  opacity: 0.9;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(242, 193, 78, 0.6);
}

.page-faq__cta-button--small {
  padding: 12px 30px;
  font-size: 16px;
}

.page-faq__content-area {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
  background-color: var(--body-bg);
}

.page-faq__section-title {
  font-size: 2.5em;
  color: var(--primary-color);
  text-align: center;
  margin-bottom: 40px;
  text-shadow: 0 0 5px rgba(242, 193, 78, 0.3);
}

.page-faq__faq-category {
  margin-bottom: 40px;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  overflow: hidden;
  background-color: var(--card-bg);
  padding: 20px;
}

.page-faq__category-title {
  font-size: 1.8em;
  color: var(--secondary-color);
  margin-bottom: 25px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-color);
}

/* FAQ item styles */
details.page-faq__faq-item {
  margin-bottom: 15px;
  border-radius: 5px;
  border: 1px solid var(--border-color);
  overflow: hidden;
  background: #1a1a1a; /* Nền tối cho từng mục FAQ */
}

details.page-faq__faq-item summary.page-faq__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  cursor: pointer;
  user-select: none;
  list-style: none;
  transition: background-color 0.3s ease;
  color: var(--text-main);
  font-weight: 600;
}

details.page-faq__faq-item summary.page-faq__faq-question::-webkit-details-marker {
  display: none;
}

details.page-faq__faq-item summary.page-faq__faq-question:hover {
  background: #2a2a2a;
}

.page-faq__faq-qtext {
  flex: 1;
  font-size: 1.1em;
  line-height: 1.5;
  text-align: left;
  color: var(--text-main);
}

.page-faq__faq-toggle {
  font-size: 24px;
  font-weight: bold;
  color: var(--primary-color);
  flex-shrink: 0;
  margin-left: 15px;
  width: 28px;
  text-align: center;
}

details.page-faq__faq-item[open] .page-faq__faq-toggle {
  color: var(--secondary-color);
}

details.page-faq__faq-item .page-faq__faq-answer {
  padding: 0 20px 20px;
  background: #222222; /* Nền tối hơn cho câu trả lời */
  border-radius: 0 0 5px 5px;
  color: var(--text-main);
}

.page-faq__faq-answer p {
  margin-bottom: 15px;
  color: var(--text-main);
}

.page-faq__image-in-answer {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 15px 0;
  border-radius: 5px;
  min-width: 200px;
  min-height: 200px;
  object-fit: cover;
}

.page-faq__answer-cta {
  display: inline-block;
  padding: 8px 15px;
  background: var(--primary-color);
  color: #0A0A0A; /* Màu chữ đen để tương phản với nền vàng */
  text-decoration: none;
  border-radius: 4px;
  font-size: 0.9em;
  font-weight: bold;
  margin-top: 10px;
  transition: background-color 0.3s ease;
}

.page-faq__answer-cta:hover {
  background: var(--secondary-color);
}

.page-faq__final-cta {
  text-align: center;
  margin-top: 60px;
  padding: 30px;
  background-color: var(--card-bg);
  border-radius: 10px;
  border: 1px solid var(--border-color);
}

.page-faq__final-cta p {
  font-size: 1.2em;
  margin-bottom: 25px;
  color: var(--text-main);
}

/* 🚨 移动端响应式设计（必须严格遵守） */
@media (max-width: 768px) {
  .page-faq {
    font-size: 16px;
    line-height: 1.6;
  }

  .page-faq__hero-section {
    padding-top: 10px !important;
    padding-bottom: 40px;
    padding-left: 15px;
    padding-right: 15px;
  }

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

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

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

  .page-faq__cta-button {
    padding: 12px 30px;
    font-size: 16px;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    padding-left: 15px;
    padding-right: 15px;
  }

  .page-faq__content-area {
    padding: 20px 15px;
  }

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

  .page-faq__faq-category {
    padding: 15px;
  }

  .page-faq__category-title {
    font-size: 1.5em;
    margin-bottom: 20px;
  }

  details.page-faq__faq-item summary.page-faq__faq-question {
    padding: 15px;
  }

  .page-faq__faq-qtext {
    font-size: 1em;
  }

  .page-faq__faq-toggle {
    font-size: 20px;
    width: 24px;
    height: 24px;
  }

  details.page-faq__faq-item .page-faq__faq-answer {
    padding: 0 15px 15px;
  }

  .page-faq__image-in-answer {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }

  .page-faq__answer-cta {
    font-size: 0.85em;
    padding: 6px 12px;
  }

  .page-faq__final-cta {
    margin-top: 40px;
    padding: 20px;
  }

  .page-faq__final-cta p {
    font-size: 1.1em;
    margin-bottom: 20px;
  }

  /* Tất cả các container chứa ảnh hoặc nút */
  .page-faq__hero-container,
  .page-faq__faq-category,
  .page-faq__final-cta {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }
}