/* style/faq.css */

/* Base styles for the FAQ page content */
.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 white */
}

/* Hero Section */
.page-faq__hero-section {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 20px;
  min-height: 500px;
  overflow: hidden;
  padding-top: var(--header-offset, 120px); /* Ensure space for fixed header */
}

.page-faq__dark-bg {
  background-color: #017439; /* Brand primary color */
  color: #ffffff;
}

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

.page-faq__hero-content {
  position: relative;
  z-index: 2;
  max-width: 900px;
  margin-bottom: 30px;
}

.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: #ffffff;
}

.page-faq__hero-buttons {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap; /* Allow buttons to wrap on smaller screens */
}

.page-faq__btn-primary,
.page-faq__btn-secondary {
  display: inline-block;
  padding: 15px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.3s ease, color 0.3s ease;
  box-sizing: border-box; /* Crucial for mobile responsiveness */
  max-width: 100%; /* Ensure button doesn't exceed container */
  white-space: normal; /* Allow text to wrap */
  word-wrap: break-word; /* Break long words */
}

.page-faq__btn-primary {
  background-color: #C30808; /* Custom color for register/login */
  color: #FFFF00; /* Custom color for register/login text */
  border: 2px solid #C30808;
}

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

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

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

.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;
  opacity: 0.3; /* Slightly dim the background image */
}

/* General Section Styling */
.page-faq__section {
  padding: 60px 20px;
  text-align: center;
}

.page-faq__container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 15px; /* Add padding for mobile content */
  box-sizing: border-box;
}

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

.page-faq__section-description {
  font-size: 1.1em;
  margin-bottom: 40px;
  color: #555555;
}

/* FAQ List Specific Styles */
.page-faq__faq-list {
  background-color: #f9f9f9;
}

.page-faq__faq-group {
  margin-bottom: 40px;
  text-align: left;
}

.page-faq__faq-group-title {
  font-size: 1.8em;
  color: #017439;
  margin-bottom: 25px;
  border-bottom: 2px solid #e0e0e0;
  padding-bottom: 10px;
}

.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);
  transition: all 0.3s ease;
}

.page-faq__faq-item[open] {
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.page-faq__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  font-size: 1.15em;
  font-weight: bold;
  color: #333333;
  cursor: pointer;
  background-color: #fefefe;
  border-bottom: 1px solid #e0e0e0;
  transition: background-color 0.3s ease;
  list-style: none; /* For details/summary */
}

.page-faq__faq-question::-webkit-details-marker {
  display: none; /* Hide default marker for details/summary */
}

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

.page-faq__faq-item[open] .page-faq__faq-question {
  background-color: #e6f7ed; /* Light green for open question */
  border-bottom-color: #017439;
}

.page-faq__faq-qtext {
  flex-grow: 1;
}

.page-faq__faq-toggle {
  font-size: 1.5em;
  margin-left: 20px;
  color: #017439;
}

.page-faq__faq-answer {
  padding: 20px 25px;
  font-size: 1em;
  color: #555555;
  border-top: 1px solid #eee;
  background-color: #ffffff;
}

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

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

.page-faq__faq-answer a {
  color: #017439;
  text-decoration: underline;
}

.page-faq__faq-answer a:hover {
  color: #005f2f;
}

/* Image styles within FAQ answers */
.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);
  min-width: 200px; /* Enforce minimum width for content images */
  min-height: 200px; /* Enforce minimum height for content images */
}

/* Call to Action Section */
.page-faq__cta-section {
  padding: 80px 20px;
  text-align: center;
  background-color: #017439; /* Brand primary color */
  color: #ffffff;
  margin-top: 40px;
}

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

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

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

/* Responsive Styles */
@media (max-width: 1024px) {
  .page-faq__hero-title {
    font-size: 2.5em;
  }
  .page-faq__hero-description {
    font-size: 1.1em;
  }
  .page-faq__section-title {
    font-size: 2em;
  }
  .page-faq__faq-group-title {
    font-size: 1.6em;
  }
  .page-faq__faq-question {
    font-size: 1.1em;
  }
  .page-faq__cta-title {
    font-size: 2.2em;
  }
  .page-faq__cta-description {
    font-size: 1.1em;
  }
}

@media (max-width: 768px) {
  .page-faq__hero-section {
    padding: 60px 15px;
    padding-top: var(--header-offset, 120px) !important; /* Mobile fixed header offset */
  }
  .page-faq__hero-title {
    font-size: 2em;
  }
  .page-faq__hero-description {
    font-size: 1em;
  }
  .page-faq__hero-buttons {
    flex-direction: column;
    gap: 15px;
    width: 100%;
  }
  .page-faq__btn-primary,
  .page-faq__btn-secondary {
    width: 100% !important; /* Force full width on mobile */
    max-width: 100% !important;
    padding: 12px 20px;
    font-size: 1em;
  }

  .page-faq__section {
    padding: 40px 0; /* Adjust padding for mobile */
  }
  .page-faq__container {
    padding: 0 15px;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  .page-faq__section-title {
    font-size: 1.8em;
  }
  .page-faq__section-description {
    font-size: 0.95em;
  }
  .page-faq__faq-group-title {
    font-size: 1.4em;
    padding-left: 15px;
    padding-right: 15px;
  }
  .page-faq__faq-item {
    margin-left: 0;
    margin-right: 0;
  }
  .page-faq__faq-question {
    padding: 15px 20px;
    font-size: 1em;
  }
  .page-faq__faq-answer {
    padding: 15px 20px;
    font-size: 0.95em;
  }
  .page-faq__image {
    max-width: 100% !important;
    height: auto !important;
    width: 100% !important;
    box-sizing: border-box !important;
    margin: 15px auto;
  }
  .page-faq__cta-section {
    padding: 60px 15px;
  }
  .page-faq__cta-title {
    font-size: 2em;
  }
  .page-faq__cta-description {
    font-size: 1em;
  }
  .page-faq__cta-buttons {
    flex-direction: column;
    gap: 15px;
    width: 100%;
  }

  /* Ensure all content-area images are responsive */
  .page-faq img {
    max-width: 100% !important;
    height: auto !important;
    display: block !important;
  }

  /* All containing elements for images/videos/buttons */
  .page-faq__section,
  .page-faq__card,
  .page-faq__container,
  .page-faq__hero-section,
  .page-faq__cta-section,
  .page-faq__hero-buttons,
  .page-faq__cta-buttons {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important; /* Prevent horizontal scroll */
  }
  .page-faq__faq-group {
    padding-left: 0;
    padding-right: 0;
  }
}

/* Ensure no filter is used on images */
.page-faq img {
  filter: none;
}

/* Specific button styles for contrast */
.page-faq a[class*="btn"] {
  /* No filter property */
}

/* Overrides for the specific button colors from requirements */
.page-faq__btn-primary {
  background-color: #C30808; /* Register/Login color */
  color: #FFFF00; /* Register/Login font color */
  border: 2px solid #C30808;
}

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

/* Ensure general text in light background areas is dark */
.page-faq__light-bg p,
.page-faq__light-bg li,
.page-faq__light-bg .page-faq__section-description {
  color: #333333;
}

/* Ensure text in dark background areas is light */
.page-faq__dark-bg p,
.page-faq__dark-bg li,
.page-faq__dark-bg .page-faq__hero-description {
  color: #ffffff;
}

.page-faq__dark-bg .page-faq__hero-title {
  color: #ffffff; /* Ensure title is white on dark background */
}