/* FAQ-specific CSS */

/* FAQ Sidebar Styles */
.faq-sidebar {
  position: sticky;
  top: 120px;
  width: 280px;
  max-height: calc(100vh - 140px);
  overflow-y: auto;
  background: white;
  border-radius: 1.5rem;
  border: 1px solid #e5e7eb;
  padding: 1.5rem;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
  height: fit-content;
  z-index: 10;
  transition: all 0.3s ease;
}

.faq-sidebar.fixed {
  position: fixed;
  top: 120px;
  left: calc(50% - 640px + 2rem);
  width: 280px;
}

.faq-sidebar::-webkit-scrollbar {
  width: 6px;
}

.faq-sidebar::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 3px;
}

.faq-sidebar::-webkit-scrollbar-thumb {
  background: var(--accent);
  border-radius: 3px;
}

.faq-sidebar::-webkit-scrollbar-thumb:hover {
  background: #249974;
}

/* FAQ Content Sections */
.faq-content {
  scroll-margin-top: 120px;
}

/* FAQ Item Styles */
.faq-item {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border-left: 4px solid transparent;
  background: white;
  border-radius: 1rem;
  border: 1px solid #e5e7eb;
  padding: 1.5rem;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
  margin-bottom: 1rem;
}

.faq-item:hover {
  border-left-color: var(--accent);
  background-color: rgba(44, 169, 130, 0.02);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  transform: translateY(-1px);
}

/* FAQ Question Styles */
.faq-question {
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0;
  padding: 0;
}

.faq-question h3 {
  font-size: 1.125rem;
  font-weight: 500;
  color: #111827;
  margin: 0;
  flex: 1;
  padding-right: 1rem;
  line-height: 1.4;
}

.faq-question:hover h3 {
  color: var(--accent);
}

.faq-question svg {
  width: 1.25rem;
  height: 1.25rem;
  color: var(--accent);
  transition: transform 0.3s ease;
  flex-shrink: 0;
}

/* FAQ Answer Styles */
.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),
              margin 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 0 1rem;
  margin: 0;
  color: #6b7280;
  line-height: 1.6;
  font-size: 1rem;
}

.faq-answer.faq-open {
  max-height: 500px;
  padding: 1rem;
  margin-top: 1rem;
  border-top: 1px solid #f3f4f6;
}

/* Sidebar Link Styles */
.faq-sidebar-link {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border-left: 3px solid transparent;
  display: block;
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  color: #6b7280;
  text-decoration: none;
  margin-bottom: 0.5rem;
}

.faq-sidebar-link:hover,
.faq-sidebar-link.faq-active {
  border-left-color: var(--accent);
  background-color: rgba(44, 169, 130, 0.08);
  transform: translateX(5px);
  color: #111827;
}

.faq-sidebar-link.faq-active {
  font-weight: 500;
  color: var(--accent);
}

/* FAQ Section Headers */
.faq-section-header {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 1rem;
  border-bottom: 2px solid rgba(44, 169, 130, 0.1);
  padding-bottom: 0.5rem;
}

/* FAQ CTA Section */
.faq-cta {
  background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
  border-radius: 1.5rem;
  padding: 2rem;
  text-align: center;
  border: 1px solid #e5e7eb;
  margin-top: 3rem;
}

.faq-cta h3 {
  font-size: 1.5rem;
  font-weight: 600;
  color: #111827;
  margin-bottom: 1rem;
}

.faq-cta p {
  color: #6b7280;
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.faq-cta-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

.faq-btn-primary {
  padding: 0.75rem 1.5rem;
  background-color: var(--accent);
  color: white;
  border-radius: 1rem;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.faq-btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.5s;
}

.faq-btn-primary:hover::before {
  left: 100%;
}

.faq-btn-primary:hover {
  background-color: #249974;
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(44, 169, 130, 0.3);
}

.faq-btn-secondary {
  padding: 0.75rem 1.5rem;
  border: 1px solid #d1d5db;
  color: #374151;
  border-radius: 1rem;
  text-decoration: none;
  font-weight: 500;
  background: white;
  transition: all 0.3s ease;
}

.faq-btn-secondary:hover {
  background-color: #f9fafb;
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Responsive Design */
@media (max-width: 1024px) {
  .faq-sidebar {
    position: static !important;
    width: 100%;
    max-height: none;
    margin-bottom: 2rem;
    left: auto !important;
    top: auto !important;
  }
  
  .faq-sidebar.fixed {
    position: static !important;
  }
  
  .faq-content {
    scroll-margin-top: 100px;
  }
}

@media (max-width: 768px) {
  .faq-sidebar {
    position: static !important;
    width: 100%;
    max-height: none;
    padding: 1rem;
    margin-bottom: 1.5rem;
    left: auto !important;
    top: auto !important;
  }
  
  .faq-sidebar.fixed {
    position: static !important;
  }
  
  .faq-content {
    scroll-margin-top: 90px;
  }
  
  .faq-item {
    padding: 1rem;
  }
  
  .faq-question h3 {
    font-size: 1rem;
    padding-right: 0.5rem;
  }
  
  .faq-answer {
    font-size: 0.9rem;
  }
  
  .faq-answer.faq-open {
    padding: 0.75rem;
    margin-top: 0.75rem;
  }
  
  .faq-cta {
    padding: 1.5rem;
  }
  
  .faq-cta h3 {
    font-size: 1.25rem;
  }
  
  .faq-cta-buttons {
    flex-direction: column;
    align-items: center;
  }
  
  .faq-btn-primary,
  .faq-btn-secondary {
    width: 100%;
    max-width: 300px;
    text-align: center;
  }
}

/* Accessibility Enhancements */
.faq-question:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 0.5rem;
}

.faq-sidebar-link:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 0.5rem;
}

/* Animation for FAQ opening/closing */
@keyframes faqSlideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.faq-answer.faq-open {
  animation: faqSlideDown 0.3s ease-out;
}

/* Smooth scroll behavior for the sidebar */
.faq-sidebar {
  scroll-behavior: smooth;
}

/* Loading animation for FAQ items */
.faq-item {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.6s ease-out forwards;
}

.faq-item:nth-child(1) { animation-delay: 0.1s; }
.faq-item:nth-child(2) { animation-delay: 0.2s; }
.faq-item:nth-child(3) { animation-delay: 0.3s; }
.faq-item:nth-child(4) { animation-delay: 0.4s; }
.faq-item:nth-child(5) { animation-delay: 0.5s; }

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}