/* style/faq.css */
.page-faq {
  background-color: var(--site-bg, #F4F7FB);
  color: #1F2D3D;
  font-family: Arial, sans-serif;
  line-height: 1.6;
}

.page-faq__hero-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 20px 60px 20px; /* body handles header offset, this is for section top spacing */
  background: linear-gradient(180deg, #F4F7FB 0%, #E0E8F5 100%);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.page-faq__hero-image-wrapper {
  width: 100%;
  max-width: 1200px;
  margin-bottom: 30px;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.page-faq__hero-image {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

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

.page-faq__main-title {
  font-size: clamp(2.2rem, 4vw, 3.2rem);
  color: #1F2D3D;
  margin-bottom: 20px;
  font-weight: bold;
  line-height: 1.2;
}

.page-faq__intro-text {
  font-size: 1.1rem;
  color: #1F2D3D;
  margin-bottom: 30px;
}

.page-faq__section-spacing {
  padding: 60px 20px;
}

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

.page-faq__faq-list {
  display: grid;
  gap: 30px;
}

.page-faq__faq-group {
  background-color: #FFFFFF;
  border-radius: 15px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
  padding: 30px;
}

.page-faq__group-title {
  font-size: 2rem;
  color: #2F6BFF;
  margin-bottom: 30px;
  text-align: center;
  border-bottom: 2px solid #D6E2FF;
  padding-bottom: 15px;
}

.page-faq__faq-item {
  border-bottom: 1px solid #D6E2FF;
  padding: 15px 0;
  cursor: pointer;
}

.page-faq__faq-item:last-child {
  border-bottom: none;
}

.page-faq__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1.15rem;
  font-weight: bold;
  color: #1F2D3D;
  padding-right: 10px;
}

.page-faq__faq-question h3 {
  margin: 0;
  color: #1F2D3D;
  font-size: 1.15rem;
}

.page-faq__faq-toggle {
  font-size: 1.5rem;
  color: #2F6BFF;
  transition: transform 0.3s ease;
}

.page-faq__faq-item.active .page-faq__faq-toggle {
  transform: rotate(45deg);
}

.page-faq__faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s ease-out, padding 0.5s ease-out;
  padding-top: 0;
  padding-bottom: 0;
}

.page-faq__faq-item.active .page-faq__faq-answer {
  max-height: 500px; /* Adjust based on expected content length */
  padding-top: 15px;
  padding-bottom: 5px;
}

.page-faq__faq-answer p {
  margin: 0;
  color: #1F2D3D;
  font-size: 1rem;
}

.page-faq__image-wrapper {
  margin: 40px auto;
  max-width: 1000px;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

.page-faq__content-image {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

.page-faq__cta-section {
  text-align: center;
  background-color: #F4F7FB;
  border-radius: 15px;
  padding: 50px 30px;
  margin-top: 40px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
}

.page-faq__cta-title {
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  color: #1F2D3D;
  margin-bottom: 20px;
  font-weight: bold;
}

.page-faq__cta-description {
  font-size: 1.1rem;
  color: #1F2D3D;
  margin-bottom: 30px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.page-faq__btn-primary {
  display: inline-block;
  padding: 15px 30px;
  background: linear-gradient(180deg, #4A8BFF 0%, #2F6BFF 100%);
  color: #ffffff;
  text-decoration: none;
  border-radius: 8px;
  font-weight: bold;
  font-size: 1rem;
  transition: background 0.3s ease, transform 0.3s ease;
  box-shadow: 0 4px 15px rgba(47, 107, 255, 0.3);
  border: none;
  cursor: pointer;
  max-width: 100%;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

.page-faq__btn-primary:hover {
  background: linear-gradient(180deg, #2F6BFF 0%, #4A8BFF 100%);
  transform: translateY(-2px);
}

/* Responsive styles */
@media (max-width: 992px) {
  .page-faq__group-title {
    font-size: 1.8rem;
  }
  .page-faq__faq-question h3 {
    font-size: 1.1rem;
  }
  .page-faq__faq-answer p {
    font-size: 0.95rem;
  }
}

@media (max-width: 768px) {
  .page-faq__hero-section {
    padding: 10px 15px 40px 15px;
  }
  .page-faq__main-title {
    font-size: 2rem;
  }
  .page-faq__intro-text {
    font-size: 1rem;
  }
  .page-faq__section-spacing {
    padding: 40px 15px;
  }
  .page-faq__faq-group {
    padding: 20px;
  }
  .page-faq__group-title {
    font-size: 1.6rem;
    margin-bottom: 20px;
  }
  .page-faq__faq-question h3 {
    font-size: 1rem;
  }
  .page-faq__faq-toggle {
    font-size: 1.3rem;
  }
  .page-faq__faq-answer p {
    font-size: 0.9rem;
  }
  .page-faq__cta-title {
    font-size: 1.8rem;
  }
  .page-faq__cta-description {
    font-size: 1rem;
  }

  /* Mobile image responsiveness */
  .page-faq img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  .page-faq__hero-image-wrapper,
  .page-faq__image-wrapper,
  .page-faq__container,
  .page-faq__faq-group,
  .page-faq__cta-section {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    overflow: hidden !important; /* Ensure content does not overflow */
  }
  .page-faq__btn-primary {
    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;
  }
}