/* FAQ Search Index — doctoreto-inspired filter sidebar + results */
:root {
  --fq-primary: #0b6bcb;
  --fq-primary-dark: #084f96;
  --fq-ink: #152033;
  --fq-text: #2b3648;
  --fq-muted: #6b778c;
  --fq-border: #e4e9f0;
  --fq-surface: #ffffff;
  --fq-bg: #f3f5f8;
  --fq-success: #1f9d63;
  --fq-warn: #c97816;
  --fq-radius: 14px;
  --fq-radius-lg: 18px;
  --fq-shadow: 0 8px 28px rgba(21, 32, 51, 0.08);
  --fq-shadow-soft: 0 2px 10px rgba(21, 32, 51, 0.05);
  --fq-font: "YekanBakhFa", "IRANSansWeb", Tahoma, sans-serif;
  --fq-ease: 160ms ease;
  --fq-sidebar-w: 340px;
}

body.fq-body {
  background: var(--fq-bg) !important;
  font-family: var(--fq-font);
  color: var(--fq-text);
}

body.fq-body .navbar-hed,
body.fq-body .navbar.navbar-default {
  background: var(--fq-surface) !important;
  border: none !important;
  box-shadow: 0 1px 0 var(--fq-border);
}

.fq-page {
  padding: 18px 0 56px;
}

.fq-frame {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 14px;
}

.fq-layout {
  display: grid;
  /* In RTL the first column sits on the right — matches doctoreto filter rail */
  grid-template-columns: var(--fq-sidebar-w) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.fq-main {
  min-width: 0;
}

.fq-hero {
  background: linear-gradient(135deg, #0f2744 0%, #163a63 55%, #0b6bcb 130%);
  color: #fff;
  border-radius: var(--fq-radius-lg);
  padding: 22px 22px 20px;
  margin-bottom: 14px;
  box-shadow: var(--fq-shadow);
}

.fq-hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: #9fd0ff;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  padding: 4px 10px;
  margin-bottom: 10px;
}

.fq-hero__title {
  margin: 0 0 8px;
  font-size: 22px;
  font-weight: 800;
  line-height: 1.45;
  color: #fff;
}

.fq-hero__text {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.78);
  max-width: 54ch;
}

.fq-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: var(--fq-surface);
  border: 1px solid var(--fq-border);
  border-radius: 12px;
  padding: 8px 10px;
  margin-bottom: 12px;
  box-shadow: var(--fq-shadow-soft);
  flex-wrap: wrap;
}

.fq-toolbar__meta {
  font-size: 13px;
  color: var(--fq-muted);
  font-weight: 600;
}

.fq-toolbar__meta strong {
  color: var(--fq-ink);
  font-weight: 800;
}

.fq-sort {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.fq-sort__btn {
  appearance: none;
  border: 1px solid transparent;
  background: transparent;
  color: var(--fq-muted);
  font-size: 12.5px;
  font-weight: 700;
  padding: 7px 12px;
  border-radius: 999px;
  text-decoration: none !important;
  transition: background var(--fq-ease), color var(--fq-ease), border-color var(--fq-ease);
}

.fq-sort__btn:hover {
  color: var(--fq-ink);
  background: #eef3f9;
}

.fq-sort__btn.is-active {
  color: var(--fq-primary);
  background: #e8f2fc;
  border-color: #c7dff7;
}

.fq-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.fq-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #eef4fb;
  color: #1d4f84;
  border: 1px solid #d4e5f7;
  border-radius: 999px;
  padding: 5px 11px;
  font-size: 12px;
  font-weight: 700;
}

.fq-chip a {
  color: inherit;
  text-decoration: none;
  opacity: 0.7;
}

.fq-chip-clear {
  color: #9b3b3b !important;
  background: #fff1f1;
  border-color: #f3d0d0;
  text-decoration: none !important;
}

.fq-notice {
  background: var(--fq-surface);
  border: 1px solid var(--fq-border);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--fq-muted);
  margin-bottom: 12px;
}

.fq-results {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.fq-card {
  display: block;
  background: var(--fq-surface);
  border: 1px solid var(--fq-border);
  border-radius: 14px;
  padding: 16px 16px 14px;
  text-decoration: none !important;
  color: inherit;
  box-shadow: var(--fq-shadow-soft);
  transition: transform var(--fq-ease), box-shadow var(--fq-ease), border-color var(--fq-ease);
}

.fq-card:hover {
  transform: translateY(-1px);
  border-color: #c9daf0;
  box-shadow: var(--fq-shadow);
}

.fq-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.fq-card__id {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #e8f2fc;
  color: var(--fq-primary-dark);
  font-size: 11.5px;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 999px;
}

.fq-card__date {
  font-size: 12px;
  color: var(--fq-muted);
}

.fq-card__service {
  display: inline-flex;
  margin-bottom: 8px;
  font-size: 12px;
  font-weight: 700;
  color: #5a6b84;
  background: #f4f7fb;
  border-radius: 8px;
  padding: 3px 8px;
}

.fq-card__title {
  margin: 0 0 6px;
  font-size: 15.5px;
  font-weight: 800;
  color: var(--fq-ink);
  line-height: 1.65;
}

.fq-card__excerpt {
  margin: 0 0 12px;
  font-size: 13.5px;
  line-height: 1.85;
  color: #425068;
}

.fq-card__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px dashed var(--fq-border);
}

.fq-stat {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 700;
  border-radius: 999px;
  padding: 3px 10px;
  border: 1px solid var(--fq-border);
  background: #f8fafc;
  color: #546278;
}

.fq-stat--ok {
  background: #edf9f2;
  border-color: #c6ebd6;
  color: var(--fq-success);
}

.fq-empty {
  background: var(--fq-surface);
  border: 1px solid var(--fq-border);
  border-radius: var(--fq-radius-lg);
  padding: 42px 20px;
  text-align: center;
  box-shadow: var(--fq-shadow-soft);
}

.fq-empty__icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: #eef3f9;
  color: #8ea0b8;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
}

.fq-empty h3 {
  margin: 0 0 8px;
  font-size: 17px;
  font-weight: 800;
  color: var(--fq-ink);
}

.fq-empty p {
  margin: 0 0 16px;
  color: var(--fq-muted);
  font-size: 13.5px;
}

.fq-pagination {
  margin-top: 16px;
}

.fq-pagination .pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  justify-content: center;
}

/* Sidebar filters */
.fq-sidebar {
  position: sticky;
  top: 84px;
}

.fq-filters {
  background: var(--fq-surface);
  border: 1px solid var(--fq-border);
  border-radius: var(--fq-radius-lg);
  box-shadow: var(--fq-shadow);
  overflow: hidden;
}

.fq-filters__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--fq-border);
}

.fq-filters__title {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
  color: var(--fq-ink);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.fq-filters__body {
  padding: 14px 16px 16px;
}

.fq-field {
  margin-bottom: 16px;
}

.fq-field:last-child {
  margin-bottom: 0;
}

.fq-label {
  display: block;
  margin-bottom: 8px;
  font-size: 12.5px;
  font-weight: 800;
  color: var(--fq-ink);
}

.fq-segments {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  background: #f4f7fb;
  border-radius: 12px;
  padding: 5px;
}

.fq-segment {
  appearance: none;
  border: none;
  background: transparent;
  border-radius: 9px;
  padding: 10px 6px;
  font-size: 12px;
  font-weight: 800;
  color: var(--fq-muted);
  cursor: pointer;
  text-align: center;
  transition: background var(--fq-ease), color var(--fq-ease), box-shadow var(--fq-ease);
}

.fq-segment.is-active {
  background: var(--fq-surface);
  color: var(--fq-primary);
  box-shadow: 0 1px 4px rgba(11, 107, 203, 0.15);
}

.fq-input,
.fq-select {
  width: 100%;
  border: 1px solid var(--fq-border);
  border-radius: 11px;
  background: #fff;
  color: var(--fq-ink);
  font-size: 13px;
  font-weight: 600;
  padding: 11px 12px;
  outline: none;
  transition: border-color var(--fq-ease), box-shadow var(--fq-ease);
  font-family: inherit;
}

.fq-input:focus,
.fq-select:focus {
  border-color: #9cc7ef;
  box-shadow: 0 0 0 3px rgba(11, 107, 203, 0.12);
}

.fq-field-hint {
  margin: 6px 0 0;
  font-size: 11.5px;
  color: var(--fq-muted);
  line-height: 1.5;
}

.fq-combo {
  position: relative;
}

.fq-combo__input {
  padding-left: 34px;
}

.fq-combo__clear {
  position: absolute;
  left: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 26px;
  height: 26px;
  border: none;
  border-radius: 50%;
  background: #e8eef6;
  color: #5b6b82;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
}

.fq-combo__list {
  position: absolute;
  right: 0;
  left: 0;
  top: calc(100% + 6px);
  z-index: 30;
  margin: 0;
  padding: 6px;
  list-style: none;
  max-height: 280px;
  overflow: auto;
  background: #fff;
  border: 1px solid var(--fq-border);
  border-radius: 12px;
  box-shadow: var(--fq-shadow);
}

.fq-combo__option {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 9px 10px;
  border-radius: 9px;
  cursor: pointer;
}

.fq-combo__option:hover,
.fq-combo__option.is-active {
  background: #eef5fc;
}

.fq-combo__option.is-root .fq-combo__option-title {
  font-weight: 800;
  color: var(--fq-primary-dark);
}

.fq-combo__option-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--fq-ink);
}

.fq-combo__option-path {
  font-size: 11.5px;
  color: var(--fq-muted);
  line-height: 1.45;
}

.fq-combo__empty {
  padding: 12px 10px;
  font-size: 12.5px;
  color: var(--fq-muted);
  text-align: center;
}

.fq-search-wrap {
  position: relative;
}

.fq-search-wrap .fa {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #90a0b5;
  pointer-events: none;
}

.fq-search-wrap .fq-input {
  padding-right: 34px;
}

.fq-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid #eef2f6;
}

.fq-toggle:first-of-type {
  border-top: none;
  padding-top: 0;
}

.fq-toggle__text {
  font-size: 13px;
  font-weight: 700;
  color: var(--fq-text);
  line-height: 1.5;
}

.fq-switch {
  position: relative;
  width: 44px;
  height: 26px;
  flex-shrink: 0;
}

.fq-switch input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.fq-switch__slider {
  position: absolute;
  inset: 0;
  background: #d7dee8;
  border-radius: 999px;
  cursor: pointer;
  transition: background var(--fq-ease);
}

.fq-switch__slider::before {
  content: "";
  position: absolute;
  width: 20px;
  height: 20px;
  right: 3px;
  top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform var(--fq-ease);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18);
}

.fq-switch input:checked + .fq-switch__slider {
  background: var(--fq-primary);
}

.fq-switch input:checked + .fq-switch__slider::before {
  transform: translateX(-18px);
}

.fq-actions {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}

.fq-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 11px;
  padding: 11px 14px;
  font-size: 13.5px;
  font-weight: 800;
  text-decoration: none !important;
  border: 1px solid transparent;
  cursor: pointer;
  font-family: inherit;
  transition: transform var(--fq-ease), box-shadow var(--fq-ease), background var(--fq-ease);
}

.fq-btn:hover {
  transform: translateY(-1px);
}

.fq-btn--primary {
  background: var(--fq-primary);
  color: #fff !important;
  box-shadow: 0 8px 18px rgba(11, 107, 203, 0.22);
}

.fq-btn--soft {
  background: #eef5fc;
  color: var(--fq-primary-dark) !important;
  border-color: #d4e5f7;
}

.fq-btn--ghost {
  background: #fff;
  color: var(--fq-text) !important;
  border-color: var(--fq-border);
}

.fq-btn--accent {
  background: #f97316;
  color: #fff !important;
  box-shadow: 0 8px 18px rgba(249, 115, 22, 0.22);
}

.fq-mobile-bar {
  display: none;
}

.fq-drawer-backdrop {
  display: none;
}

@media (max-width: 991px) {
  .fq-layout {
    grid-template-columns: 1fr;
  }

  .fq-sidebar {
    position: fixed;
    inset: 0;
    z-index: 1050;
    display: none;
    align-items: stretch;
    justify-content: flex-end;
    background: rgba(15, 23, 42, 0.42);
    padding: 0;
  }

  .fq-sidebar.is-open {
    display: flex;
  }

  .fq-filters {
    width: min(100%, 380px);
    height: 100%;
    border-radius: 16px 0 0 16px;
    overflow: auto;
    animation: fqSlideIn 180ms ease;
    margin-right: auto;
  }

  .fq-mobile-bar {
    display: grid;
    grid-template-columns: 1fr 1fr;
    position: sticky;
    top: 64px;
    z-index: 20;
    background: var(--fq-surface);
    border: 1px solid var(--fq-border);
    border-radius: 12px;
    margin-bottom: 12px;
    overflow: hidden;
    box-shadow: var(--fq-shadow-soft);
  }

  .fq-mobile-bar button {
    appearance: none;
    border: none;
    background: #fff;
    padding: 12px 10px;
    font-size: 13px;
    font-weight: 800;
    color: var(--fq-ink);
    font-family: inherit;
  }

  .fq-mobile-bar button + button {
    border-right: 1px solid var(--fq-border);
  }

  .fq-sort-panel {
    display: none;
    background: var(--fq-surface);
    border: 1px solid var(--fq-border);
    border-radius: 12px;
    padding: 10px;
    margin-bottom: 12px;
  }

  .fq-sort-panel.is-open {
    display: block;
  }

  .fq-toolbar .fq-sort {
    display: none;
  }
}

@keyframes fqSlideIn {
  from { transform: translateX(24px); opacity: 0.6; }
  to { transform: translateX(0); opacity: 1; }
}

@media (max-width: 575px) {
  .fq-hero {
    padding: 18px 16px;
  }

  .fq-hero__title {
    font-size: 18px;
  }

  .fq-segments {
    grid-template-columns: 1fr;
  }
}
