/* ==========================================================================
   هیرو صفحه اصلی — بازسازی دقیق کارت فیروزه‌ای طرح
   همه اعداد نسبت به بوم ۱۳۲۰×۶۱۲ طرح هستند و با یک متغیر مقیاس
   (--sl-k) در عرض‌های کوچک‌تر کوچک می‌شوند تا نسبت‌ها به‌هم نریزد.
   ========================================================================== */

.sl-hero {
	--sl-hero-bg: var(--sl-teal);
	--sl-k: 1;                       /* ضریب مقیاس */
	position: relative;              /* مرجع نشانگر «برو پایین» */
	padding-inline: var(--sl-gutter);
}

.sl-hero__card {
	position: relative;
	width: 100%;
	max-width: 1320px;
	height: calc(612px * var(--sl-k));
	margin-inline: auto;
	background: var(--sl-hero-bg);
	border-radius: calc(20px * var(--sl-k));

	/* بریدگی موجی وسط لبه پایین — دقیقاً مسیر طرح، نسبی‌شده */
	clip-path: path("M20,0 H1300 A20,20 0 0 1 1320,20 V592 A20,20 0 0 1 1300,612 H765 C717.75,612 707.5,562 660,562 C612.5,562 602.25,612 555,612 H20 A20,20 0 0 1 0,592 V20 A20,20 0 0 1 20,0 Z");
}

/* ---------------------------------------------------------------- تصاویر */

.sl-hero__art {
	position: absolute;
	inset: 0;
	overflow: hidden;
	pointer-events: none;
}

.sl-hero__backdrop,
.sl-hero__photo,
.sl-hero__sparkle {
	position: absolute;
	display: block;
	background-repeat: no-repeat;
}

/* هاله پشت پزشک: ۳۵۴×۶۱۲ در (۱۳۴,۰) با چرخش ۱۸۰ */
.sl-hero__backdrop {
	top: 0;
	left: calc(134px * var(--sl-k));
	width: calc(354px * var(--sl-k));
	height: calc(612px * var(--sl-k));
	background-size: cover;
	background-position: center;
	transform: rotate(180deg);
}

/* پزشک: پنجره ۴۶۴×۵۸۰ در (۹۴,۳۲)، تصویر ۹۰۹٫۸×۶۰۶ با افست ‎-346.64 */
.sl-hero__photo {
	top: calc(32px * var(--sl-k));
	left: calc(94px * var(--sl-k));
	width: calc(464px * var(--sl-k));
	height: calc(580px * var(--sl-k));
	background-size: calc(909.8px * var(--sl-k)) calc(606px * var(--sl-k));
	background-position: calc(-346.64px * var(--sl-k)) 0;
}

/* تزئین: ۵۴×۵۵ در (۵۸۱,۱۰۰) */
.sl-hero__sparkle {
	top: calc(100px * var(--sl-k));
	left: calc(581px * var(--sl-k));
	width: calc(54px * var(--sl-k));
	height: calc(55px * var(--sl-k));
	background-size: contain;
	background-position: center;
}

/* ------------------------------------------------------------------ متن */

.sl-hero__body {
	position: absolute;
	inset: 0;
	direction: rtl;
}

.sl-hero__title {
	position: absolute;
	top: calc(114px * var(--sl-k));
	right: calc(112px * var(--sl-k));
	margin: 0;
	color: #fff;
	font-size: calc(32px * var(--sl-k));
	font-weight: 800;
	line-height: calc(48px * var(--sl-k));
	letter-spacing: -.02em;
	text-align: right;
	white-space: nowrap;
}

.sl-hero__line { display: block; }

.sl-hero__line--mark { position: relative; }

/* زیرخط نارنجی: ۳۱۲×۲۰ پشت خط دوم */
.sl-hero__mark {
	position: absolute;
	bottom: calc(4px * var(--sl-k));
	right: 0;
	width: calc(312px * var(--sl-k));
	height: calc(20px * var(--sl-k));
	background: var(--sl-orange);
}

.sl-hero__linetext { position: relative; }

/* متن: ۵۳۶×۵۶ در (۶۷۲,۲۴۲) — از راست ۱۱۲ */
.sl-hero__text {
	position: absolute;
	top: calc(242px * var(--sl-k));
	right: calc(112px * var(--sl-k));
	width: calc(536px * var(--sl-k));
	margin: 0;
	color: #fff;
	font-size: calc(16px * var(--sl-k));
	font-weight: 400;
	line-height: calc(28px * var(--sl-k));
	letter-spacing: -.02em;
	text-align: right;
}

/* --------------------------------------------------------------- جستجو */

.sl-hero__search {
	position: absolute;
	top: calc(330px * var(--sl-k));
	right: calc(112px * var(--sl-k));
	display: flex;
	flex-direction: row;
	align-items: center;
	justify-content: space-between;
	gap: calc(12px * var(--sl-k));
	width: calc(536px * var(--sl-k));
	height: calc(60px * var(--sl-k));
	padding: calc(4px * var(--sl-k)) calc(24px * var(--sl-k)) calc(4px * var(--sl-k)) calc(4px * var(--sl-k));
	background: rgba(255, 255, 255, .15);
	border: 2px solid rgba(255, 255, 255, .3);
	border-radius: 1000px;
	box-shadow: 0 0 30px rgba(255, 255, 255, .08);
	backdrop-filter: blur(10px);
	box-sizing: border-box;
}

.sl-hero__submit {
	order: 3;
	flex: none;
	height: calc(48px * var(--sl-k));
	padding-inline: calc(32px * var(--sl-k));
	background: var(--sl-orange);
	border: 0;
	border-radius: 100px;
	color: #fff;
	font: inherit;
	font-size: calc(16px * var(--sl-k));
	font-weight: 600;
	line-height: calc(24px * var(--sl-k));
	cursor: pointer;
	transition: background-color .18s ease;
}

.sl-hero__submit:hover { background: #ea6a0c; }

.sl-hero__input {
	order: 2;
	flex: 1 1 auto;
	min-width: 0;
	border: 0;
	background: none;
	color: #fff;
	font: inherit;
	font-size: calc(14px * var(--sl-k));
	font-weight: 300;
	line-height: calc(20px * var(--sl-k));
	letter-spacing: -.02em;
	outline: none;
}

.sl-hero__input::placeholder { color: #fff; opacity: 1; }

.sl-hero__divider {
	order: 1;
	flex: none;
	width: 1px;
	height: calc(40px * var(--sl-k));
	background: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, .2) 50%, rgba(255, 255, 255, 0) 100%);
}

.sl-hero__city {
	order: 0;
	display: inline-flex;
	flex-direction: row;
	align-items: center;
	justify-content: flex-end;
	gap: calc(4px * var(--sl-k));
	flex: none;
	width: calc(99px * var(--sl-k));
	padding-inline-start: calc(12px * var(--sl-k));
	color: #fff;
}

.sl-hero__cityinput {
	width: 100%;
	min-width: 0;
	border: 0;
	background: none;
	color: #fff;
	font: inherit;
	font-size: calc(14px * var(--sl-k));
	line-height: calc(20px * var(--sl-k));
	letter-spacing: -.02em;
	text-align: end;
	outline: none;
}

.sl-hero__cityinput::placeholder { color: #fff; opacity: 1; }

.sl-hero__city .sl-i,
.sl-hero__city svg {
	flex: none;
	width: calc(16px * var(--sl-k));
	height: calc(16px * var(--sl-k));
	font-size: calc(16px * var(--sl-k));
}

/* ----------------------------------------------------------------- آمار */

/* ۴۵۰×۷۶ در (۷۱۵,۴۲۲) — از راست ۱۵۵ */
/*
 * ترتیب طرح از چپ به راست: ٪۹۸ · ۱۲۳۰+ · ۶۰۰+
 * صفحه RTL است، پس row-reverse لازم است تا ترتیب DOM همان ترتیب طرح شود.
 */
.sl-hero__stats {
	position: absolute;
	top: calc(422px * var(--sl-k));
	right: calc(155px * var(--sl-k));
	display: flex;
	flex-direction: row-reverse;
	align-items: center;
	justify-content: flex-end;
	gap: calc(12px * var(--sl-k));
	width: calc(450px * var(--sl-k));
	height: calc(76px * var(--sl-k));
}

.sl-hero__stat {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: calc(4px * var(--sl-k));
	width: calc(134px * var(--sl-k));
	flex: none;
	color: #fff;
	text-align: center;
}

.sl-hero__staticon {
	display: inline-flex;
	font-size: calc(24px * var(--sl-k));
	line-height: 1;
}

.sl-hero__staticon svg {
	width: calc(24px * var(--sl-k));
	height: calc(24px * var(--sl-k));
}

.sl-hero__statvalue {
	direction: ltr;
	unicode-bidi: isolate;
	font-size: calc(20px * var(--sl-k));
	font-weight: 800;
	line-height: calc(24px * var(--sl-k));
	letter-spacing: -.02em;
}

.sl-hero__statlabel {
	font-size: calc(14px * var(--sl-k));
	font-weight: 400;
	line-height: calc(20px * var(--sl-k));
	letter-spacing: -.02em;
}

.sl-hero__statsep {
	flex: none;
	width: 1px;
	height: calc(56px * var(--sl-k));
	background: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, .2) 50%, rgba(255, 255, 255, 0) 100%);
}

/* ------------------------------------------------------- نشانگر اسکرول */

/* ۳۲×۳۲ در (۶۴۴,۵۸۰) داخل بریدگی */
/*
 * وسط بریدگی موج. کارت پهنایش ۱۳۲۰ و وسط‌چین است و مرکز بریدگی هم دقیقاً
 * وسط کارت (۶۶۰) است، پس با left:50% وسط می‌افتد؛ نصف عرض خودش را با
 * margin عقب می‌کشیم تا transform برای انیمیشن آزاد بماند.
 */
.sl-hero__scroll {
	position: absolute;
	top: calc(580px * var(--sl-k));
	left: 50%;
	margin-left: calc(-16px * var(--sl-k));   /* فیزیکی، نه منطقی — صفحه RTL است */
	z-index: 3;
	display: grid;
	place-items: center;
	width: calc(32px * var(--sl-k));
	height: calc(32px * var(--sl-k));
	padding: 0;
	border: 0;
	background: none;
	color: var(--sl-teal);
	cursor: pointer;
	animation: sl-nudge 2.4s ease-in-out infinite;
}

.sl-hero__scroll svg {
	display: block;
	width: 100%;
	height: 100%;
}

.sl-hero__scroll:hover { color: var(--sl-ink); }

.sl-hero__scroll:focus-visible {
	outline: 2px solid var(--sl-teal);
	outline-offset: 4px;
	border-radius: 6px;
}

@keyframes sl-nudge {
	0%, 60%, 100% { transform: translateY(0); }
	30%           { transform: translateY(4px); }
}

@media (prefers-reduced-motion: reduce) {
	.sl-hero__scroll { animation: none; }
}

.sl-hero__scroll svg { width: 100%; height: 100%; }

/* -------------------------------------------------------------- مقیاس */

@media (max-width: 1400px) { .sl-hero { --sl-k: .92; } }
@media (max-width: 1240px) { .sl-hero { --sl-k: .84; } }
@media (max-width: 1120px) { .sl-hero { --sl-k: .76; } }

/* زیر ۱۰۲۴ چیدمان از حالت مطلق به جریان عادی می‌رود */
@media (max-width: 1023px) {
	.sl-hero__card {
		height: auto;
		padding: 32px 24px 40px;
		clip-path: none;
		border-radius: 20px;
	}

	.sl-hero__body {
		position: static;
		display: flex;
		flex-direction: column;
		gap: 20px;
	}

	.sl-hero__title,
	.sl-hero__text,
	.sl-hero__search,
	.sl-hero__stats {
		position: static;
		width: 100%;
		inset: auto;
	}

	.sl-hero__title {
		font-size: 26px;
		line-height: 40px;
		white-space: normal;
	}

	.sl-hero__mark { width: 70%; height: 16px; }
	.sl-hero__text { font-size: 15px; line-height: 28px; }

	.sl-hero__search {
		height: 56px;
		padding: 4px 16px 4px 4px;
	}

	.sl-hero__stats {
		height: auto;
		justify-content: space-between;
	}

	.sl-hero__stat { width: auto; flex: 1; }

	.sl-hero__art {
		position: relative;
		height: 320px;
		margin-block-end: 24px;
	}

	.sl-hero__backdrop { left: 50%; transform: translateX(-50%) rotate(180deg); width: 240px; height: 320px; }
	.sl-hero__photo {
		top: 0;
		left: 50%;
		width: 280px;
		height: 320px;
		transform: translateX(-50%);
		background-size: cover;
		background-position: 62% top;
	}

	.sl-hero__sparkle,
	.sl-hero__scroll { display: none; }
}

@media (max-width: 560px) {
	.sl-hero__search { flex-wrap: wrap; height: auto; border-radius: 20px; padding: 10px; }
	.sl-hero__submit { order: 10; width: 100%; }
	.sl-hero__divider { display: none; }
	.sl-hero__city { order: 1; width: auto; }
	.sl-hero__stats { flex-wrap: wrap; gap: 16px; }
	.sl-hero__statsep { display: none; }
}
