/* style/faq.css */
:root {
  --primary-color: #007bff;
  --secondary-color: #28a745;
  --text-dark: #333333;
  --text-light: #ffffff;
  --bg-light: #f8f9fa;
  --border-color: #e0e0e0;
}

.page-faq {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: var(--text-dark); /* Default text color for light backgrounds */
  background-color: var(--bg-light); /* Assuming light background from shared.css */
}

/* Fixed header padding for main content */
.page-faq__hero-banner-section {
  padding-top: 120px; /* Desktop: Adjust based on fixed header height */
}

.page-faq__hero-banner-container {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 300px;
}

.page-faq__hero-banner-image {
  width: 100%;
  height: auto;
  max-height: 400px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 20px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.page-faq__hero-banner-content {
  position: relative;
  z-index: 2;
  background: rgba(255, 255, 255, 0.9);
  padding: 25px 30px;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  max-width: 800px;
  transform: translateY(-50%);
  margin-top: -100px; /* Pull content up over image */
}

.page-faq__page-title {
  font-size: 38px;
  font-weight: bold;
  color: var(--primary-color);
  margin-bottom: 15px;
  line-height: 1.2;
}

.page-faq__page-description {
  font-size: 18px;
  color: var(--text-dark);
  line-height: 1.5;
}

.page-faq__content-section {
  padding: 60px 20px;
  background-color: var(--bg-light);
}

.page-faq__container {
  max-width: 1200px;
  margin: 0 auto;
}

.page-faq__section-heading {
  font-size: 32px;
  font-weight: bold;
  color: var(--primary-color);
  text-align: center;
  margin-bottom: 20px;
}

.page-faq__intro-text {
  font-size: 17px;
  text-align: center;
  max-width: 800px;
  margin: 0 auto 40px auto;
  color: var(--text-dark);
}

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

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

.page-faq__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: 5px;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.3s ease, border-color 0.3s ease;
  position: relative;
}

.page-faq__faq-question:hover {
  background: #f5f5f5;
  border-color: #d0d0d0;
}

.page-faq__faq-question:active {
  background: #eeeeee;
}

.page-faq__faq-question h3 {
  margin: 0;
  padding: 0;
  flex: 1;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.5;
  pointer-events: none; /* Allows click to pass through to parent */
  color: var(--text-dark);
}

.page-faq__faq-toggle {
  font-size: 24px;
  font-weight: bold;
  line-height: 1;
  color: #666;
  transition: transform 0.3s ease, color 0.3s ease;
  flex-shrink: 0;
  margin-left: 15px;
  pointer-events: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
}

.page-faq__faq-item.active .page-faq__faq-toggle {
  color: var(--primary-color);
  transform: rotate(45deg); /* Change '+' to 'x' visually */
}

.page-faq__faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), padding 0.4s ease, opacity 0.3s ease;
  padding: 0 15px;
  opacity: 0;
  color: var(--text-dark);
  background: #f9f9f9;
  border-left: 1px solid var(--border-color);
  border-right: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  border-radius: 0 0 5px 5px;
}

.page-faq__faq-item.active .page-faq__faq-answer {
  max-height: 2000px !important; /* Sufficiently large to show all content */
  padding: 20px 15px !important;
  opacity: 1;
}

.page-faq__faq-answer p {
  margin-bottom: 15px;
  font-size: 16px;
  line-height: 1.7;
}

.page-faq__faq-answer ul {
  margin-left: 25px;
  margin-bottom: 15px;
  list-style-type: disc;
}

.page-faq__faq-answer li {
  margin-bottom: 8px;
  font-size: 16px;
  line-height: 1.6;
}

.page-faq__faq-answer strong {
  color: var(--primary-color);
}

.page-faq__image-in-answer {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 20px auto;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Responsive Design */
@media (max-width: 992px) {
  .page-faq__hero-banner-content {
    padding: 20px 25px;
    max-width: 90%;
  }

  .page-faq__page-title {
    font-size: 32px;
  }

  .page-faq__page-description {
    font-size: 16px;
  }

  .page-faq__section-heading {
    font-size: 28px;
  }

  .page-faq__intro-text {
    font-size: 16px;
  }
}

@media (max-width: 768px) {
  .page-faq__hero-banner-section {
    padding-top: 100px !important; /* Mobile: Adjust based on fixed header height */
    padding-bottom: 20px;
  }

  .page-faq__hero-banner-image {
    max-height: 250px;
  }

  .page-faq__hero-banner-content {
    transform: translateY(-20%); /* Less pull up on mobile */
    margin-top: -50px;
    padding: 15px 20px;
  }

  .page-faq__page-title {
    font-size: 28px;
  }

  .page-faq__page-description {
    font-size: 15px;
  }

  .page-faq__content-section {
    padding: 40px 15px;
  }

  .page-faq__section-heading {
    font-size: 24px;
    margin-bottom: 15px;
  }

  .page-faq__intro-text {
    font-size: 15px;
    margin-bottom: 30px;
  }

  .page-faq__faq-question {
    padding: 15px;
    flex-wrap: wrap;
  }
  
  .page-faq__faq-question h3 {
    font-size: 15px;
    margin-bottom: 0;
    width: calc(100% - 40px);
  }
  
  .page-faq__faq-toggle {
    margin-left: 10px;
    width: 24px;
    height: 24px;
    font-size: 20px;
  }
  
  .page-faq__faq-answer {
    padding: 0 15px;
  }
  
  .page-faq__faq-item.active .page-faq__faq-answer {
    padding: 15px !important;
  }

  .page-faq__faq-answer p,
  .page-faq__faq-answer li {
    font-size: 14px;
  }

  /* Ensure all images are responsive */
  .page-faq img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  
  .page-faq__hero-banner-section,
  .page-faq__hero-banner-container,
  .page-faq__content-section,
  .page-faq__container,
  .page-faq__faq-item {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }
  .page-faq__hero-banner-section {
    padding-left: 0;
    padding-right: 0;
  }
  .page-faq__hero-banner-container {
    padding-left: 15px;
    padding-right: 15px;
  }
}