/* ===== DEDICATED FAQ STYLES ===== */
/* This file contains only FAQ-related styles to prevent conflicts */

/* FAQ Section Container - Properly scoped */
#faq.faq-compact {
  padding: 60px 0;
  background: #ffffff !important;
  position: relative;
  overflow: hidden;
  margin: 40px 0;
  color: #1f2937;
  border-top: 1px solid #e2e8f0;
}

/* FAQ Layout Container */
#faq .faq-layout {
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: 24px;
  max-width: 1200px;
  margin: 0 auto;
  align-items: start;
  min-height: 300px;
  padding: 0 20px;
}

/* Sidebar Navigation */
#faq .faq-sidebar {
  background: #f8fafc;
  border-radius: 8px;
  padding: 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  border: 1px solid rgba(58, 166, 164, 0.1);
  height: fit-content;
  position: sticky;
  top: 20px;
}

#faq .faq-sidebar h3 {
  display: none;
}

#faq .faq-categories {
  list-style: none;
  padding: 0;
  margin: 0;
}

#faq .faq-category-item {
  margin-bottom: 4px;
}

#faq .faq-category-btn {
  width: 100%;
  background: transparent;
  border: none;
  padding: 8px 12px;
  text-align: left;
  cursor: pointer;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 500;
  color: #64748b;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

#faq .faq-category-btn:hover {
  background: rgba(58, 166, 164, 0.08);
  color: #1e293b;
}

#faq .faq-category-btn.active {
  background: linear-gradient(135deg, #3AA6A4, #297474);
  color: white;
  box-shadow: 0 4px 12px rgba(58, 166, 164, 0.2);
}

#faq .faq-category-count {
  background: rgba(255, 255, 255, 0.2);
  color: inherit;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 600;
}

/* Main Content Area */
#faq .faq-content {
  background: transparent;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
  border: none;
  min-height: 250px;
}

#faq .faq-category-title {
  display: none;
}

#faq .faq-category-icon {
  display: none;
}

#faq .faq-category-description {
  display: none;
}

/* FAQ Items Grid */
#faq .faq-items-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

/* When a question is expanded, make it span full width */
#faq .faq-item-modern.expanded {
  grid-column: 1 / -1;
}

#faq .faq-item-modern {
  background: #f8fafc;
  border-radius: 8px;
  border: 1px solid rgba(58, 166, 164, 0.1);
  transition: all 0.3s ease;
  overflow: hidden;
}

#faq .faq-item-modern:hover {
  background: white;
  border-color: rgba(58, 166, 164, 0.3);
  box-shadow: 0 4px 12px rgba(58, 166, 164, 0.1);
}

#faq .faq-question-btn {
  width: 100%;
  background: transparent;
  border: none;
  padding: 12px 16px;
  text-align: left;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.95rem;
  font-weight: 500;
  color: #1e293b;
  transition: all 0.3s ease;
}

#faq .faq-question-btn:hover {
  background: transparent;
}

#faq .faq-question-btn[aria-expanded="true"] {
  background: rgba(58, 166, 164, 0.05);
  color: #3AA6A4;
  font-weight: 600;
}

#faq .faq-toggle-icon {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(58, 166, 164, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  color: #3AA6A4;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

#faq .faq-question-btn[aria-expanded="true"] .faq-toggle-icon {
  background: #3AA6A4;
  color: white;
  transform: rotate(45deg);
  box-shadow: 0 2px 8px rgba(58, 166, 164, 0.3);
}

#faq .faq-answer {
  padding: 0 16px;
  max-height: 0;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border-top: 1px solid transparent;
}

#faq .faq-answer[aria-hidden="false"] {
  padding: 0 16px 16px 16px;
  max-height: 150px;
  border-top-color: rgba(58, 166, 164, 0.15);
}

#faq .faq-answer p {
  margin: 0;
  color: #475569;
  line-height: 1.6;
  font-size: 0.95rem;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.3s ease 0.1s;
  font-weight: 400;
}

#faq .faq-answer[aria-hidden="false"] p {
  opacity: 1;
  transform: translateY(0);
  color: #9ca3af;
}

/* Category Display Logic */
#faq .faq-category {
  display: none;
}

#faq .faq-category.active {
  display: block;
}

/* FAQ Title Styling - Aligned with content */
#faq .faq-compact h2 {
  text-align: left;
  font-size: 2.5rem;
  font-weight: 800;
  color: #1e293b;
  margin-top: 40px;
  margin-bottom: 20px;
  margin-left: 274px;
  position: relative;
  letter-spacing: -0.02em;
}

#faq .faq-compact h2::before {
  content: '';
  position: absolute;
  top: -15px;
  left: 0;
  width: 80px;
  height: 4px;
  background: linear-gradient(90deg, #3AA6A4, #297474);
  border-radius: 2px;
}

#faq .faq-compact h2::after {
  content: '';
  position: absolute;
  bottom: -15px;
  left: 0;
  width: 80px;
  height: 4px;
  background: linear-gradient(90deg, #3AA6A4, #297474);
  border-radius: 2px;
}

/* FAQ Subtitle Styling - Aligned with content */
#faq .faq-compact p {
  text-align: left;
  font-size: 1.1rem;
  color: #6c757d;
  margin-bottom: 30px;
  margin-left: 274px;
  max-width: 600px;
}

/* Decorative Elements */
#faq.faq-compact::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 300px;
  height: 8px;
  background: linear-gradient(90deg, #3AA6A4 0%, #297474 50%, #3AA6A4 100%);
  border-radius: 0 0 4px 4px;
  clip-path: polygon(0 0, 100% 0, 95% 100%, 5% 100%);
}

#faq.faq-compact::after {
  display: none;
}

#faq .faq-compact .container {
  position: relative;
  z-index: 1;
}

/* Mobile Responsive */
@media (max-width: 1024px) {
  #faq .faq-layout {
    grid-template-columns: 1fr;
    gap: 24px;
    min-height: 500px;
  }
  
  #faq .faq-sidebar {
    position: static;
    order: 2;
  }
  
  #faq .faq-content {
    order: 1;
    min-height: 400px;
  }
  
  #faq .faq-items-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  #faq .faq-item-modern.expanded {
    grid-column: 1 / -1;
  }
}

@media (max-width: 768px) {
  #faq.faq-compact {
    padding: 15px 0;
  }
  
  #faq .faq-content {
    padding: 15px;
  }
  
  #faq .faq-question-btn {
    padding: 12px 14px;
    font-size: 0.95rem;
  }
  
  #faq .faq-answer[aria-hidden="false"] {
    padding: 0 14px 12px 14px;
  }
  
  #faq .faq-items-grid {
    grid-template-columns: 1fr;
  }
  
  #faq .faq-item-modern.expanded {
    grid-column: 1 / -1;
  }
}

@media (max-width: 480px) {
  #faq .faq-compact h2 {
    font-size: 1.5rem;
    margin-bottom: 12px;
  }
  
  #faq .faq-question-btn {
    padding: 10px 12px;
    font-size: 0.9rem;
  }
  
  #faq .faq-answer[aria-hidden="false"] {
    padding: 0 12px 10px 12px;
  }
  
  #faq .faq-toggle-icon {
    width: 18px;
    height: 18px;
    font-size: 0.9rem;
  }
}

/* Accessibility Enhancements */
@media (prefers-reduced-motion: reduce) {
  #faq .faq-item-modern,
  #faq .faq-question-btn,
  #faq .faq-answer,
  #faq .faq-toggle-icon {
    transition: none;
  }
  
  #faq .faq-item-modern:hover {
    transform: none;
  }
}

/* Focus Styles for Accessibility */
#faq .faq-question-btn:focus-visible {
  outline: 3px solid #3AA6A4;
  outline-offset: 2px;
  border-radius: 8px;
}

#faq .faq-category-btn:focus-visible {
  outline: 3px solid #3AA6A4;
  outline-offset: 2px;
  border-radius: 6px;
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
  #faq.faq-compact {
    background: #ffffff !important;
    border-top-color: #e2e8f0;
  }
  
  #faq .faq-item-modern {
    background: rgba(30, 41, 59, 0.9);
    border-color: rgba(58, 166, 164, 0.2);
  }
  
  #faq .faq-compact h2 {
    background: linear-gradient(135deg, #f8fafc 0%, #3AA6A4 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
  }
  
  #faq .faq-question-btn {
    color: #f1f5f9;
  }
  
  #faq .faq-question-btn:hover {
    color: #3AA6A4;
  }
  
  #faq .faq-question-btn[aria-expanded="true"] {
    background: linear-gradient(135deg, rgba(58, 166, 164, 0.15), rgba(58, 166, 164, 0.05));
  }
  
  #faq .faq-answer p {
    color: #cbd5e1;
  }
  
  #faq .faq-answer[aria-hidden="false"] {
    border-top-color: rgba(58, 166, 164, 0.25);
  }
  
  #faq .faq-sidebar {
    background: rgba(30, 41, 59, 0.9);
    border-color: rgba(58, 166, 164, 0.2);
  }
  
  #faq .faq-category-btn {
    color: #cbd5e1;
  }
  
  #faq .faq-category-btn:hover {
    color: #f1f5f9;
  }
  
  #faq.faq-compact::after {
    background: 
      radial-gradient(ellipse at top center, rgba(58, 166, 164, 0.04) 0%, transparent 70%),
      radial-gradient(ellipse at bottom center, rgba(58, 166, 164, 0.04) 0%, transparent 70%);
  }
}
