.faq-hero-section {
  background-image: url(../images/faq/faq_hero_original.webp);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  gap: 0.8rem;
  width: 100%;
  min-height: calc(100vh - 118px); /* Match index.html hero height */
  padding: 2rem 2rem 6rem 2rem; /* Extra bottom padding to keep text away from edge */
  color: white;
  text-align: center;
}

.faq-hero-text,
.faq-hero-subtext {
  margin: 0;
  text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.9); /* Stronger shadow for better readability */
  position: relative;
  z-index: 1;
  /* Initial state for animations */
  opacity: 0;
  transform: translate3d(0, 30px, 0); /* Start 30px below final position */
  transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94), 
              transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Animation states */
.faq-hero-text.animate-in {
  opacity: 1;
  transform: translate3d(0, 0, 0);
  transition-delay: 0.3s; /* Start after background loads */
}

.faq-hero-subtext.animate-in {
  opacity: 1;
  transform: translate3d(0, 0, 0);
  transition-delay: 0.6s; /* Start after title */
}

/* Respect user's motion preferences */
@media (prefers-reduced-motion: reduce) {
  .faq-hero-text,
  .faq-hero-subtext {
    opacity: 1;
    transform: none;
    transition: none;
  }
  
  .faq-hero-text.animate-in,
  .faq-hero-subtext.animate-in {
    transition-delay: 0s;
  }
}

.faq-hero-text {
  font-size: clamp(2em, 8vw, 4em); /* Responsive font size */
}

.faq-hero-subtext {
  font-style: italic;
  font-size: clamp(1em, 3vw, 1.2em); /* Responsive font size */
  line-height: 1.4;
}
/* FAQ Content Section */
.faq-content-section {
  background-color: #cbd6db;
  padding: 4rem 10%;
  min-height: 50vh;
}

.faq-container {
  margin: 0 auto;
}

.faq-item {
  background-color: white;
  margin-bottom: 1.5rem;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: box-shadow 0.3s ease;
}

.faq-item:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 2rem;
  cursor: pointer;
  user-select: none;
}

.faq-question h3 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
  flex: 1;
  padding-right: 2rem;
  color: #262a2d;
}

.faq-toggle {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease;
  flex-shrink: 0;
  position: relative;
}

.faq-toggle:hover {
  transform: scale(1.1);
}

.faq-toggle svg {
  width: 24px;
  height: 24px;
  pointer-events: none; /* Prevent SVG from blocking click events */
  position: absolute;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.icon-plus {
  opacity: 1;
  transform: rotate(0deg);
}

.icon-minus {
  opacity: 0;
  transform: rotate(-90deg);
}

/* When item is active/open */
.faq-item.active .icon-plus {
  opacity: 0;
  transform: rotate(90deg);
}

.faq-item.active .icon-minus {
  opacity: 1;
  transform: rotate(0deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1),
              padding 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 0 2rem;
}

.faq-item.active .faq-answer {
  max-height: 500px;
  padding: 0 2rem 1.5rem 2rem;
}

.faq-answer p {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.7;
  color: #4a4a4a;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
  .faq-hero-section {
    min-height: 100vh; /* Full viewport height on mobile */
    padding: 1.5rem 1.5rem 8rem 1.5rem; /* More bottom padding for mobile to keep text higher */
  }

  .faq-content-section {
    padding: 3rem 5%;
  }

  .faq-question {
    padding: 1.25rem 1.5rem;
  }

  .faq-question h3 {
    font-size: 1.1rem;
    padding-right: 1rem;
  }

  .faq-toggle svg {
    width: 20px;
    height: 20px;
  }

  .faq-item.active .faq-answer {
    padding: 0 1.5rem 1.25rem 1.5rem;
  }

  .faq-answer p {
    font-size: 1rem;
  }
}
