/* ----------------------------------------------------------------
	Aluswa Islamic Academy - modern homepage
	Everything is scoped to body.home-modern so inner pages are untouched.
-----------------------------------------------------------------*/

body.home-modern {
	--hm-ink: #0f2a3d;
	--hm-text: #4a5b69;
	--hm-primary: #0a7ea4;
	--hm-primary-dark: #0b4f6c;
	--hm-navy: #0a2a3c;
	--hm-accent: #d4a24c;
	--hm-accent-dark: #b8872f;
	--hm-bg: #f5f9fb;
	--hm-card: #ffffff;
	--hm-line: #e3ecf1;
	--hm-radius: 18px;
	--hm-shadow: 0 10px 30px rgba(15, 42, 61, .08);
	--hm-shadow-lg: 0 18px 44px rgba(15, 42, 61, .16);

	font-family: 'Poppins', 'Noto Sans Malayalam', 'Noto Naskh Arabic', 'Segoe UI', sans-serif;
	color: var(--hm-text);
	background: #fff;
}

body.home-modern h1,
body.home-modern h2,
body.home-modern h3,
body.home-modern h4,
body.home-modern h5 {
	font-family: 'Poppins', 'Noto Sans Malayalam', 'Noto Naskh Arabic', 'Segoe UI', sans-serif;
	color: var(--hm-ink);
}

body.home-modern a { transition: color .2s, background .2s, transform .2s, box-shadow .2s; }

/* ---------- Shared bits ---------- */
.hm-container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.hm-section { padding: 84px 0; position: relative; overflow-x: clip; }
.hm-welcome-grid > * { min-width: 0; }
.hm-section-alt { background: var(--hm-bg); }

.hm-eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 1.6px;
	text-transform: uppercase;
	color: var(--hm-accent-dark);
	margin-bottom: 14px;
}
.hm-eyebrow::before {
	content: "";
	width: 26px;
	height: 2px;
	background: var(--hm-accent);
	border-radius: 2px;
}
.hm-heading { font-size: clamp(26px, 3.4vw, 38px); font-weight: 700; line-height: 1.2; margin: 0 0 14px; }
.hm-lead { font-size: 16px; line-height: 1.8; color: var(--hm-text); margin: 0; }
.hm-section-head { max-width: 760px; margin: 0 auto 48px; text-align: center; }
.hm-section-head .hm-eyebrow { justify-content: center; }

.hm-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 13px 28px;
	border-radius: 50px;
	font-size: 14px;
	font-weight: 600;
	letter-spacing: .3px;
	line-height: 1.2;
	border: 2px solid transparent;
	cursor: pointer;
	text-decoration: none !important;
}
.hm-btn i { font-size: 14px; transition: transform .2s; }
.hm-btn:hover i { transform: translateX(4px); }
.hm-btn-primary { background: var(--hm-accent); color: var(--hm-navy) !important; box-shadow: 0 10px 24px rgba(212, 162, 76, .38); }
.hm-btn-primary:hover { background: #e2b25e; transform: translateY(-2px); }
.hm-btn-dark { background: var(--hm-primary); color: #fff !important; box-shadow: 0 10px 24px rgba(10, 126, 164, .28); }
.hm-btn-dark:hover { background: var(--hm-primary-dark); transform: translateY(-2px); }
.hm-btn-ghost { border-color: rgba(255, 255, 255, .7); color: #fff !important; background: rgba(255, 255, 255, .08); }
.hm-btn-ghost:hover { background: #fff; color: var(--hm-navy) !important; }
.hm-btn-block { width: 100%; }

/* ---------- Hero ---------- */
.hm-hero {
	position: relative;
	min-height: 640px;
	height: calc(100vh - 170px);
	max-height: 760px;
	overflow: hidden;
	background: var(--hm-navy);
	color: #fff;
}
.hm-slide {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	opacity: 0;
	visibility: hidden;
	transition: opacity 1s ease, visibility 1s;
}
.hm-slide.is-active { opacity: 1; visibility: visible; z-index: 2; }
.hm-slide-bg {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transform: scale(1.04);
	transition: transform 9s ease-out;
}
.hm-slide.is-active .hm-slide-bg { transform: scale(1.14); }
.hm-slide::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
	background: linear-gradient(100deg, rgba(10, 42, 60, .92) 0%, rgba(10, 42, 60, .72) 45%, rgba(10, 42, 60, .25) 100%);
}
.hm-slide-inner { position: relative; z-index: 2; width: 100%; }
.hm-slide-copy { max-width: 640px; }
.hm-hero .hm-eyebrow { color: var(--hm-accent); }
.hm-hero-title {
	color: #fff !important;
	font-size: clamp(34px, 5.4vw, 62px);
	font-weight: 700;
	line-height: 1.1;
	margin: 0 0 18px;
	text-shadow: 0 2px 20px rgba(0, 0, 0, .25);
}
.hm-hero-desc { font-size: clamp(15px, 1.5vw, 18px); line-height: 1.75; color: #dbe9f1; margin: 0 0 32px; max-width: 560px; }
.hm-hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }
.hm-slide-copy > * { opacity: 0; transform: translateY(26px); }
.hm-slide.is-active .hm-slide-copy > * { animation: hmRise .8s ease forwards; }
.hm-slide.is-active .hm-slide-copy > *:nth-child(2) { animation-delay: .15s; }
.hm-slide.is-active .hm-slide-copy > *:nth-child(3) { animation-delay: .3s; }
.hm-slide.is-active .hm-slide-copy > *:nth-child(4) { animation-delay: .45s; }
@keyframes hmRise { to { opacity: 1; transform: none; } }

.hm-hero-ui {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 34px;
	z-index: 5;
}
.hm-hero-ui .hm-container { display: flex; align-items: center; justify-content: space-between; }
.hm-dots { display: flex; gap: 10px; }
.hm-dot {
	width: 34px;
	height: 5px;
	border: 0;
	border-radius: 5px;
	background: rgba(255, 255, 255, .35);
	padding: 0;
	cursor: pointer;
	transition: background .3s, width .3s;
}
.hm-dot.is-active { background: var(--hm-accent); width: 54px; }
.hm-arrows { display: flex; gap: 10px; }
.hm-arrow {
	width: 46px;
	height: 46px;
	border-radius: 50%;
	border: 1px solid rgba(255, 255, 255, .45);
	background: rgba(255, 255, 255, .08);
	color: #fff;
	font-size: 18px;
	cursor: pointer;
	backdrop-filter: blur(6px);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	transition: background .2s, color .2s;
}
.hm-arrow:hover { background: var(--hm-accent); border-color: var(--hm-accent); color: var(--hm-navy); }

/* ---------- Welcome / announcements / events ---------- */
.hm-welcome-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 40px; align-items: start; }
.hm-welcome-copy { margin-bottom: 28px; }
.hm-readmore {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin-top: 18px;
	font-weight: 600;
	color: var(--hm-primary);
}
.hm-readmore:hover { color: var(--hm-primary-dark); gap: 10px; }

.hm-announce {
	position: relative;
	overflow: hidden;
	border-radius: var(--hm-radius);
	padding: 30px;
	color: #fff;
	background: linear-gradient(120deg, rgba(10, 42, 60, .93), rgba(11, 79, 108, .86)), url('../img/news.jpg') center/cover no-repeat;
	box-shadow: var(--hm-shadow-lg);
}
.hm-announce h3 {
	color: #fff !important;
	font-size: 20px;
	font-weight: 700;
	letter-spacing: 1.5px;
	margin: 0 0 18px;
	display: flex;
	align-items: center;
	gap: 12px;
}
.hm-announce h3 i {
	width: 40px;
	height: 40px;
	border-radius: 12px;
	background: var(--hm-accent);
	color: var(--hm-navy);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 18px;
}
.hm-ticker {
	background: rgba(255, 255, 255, .1);
	border: 1px solid rgba(255, 255, 255, .16);
	border-radius: 50px;
	overflow: hidden;
	margin-bottom: 22px;
	padding: 12px 0;
	white-space: nowrap;
}
.hm-ticker-track { display: inline-block; padding-left: 100%; animation: hmTicker 38s linear infinite; }
.hm-ticker:hover .hm-ticker-track { animation-play-state: paused; }
.hm-ticker-item { color: #fff; font-size: 14.5px; }
.hm-ticker-sep { color: var(--hm-accent); margin: 0 22px; font-weight: 700; }
@keyframes hmTicker { to { transform: translateX(-100%); } }

.hm-events {
	background: #fff;
	border: 1px solid var(--hm-line);
	border-radius: var(--hm-radius);
	box-shadow: var(--hm-shadow);
	padding: 26px;
}
.hm-events h3 { font-size: 20px; font-weight: 700; margin: 0 0 18px; display: flex; align-items: center; gap: 10px; }
.hm-events h3::before { content: ""; width: 5px; height: 22px; border-radius: 4px; background: var(--hm-accent); }
.hm-event {
	display: flex;
	gap: 14px;
	align-items: center;
	padding: 14px 0;
	border-top: 1px solid var(--hm-line);
}
.hm-event:first-of-type { border-top: 0; padding-top: 0; }
.hm-event:last-child { padding-bottom: 0; }
.hm-event-thumb {
	flex: 0 0 56px;
	height: 56px;
	border-radius: 14px;
	background: var(--hm-bg);
	border: 1px solid var(--hm-line);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 6px;
}
.hm-event-thumb img { max-width: 100%; max-height: 100%; object-fit: contain; }
.hm-event h5 { font-size: 14.5px; font-weight: 600; line-height: 1.45; margin: 0 0 4px; }
.hm-event h5 a { color: var(--hm-ink); }
.hm-event h5 a:hover { color: var(--hm-primary); }
.hm-event-date { font-size: 12.5px; color: #7b8c99; display: flex; align-items: center; gap: 6px; }
.hm-event-date i { color: var(--hm-accent-dark); }

/* ---------- Courses ---------- */
.hm-courses { background: var(--hm-bg); }
.hm-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
.hm-card {
	display: flex;
	flex-direction: column;
	background: var(--hm-card);
	border: 1px solid var(--hm-line);
	border-radius: var(--hm-radius);
	overflow: hidden;
	box-shadow: var(--hm-shadow);
	transition: transform .3s, box-shadow .3s;
}
.hm-card:hover { transform: translateY(-8px); box-shadow: var(--hm-shadow-lg); }
.hm-card-img { position: relative; display: block; overflow: hidden; aspect-ratio: 16 / 10; background: #dfe9ef; }
.hm-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s; }
.hm-card:hover .hm-card-img img { transform: scale(1.07); }
.hm-badge {
	position: absolute;
	top: 14px;
	left: 14px;
	background: rgba(10, 42, 60, .88);
	color: #fff;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 1px;
	text-transform: uppercase;
	padding: 6px 14px;
	border-radius: 50px;
	backdrop-filter: blur(4px);
}
.hm-card-body { padding: 24px 24px 8px; flex: 1; }
.hm-card-title { font-size: 17px; font-weight: 700; line-height: 1.4; margin: 0 0 16px; min-height: 48px; }
.hm-card-title a { color: var(--hm-ink); }
.hm-card-title a:hover { color: var(--hm-primary); }
.hm-fees { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.hm-fees li {
	display: flex;
	justify-content: space-between;
	align-items: center;
	background: var(--hm-bg);
	border-radius: 12px;
	padding: 10px 14px;
	font-size: 13.5px;
	color: var(--hm-text);
}
.hm-fees ins { text-decoration: none; font-weight: 700; color: var(--hm-primary-dark); font-size: 15px; }
.hm-card-foot { padding: 18px 24px 24px; }

/* ---------- Book store ---------- */
.hm-books-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; max-width: 900px; margin: 0 auto; }
.hm-book-card { padding: 0; }
.hm-book-card .hm-card-img { aspect-ratio: 16 / 9; }
.hm-book-card .hm-card-img::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, transparent 45%, rgba(10, 42, 60, .55));
}
.hm-book-title { text-align: center; font-size: 18px; font-weight: 700; line-height: 1.6; margin: 0; padding: 22px 20px 4px; }
.hm-book-card .hm-card-foot { padding-top: 14px; }

/* ---------- Scroll reveal ---------- */
.hm-reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s ease, transform .7s ease; }
.hm-reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
	.hm-reveal, .hm-slide-copy > * { opacity: 1; transform: none; animation: none !important; transition: none; }
	.hm-ticker-track { animation: none; padding-left: 0; }
	.hm-slide-bg { transition: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 991px) {
	.hm-section { padding: 64px 0; }
	.hm-welcome-grid { grid-template-columns: minmax(0, 1fr); gap: 32px; }
	.hm-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.hm-hero { height: auto; min-height: 560px; }
}
@media (max-width: 640px) {
	.hm-section { padding: 52px 0; }
	.hm-grid, .hm-books-grid { grid-template-columns: minmax(0, 1fr); gap: 22px; }
	.hm-hero { min-height: 520px; }
	.hm-slide::before { background: linear-gradient(180deg, rgba(10, 42, 60, .72), rgba(10, 42, 60, .9)); }
	.hm-hero-actions .hm-btn { width: 100%; }
	.hm-arrows { display: none; }
	.hm-announce { padding: 22px; }
	.hm-card-title { min-height: 0; }
	.hm-section-head { margin-bottom: 34px; }
}

/* Rupee sign (icon font for .fa-rupee is not loaded on this page) */
.hm-fees .fa-rupee { font-style: normal; display: inline; }
.hm-fees .fa-rupee::before { content: "\20B9"; font-family: inherit; font-weight: 700; margin-right: 1px; }

/* ---------- Book store (redesigned) ---------- */
.hm-bookstore {
	position: relative;
	padding: 84px 0 92px;
	color: #fff;
	overflow-x: clip;
	background:
		radial-gradient(circle at 10% 0%, rgba(212, 162, 76, .16), transparent 42%),
		radial-gradient(circle at 95% 100%, rgba(10, 126, 164, .35), transparent 45%),
		linear-gradient(135deg, #072232 0%, var(--hm-navy) 55%, #0b4f6c 100%);
}
.hm-bookstore::before {
	content: "";
	position: absolute;
	inset: 0;
	background: url('../assets/images/icon-pattern.jpg') repeat;
	opacity: .04;
	pointer-events: none;
}
.hm-bookstore .hm-container { position: relative; z-index: 1; }
.hm-bookstore .hm-heading { color: #fff !important; }
.hm-bookstore .hm-heading::after {
	content: "";
	display: block;
	width: 56px;
	height: 4px;
	border-radius: 4px;
	background: var(--hm-accent);
	margin: 16px auto 0;
}
.hm-bk-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; max-width: 1020px; margin: 0 auto; }
.hm-bk {
	display: flex;
	flex-direction: column;
	border-radius: 22px;
	overflow: hidden;
	background: rgba(255, 255, 255, .06);
	border: 1px solid rgba(255, 255, 255, .14);
	box-shadow: 0 24px 50px rgba(0, 0, 0, .28);
	transition: transform .35s, box-shadow .35s, border-color .35s;
}
.hm-bk:hover { transform: translateY(-8px); border-color: rgba(212, 162, 76, .6); box-shadow: 0 32px 60px rgba(0, 0, 0, .38); }
.hm-bk-media { display: block; overflow: hidden; background: #0d3045; }
.hm-bk-media img { width: 100%; height: auto; display: block; transition: transform .7s; }
.hm-bk:hover .hm-bk-media img { transform: scale(1.06); }
.hm-bk-body {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 18px;
	padding: 24px 28px 26px;
	border-top: 3px solid var(--hm-accent);
}
.hm-bk-title { margin: 0; line-height: 1.3; }
.hm-bk-title span { display: block; color: #fff !important; font-size: 17px; font-weight: 700; letter-spacing: 1.4px; }
.hm-bk-title small { display: block; margin-top: 6px; color: var(--hm-accent); font-size: 19px; font-weight: 600; line-height: 1.5; }
.hm-bk-btn {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 13px 22px;
	border-radius: 50px;
	background: var(--hm-accent);
	color: var(--hm-navy) !important;
	font-size: 12.5px;
	font-weight: 700;
	letter-spacing: 1.1px;
	text-transform: uppercase;
	text-decoration: none !important;
	white-space: nowrap;
	box-shadow: 0 10px 22px rgba(212, 162, 76, .3);
	transition: background .25s, transform .25s;
}
.hm-bk-btn i:last-child { transition: transform .25s; }
.hm-bk-btn:hover { background: #e8bd6b; transform: translateY(-2px); }
.hm-bk-btn:hover i:last-child { transform: translateX(4px); }
@media (max-width: 991px) {
	.hm-bookstore { padding: 64px 0 70px; }
	.hm-bk-grid { gap: 22px; }
	.hm-bk-body { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 640px) {
	.hm-bookstore { padding: 52px 0 56px; }
	.hm-bk-grid { grid-template-columns: minmax(0, 1fr); }
	.hm-bk-body { flex-direction: row; padding: 20px; }
	.hm-bk-btn { padding: 12px 16px; }
}
@media (max-width: 420px) {
	.hm-bk-body { flex-direction: column; align-items: stretch; }
	.hm-bk-btn { justify-content: center; }
}
