/* ==========================================================================
   Hero Slider
   ========================================================================== */

.hero-slider{
	position: relative;
	overflow: hidden;
	min-height: 363px;
	display: flex;
	align-items: stretch;
	background: var(--color-gradient);
}

.hero-slide{
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	opacity: 0;
	visibility: hidden;
	transition: opacity .9s ease;
	overflow: hidden;
}
.hero-slide.is-active{ opacity: 1; visibility: visible; position: relative; width: 100%; }

/* اسلایدهایی که تصویر ندارند: پس‌زمینه گرادیان و متن در وسط، مثل قبل */
.hero-slide:not(.has-image){ justify-content: center; }
.hero-slide:not(.has-image) .hero-slide-inner{
	text-align: center;
	max-width: 820px;
	margin: 0 auto;
	padding: 70px 24px;
}

/* اسلایدهایی که تصویر دارند: عکس با عرض ثابت و کوچک، چسبیده به سمت چپ (و به‌اندازه کامل ارتفاع اسلاید)؛
   متن راست‌چین در باقی فضا، بدون آنکه عکس عرض کل اسلاید را افزایش دهد */
.hero-slide.has-image .hero-slide-media{
	position: absolute;
	inset-inline-end: 0;
	top: 0;
	bottom: 0;
	width: 52%;
	max-width: 680px;
	background-size: cover;
	background-position: center;
}
.hero-slide.has-image .hero-slide-inner{
	position: relative;
	z-index: 2;
	width: 100%;
	text-align: right;
	padding: 44px 78px 44px 50px;
	margin-inline-end: calc(52% + 24px);
}
@media (min-width: 1400px){
	.hero-slide.has-image .hero-slide-inner{ margin-inline-end: calc(680px + 24px); }
}

/* محو ملایم بین عکس و پس‌زمینه گرادیانی برای هماهنگی بیشتر رنگ‌ها */
.hero-slide-media::after{
	content: "";
	position: absolute; inset: 0;
	background: linear-gradient(to left, rgba(20,33,61,.3) 0%, rgba(20,33,61,0) 40%);
}

.hero-slide .hero-slide-inner{
	color: #fff;
}
.hero-slide .eyebrow{ color: #cfe8fb; font-weight: 700; letter-spacing: 1px; margin-bottom: 6px; font-size: 14px; }
.hero-slide h1, .hero-slide h2{ color: #fff; font-size: clamp(22px, 3vw, 34px); margin-bottom: 10px; }
.hero-slide p{ font-size: 16px; color: #e7eef7; margin-bottom: 14px; }
.hero-slide .btn{ padding: 10px 26px; font-size: 14.5px; margin-right: 18px; }

.hero-dots{
	position: absolute;
	bottom: 22px; right: 50%;
	transform: translateX(50%);
	display: flex; gap: 10px;
	z-index: 5;
}
.hero-dots button{
	width: 10px; height: 10px; border-radius: 50%;
	border: 2px solid #fff; background: transparent;
	padding: 0; cursor: pointer; opacity: .6;
}
.hero-dots button.is-active{ background: #fff; opacity: 1; }

.hero-arrow{
	position: absolute; top: 50%; transform: translateY(-50%);
	width: 44px; height: 44px; border-radius: 50%;
	background: rgba(255,255,255,.18);
	border: 1px solid rgba(255,255,255,.4);
	color: #fff; font-size: 18px;
	display: flex; align-items: center; justify-content: center;
	cursor: pointer; z-index: 5;
}
.hero-arrow:hover{ background: rgba(255,255,255,.32); }
.hero-arrow.prev{ right: 18px; }
.hero-arrow.next{ left: 18px; }

@media (max-width: 600px){
	.hero-slider{ min-height: 425px; }
	.hero-arrow{ display: none; }

	.hero-slide.has-image .hero-slide-media{
		inset-inline-end: 0;
		left: 0; right: 0;
		top: 0;
		bottom: auto;
		width: 100%;
		max-width: 100%;
		height: 150px;
	}
	.hero-slide.has-image .hero-slide-media::after{
		background: linear-gradient(180deg, rgba(20,33,61,0) 50%, rgba(20,33,61,.45) 100%);
	}
	.hero-slide.has-image .hero-slide-inner{
		margin-inline-end: 0;
		padding: 165px 24px 24px;
		text-align: center;
	}
}
