/**
 * Doctiva FAQ Page - Premium Styles
 * 
 * @version 1.0.0
 */

/* ============================================
   FAQ PAGE CONTENT WRAPPER
   ============================================ */
.faq-page-content {
  padding-top: 0;
}

/* ============================================
   FAQ GROUPS (Sections)
   ============================================ */
.faq-group {
  margin-bottom: 2.5rem;
}

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

/* Group title (h2) */
.faq-group > h2,
.faq-group-title {
  font-size: 1.375rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 1rem 0;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid #e2e8f0;
  letter-spacing: -0.01em;
}

/* ============================================
   FAQ ITEMS (Individual Questions)
   ============================================ */
.faq-item {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-left: 4px solid #3174ff;
  border-radius: 12px;
  margin-bottom: 0.875rem;
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

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

.faq-item:hover {
  border-color: #cbd5e1;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
}

/* Open state */
.faq-item--open {
  border-left-color: #2563eb;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

/* ============================================
   FAQ QUESTION (h3 + button)
   ============================================ */
.faq-question {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.5;
}

/* Accessible button inside h3 */
.faq-question__button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  padding: 1.125rem 1.25rem;
  background: transparent;
  border: none;
  cursor: pointer;
  text-align: left;
  font: inherit;
  font-weight: 600;
  color: #1e293b;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.faq-question__button:hover {
  background-color: #f8fafc;
  color: #0f172a;
}

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

.faq-question__button:focus-visible {
  outline: 2px solid #3174ff;
  outline-offset: -2px;
  background-color: #eff6ff;
}

/* Question text */
.faq-question__text {
  flex: 1;
}

/* Chevron icon */
.faq-question__icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: #f1f5f9;
  border-radius: 50%;
  color: #64748b;
  transition: transform 0.25s ease, background-color 0.2s ease, color 0.2s ease;
}

.faq-question__icon svg {
  width: 18px;
  height: 18px;
}

/* Icon rotation when open */
.faq-item--open .faq-question__icon {
  transform: rotate(180deg);
  background: #3174ff;
  color: #ffffff;
}

/* Hover state for icon */
.faq-question__button:hover .faq-question__icon {
  background: #e2e8f0;
  color: #475569;
}

.faq-item--open .faq-question__button:hover .faq-question__icon {
  background: #2563eb;
  color: #ffffff;
}

/* ============================================
   FAQ ANSWER
   ============================================ */
.faq-answer {
  padding: 0 1.25rem 1.25rem 1.25rem;
  color: #475569;
  font-size: 0.9375rem;
  line-height: 1.7;
}

.faq-answer p {
  margin: 0 0 0.875rem 0;
}

.faq-answer p:last-child {
  margin-bottom: 0;
}

.faq-answer ul,
.faq-answer ol {
  margin: 0.75rem 0;
  padding-left: 1.5rem;
}

.faq-answer li {
  margin-bottom: 0.375rem;
}

.faq-answer a {
  color: #3174ff;
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.15s ease;
}

.faq-answer a:hover {
  color: #1d4ed8;
}

/* ============================================
   ANIMATION (smooth reveal)
   ============================================ */
@media (prefers-reduced-motion: no-preference) {
  .faq-answer {
    animation: faqAnswerFadeIn 0.25s ease-out;
  }

  @keyframes faqAnswerFadeIn {
    from {
      opacity: 0;
      transform: translateY(-8px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 640px) {
  .faq-group > h2,
  .faq-group-title {
    font-size: 1.25rem;
  }

  .faq-question__button {
    padding: 1rem;
    font-size: 0.9375rem;
  }

  .faq-question__icon {
    width: 24px;
    height: 24px;
  }

  .faq-question__icon svg {
    width: 14px;
    height: 14px;
  }

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

  .faq-item {
    border-radius: 10px;
    margin-bottom: 0.75rem;
  }
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
  .faq-item {
    border: 1px solid #ccc;
    page-break-inside: avoid;
  }

  .faq-answer {
    display: block !important;
  }

  .faq-answer[hidden] {
    display: block !important;
  }

  .faq-question__icon {
    display: none;
  }
}

