/* ==========================================================================
   Athar Hero Slider — CSS
   Colors: #15445a primary · #07a869 CTA · #0da9a6 · #3d7eb9 · #c1b489 · #c2c1c1
   ========================================================================== */

.ahs {
	--ahs-ov: #15445a;
	--ahs-ac: #07a869;
	--ahs-tl: #0da9a6;
	--ahs-gd: #c1b489;
	--ahs-h: 88vh;
	--ahs-hm: 82vh;
	position: relative;
	width: 100%;
	height: var(--ahs-h);
	min-height: 560px;
	max-height: 980px;
	overflow: hidden;
	background: #15445a;
	isolation: isolate;
	direction: rtl;
}

.ahs *,
.ahs *::before,
.ahs *::after { box-sizing: border-box; }

.ahs-viewport {
	position: absolute;
	inset: 0;
	overflow: hidden;
}

/* ------------------------------- SLIDE ---------------------------------- */
.ahs-slide {
	position: absolute;
	inset: 0;
	opacity: 0;
	visibility: hidden;
	transition: opacity 1.1s cubic-bezier(.22, .61, .36, 1),
	            visibility 1.1s cubic-bezier(.22, .61, .36, 1);
	will-change: opacity;
	z-index: 1;
}

.ahs-slide.is-active {
	opacity: 1;
	visibility: visible;
	z-index: 2;
}

/* ------------------------------ MEDIA ----------------------------------- */
.ahs-media {
	position: absolute;
	inset: 0;
	overflow: hidden;
	transform: translateZ(0);
}

.ahs-media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center 35%;
	display: block;
	transform: scale(1.03);
	filter: saturate(.92) contrast(1.03);
	transition: transform 8s linear;
	will-change: transform;
}

/* Ken Burns — only the active slide */
.ahs-slide.is-active .ahs-media img {
	transform: scale(1.14) translate3d(-1.2%, -0.8%, 0);
}

/* ----------------------------- OVERLAY ---------------------------------- */
.ahs-overlay {
	position: absolute;
	inset: 0;
	z-index: 2;
	background:
		linear-gradient(to left,
			color-mix(in srgb, var(--ahs-ov) 93%, transparent) 0%,
			color-mix(in srgb, var(--ahs-ov) 78%, transparent) 34%,
			color-mix(in srgb, var(--ahs-ov) 34%, transparent) 62%,
			color-mix(in srgb, var(--ahs-ov) 12%, transparent) 100%),
		linear-gradient(to top,
			color-mix(in srgb, var(--ahs-ov) 72%, transparent) 0%,
			transparent 55%);
	pointer-events: none;
}

/* Fallback for browsers without color-mix */
@supports not (background: color-mix(in srgb, red 50%, blue)) {
	.ahs-overlay {
		background:
			linear-gradient(to left, rgba(21, 68, 90, .94) 0%, rgba(21, 68, 90, .78) 34%, rgba(21, 68, 90, .34) 62%, rgba(21, 68, 90, .12) 100%),
			linear-gradient(to top, rgba(21, 68, 90, .72) 0%, transparent 55%);
	}
}

/* ------------------------------ BODY ------------------------------------ */
.ahs-body {
	position: absolute;
	inset: 0;
	z-index: 3;
	display: flex;
	align-items: center;
	justify-content: flex-start;
	padding: 0 clamp(24px, 5vw, 96px);
}

.ahs-inner {
	max-width: 620px;
	display: flex;
	flex-direction: column;
	gap: 20px;
}

/* ---------------------------- EYEBROW ----------------------------------- */
.ahs-eyebrow {
	display: inline-flex;
	align-items: center;
	align-self: flex-start;
	gap: 8px;
	padding: 8px 16px;
	border-radius: 999px;
	font-size: 13px;
	font-weight: 700;
	line-height: 1.5;
	letter-spacing: 0;
	color: #ffffff;
	background: rgba(255, 255, 255, .10);
	border: 1px solid rgba(255, 255, 255, .22);
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
}

.ahs-eyebrow::before {
	content: "";
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: var(--ahs-ac);
	box-shadow: 0 0 0 4px color-mix(in srgb, var(--ahs-ac) 26%, transparent);
	flex: 0 0 auto;
	animation: ahs-pulse 2.6s ease-in-out infinite;
}

@keyframes ahs-pulse {
	0%, 100% { box-shadow: 0 0 0 4px color-mix(in srgb, var(--ahs-ac) 26%, transparent); }
	50%      { box-shadow: 0 0 0 9px color-mix(in srgb, var(--ahs-ac) 6%, transparent); }
}

/* ----------------------------- TITLE ------------------------------------ */
.ahs-title {
	margin: 0;
	font-size: clamp(30px, 4.4vw, 62px);
	font-weight: 800;
	line-height: 1.18;
	letter-spacing: 0;
	color: #ffffff;
	text-wrap: balance;
	text-shadow: 0 2px 30px rgba(0, 0, 0, .22);
}

.ahs-title::after {
	content: "";
	display: block;
	width: 84px;
	height: 4px;
	margin-top: 18px;
	border-radius: 4px;
	background: linear-gradient(to left, var(--ahs-ac), var(--ahs-tl));
}

/* ------------------------------ TEXT ------------------------------------ */
.ahs-text {
	margin: 0;
	font-size: clamp(15px, 1.15vw, 18px);
	line-height: 1.85;
	color: rgba(255, 255, 255, .88);
	max-width: 56ch;
}

/* ---------------------------- ACTIONS ----------------------------------- */
.ahs-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 14px;
	margin-top: 8px;
}

.ahs-btn {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	padding: 15px 30px;
	border-radius: 12px;
	font-size: 15.5px;
	font-weight: 700;
	line-height: 1;
	text-decoration: none;
	overflow: hidden;
	transition: transform .38s cubic-bezier(.22, .61, .36, 1),
	            box-shadow .38s cubic-bezier(.22, .61, .36, 1),
	            background-color .3s ease,
	            border-color .3s ease;
	-webkit-tap-highlight-color: transparent;
}

.ahs-btn--primary {
	color: #ffffff;
	background: linear-gradient(135deg, var(--ahs-ac) 0%, var(--ahs-tl) 100%);
	box-shadow: 0 10px 28px color-mix(in srgb, var(--ahs-ac) 34%, transparent);
}

/* shimmer sweep */
.ahs-btn--primary::before {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(115deg, transparent 32%, rgba(255, 255, 255, .38) 50%, transparent 68%);
	transform: translateX(-130%);
	transition: transform .75s cubic-bezier(.22, .61, .36, 1);
}

.ahs-btn--primary:hover::before { transform: translateX(130%); }

.ahs-btn--primary:hover,
.ahs-btn--primary:focus-visible {
	transform: translateY(-3px);
	box-shadow: 0 16px 38px color-mix(in srgb, var(--ahs-ac) 46%, transparent);
}

.ahs-btn--ghost {
	color: #ffffff;
	background: rgba(255, 255, 255, .07);
	border: 1.5px solid rgba(255, 255, 255, .38);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
}

.ahs-btn--ghost:hover,
.ahs-btn--ghost:focus-visible {
	transform: translateY(-3px);
	background: rgba(255, 255, 255, .15);
	border-color: rgba(255, 255, 255, .72);
}

.ahs-btn:active { transform: translateY(-1px) scale(.985); }

.ahs-btn:focus-visible {
	outline: 3px solid #ffffff;
	outline-offset: 3px;
}

.ahs-arrow {
	display: inline-block;
	font-size: 17px;
	line-height: 1;
	transition: transform .38s cubic-bezier(.22, .61, .36, 1);
}

.ahs-btn--primary:hover .ahs-arrow { transform: translateX(-5px); }

/* --------------------------- MINISTRY LOGO ------------------------------ */
.ahs-ministry {
	position: absolute;
	bottom: clamp(90px, 12vh, 132px);
	inset-inline-end: clamp(24px, 5vw, 96px);
	opacity: .95;
}

.ahs-ministry img {
	height: clamp(44px, 5.4vw, 68px);
	width: auto;
	display: block;
	filter: brightness(0) invert(1);
	opacity: .9;
}

/* ------------------------- ENTRANCE ANIMATION --------------------------- */
.ahs-slide [data-anim] {
	opacity: 0;
	transform: translateY(34px);
}

.ahs-slide [data-anim="1"] { transform: translateY(22px); }
.ahs-slide [data-anim="4"] { transform: translateY(24px); }
.ahs-slide [data-anim="5"] { transform: translateY(0) translateX(28px); }

.ahs-slide.is-active [data-anim] {
	animation: ahs-in .95s cubic-bezier(.22, .61, .36, 1) forwards;
}

.ahs-slide.is-active [data-anim="1"] { animation-delay: .18s; }
.ahs-slide.is-active [data-anim="2"] { animation-delay: .34s; }
.ahs-slide.is-active [data-anim="3"] { animation-delay: .50s; }
.ahs-slide.is-active [data-anim="4"] { animation-delay: .68s; }
.ahs-slide.is-active [data-anim="5"] { animation-delay: .86s; }

@keyframes ahs-in {
	to { opacity: 1; transform: translateY(0) translateX(0); }
}

/* ------------------------------ ARROWS ---------------------------------- */
.ahs-nav {
	position: absolute;
	top: 50%;
	z-index: 6;
	width: 54px;
	height: 54px;
	margin-top: -27px;
	display: grid;
	place-items: center;
	padding: 0;
	border: 1.5px solid rgba(255, 255, 255, .30);
	border-radius: 50%;
	background: rgba(255, 255, 255, .08);
	color: #ffffff;
	font-size: 26px;
	line-height: 1;
	cursor: pointer;
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
	transition: background-color .32s ease, border-color .32s ease,
	            transform .32s cubic-bezier(.22, .61, .36, 1), opacity .32s ease;
	-webkit-tap-highlight-color: transparent;
}

.ahs-prev { inset-inline-end: clamp(14px, 2.2vw, 34px); }
.ahs-next { inset-inline-start: clamp(14px, 2.2vw, 34px); }

.ahs-nav:hover,
.ahs-nav:focus-visible {
	background: var(--ahs-ac);
	border-color: var(--ahs-ac);
	transform: scale(1.09);
	opacity: 1;
}

.ahs-nav:focus-visible { outline: 3px solid #ffffff; outline-offset: 3px; }
.ahs-nav:active { transform: scale(.96); }

.ahs-nav span {
	display: block;
	transition: transform .3s ease;
	margin-top: -3px;
}

.ahs-prev:hover span { transform: translateX(-2px); }
.ahs-next:hover span { transform: translateX(2px); }

/* ------------------------------- DOTS ----------------------------------- */
.ahs-dots {
	position: absolute;
	bottom: clamp(30px, 4.6vh, 52px);
	inset-inline-start: 50%;
	transform: translateX(50%);
	z-index: 6;
	display: flex;
	align-items: center;
	gap: 10px;
}

.ahs-dot {
	width: 10px;
	height: 10px;
	padding: 0;
	border: 0;
	border-radius: 999px;
	background: rgba(255, 255, 255, .40);
	cursor: pointer;
	transition: width .42s cubic-bezier(.22, .61, .36, 1),
	            background-color .42s ease;
	-webkit-tap-highlight-color: transparent;
}

.ahs-dot:hover { background: rgba(255, 255, 255, .72); }

.ahs-dot.is-active {
	width: 34px;
	background: var(--ahs-ac);
}

.ahs-dot:focus-visible { outline: 2px solid #ffffff; outline-offset: 3px; }

/* ----------------------------- PROGRESS --------------------------------- */
.ahs-progress {
	position: absolute;
	bottom: 0;
	inset-inline: 0;
	height: 3px;
	z-index: 6;
	background: rgba(255, 255, 255, .14);
}

.ahs-bar {
	display: block;
	height: 100%;
	width: 0;
	background: linear-gradient(to left, var(--ahs-ac), var(--ahs-tl));
	box-shadow: 0 0 14px color-mix(in srgb, var(--ahs-ac) 62%, transparent);
}

/* ------------------------------ STATS ----------------------------------- */
.ahs-stats {
	position: relative;
	z-index: 7;
	background: #ffffff;
	margin-top: -1px;
}

.ahs-stats-inner {
	max-width: 1240px;
	margin: 0 auto;
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 0;
}

.ahs-stat {
	position: relative;
	padding: 30px 22px;
	text-align: center;
}

.ahs-stat + .ahs-stat::before {
	content: "";
	position: absolute;
	inset-inline-start: 0;
	top: 26%;
	height: 48%;
	width: 1px;
	background: rgba(21, 68, 90, .12);
}

.ahs-stat-num {
	font-size: clamp(28px, 3vw, 40px);
	font-weight: 800;
	line-height: 1.1;
	color: #15445a;
	font-variant-numeric: tabular-nums;
	letter-spacing: 0;
}

.ahs-suffix { color: var(--ahs-ac); }

.ahs-stat-label {
	margin-top: 7px;
	font-size: 14px;
	font-weight: 600;
	color: #5b6b74;
}

/* stagger reveal for the stats block */
.ahs-stat {
	opacity: 0;
	transform: translateY(20px);
	transition: opacity .7s ease, transform .7s cubic-bezier(.22, .61, .36, 1);
}

.ahs-stats.is-in .ahs-stat { opacity: 1; transform: translateY(0); }
.ahs-stats.is-in .ahs-stat:nth-child(1) { transition-delay: .05s; }
.ahs-stats.is-in .ahs-stat:nth-child(2) { transition-delay: .16s; }
.ahs-stats.is-in .ahs-stat:nth-child(3) { transition-delay: .27s; }
.ahs-stats.is-in .ahs-stat:nth-child(4) { transition-delay: .38s; }

/* ============================== TABLET ================================== */
@media (max-width: 1024px) {
	.ahs { min-height: 520px; }
	.ahs-inner { max-width: 88%; }
	.ahs-nav { width: 46px; height: 46px; margin-top: -23px; font-size: 22px; }
	.ahs-ministry { bottom: clamp(76px, 11vh, 110px); }
}

/* ============================== MOBILE ================================== */
@media (max-width: 767px) {
	.ahs {
		height: var(--ahs-hm);
		min-height: 470px;
		max-height: 720px;
	}

	.ahs-media img {
		object-position: center 30%;
	}

	/* stronger overlay for legibility */
	.ahs-overlay {
		background:
			linear-gradient(to top,
				rgba(21, 68, 90, .96) 0%,
				rgba(21, 68, 90, .82) 42%,
				rgba(21, 68, 90, .42) 72%,
				rgba(21, 68, 90, .24) 100%);
	}

	.ahs-body {
		align-items: flex-end;
		padding: 0 20px 96px;
	}

	.ahs-inner {
		max-width: 100%;
		gap: 14px;
	}

	.ahs-eyebrow {
		font-size: 11.5px;
		padding: 7px 13px;
		line-height: 1.45;
	}

	.ahs-title {
		font-size: clamp(25px, 7.4vw, 34px);
		line-height: 1.28;
		letter-spacing: 0;
	}

	.ahs-title::after {
		width: 62px;
		height: 3px;
		margin-top: 13px;
	}

	.ahs-text {
		font-size: 14.5px;
		line-height: 1.75;
		display: -webkit-box;
		-webkit-line-clamp: 4;
		-webkit-box-orient: vertical;
		overflow: hidden;
	}

	.ahs-actions {
		gap: 10px;
		margin-top: 4px;
		width: 100%;
	}

	.ahs-btn {
		flex: 1 1 auto;
		min-width: 138px;
		padding: 14px 18px;
		font-size: 14px;
	}

	/* hide side arrows on touch — swipe + dots are the navigation */
	.ahs-nav { display: none; }

	.ahs-dots {
		bottom: 62px;
		gap: 8px;
	}

	.ahs-dot { width: 8px; height: 8px; }
	.ahs-dot.is-active { width: 26px; }

	.ahs-ministry {
		position: static;
		margin-top: 4px;
		opacity: .85;
	}

	.ahs-ministry img {
		height: 34px;
	}

	/* stats: 2 columns */
	.ahs-stats-inner { grid-template-columns: repeat(2, 1fr); }

	.ahs-stat { padding: 22px 12px; }

	.ahs-stat + .ahs-stat::before { display: none; }

	.ahs-stat:nth-child(n+3) {
		border-top: 1px solid rgba(21, 68, 90, .10);
	}

	.ahs-stat:nth-child(even)::after {
		content: "";
		position: absolute;
		inset-inline-start: 0;
		top: 22%;
		height: 56%;
		width: 1px;
		background: rgba(21, 68, 90, .10);
	}

	.ahs-stat-num { font-size: 26px; }
	.ahs-stat-label { font-size: 12.5px; margin-top: 5px; }
}

@media (max-width: 380px) {
	.ahs-title { font-size: 23px; }
	.ahs-text { font-size: 13.5px; -webkit-line-clamp: 3; }
	.ahs-btn { min-width: 118px; padding: 12px 14px; font-size: 13px; }
}

/* ---------- تحسينات الموبايل (مساحة تنفّس + أسهم + عدم القص) ---------- */
@media (max-width: 767px) {
	.ahs-title {
		line-height: 1.42 !important;
		padding-top: 6px;
		padding-bottom: 2px;
		overflow: visible !important;
	}

	.ahs-inner { gap: 16px !important; }

	.ahs-body { padding: 0 18px 104px !important; }

	.ahs-text {
		font-size: 14.5px !important;
		line-height: 1.9 !important;
	}

	/* الأسهم تظهر على الموبايل — أسفل الهيرو بعيدًا عن النص */
	.ahs-nav {
		display: grid !important;
		width: 40px !important;
		height: 40px !important;
		top: auto !important;
		bottom: 22px !important;
		margin-top: 0 !important;
		font-size: 20px !important;
		opacity: .96 !important;
		background: rgba(21, 68, 90, .66) !important;
		border: 1px solid rgba(255, 255, 255, .42) !important;
		backdrop-filter: blur(6px);
		-webkit-backdrop-filter: blur(6px);
	}

	.ahs-prev { inset-inline-end: 14px !important; }
	.ahs-next { inset-inline-start: 14px !important; }

	.ahs-nav:hover,
	.ahs-nav:focus-visible { transform: none !important; }

	.ahs-dots { bottom: 36px !important; }
}

/* ======================= REDUCED MOTION ================================= */
@media (prefers-reduced-motion: reduce) {
	.ahs-slide,
	.ahs-media img,
	.ahs-btn,
	.ahs-nav,
	.ahs-dot,
	.ahs-stat,
	.ahs-arrow,
	.ahs-eyebrow::before {
		transition: none !important;
		animation: none !important;
	}

	.ahs-slide { transition: opacity .001ms linear; }

	.ahs-slide.is-active .ahs-media img {
		transform: scale(1.03) !important;
	}

	.ahs-slide [data-anim] {
		opacity: 1 !important;
		transform: none !important;
	}

	.ahs-stat { opacity: 1 !important; transform: none !important; }
}

/* ------------------------- Elementor editor fix ------------------------- */
.elementor-editor-active .ahs-slide [data-anim],
.elementor-editor-preview .ahs-slide.is-active [data-anim] {
	opacity: 1;
	transform: none;
	animation: none;
}


/* ==================== ARABIC SPACING GUARD ==================== */
.ahs, .ahs * {
letter-spacing: 0 !important;
word-spacing: normal !important;
font-feature-settings: normal !important;
}
.ahs-title, .ahs-text, .ahs-eyebrow, .ahs-btn, .ahs-stat-num, .ahs-stat-label {
font-family: "Cairo", "Tajawal", system-ui, -apple-system, "Segoe UI", sans-serif !important;
}
