/* style/faq.css */
/* body đã padding-top: var(--header-offset)；trang này cấm viết lại biến đó */

/* General styles for page-faq */
.page-faq {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #333333; /* Màu chữ tối mặc định cho nền sáng của body */
  background-color: #f8f8f8; /* Nền sáng cho khu vực nội dung chính */
}

/* Hero Section */
.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; /* Padding trên nhỏ, body xử lý offset header */
  background-color: #017439; /* Màu chính của thương hiệu cho nền hero */
  color: #ffffff; /* Chữ trắng cho nền tối */
  overflow: hidden; /* Đảm bảo nội dung không tràn ra ngoài */
}

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

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

.page-faq__hero-content {
  max-width: 800px;
  z-index: 1;
}

.page-faq__main-title {
  font-size: clamp(2em, 4vw, 2.8em); /* Kích thước font phản hồi */
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 15px;
  color: #ffffff;
}

.page-faq__description {
  font-size: 1.1em;
  margin-bottom: 30px;
  color: #f0f0f0;
}

/* CTA Buttons in Hero */
.page-faq__cta-buttons {
  display: flex;
  gap: 15px;
  justify-content: center;
  flex-wrap: wrap; /* Cho phép các nút xuống dòng trên màn hình nhỏ hơn */
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

.page-faq__btn-primary,
.page-faq__btn-secondary {
  display: inline-block;
  padding: 12px 25px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.3s ease, color 0.3s ease;
  max-width: 100%;
  box-sizing: border-box;
  white-space: normal; /* Cho phép văn bản xuống dòng */
  word-wrap: break-word; /* Ngắt từ dài */
  text-align: center;
}

.page-faq__btn-primary {
  background-color: #C30808; /* Màu đăng ký */
  color: #ffffff; /* BẮT BUỘC CHỮ TRẮNG ĐỂ ĐẢM BẢO ĐỘ TƯƠNG PHẢN WCAG AA, GHI ĐÈ #FFFF00 */
  border: 2px solid #C30808;
}

.page-faq__btn-primary:hover {
  background-color: #a00606;
  border-color: #a00606;
}

.page-faq__btn-secondary {
  background-color: #017439; /* Màu chính của thương hiệu */
  color: #ffffff; /* Chữ trắng */
  border: 2px solid #017439;
}

.page-faq__btn-secondary:hover {
  background-color: #005a2e;
  border-color: #005a2e;
}


/* Main Content Area */
.page-faq__content-area {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
  background-color: #ffffff; /* Nền trắng cho khu vực nội dung */
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  margin-top: -40px; /* Kéo lên một chút vào phần hero */
  position: relative;
  z-index: 2;
  color: #333333; /* Chữ tối cho nền sáng */
}

.page-faq__dark-section {
  background-color: #017439; /* Màu chính của thương hiệu */
  color: #ffffff; /* Chữ trắng */
  padding: 40px 20px;
  border-radius: 8px;
  margin-bottom: 30px;
}

.page-faq__container {
  max-width: 900px;
  margin: 0 auto;
}

.page-faq__section-title {
  font-size: 2.2em;
  font-weight: 700;
  color: #ffffff; /* Chữ trắng cho phần tối */
  margin-bottom: 20px;
  text-align: center;
}

.page-faq__section-intro {
  font-size: 1.1em;
  margin-bottom: 40px;
  text-align: center;
  color: #f0f0f0; /* Chữ xám nhạt cho phần tối */
}

/* FAQ List */
.page-faq__faq-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.page-faq__faq-item {
  background-color: #ffffff; /* Nền trắng cho mục FAQ */
  border-radius: 8px;
  border: 1px solid #e0e0e0;
  overflow: hidden;
  transition: all 0.3s ease;
  color: #333333; /* Chữ tối cho nền sáng */
}

.page-faq__faq-item.active {
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
  border-color: #017439;
}

.page-faq__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 25px;
  font-size: 1.15em;
  font-weight: 600;
  cursor: pointer;
  background-color: #f9f9f9;
  border-bottom: 1px solid #e0e0e0;
  color: #017439; /* Màu chính của thương hiệu cho câu hỏi */
  transition: background-color 0.3s ease;
}

.page-faq__faq-question:hover {
  background-color: #f0f0f0;
}

.page-faq__faq-item.active .page-faq__faq-question {
  background-color: #017439;
  color: #ffffff;
  border-bottom-color: #017439;
}

.page-faq__faq-toggle {
  font-size: 1.5em;
  line-height: 1;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background-color: #e0e0e0;
  color: #333333;
  transition: all 0.3s ease;
}

.page-faq__faq-item.active .page-faq__faq-toggle {
  background-color: #ffffff;
  color: #017439;
}

.page-faq__faq-answer {
  padding: 0 25px;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease-out, padding 0.4s ease-out;
  background-color: #ffffff;
  color: #333333;
}

.page-faq__faq-item.active .page-faq__faq-answer {
  max-height: 500px; /* Điều chỉnh khi cần cho nội dung */
  padding: 20px 25px;
}

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

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

.page-faq__faq-answer a:hover {
  color: #005a2e;
}

.page-faq__faq-image {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 15px 0;
  border-radius: 8px;
  object-fit: cover;
  min-width: 200px; /* Buộc kích thước tối thiểu */
  min-height: 200px; /* Buộc kích thước tối thiểu */
}

/* Call to Action Section */
.page-faq__cta-section {
  background-color: #f8f8f8;
  text-align: center;
  padding: 60px 20px;
  color: #333333;
}

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

.page-faq__cta-description {
  font-size: 1.1em;
  margin-bottom: 30px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

/* Copyright */
.page-faq__copyright {
  text-align: center;
  padding: 20px;
  background-color: #017439;
  color: #ffffff;
  font-size: 0.9em;
  margin-top: 40px;
}

/* Responsive Styles */
@media (max-width: 1024px) {
  .page-faq__hero-image-wrapper {
    margin-bottom: 20px;
  }
  .page-faq__hero-content {
    padding: 0 15px;
  }
  .page-faq__main-title {
    font-size: clamp(1.8em, 5vw, 2.5em);
  }
}

@media (max-width: 768px) {
  .page-faq__hero-section {
    padding: 40px 15px;
    padding-top: 10px !important; /* body xử lý offset header */
  }

  .page-faq__hero-image-wrapper {
    margin-bottom: 15px;
  }
  
  .page-faq__main-title {
    font-size: clamp(1.6em, 6vw, 2.2em);
  }

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

  .page-faq__cta-buttons {
    flex-direction: column; /* Xếp chồng các nút theo chiều dọc trên màn hình di động */
    gap: 10px;
    padding-left: 15px;
    padding-right: 15px;
  }

  .page-faq__btn-primary,
  .page-faq__btn-secondary {
    padding: 10px 20px;
    font-size: 1em;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
  }
  
  .page-faq__content-area,
  .page-faq__cta-section,
  .page-faq__dark-section {
    padding: 30px 15px;
    margin-top: -20px; /* Điều chỉnh kéo lên cho di động */
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .page-faq__container {
    padding-left: 15px;
    padding-right: 15px;
  }

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

  .page-faq__section-intro {
    font-size: 0.95em;
  }

  .page-faq__faq-question {
    padding: 15px 20px;
    font-size: 1em;
  }

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

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

  .page-faq__faq-answer p {
    font-size: 0.95em;
  }

  /* Quy tắc cụ thể cho hình ảnh trên di động */
  .page-faq img {
    max-width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  
  .page-faq__hero-image-wrapper,
  .page-faq__faq-item,
  .page-faq__container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }

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

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

  .page-faq__copyright {
    padding: 15px;
  }
}

/* Đảm bảo hình ảnh trong khu vực nội dung phản hồi và không quá nhỏ */
.page-faq p img,
.page-faq li img,
.page-faq__faq-answer img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 15px auto; /* Căn giữa hình ảnh */
  border-radius: 8px;
  min-width: 200px;
  min-height: 200px;
}

/* Liên kết trong nội dung */
.page-faq a {
  color: #017439;
  text-decoration: none;
  transition: color 0.3s ease;
}

.page-faq a:hover {
  color: #005a2e;
  text-decoration: underline;
}

/* Sửa lỗi tương phản - áp dụng cho nội dung chung nếu cần */
.page-faq__content-area p,
.page-faq__content-area li,
.page-faq__content-area h2,
.page-faq__content-area h3 {
  color: #333333; /* Đảm bảo chữ tối trên nền sáng */
}

.page-faq__dark-section p,
.page-faq__dark-section h2,
.page-faq__dark-section h3 {
  color: #ffffff; /* Đảm bảo chữ trắng trên nền tối */
}

/* Đảm bảo không có filter trên hình ảnh */
.page-faq img {
  filter: none !important;
}

/* Đối với mục đích của lời nhắc, đảm bảo desktop .page-faq__video-container có width: 100% */
.page-faq__video-container {
  width: 100%; /* Quan trọng cho desktop theo lời nhắc */
  max-width: 1200px;
  margin: 0 auto;
  box-sizing: border-box;
}