/* style/faq.css */

/* Base Styles & Page Container */
.page-faq {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #f0f0f0; /* Light text for dark body background from shared.css */
  background-color: transparent; /* body background is handled by shared.css */
}

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

/* Header offset to prevent content from being hidden by fixed header */
.page-faq__hero-section {
  padding-top: var(--header-offset, 120px); /* Apply header offset here */
}

/* Hero Section */
.page-faq__hero-section {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 500px;
  text-align: center;
  overflow: hidden;
  background-color: #017439; /* Brand primary color for hero background */
  color: #ffffff; /* White text for brand primary background */
  padding-bottom: 60px; /* Add some padding at the bottom */
}

.page-faq__hero-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
  opacity: 0.3; /* Slightly transparent to let text stand out */
}

.page-faq__hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
  padding: 20px;
  background: rgba(0, 0, 0, 0.4); /* Dark overlay for better text readability */
  border-radius: 10px;
}

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

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

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

/* Section Titles & Descriptions */
.page-faq__section-title {
  font-size: 2.2em;
  color: #ffffff; /* Light text for dark body background */
  text-align: center;
  margin-bottom: 20px;
  padding-top: 40px;
}

.page-faq__section-description {
  font-size: 1.1em;
  color: #f0f0f0; /* Light text for dark body background */
  text-align: center;
  max-width: 800px;
  margin: 0 auto 50px auto;
}

/* FAQ Section */
.page-faq__faq-section {
  padding: 60px 0;
  background-color: #1a1a1a; /* Ensure dark background for the section */
}

.page-faq__faq-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.page-faq__faq-item {
  background-color: rgba(255, 255, 255, 0.08); /* Slightly lighter background for cards */
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.page-faq__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  cursor: pointer;
  background-color: rgba(255, 255, 255, 0.05); /* Slightly darker for question header */
  transition: background-color 0.3s ease;
}

.page-faq__faq-question:hover {
  background-color: rgba(255, 255, 255, 0.12);
}

.page-faq__faq-heading {
  margin: 0;
  font-size: 1.2em;
  color: #ffffff;
}

.page-faq__faq-toggle {
  font-size: 1.8em;
  font-weight: bold;
  color: #017439; /* Brand primary color for toggle icon */
  transition: transform 0.3s ease;
}

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

.page-faq__faq-answer {
  max-height: 0;
  overflow: hidden;
  padding: 0 25px;
  transition: max-height 0.3s ease, padding 0.3s ease;
  color: #f0f0f0; /* Light text for answer content */
}

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

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

.page-faq__faq-link {
  display: inline-block;
  color: #017439; /* Brand primary color for links */
  text-decoration: none;
  font-weight: bold;
  margin-top: 5px;
  margin-right: 15px;
  transition: color 0.3s ease;
}

.page-faq__faq-link:hover {
  color: #38c172; /* Lighter green on hover */
  text-decoration: underline;
}

.page-faq__faq-image {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin-top: 20px;
  display: block; /* Ensure it behaves as a block element */
}

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

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

.page-faq__cta-description {
  font-size: 1.1em;
  margin-bottom: 40px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  color: #f0f0f0;
}

/* Buttons */
.page-faq__btn-primary,
.page-faq__btn-secondary {
  display: inline-block;
  padding: 15px 30px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  font-size: 1.1em;
  cursor: pointer;
  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: #C30808; /* Custom color for Register/Login */
  color: #FFFF00; /* Custom font color for Register/Login */
  border: 2px solid #C30808;
}

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

.page-faq__btn-secondary {
  background-color: transparent;
  color: #FFFF00; /* Custom font color for Register/Login */
  border: 2px solid #C30808; /* Custom color for Register/Login */
  margin-left: 15px; /* Add some spacing between buttons */
}

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

/* Responsive Styles */
@media (max-width: 1024px) {
  .page-faq__main-title {
    font-size: 2.5em;
  }
  .page-faq__section-title {
    font-size: 2em;
  }
  .page-faq__cta-title {
    font-size: 2.2em;
  }
}

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

  /* Fixed header offset in mobile media query for hero section */
  .page-faq__hero-section {
    padding-top: var(--header-offset, 120px) !important;
  }

  .page-faq__hero-content {
    padding: 15px;
  }
  
  .page-faq__main-title {
    font-size: 2em;
  }

  .page-faq__intro-text {
    font-size: 1em;
  }

  .page-faq__hero-buttons {
    flex-direction: column;
    gap: 10px;
  }

  .page-faq__btn-primary,
  .page-faq__btn-secondary {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 12px 20px !important;
    font-size: 1em !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    margin-left: 0 !important; /* Remove margin for stacked buttons */
  }

  .page-faq__container,
  .page-faq__faq-section .page-faq__container,
  .page-faq__cta-section .page-faq__container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px !important;
    padding-right: 15px !important;
  }

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

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

  .page-faq__faq-question {
    padding: 15px 20px;
  }

  .page-faq__faq-heading {
    font-size: 1.1em;
  }

  .page-faq__faq-toggle {
    font-size: 1.5em;
  }

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

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

  .page-faq__cta-description {
    font-size: 1em;
  }
  
  /* Mobile image specific rules */
  .page-faq img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }

  .page-faq__faq-image {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }

  /* Ensure all containers with images/buttons are responsive */
  .page-faq__section,
  .page-faq__card,
  .page-faq__container,
  .page-faq__hero-section,
  .page-faq__faq-section,
  .page-faq__cta-section {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important; /* Prevent horizontal scroll */
  }

  .page-faq__faq-item {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  .page-faq__faq-answer {
    padding-left: 20px !important;
    padding-right: 20px !important;
  }
}

/* Color Contrast Enforcement */
/* The body background is #1a1a1a (dark) from shared.css */
/* Therefore, general page text should be light */
.page-faq {
  color: #f0f0f0; /* Default light text for main content on dark body */
}

.page-faq__hero-section {
  background-color: #017439; /* Brand primary color, dark enough for white text */
  color: #ffffff;
}

.page-faq__faq-section {
  background-color: #1a1a1a; /* Explicitly set for the section if needed */
}

.page-faq__faq-item {
  background-color: rgba(255, 255, 255, 0.08); /* Slightly lighter dark background */
}

.page-faq__faq-question {
  background-color: rgba(255, 255, 255, 0.05);
}

.page-faq__faq-question:hover {
  background-color: rgba(255, 255, 255, 0.12);
}

.page-faq__faq-heading {
  color: #ffffff;
}

.page-faq__faq-toggle {
  color: #017439; /* Brand primary green */
}

.page-faq__faq-item.active .page-faq__faq-toggle {
  color: #ffffff;
}

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

.page-faq__faq-link {
  color: #017439; /* Brand primary green for links */
}

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

.page-faq__cta-title {
  color: #ffffff;
}

.page-faq__cta-description {
  color: #f0f0f0;
}

/* Buttons with custom colors */
.page-faq__btn-primary {
  background-color: #C30808; /* Red */
  color: #FFFF00; /* Yellow */
}

.page-faq__btn-secondary {
  background-color: transparent;
  color: #FFFF00; /* Yellow */
  border-color: #C30808; /* Red */
}

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

/* Ensure images do not have filter */
.page-faq img {
  filter: none !important;
}