/* style/faq.css */

/* Base Styles & Typography */
.page-faq {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #ffffff; /* Default text color for dark body background */
  background-color: transparent; /* Body background is handled by shared.css */
}

.page-faq h1, .page-faq h2, .page-faq h3 {
  color: #ffffff;
  margin-bottom: 20px;
  line-height: 1.2;
}

.page-faq h1 {
  font-size: 2.8em;
  text-align: center;
}

.page-faq h2 {
  font-size: 2.2em;
  text-align: center;
  margin-top: 40px;
}

.page-faq h3 {
  font-size: 1.5em;
}

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

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

.page-faq__text-link:hover {
  color: #017439;
}

/* Section Spacing */
.page-faq__section-spacing {
  padding: 60px 0;
}

/* Container */
.page-faq__container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 20px;
  box-sizing: border-box;
}

/* Hero Section */
.page-faq__hero-section {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 100px 20px 60px; /* Adjust padding-top to account for fixed header */
  padding-top: var(--header-offset, 120px); /* Use CSS variable for header offset */
  background-color: #017439; /* Primary color for hero background */
  color: #ffffff;
  overflow: hidden;
}

.page-faq__hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
  text-align: center;
  margin-bottom: 40px;
}

.page-faq__hero-description {
  font-size: 1.1em;
  margin-bottom: 30px;
}

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

.page-faq__hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.3;
  filter: brightness(0.6); /* Darken image for text readability */
}

/* Buttons */
.page-faq__btn-primary,
.page-faq__btn-secondary,
.page-faq__btn-register {
  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;
  border: 2px solid transparent;
  cursor: pointer;
}

.page-faq__btn-primary {
  background-color: #C30808; /* Login/Register button color */
  color: #FFFF00; /* Login/Register font color */
}

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

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

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

.page-faq__btn-register {
  background-color: #C30808; /* Register button color */
  color: #FFFF00; /* Register font color */
  margin-right: 15px;
}

.page-faq__btn-register:hover {
  background-color: #a00606;
  color: #fff;
}

/* Section Titles and Intros */
.page-faq__section-title {
  font-size: 2.2em;
  text-align: center;
  margin-bottom: 20px;
  color: #ffffff; /* Ensure title is visible on dark background */
}

.page-faq__section-intro {
  text-align: center;
  max-width: 800px;
  margin: 0 auto 40px;
  font-size: 1.05em;
  color: #f0f0f0;
}

/* Dark Section */
.page-faq__dark-section {
  background-color: #017439;
  color: #ffffff;
}

.page-faq__dark-section .page-faq__section-title,
.page-faq__dark-section .page-faq__section-intro {
  color: #ffffff;
}

/* FAQ List */
.page-faq__faq-list {
  margin-top: 30px;
}

.page-faq__faq-item {
  background-color: rgba(255, 255, 255, 0.1); /* Slightly transparent white for items */
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
  color: #ffffff;
}

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

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

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

.page-faq__faq-toggle {
  font-size: 1.8em;
  font-weight: bold;
  color: #FFFF00; /* Yellow toggle icon */
  transition: transform 0.3s ease;
  line-height: 1;
}

.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;
}

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

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

/* Images within sections */
.page-faq__section-image {
  display: block;
  margin: 40px auto 0;
  border-radius: 10px;
  max-width: 100%;
  height: auto;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* CTA Section */
.page-faq__cta-section {
  background-color: #017439;
  color: #ffffff;
  text-align: center;
}

.page-faq__cta-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

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

/* Responsive Design */
@media (max-width: 768px) {
  .page-faq h1 {
    font-size: 2em;
  }

  .page-faq h2 {
    font-size: 1.8em;
  }

  .page-faq h3 {
    font-size: 1.3em;
  }

  .page-faq__hero-section {
    padding-top: var(--header-offset, 120px) !important;
    padding-bottom: 40px;
  }

  .page-faq__section-spacing {
    padding: 40px 0;
  }

  .page-faq__container {
    padding: 0 15px;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  /* Images responsive */
  .page-faq img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }

  .page-faq__hero-image-wrapper,
  .page-faq__hero-image,
  .page-faq__section-image {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }

  /* Buttons responsive */
  .page-faq__btn-primary,
  .page-faq__btn-secondary,
  .page-faq__btn-register,
  .page-faq a[class*="button"],
  .page-faq a[class*="btn"] {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    padding-left: 15px;
    padding-right: 15px;
  }

  .page-faq__cta-buttons {
    flex-direction: column !important;
    gap: 15px !important;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 0 15px;
  }

  .page-faq__btn-register {
    margin-right: 0;
  }
}

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

  .page-faq h2 {
    font-size: 1.5em;
  }

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

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

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