/* style/faq.css */

/* Base styles for the FAQ page content */
.page-faq {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #333333; /* Dark text for light body background */
  background-color: #ffffff; /* Explicitly set for content area if needed */
  padding-bottom: 60px; /* Add some padding at the bottom */
}

/* Header offset for the main content or hero section */
.page-faq__hero-section {
  position: relative;
  width: 100%;
  padding: 80px 20px;
  padding-top: var(--header-offset, 120px); /* Ensures content is not hidden by fixed header */
  background-color: #26A9E0; /* Main brand color */
  color: #ffffff;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 400px;
}

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

.page-faq__main-title {
  font-size: 2.8em;
  margin-bottom: 20px;
  color: #ffffff;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.page-faq__description {
  font-size: 1.2em;
  margin-bottom: 30px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  color: #ffffff;
}

.page-faq__cta-group {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap; /* Allow wrapping 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, border-color 0.3s ease;
  white-space: normal; /* Allow text to wrap */
  word-wrap: break-word; /* Break long words */
  max-width: 100%; /* Ensure button fits container */
  box-sizing: border-box;
}

.page-faq__btn-primary {
  background-color: #EA7C07; /* Login color */
  color: #ffffff;
  border: 2px solid #EA7C07;
}

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

.page-faq__btn-secondary {
  background-color: #ffffff;
  color: #26A9E0; /* Main brand color */
  border: 2px solid #26A9E0;
}

.page-faq__btn-secondary:hover {
  background-color: #f0f0f0;
  color: #1e87b7;
  border-color: #1e87b7;
}

.page-faq__btn-text {
  display: inline-block;
  color: #26A9E0; /* Main brand color */
  text-decoration: underline;
  margin-top: 10px;
  font-weight: bold;
  transition: color 0.3s ease;
}

.page-faq__btn-text:hover {
  color: #1e87b7;
}

.page-faq__content-area {
  padding: 60px 0;
  background-color: #ffffff;
  color: #333333;
}

.page-faq__section-title {
  font-size: 2.2em;
  color: #26A9E0; /* Main brand color */
  text-align: center;
  margin-bottom: 40px;
  margin-top: 60px;
  font-weight: bold;
}

.page-faq__text-block {
  font-size: 1.1em;
  margin-bottom: 30px;
  text-align: justify;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.page-faq__faq-list {
  max-width: 900px;
  margin: 0 auto 50px auto;
}

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

.page-faq__faq-item[open] {
  background-color: #ffffff;
  border-color: #26A9E0;
}

.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: #eaf7ff; /* Light blue background for question */
  border-bottom: 1px solid #e0e0e0;
  transition: background-color 0.3s ease;
  list-style: none; /* Remove default marker for details/summary */
}

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

.page-faq__faq-item[open] .page-faq__faq-question {
  background-color: #26A9E0; /* Main brand color when open */
  color: #ffffff;
  border-bottom-color: #26A9E0;
}

.page-faq__faq-item[open] .page-faq__faq-question:hover {
  background-color: #1e87b7;
}

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

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

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

.page-faq__faq-item[open] .page-faq__faq-toggle {
  transform: rotate(45deg); /* Rotate for 'x' effect */
}

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

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

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

.page-faq__image {
  display: block;
  margin: 40px auto;
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.page-faq__related-links {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin-top: 20px;
}

.page-faq__cta-group--bottom {
  margin-top: 50px;
  margin-bottom: 20px;
}

/* --- Responsive Styles --- */

/* Tablet and smaller desktops */
@media (max-width: 1024px) {
  .page-faq__main-title {
    font-size: 2.4em;
  }

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

  .page-faq__description,
  .page-faq__text-block,
  .page-faq__faq-question,
  .page-faq__faq-answer {
    font-size: 1em;
  }
}

/* Mobile devices */
@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; /* Ensure mobile header offset */
    min-height: 300px;
  }

  .page-faq__main-title {
    font-size: 2em;
    margin-bottom: 15px;
  }

  .page-faq__description {
    font-size: 1em;
    margin-bottom: 20px;
  }

  .page-faq__cta-group {
    flex-direction: column;
    gap: 15px;
    padding: 0 15px; /* Add padding to CTA group */
    width: 100%;
    box-sizing: border-box;
  }

  .page-faq__btn-primary,
  .page-faq__btn-secondary {
    padding: 12px 20px;
    font-size: 1em;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
  }

  .page-faq__content-area {
    padding: 40px 0;
  }

  .page-faq__container {
    padding: 0 15px; /* Add side padding to container */
  }

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

  .page-faq__text-block {
    font-size: 0.95em;
    margin-bottom: 20px;
  }

  .page-faq__faq-list {
    margin-bottom: 30px;
  }

  .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;
    display: block !important;
    margin: 30px auto !important; /* Adjust margin for mobile */
  }

  /* Ensure all image containers are responsive */
  .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;
  }
}

/* Small mobile devices */
@media (max-width: 480px) {
  .page-faq__main-title {
    font-size: 1.8em;
  }

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

  .page-faq__faq-question {
    font-size: 0.9em;
    padding: 12px 15px;
  }

  .page-faq__faq-answer {
    font-size: 0.9em;
    padding: 12px 15px;
  }
}