/* ----------------------------------------------------------------
	Aluswa homepage - hero, institutions slider, Charity / Mart / Volunteer
	Scoped to body.home-modern. Loaded after home-modern.css.
	To use a real photo, change --hx-hero-img to e.g. url("../img/your-photo.jpg").
-----------------------------------------------------------------*/

body.home-modern {
	--hx-green: #0f6b4f;
	--hx-green-dark: #0a4d39;
	--hx-green-soft: #e7f3ec;
	--hx-ink: #12352a;
	--hx-gold: #c9a24f;
	--hx-hero-img: url("../img/hero-mosque.svg");
}

/* ================= Hero ================= */
.hx-hero {
	position: relative;
	isolation: isolate;
	overflow: hidden;
	min-height: 520px;
	padding: 80px 0 200px;
	background: #f4f1e6;
}
.hx-hero-art {
	position: absolute;
	inset: 0;
	z-index: -2;
	background: var(--hx-hero-img) right bottom / cover no-repeat;
}
/* soft light wash on the left so the heading stays readable */
.hx-hero::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background: linear-gradient(90deg, rgba(250, 248, 240, .96) 0%, rgba(250, 248, 240, .85) 32%, rgba(250, 248, 240, 0) 58%);
}
.hx-hero-copy { max-width: 640px; }
.hx-title {
	font-family: var(--hm-display) !important;
	font-size: clamp(32px, 3.8vw, 50px);
	font-weight: 700;
	font-style: italic;
	line-height: 1.12;
	color: var(--hx-ink) !important;
	margin: 0 0 18px;
}
.hx-title span {
	display: block;
	font-style: normal;
	color: var(--hx-green) !important;
}
.hx-desc {
	font-size: clamp(16px, 1.5vw, 19px);
	line-height: 1.6;
	color: #3d5149;
	margin: 0 0 28px;
}
.hx-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hx-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 13px 24px;
	border-radius: 999px;
	font-size: 14.5px;
	font-weight: 600;
	line-height: 1;
	text-decoration: none !important;
}
.hx-btn i { transition: transform .25s; }
.hx-btn:hover i { transform: translateX(4px); }
.hx-btn-green { background: var(--hx-green); color: #fff !important; box-shadow: 0 10px 24px rgba(15, 107, 79, .28); }
.hx-btn-green:hover { background: var(--hx-green-dark); transform: translateY(-2px); }
.hx-btn-light { background: rgba(255, 255, 255, .85); color: var(--hx-green-dark) !important; border: 1px solid rgba(15, 107, 79, .25); }
.hx-btn-light:hover { background: #fff; border-color: var(--hx-green); }

/* ================= Institutions ================= */
.hx-inst {
	position: relative;
	z-index: 3;
	margin-top: -150px;
	padding-bottom: 40px;
	background: linear-gradient(180deg, transparent 150px, #fff 150px);
}
.hx-inst-label {
	text-align: center;
	margin: 0 0 -18px;
	position: relative;
	z-index: 2;
	font-size: inherit;
}
.hx-inst-label span {
	display: inline-block;
	padding: 10px 26px;
	border-radius: 999px;
	background: var(--hx-green);
	color: #fff !important;
	font-size: 16px;
	font-weight: 600;
	letter-spacing: .2px;
	box-shadow: 0 10px 24px rgba(15, 107, 79, .3);
}

.hx-inst-wrap { position: relative; }
.hx-track {
	display: flex;
	gap: 14px;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	scrollbar-width: none;
	padding: 34px 4px 18px;
	margin: 0 -4px;
	outline: none;
}
.hx-track::-webkit-scrollbar { display: none; }

.hx-card {
	--c: var(--hx-green);
	flex: 0 0 calc((100% - 6 * 14px) / 7);
	scroll-snap-align: start;
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	padding: 22px 12px 18px;
	border-radius: 14px;
	background: #fff;
	border: 1px solid rgba(18, 53, 42, .06);
	box-shadow: 0 8px 20px rgba(18, 53, 42, .1);
	text-decoration: none !important;
	transition: transform .3s var(--hm-ease), box-shadow .3s var(--hm-ease), border-color .3s;
}
.hx-card:hover,
.hx-card:focus-visible {
	transform: translateY(-6px);
	border-color: color-mix(in srgb, var(--c) 40%, transparent);
	box-shadow: 0 20px 38px rgba(18, 53, 42, .18);
	outline: none;
}
.hx-card-icon {
	width: 58px;
	height: 58px;
	border-radius: 50%;
	display: grid;
	place-items: center;
	background: color-mix(in srgb, var(--c) 12%, #fff);
	color: var(--c);
	margin-bottom: 14px;
	transition: background .3s, color .3s;
}
.hx-card:hover .hx-card-icon { background: var(--c); color: #fff; }
.hx-card-icon svg { width: 32px; height: 32px; }
.hx-card-name {
	font-size: 15px;
	font-weight: 600;
	line-height: 1.35;
	color: var(--hx-ink);
	min-height: 40px;
	display: flex;
	align-items: center;
}
.hx-card-more {
	margin-top: 12px;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 13px;
	font-weight: 600;
	color: var(--hx-green);
}
.hx-card-more i { transition: transform .25s; }
.hx-card:hover .hx-card-more i { transform: translateX(4px); }

/* arrows show only when the cards don't all fit */
.hx-nav-btn {
	position: absolute;
	top: 50%;
	z-index: 3;
	width: 40px;
	height: 40px;
	margin-top: -4px;
	border-radius: 50%;
	border: 0;
	background: #fff;
	color: var(--hx-green);
	font-size: 18px;
	display: none;
	place-items: center;
	cursor: pointer;
	box-shadow: 0 8px 20px rgba(18, 53, 42, .2);
}
.hx-nav-prev { left: -14px; }
.hx-nav-next { right: -14px; }
.hx-nav-btn:hover,
.hx-nav-btn:focus-visible { background: var(--hx-green); color: #fff; outline: none; }
.hx-inst-wrap.is-sliding .hx-nav-btn { display: grid; }

/* ================= Charity / Mart / Volunteer ================= */
.hx-feature-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 22px;
	margin-top: 22px;
}
.hx-feature {
	--f: var(--hx-green);
	--f-bg: linear-gradient(120deg, #dff1e5, #f1f8f2);
	position: relative;
	display: flex;
	align-items: center;
	gap: 20px;
	padding: 24px 26px;
	border-radius: 18px;
	background: var(--f-bg);
	border: 1px solid color-mix(in srgb, var(--f) 18%, transparent);
	box-shadow: 0 10px 26px rgba(18, 53, 42, .08);
	text-decoration: none !important;
	overflow: hidden;
	transition: transform .3s var(--hm-ease), box-shadow .3s var(--hm-ease);
}
.hx-feature:hover { transform: translateY(-5px); box-shadow: 0 18px 36px color-mix(in srgb, var(--f) 22%, transparent); }
.hx-feature-charity { --f: #0f7a52; --f-bg: linear-gradient(120deg, #d9f0e1, #f1f9f3); }
.hx-feature-mart    { --f: #d0661f; --f-bg: linear-gradient(120deg, #fde3cf, #fff4ea); }
.hx-feature-vol     { --f: #3a5bc7; --f-bg: linear-gradient(120deg, #e0e7fb, #f3f6fe); }
.hx-feature-icon {
	flex: none;
	width: 70px;
	height: 70px;
	border-radius: 50%;
	display: grid;
	place-items: center;
	background: #fff;
	color: var(--f);
	box-shadow: 0 8px 20px color-mix(in srgb, var(--f) 20%, transparent);
}
.hx-feature-icon svg { width: 38px; height: 38px; }
.hx-feature-text { min-width: 0; }
.hx-feature-text strong { display: block; font-size: 20px; font-weight: 700; color: var(--hx-ink); line-height: 1.25; }
.hx-feature-text small { display: block; margin-top: 2px; font-size: 14px; color: #4a5e56; }
.hx-feature-go {
	margin-top: 12px;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 8px 16px;
	border-radius: 999px;
	background: var(--f);
	color: #fff;
	font-size: 13px;
	font-weight: 600;
}
.hx-feature-go i { transition: transform .25s; }
.hx-feature:hover .hx-feature-go i { transform: translateX(4px); }

/* first content section sits right under the cards */
.hx-inst + #content .hm-section:first-child { padding-top: 72px; }

/* ================= Responsive ================= */
@media (max-width: 1199px) {
	.hx-card { flex-basis: calc((100% - 4 * 14px) / 5); }
}
@media (max-width: 991px) {
	.hx-hero { padding: 64px 0 190px; min-height: 0; }
	.hx-hero::before { background: linear-gradient(90deg, rgba(250, 248, 240, .95) 0%, rgba(250, 248, 240, .8) 55%, rgba(250, 248, 240, .2) 100%); }
	.hx-card { flex-basis: calc((100% - 2 * 14px) / 3); }
	.hx-feature-grid { grid-template-columns: minmax(0, 1fr); }
	.hx-nav-prev { left: -6px; }
	.hx-nav-next { right: -6px; }
}
@media (max-width: 640px) {
	.hx-hero { padding: 44px 0 300px; }
	.hx-hero-art { background-position: 72% bottom; background-size: auto 62%; background-color: #eef4ec; }
	.hx-hero::before { background: linear-gradient(180deg, rgba(250, 248, 240, .98) 0%, rgba(250, 248, 240, .9) 45%, rgba(250, 248, 240, 0) 70%); }
	.hx-inst { margin-top: -130px; }
	.hx-inst-label span { font-size: 14.5px; padding: 9px 20px; }
	.hx-card { flex-basis: calc((100% - 14px) / 2.2); }
	.hx-feature { padding: 20px; gap: 16px; }
	.hx-feature-icon { width: 58px; height: 58px; }
	.hx-feature-icon svg { width: 30px; height: 30px; }
}
@media (prefers-reduced-motion: reduce) {
	.hx-track { scroll-behavior: auto; }
	.hx-card, .hx-feature { transition: none; }
}
