/* style/faq.css */
.page-faq {
  font-family: Arial, sans-serif;
  color: #333333; /* Mặc định chữ màu tối trên nền sáng */
  line-height: 1.6;
  background-color: var(--bg-color, #ffffff); /* Sử dụng biến CSS từ shared.css */
}

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

/* Hero Section */
.page-faq__hero-section {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px 0 80px; /* Thêm padding-top để tránh bị header che */
  color: #ffffff;
  overflow: hidden;
  min-height: 500px;
  background-color: #26A9E0; /* Màu nền chính */
  padding-top: var(--header-offset, 120px); /* Đảm bảo khoảng cách với header cố định */
}

.page-faq__hero-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  opacity: 0.3;
}

.page-faq__hero-section .page-faq__container {
  position: relative;
  z-index: 1;
}

.page-faq__hero-title {
  font-size: 3.2em;
  margin-bottom: 20px;
  font-weight: bold;
  color: #ffffff;
}

.page-faq__hero-description {
  font-size: 1.2em;
  margin-bottom: 30px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

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

/* Buttons */
.page-faq__btn-primary,
.page-faq__btn-secondary,
.page-faq__btn-small {
  display: inline-block;
  padding: 14px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  transition: all 0.3s ease;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
  max-width: 100%;
}

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

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

.page-faq__btn-secondary {
  background-color: transparent;
  color: #ffffff;
  border: 2px solid #ffffff;
}

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

.page-faq__btn-small {
  padding: 10px 20px;
  font-size: 0.9em;
  border-radius: 5px;
  background-color: #26A9E0;
  color: #ffffff;
  border: 1px solid #26A9E0;
  margin-top: 15px;
}

.page-faq__btn-small:hover {
  background-color: #1e87c0;
  border-color: #1e87c0;
}

/* Content Area */
.page-faq__content-area {
  padding: 60px 0;
  background-color: #ffffff;
  color: #333333;
}

.page-faq__section-title {
  font-size: 2.5em;
  color: #26A9E0;
  text-align: center;
  margin-bottom: 20px;
}

.page-faq__section-intro {
  font-size: 1.1em;
  text-align: center;
  max-width: 900px;
  margin: 0 auto 40px;
  color: #555555;
}

/* FAQ List */
.page-faq__faq-list {
  margin-top: 40px;
}

.page-faq__faq-item {
  background-color: #f9f9f9;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
}

.page-faq__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  cursor: pointer;
  background-color: #ffffff;
  transition: background-color 0.3s ease;
}

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

.page-faq__faq-question h3 {
  margin: 0;
  font-size: 1.2em;
  color: #26A9E0;
}

.page-faq__faq-toggle {
  font-size: 1.5em;
  font-weight: bold;
  color: #26A9E0;
  transition: transform 0.3s ease;
}

.page-faq__faq-item.active .page-faq__faq-toggle {
  transform: rotate(45deg); /* Xoay 45 độ để thành dấu trừ */
}

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

.page-faq__faq-item.active .page-faq__faq-answer {
  max-height: 1000px !important; /* Đủ lớn để chứa mọi nội dung */
  padding: 15px 25px;
}

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

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

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

.page-faq__image-in-text {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 20px auto;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

/* Call to Action Section */
.page-faq__cta-section {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 0;
  color: #ffffff;
  overflow: hidden;
  min-height: 350px;
  background-color: #26A9E0; /* Màu nền chính */
}

.page-faq__cta-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  opacity: 0.2;
}

.page-faq__cta-section .page-faq__container {
  position: relative;
  z-index: 1;
}

.page-faq__cta-title {
  font-size: 2.5em;
  margin-bottom: 15px;
  color: #ffffff;
}

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

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

/* Responsive Design */
@media (max-width: 1024px) {
  .page-faq__hero-title {
    font-size: 2.8em;
  }
  .page-faq__section-title {
    font-size: 2em;
  }
  .page-faq__cta-title {
    font-size: 2em;
  }
}

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

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

  .page-faq__hero-section {
    padding: 80px 0 60px; /* Điều chỉnh padding cho di động */
    min-height: 400px;
    padding-top: var(--header-offset, 120px) !important; /* Đảm bảo khoảng cách với header cố định */
  }

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

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

  .page-faq__hero-actions,
  .page-faq__cta-actions {
    flex-direction: column;
    gap: 15px;
  }

  .page-faq__btn-primary,
  .page-faq__btn-secondary,
  .page-faq__btn-small {
    max-width: 100% !important;
    width: 100% !important;
    padding: 12px 20px;
    font-size: 1em;
  }

  .page-faq__content-area {
    padding: 40px 0;
  }

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

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

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

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

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

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

  .page-faq__image-in-text {
    max-width: 100% !important;
    height: auto !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .page-faq__cta-section {
    padding: 60px 0;
    min-height: 300px;
  }

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

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

  /* Responsive images, videos, containers */
  .page-faq img {
    max-width: 100% !important;
    height: auto !important;
    display: block !important;
  }

  .page-faq__section,
  .page-faq__card,
  .page-faq__container,
  .page-faq__hero-section,
  .page-faq__content-area,
  .page-faq__cta-section {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important; /* Ngăn chặn tràn nội dung */
  }
}

@media (max-width: 480px) {
  .page-faq__hero-title {
    font-size: 1.8em;
  }
  .page-faq__section-title {
    font-size: 1.5em;
  }
  .page-faq__cta-title {
    font-size: 1.5em;
  }
  .page-faq__faq-question h3 {
    font-size: 1em;
  }
  .page-faq__faq-toggle {
    font-size: 1.2em;
  }
}

/* Màu nền tối - chữ sáng */
.page-faq__dark-bg {
  background-color: #26A9E0;
  color: #ffffff;
}

/* Màu nền sáng - chữ tối */
.page-faq__light-bg {
  background-color: #ffffff;
  color: #333333;
}