/* style/faq.css */

/* Base Styles */
.page-faq {
  font-family: 'Arial', sans-serif;
  color: #333333; /* Default dark text for light background */
  line-height: 1.6;
  background-color: #ffffff; /* Explicitly set for contrast logic */
  padding-top: var(--header-offset, 120px); /* Ensure space below fixed header */
}

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

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

.page-faq__section-title--alt {
  color: #333333; /* Darker title for CTA section */
}

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

/* Hero Section */
.page-faq__hero-section {
  position: relative;
  width: 100%;
  height: 500px; /* Adjust height as needed */
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  margin-bottom: 60px;
}

.page-faq__hero-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}

.page-faq__hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6); /* Dark overlay for text readability */
  z-index: 2;
}

.page-faq__hero-content {
  position: relative;
  z-index: 3;
  color: #FFFFFF; /* White text for dark overlay */
  max-width: 900px;
}

.page-faq__hero-title {
  font-size: 3.2em;
  margin-bottom: 20px;
  font-weight: bold;
  color: #FFFFFF; /* White text for hero title */
}

.page-faq__hero-description {
  font-size: 1.4em;
  margin-bottom: 30px;
  color: #FFFFFF; /* White text for hero description */
}

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

/* Buttons */
.page-faq__btn-primary,
.page-faq__btn-secondary {
  display: inline-block;
  padding: 15px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  font-size: 1.1em;
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
  box-sizing: border-box; /* Crucial for responsive buttons */
  white-space: normal; /* Allow text wrap */
  word-wrap: break-word; /* Allow text wrap */
  max-width: 100%; /* Ensure button doesn't overflow */
}

.page-faq__btn-primary {
  background: #26A9E0; /* Brand primary color */
  color: #FFFFFF;
  border: 2px solid #26A9E0;
}

.page-faq__btn-primary:hover {
  background: #1e87b7; /* Slightly darker on hover */
  border-color: #1e87b7;
}

.page-faq__btn-secondary {
  background: transparent;
  color: #FFFFFF;
  border: 2px solid #FFFFFF;
}

.page-faq__btn-secondary:hover {
  background: #FFFFFF;
  color: #26A9E0;
}

/* Introduction Section */
.page-faq__introduction-section {
  padding: 60px 0;
  text-align: center;
}

/* FAQ Section */
.page-faq__faq-section {
  padding: 60px 0;
}

.page-faq__faq-category {
  margin-bottom: 50px;
}

.page-faq__category-title {
  font-size: 2em;
  color: #26A9E0; /* Brand color for category titles */
  margin-bottom: 30px;
  text-align: center;
}

.page-faq__category-image {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0 auto 30px auto;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  min-width: 200px; /* Enforce min size */
  min-height: 200px; /* Enforce min size */
}

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

.page-faq__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  cursor: pointer;
  background-color: #f9f9f9;
  transition: background-color 0.3s ease;
  color: #333333; /* Dark text for light background */
}

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

.page-faq__question-text {
  font-size: 1.2em;
  margin: 0;
  font-weight: bold;
  color: #333333; /* Dark text for question */
}

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

.page-faq__faq-item.active .page-faq__faq-toggle {
  transform: rotate(45deg); /* Rotates from + to X or similar */
}

.page-faq__faq-answer {
  max-height: 0;
  overflow: hidden;
  padding: 0 25px; /* Initial padding 0 */
  transition: max-height 0.3s ease, padding 0.3s ease;
  color: #555555; /* Slightly lighter dark text for answer content */
  background-color: #ffffff;
}

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

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

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

/* CTA Section */
.page-faq__cta-section {
  background-color: #f5f5f5; /* Light grey background */
  padding: 80px 0;
  text-align: center;
  margin-top: 60px;
}

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

/* Ensure all content images meet min size requirements */
.page-faq img:not(.page-faq__hero-image) {
  min-width: 200px;
  min-height: 200px;
}

/* Responsive Styles */
@media (max-width: 992px) {
  .page-faq__hero-title {
    font-size: 2.5em;
  }

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

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

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

  .page-faq__question-text {
    font-size: 1.1em;
  }
}

@media (max-width: 768px) {
  .page-faq {
    font-size: 16px;
    line-height: 1.6;
    padding-top: var(--header-offset, 120px) !important; /* Ensure space below fixed header on mobile */
  }

  .page-faq__hero-section {
    height: 400px;
    margin-bottom: 40px;
  }

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

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

  .page-faq__hero-cta-buttons,
  .page-faq__cta-buttons {
    flex-direction: column;
    gap: 15px;
    padding: 0 15px; /* Add padding to button containers */
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

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

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

  .page-faq__category-title {
    font-size: 1.5em;
    margin-bottom: 25px;
  }

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

  .page-faq__faq-toggle {
    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: 15px 20px;
  }

  .page-faq__introduction-section,
  .page-faq__faq-section,
  .page-faq__cta-section {
    padding: 40px 0;
  }

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

  .page-faq__section,
  .page-faq__card,
  .page-faq__container,
  .page-faq__hero-section,
  .page-faq__introduction-section,
  .page-faq__faq-section,
  .page-faq__cta-section,
  .page-faq__faq-category {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }
  /* Ensure content images are not shrunk below 200px by CSS in content area */
  .page-faq img:not(.page-faq__hero-image) {
    min-width: 200px !important;
    min-height: 200px !important;
  }
}

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

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