/* ---------- Font ---------- */
@font-face{
  font-family: "Pinar";
  src: url("../fonts/Pinar-VFDSTYKSHDwght.ttf") format("truetype-variations"),
       url("../fonts/Pinar-VFDSTYKSHDwght.ttf") format("truetype");
  font-weight: 100 900;
  font-stretch: 75% 125%;
  font-style: normal;
  font-display: swap;
}

/* Scope */
.mmag-finder, .mmag-finder *,
.mmag-results, .mmag-results *,
.mmag-rows, .mmag-rows *{
  font-family:"Pinar",system-ui,-apple-system,"Segoe UI",Roboto,sans-serif !important;
  box-sizing:border-box;
}

/* =================================================
   FILTER BAR
   ================================================= */
.mmag-finder{
  direction: rtl;
  position: relative;
  width: 100%;
  height: 83px;
  margin: 0 auto 24px;
  --bg: linear-gradient(107.9deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0) 168.2%);
  background: var(--bg);
  border: 1px solid #FFFFFF33;
  -webkit-backdrop-filter: blur(50px);
  backdrop-filter: blur(50px);
  padding: 18.5px 32px 18.5px 0;
}

.mmag-actions{
  position:absolute;
  top:0;left:0;bottom:0;
  width:202px;
  display:flex;
  align-items:stretch;
  justify-content:flex-end;
}

.mmag-btn{
  width:100%;
  height:100%;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  background:#FFF;
  color:#221C35;
  border:none;
  border-radius:0;
  cursor:pointer;
  font-size:16px;
  line-height:1;
  padding:0 16px;
}
.mmag-btn:hover,
.mmag-btn:focus{
  background:#FFF;
  color:#221C35;
  outline:none;
}

.mmag-btn-icon{
  width:20px;
  height:20px;
  display:inline-block;
  background:no-repeat center/contain url('../img/Magnifer.svg');
}

.mmag-fields{
  height:100%;
  margin-left:202px;
  display:flex;
  align-items:center;
  gap:0;
}

.mmag-field{
  width:164px;
  display:flex;
  flex-direction:column;
  justify-content:center;
}

.mmag-label{
  margin:0 0 4px;
  font-size:12px;
  color:#FFF;
  line-height:1.3;
  white-space:nowrap;
}

.mmag-select-wrap{
  position:relative;
  width:164px;
  height:40px;
}

.mmag-select{
  appearance:none;
  -webkit-appearance:none;
  -moz-appearance:none;
  width:100%;
  height:40px;
  background:transparent;
  border:none;
  outline:none;
  color:#FFF;
  font-size:16px;
  padding:8px 12px 8px 40px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.mmag-select:disabled{
  opacity:.6;
  cursor:not-allowed;
}
.mmag-select option{
  color:#000;
  background:#fff;
}

.mmag-suffix-icon{
  position:absolute;
  top:50%;
  left:10px;
  width:18px;
  height:18px;
  transform:translateY(-50%);
  background:no-repeat center/contain url('../img/Frame-1618873043.svg');
  pointer-events:none;
  opacity:.9;
}

.mmag-sep{
  width:1px;
  height:40px;
  background:#FFFFFF33;
  margin:0 64px;
}

/* Mobile filter */
@media (max-width:767px){
  .mmag-finder{
    display:flex;
    flex-direction:column;
    align-items:stretch;
    width:100%;
    height:auto;
    padding:12px;
    text-align:right;
    margin-bottom:16px;
  }
  .mmag-fields{
    order:1;
    margin-left:0;
    flex-direction:column;
    gap:12px;
  }
  .mmag-actions{
    order:2;
    position:static;
    width:100%;
    margin-top:12px;
  }
  .mmag-btn{
    width:100%;
    height:48px;
    font-size:15px;
  }
  .mmag-field{
    width:100%;
  }
  .mmag-label{
    font-size:11px;
    margin-bottom:4px;
  }
  .mmag-select-wrap{
    width:100%;
    height:44px;
  }
  .mmag-select{
    height:44px;
    font-size:15px;
    padding:8px 12px 8px 36px;
  }
  .mmag-suffix-icon{
    left:8px;
    width:16px;
    height:16px;
  }
  .mmag-sep{
    display:none;
  }
}

/* Empty state */
.mmag-empty{
  padding:12px;
  color:#6b7280;
  background:#fff;
  border:1px dashed #e6e6e6;
}

/* =================================================
   RESULTS — تمام‌عرض، یکی‌درمیان، ۳ ستونه
   ================================================= */

.mmag-rows{
  width:100%;
  display:flex;
  flex-direction:column;
  direction:rtl;
}

.mmag-row{
  width:100%;
}

.mmag-row:nth-child(odd){
  background:#FFFFFF;
  color:#221C35;
}

.mmag-row:nth-child(even){
  background:#221C35;
  color:#FFFFFF;
}

.mmag-row__inner{
  max-width:100%;
  margin:0 auto;
  padding:20px 32px;
}



.mmag-row-head{
  display:flex;
  justify-content:center;    /* متن وسط خود باکس */
  align-items:center;
  width:33.3333%;            /* دقیقا هم‌عرض ستون اول */
  margin:0 0 12px 0;         /* زیرش فاصله مثل قبل */
  /* چون direction از والد به ارث میاد (rtl)، این باکس روی ستون اول (سمت راست) می‌شینه */
}

.mmag-r-title{
  margin:0;
  font-size:20px;
  font-weight:600;
  line-height:1.3;
  text-align:center;         /* وسط درون باکس خودش */
  width:100%;
}


/* Grid 3 ستون */
.mmag-cols{
  display:grid;
  grid-template-columns:repeat(3, minmax(0,1fr));
  gap:24px;
}

/* ستون‌ها: وسط‌چین + جداکننده عمودی */
.mmag-col{
  position:relative;
  display:flex;
  flex-direction:column;
  gap:6px;
  align-items:center;      /* محتوا وسط ستون */
  text-align:center;       /* متن وسط‌چین */
  padding:0 16px;
}

/* خط بین ستون‌ها (دقیق بینشون) */
.mmag-cols .mmag-col:not(:last-child)::after{
  content:"";
  position:absolute;
  top:0;
  bottom:0;
  left:0;
  width:1px;
  background:rgba(0,0,0,0.12);
}

/* در ردیف بنفش، خط روشن‌تر */
.mmag-row:nth-child(even) .mmag-cols .mmag-col:not(:last-child)::after{
  background:rgba(255,255,255,0.25);
}

/* لوکیشن: استان • شهر */
.mmag-loc{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  justify-content:center;
  gap:6px;
  margin-bottom:4px;
}

.mmag-dot{
  width:6px;
  height:6px;
  border-radius:50%;
  background:currentColor;
  display:inline-block;
}

/* Key / Value */
.mmag-kv{
  display:flex;
  flex-wrap:wrap;
  gap:4px;
  align-items:baseline;
  justify-content:center;      /* وسط ستون */
  line-height:1.7;
}

/* متن‌ها: اجازه چند خطی + بریک */
.mmag-kv-label,
.mmag-kv-value,
.mmag-loc span{
  font-size:16px;
  white-space:normal !important;
  word-break:break-word;
}

/* وزن‌ها طبق خواسته */
.mmag-kv-label{
  font-weight:400; /* قبل از : */
}
.mmag-kv-value{
  font-weight:500; /* بعد از : */
}

/* رنگ‌ها روی تم روشن/تیره */
.mmag-row:nth-child(odd) .mmag-r-title,
.mmag-row:nth-child(odd) .mmag-kv-label,
.mmag-row:nth-child(odd) .mmag-kv-value{
  color:#221C35;
}

.mmag-row:nth-child(even) .mmag-r-title,
.mmag-row:nth-child(even) .mmag-kv-label,
.mmag-row:nth-child(even) .mmag-kv-value{
  color:#FFFFFF;
}

/* Responsive */
@media (max-width:1024px){
  .mmag-row__inner{
    padding:16px;
  }
  .mmag-cols{
    grid-template-columns:1fr;
    gap:10px;
  }
  /* حذف خطوط جداکننده در موبایل */
  .mmag-cols .mmag-col::after{
    display:none;
  }
}
