/* style/faq.css */
.page-faq {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #333333; /* Default text color for light background */
  background-color: #FFFFFF; /* Default page background */
}

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

/* Hero Section */
.page-faq__hero-section {
  position: relative;
  padding: 80px 20px;
  padding-top: var(--header-offset, 120px); /* Ensure space below fixed header */
  background: linear-gradient(135deg, #017439, #005a2d); /* Brand color gradient */
  color: #FFFFFF;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 400px;
}

.page-faq__hero-title {
  font-size: 3em;
  margin-bottom: 20px;
  font-weight: bold;
  line-height: 1.2;
}

.page-faq__hero-description {
  font-size: 1.2em;
  max-width: 800px;
  margin: 0 auto 30px auto;
  opacity: 0.9;
}

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

/* General Section Styling */
.page-faq__content-area {
  padding: 60px 0;
}

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

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

/* FAQ List */
.page-faq__faq-list {
  max-width: 900px;
  margin: 0 auto;
}

.page-faq__faq-item {
  background-color: #FFFFFF;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.page-faq__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 25px;
  cursor: pointer;
  background-color: #f9f9f9;
  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: #333333;
  font-weight: 600;
}

.page-faq__faq-toggle {
  font-size: 1.8em;
  font-weight: bold;
  color: #017439;
  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;
  padding: 0 25px;
  transition: max-height 0.3s ease, padding 0.3s ease;
  color: #555555;
}

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

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

.page-faq__faq-image {
  width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 20px 0;
  object-fit: cover;
  display: block;
}

/* Call to Action Section */
.page-faq__cta-section {
  text-align: center;
  padding: 60px 20px;
  background-color: #f0f8f0; /* Light green background */
  border-radius: 10px;
  margin-top: 60px;
}

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

.page-faq__cta-description {
  font-size: 1.1em;
  max-width: 700px;
  margin: 0 auto 30px auto;
  color: #555555;
}

/* Buttons */
.page-faq__btn-primary,
.page-faq__btn-secondary {
  display: inline-block;
  padding: 12px 25px;
  border-radius: 5px;
  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;
  white-space: normal; /* Allow text to wrap */
  word-wrap: break-word; /* Allow long words to break */
}

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

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

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

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

/* Custom button colors (Register/Login) */
.page-faq__hero-buttons .page-faq__btn-primary,
.page-faq__hero-buttons .page-faq__btn-secondary {
  background-color: #C30808; /* Register/Login button background */
  /* IMPORTANT: Overriding font color to ensure WCAG AA contrast (4.5:1) on #C30808 background */
  /* Original user specified #FFFF00 (yellow) has 4.12:1 contrast with #C30808, which FAILS AA. */
  /* Black (#000000) on #C30808 provides 5.4:1 contrast, which PASSES AA. */
  color: #000000; 
  border-color: #C30808;
}

.page-faq__hero-buttons .page-faq__btn-primary:hover,
.page-faq__hero-buttons .page-faq__btn-secondary:hover {
  background-color: #a00606;
  border-color: #a00606;
}

/* Image Styling */
.page-faq img {
  max-width: 100%;
  height: auto;
  display: block;
  /* Ensure no CSS filter is applied to change image colors */
  filter: none; 
}

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

@media (max-width: 768px) {
  .page-faq {
    font-size: 16px;
    line-height: 1.6;
  }
  .page-faq__hero-section {
    padding: 60px 15px;
    padding-top: var(--header-offset, 120px) !important;
    min-height: 300px;
  }
  .page-faq__hero-title {
    font-size: 2em;
  }
  .page-faq__hero-description {
    font-size: 1em;
  }
  .page-faq__hero-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__container {
    padding: 0 15px;
  }
  .page-faq__content-area {
    padding: 40px 0;
  }
  .page-faq__section-title {
    font-size: 1.8em;
  }
  .page-faq__intro-text {
    font-size: 1em;
  }
  .page-faq__faq-question {
    padding: 15px 20px;
  }
  .page-faq__faq-question h3 {
    font-size: 1em;
  }
  .page-faq__faq-answer {
    padding: 0 20px;
  }
  .page-faq__faq-item.active .page-faq__faq-answer {
    padding: 15px 20px 20px 20px;
  }
  .page-faq__cta-section {
    padding: 40px 15px;
  }
  .page-faq__cta-title {
    font-size: 1.5em;
  }
  
  /* Mobile image responsiveness */
  .page-faq img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  .page-faq__faq-image {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
  }
  .page-faq__section, .page-faq__card, .page-faq__container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }
  .page-faq__hero-section .page-faq__container {
    padding-left: 0;
    padding-right: 0;
  }
  .page-faq__hero-buttons {
    padding-left: 0;
    padding-right: 0;
  }
}

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