/*
  بازطراحی صفحات عمومی تاریشا (برنچ feat/public-ui-polish)
  هیروی صفحه‌ی اصلی، کارت‌های خدمات، نوار فرایند همکاری و ویزارد
  برآورد — بر اساس موکاپ‌های تأییدشده‌ی کاربر (home/estimate-redesign).

  چرا فایل جدا؟ برنچ موازی feat/portal-ui-polish روی app.css کار
  کرده است؛ این فایل هیچ قاعده‌ی مشترکی را بازنویسی نمی‌کند و فقط
  کلاس‌های تازه‌ی همین بازطراحی (پیشوندهای home-/svc-/process-/wiz-)
  را دارد تا مرج هر دو برنچ بدون تعارض باشد. رنگ‌ها همه از توکن‌های
  tokens.css می‌آیند؛ هیچ رنگ تازه‌ای بیرون از پالت برند نیست.
*/

/* ——— ابزار مشترک ——— */
.pub-ic {
  width: 1.3rem;
  height: 1.3rem;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* برچسب بالای تیترها (چیپ شیشه‌ای روشن با نقطه‌ی فیروزه‌ای) */
.pub-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  background: var(--color-bg-surface);
  border: 1px solid #eae3d0;
  box-shadow: 0 4px 14px rgba(23, 59, 67, 0.05);
  border-radius: 999px;
  padding: 0.5rem 1rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--color-brand-primary);
}
.pub-eyebrow .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-brand-accent);
  box-shadow: 0 0 0 4px rgba(37, 182, 166, 0.18);
}

/* دکمه‌ی اصلی گرادیانی برند (جایگزین ترکیب bg-accent ساده در هیرو) */
.btn-brand-gradient {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  color: #fff;
  font-weight: 800;
  background: linear-gradient(120deg, var(--color-brand-primary) 5%, #1c655c 52%, var(--color-brand-accent) 105%);
  border-radius: 0.9rem;
  box-shadow: 0 10px 22px rgba(27, 140, 127, 0.3);
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.btn-brand-gradient:hover { opacity: 0.94; }

/* ————————————————— هیروی صفحه‌ی اصلی ————————————————— */
.home-hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(1000px 520px at 85% -8%, #fbf7ec 0%, var(--color-bg-body) 58%);
}
.home-hero-pattern {
  position: absolute;
  inset: 0;
  opacity: 0.05;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='72' height='72' viewBox='0 0 72 72'%3E%3Cpath d='M36 6 66 36 36 66 6 36Z' fill='none' stroke='%239C5A2C' stroke-width='1.4'/%3E%3Cpath d='M36 22 50 36 36 50 22 36Z' fill='none' stroke='%23173B43' stroke-width='1.2'/%3E%3Ccircle cx='36' cy='36' r='3' fill='%239C5A2C'/%3E%3C/svg%3E");
  background-repeat: repeat;
}
.home-hero-title {
  font-size: clamp(2rem, 4.6vw, 2.9rem);
  font-weight: 900;
  line-height: 1.35;
  color: var(--color-brand-primary);
  letter-spacing: -0.3px;
}
.home-hero-title .acc {
  color: #1b8c7f;
  position: relative;
  white-space: nowrap;
}
.home-hero-title .acc::after {
  content: "";
  position: absolute;
  right: 0;
  left: 0;
  bottom: 4px;
  height: 9px;
  background: rgba(185, 121, 82, 0.28);
  border-radius: 6px;
  z-index: -1;
}
.home-slogan {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  color: var(--color-copper-text);
  font-size: 1.18rem;
  font-weight: 800;
}
.home-slogan::before {
  content: "";
  width: 44px;
  height: 2.5px;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--color-brand-copper), rgba(185, 121, 82, 0));
}
.home-hero-sub {
  font-size: 1.03rem;
  line-height: 2;
  color: var(--color-text-muted);
  font-weight: 500;
  max-width: 35rem;
}
.home-trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.6rem;
}
.home-trust-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-text-muted);
}
.home-trust-item .ck {
  width: 21px;
  height: 21px;
  border-radius: 50%;
  background: rgba(37, 182, 166, 0.14);
  color: #1b8c7f;
  display: flex;
  align-items: center;
  justify-content: center;
}
.home-trust-item .ck .pub-ic { width: 12.5px; height: 12.5px; stroke-width: 3; }

/* قاب طاقی کاراکتر — امضای «دروازه‌ی تاریشا» */
.hero-arch-wrap { position: relative; }
.hero-arch {
  position: relative;
  border-radius: 250px 250px 30px 30px;
  overflow: hidden;
  border: 6px solid #fff;
  box-shadow: 0 34px 70px rgba(23, 59, 67, 0.22);
  background: #e9e2d2;
  aspect-ratio: 470 / 590;
}
.hero-arch img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 16%;
}
.hero-arch-wrap::before {
  content: "";
  position: absolute;
  inset: -18px -18px auto -18px;
  height: 56%;
  border: 2px solid rgba(185, 121, 82, 0.45);
  border-bottom: none;
  border-radius: 270px 270px 0 0;
  pointer-events: none;
}
.hero-name-chip {
  position: absolute;
  top: 2.4rem;
  inset-inline-start: -1rem;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  background: var(--color-bg-surface);
  border: 1px solid #eae3d0;
  border-radius: 1rem;
  box-shadow: 0 16px 34px rgba(23, 59, 67, 0.14);
  padding: 0.75rem 1.05rem;
}
.hero-name-chip .av {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-brand-accent), #157a6e);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-name-chip b { display: block; font-size: 0.88rem; font-weight: 800; color: var(--color-brand-primary); }
.hero-name-chip span { display: block; font-size: 0.72rem; color: #7a8a8e; font-weight: 500; margin-top: 1px; }

/* کارت شناور تیزر برآورد روی قاب — داده‌اش از نوع برآورد فعال می‌آید */
.hero-float-card {
  position: absolute;
  bottom: 1.6rem;
  inset-inline-end: -1.9rem;
  z-index: 3;
  width: 295px;
  max-width: calc(100vw - 3rem);
  background: var(--color-bg-surface);
  border: 1px solid #eae3d0;
  border-radius: 1.2rem;
  box-shadow: 0 22px 44px rgba(23, 59, 67, 0.17);
  padding: 1.05rem 1.2rem;
}
.hero-float-card .fh {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: #1b8c7f;
}
.hero-float-card .fh .pub-ic { width: 17px; height: 17px; }
.hero-float-card b {
  display: block;
  font-size: 1.03rem;
  font-weight: 800;
  color: var(--color-brand-primary);
  margin-top: 0.55rem;
}
.hero-float-card .pr {
  display: flex;
  align-items: baseline;
  gap: 0.45rem;
  margin-top: 0.3rem;
}
.hero-float-card .pr small { font-size: 0.75rem; color: #7a8a8e; font-weight: 500; }
.hero-float-card .pr strong { font-size: 1.12rem; font-weight: 900; color: var(--color-copper-text); }
.hero-float-card .bar {
  height: 7px;
  border-radius: 6px;
  background: #efe9da;
  margin-top: 0.8rem;
  overflow: hidden;
}
.hero-float-card .bar i {
  display: block;
  height: 100%;
  width: 26%;
  border-radius: 6px;
  background: linear-gradient(90deg, var(--color-brand-accent), #1c655c);
}
@media (max-width: 1023px) {
  .hero-name-chip { inset-inline-start: 0.25rem; }
  .hero-float-card { inset-inline-end: 0.25rem; }
}

/* ————————————————— کارت‌های خدمات صفحه‌ی اصلی ————————————————— */
.svc-sec-head h2 { color: var(--color-brand-primary); }
.svc-grid { align-items: stretch; }
.svc-card {
  background: var(--color-bg-surface);
  border: 1px solid #eae3d0;
  border-radius: 1.3rem;
  padding: 1.6rem 1.45rem 1.4rem;
  box-shadow: 0 12px 30px rgba(23, 59, 67, 0.055);
  display: flex;
  flex-direction: column;
}
.svc-card .svc-ic {
  width: 54px;
  height: 54px;
  border-radius: 1rem;
  background: linear-gradient(135deg, var(--color-brand-primary), #1c655c);
  color: #7fe3d2;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 20px rgba(23, 59, 67, 0.22);
}
.svc-card .svc-ic .pub-ic { width: 26px; height: 26px; }
.svc-card--copper .svc-ic {
  background: linear-gradient(135deg, #8a5a34, var(--color-brand-copper));
  color: #ffe3c9;
}
.svc-card h3 {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--color-brand-primary);
  margin-top: 1.1rem;
  line-height: 1.5;
}
.svc-card .svc-desc {
  font-size: 0.85rem;
  line-height: 1.95;
  color: var(--color-text-muted);
  font-weight: 500;
  margin-top: 0.5rem;
  flex: 1;
}
.svc-card .svc-foot {
  border-top: 1.5px dashed #efe8d6;
  margin-top: 1.1rem;
  padding-top: 0.95rem;
}
.svc-card .svc-price small {
  display: block;
  font-size: 0.72rem;
  color: #7a8a8e;
  font-weight: 500;
}
.svc-card .svc-price strong {
  display: block;
  font-size: 1.03rem;
  font-weight: 900;
  color: var(--color-copper-text);
  margin-top: 0.15rem;
}
.svc-card .svc-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 1.1rem;
  margin-top: 0.8rem;
}
.svc-card .svc-go {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.85rem;
  font-weight: 700;
  color: #1b8c7f;
  text-decoration: none;
}
.svc-card .svc-go .pub-ic { width: 16px; height: 16px; }
.svc-card .svc-detail {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--color-copper-text);
  text-decoration: none;
}
.svc-card .svc-detail:hover { color: var(--color-brand-accent); }

/* ————————————————— نوار فرایند «چطور کار می‌کنیم» ————————————————— */
.process-strip {
  position: relative;
  overflow: hidden;
  background: linear-gradient(160deg, #1a4149 0%, var(--color-brand-primary) 40%, #102e35 100%);
  color: var(--color-on-dark);
}
.process-strip::after {
  content: "";
  position: absolute;
  left: -90px;
  top: -110px;
  width: 330px;
  height: 330px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(37, 182, 166, 0.22), transparent 68%);
  pointer-events: none;
}
.process-strip .sec-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.82rem;
  font-weight: 800;
  color: #8fe0d2;
  background: rgba(37, 182, 166, 0.13);
  border: 1px solid rgba(37, 182, 166, 0.3);
  padding: 0.45rem 0.95rem;
  border-radius: 999px;
}
.process-strip h2 { color: #fbf7ec; }
.process-strip .lead {
  font-size: 0.97rem;
  color: #bfd9d3;
  font-weight: 500;
  line-height: 1.95;
  max-width: 600px;
}
.process-steps { position: relative; }
.process-steps::before {
  content: "";
  position: absolute;
  top: 29px;
  right: 11%;
  left: 11%;
  border-top: 2px dashed rgba(143, 224, 210, 0.3);
}
@media (max-width: 767px) {
  .process-steps::before { display: none; }
}
.process-step { text-align: center; padding: 0 0.5rem; }
.process-step .num {
  width: 58px;
  height: 58px;
  margin: 0 auto;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  border: 2px solid rgba(185, 121, 82, 0.75);
  color: #f0c9a8;
  font-size: 1.3rem;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.25);
}
.process-step .sic {
  margin: 1.1rem auto 0;
  width: 44px;
  height: 44px;
  border-radius: 0.8rem;
  background: rgba(37, 182, 166, 0.15);
  color: #3ed3bf;
  display: flex;
  align-items: center;
  justify-content: center;
}
.process-step .sic .pub-ic { width: 22px; height: 22px; }
.process-step b {
  display: block;
  font-size: 1.03rem;
  font-weight: 800;
  color: #fff;
  margin-top: 0.9rem;
}
.process-step p {
  font-size: 0.82rem;
  line-height: 1.95;
  color: #a9c8c1;
  font-weight: 500;
  margin-top: 0.45rem;
}
.process-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  text-align: center;
  font-size: 0.88rem;
  font-weight: 500;
  color: #bfd9d3;
  position: relative;
  z-index: 1;
}
.process-note .pub-ic { width: 18px; height: 18px; color: #3ed3bf; stroke-width: 3; }

/* ————————————————— ویزارد برآورد ————————————————— */
/* چیدمان دو ستونه: فرم + پنل پیش‌نمایش چسبان (در موبایل زیر هم) */
.wiz-layout {
  display: grid;
  gap: 1.5rem;
  align-items: start;
}

/* نوار پیشرفت: دایره‌ی شماره + برچسب؛ حالت فعال را estimate.js با
   کلاس‌های bg-accent/text-brand/border-accent روی همان li می‌نشاند
   و این‌جا آن حالت به شکل موکاپ (دایره‌ی گرادیانی) ترجمه می‌شود. */
.wiz-progress {
  display: flex;
  align-items: flex-start;
  position: relative;
  list-style: none;
}
.wiz-progress::before {
  content: "";
  position: absolute;
  top: 23px;
  right: 12%;
  left: 12%;
  border-top: 2.5px dashed #d9d2be;
}
.wiz-pstep {
  flex: 1;
  text-align: center;
  position: relative;
  z-index: 1;
  background: transparent;
  border: none;
}
.wiz-pstep .wiz-pc {
  width: 47px;
  height: 47px;
  margin: 0 auto;
  border-radius: 50%;
  background: var(--color-bg-surface);
  border: 2px solid #d9d2be;
  color: #a3afa9;
  font-size: 1.03rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 5px 14px rgba(23, 59, 67, 0.06);
}
.wiz-pstep .wiz-plabel {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  color: #a3afa9;
  margin-top: 0.6rem;
}
.wiz-progress li.bg-accent { background: transparent; border-color: transparent; color: inherit; }
.wiz-progress li.bg-accent .wiz-pc {
  background: linear-gradient(135deg, var(--color-brand-accent), #1c655c);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 10px 22px rgba(27, 140, 127, 0.35);
}
.wiz-progress li.bg-accent .wiz-plabel {
  color: var(--color-brand-primary);
  font-weight: 800;
}

/* کارت انتخاب نوع پروژه (label دور رادیو) */
.wiz-type-card {
  position: relative;
  display: block;
  border: 1.8px solid var(--color-border);
  background: #fdfcf8;
  border-radius: 1.15rem;
  padding: 1.3rem 1.25rem 1.15rem;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.wiz-type-card:hover { border-color: var(--color-brand-accent); }
.wiz-type-card:has(:checked) {
  border-color: var(--color-brand-accent);
  background: linear-gradient(180deg, rgba(37, 182, 166, 0.075), rgba(37, 182, 166, 0.02));
  box-shadow: 0 0 0 4px rgba(37, 182, 166, 0.14), 0 14px 28px rgba(27, 140, 127, 0.12);
}
.wiz-type-card .wiz-tic {
  width: 48px;
  height: 48px;
  border-radius: 0.9rem;
  background: linear-gradient(135deg, rgba(23, 59, 67, 0.08), rgba(23, 59, 67, 0.04));
  color: var(--color-brand-primary);
  display: flex;
  align-items: center;
  justify-content: center;
}
.wiz-type-card .wiz-tic .pub-ic { width: 24px; height: 24px; }
.wiz-type-card:has(:checked) .wiz-tic {
  background: linear-gradient(135deg, var(--color-brand-accent), #1c655c);
  color: #bff5ea;
}
/* رادیوی سفارشی گوشه‌ی کارت: خود input واقعی است (نام/اجباری/رفتار
   دست نخورده) و فقط ظاهرش دایره‌ی موکاپ شده است. */
.wiz-type-card input[type="radio"].wiz-radio {
  appearance: none;
  -webkit-appearance: none;
  position: absolute;
  top: 1rem;
  inset-inline-end: 1rem;
  width: 23px;
  height: 23px;
  margin: 0;
  border-radius: 50%;
  border: 2px solid #cfc7ae;
  background: var(--color-bg-surface);
  cursor: pointer;
  flex: none;
}
.wiz-type-card input[type="radio"].wiz-radio:checked {
  border-color: transparent;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center / 13px no-repeat,
    linear-gradient(135deg, var(--color-brand-accent), #1c655c);
}
.wiz-type-name {
  display: block;
  font-size: 1rem;
  font-weight: 800;
  color: var(--color-brand-primary);
  margin-top: 0.9rem;
  line-height: 1.5;
}
.wiz-type-desc {
  display: block;
  font-size: 0.8rem;
  line-height: 1.9;
  color: var(--color-text-muted);
  font-weight: 500;
  margin-top: 0.3rem;
}
.wiz-type-meta {
  display: block;
  font-size: 0.8rem;
  color: var(--color-copper-text);
  font-weight: 500;
  margin-top: 0.35rem;
}
.wiz-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.8rem;
  background: rgba(185, 121, 82, 0.1);
  border: 1px solid rgba(185, 121, 82, 0.22);
  color: var(--color-copper-text);
  font-size: 0.82rem;
  font-weight: 800;
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
}
.wiz-chip .pub-ic { width: 15px; height: 15px; }
.wiz-type-card:has(:checked) .wiz-chip {
  background: rgba(37, 182, 166, 0.12);
  border-color: rgba(37, 182, 166, 0.35);
  color: #1b8c7f;
}

/* گزینه‌های امکانات/سؤال‌ها (گام‌های ۲ و ۳) — هم‌خانواده‌ی کارت نوع */
.wiz-opt {
  background: #fdfcf8;
  border-radius: 0.9rem;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.wiz-opt:has(:checked) {
  border-color: var(--color-brand-accent);
  background: rgba(37, 182, 166, 0.05);
}

/* پنل پیش‌نمایش زنده (تیره، مثل موکاپ) — محتوایش را estimate.js پر
   می‌کند؛ رنگ متن‌های داخلش این‌جا روی زمینه‌ی تیره تنظیم می‌شود. */
.wiz-summary {
  background: linear-gradient(165deg, #1a4149 0%, var(--color-brand-primary) 42%, #102e35 100%);
  border: none;
  border-radius: 1.3rem;
  color: var(--color-on-dark);
  box-shadow: 0 22px 44px rgba(16, 46, 53, 0.3);
  position: relative;
  overflow: hidden;
}
.wiz-summary::after {
  content: "";
  position: absolute;
  left: -70px;
  bottom: -90px;
  width: 230px;
  height: 230px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(37, 182, 166, 0.22), transparent 68%);
  pointer-events: none;
}
.wiz-summary h2 {
  color: #fff;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  position: relative;
  z-index: 1;
}
.wiz-summary .live-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #3ed3bf;
  box-shadow: 0 0 0 5px rgba(62, 211, 191, 0.16);
  flex: none;
}
.wiz-summary #estimate-preview-body {
  color: var(--color-on-dark);
  position: relative;
  z-index: 1;
}
.wiz-summary #estimate-preview-body .text-muted { color: rgba(230, 242, 239, 0.62); }
.wiz-summary #estimate-preview-body strong { color: #fff; }

/* ستون‌بندی و چسبان‌شدن پنل پیش‌نمایش — عمداً بعد از قاعده‌ی پایه‌ی
   .wiz-summary آمده تا position آن را در دسکتاپ به sticky برساند و
   top فقط همان‌جا معنا داشته باشد (پایین‌تر از دسکتاپ، پنل سر جای
   خودش زیر فرم می‌نشیند). */
@media (min-width: 1024px) {
  .wiz-layout { grid-template-columns: 1fr 360px; }
  .wiz-summary { position: sticky; top: 7rem; }
}

/* ورود نرم کارت‌ها (هم‌خانواده‌ی موکاپ) با احترام به کاهش حرکت */
@keyframes pub-rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}
.pub-rise { animation: pub-rise 0.55s ease both; }
@media (prefers-reduced-motion: reduce) {
  .pub-rise { animation: none; }
}
