/**
 * StudentJob - FAQ Page Stylesheet
 * Pixel-perfect match for the modern 2-column FAQ design.
 */

:root {
  --sj-faq-primary: var(--primary-color, #1c7bff);
  --sj-faq-text-dark: #0f172a;
  --sj-faq-text-muted: #64748b;
  --sj-faq-text-body: #475569;
  --sj-faq-border: #e2e8f0;
  --sj-faq-border-hover: #cbd5e1;
  --sj-faq-bg-card: #ffffff;
  --sj-faq-bg-soft: #f1f5f9;
  --sj-faq-pill-bg: #e2e8f0;
}

.sj-faq-main-wrapper {
  background: #ffffff;
  min-height: 80vh;
  padding: 60px 0 100px;
  color: var(--sj-faq-text-dark);
}

.sj-faq-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ==========================================================================
   2-Column Layout (Sidebar + Content)
   ========================================================================== */
.sj-faq-layout {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 64px;
  align-items: start;
}

/* ==========================================================================
   Left Column: Sidebar
   ========================================================================== */
.sj-faq-sidebar {
  position: sticky;
  top: 96px;
  display: flex;
  flex-direction: column;
}

.sj-faq-page-title {
  font-size: 2.75rem;
  font-weight: 800;
  line-height: 1.15;
  color: var(--sj-faq-text-dark);
  letter-spacing: -0.03em;
  margin: 0 0 28px 0;
}

/* Live Search Box */
.sj-faq-search-wrap {
  position: relative;
  display: flex;
  align-items: center;
  background: #ffffff;
  border: 1px solid var(--sj-faq-border);
  border-radius: 12px;
  padding: 10px 14px;
  gap: 10px;
  margin-bottom: 28px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.sj-faq-search-wrap:focus-within {
  border-color: var(--sj-faq-primary);
  box-shadow: 0 0 0 3px rgba(28, 123, 255, 0.12);
}

.sj-faq-search-icon {
  color: var(--sj-faq-text-muted);
  flex-shrink: 0;
}

.sj-faq-search-input {
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  background: transparent !important;
  padding: 0 !important;
  margin: 0 !important;
  width: 100%;
  font-size: 0.95rem;
  color: var(--sj-faq-text-dark);
}

.sj-faq-search-input::placeholder {
  color: #94a3b8;
}

.sj-faq-search-clear {
  background: #e2e8f0;
  border: none;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: #475569;
  cursor: pointer;
  padding: 0;
  transition: background 0.15s ease;
}

.sj-faq-search-clear:hover {
  background: #cbd5e1;
  color: #0f172a;
}

/* Topics Navigation Menu */
.sj-faq-topics-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 32px;
}

.sj-faq-topic-btn {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: 9px 14px 9px 16px;
  font-size: 0.96rem;
  font-weight: 500;
  color: var(--sj-faq-text-muted);
  cursor: pointer;
  border-left: 2.5px solid transparent;
  transition: all 0.15s ease;
  border-radius: 0 8px 8px 0;
}

.sj-faq-topic-btn:hover {
  color: var(--sj-faq-text-dark);
  background: #f8fafc;
}

.sj-faq-topic-btn.is-active {
  color: var(--sj-faq-text-dark);
  font-weight: 700;
  border-left-color: var(--sj-faq-primary);
  background: #faf8ff;
}

/* "Still have a questions?" Support Card */
.sj-faq-support-card {
  background: var(--sj-faq-bg-soft);
  border-radius: 18px;
  padding: 24px;
  margin-top: 10px;
}

.sj-faq-support-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--sj-faq-text-dark);
  margin: 0 0 6px 0;
  letter-spacing: -0.01em;
}

.sj-faq-support-desc {
  font-size: 0.88rem;
  color: var(--sj-faq-text-muted);
  line-height: 1.5;
  margin: 0 0 20px 0;
}

.sj-faq-support-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 12px 18px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  color: var(--sj-faq-text-dark);
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.sj-faq-support-btn:hover {
  background: #ffffff;
  border-color: #94a3b8;
  color: var(--sj-faq-text-dark);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transform: translateY(-1px);
}

/* ==========================================================================
   Right Column: Content & Accordion Cards
   ========================================================================== */
.sj-faq-content-col {
  display: flex;
  flex-direction: column;
}

/* Category Groups */
.sj-faq-category-group {
  margin-bottom: 48px;
  scroll-margin-top: 110px;
  transition: opacity 0.2s ease;
}

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

/* Category Badge Pill */
.sj-faq-cat-pill-wrap {
  margin-bottom: 16px;
}

.sj-faq-category-pill {
  display: inline-block;
  background: var(--sj-faq-pill-bg);
  color: var(--sj-faq-text-muted);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 5px 16px;
  border-radius: 9999px;
  letter-spacing: 0.2px;
}

/* FAQ Cards List */
.sj-faq-cards-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Single FAQ Card */
.sj-faq-card {
  background: var(--sj-faq-bg-card);
  border: 1px solid var(--sj-faq-border);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.sj-faq-card:hover {
  border-color: var(--sj-faq-border-hover);
}

.sj-faq-card.is-open {
  border-color: var(--sj-faq-border-hover);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
}

/* Header Trigger */
.sj-faq-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 22px 26px;
  background: transparent;
  border: none;
  cursor: pointer;
  text-align: left;
  outline: none;
  gap: 16px;
}

.sj-faq-card-header:focus-visible {
  background: #faf8ff;
  border-radius: 14px;
}

.sj-faq-question-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--sj-faq-text-dark);
  line-height: 1.45;
  flex: 1;
}

/* Toggle Plus Icon (+) */
.sj-faq-toggle-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  font-size: 1.45rem;
  font-weight: 300;
  color: var(--sj-faq-text-muted);
  flex-shrink: 0;
  line-height: 1;
  user-select: none;
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), color 0.2s ease;
}

.sj-faq-card.is-open .sj-faq-toggle-icon {
  transform: rotate(45deg);
  color: var(--sj-faq-text-dark);
}

/* Body / Answer */
.sj-faq-card-body {
  padding: 0 26px 24px 26px;
}

.sj-faq-answer-inner {
  font-size: 0.95rem;
  color: var(--sj-faq-text-body);
  line-height: 1.7;
}

.sj-faq-answer-inner p {
  margin: 0 0 12px 0;
}

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

.sj-faq-answer-inner a {
  color: var(--sj-faq-primary);
  text-decoration: underline;
  font-weight: 600;
}

/* Empty search results */
.sj-faq-no-results {
  text-align: center;
  padding: 60px 24px;
  background: #f8fafc;
  border: 1px dashed var(--sj-faq-border-hover);
  border-radius: 18px;
  margin: 20px 0;
}

.sj-no-results-icon {
  font-size: 2.2rem;
  margin-bottom: 12px;
}

.sj-faq-no-results h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--sj-faq-text-dark);
  margin: 0 0 8px 0;
}

.sj-faq-no-results p {
  font-size: 0.92rem;
  color: var(--sj-faq-text-muted);
  margin: 0 0 20px 0;
}

/* ==========================================================================
   Responsive Adaptations
   ========================================================================== */
@media (max-width: 992px) {
  .sj-faq-layout {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .sj-faq-sidebar {
    position: static;
  }

  .sj-faq-page-title {
    font-size: 2.25rem;
    margin-bottom: 20px;
  }

  /* Horizontal scroll for topic navigation pills on mobile */
  .sj-faq-topics-nav {
    flex-direction: row;
    overflow-x: auto;
    padding-bottom: 10px;
    gap: 8px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .sj-faq-topics-nav::-webkit-scrollbar {
    display: none;
  }

  .sj-faq-topic-btn {
    border-left: none;
    border-radius: 9999px;
    background: #f1f5f9;
    padding: 7px 18px;
    font-size: 0.88rem;
    white-space: nowrap;
    width: auto;
    flex-shrink: 0;
  }

  .sj-faq-topic-btn.is-active {
    background: var(--sj-faq-text-dark);
    color: #ffffff;
    border-left: none;
  }

  .sj-faq-support-card {
    order: 3;
    margin-top: 36px;
  }
}

@media (max-width: 640px) {
  .sj-faq-main-wrapper {
    padding: 40px 0 60px;
  }

  .sj-faq-page-title {
    font-size: 1.95rem;
  }

  .sj-faq-card-header {
    padding: 18px 20px;
  }

  .sj-faq-question-title {
    font-size: 0.98rem;
  }

  .sj-faq-card-body {
    padding: 0 20px 20px 20px;
  }
}

