/* =========================================
   FAQ SECTION - ATOMIC LAB DESIGN SYSTEM
   ========================================= */

/* FAQ Container - Futuristic Lab Panel */
.faq-section {
  margin: 80px 0;
  padding: 60px 40px;
  background: linear-gradient(135deg,
      rgba(0, 10, 25, 0.95) 0%,
      rgba(0, 5, 15, 0.98) 50%,
      rgba(0, 20, 40, 0.95) 100%);
  border: 1px solid rgba(0, 212, 255, 0.2);
  border-radius: 24px;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(20px);
  box-shadow:
    0 0 60px rgba(0, 212, 255, 0.1),
    inset 0 0 120px rgba(0, 212, 255, 0.03),
    0 20px 40px rgba(0, 0, 0, 0.5);
}

/* Animated Circuit Pattern Background */
.faq-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image:
    linear-gradient(0deg, rgba(0, 212, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 212, 255, 0.02) 1px, transparent 1px);
  background-size: 40px 40px;
  animation: grid-pulse 20s ease-in-out infinite;
  pointer-events: none;
}

@keyframes grid-pulse {

  0%,
  100% {
    opacity: 0.5;
  }

  50% {
    opacity: 1;
  }
}

/* Section Header */
.faq-header {
  text-align: center;
  margin-bottom: 48px;
  position: relative;
  z-index: 1;
}

.faq-title {
  font-family: 'Orbitron', monospace;
  font-size: 42px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 6px;
  margin: 0 0 16px 0;
  color: transparent;
  background: linear-gradient(45deg, #00D4FF 0%, #BD00FF 50%, #00FF88 100%);
  -webkit-background-clip: text;
  background-clip: text;
  position: relative;
  text-shadow: 0 0 30px rgba(0, 212, 255, 0.5);
}

.faq-subtitle {
  color: rgba(255, 255, 255, 0.5);
  font-size: 16px;
  font-weight: 300;
  letter-spacing: 1px;
  margin: 0;
}

/* Controls Container */
.faq-controls {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-bottom: 40px;
  align-items: center;
}

/* Search Bar - Holographic Input */
.faq-search {
  position: relative;
  width: 100%;
  max-width: 500px;
}

.faq-search-input {
  width: 100%;
  padding: 16px 20px 16px 52px;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(0, 212, 255, 0.2);
  border-radius: 12px;
  color: #fff;
  font-size: 16px;
  font-family: 'Inter', sans-serif;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(10px);
}

.faq-search-input:focus {
  outline: none;
  border-color: #00D4FF;
  background: rgba(0, 0, 0, 0.8);
  box-shadow:
    0 0 0 2px rgba(0, 212, 255, 0.2),
    0 0 40px rgba(0, 212, 255, 0.2),
    inset 0 0 20px rgba(0, 212, 255, 0.05);
  transform: translateY(-2px);
}

.faq-search-input::placeholder {
  color: rgba(255, 255, 255, 0.3);
}

.faq-search-icon {
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  color: #00D4FF;
  font-size: 18px;
  transition: all 0.3s ease;
}

.faq-search-input:focus~.faq-search-icon {
  color: #BD00FF;
  filter: drop-shadow(0 0 10px currentColor);
}

/* Filter Pills - Cyberpunk Style */
.faq-filters {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 20px;
}

.faq-filter-btn {
  padding: 10px 24px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50px;
  color: rgba(255, 255, 255, 0.6);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  gap: 8px;
}

.faq-filter-btn i {
  font-size: 14px;
  transition: all 0.3s ease;
}

/* Scan effect on hover */
.faq-filter-btn::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.6s ease;
}

.faq-filter-btn:hover::before {
  left: 100%;
}

.faq-filter-btn:hover {
  border-color: rgba(0, 212, 255, 0.5);
  color: #fff;
  transform: translateY(-2px);
  box-shadow:
    0 5px 20px rgba(0, 212, 255, 0.3),
    inset 0 0 20px rgba(0, 212, 255, 0.1);
}

.faq-filter-btn.active {
  background: linear-gradient(135deg,
      rgba(0, 212, 255, 0.2) 0%,
      rgba(189, 0, 255, 0.1) 100%);
  border-color: #00D4FF;
  color: #00D4FF;
  box-shadow:
    0 0 20px rgba(0, 212, 255, 0.4),
    inset 0 0 20px rgba(0, 212, 255, 0.1);
}

.faq-filter-btn.active i {
  transform: scale(1.2);
  filter: drop-shadow(0 0 5px currentColor);
}

/* FAQ Items Container */
.faq-items {
  display: grid;
  gap: 20px;
  max-width: 900px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

/* FAQ Item - Holographic Card */
.faq-item {
  background: linear-gradient(135deg,
      rgba(0, 20, 40, 0.8) 0%,
      rgba(0, 10, 30, 0.9) 100%);
  border: 1px solid rgba(0, 212, 255, 0.1);
  border-radius: 16px;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  backdrop-filter: blur(10px);
}

/* Category-specific glow effects */
.faq-item[data-category="properties"] {
  border-color: rgba(0, 212, 255, 0.2);
}

.faq-item[data-category="uses"] {
  border-color: rgba(189, 0, 255, 0.2);
}

.faq-item[data-category="safety"] {
  border-color: rgba(255, 107, 53, 0.2);
}

.faq-item[data-category="discovery"] {
  border-color: rgba(0, 255, 136, 0.2);
}

/* Hover state with elevation */
.faq-item:hover {
  transform: translateY(-4px);
  box-shadow:
    0 12px 40px rgba(0, 0, 0, 0.3),
    0 0 60px rgba(0, 212, 255, 0.1);
}

.faq-item[data-category="properties"]:hover {
  border-color: rgba(0, 212, 255, 0.5);
  box-shadow:
    0 12px 40px rgba(0, 0, 0, 0.3),
    0 0 40px rgba(0, 212, 255, 0.2);
}

.faq-item[data-category="uses"]:hover {
  border-color: rgba(189, 0, 255, 0.5);
  box-shadow:
    0 12px 40px rgba(0, 0, 0, 0.3),
    0 0 40px rgba(189, 0, 255, 0.2);
}

.faq-item[data-category="safety"]:hover {
  border-color: rgba(255, 107, 53, 0.5);
  box-shadow:
    0 12px 40px rgba(0, 0, 0, 0.3),
    0 0 40px rgba(255, 107, 53, 0.2);
}

.faq-item[data-category="discovery"]:hover {
  border-color: rgba(0, 255, 136, 0.5);
  box-shadow:
    0 12px 40px rgba(0, 0, 0, 0.3),
    0 0 40px rgba(0, 255, 136, 0.2);
}

/* FAQ Question - Interactive Header */
.faq-question {
  padding: 24px 24px 24px 64px;
  cursor: pointer;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
  user-select: none;
}

.faq-question:hover {
  background: rgba(0, 0, 0, 0.4);
}

/* Category Icon */
.faq-category-icon {
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-size: 16px;
  transition: all 0.3s ease;
}

.faq-item[data-category="properties"] .faq-category-icon {
  background: rgba(0, 212, 255, 0.1);
  color: #00D4FF;
  border: 1px solid rgba(0, 212, 255, 0.3);
}

.faq-item[data-category="uses"] .faq-category-icon {
  background: rgba(189, 0, 255, 0.1);
  color: #BD00FF;
  border: 1px solid rgba(189, 0, 255, 0.3);
}

.faq-item[data-category="safety"] .faq-category-icon {
  background: rgba(255, 107, 53, 0.1);
  color: #FF6B35;
  border: 1px solid rgba(255, 107, 53, 0.3);
}

.faq-item[data-category="discovery"] .faq-category-icon {
  background: rgba(0, 255, 136, 0.1);
  color: #00FF88;
  border: 1px solid rgba(0, 255, 136, 0.3);
}

.faq-item.expanded .faq-category-icon {
  transform: translateY(-50%) scale(1.1);
  box-shadow: 0 0 20px currentColor;
}

/* Question Text */
.faq-question-text {
  margin: 0;
  font-size: 18px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.5;
  flex: 1;
}

/* Toggle Icon */
.faq-toggle-icon {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(0, 212, 255, 0.3);
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.4);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  flex-shrink: 0;
  position: relative;
}

.faq-toggle-icon::before,
.faq-toggle-icon::after {
  content: '';
  position: absolute;
  background: #00D4FF;
  transition: all 0.3s ease;
}

.faq-toggle-icon::before {
  width: 12px;
  height: 2px;
}

.faq-toggle-icon::after {
  width: 2px;
  height: 12px;
}

.faq-item.expanded .faq-toggle-icon {
  transform: rotate(45deg);
  background: rgba(0, 212, 255, 0.2);
  border-color: #00D4FF;
}

.faq-item.expanded .faq-toggle-icon::before,
.faq-item.expanded .faq-toggle-icon::after {
  background: #BD00FF;
}

/* FAQ Answer - Smooth Reveal */
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.faq-item.expanded .faq-answer {
  max-height: 2000px;
}

.faq-answer-content {
  padding: 24px 24px 24px 64px;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.8;
  font-size: 16px;
  animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.faq-answer-content p {
  margin: 0 0 16px 0;
}

.faq-answer-content p:last-child {
  margin-bottom: 0;
}

.faq-answer-content strong {
  color: #00D4FF;
  font-weight: 600;
}

.faq-answer-content code {
  background: rgba(0, 212, 255, 0.1);
  padding: 2px 8px;
  border-radius: 4px;
  font-family: 'Fira Code', monospace;
  font-size: 14px;
  color: #00FF88;
  border: 1px solid rgba(0, 255, 136, 0.2);
}

/* Feedback Section */
.faq-feedback {
  display: flex;
  gap: 16px;
  align-items: center;
  padding: 16px 24px 16px 64px;
  border-top: 1px solid rgba(0, 212, 255, 0.1);
  background: rgba(0, 0, 0, 0.2);
}

.faq-feedback-label {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.5);
}

.faq-feedback-btn {
  padding: 8px 16px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.6);
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}

.faq-feedback-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.faq-feedback-btn.helpful:hover {
  background: rgba(0, 255, 136, 0.1);
  border-color: #00FF88;
  color: #00FF88;
}

.faq-feedback-btn.not-helpful:hover {
  background: rgba(255, 107, 53, 0.1);
  border-color: #FF6B35;
  color: #FF6B35;
}

.faq-feedback-btn.selected {
  transform: scale(0.95);
  opacity: 0.8;
}

/* No Results State */
.faq-no-results {
  text-align: center;
  padding: 80px 40px;
  color: rgba(255, 255, 255, 0.4);
}

.faq-no-results-icon {
  font-size: 64px;
  color: rgba(0, 212, 255, 0.2);
  margin-bottom: 24px;
}

.faq-no-results-title {
  font-size: 24px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.6);
  margin: 0 0 12px 0;
  font-family: 'Orbitron', monospace;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.faq-no-results-text {
  font-size: 16px;
  margin: 0;
  max-width: 400px;
  margin: 0 auto;
  line-height: 1.6;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .faq-section {
    padding: 40px 20px;
    margin: 40px 0;
  }

  .faq-title {
    font-size: 28px;
    letter-spacing: 3px;
  }

  .faq-controls {
    gap: 16px;
  }

  .faq-search {
    max-width: 100%;
  }

  .faq-filters {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 8px;
    -webkit-overflow-scrolling: touch;
  }

  .faq-filter-btn {
    white-space: nowrap;
    flex-shrink: 0;
  }

  .faq-items {
    gap: 16px;
  }

  .faq-question {
    padding: 20px 20px 20px 56px;
  }

  .faq-category-icon {
    left: 16px;
  }

  .faq-question-text {
    font-size: 16px;
  }

  .faq-answer-content {
    padding: 0 20px 20px 56px;
    font-size: 14px;
  }

  .faq-feedback {
    padding: 16px 20px 16px 56px;
    flex-wrap: wrap;
  }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Print Styles */
@media print {
  .faq-section {
    background: white;
    border: 1px solid #ddd;
    box-shadow: none;
  }

  .faq-controls {
    display: none;
  }

  .faq-item {
    border: 1px solid #ddd;
    page-break-inside: avoid;
  }

  .faq-item.expanded .faq-answer {
    max-height: none !important;
  }

  .faq-feedback {
    display: none;
  }
}
