/* ===================================
   FAQ-Specific Styles
   =================================== */

/* FAQ Controls */
.faq-controls {
  background: var(--card-background);
  padding: 2rem;
  margin: 2rem auto;
  max-width: 1200px;
  border-radius: 12px;
  box-shadow: var(--shadow-light);
  border: 1px solid var(--border-color);
}

/* Category Filter */
.category-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  align-items: center;
}

.category-btn {
  padding: 0.75rem 1.5rem;
  border: 2px solid var(--border-color);
  background: var(--background-color);
  color: var(--text-color);
  border-radius: 8px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.3s ease;
  text-align: center;
  white-space: nowrap;
}

.category-btn:hover {
  border-color: var(--accent-color);
  background: rgba(237, 137, 54, 0.1);
  transform: translateY(-1px);
}

.category-btn.active {
  background: var(--accent-color);
  color: white;
  border-color: var(--accent-color);
  box-shadow: 0 2px 8px rgba(237, 137, 54, 0.3);
}

/* FAQ Section */
.faq-section {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 2rem;
}

.faq-container {
  display: grid;
  gap: 1.5rem;
  margin-bottom: 4rem;
}

/* Individual FAQ Items */
.faq-item {
  background: var(--card-background);
  border-radius: 12px;
  box-shadow: var(--shadow-light);
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
  overflow: hidden;
}

.faq-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-medium);
}

.faq-question {
  padding: 1.5rem 2rem;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.3s ease;
  position: relative;
}

.faq-question::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--accent-color);
  transform: scaleY(0);
  transition: transform 0.3s ease;
  transform-origin: bottom;
}

.faq-item:hover .faq-question::before {
  transform: scaleY(1);
}

.faq-question h3 {
  color: var(--primary-color);
  font-size: 1.2rem;
  font-weight: 600;
  margin: 0;
  flex: 1;
  padding-right: 1rem;
  line-height: 1.4;
}

.faq-icon {
  font-size: 1.5rem;
  color: var(--accent-color);
  font-weight: bold;
  transition: all 0.3s ease;
  min-width: 24px;
  text-align: center;
}

.faq-item.active .faq-icon {
  transform: rotate(45deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  background: rgba(250, 250, 250, 0.5);
}

.faq-answer p {
  padding: 0 2rem 1.5rem;
  color: var(--text-color);
  line-height: 1.7;
  margin: 0;
}

.faq-answer strong {
  color: var(--primary-color);
  font-weight: 600;
}

/* Quick Tips Section */
.quick-tips {
  background: linear-gradient(135deg, var(--background-color) 0%, #f7fafc 100%);
  padding: 4rem 2rem;
  margin: 4rem 0;
  border-radius: 16px;
  border: 1px solid var(--border-color);
}

.quick-tips h2 {
  text-align: center;
  color: var(--primary-color);
  margin-bottom: 3rem;
  font-size: 2rem;
}

.tips-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.tip-card {
  background: var(--card-background);
  padding: 2rem;
  border-radius: 12px;
  text-align: center;
  box-shadow: var(--shadow-light);
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
}

.tip-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-medium);
}

.tip-card h4 {
  color: var(--accent-color);
  margin-bottom: 1rem;
  font-size: 1.2rem;
  font-weight: 600;
}

.tip-card p {
  color: var(--text-color);
  line-height: 1.6;
  font-size: 0.95rem;
  margin: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
  .faq-controls {
    padding: 1.5rem;
    margin: 1rem;
  }

  .category-filter {
    gap: 0.5rem;
  }

  .category-btn {
    padding: 0.6rem 1rem;
    font-size: 0.9rem;
  }

  .faq-section {
    padding: 0 1rem;
  }

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

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

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

  .quick-tips {
    padding: 3rem 1rem;
    margin: 2rem 1rem;
  }

  .tips-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .tip-card {
    padding: 1.5rem;
  }
}

@media (max-width: 480px) {
  .category-filter {
    flex-direction: column;
    align-items: stretch;
  }

  .category-btn {
    width: 100%;
    text-align: center;
  }

  .faq-question {
    padding: 1rem 1.25rem;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

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

  .faq-icon {
    align-self: flex-end;
    margin-top: -2rem;
  }

  .faq-answer p {
    padding: 0 1.25rem 1rem;
    font-size: 0.9rem;
  }

  .tip-card {
    padding: 1.25rem;
  }

  .tip-card h4 {
    font-size: 1.1rem;
  }
}

/* Animation for FAQ items appearing */
.faq-item {
  animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Loading state for filtering */
.faq-container.filtering .faq-item {
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.faq-item[style*="display: none"] {
  opacity: 0;
  transform: translateY(-10px);
}

/* Enhanced active state for FAQ items */
.faq-item.active {
  border-color: rgba(237, 137, 54, 0.3);
}

.faq-item.active .faq-question {
  background: rgba(237, 137, 54, 0.05);
}

/* Special styling for emojis in tips */
.tip-card h4 {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

/* Smooth transitions for all interactive elements */
* {
  transition: color 0.2s ease, background-color 0.2s ease,
    border-color 0.2s ease;
}
