/* style/faq.css */

/* body đã có padding-top: var(--header-offset) từ shared.css, không thêm vào đây để tránh trùng lặp */

.page-faq {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #ffffff; /* Sẽ được ghi đè nếu body là nền sáng, nhưng mặc định body là đen nên dùng trắng */
  background-color: transparent; /* body đã là #000000, nên để transparent hoặc không set */
}

.page-faq__hero-section {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  padding-top: 10px; /* Nhỏ hơn var(--header-offset) */
  text-align: center;
  color: #ffffff;
  background-color: #000000; /* Đảm bảo nền tối cho text trắng */
}

.page-faq__hero-image {
  width: 100%;
  height: auto;
  max-height: 675px;
  object-fit: cover;
  display: block;
  margin-bottom: 20px; /* Khoảng cách giữa ảnh và nội dung */
}

.page-faq__hero-content {
  max-width: 900px;
  margin: 0 auto;
  z-index: 1;
}

.page-faq__main-title {
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: bold;
  margin-bottom: 15px;
  color: #ffffff;
  line-height: 1.2;
}

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

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

.page-faq__btn-primary,
.page-faq__btn-secondary,
.page-faq__btn-link {
  display: inline-block;
  padding: 12px 25px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.3s ease, color 0.3s ease;
  box-sizing: border-box;
  text-align: center;
  white-space: normal; /* Cho phép xuống dòng */
  word-wrap: break-word; /* Đảm bảo từ dài xuống dòng */
}

.page-faq__btn-primary {
  background-color: #26A9E0;
  color: #ffffff;
  border: 2px solid #26A9E0;
}

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

.page-faq__btn-secondary {
  background-color: #EA7C07; /* Màu cam cho nút đăng nhập */
  color: #ffffff;
  border: 2px solid #EA7C07;
}

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

.page-faq__btn-link {
  background-color: transparent;
  color: #26A9E0;
  border: 2px solid #26A9E0;
  padding: 8px 15px;
}

.page-faq__btn-link:hover {
  background-color: #26A9E0;
  color: #ffffff;
}

.page-faq__section {
  padding: 60px 20px;
  background-color: #000000; /* Nền đen */
  color: #ffffff;
}

.page-faq__section--dark {
  background-color: #1a1a1a; /* Nền hơi tối hơn để tạo điểm nhấn */
  color: #ffffff;
}

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

.page-faq__section-title {
  font-size: 2.5rem;
  font-weight: bold;
  margin-bottom: 20px;
  text-align: center;
  color: #26A9E0; /* Màu thương hiệu cho tiêu đề */
}

.page-faq__section-intro {
  font-size: 1.1rem;
  text-align: center;
  margin-bottom: 40px;
  color: #f0f0f0;
}

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

.page-faq__faq-category-title {
  font-size: 1.8rem;
  font-weight: bold;
  margin-top: 40px;
  margin-bottom: 20px;
  color: #ffffff;
  border-bottom: 2px solid #26A9E0;
  padding-bottom: 10px;
}

.page-faq__faq-item {
  background-color: #0d0d0d; /* Nền tối cho từng mục FAQ */
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
  color: #ffffff;
  border: 1px solid #26A9E0;
}

.page-faq__faq-item summary {
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  cursor: pointer;
  font-weight: bold;
  font-size: 1.15rem;
  color: #ffffff;
  background-color: #222222;
}

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

.page-faq__faq-qtext {
  flex-grow: 1;
}

.page-faq__faq-toggle {
  font-size: 1.5rem;
  line-height: 1;
  margin-left: 15px;
  color: #26A9E0;
}

.page-faq__faq-item[open] .page-faq__faq-toggle {
  content: '−';
}

.page-faq__faq-answer {
  padding: 0 20px 20px;
  font-size: 1rem;
  color: #f0f0f0;
}

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

.page-faq__faq-answer ul,
.page-faq__faq-answer ol {
  margin-left: 20px;
  margin-bottom: 10px;
}

.page-faq__faq-answer li {
  margin-bottom: 5px;
}

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

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

.page-faq__card {
  background-color: #0d0d0d;
  border-radius: 10px;
  padding: 25px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  text-align: center;
  color: #ffffff;
  border: 1px solid #26A9E0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.page-faq__card-image {
  width: 100%;
  height: 200px; /* Đảm bảo chiều cao tối thiểu 200px */
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 20px;
  display: block; /* ensure no extra space below img */
}

.page-faq__card-title {
  font-size: 1.4rem;
  font-weight: bold;
  margin-bottom: 15px;
  color: #26A9E0;
}

.page-faq__card-description {
  font-size: 1rem;
  color: #f0f0f0;
  margin-bottom: 20px;
  flex-grow: 1;
}

.page-faq__cta-section {
  background-color: #26A9E0;
  padding: 40px;
  border-radius: 10px;
  text-align: center;
  margin-top: 60px;
  color: #ffffff;
}

.page-faq__cta-title {
  font-size: 2rem;
  font-weight: bold;
  margin-bottom: 15px;
  color: #ffffff;
}

.page-faq__cta-description {
  font-size: 1.1rem;
  margin-bottom: 30px;
  color: #f0f0f0;
}

.page-faq__related-articles {
  background-color: #000000;
  padding: 60px 20px;
  color: #ffffff;
}

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

.page-faq__blog-card {
  background-color: #0d0d0d;
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  color: #ffffff;
  border: 1px solid #26A9E0;
  display: flex;
  flex-direction: column;
}

.page-faq__blog-image {
  width: 100%;
  height: 180px; /* Đảm bảo chiều cao tối thiểu 200px */
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 15px;
  display: block;
}

.page-faq__blog-title {
  font-size: 1.2rem;
  font-weight: bold;
  margin-bottom: 10px;
  line-height: 1.4;
  flex-grow: 1;
}

.page-faq__blog-title a {
  color: #26A9E0;
  text-decoration: none;
}

.page-faq__blog-title a:hover {
  text-decoration: underline;
}

.page-faq__blog-meta {
  font-size: 0.9rem;
  color: #aaaaaa;
  margin-bottom: 10px;
}

.page-faq__blog-excerpt {
  font-size: 0.95rem;
  color: #f0f0f0;
  margin-bottom: 15px;
}

.page-faq__view-all {
  text-align: center;
  margin-top: 40px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .page-faq {
    font-size: 16px;
    line-height: 1.6;
  }

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

  .page-faq__main-title {
    font-size: clamp(2rem, 8vw, 2.8rem);
  }

  .page-faq__description {
    font-size: 1rem;
  }

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

  .page-faq__btn-primary,
  .page-faq__btn-secondary,
  .page-faq a[class*="button"],
  .page-faq a[class*="btn"] {
    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__section,
  .page-faq__related-articles {
    padding: 40px 15px;
  }

  .page-faq__container {
    padding-left: 15px;
    padding-right: 15px;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

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

  .page-faq__faq-category-title {
    font-size: 1.5rem;
  }

  .page-faq__faq-item summary {
    font-size: 1rem;
    padding: 15px;
  }

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

  .page-faq__grid {
    grid-template-columns: 1fr;
  }

  .page-faq__card {
    padding: 20px;
  }

  .page-faq__card-image,
  .page-faq__blog-image {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
    min-height: 200px; /* Ensure min height on mobile as well */
  }

  .page-faq__blog-list {
    grid-template-columns: 1fr;
  }

  .page-faq__cta-section {
    padding: 30px 20px;
  }

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

/* Ensure images within content area are at least 200px wide/high if not max-width: 100% */
.page-faq img:not(.page-faq__hero-image) {
  min-width: 200px;
  min-height: 200px;
}

/* For the shared body padding-top, this page's first section should only have a small decorative padding-top */
.page-faq__hero-section {
  padding-top: 10px; 
}