/* ---------------------------------------------------------------------------
 * Fama — پایه: ریست، تایپوگرافی، دکمه، فرم
 * ------------------------------------------------------------------------ */

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	-webkit-text-size-adjust: 100%;
	scroll-behavior: smooth;
}

body {
	margin: 0;
	background: var(--mm-surface-page);
	color: var(--mm-text);
	font-family: var(--mm-font-sans);
	font-size: var(--mm-fs-base);
	font-weight: var(--mm-fw-regular);
	line-height: var(--mm-lh-normal);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
	margin: 0 0 var(--mm-space-3);
	font-family: var(--mm-font-sans);
	font-weight: var(--mm-fw-bold);
	line-height: var(--mm-lh-tight);
	color: inherit;
}

h1 { font-size: var(--mm-fs-3xl); }
h2 { font-size: var(--mm-fs-2xl); }
h3 { font-size: var(--mm-fs-xl); }
h4 { font-size: var(--mm-fs-lg); }
h5 { font-size: var(--mm-fs-base); }
h6 { font-size: var(--mm-fs-sm); }

p {
	margin: 0 0 var(--mm-space-4);
}

a {
	color: var(--mm-primary);
	text-decoration: none;
	transition: color var(--mm-transition), opacity var(--mm-transition);
}

a:hover,
a:focus-visible {
	color: var(--mm-primary-hover);
}

img,
svg,
video,
canvas {
	max-width: 100%;
	height: auto;
	display: block;
}

ul, ol {
	margin: 0 0 var(--mm-space-4);
	padding-inline-start: var(--mm-space-5);
}

figure {
	margin: 0;
}

hr {
	border: 0;
	border-top: 1px solid var(--mm-border);
	margin: var(--mm-space-8) 0;
}

:focus-visible {
	outline: 2px solid var(--mm-primary);
	outline-offset: 2px;
}

/* هر عنصری با ویژگی hidden باید پنهان بماند، حتی اگر کلاسش display دارد. */
[hidden] {
	display: none !important;
}

/* ---------- دسترس‌پذیری ---------- */

.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.mm-skip-link {
	position: absolute;
	inset-inline-start: -9999px;
	top: 0;
	z-index: 999;
	padding: var(--mm-space-3) var(--mm-space-4);
	background: var(--mm-primary);
	color: var(--mm-white);
	border-radius: 0 0 var(--mm-radius-md) var(--mm-radius-md);
}

.mm-skip-link:focus {
	inset-inline-start: var(--mm-space-4);
	color: var(--mm-white);
}

/* ---------- دکمه ---------- */

/*
 * ابعاد دکمه در سراسر سایت یکسان است: ارتفاع ۴۸، شعاع ۱۶، فونت ۱۶ با وزن
 * ۴۰۰ — همان چیزی که در فیگما برای «ثبت آگهی»، «جستجوی ملک»، «مشاهده همه»
 * و «ادامه و ثبت…» تکرار شده. پیش‌تر هر بخش پدینگ و ارتفاع خودش را داشت و
 * دکمه‌ها از ۳۸ تا ۵۰ پیکسل فرق می‌کردند.
 */
.mm-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: var(--mm-space-2);
	height: 48px;
	padding-block: 0;
	padding-inline: var(--mm-space-8);
	border: 1px solid transparent;
	border-radius: var(--mm-radius-lg);
	font-family: inherit;
	font-size: var(--mm-fs-base);
	font-weight: var(--mm-fw-regular);
	line-height: 24px;
	cursor: pointer;
	text-align: center;
	transition: background-color var(--mm-transition), color var(--mm-transition),
		border-color var(--mm-transition), transform var(--mm-transition);
}

.mm-btn:active {
	transform: translateY(1px);
}

.mm-btn svg,
.mm-btn img {
	width: 1.25em;
	height: 1.25em;
	flex: none;
}

.mm-btn--primary {
	background: var(--mm-primary);
	color: var(--mm-primary-contrast);
}

.mm-btn--primary:hover,
.mm-btn--primary:focus-visible {
	background: var(--mm-primary-hover);
	color: var(--mm-primary-contrast);
}

.mm-btn--accent {
	background: var(--mm-accent);
	color: var(--mm-accent-contrast);
}

.mm-btn--accent:hover,
.mm-btn--accent:focus-visible {
	background: var(--mm-accent-hover);
	color: var(--mm-accent-contrast);
}

.mm-btn--outline {
	background: transparent;
	border-color: var(--mm-border-strong);
	color: var(--mm-text);
}

.mm-btn--outline:hover,
.mm-btn--outline:focus-visible {
	border-color: var(--mm-primary);
	color: var(--mm-primary);
}

.mm-btn--ghost-light {
	background: transparent;
	border-color: var(--mm-border-on-dark);
	color: var(--mm-white);
}

.mm-btn--ghost-light:hover,
.mm-btn--ghost-light:focus-visible {
	background: rgba(255, 255, 255, .12);
	color: var(--mm-white);
}

/*
 * ‎--sm‎ و ‎--lg‎ فقط پدینگ افقی را تغییر می‌دهند، نه ارتفاع؛ وگرنه دکمه‌ها
 * دوباره در صفحه‌های مختلف اندازه‌های متفاوت پیدا می‌کنند.
 */
.mm-btn--sm {
	padding-inline: var(--mm-space-5);
}

.mm-btn--lg {
	padding-inline: var(--mm-space-10);
}

.mm-btn--block {
	width: 100%;
}

/* ---------- فرم ---------- */

.mm-field {
	display: flex;
	flex-direction: column;
	gap: var(--mm-space-2);
}

.mm-label {
	font-size: var(--mm-fs-sm);
	font-weight: var(--mm-fw-medium);
	color: var(--mm-text);
}

.mm-input,
.mm-select,
.mm-textarea,
input[type="text"],
input[type="email"],
input[type="url"],
input[type="password"],
input[type="search"],
input[type="number"],
input[type="tel"],
input[type="date"],
select,
textarea {
	width: 100%;
	padding: var(--mm-space-3) var(--mm-space-4);
	background: var(--mm-surface);
	border: 1px solid var(--mm-border);
	border-radius: var(--mm-radius-md);
	font-family: inherit;
	font-size: var(--mm-fs-sm);
	color: var(--mm-text);
	transition: border-color var(--mm-transition), box-shadow var(--mm-transition);
}

.mm-input::placeholder,
.mm-textarea::placeholder,
input::placeholder,
textarea::placeholder {
	color: var(--mm-text-muted);
	opacity: 1;
}

/*
 * مرورگر روی این نوع ورودی‌ها به‌صورت پیش‌فرض ‎direction: ltr‎ می‌گذارد (در
 * شیوه‌نامهٔ خودش، نه در کد ما)؛ نتیجه این بود که متن راهنمای فارسی از لبهٔ
 * چپ شروع می‌شد.
 *
 * تا وقتی فیلد خالی است RTL می‌شود تا متن راهنما سر جای درستش بنشیند، و
 * به‌محض تایپ دوباره LTR می‌شود تا ترتیب ارقام شماره و ایمیل به‌هم نریزد؛
 * ولی در هر دو حالت به لبهٔ راست چسبیده می‌ماند.
 */
input[type="tel"],
input[type="email"],
input[type="url"],
input[type="number"] {
	text-align: right;
}

input[type="tel"]:placeholder-shown,
input[type="email"]:placeholder-shown,
input[type="url"]:placeholder-shown,
input[type="number"]:placeholder-shown {
	direction: rtl;
}

.mm-input:focus,
.mm-select:focus,
.mm-textarea:focus,
input:focus,
select:focus,
textarea:focus {
	outline: none;
	border-color: var(--mm-primary);
	box-shadow: 0 0 0 3px rgba(6, 56, 190, .12);
}

.mm-textarea,
textarea {
	min-height: 8rem;
	resize: vertical;
}

/* ---------- کارت ---------- */

.mm-card {
	background: var(--mm-surface);
	border: 1px solid var(--mm-border);
	border-radius: var(--mm-radius-xl);
	overflow: hidden;
	transition: box-shadow var(--mm-transition), transform var(--mm-transition);
}

.mm-card:hover {
	box-shadow: var(--mm-shadow-md);
}

/* ---------- بج ---------- */

.mm-badge {
	display: inline-flex;
	align-items: center;
	gap: var(--mm-space-1);
	height: 24px;
	padding: 0 var(--mm-space-3);
	border-radius: var(--mm-radius-full);
	font-size: var(--mm-fs-xs);
	font-weight: var(--mm-fw-regular);
	line-height: 16px;
	white-space: nowrap;
}

.mm-badge--accent  { background: var(--mm-accent);  color: var(--mm-white); }
.mm-badge--success { background: var(--mm-success); color: var(--mm-white); }
.mm-badge--danger  { background: var(--mm-danger);  color: var(--mm-white); }
.mm-badge--dark    { background: rgba(4, 4, 4, .8); color: var(--mm-white); }
.mm-badge--light   { background: rgba(255, 255, 255, .1); color: var(--mm-white); }

/* ---------- حرکت کمتر ---------- */

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

	*,
	*::before,
	*::after {
		animation-duration: .01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: .01ms !important;
		scroll-behavior: auto !important;
	}
}

/* =========================================================================
 * چوران جهت‌دار — قابل استفاده در همهٔ بخش‌ها
 *
 * نویسه‌های ‹ › < > در متن راست‌چین توسط مرورگر آینه می‌شوند و برعکس
 * دیده می‌شوند. این کلاس با حاشیهٔ فیزیکی ساخته شده، پس جهتش در
 * راست‌چین و چپ‌چین یکسان و قابل پیش‌بینی است.
 *
 * قاعده در راست‌چین: «قبلی» سمت راست و رو به راست، «بعدی» سمت چپ و رو به چپ.
 * ====================================================================== */

.mm-chev {
	display: inline-block;
	width: .58em;
	height: .58em;
	border-right: .12em solid currentColor;
	border-bottom: .12em solid currentColor;
	vertical-align: middle;
}

.mm-chev--right { transform: rotate(-45deg)  translate(-.06em, -.06em); }
.mm-chev--left  { transform: rotate(135deg)  translate(-.06em, -.06em); }
.mm-chev--down  { transform: rotate(45deg)   translate(-.06em, -.06em); }
.mm-chev--up    { transform: rotate(225deg)  translate(-.06em, -.06em); }

/* =========================================================================
 * فونت پیش‌فرض المنتور
 *
 * کیت پیش‌فرض المنتور تایپوگرافی سراسری را Roboto می‌گذارد؛ چون قالب
 * گوگل‌فونت را می‌بندد، Roboto هرگز بارگذاری نمی‌شود و متن با فونت خام
 * سیستم رندر می‌شود. اینجا متغیرهای سراسری کیت — با هر شماره‌ای — به فونت
 * قالب وصل می‌شوند. انتخاب‌های آگاهانهٔ کاربر در پنل المنتور دست نمی‌خورد:
 * آن‌ها با سلکتور بسیار خاص‌ترِ خودِ عنصر چاپ می‌شوند و برنده می‌مانند.
 * ====================================================================== */

/* کلاس کیت روی خود body می‌نشیند، پس سلکتور بدون فاصله است. */
body[class*="elementor-kit-"],
body [class*="elementor-kit-"] {
	--e-global-typography-primary-font-family: 'PeydaFaNum';
	--e-global-typography-secondary-font-family: 'PeydaFaNum';
	--e-global-typography-text-font-family: 'PeydaFaNum';
	--e-global-typography-accent-font-family: 'PeydaFaNum';
}

/* عنصرهایی که کیت مستقیم (بدون متغیر) Roboto رویشان می‌گذارد. */
.elementor-widget-heading .elementor-heading-title,
.elementor-widget-text-editor,
.elementor-widget-button .elementor-button,
.elementor-widget-icon-box .elementor-icon-box-title,
.elementor-widget-icon-box .elementor-icon-box-description,
.elementor-widget-icon-list .elementor-icon-list-text,
.elementor-widget-counter .elementor-counter-title,
.elementor-widget-testimonial .elementor-testimonial-content,
.elementor-widget-tabs .elementor-tab-title,
.elementor-widget-accordion .elementor-tab-title,
.elementor-widget-toggle .elementor-tab-title {
	font-family: var(--mm-font-sans);
}

/* فلش‌های بیرون‌زدهٔ اسلایدر و باند مورب نباید اسکرول افقی بسازند. */
html, body {
	overflow-x: clip;
}

/*
 * جای اسکرول‌بار همیشه رزرو بماند؛ وگرنه با باز شدن مودال ورود
 * (overflow:hidden روی body) اسکرول‌بار محو می‌شود و کل صفحه می‌پرد.
 */
html {
	scrollbar-gutter: stable;
}
