/* صفحه خدمات مشاوره — بخش ویزارد و راهنمای هوشمند */

/* هدر بالای صفحه (hero) */
.hero--consult .hero-desc-desktop {
  display: block;
}

.consult-wizard-section {
  position: relative;
  overflow: hidden;
  padding-top: 20px !important;
  padding-bottom: 16px !important;
}

.consult-wizard-section::before {
  content: '';
  position: absolute;
  inset: -40% -20% auto auto;
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, rgba(20, 184, 166, 0.1) 0%, transparent 70%);
  pointer-events: none;
}

.consult-intro-compact {
  position: relative;
  z-index: 1;
  margin-bottom: 10px;
}

.consult-intro-top {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.consult-intro-text {
  flex: 1;
  min-width: 0;
}

.consult-intro-title {
  font-size: 1.2rem;
  margin-bottom: 4px !important;
}

.consult-intro-sub {
  font-size: 0.82rem !important;
  margin-bottom: 0 !important;
  line-height: 1.45;
}

.consult-hero-art {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.consult-hero-art svg {
  width: 88px;
  height: auto;
  filter: drop-shadow(0 6px 16px rgba(15, 118, 110, 0.12));
}

/* سه برچسب همیشه در یک ردیف */
.consult-vector-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 12px;
}

.consult-vector-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 6px 4px;
  font-size: 0.7rem;
  color: #475569;
  text-align: center;
  line-height: 1.2;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
  min-width: 0;
}

.consult-vector-chip span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.consult-vector-chip svg {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.consult-launcher-card {
  position: relative;
  z-index: 1;
  margin-bottom: 8px;
}

.consult-launcher-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: right;
  border: none;
  border-radius: 14px;
  padding: 12px 14px;
  font-weight: 700;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.06);
}

.consult-launcher-btn:hover {
  transform: translateY(-1px);
}

.consult-launcher-btn.is-active {
  box-shadow: 0 10px 24px rgba(15, 118, 110, 0.18);
}

.consult-launcher-friendly {
  background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
  color: #065f46;
  border: 1px solid #6ee7b7;
}

.consult-launcher-wizard {
  background: linear-gradient(135deg, #0f172a 0%, #0f766e 55%, #14b8a6 100%);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.consult-launcher-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.1rem;
}

.consult-launcher-friendly .consult-launcher-icon {
  background: #fff;
  color: #059669;
}

.consult-launcher-wizard .consult-launcher-icon {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

.consult-launcher-text {
  flex: 1;
  min-width: 0;
}

.consult-launcher-title {
  font-size: 0.95rem;
  margin-bottom: 1px;
}

.consult-launcher-sub {
  font-size: 0.72rem;
  opacity: 0.85;
  font-weight: 500;
  line-height: 1.35;
}

.consult-launcher-chevron {
  transition: transform 0.25s ease;
  opacity: 0.85;
  font-size: 0.85rem;
}

.consult-launcher-btn.is-active .consult-launcher-chevron {
  transform: rotate(180deg);
}

.consult-accordion-panel {
  display: none;
  margin-top: 8px;
  animation: consultSlide 0.28s ease;
}

.consult-accordion-panel.is-open {
  display: block;
}

@keyframes consultSlide {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.friendly-guide-panel {
  background: #fff;
  border: 1px solid #a7f3d0;
  border-radius: 14px;
  padding: 14px;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.08);
}

.friendly-guide-summary {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 0.8rem;
  color: #166534;
  margin-top: 8px;
}

.friendly-guide-summary.d-none {
  display: none !important;
}

.wizard-wrap.collapsed-init {
  border-radius: 16px;
}

/* ویزارد تمام‌صفحه با هدر جمع و ناوبری ثابت */
#wizardAccordion.is-open .wizard-wrap {
  position: fixed;
  inset: 0;
  z-index: 1045;
  display: flex;
  flex-direction: column;
  height: 100dvh;
  max-height: 100dvh;
  border-radius: 0;
  margin: 0;
  border: none;
  box-shadow: none;
}

body.consult-wizard-open {
  overflow: hidden;
}

#wizardAccordion.is-open .wizard-head {
  flex-shrink: 0;
  padding: 10px 12px 8px !important;
}

.wizard-head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.wizard-head-main {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1;
}

.wizard-head-title {
  font-size: 0.9rem;
  font-weight: 800;
  line-height: 1.2;
}

.wizard-step-badge {
  font-size: 0.72rem;
  opacity: 0.9;
  white-space: nowrap;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  padding: 2px 8px;
}

.wizard-close-btn {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease;
}

.wizard-close-btn:hover {
  background: rgba(255, 255, 255, 0.22);
}

#wizardAccordion.is-open .wizard-progress {
  height: 5px;
  margin-top: 0;
}

#wizardAccordion.is-open .wizard-steps {
  display: flex;
  flex-wrap: nowrap;
  gap: 4px;
  margin-top: 6px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 2px;
}

#wizardAccordion.is-open .wizard-steps::-webkit-scrollbar {
  display: none;
}

#wizardAccordion.is-open .wizard-step-chip {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.68rem;
  padding: 2px 7px;
  opacity: 0.75;
  transition: opacity 0.2s ease, background 0.2s ease;
}

#wizardAccordion.is-open .wizard-step-chip.is-active {
  opacity: 1;
  background: rgba(255, 255, 255, 0.28);
  border-color: rgba(255, 255, 255, 0.45);
}

.wizard-chip-num {
  font-weight: 800;
  font-size: 0.7rem;
}

.wizard-chip-label {
  max-width: 3.2rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wizard-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: #fff;
}

#wizardAccordion.is-open .wizard-body {
  padding: 14px 14px 8px;
}

#wizardAccordion.is-open .step-title {
  font-size: 1rem;
  margin-bottom: 2px;
}

#wizardAccordion.is-open .step-help {
  font-size: 0.82rem;
  margin-bottom: 12px;
}

.wizard-nav {
  flex-shrink: 0;
  margin-top: 0;
  padding: 10px 12px;
  padding-bottom: max(10px, env(safe-area-inset-bottom));
  background: #fff;
  border-top: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: nowrap;
  box-shadow: 0 -4px 16px rgba(15, 23, 42, 0.06);
}

.wizard-nav .draft-note {
  font-size: 0.72rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 38%;
}

.wizard-nav-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

@media (max-width: 576px) {
  #wizardAccordion.is-open .wizard-chip-label {
    display: none;
  }

  #wizardAccordion.is-open .wizard-step-chip {
    padding: 2px 6px;
  }

  .wizard-nav .draft-note {
    display: none;
  }

  .wizard-nav-actions {
    width: 100%;
    justify-content: stretch;
  }

  .wizard-nav-actions .btn {
    flex: 1;
  }
}

/* دسکتاپ: کمی بزرگ‌تر */
@media (min-width: 992px) {
  .consult-wizard-section {
    padding-top: 28px !important;
  }

  .consult-hero-art svg {
    width: 140px;
  }

  .consult-intro-title {
    font-size: 1.35rem;
  }

  .consult-vector-chip {
    flex-direction: row;
    padding: 6px 10px 6px 8px;
    font-size: 0.78rem;
  }

  .consult-vector-chip svg {
    width: 26px;
    height: 26px;
  }

  .consult-launcher-btn {
    padding: 14px 16px;
  }

  .consult-launcher-icon {
    width: 44px;
    height: 44px;
  }
}

/* موبایل: جمع‌وجور تا دکمه‌های فرم در همان صفحه اول دیده شوند */
@media (max-width: 768px) {
  .hero--consult {
    padding: 12px 0 8px !important;
  }

  .hero--consult h1 {
    font-size: 1rem !important;
    margin-bottom: 2px !important;
  }

  .hero--consult .chip {
    font-size: 0.65rem !important;
    padding: 2px 8px !important;
    margin-bottom: 3px !important;
  }

  .hero--consult .hero-desc-desktop {
    display: none;
  }

  .hero--consult .btn-primary-soft {
    padding: 4px 11px !important;
    font-size: 0.72rem !important;
  }

  .consult-wizard-section {
    padding-top: 10px !important;
    padding-bottom: 12px !important;
  }

  .consult-intro-top {
    gap: 8px;
    margin-bottom: 8px;
  }

  .consult-hero-art svg {
    width: 64px;
  }

  .consult-intro-title {
    font-size: 0.92rem !important;
    margin-bottom: 2px !important;
  }

  .consult-intro-sub {
    font-size: 0.68rem !important;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .consult-vector-row {
    gap: 4px;
    margin-bottom: 8px;
  }

  .consult-vector-chip {
    padding: 5px 2px;
    font-size: 0.62rem;
    border-radius: 10px;
  }

  .consult-vector-chip svg {
    width: 20px;
    height: 20px;
  }

  .consult-launcher-card {
    margin-bottom: 6px;
  }

  .consult-launcher-btn {
    padding: 10px 11px;
    gap: 8px;
    border-radius: 12px;
  }

  .consult-launcher-icon {
    width: 34px;
    height: 34px;
    font-size: 0.95rem;
    border-radius: 10px;
  }

  .consult-launcher-title {
    font-size: 0.82rem;
  }

  .consult-launcher-sub {
    font-size: 0.65rem;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .friendly-guide-panel {
    padding: 12px;
  }
}

@media (max-width: 380px) {
  .consult-vector-chip span {
    font-size: 0.58rem;
  }

  .consult-launcher-sub {
    display: none;
  }
}

/* لیست مشاوران — بین ویزارد و حوزه‌ها */
.consult-counselors-section {
  padding-top: 8px !important;
}

.consult-wizard-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, #cbd5e1 15%, #99f6e4 50%, #cbd5e1 85%, transparent);
  margin: 4px 0 20px;
}

.counselors-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.counselors-search-wrap {
  position: relative;
  flex: 1;
  min-width: min(100%, 260px);
  max-width: 360px;
}

.counselors-search-icon {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #64748b;
  font-size: 0.85rem;
  pointer-events: none;
}

.counselors-search-input {
  padding-right: 36px;
  border-radius: 999px;
  border: 1px solid #cbd5e1;
  background: #fff;
  font-size: 0.88rem;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.05);
}

.counselors-search-input:focus {
  border-color: #14b8a6;
  box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.15);
}

.counselors-block {
  margin-bottom: 22px;
}

.counselors-block-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.counselors-block-title {
  font-size: 1rem;
  font-weight: 800;
  margin: 0;
  color: #0f172a;
}

.counselors-block-title--sub {
  font-size: 0.92rem;
  color: #475569;
  margin-bottom: 10px;
}

.counselors-block-pill {
  font-size: 0.72rem;
  border-radius: 999px;
  padding: 4px 10px;
  color: #0f766e;
  background: #ecfeff;
  border: 1px solid #99f6e4;
  white-space: nowrap;
}

.counselor-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  overflow: hidden;
  height: 100%;
  display: flex;
  flex-direction: column;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.counselor-card:hover {
  transform: translateY(-4px);
  border-color: #99f6e4;
  box-shadow: 0 14px 28px rgba(20, 184, 166, 0.14);
}

.counselor-card--featured {
  border-color: #a7f3d0;
  background: linear-gradient(180deg, #f0fdfa 0%, #fff 42%);
}

.counselor-card-photo-wrap {
  position: relative;
  background: linear-gradient(135deg, #ecfdf5 0%, #eff6ff 100%);
}

.counselor-card-photo {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  object-position: top center;
  display: block;
}

.counselor-card-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  font-size: 0.68rem;
  font-weight: 700;
  color: #0f766e;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid #99f6e4;
  border-radius: 999px;
  padding: 3px 8px;
  box-shadow: 0 2px 8px rgba(15, 118, 110, 0.12);
}

.counselor-card-body {
  padding: 12px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.counselor-card-name {
  font-size: 0.92rem;
  font-weight: 800;
  margin: 0 0 4px;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.counselor-card-spec {
  font-size: 0.78rem;
  color: #64748b;
  margin: 0 0 8px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.2em;
}

.counselor-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  font-size: 0.72rem;
  color: #64748b;
  margin-bottom: 6px;
}

.counselor-card-city {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.counselor-card-rating {
  flex-shrink: 0;
  font-weight: 700;
  color: #0f766e;
}

.counselor-card-stars {
  font-size: 0.72rem;
  letter-spacing: 1px;
  color: #f59e0b;
  margin-bottom: 10px;
}

.counselor-card-btn {
  margin-top: auto;
  border-radius: 10px;
  font-weight: 700;
  background: linear-gradient(90deg, #0f766e, #14b8a6);
  border: none;
  color: #fff;
}

.counselor-card-btn:hover {
  color: #fff;
  filter: brightness(1.05);
}

.counselors-search-empty {
  margin-top: 8px;
}

/* چیدمان کارت مشاور مثل صفحه نوبت‌دهی: موبایل ۳ ستونه، دسکتاپ ۴ ستونه */
.counselors-grid {
  --counselor-cols-mobile: 3;
  --counselor-cols-desktop: 4;
}

@media (min-width: 992px) {
  .counselors-grid--featured,
  .counselors-grid--rest {
    margin-bottom: 0;
  }
}

@media (max-width: 576px) {
  .counselors-section-head {
    flex-direction: column;
    align-items: stretch;
  }

  .counselors-search-wrap {
    max-width: none;
  }

  .counselor-card .counselor-card-body {
    padding: 0.5rem !important;
  }

  .counselor-card-name {
    font-size: 0.8rem;
    margin-bottom: 0.2rem !important;
  }

  .counselor-card-spec {
    font-size: 0.65rem;
    margin-bottom: 0.35rem;
    min-height: auto;
    -webkit-line-clamp: 1;
    line-clamp: 1;
  }

  .counselor-card-meta {
    font-size: 0.62rem;
    margin-bottom: 0.25rem;
  }

  .counselor-card-stars {
    font-size: 0.62rem;
    margin-bottom: 0.35rem;
  }

  .counselor-card-btn {
    padding: 0.2rem 0.4rem;
    font-size: 0.7rem;
  }
}
