/**
 * کارت چرخشی هیرو — هر ۶ ثانیه اسلاید عوض می‌شود.
 * motion-design: شخصیت Premium (easing cubic-bezier(0.4,0,0.2,1))؛ crossfade + rise بین اسلایدها.
 * text skill: درج متن با Stagger reveal کلمه‌به‌کلمه + Blur-in (focus-in) — سازگار با خط فارسی.
 */

.bn-hero-rotator {
	--ease: cubic-bezier(0.4, 0, 0.2, 1);
	position: relative;
	max-width: 1120px; /* ۳۰٪ بزرگ‌تر از ۸۶۰px */
	margin-inline: auto;
	/* پس‌زمینه‌ی بنر اصلی هم‌رنگ سایر کارت‌ها (تیره: #212325) + خط نازک دور تا کادر مشخص باشد */
	background: var(--card-bg);
	border: 1px solid var(--border);
	border-radius: calc(var(--radius) + 8px);
	/* دو سایه‌ی نئومورفیک (نور بالا-چپ + سایه‌ی پایین-راست) */
	box-shadow: var(--neu-shadow);
	padding: 54px 44px 40px;
	overflow: hidden;
	isolation: isolate;
}

/* ── چیدمان اسلایدها (استک با grid تا ارتفاع = بلندترین اسلاید) ── */
.bn-rot-track { display: grid; }
.bn-rot-slide {
	grid-area: 1 / 1;
	text-align: center;
	opacity: 0;
	visibility: hidden;
	transform: translateX(56px); /* ورودِ اسلاید از سمت راست */
	transition: opacity .6s var(--ease), transform .6s var(--ease), visibility 0s linear .6s;
}
.bn-rot-slide.is-active {
	opacity: 1;
	visibility: visible;
	transform: none;
	transition: opacity .6s var(--ease), transform .6s var(--ease), visibility 0s;
}
.bn-rot-slide.bn-rot-out { /* اسلاید در حال خروج → به سمت چپ */
	opacity: 0;
	visibility: visible;
	transform: translateX(-56px);
	transition: opacity .6s var(--ease), transform .6s var(--ease), visibility 0s linear .6s;
}

/* تیتر و متن اسلاید */
.bn-rot-slide .bn-pill { margin-bottom: 22px; }
.bn-rot-title { font-size: clamp(21px, 3.1vw, 32px); line-height: 1.55; margin: 0 0 18px; font-weight: 800; }
.bn-rot-desc { font-size: 17px; color: var(--text-soft); max-width: 620px; margin: 0 auto 30px; line-height: 2; }

/* ── درج متن: Stagger + Blur-in کلمه‌به‌کلمه هنگام فعال‌شدن اسلاید ── */
.bn-rot-title .bn-w {
	display: inline-block;
	opacity: 0;
	transform: translateY(16px);
	filter: blur(6px);
	/* رنگ ثابت همرنگ دکمه‌ها (برند)، بدون افکت رنگی متحرک */
	color: var(--brand);
}
.bn-rot-slide.is-active .bn-rot-title .bn-w {
	opacity: 1;
	transform: none;
	filter: blur(0);
	transition: opacity .5s var(--ease), transform .5s var(--ease), filter .5s var(--ease);
	transition-delay: calc(var(--i) * 55ms + 120ms);
}

/* چیپس مراحل کار (از فایل متن) */
.bn-rot-steps {
	display: flex; flex-wrap: wrap; justify-content: center; gap: 8px;
	max-width: 640px; margin: 0 auto 26px;
	opacity: 0; transform: translateY(10px);
}
.bn-rot-slide.is-active .bn-rot-steps {
	opacity: 1; transform: none;
	transition: opacity .55s var(--ease), transform .55s var(--ease);
	transition-delay: .38s;
}
.bn-rot-steps span {
	font-size: 13px; color: var(--text-soft); font-weight: 600;
	padding: 6px 13px; border-radius: 999px;
	background: color-mix(in srgb, var(--brand) 7%, var(--surface));
	border: 1px solid color-mix(in srgb, var(--brand) 16%, var(--border));
}
/* پیل، توضیح و دکمه‌ها هم با کمی تأخیر محو می‌شوند (لایه‌های ثانویه) */
.bn-rot-slide .bn-pill,
.bn-rot-slide .bn-rot-desc,
.bn-rot-slide .bn-hero-actions { opacity: 0; transform: translateY(10px); }
.bn-rot-slide.is-active .bn-pill { opacity: 1; transform: none; transition: opacity .5s var(--ease), transform .5s var(--ease); transition-delay: 60ms; }
.bn-rot-slide.is-active .bn-rot-desc { opacity: 1; transform: none; transition: opacity .55s var(--ease), transform .55s var(--ease); transition-delay: .32s; }
.bn-rot-slide.is-active .bn-hero-actions { opacity: 1; transform: none; transition: opacity .55s var(--ease), transform .55s var(--ease); transition-delay: .44s; }

/* ── نشانگرها ── */
.bn-rot-dots { display: flex; justify-content: center; gap: 9px; margin-top: 30px; }
.bn-rot-dot {
	width: 9px; height: 9px; border-radius: 999px; padding: 0; cursor: pointer;
	border: 0; background: var(--border);
	transition: width .35s var(--ease), background .35s var(--ease);
}
.bn-rot-dot:hover { background: color-mix(in srgb, var(--brand) 50%, var(--border)); }
.bn-rot-dot.is-active { width: 26px; background: var(--brand); }
/* در تم تیره نقطه‌های غیرفعال با --border (#38393B) کم‌رنگ‌اند؛ روشن‌تر تا «بند روان» دیده شود. */
[data-theme="dark"] .bn-rot-dot { background: rgba(231, 237, 245, .28); }
[data-theme="dark"] .bn-rot-dot:hover { background: rgba(231, 237, 245, .5); }
[data-theme="dark"] .bn-rot-dot.is-active { background: var(--brand); }

@media (max-width: 560px) {
	.bn-hero-rotator { padding: 40px 22px 30px; }
}

/* احترام به کاهش حرکت: بدون transform/blur، فقط نمایش */
@media (prefers-reduced-motion: reduce) {
	.bn-rot-slide,
	.bn-rot-slide .bn-w,
	.bn-rot-slide .bn-pill,
	.bn-rot-slide .bn-rot-desc,
	.bn-rot-slide .bn-rot-steps,
	.bn-rot-slide .bn-rot-title,
	.bn-rot-slide .bn-hero-actions {
		transition: opacity .3s linear !important;
		transform: none !important;
		filter: none !important;
		animation: none !important;
	}
}
