/* 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 is 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 {
  padding: 80px 20px;
  text-align: center;
  color: #ffffff;
  background-color: #017439; /* Brand primary color */
  padding-top: var(--header-offset, 120px); /* Ensure space for fixed header */
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.page-faq__hero-title {
  font-size: 2.8em;
  margin-bottom: 20px;
  font-weight: bold;
  color: #ffffff;
}

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

/* General Content Area */
.page-faq__content-area {
  background-color: #ffffff; /* Light background for main content */
  color: #333333; /* Dark text for light background */
  padding: 60px 0;
}

.page-faq__section-title {
  font-size: 2.2em;
  color: #017439; /* Brand primary color for titles */
  text-align: center;
  margin-bottom: 40px;
  font-weight: bold;
}

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

.page-faq__faq-item {
  background-color: #f9f9f9;
  border: 1px solid #e0e0e0;
  margin-bottom: 15px;
  border-radius: 8px;
  overflow: hidden;
}

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

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

.page-faq__question-text {
  margin: 0;
  color: #333333;
}

.page-faq__faq-toggle {
  font-size: 1.5em;
  line-height: 1;
  transition: transform 0.3s ease;
  color: #017439;
}

.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, padding 0.3s ease;
  color: #555555;
  background-color: #ffffff;
}

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

.page-faq__faq-answer p {
  margin: 0;
  color: #555555;
}

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

/* Call to Action Banner */
.page-faq__cta-banner {
  background-color: #017439; /* Brand primary color */
  color: #ffffff;
  padding: 50px 20px;
  text-align: center;
  border-radius: 10px;
  margin-top: 40px;
  margin-bottom: 60px;
}

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

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

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

/* Buttons */
.page-faq__btn-primary,
.page-faq__btn-register,
.page-faq__btn-login {
  display: inline-block;
  padding: 15px 30px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.3s ease, transform 0.3s ease;
  white-space: normal; /* Allow text wrapping */
  word-wrap: break-word; /* Allow text wrapping */
  box-sizing: border-box;
  max-width: 100%;
}

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

.page-faq__btn-primary:hover {
  background-color: #a00606;
  transform: translateY(-2px);
}

.page-faq__btn-register {
  background-color: #C30808;
  color: #FFFF00;
}

.page-faq__btn-register:hover {
  background-color: #a00606;
  transform: translateY(-2px);
}

.page-faq__btn-login {
  background-color: #C30808;
  color: #FFFF00;
}

.page-faq__btn-login:hover {
  background-color: #a00606;
  transform: translateY(-2px);
}

/* Image Gallery */
.page-faq__image-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 60px;
  margin-bottom: 60px;
}

.page-faq__image-item {
  background-color: #f9f9f9;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  text-align: center;
  color: #333333;
}

.page-faq__image-item img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  min-height: 200px; /* Minimum image height */
}

.page-faq__image-caption {
  padding: 15px;
  font-size: 0.95em;
  color: #555555;
}

/* Responsive Styles */
@media (max-width: 1024px) {
  .page-faq__hero-title {
    font-size: 2.4em;
  }
  .page-faq__section-title {
    font-size: 1.8em;
  }
}

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

  .page-faq__hero-section {
    padding: 60px 15px;
  }

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

  .page-faq__hero-description {
    font-size: 1em;
    margin-bottom: 25px;
  }

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

  .page-faq__container {
    padding: 0 15px; /* Add horizontal padding for mobile content */
  }

  .page-faq__section-title {
    font-size: 1.6em;
    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;
  }

  .page-faq__cta-banner {
    padding: 40px 15px;
    margin-top: 30px;
    margin-bottom: 40px;
  }

  .page-faq__cta-title {
    font-size: 1.8em;
    margin-bottom: 10px;
  }

  .page-faq__cta-description {
    font-size: 0.95em;
    margin-bottom: 25px;
  }

  .page-faq__cta-buttons {
    flex-direction: column;
    gap: 15px;
  }

  .page-faq__btn-primary,
  .page-faq__btn-register,
  .page-faq__btn-login {
    width: 100% !important; /* Force full width on mobile */
    max-width: 100% !important;
    padding: 12px 15px;
    font-size: 1em;
  }

  .page-faq__image-gallery {
    grid-template-columns: 1fr;
    gap: 20px;
    margin-top: 40px;
    margin-bottom: 40px;
  }

  /* Mobile responsive image styles (important for all images) */
  .page-faq img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }

  .page-faq__section,
  .page-faq__card,
  .page-faq__container,
  .page-faq__cta-buttons,
  .page-faq__image-gallery {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    /* padding-left and padding-right are already set in .page-faq__container */
    overflow: hidden !important;
  }

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