/* ========================================
   FAQ PAGE STYLES
   Modern, professional SaaS design
   ======================================== */

/* ----------------------------------------
   FAQ HERO SECTION
   ---------------------------------------- */
.faq-hero {
  padding: 5rem 0 3rem;
  background: linear-gradient(135deg, #f8fafa 0%, #fff 50%, #f0f9f9 100%);
  text-align: center;
}

.faq-hero-content {
  max-width: 680px;
  margin: 0 auto;
}

.section-label {
  display: inline-block;
  padding: 0.375rem 1rem;
  background: rgba(35, 118, 124, 0.1);
  color: var(--color-primary);
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: 100px;
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

.faq-hero-title {
  font-size: 2.75rem;
  font-weight: 800;
  color: #111827;
  line-height: 1.15;
  margin: 1rem 0 1.25rem;
  letter-spacing: -0.02em;
}

.title-highlight {
  color: var(--color-primary);
}

.faq-hero-description {
  font-size: 1.125rem;
  color: #4b5563;
  line-height: 1.7;
  margin: 0 0 2rem;
}

.faq-hero-description a {
  color: var(--color-primary);
  text-decoration: none;
  font-weight: 500;
}

.faq-hero-description a:hover {
  text-decoration: underline;
}

/* Search Container */
.faq-search-container {
  max-width: 560px;
  margin: 0 auto;
}

.faq-search-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 1.25rem;
  color: #9ca3af;
  font-size: 1.25rem;
  pointer-events: none;
  z-index: 1;
}

.faq-search-input {
  width: 100%;
  padding: 1rem 3rem 1rem 3.25rem;
  font-size: 1.0625rem;
  font-family: inherit;
  color: #111827;
  background: #fff;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

.faq-search-input::placeholder {
  color: #9ca3af;
}

.faq-search-input:hover {
  border-color: #d1d5db;
}

.faq-search-input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 4px 12px rgba(35, 118, 124, 0.1);
}

.search-clear-btn {
  position: absolute;
  right: 1rem;
  display: none;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: #f3f4f6;
  border: none;
  border-radius: 50%;
  color: #6b7280;
  cursor: pointer;
  transition: all 0.2s ease;
}

.search-clear-btn.show {
  display: flex;
}

.search-clear-btn:hover {
  background: #e5e7eb;
  color: #374151;
}

.search-results-count {
  margin-top: 0.75rem;
  font-size: 0.9375rem;
  color: #6b7280;
  min-height: 1.5rem;
}

.search-results-count.has-results {
  color: var(--color-primary);
  font-weight: 500;
}

@media (max-width: 768px) {
  .faq-hero {
    padding: 3rem 0 2rem;
  }

  .faq-hero-title {
    font-size: 2rem;
  }

  .faq-hero-description {
    font-size: 1.0625rem;
  }

  .faq-search-input {
    padding: 0.875rem 2.75rem 0.875rem 3rem;
    font-size: 1rem;
  }
}

/* ----------------------------------------
   CATEGORY NAVIGATION
   ---------------------------------------- */
.faq-categories-section {
  padding: 1.5rem 0;
  background: #fff;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  position: sticky;
  top: 72px;
  z-index: 100;
}

.faq-categories-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.faq-categories-wrapper::-webkit-scrollbar {
  display: none;
}

.faq-categories {
  display: flex;
  gap: 0.5rem;
  min-width: max-content;
  padding: 0.25rem;
}

.category-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1rem;
  font-size: 0.9375rem;
  font-weight: 500;
  font-family: inherit;
  color: #6b7280;
  background: transparent;
  border: 1.5px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.category-btn i {
  font-size: 1.125rem;
}

.category-btn:hover {
  color: #374151;
  background: #f9fafb;
}

.category-btn:focus {
  outline: none;
}

.category-btn:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.category-btn.active {
  color: var(--color-primary);
  background: rgba(35, 118, 124, 0.08);
  border-color: rgba(35, 118, 124, 0.2);
}

@media (max-width: 768px) {
  .faq-categories-section {
    padding: 1rem 0;
  }

  .category-btn {
    padding: 0.5rem 0.875rem;
    font-size: 0.875rem;
  }

  .category-btn i {
    font-size: 1rem;
  }

  /* Hide text on very small screens, show only icons */
  @media (max-width: 480px) {
    .category-btn span {
      display: none;
    }

    .category-btn {
      padding: 0.625rem;
    }

    .category-btn i {
      font-size: 1.25rem;
    }
  }
}

/* ----------------------------------------
   FAQ CONTENT SECTION
   ---------------------------------------- */
.faq-content-section {
  padding: 3rem 0 5rem;
}

.faq-content-wrapper {
  max-width: 800px;
  margin: 0 auto;
}

/* No Results State */
.faq-no-results {
  display: none;
  text-align: center;
  padding: 4rem 2rem;
}

.faq-no-results.show {
  display: block;
}

.no-results-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 80px;
  background: #f3f4f6;
  color: #9ca3af;
  border-radius: 50%;
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
}

.faq-no-results h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: #111827;
  margin: 0 0 0.75rem;
}

.faq-no-results p {
  font-size: 1rem;
  color: #6b7280;
  margin: 0 0 1.5rem;
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}

.btn-reset-search {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-size: 0.9375rem;
  font-weight: 600;
  font-family: inherit;
  color: var(--color-primary);
  background: rgba(35, 118, 124, 0.08);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-reset-search:hover {
  background: rgba(35, 118, 124, 0.15);
}

/* Category Groups */
.faq-category-group {
  margin-bottom: 3rem;
}

.faq-category-group:last-child {
  margin-bottom: 0;
}

.faq-category-group.hidden {
  display: none;
}

.faq-category-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.category-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: rgba(35, 118, 124, 0.1);
  color: var(--color-primary);
  border-radius: 12px;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.category-info h2 {
  font-size: 1.375rem;
  font-weight: 700;
  color: #111827;
  margin: 0 0 0.25rem;
}

.category-info p {
  font-size: 0.9375rem;
  color: #6b7280;
  margin: 0;
}

@media (max-width: 575.98px) {
  .faq-category-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .category-icon {
    width: 40px;
    height: 40px;
    font-size: 1.25rem;
  }

  .category-info h2 {
    font-size: 1.25rem;
  }
}

/* ----------------------------------------
   FAQ ACCORDION
   ---------------------------------------- */
.faq-accordion {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.faq-item {
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.2s ease;
}

.faq-item:hover {
  border-color: rgba(35, 118, 124, 0.2);
}

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

.faq-item.open {
  border-color: var(--color-primary);
  box-shadow: 0 4px 12px rgba(35, 118, 124, 0.1);
}

.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 1.25rem 1.5rem;
  font-size: 1.0625rem;
  font-weight: 600;
  font-family: inherit;
  color: #111827;
  background: transparent;
  border: none;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s ease;
}

.faq-question:hover {
  background: rgba(0, 0, 0, 0.02);
}

.faq-question:focus {
  outline: none;
}

.faq-question:focus-visible {
  background: rgba(35, 118, 124, 0.04);
}

.faq-question span {
  flex: 1;
  padding-right: 1rem;
  line-height: 1.5;
}

.faq-question i {
  flex-shrink: 0;
  font-size: 1.25rem;
  color: #9ca3af;
  transition: transform 0.3s ease, color 0.2s ease;
}

.faq-item.open .faq-question i {
  transform: rotate(180deg);
  color: var(--color-primary);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.faq-item.open .faq-answer {
  max-height: 500px;
}

.faq-answer p {
  padding: 0 1.5rem 1.5rem;
  font-size: 1rem;
  color: #4b5563;
  line-height: 1.75;
  margin: 0;
}

.faq-answer a {
  color: var(--color-primary);
  text-decoration: none;
  font-weight: 500;
}

.faq-answer a:hover {
  text-decoration: underline;
}

/* Search highlight */
.faq-item.search-match .faq-question span {
  background: linear-gradient(
    120deg,
    rgba(35, 118, 124, 0.1) 0%,
    rgba(35, 118, 124, 0.1) 100%
  );
  background-repeat: no-repeat;
  background-size: 100% 0.3em;
  background-position: 0 90%;
}

@media (max-width: 575.98px) {
  .faq-question {
    padding: 1rem 1.25rem;
    font-size: 1rem;
  }

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

/* ----------------------------------------
   CTA SECTION
   ---------------------------------------- */
.faq-cta-section {
  padding: 0 0 5rem;
}

.faq-cta-card {
  display: flex;
  align-items: center;
  gap: 2rem;
  padding: 2.5rem 3rem;
  background: linear-gradient(135deg, var(--color-primary) 0%, #1c5f64 100%);
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(35, 118, 124, 0.25);
}

.faq-cta-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 16px;
  flex-shrink: 0;
}

.faq-cta-icon i {
  font-size: 2rem;
  color: #fff;
}

.faq-cta-content {
  flex: 1;
}

.faq-cta-content h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
  margin: 0 0 0.5rem;
}

.faq-cta-content p {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.85);
  margin: 0;
  line-height: 1.6;
}

.faq-cta-actions {
  display: flex;
  gap: 0.75rem;
  flex-shrink: 0;
}

.btn-cta-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 1.5rem;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--color-primary);
  background: #fff;
  border-radius: 10px;
  text-decoration: none;
  transition: all 0.2s ease;
}

.btn-cta-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
  color: var(--color-primary);
}

.btn-cta-outline {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 1.5rem;
  font-size: 0.9375rem;
  font-weight: 600;
  color: #fff;
  background: transparent;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-radius: 10px;
  text-decoration: none;
  transition: all 0.2s ease;
}

.btn-cta-outline:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.6);
  color: #fff;
}

@media (max-width: 991.98px) {
  .faq-cta-card {
    flex-direction: column;
    text-align: center;
    padding: 2rem;
    gap: 1.5rem;
  }

  .faq-cta-icon {
    width: 60px;
    height: 60px;
  }

  .faq-cta-icon i {
    font-size: 1.75rem;
  }

  .faq-cta-actions {
    flex-direction: column;
    width: 100%;
    max-width: 280px;
  }

  .btn-cta-primary,
  .btn-cta-outline {
    justify-content: center;
    width: 100%;
  }
}

/* ----------------------------------------
   ANIMATIONS
   ---------------------------------------- */
.faq-category-group {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.5s ease forwards;
}

.faq-category-group:nth-child(1) {
  animation-delay: 0s;
}
.faq-category-group:nth-child(2) {
  animation-delay: 0.1s;
}
.faq-category-group:nth-child(3) {
  animation-delay: 0.2s;
}
.faq-category-group:nth-child(4) {
  animation-delay: 0.3s;
}
.faq-category-group:nth-child(5) {
  animation-delay: 0.4s;
}
.faq-category-group:nth-child(6) {
  animation-delay: 0.5s;
}

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

/* Smooth expand/collapse animation */
.faq-answer {
  transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
