/* style/faq.css */

/* Base styles for the FAQ page */
.page-faq {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: #ffffff; /* Default text color for dark body background */
  background-color: #121212; /* Inherited from shared, but explicit for clarity */
}

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

.page-faq__section-title {
  font-size: 2.5em;
  color: #ffffff;
  text-align: center;
  margin-bottom: 40px;
  font-weight: bold;
}

.page-faq__text-link {
  color: #017439; /* Brand color for links */
  text-decoration: underline;
}

.page-faq__text-link:hover {
  color: #005f2e; /* Darker shade on hover */
}

/* Hero Section */
.page-faq__hero-section {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 600px;
  padding: 100px 20px;
  padding-top: var(--header-offset, 120px); /* Ensure space for fixed header */
  background: linear-gradient(rgba(1, 116, 57, 0.8), rgba(1, 116, 57, 0.8)); /* Overlay for image */
  color: #ffffff;
  text-align: center;
  overflow: hidden;
}

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

.page-faq__hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.5); /* Darken image for better text contrast */
  display: block;
}

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

.page-faq__hero-title {
  font-size: 3.5em;
  margin-bottom: 20px;
  line-height: 1.2;
  color: #ffffff;
}

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

.page-faq__cta-buttons {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap; /* Allow wrapping on small screens */
}

.page-faq__btn-primary,
.page-faq__btn-secondary {
  padding: 15px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  font-size: 1.1em;
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
  display: inline-block;
  box-sizing: border-box;
  max-width: 100%;
  white-space: normal; /* Allow text wrapping */
  word-wrap: break-word;
  text-align: center;
}

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

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

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

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

/* Accordion Section */
.page-faq__accordion-section {
  padding: 80px 0;
}

.page-faq__dark-bg {
  background-color: #1a1a1a;
  color: #ffffff;
}

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

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

.page-faq__faq-item {
  background-color: #3a3a3a;
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.page-faq__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  cursor: pointer;
  background-color: #017439;
  color: #ffffff;
  font-size: 1.2em;
  font-weight: bold;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  transition: background-color 0.3s ease;
}

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

.page-faq__faq-question h3 {
  margin: 0;
  flex-grow: 1;
  color: #ffffff;
}

.page-faq__faq-toggle {
  font-size: 1.5em;
  line-height: 1;
  transition: transform 0.3s ease;
  margin-left: 15px;
}

.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-out, padding 0.3s ease-out;
  background-color: #2a2a2a;
  color: #f0f0f0;
}

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

.page-faq__faq-answer p {
  margin-bottom: 1em;
}

.page-faq__faq-answer p:last-child {
  margin-bottom: 0;
}

/* Image Card */
.page-faq__image-card {
  margin-top: 50px;
  text-align: center;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

.page-faq__image-card-img {
  max-width: 100%;
  height: auto;
  display: block;
  width: 100%; /* Ensure it fills the card */
  min-height: 200px; /* Min size constraint */
}

/* CTA Bottom Section */
.page-faq__cta-bottom-section {
  padding: 80px 20px;
  background-color: #017439; /* Use brand color */
  color: #ffffff;
  text-align: center;
}

.page-faq__cta-content {
  max-width: 800px;
  margin: 0 auto;
}

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

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

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

/* Responsive adjustments */
@media (max-width: 1024px) {
  .page-faq__hero-title {
    font-size: 3em;
  }
  .page-faq__hero-description {
    font-size: 1.2em;
  }
  .page-faq__section-title {
    font-size: 2em;
  }
  .page-faq__faq-question {
    font-size: 1.1em;
  }
}

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

  .page-faq__container {
    padding: 0 15px;
  }

  .page-faq__hero-section {
    min-height: 450px;
    padding: 80px 15px;
    padding-top: var(--header-offset, 120px) !important; /* Mobile fixed header spacing */
  }

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

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

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

  .page-faq__btn-primary,
  .page-faq__btn-secondary {
    width: 100% !important;
    max-width: 100% !important;
    padding-left: 15px;
    padding-right: 15px;
  }

  .page-faq__accordion-section {
    padding: 50px 0;
  }

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

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

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

  .page-faq__image-card-img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }

  .page-faq__image-card,
  .page-faq__container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .page-faq__cta-bottom-section {
    padding: 60px 15px;
  }

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

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

  .page-faq__cta-buttons-bottom {
    flex-direction: column;
    gap: 15px;
  }

  /* Ensure content area images are not too small */
  .page-faq__accordion-section img {
    min-width: 200px;
    min-height: 200px;
  }
}

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

/* Color Contrast Fixes based on body background #121212 (dark) */
.page-faq {
  color: #ffffff; /* All text on dark background should be light */
}

.page-faq__dark-bg {
  background-color: #1a1a1a;
  color: #ffffff;
}

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

.page-faq__faq-item {
  background-color: #3a3a3a;
}

.page-faq__faq-answer {
  background-color: #2a2a2a;
  color: #f0f0f0;
}

.page-faq__cta-bottom-section {
  background-color: #017439;
  color: #ffffff;
}

.page-faq__faq-question {
  background-color: #017439;
  color: #ffffff;
}

.page-faq__faq-question h3 {
  color: #ffffff;
}

.page-faq__btn-primary {
  background-color: #017439;
  color: #ffffff;
  border-color: #017439;
}

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

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

/* Ensure content area images are not affected by filter and have min size */
.page-faq img {
  filter: none; /* No CSS filter on images */
}

/* Content area images CSS size lower limit */
.page-faq__image-card-img, .page-faq__accordion-section img {
  min-width: 200px;
  min-height: 200px;
}