/* style/faq.css */
.page-faq {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #333333; /* Default text color for light backgrounds */
  background-color: var(--background-color, #FFFFFF); /* Inherit from shared or default to white */
}

.page-faq__hero-section {
  position: relative;
  width: 100%;
  padding: 60px 20px;
  padding-top: var(--header-offset, 120px); /* Ensures content is not hidden by fixed header */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  color: #ffffff;
  background-color: #26A9E0; /* Brand primary color for hero */
}

.page-faq__hero-image-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  opacity: 0.2;
  overflow: hidden;
}

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

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

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

.page-faq__hero-description {
  font-size: 1.2em;
  margin-bottom: 30px;
  color: #f0f0f0;
}

.page-faq__btn-primary,
.page-faq__btn-secondary {
  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, border-color 0.3s ease;
  box-sizing: border-box;
  text-align: center;
}

.page-faq__btn-primary {
  background-color: #EA7C07; /* Login/CTA button color */
  color: #ffffff;
  border: 2px solid transparent;
}

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

.page-faq__btn-secondary {
  background-color: #ffffff;
  color: #26A9E0;
  border: 2px solid #26A9E0;
  margin-left: 15px;
}

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

.page-faq__introduction-section,
.page-faq__faq-list-section,
.page-faq__cta-section {
  padding: 60px 20px;
}

.page-faq__light-bg {
  background-color: #ffffff;
  color: #333333;
}

.page-faq__dark-bg {
  background-color: #26A9E0;
  color: #ffffff;
}

.page-faq__cta-section {
  text-align: center;
  padding-bottom: 80px;
}

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

.page-faq__section-title,
.page-faq__cta-title {
  font-size: 2.2em;
  margin-bottom: 30px;
  text-align: center;
  color: inherit;
}

.page-faq__section-text,
.page-faq__cta-description {
  font-size: 1.1em;
  text-align: center;
  margin-bottom: 40px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  color: inherit;
}

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

.page-faq__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 25px;
  font-size: 1.15em;
  font-weight: bold;
  cursor: pointer;
  background-color: #f0f0f0;
  color: #333333;
  transition: background-color 0.3s ease;
}

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

.page-faq__faq-question h3 {
  margin: 0;
  font-size: 1em;
  color: inherit;
}

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

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

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

.page-faq__faq-item.active .page-faq__faq-answer {
  max-height: 1000px !important; /* Sufficiently large to contain any content */
  padding: 15px 25px;
}

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

.page-faq__faq-answer ul {
  list-style-type: disc;
  margin-left: 20px;
  margin-bottom: 15px;
}

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

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

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

/* Ensure all content area images are at least 200x200px */
.page-faq img {
  min-width: 200px;
  min-height: 200px;
  object-fit: cover; /* Ensures images fill their space without distortion */
}

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

  .page-faq__hero-section {
    padding: 40px 15px;
    padding-top: var(--header-offset, 120px) !important; /* Ensure mobile header offset */
  }

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

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

  .page-faq__btn-primary,
  .page-faq__btn-secondary {
    max-width: 100% !important;
    width: 100% !important;
    margin-left: 0 !important;
    margin-bottom: 10px;
    padding-left: 15px;
    padding-right: 15px;
    white-space: normal !important;
    word-wrap: break-word !important;
  }

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

  .page-faq__introduction-section,
  .page-faq__faq-list-section,
  .page-faq__cta-section {
    padding: 40px 15px;
  }

  .page-faq__section-title,
  .page-faq__cta-title {
    font-size: 1.8em;
    margin-bottom: 20px;
  }

  .page-faq__section-text,
  .page-faq__cta-description {
    font-size: 1em;
    margin-bottom: 30px;
  }

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

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

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

  .page-faq img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  
  .page-faq__section, .page-faq__container, .page-faq__card, .page-faq__hero-content {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }
  .page-faq__hero-image-wrapper {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
}

@media (max-width: 480px) {
  .page-faq__hero-title {
    font-size: 1.8em;
  }

  .page-faq__section-title,
  .page-faq__cta-title {
    font-size: 1.5em;
  }
}

/* Global image rules for content area - ensure minimum display size */
.page-faq__image {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 20px auto;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

/* Ensure images within content areas are not displayed smaller than 200px */
.page-faq__faq-answer img, .page-faq__introduction-section img {
  min-width: 200px;
  min-height: 200px;
  object-fit: cover;
}