/* 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: transparent; /* Body background handled by shared.css */
}

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

/* Hero Section */
.page-faq__hero-section {
  position: relative;
  display: flex;
  flex-direction: column; /* Default to column for mobile first */
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 20px;
  padding-top: var(--header-offset, 120px); /* Ensure content is not hidden by fixed header */
  background-color: #017439; /* Brand primary color for hero background */
  color: #ffffff;
  overflow: hidden;
  min-height: 500px;
}

.page-faq__hero-content {
  z-index: 1;
  max-width: 800px;
  margin-bottom: 30px;
}

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

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

.page-faq__hero-image-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
}

.page-faq__hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.5); /* Darken image to ensure text contrast */
  position: absolute;
  top: 0;
  left: 0;
}

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

.page-faq__section-title {
  font-size: 2.2em;
  text-align: center;
  margin-bottom: 40px;
}

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

.page-faq__dark-bg .page-faq__section-title,
.page-faq__dark-bg .page-faq__faq-heading {
  color: #ffffff;
}

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

.page-faq__light-bg .page-faq__section-title,
.page-faq__light-bg .page-faq__faq-heading {
  color: #017439;
}

.page-faq__light-bg .page-faq__faq-toggle {
  color: #017439;
}

/* FAQ List */
.page-faq__faq-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
  max-width: 900px;
  margin: 0 auto;
}

.page-faq__faq-item {
  background-color: rgba(255, 255, 255, 0.1); /* Slightly transparent white on dark background */
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  transition: background-color 0.3s ease;
}

.page-faq__light-bg .page-faq__faq-item {
  background-color: #f8f8f8;
  border: 1px solid #e0e0e0;
}

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

.page-faq__light-bg .page-faq__faq-item:hover {
  background-color: #f0f0f0;
}

.page-faq__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 25px;
  cursor: pointer;
  font-weight: bold;
  font-size: 1.1em;
  color: #ffffff;
  transition: color 0.3s ease;
}

.page-faq__light-bg .page-faq__faq-question {
  color: #017439;
}

.page-faq__faq-question:hover {
  color: #FFFF00; /* Yellow on hover for better visibility */
}

.page-faq__light-bg .page-faq__faq-question:hover {
  color: #C30808; /* Red on hover for light background */
}

.page-faq__faq-heading {
  margin: 0;
  flex-grow: 1;
  text-align: left;
  color: inherit;
}

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

.page-faq__light-bg .page-faq__faq-toggle {
  color: #017439;
}

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

.page-faq__light-bg .page-faq__faq-item.active .page-faq__faq-toggle {
  color: #C30808;
}

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

.page-faq__light-bg .page-faq__faq-answer {
  color: #333333;
}

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

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

.page-faq__faq-answer ul {
  list-style-type: disc;
  margin-left: 20px;
  padding-left: 0;
}

.page-faq__faq-answer li {
  margin-bottom: 5px;
}

/* Buttons */
.page-faq__btn-primary {
  display: inline-block;
  background-color: #C30808; /* Register/Login button color */
  color: #FFFF00; /* Register/Login font color */
  padding: 12px 25px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.3s ease, color 0.3s ease;
  border: none;
  cursor: pointer;
  text-align: center;
  white-space: normal;
  word-wrap: break-word;
  box-sizing: border-box;
}

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

/* Image blocks within content */
.page-faq__image-block {
  margin-bottom: 40px;
  text-align: center;
}

.page-faq__content-image {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* Links within content */
.page-faq a:not([class*="btn"]) {
  color: #FFFF00; /* Yellow for links on dark background */
  text-decoration: underline;
}

.page-faq__light-bg a:not([class*="btn"]) {
  color: #C30808; /* Red for links on light background */
}

.page-faq a:not([class*="btn"]):hover {
  color: #ffffff;
}

.page-faq__light-bg a:not([class*="btn"]):hover {
  color: #017439;
}

/* Responsive Design */
@media (min-width: 768px) {
  .page-faq__hero-section {
    flex-direction: row; /* Desktop: row layout */
    text-align: left;
    padding: 100px 20px;
  }

  .page-faq__hero-content {
    max-width: 50%;
    margin-right: 50px;
    margin-bottom: 0;
  }

  .page-faq__main-title {
    font-size: 3.5em;
  }

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

  .page-faq__hero-image-wrapper {
    position: relative;
    width: 50%;
    height: auto;
    min-height: 400px;
  }

  .page-faq__hero-image {
    position: relative;
    border-radius: 8px;
    filter: brightness(0.8); /* Less darkening on desktop image */
  }

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

  .page-faq__faq-question {
    font-size: 1.2em;
    padding: 20px 30px;
  }

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

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

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

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

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

  .page-faq__hero-section {
    padding: 60px 15px;
    padding-top: var(--header-offset, 120px) !important; /* Ensure mobile header offset */
  }

  .page-faq__hero-image-wrapper {
    display: none; /* Hide hero image on small screens for better focus on content */
  }

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

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

  .page-faq__section-title {
    font-size: 1.8em;
    margin-bottom: 30px;
  }

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

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

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

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

  .page-faq__image-block,
  .page-faq__container,
  .page-faq__hero-content {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    overflow-x: hidden;
  }

  /* Mobile button responsiveness */
  .page-faq__btn-primary,
  .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,
  .page-faq__button-group,
  .page-faq__btn-container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    flex-wrap: wrap !important;
    gap: 10px;
    overflow-x: hidden;
  }

  .page-faq__cta-buttons {
    display: flex;
    flex-direction: column;
  }
}