:root{
  --color-white:#fff;
}

/* ============================= */
/* User Types – Desktop + Mobile */
/* ============================= */

/* فقط همین سکشن اسکوپ شود */
.user-types-container {
  display: flex;
  flex-wrap: nowrap;
  gap: 10px;
  justify-content: center;
  margin: 2rem auto;
  padding: 0 16px;
  direction: rtl;
  color: var(--color-white);
}

/* کارت‌ها (دسکتاپ) */
.user-box {
  flex: 1 1 480px;
  padding: 40px 32px;
  border-radius: 24px;
  color: var(--color-white);
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
  position: relative;
  overflow: hidden;
  border: 1px solid rgb(255 255 255 / 12%);
  background: rgb(17 24 39 / 0.4);
}
.user-box.client { border-bottom-left-radius: 10px; border-top-left-radius: 10px; }
.user-box:last-of-type  { border-bottom-right-radius: 10px; border-top-right-radius: 10px; }

/* رنگ‌بندی درست کارت‌ها */
.user-box.client { background: rgb(45 132 218 / 20%); }  /* آبی کارفرما */
.user-box.expert { background: rgb(36 211 167 / 20%); }  /* سبز متخصص */

/* تیتر دسکتاپ */
.user-box h2 {
  font-size: 26px;
  margin-bottom: 24px;
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
}
.info-icon { margin-left: 8px; }

/* لیست آیتم‌ها (دسکتاپ) */
.user-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 45px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.user-item h3 { font-size: 24px; margin-bottom: 6px; font-weight: 700; }
.user-item p  { font-size: 14px; opacity: 80%; font-weight: 700; line-height: 26px}

/* دکمه انتهای کارت */
.user-box-action { margin-top: auto; text-align: right; }

/* گرادیانت پس‌زمینه (دسکتاپ) */
.user-box.client .gradient {
  background: linear-gradient(#FFFFFF 0%, #2D84DA 45%, #01509E 100%);
  position: absolute;
  width: 100vw;
  height: 100%;
  filter: blur(86px);
  z-index: -1;
  bottom: -92%;
  border-radius: 99999999px;
  right: 28%;
}
.user-box.expert .gradient {
  background: linear-gradient(#FFFFFF 0%, #24D3A7 45%, #1BB393 100%);
  position: absolute;
  width: 100vw;
  height: 100%;
  filter: blur(86px);
  z-index: -1;
  bottom: -92%;
  border-radius: 99999999px;
  right: 28%;
  transform: rotate(180deg);
}

/* تب‌ها: فقط موبایل نشان داده شوند */
.user-tabs { display: none; }

/* ================= */
/*     ریسپانسیو     */
/* ================= */
@media (max-width: 1200px) {
  .user-list{
    grid-template-columns: repeat(1, 1fr);
  }
}
@media (max-width: 768px) {
  .user-types-container {
    gap: 14px;
    margin: 28px auto 36px;
    padding: 0 12px;
    flex-wrap: wrap;
  }

  /* --- تب‌ها طبق تصویر: بدون پس‌زمینه، خط زیر تب فعال --- */
  .user-tabs {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 28px;                   /* فاصله بین تب‌ها مثل ماکاپ */
    background: transparent;     /* بدون کپسول */
    border: 0;
    padding: 0;
    width: max-content;
    margin: 0 auto 8px;
  }
  .user-tabs input { display: none; }

  .user-tabs label {
      position: relative;
      display: inline-flex;
      align-items: center;
      gap: 10px;
      padding: 6px 0 10px;
      border-radius: 0;
      font-size: 20px;
      line-height: 1;
      color: rgba(255, 255, 255, 0.55);
      font-weight: 600;
      cursor: pointer;
      user-select: none;
  }

  /* دایره‌ی کوچک i کنار عنوان تب */
  .user-tabs .i-badge{
    width: 18px; height: 18px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.35);
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 12px; line-height: 1; font-weight: 600;
    color: rgba(255,255,255,0.45);
  }

  /* خط زیر تب (ابتدا نامرئی) */
  .user-tabs label::after{
    content: "";
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: -64%;
    width: 100%;
    height: 2px;
    background: transparent;
    border-radius: 2px;
  }

  /* تب فعال: سفید + خط زیر */
  #tab-client:checked + label,
  #tab-expert:checked + label{
    color: #fff;
  }
  #tab-client:checked + label::after,
  #tab-expert:checked + label::after{
    background: rgba(255,255,255,0.9);
  }
  #tab-client:checked + label .i-badge,
  #tab-expert:checked + label .i-badge{
    border-color: rgba(255,255,255,0.55);
    color: rgba(255,255,255,0.65);
  }

  /* نمایش کارت فعال با کلاس is-active (از JS) */
  .user-box { display: none; }
  .user-box.is-active { display: flex; }

  /* ظاهر کارت موبایل شبیه ماکاپ */
  .user-box {
    flex: 0 1 auto;
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
    padding: 24px 20px 18px;
    border-radius: 22px;
    border: 1px solid rgba(255,255,255,0.10);
    background: linear-gradient(180deg, rgba(17,24,39,0.9) 0%, rgba(12,10,34,0.9) 100%);
    box-shadow:
      inset 0 0 0 1px rgba(255,255,255,0.04),
      0 10px 28px rgba(0,0,0,0.35);
  }

  /* عنوان کارت در موبایل مخفی می‌شود (عنوان را تب‌ها می‌دهند) */
  .user-box h2 { display: none; }

  /* لیست و تایپوگرافی موبایل */
  .user-list { grid-template-columns: 1fr; gap: 22px; margin-bottom: 18px; }
  .user-item h3 { font-size: 24px; margin: 0 0 6px; }
  .user-item p  {
      font-size: 14px;
      margin: 0;
      opacity: 80%;
      line-height: 26px;
  }

  /* فقط چیدمان دکمه‌ها، بدون دست زدن به استایل سراسری */
  .user-types-container .user-box-action .order-btn,
  .user-types-container .user-box-action .expert-btn{
    width: 100%;
    justify-content: center;
  }

  /* گرادیانت نرم کف کارت */
  .user-box.client .gradient{
    position: absolute;
    inset: auto -30% -55% -30%;
    height: 70%;
    background: radial-gradient(60% 70% at 50% 0%,
    rgba(45,132,218,0.55) 0%,
    rgba(1,80,158,0.45) 55%,
    rgba(1,80,158,0.25) 75%,
    rgba(1,80,158,0.00) 100%);
    filter: blur(60px);
    z-index: -1;
  }
  .user-box.expert .gradient{
    position: absolute;
    inset: auto -30% -55% -30%;
    height: 70%;
    background: radial-gradient(60% 70% at 50% 0%,
    rgba(36,211,167,0.55) 0%,
    rgba(27,179,147,0.45) 55%,
    rgba(27,179,147,0.25) 75%,
    rgba(27,179,147,0.00) 100%);
    filter: blur(60px);
    z-index: -1;
  }

  /* یکسان‌سازی گوشه‌ها در موبایل */
  .user-box,
  .user-box:first-of-type,
  .user-box:last-of-type{
    border-radius: 22px !important;
  }
  .user-box{
      padding-top: 39px;
  }
}
