/* =========================================================================
   Home hero slider (replaces Revolution Slider)
   Markup: modules/main-parts/slider.tpl   Behaviour: js/hero.js
   Brand: red #fb4848, dark #29292B
   ========================================================================= */
.rp-hero {
	--hero-h: clamp(560px, calc(100svh - 163px), 820px);
	--ease-out: cubic-bezier(.22, 1, .36, 1);
	position: relative;
	height: var(--hero-h);
	overflow: hidden;
	background: #161618;
	color: #fff;
	direction: rtl;
	isolation: isolate;
	font-family: 'IranSans', sans-serif;
}
.rp-hero button { font-family: inherit; }
.rp-hero-cat, .rp-hero-tab-label, .rp-hero-count { font-family: 'IranSansMedium', 'IranSans', sans-serif; }

/* ---- slides + media */
.rp-hero-slides { position: absolute; inset: 0; }
.rp-hero-slide {
	position: absolute;
	inset: 0;
	opacity: 0;
	visibility: hidden;
	transition: opacity 1.1s ease, visibility 0s linear 1.1s;
}
.rp-hero-slide.is-active { opacity: 1; visibility: visible; transition: opacity 1.1s ease, visibility 0s; z-index: 1; }
.rp-hero-media { position: absolute; inset: 0; overflow: hidden; }
.rp-hero-media picture, .rp-hero-media img, .rp-hero-video {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}
/* slow camera push-in on the active slide */
.rp-hero-media img { transform: scale(1.08); transition: transform 9s linear; }
.rp-hero-slide.is-active .rp-hero-media img { transform: scale(1); }
.rp-hero-video { opacity: 0; transition: opacity .6s ease; }
.rp-hero-video.is-playing { opacity: 1; }
/* readable text on any photo: dark from the text side (right) and the bottom bar */
.rp-hero-media::after {
	content: "";
	position: absolute;
	inset: 0;
	background:
		linear-gradient(270deg, rgba(14, 14, 16, 0.88) 0%, rgba(14, 14, 16, 0.62) 34%, rgba(14, 14, 16, 0.18) 66%, rgba(14, 14, 16, 0) 100%),
		linear-gradient(0deg, rgba(14, 14, 16, 0.85) 0%, rgba(14, 14, 16, 0) 32%);
	pointer-events: none;
}

/* ---- text */
.rp-hero-content { position: relative; z-index: 2; height: 100%; display: flex; align-items: center; padding-bottom: 96px; }
.rp-hero-content::before, .rp-hero-content::after { display: none; }
.rp-hero-text { max-width: 620px; }
/* slides whose subject is on the right: text sits on the left, shade follows it */
.rp-hero-slide--left .rp-hero-content { justify-content: flex-end; }
.rp-hero-slide--left .rp-hero-media::after {
	background:
		linear-gradient(90deg, rgba(14, 14, 16, 0.88) 0%, rgba(14, 14, 16, 0.62) 34%, rgba(14, 14, 16, 0.18) 66%, rgba(14, 14, 16, 0) 100%),
		linear-gradient(0deg, rgba(14, 14, 16, 0.85) 0%, rgba(14, 14, 16, 0) 32%);
}
.rp-hero-cat {
	display: inline-flex;
	align-items: center;
	gap: 9px;
	padding: 7px 14px 7px 16px;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.08);
	border: 1px solid rgba(255, 255, 255, 0.12);
	-webkit-backdrop-filter: blur(8px);
	backdrop-filter: blur(8px);
	font-size: 13px;
	color: #fff;
}
.rp-hero-cat i { width: 7px; height: 7px; border-radius: 50%; background: #fb4848; box-shadow: 0 0 0 4px rgba(251, 72, 72, 0.25); }
.rp-hero-title {
	margin: 18px 0 14px;
	font-family: 'IranSansBlack', 'IranSans', sans-serif;
	font-weight: normal;
	font-size: clamp(30px, 3.6vw, 52px);
	line-height: 1.32;
	color: #fff;
	text-wrap: balance;
}
.rp-hero-desc { margin: 0; max-width: 520px; font-size: 16px; line-height: 2; color: rgba(255, 255, 255, 0.78); text-wrap: pretty; }
.rp-hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.rp-hero-btn {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	height: 52px;
	padding: 0 24px;
	border-radius: 14px;
	font-family: 'IranSansMedium', 'IranSans', sans-serif;
	font-size: 15px;
	text-decoration: none !important;
	transition: background-color .25s, border-color .25s, color .25s, transform .25s;
}
.rp-hero-btn--primary { background: #fb4848; color: #fff !important; box-shadow: 0 14px 30px -14px rgba(251, 72, 72, 0.9); }
.rp-hero-btn--primary:hover { background: #e53d3d; transform: translateY(-2px); }
.rp-hero-btn--primary i { transition: transform .3s; }
.rp-hero-btn--primary:hover i { transform: translateX(-4px); }
.rp-hero-btn--ghost { color: #fff !important; border: 1px solid rgba(255, 255, 255, 0.28); background: rgba(255, 255, 255, 0.04); }
.rp-hero-btn--ghost:hover { border-color: #fff; background: rgba(255, 255, 255, 0.1); }
.rp-hero-btn:focus-visible, .rp-hero-tab:focus-visible, .rp-hero-arrow:focus-visible { outline: 2px solid #fb4848; outline-offset: 3px; }

/* text entrance: each line rises in after the image changes */
.rp-hero-text > * { opacity: 0; transform: translateY(26px); transition: opacity .7s ease, transform .9s var(--ease-out); }
.rp-hero-slide.is-active .rp-hero-text > * { opacity: 1; transform: none; }
.rp-hero-slide.is-active .rp-hero-text > :nth-child(1) { transition-delay: .25s; }
.rp-hero-slide.is-active .rp-hero-text > :nth-child(2) { transition-delay: .38s; }
.rp-hero-slide.is-active .rp-hero-text > :nth-child(3) { transition-delay: .5s; }
.rp-hero-slide.is-active .rp-hero-text > :nth-child(4) { transition-delay: .62s; }

/* ---- bottom bar: tabs with progress + controls */
.rp-hero-bar { position: absolute; z-index: 4; right: 0; bottom: 0; left: 0; padding-bottom: 26px; }
.rp-hero-bar-inner { display: flex; align-items: flex-end; gap: 28px; }
.rp-hero-bar-inner::before, .rp-hero-bar-inner::after { display: none; }
.rp-hero-tabs { flex: 1 1 auto; display: flex; gap: 6px; margin: 0; padding: 0; list-style: none; min-width: 0; }
.rp-hero-tabs li { flex: 1 1 0; min-width: 0; margin: 0; }
.rp-hero-tab {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 6px;
	width: 100%;
	padding: 10px 0 0;
	border: 0;
	background: none;
	color: rgba(255, 255, 255, 0.55);
	text-align: right;
	cursor: pointer;
	transition: color .3s;
}
.rp-hero-tab:hover, .rp-hero-tab.is-active { color: #fff; }
.rp-hero-tab-num { font-size: 11px; opacity: .8; }
.rp-hero-tab-label { flex: 1 1 0; min-width: 0; font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rp-hero-tab-line { order: -1; flex: 0 0 100%; height: 3px; margin-bottom: 8px; border-radius: 3px; background: rgba(255, 255, 255, 0.2); overflow: hidden; }
.rp-hero-tab-line b { display: block; height: 100%; width: 100%; background: #fb4848; transform: scaleX(0); transform-origin: right; }
.rp-hero-tab.is-done .rp-hero-tab-line b { transform: scaleX(1); background: rgba(255, 255, 255, 0.55); }
.rp-hero-tab.is-active .rp-hero-tab-line b { animation: rp-hero-progress var(--dur, 7000ms) linear forwards; }
.rp-hero.is-paused .rp-hero-tab.is-active .rp-hero-tab-line b { animation-play-state: paused; }
@keyframes rp-hero-progress { from { transform: scaleX(0); } to { transform: scaleX(1); } }

.rp-hero-ctrl { flex: 0 0 auto; display: flex; align-items: center; gap: 8px; }
.rp-hero-count { margin-left: 8px; font-size: 13px; color: rgba(255, 255, 255, 0.6); white-space: nowrap; }
.rp-hero-count b { font-family: 'IranSansBold', sans-serif; font-weight: normal; font-size: 18px; color: #fff; }
.rp-hero-arrow {
	display: grid;
	place-items: center;
	width: 44px;
	height: 44px;
	border: 1px solid rgba(255, 255, 255, 0.2);
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.06);
	-webkit-backdrop-filter: blur(8px);
	backdrop-filter: blur(8px);
	color: #fff;
	font-size: 20px;
	transition: background-color .25s, border-color .25s;
}
.rp-hero-arrow:hover { background: #fb4848; border-color: #fb4848; }
.rp-hero-pause { font-size: 13px; }

/* ---- laptop / tablet */
@media (max-width: 1199px) {
	.rp-hero-tab-label { display: none; }
}
@media (max-width: 991px) {
	.rp-hero { --hero-h: clamp(520px, calc(100svh - 150px), 720px); }
	.rp-hero-text { max-width: 560px; }
	.rp-hero-desc { font-size: 15px; }
}

/* ---- phones: portrait crops, text at the bottom, compact bar */
@media (max-width: 767px) {
	.rp-hero { --hero-h: clamp(540px, calc(100svh - 133px), 760px); }
	.rp-hero-media::after {
		background: linear-gradient(0deg, rgba(14, 14, 16, 0.94) 0%, rgba(14, 14, 16, 0.72) 42%, rgba(14, 14, 16, 0.08) 72%, rgba(14, 14, 16, 0.25) 100%);
	}
	.rp-hero-content { align-items: flex-end; padding-bottom: 92px; }
	.rp-hero-slide--left .rp-hero-content { justify-content: flex-start; }
	.rp-hero-slide--left .rp-hero-media::after { background: linear-gradient(0deg, rgba(14, 14, 16, 0.94) 0%, rgba(14, 14, 16, 0.72) 42%, rgba(14, 14, 16, 0.08) 72%, rgba(14, 14, 16, 0.25) 100%); }
	.rp-hero-title { margin: 14px 0 10px; font-size: 27px; line-height: 1.45; }
	.rp-hero-desc { font-size: 14px; line-height: 1.9; }
	.rp-hero-actions { margin-top: 20px; gap: 10px; }
	.rp-hero-btn { height: 48px; padding: 0 18px; font-size: 14px; }
	.rp-hero-btn--primary { flex: 1 1 auto; justify-content: center; }
	.rp-hero-bar { padding-bottom: 18px; }
	.rp-hero-bar-inner { gap: 14px; align-items: center; }
	.rp-hero-tabs { gap: 4px; }
	.rp-hero-tab { padding: 14px 0; }             /* bigger touch target around the thin line */
	.rp-hero-tab-num { display: none; }
	.rp-hero-tab-line { margin: 0; }
	.rp-hero-count, .rp-hero-prev, .rp-hero-next { display: none; }
	.rp-hero-arrow { width: 38px; height: 38px; }
}

/* ---- reduced motion: no camera move, no text travel, no autoplay (js) */
@media (prefers-reduced-motion: reduce) {
	.rp-hero-media img, .rp-hero-text > *, .rp-hero-slide { transition: none !important; transform: none !important; }
	.rp-hero-tab.is-active .rp-hero-tab-line b { animation: none; transform: scaleX(1); }
}

/* slide 1 (exhibition booth): black & white, like the rest of the hero */
.rp-hero-media--mono img, .rp-hero-media--mono .rp-hero-video { filter: grayscale(1) contrast(1.05); }
