/* ==========================================================================
   بنر متحرک — homepage hero banner carousel
   On-brand: navy #102a71 / navy-dark #001840 / gold #f5c400 / cream #fffdf0
   4:3 box, cross-slide with a draggable track.
   ========================================================================== */

.sb-root {
	position: relative;
	width: 100%;
	aspect-ratio: 4 / 3;
	border-radius: 22px;
	overflow: hidden;
	background:
		radial-gradient(120% 90% at 85% 0%, rgba(245, 196, 0, .18), transparent 62%),
		linear-gradient(160deg, #001840 0%, #102a71 100%);
	border: 1px solid rgba(255, 220, 95, .38);
	box-shadow:
		0 28px 60px -30px rgba(0, 8, 24, .78),
		0 0 0 1px rgba(255, 255, 255, .04) inset,
		0 0 40px -10px rgba(245, 196, 0, .18);
	isolation: isolate;
}

/* ---- viewport + track ---- */
.sb-viewport {
	position: absolute;
	inset: 0;
	overflow: hidden;
	touch-action: pan-y;
	cursor: grab;
}
.sb-root.is-dragging .sb-viewport { cursor: grabbing; }

.sb-track {
	display: flex;
	height: 100%;
	direction: ltr; /* physical translate math stays predictable in an RTL page */
	will-change: transform;
	transition: transform .68s cubic-bezier(.32, .72, 0, 1);
}
.sb-root.is-dragging .sb-track { transition: none; }

.sb-slide {
	position: relative;
	flex: 0 0 100%;
	width: 100%;
	height: 100%;
	overflow: hidden;
}

.sb-img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
	user-select: none;
	-webkit-user-drag: none;
	pointer-events: none;
	transform: scale(1.02);
	transition: transform 6s cubic-bezier(.22, .61, .36, 1);
}
.sb-slide.is-active .sb-img { transform: scale(1.08); }

.sb-link { display: block; width: 100%; height: 100%; }

/* soft bottom scrim so captions/dots stay legible */
.sb-slide::after {
	content: "";
	position: absolute;
	inset-inline: 0;
	bottom: 0;
	height: 46%;
	background: linear-gradient(to top, rgba(0, 12, 32, .72), rgba(0, 12, 32, .22) 45%, transparent);
	pointer-events: none;
}

.sb-cap {
	position: absolute;
	inset-inline: 18px;
	bottom: 44px;
	z-index: 2;
	direction: rtl;
	text-align: right;
	color: #fff;
	font-size: .92rem;
	font-weight: 700;
	line-height: 1.7;
	text-shadow: 0 2px 10px rgba(0, 0, 0, .55);
	pointer-events: none;
}

/* ---- arrows ---- */
.sb-nav {
	position: absolute;
	top: 50%;
	z-index: 4;
	width: 42px;
	height: 42px;
	transform: translateY(-50%);
	display: grid;
	place-items: center;
	border-radius: 50%;
	border: 1px solid rgba(255, 255, 255, .28);
	background: rgba(0, 20, 48, .42);
	-webkit-backdrop-filter: blur(8px);
	backdrop-filter: blur(8px);
	color: #fff;
	cursor: pointer;
	padding: 0;
	opacity: 0;
	transition: opacity .3s ease, background .25s ease, transform .25s ease, border-color .25s ease;
}
/* swapped: prev on the left, next on the right (standard carousel layout) */
.sb-prev { inset-inline-end: 14px; }
.sb-next { inset-inline-start: 14px; }

/* RTL: the chevron paths point the natural way once flipped by the page dir */
.sb-root:not(.is-rtl-off) .sb-prev svg { transform: scaleX(-1); }
.sb-root:not(.is-rtl-off) .sb-next svg { transform: scaleX(-1); }

.sb-root:hover .sb-nav,
.sb-root:focus-within .sb-nav { opacity: 1; }
.sb-nav:hover {
	background: #f5c400;
	border-color: #f5c400;
	color: #3b2f00;
	transform: translateY(-50%) scale(1.06);
}
.sb-nav:focus-visible {
	outline: 2px solid #f5c400;
	outline-offset: 2px;
	opacity: 1;
}

/* ---- dots ---- */
.sb-dots {
	position: absolute;
	inset-inline: 0;
	bottom: 16px;
	z-index: 4;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 7px;
	pointer-events: none;
}
.sb-dot {
	pointer-events: auto;
	width: 8px;
	height: 8px;
	padding: 0;
	border: 0;
	border-radius: 999px;
	background: rgba(255, 255, 255, .5);
	cursor: pointer;
	transition: width .35s cubic-bezier(.32, .72, 0, 1), background .3s ease;
}
.sb-dot:hover { background: rgba(255, 255, 255, .85); }
.sb-dot.is-active {
	width: 22px;
	background: #f5c400;
	box-shadow: 0 0 10px rgba(245, 196, 0, .8);
}
.sb-dot:focus-visible {
	outline: 2px solid #f5c400;
	outline-offset: 3px;
}

/* ---- arrows are desktop-only: on mobile the user drags ---- */
@media (max-width: 900px) {
	.sb-nav { display: none !important; }
}

/* ---- touch devices: keep the arrows visible ---- */
@media (hover: none) and (min-width: 901px) {
	.sb-nav { opacity: .92; }
}

/* ---- small screens ---- */
@media (max-width: 600px) {
	.sb-root { border-radius: 18px; }
	.sb-nav { width: 34px; height: 34px; opacity: .95; }
	.sb-prev { inset-inline-start: 9px; }
	.sb-next { inset-inline-end: 9px; }
	.sb-cap { inset-inline: 13px; bottom: 36px; font-size: .8rem; }
	.sb-dots { bottom: 12px; gap: 6px; }
	.sb-dot { width: 7px; height: 7px; }
	.sb-dot.is-active { width: 18px; }
}

/* ---- reduced motion ---- */
@media (prefers-reduced-motion: reduce) {
	.sb-track, .sb-img { transition: none !important; }
	.sb-slide.is-active .sb-img { transform: none; }
}
