/* ══════════════════════════════════════════════════════════════
   کوچ — استایل اختصاصی «سرمایه‌گذاری»
   investment-immigration.css

   پیش‌نیاز:
   assets/css/base.css
   ══════════════════════════════════════════════════════════════ */


/* ══════════════════════════════════════════════════════════════
   کارت بودجه
   ══════════════════════════════════════════════════════════════ */

.budget-card {
  margin-top: 40px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 36px 40px;
  box-shadow: var(--shadow-lg);
}


/* ══════════════════════════════════════════════════════════════
   هدر کارت بودجه
   ══════════════════════════════════════════════════════════════ */

.budget-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.budget-top label {
  font-size: 15px;
  font-weight: 800;
}

.budget-top strong {
  font-size: 26px;
  font-weight: 900;
  color: var(--teal-deep);
}

html[data-theme="dark"] .budget-top strong {
  color: var(--teal-bright);
}


/* ══════════════════════════════════════════════════════════════
   اسلایدر بودجه
   ══════════════════════════════════════════════════════════════ */

#budgetRange {
  width: 100%;
  margin-top: 22px;

  appearance: none;
  -webkit-appearance: none;

  height: 10px;
  border-radius: 999px;

  /*
   * بسیار مهم:
   *
   * JS مقدار --fill-px را از سمت چپ محاسبه می‌کند.
   * بنابراین Gradient نیز باید از سمت چپ باشد.
   */
  background: linear-gradient(
    to right,
    var(--teal) 0,
    var(--teal) var(--fill-px, 14px),
    var(--bg-soft) var(--fill-px, 14px),
    var(--bg-soft) 100%
  );

  outline: none;
  cursor: pointer;

  /*
   * خود Range از چپ به راست مقدار می‌گیرد.
   */
  direction: ltr;

  touch-action: pan-y;
}


/* ══════════════════════════════════════════════════════════════
   Thumb — Chrome / Edge / Safari
   ══════════════════════════════════════════════════════════════ */

#budgetRange::-webkit-slider-thumb {
  appearance: none;
  -webkit-appearance: none;

  width: 28px;
  height: 28px;

  border-radius: 50%;

  background: #fff;

  border: 3px solid var(--teal);

  box-shadow:
    0 6px 18px rgba(46, 196, 182, 0.4);

  cursor: grab;

  position: relative;
  z-index: 2;
}

#budgetRange::-webkit-slider-thumb:hover {
  box-shadow:
    0 7px 22px rgba(46, 196, 182, 0.5);
}

#budgetRange::-webkit-slider-thumb:active {
  cursor: grabbing;

  box-shadow:
    0 8px 24px rgba(46, 196, 182, 0.55);
}


/* ══════════════════════════════════════════════════════════════
   Thumb — Firefox
   ══════════════════════════════════════════════════════════════ */

#budgetRange::-moz-range-thumb {
  width: 28px;
  height: 28px;

  border-radius: 50%;

  background: #fff;

  border: 3px solid var(--teal);

  box-shadow:
    0 6px 18px rgba(46, 196, 182, 0.4);

  cursor: grab;
}

#budgetRange::-moz-range-thumb:hover {
  box-shadow:
    0 7px 22px rgba(46, 196, 182, 0.5);
}

#budgetRange::-moz-range-thumb:active {
  cursor: grabbing;
}


/* ══════════════════════════════════════════════════════════════
   Track — Firefox
   ══════════════════════════════════════════════════════════════ */

#budgetRange::-moz-range-track {
  width: 100%;
  height: 10px;

  border-radius: 999px;

  background: var(--bg-soft);
}


/* ══════════════════════════════════════════════════════════════
   مقیاس زیر اسلایدر
   ══════════════════════════════════════════════════════════════ */

.budget-scale {
  margin-top: 10px;

  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 12px;

  font-size: 12px;
  font-weight: 700;

  color: var(--muted);
}


/* ══════════════════════════════════════════════════════════════
   تعداد برنامه‌های قابل بررسی
   ══════════════════════════════════════════════════════════════ */

.budget-count {
  margin-top: 14px;

  min-height: 22px;

  font-size: 14px;
  font-weight: 800;

  color: var(--ink-soft);

  text-align: center;
}


/* ══════════════════════════════════════════════════════════════
   کارت برنامه‌ها
   ══════════════════════════════════════════════════════════════ */

.prog-card {
  position: relative;

  opacity: 0.45;

  filter: grayscale(0.5);

  transition:
    opacity 0.35s ease,
    filter 0.35s ease,
    transform 0.3s ease,
    box-shadow 0.3s ease,
    border-color 0.3s ease;
}


/* ══════════════════════════════════════════════════════════════
   کارت متناسب با بودجه
   ══════════════════════════════════════════════════════════════ */

.prog-card.matched {
  opacity: 1;

  filter: none;

  border-color: rgba(46, 196, 182, 0.45);

  box-shadow:
    0 18px 44px rgba(46, 196, 182, 0.14);
}


/* ══════════════════════════════════════════════════════════════
   Hover کارت فعال
   ══════════════════════════════════════════════════════════════ */

.prog-card.matched:hover {
  transform: translateY(-4px);

  box-shadow:
    0 22px 50px rgba(46, 196, 182, 0.18);
}


/* ══════════════════════════════════════════════════════════════
   متادیتای برنامه
   ══════════════════════════════════════════════════════════════ */

.prog-meta {
  margin-top: 14px;

  display: flex;
  align-items: center;

  gap: 8px;

  flex-wrap: wrap;
}


/* ══════════════════════════════════════════════════════════════
   پیام برنامه متناسب
   ══════════════════════════════════════════════════════════════ */

.prog-match {
  display: none;

  margin-top: 14px;

  align-items: center;

  gap: 6px;

  font-size: 12.5px;

  font-weight: 900;

  color: var(--teal-deep);
}

html[data-theme="dark"] .prog-match {
  color: var(--teal-bright);
}

.prog-card.matched .prog-match {
  display: inline-flex;
}


/* ══════════════════════════════════════════════════════════════
   Dark Mode
   ══════════════════════════════════════════════════════════════ */

html[data-theme="dark"] #budgetRange {
  background: linear-gradient(
    to right,
    var(--teal) 0,
    var(--teal) var(--fill-px, 14px),
    var(--bg-soft) var(--fill-px, 14px),
    var(--bg-soft) 100%
  );
}

html[data-theme="dark"] #budgetRange::-webkit-slider-thumb {
  background: #f8fafc;
}

html[data-theme="dark"] #budgetRange::-moz-range-thumb {
  background: #f8fafc;
}


/* ══════════════════════════════════════════════════════════════
   Tablet
   ══════════════════════════════════════════════════════════════ */

@media (max-width: 900px) {

  .budget-card {
    padding: 32px 28px;
  }

  .budget-top strong {
    font-size: 24px;
  }

}


/* ══════════════════════════════════════════════════════════════
   Mobile
   ══════════════════════════════════════════════════════════════ */

@media (max-width: 640px) {

  .budget-card {
    margin-top: 28px;

    padding: 28px 22px;

    border-radius: 22px;
  }

  .budget-top {
    align-items: flex-start;

    flex-direction: column;

    gap: 8px;
  }

  .budget-top label {
    font-size: 14px;
  }

  .budget-top strong {
    font-size: 22px;
  }

  #budgetRange {
    margin-top: 24px;
  }

  #budgetRange::-webkit-slider-thumb {
    width: 28px;
    height: 28px;
  }

  #budgetRange::-moz-range-thumb {
    width: 28px;
    height: 28px;
  }

  .budget-scale {
    font-size: 11px;
  }

  .budget-count {
    font-size: 13px;
    line-height: 1.8;
  }

}


/* ══════════════════════════════════════════════════════════════
   Small Mobile
   ══════════════════════════════════════════════════════════════ */

@media (max-width: 400px) {

  .budget-card {
    padding: 24px 18px;
  }

  .budget-top strong {
    font-size: 20px;
  }

  .budget-scale {
    font-size: 10px;
  }

}
