/* FAQ Page Styles */

.faq-page {
  padding: 2rem 0 4rem;
}

.page-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--background);
  flex-wrap: wrap;
}

.page-header .section-icon {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--info) 0%, #3182CE 100%);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}

.page-title {
  font-size: 1.8rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.page-subtitle {
  width: 100%;
  color: var(--text-secondary);
  margin: 0.5rem 0 0;
  font-size: 1rem;
}

/* Back bar */
.page-back-bar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0.75rem 0;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
  transition: var(--transition);
}

.back-link:hover {
  color: var(--primary-dark);
}

/* Search Bar */
.faq-search {
  position: relative;
  margin-bottom: 2rem;
}

.search-input {
  width: 100%;
  padding: 1rem 1rem 1rem 3rem;
  border: 2px solid rgba(0,0,0,0.1);
  border-radius: var(--radius-md);
  font-size: 1rem;
  transition: var(--transition);
  background: var(--background);
  box-sizing: border-box;
}

.search-input:focus {
  outline: none;
  border-color: var(--primary);
  background: var(--surface);
  box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

.search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-tertiary);
  font-size: 1.1rem;
}

/* Category Filters */
.category-filters {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.category-filter {
  padding: 0.5rem 1rem;
  border-radius: 50px;
  border: 2px solid var(--primary-light);
  background: transparent;
  color: var(--primary);
  cursor: pointer;
  transition: var(--transition);
  font-weight: 500;
  font-size: 0.9rem;
}

.category-filter:hover,
.category-filter.active {
  background: var(--primary);
  color: white;
  transform: translateY(-1px);
}

/* FAQ Items */
.faq-container {
  display: grid;
  gap: 1rem;
}

.faq-item {
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  background: var(--background);
}

.faq-item:hover {
  box-shadow: var(--shadow-md);
}

.faq-item.hidden {
  display: none;
}

.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  background: var(--surface);
  cursor: pointer;
  font-weight: 500;
  transition: var(--transition);
}

.faq-question:hover {
  background: var(--background);
}

.faq-category {
  display: inline-block;
  background: var(--primary-light);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 600;
  margin-right: 1rem;
}

.faq-question-text {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.faq-icon {
  transition: var(--transition);
  color: var(--primary);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  background: var(--background);
  transition: max-height 0.4s ease, padding 0.4s ease;
}

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

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

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

.faq-item.active .faq-question {
  background: var(--primary-light);
  color: white;
}

.faq-item.active .faq-category {
  background: rgba(255,255,255,0.2);
}

/* No results */
.faq-no-results {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-secondary);
}

.faq-no-results i {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: var(--text-tertiary);
}

/* Toast */
.toast {
  display: none;
  position: fixed;
  top: 20px;
  right: 20px;
  background: var(--success);
  color: white;
  padding: 1rem 1.5rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  z-index: 1000;
  transform: translateX(100%);
  transition: var(--transition);
  max-width: 400px;
}

.toast.show {
  display: block;
  transform: translateX(0);
}

/* Footer */
footer {
  background-color: var(--text-primary);
  color: white;
  padding: 3rem 0 1.5rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-logo {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.footer-logo i { font-size: 1.5rem; color: var(--primary); }

.footer-about p {
  color: rgba(255,255,255,0.7);
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

.footer-links h3 {
  color: white;
  margin-bottom: 1rem;
  font-size: 1rem;
}

.footer-links ul { list-style: none; }
.footer-links li { margin-bottom: 0.5rem; }

.footer-links a {
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  transition: var(--transition);
  font-size: 0.9rem;
}

.footer-links a:hover { color: var(--primary); }

.footer-social { display: flex; gap: 0.75rem; }

.footer-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: rgba(255,255,255,0.1);
  color: white;
  transition: var(--transition);
}

.footer-social a:hover {
  background-color: var(--primary);
  transform: translateY(-3px);
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 1.5rem;
  text-align: center;
  color: rgba(255,255,255,0.5);
  font-size: 0.85rem;
}

/* Responsive */
@media (max-width: 768px) {
  .faq-page {
    padding: 1rem 0 3rem;
  }

  .page-title {
    font-size: 1.4rem;
  }

  .category-filters {
    overflow-x: auto;
    flex-wrap: nowrap;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 0.5rem;
  }

  .category-filters::-webkit-scrollbar {
    display: none;
  }

  .category-filter {
    white-space: nowrap;
    flex-shrink: 0;
  }

  .faq-question {
    padding: 1rem;
  }

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

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

  /* Footer mobile */
  .footer-grid {
    grid-template-columns: repeat(3, 1fr);
    text-align: center;
    gap: 1.25rem;
  }
  .footer-about {
    grid-column: 1 / -1;
    margin-bottom: 0.5rem;
  }
  .footer-social { justify-content: center; }
  .footer-logo { justify-content: center; }
  .footer-links h3 { font-size: 0.85rem; margin-bottom: 0.5rem; }
  .footer-links li { margin-bottom: 0.25rem; }
  .footer-links a { font-size: 0.8rem; }
}

@media (max-width: 480px) {
  .page-header .section-icon {
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }

  .page-title {
    font-size: 1.2rem;
  }

  .search-input {
    font-size: 16px; /* prevent iOS zoom */
  }

  .category-filter {
    font-size: 0.8rem;
    padding: 0.4rem 0.8rem;
  }
}

/* Header safe area for iOS */
header {
  position: sticky;
  top: 0;
  padding-top: env(safe-area-inset-top, 0px);
  z-index: 100;
}
