.rcesd-hero {
	--rcesd-hero-radius: 28px;
	--rcesd-hero-overlay: #073221;
	position: relative;
	height: auto;
	border-radius: var(--rcesd-hero-radius);
	overflow: hidden;
	direction: rtl;
	background: #123828;
	color: #fff;
	font-family: inherit;
	box-shadow: 0 18px 40px rgba(15, 40, 28, 0.12);
}

.rcesd-hero__viewport {
	position: relative;
}

.rcesd-hero__slide {
	position: absolute;
	inset: 0;
}

.rcesd-hero__slide.is-active {
	position: relative;
	height: auto;
}

/* کنار اخبار، قاب اسلایدر افقی است تا ارتفاع با عرض ۶۰٪ هم‌خوان شود. */
.e-con:has(.rcesd-news):has(.rcesd-hero) .rcesd-hero,
.elementor-container:has(.rcesd-news):has(.rcesd-hero) .rcesd-hero {
	aspect-ratio: 1.62 / 1;
	width: 100%;
}

.e-con:has(.rcesd-news):has(.rcesd-hero) .rcesd-hero__viewport,
.e-con:has(.rcesd-news):has(.rcesd-hero) .rcesd-hero__slide.is-active,
.elementor-container:has(.rcesd-news):has(.rcesd-hero) .rcesd-hero__viewport,
.elementor-container:has(.rcesd-news):has(.rcesd-hero) .rcesd-hero__slide.is-active {
	height: 100%;
}

.e-con:has(.rcesd-news):has(.rcesd-hero) .rcesd-hero__media,
.elementor-container:has(.rcesd-news):has(.rcesd-hero) .rcesd-hero__media {
	position: absolute;
	inset: 0;
}

.e-con:has(.rcesd-news):has(.rcesd-hero) .rcesd-hero__img,
.elementor-container:has(.rcesd-news):has(.rcesd-hero) .rcesd-hero__img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* وقتی ارتفاع با کارت اخبار یکی می‌شود، تصویر کل کادر را می‌پوشاند. */
.rcesd-hero.is-matched {
	display: flex;
	flex-direction: column;
}

.rcesd-hero.is-matched .rcesd-hero__viewport {
	flex: 1 1 auto;
	height: 100%;
	min-height: 0;
}

.rcesd-hero.is-matched .rcesd-hero__slide.is-active {
	height: 100%;
	min-height: 100%;
}

.rcesd-hero.is-matched .rcesd-hero__media {
	position: absolute;
	inset: 0;
}

.rcesd-hero.is-matched .rcesd-hero__img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.rcesd-hero__media {
	position: relative;
	min-height: 220px;
}

.rcesd-hero__media:has(.rcesd-hero__img) {
	min-height: 0;
}

.rcesd-hero__shade {
	position: absolute;
	inset: 0;
}

.rcesd-hero__slide {
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.55s ease;
	z-index: 0;
}

.rcesd-hero__slide.is-active {
	opacity: 1;
	visibility: visible;
	z-index: 1;
}

.rcesd-hero__img {
	width: 100%;
	height: auto;
	object-fit: contain;
	display: block;
}

.rcesd-hero__media {
	background:
		radial-gradient(circle at 18% 20%, rgba(120, 190, 90, 0.35), transparent 28%),
		linear-gradient(115deg, #1d4d34 0%, #2f6d45 42%, #163828 100%);
}

.rcesd-hero__shade {
	background:
		linear-gradient(90deg, rgba(7, 50, 33, 0) 32%, rgba(7, 50, 33, 0.45) 58%, #073221 100%),
		linear-gradient(to top, rgba(7, 50, 33, 0.55) 0%, rgba(7, 50, 33, 0) 42%);
	pointer-events: none;
}

@supports (color: color-mix(in srgb, black 50%, white)) {
	.rcesd-hero__shade {
		background:
			linear-gradient(90deg, transparent 30%, color-mix(in srgb, var(--rcesd-hero-overlay) 42%, transparent) 58%, var(--rcesd-hero-overlay) 100%),
			linear-gradient(to top, color-mix(in srgb, var(--rcesd-hero-overlay) 58%, transparent) 0%, transparent 42%);
	}
}

.rcesd-hero__content {
	position: absolute;
	z-index: 2;
	right: 7%;
	bottom: 15%;
	width: min(620px, 58%);
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	text-align: right;
	gap: 10px;
}

.rcesd-hero__badge {
	display: inline-flex;
	align-items: center;
	align-self: flex-start;
	background: #1f9d4a;
	color: #fff;
	border-radius: 999px;
	padding: 7px 14px;
	font-size: 13px;
	font-weight: 700;
	line-height: 1.4;
}

.rcesd-hero__title {
	margin: 0;
	color: #fff;
	font-size: 34px;
	font-weight: 800;
	line-height: 1.35;
}

.rcesd-hero__subtitle {
	margin: 0;
	color: rgba(255, 255, 255, 0.92);
	font-size: 18px;
	font-weight: 500;
	line-height: 1.7;
}

.rcesd-hero__btn {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	margin-top: 16px;
	align-self: flex-start;
	background: #fff;
	color: #163024;
	text-decoration: none;
	border-radius: 999px;
	padding: 12px 18px 12px 14px;
	font-size: 15px;
	font-weight: 700;
	line-height: 1;
	box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.rcesd-hero__btn svg {
	display: block;
}

.rcesd-hero__prev {
	position: absolute;
	z-index: 3;
	top: 50%;
	left: 22px;
	transform: translateY(-50%);
	width: 48px;
	height: 48px;
	border: 0;
	border-radius: 50%;
	background: #fff;
	color: #1c1c1c;
	display: grid;
	place-items: center;
	cursor: pointer;
	box-shadow: 0 8px 22px rgba(0, 0, 0, 0.16);
}

.rcesd-hero__prev:hover {
	background: #f4f7f5;
}

.rcesd-hero__dots {
	position: absolute;
	z-index: 3;
	left: 50%;
	bottom: 18px;
	transform: translateX(-50%);
	display: flex;
	direction: ltr;
	align-items: center;
	gap: 7px;
}

.rcesd-hero__dot {
	width: 7px;
	height: 7px;
	padding: 0;
	border: 0;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.55);
	cursor: pointer;
}

.rcesd-hero__dot.is-active {
	width: 26px;
	background: #fff;
}

@media (max-width: 767px) {
	.rcesd-hero__content {
		right: 20px;
		left: 64px;
		bottom: 56px;
		width: auto;
	}

	.rcesd-hero__title {
		font-size: 28px;
	}

	.rcesd-hero__subtitle {
		font-size: 15px;
	}

	.rcesd-hero__prev {
		left: 12px;
		width: 42px;
		height: 42px;
	}
}
