/* ==========================================================
   Jamia Millia Islamia, Dr. Zakir Husain Library – home page (body.home-modern.jmi-home)
   Loaded after home-modern.css and home-sections.css.
   Layout: deep Jamia-green hero with a jaali (lattice) pattern, the white trilingual logo,
   a large search and stat chips; quick-access tiles; popular resources; research by
   Jamia authors; book shelves; A–Z / open access; about + contact; important links; footer.
   ========================================================== */

.jmi-home {
	--hm-font: var(--jmi-sans);
	--hm-bg: var(--jmi-paper);
	--hm-radius: 14px;
	font-family: var(--jmi-sans);
}

.jmi-wrap {
	width: 100%;
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 24px;
}

.jmi-kicker {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	margin: 0;
	font-size: 12.5px;
	font-weight: 600;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--jmi-accent-dark);
}

.jmi-kicker::before {
	content: "";
	width: 26px;
	height: 2px;
	border-radius: 2px;
	background: var(--jmi-bright);
}

.jmi-kicker-light {
	color: #bfe9d3;
}

.jmi-h2 {
	margin: 10px 0 0;
	font-size: clamp(26px, 3vw, 36px);
	font-weight: 700;
	line-height: 1.15;
	letter-spacing: -0.02em;
	color: var(--jmi-ink);
}

.jmi-section {
	padding: 76px 0;
}

.jmi-section-head {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 32px;
	margin-bottom: 32px;
}

.jmi-section-head > p {
	max-width: 420px;
	margin: 0;
	font-size: 15.5px;
	line-height: 1.6;
	color: var(--jmi-muted);
}

/* ---------- Header: deep green bar, matches the hero ---------- */

.home-modern.jmi-home .cnu-header {
	background: var(--jmi-deep) !important;
	box-shadow: 0 1px 0 rgba(255, 255, 255, 0.08);
}

.home-modern.jmi-home .navigation-bar nav ul li > a,
.home-modern.jmi-home .navigation-bar nav ul li[data-toggle] {
	border-radius: 999px;
}

.home-modern.jmi-home .login li:last-child a {
	background: var(--jmi-bright) !important;
	border-color: var(--jmi-bright) !important;
	color: #06241a !important;
	box-shadow: none !important;
}

.home-modern.jmi-home .login li:last-child a:hover {
	background: #46c088 !important;
}

/* ---------- Hero: jaali pattern ---------- */

.jmi-hero {
	position: relative;
	isolation: isolate;
	overflow: hidden;
	padding: 128px 0 72px;
	background:
		radial-gradient(900px 420px at 50% 0%, rgba(46, 167, 109, 0.35), transparent 70%),
		linear-gradient(180deg, var(--jmi-deep) 0%, #0e3d2b 100%);
	color: #fff;
	text-align: center;
}

/* eight-point star lattice, the motif of Jamia's jaali screens; faded at the edges */
.jmi-hero-pattern {
	position: absolute;
	inset: 0;
	z-index: -1;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='88' height='88' viewBox='0 0 88 88'%3E%3Cg fill='none' stroke='%23ffffff' stroke-opacity='0.09' stroke-width='1.2'%3E%3Cpath d='M44 8 54 34 80 44 54 54 44 80 34 54 8 44 34 34Z'/%3E%3Cpath d='M44 22 57 31 66 44 57 57 44 66 31 57 22 44 31 31Z'/%3E%3Cpath d='M0 0 8 8M88 0 80 8M0 88 8 80M88 88 80 80'/%3E%3Ccircle cx='44' cy='44' r='5'/%3E%3C/g%3E%3C/svg%3E");
	background-size: 88px 88px;
	-webkit-mask-image: radial-gradient(ellipse at 50% 40%, #000 30%, transparent 78%);
	mask-image: radial-gradient(ellipse at 50% 40%, #000 30%, transparent 78%);
}

/* thin gold-to-green rule under the hero */
.jmi-hero::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 4px;
	background: linear-gradient(90deg, transparent, var(--jmi-gold) 30%, var(--jmi-bright) 70%, transparent);
}

.jmi-hero-inner {
	display: flex;
	flex-direction: column;
	align-items: center;
}

.jmi-hero-logo {
	width: min(560px, 86vw);
	height: auto;
	margin-bottom: 26px;
}

.jmi-hero-kicker {
	margin: 0 0 12px;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.22em;
	text-transform: uppercase;
	color: #bfe9d3;
}

.jmi-hero-title {
	max-width: 760px;
	margin: 0 0 12px;
	font-size: clamp(30px, 4vw, 48px);
	font-weight: 700;
	line-height: 1.1;
	letter-spacing: -0.025em;
	color: #fff;
}

.jmi-hero-title span {
	color: #8fe0b7;
}

.jmi-hero-lede {
	max-width: 620px;
	margin: 0 0 30px;
	font-size: 17px;
	line-height: 1.6;
	color: rgba(255, 255, 255, 0.82);
}

.jmi-search {
	width: min(760px, 100%);
}

.jmi-search .hm-search-field {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 8px 8px 8px 22px;
	border-radius: 999px;
	background: #fff;
	box-shadow: 0 20px 50px -18px rgba(0, 0, 0, 0.55), 0 0 0 6px rgba(255, 255, 255, 0.08);
}

.jmi-search .hm-search-field > i {
	color: var(--jmi-muted);
}

.jmi-search .hm-search-field input {
	flex: 1 1 auto;
	min-width: 0;
	height: 48px;
	border: 0;
	outline: 0;
	background: transparent;
	font-size: 16px;
	color: var(--jmi-ink);
}

.jmi-search .hm-search-btn {
	height: 48px;
	padding: 0 26px;
	border: 0;
	border-radius: 999px;
	background: var(--jmi-green);
	color: #fff;
	font-weight: 600;
	cursor: pointer;
	transition: background-color 0.2s ease;
}

.jmi-search .hm-search-btn:hover {
	background: var(--jmi-dark);
}

.jmi-chips {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	align-items: center;
	gap: 8px;
	margin-top: 18px;
	font-size: 13.5px;
	color: rgba(255, 255, 255, 0.7);
}

.jmi-chips .hm-chip {
	padding: 6px 14px;
	border: 1px solid rgba(255, 255, 255, 0.24);
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.06);
	color: #fff;
	font-size: 13px;
	cursor: pointer;
	transition: background-color 0.2s ease, border-color 0.2s ease;
}

.jmi-chips .hm-chip:hover {
	border-color: #8fe0b7;
	background: rgba(143, 224, 183, 0.14);
}

.jmi-badges {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 12px;
	margin: 40px 0 0;
	padding: 0;
	list-style: none;
}

.jmi-badges li {
	display: flex;
	flex-direction: column;
	align-items: center;
	min-width: 150px;
	padding: 14px 18px;
	border: 1px solid rgba(255, 255, 255, 0.14);
	border-radius: 14px;
	background: rgba(255, 255, 255, 0.05);
	backdrop-filter: blur(4px);
}

.jmi-badges b {
	font-size: 22px;
	font-weight: 700;
	line-height: 1.1;
	color: #fff;
}

.jmi-badges span {
	margin-top: 4px;
	font-size: 12.5px;
	color: rgba(255, 255, 255, 0.72);
}

/* ---------- Quick-access tiles ---------- */

.jmi-quick {
	background: var(--jmi-paper);
}

.jmi-tiles {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 14px;
}

.jmi-tile {
	position: relative;
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 18px;
	border: 1px solid var(--jmi-line);
	border-radius: 14px;
	background: #fff;
	color: inherit !important;
	text-decoration: none !important;
	transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.jmi-tile:hover {
	border-color: rgba(30, 107, 74, 0.35);
	box-shadow: 0 16px 34px -20px rgba(11, 49, 35, 0.45);
	transform: translateY(-2px);
}

.jmi-tile-icon {
	display: grid;
	place-items: center;
	flex: 0 0 44px;
	width: 44px;
	height: 44px;
	border-radius: 12px;
	background: var(--jmi-soft);
	color: var(--jmi-green);
	font-size: 17px;
}

.jmi-tile-body {
	flex: 1 1 auto;
	min-width: 0;
}

.jmi-tile-body b {
	display: block;
	font-size: 15.5px;
	color: var(--jmi-ink);
}

.jmi-tile-body small {
	display: block;
	margin-top: 2px;
	font-size: 13px;
	line-height: 1.4;
	color: var(--jmi-muted);
}

.jmi-tile-stat {
	flex: 0 0 auto;
	padding: 3px 10px;
	border-radius: 999px;
	background: var(--jmi-soft);
	font-size: 12px;
	font-weight: 600;
	color: var(--jmi-green);
	white-space: nowrap;
}

.jmi-tile-go {
	flex: 0 0 auto;
	color: var(--jmi-muted);
	transition: transform 0.2s ease, color 0.2s ease;
}

.jmi-tile:hover .jmi-tile-go {
	color: var(--jmi-green);
	transform: translateX(3px);
}

/* the e-resources tile leads: double width, solid green */
.jmi-tile-main {
	grid-column: span 2;
	border-color: transparent;
	background: linear-gradient(135deg, var(--jmi-green), var(--jmi-dark));
}

.jmi-tile-main .jmi-tile-icon {
	background: rgba(255, 255, 255, 0.14);
	color: #fff;
}

.jmi-tile-main .jmi-tile-body b {
	color: #fff;
}

.jmi-tile-main .jmi-tile-body small {
	color: rgba(255, 255, 255, 0.8);
}

.jmi-tile-main .jmi-tile-stat {
	background: rgba(255, 255, 255, 0.16);
	color: #fff;
}

/* ---------- Shared showcase sections ---------- */

.jmi-home .hm-eyebrow {
	color: var(--jmi-accent-dark);
}

.jmi-home .hm-popular .hm-tab.active {
	background: var(--jmi-green);
	border-color: var(--jmi-green);
	color: #fff;
}

.jmi-home .hm-ext-mark {
	background: var(--jmi-green);
	color: #fff;
}

/* ---------- Research ---------- */

.jmi-research {
	background: #fff;
}

.jmi-research-count {
	text-align: right;
}

.jmi-research-count b {
	display: block;
	font-size: 40px;
	font-weight: 700;
	line-height: 1;
	color: var(--jmi-green);
}

.jmi-research-count span {
	font-size: 12.5px;
	font-weight: 600;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--jmi-muted);
}

.jmi-papers {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 14px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.jmi-paper {
	display: grid;
	grid-template-columns: 64px minmax(0, 1fr);
	gap: 16px;
	padding: 18px;
	border: 1px solid var(--jmi-line);
	border-radius: 14px;
	background: var(--jmi-paper);
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.jmi-paper:hover {
	border-color: rgba(30, 107, 74, 0.35);
	box-shadow: 0 14px 30px -22px rgba(11, 49, 35, 0.5);
}

.jmi-paper time {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	height: 64px;
	border-radius: 12px;
	background: var(--jmi-green);
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-align: center;
	color: rgba(255, 255, 255, 0.85);
}

.jmi-paper time b {
	font-size: 22px;
	line-height: 1;
	color: #fff;
}

.jmi-paper .hm-paper-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.jmi-paper .hm-paper-field {
	background: var(--jmi-soft);
	color: var(--jmi-green);
}

.jmi-paper .hm-paper-oa {
	background: #fff3d6;
	color: #8a5a00;
}

.jmi-paper h3 {
	margin: 6px 0;
	font-size: 16px;
	font-weight: 600;
	line-height: 1.4;
}

.jmi-paper h3 a {
	color: var(--jmi-ink) !important;
	text-decoration: none !important;
}

.jmi-paper h3 a:hover {
	color: var(--jmi-green) !important;
	text-decoration: underline !important;
}

.jmi-paper-meta {
	margin: 0;
	font-size: 13px;
	line-height: 1.5;
	color: var(--jmi-muted);
}

.jmi-paper-read {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin-top: 8px;
	font-size: 13px;
	font-weight: 600;
	color: var(--jmi-green) !important;
}

.jmi-research-foot {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 16px;
	margin-top: 26px;
}

.jmi-research-foot .hm-credit {
	margin: 0;
}

/* ---------- Buttons ---------- */

.jmi-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 11px 22px;
	border: 1.5px solid transparent;
	border-radius: 999px;
	font-size: 14.5px;
	font-weight: 600;
	text-decoration: none !important;
	transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.jmi-btn-line {
	border-color: var(--jmi-green);
	color: var(--jmi-green) !important;
}

.jmi-btn-line:hover {
	background: var(--jmi-green);
	color: #fff !important;
}

.jmi-btn-light {
	background: #fff;
	color: var(--jmi-deep) !important;
}

.jmi-btn-light:hover {
	background: #e5f2eb;
}

.jmi-btn-ghost {
	border-color: rgba(255, 255, 255, 0.35);
	color: #fff !important;
}

.jmi-btn-ghost:hover {
	border-color: #fff;
}

/* ---------- About + contact ---------- */

.jmi-about {
	background: var(--jmi-paper);
}

.jmi-about-grid {
	display: grid;
	grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
	gap: 48px;
	align-items: start;
}

.jmi-about-text {
	margin-top: 18px;
	font-size: 16px;
	line-height: 1.7;
	color: var(--jmi-ink);
}

.jmi-about-text p {
	margin: 0 0 12px;
}

.jmi-steps {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 14px;
	margin: 28px 0 0;
	padding: 0;
	list-style: none;
	counter-reset: jmi-step;
}

.jmi-steps li {
	padding: 16px;
	border: 1px solid var(--jmi-line);
	border-radius: 14px;
	background: #fff;
	counter-increment: jmi-step;
}

.jmi-steps li::before {
	content: counter(jmi-step);
	display: grid;
	place-items: center;
	width: 30px;
	height: 30px;
	margin-bottom: 10px;
	border-radius: 50%;
	background: var(--jmi-green);
	font-size: 14px;
	font-weight: 700;
	color: #fff;
}

.jmi-steps b {
	display: block;
	font-size: 15px;
	color: var(--jmi-ink);
}

.jmi-steps span {
	display: block;
	margin-top: 4px;
	font-size: 13.5px;
	line-height: 1.5;
	color: var(--jmi-muted);
}

.jmi-visit {
	position: relative;
	overflow: hidden;
	padding: 28px;
	border-radius: 18px;
	background: linear-gradient(160deg, var(--jmi-green), var(--jmi-deep));
	color: #fff;
}

.jmi-visit-emblem {
	position: absolute;
	right: -40px;
	bottom: -40px;
	width: 200px;
	height: auto;
	opacity: 0.1;
	pointer-events: none;
}

.jmi-visit h3 {
	position: relative;
	margin: 10px 0 18px;
	font-size: 22px;
	font-weight: 700;
	color: #fff;
}

.jmi-visit dl {
	position: relative;
	margin: 0 0 20px;
}

.jmi-visit dt {
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: #bfe9d3;
}

.jmi-visit dt i {
	width: 16px;
}

.jmi-visit dd {
	margin: 2px 0 14px;
	font-size: 15px;
	line-height: 1.5;
	color: #fff;
}

.jmi-visit dd a {
	color: #fff !important;
}

.jmi-visit .jmi-btn {
	position: relative;
	width: 100%;
	margin-top: 8px;
}

/* ---------- Rich footer (home only; inner pages keep the slim bar) ---------- */

.jmi-home .jmi-footer {
	display: block;
}

.jmi-footer {
	padding: 56px 0 36px;
	background: var(--jmi-deep);
	color: rgba(255, 255, 255, 0.78);
	font-size: 14.5px;
	border-top: 4px solid var(--jmi-bright);
}

.jmi-footer-grid {
	display: grid;
	grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr));
	gap: 40px;
}

.jmi-footer-logo {
	width: min(300px, 100%);
	height: auto;
}

.jmi-footer-brand p {
	max-width: 340px;
	margin: 18px 0 0;
	line-height: 1.6;
	color: rgba(255, 255, 255, 0.78) !important;
}

.jmi-footer h4 {
	margin: 0 0 16px;
	font-size: 12.5px;
	font-weight: 600;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: #8fe0b7;
}

.jmi-footer ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

.jmi-footer li {
	margin: 0 0 10px;
}

.jmi-footer a {
	color: rgba(255, 255, 255, 0.85) !important;
	text-decoration: none !important;
}

.jmi-footer a:hover {
	color: #fff !important;
	text-decoration: underline !important;
}

.jmi-footer address {
	margin: 0;
	font-style: normal;
	line-height: 1.6;
	white-space: pre-line;
}

/* main.css pins the bar with position: absolute; here it must follow the rich footer */
.home-modern.jmi-home .footerSection {
	position: relative !important;
	margin-top: 0 !important;
	border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
	background: #06241a !important;
	color: rgba(255, 255, 255, 0.7) !important;
}

.home-modern.jmi-home .footerSection p,
.home-modern.jmi-home .footerSection div {
	background: transparent !important;
	color: rgba(255, 255, 255, 0.7) !important;
}

.home-modern.jmi-home .footerSection img {
	background: #fff;
	padding: 3px 6px;
	border-radius: 4px;
}

.home-modern.jmi-home .footerSection .arraowupBtn {
	background: var(--jmi-bright) !important;
}

/* ---------- Responsive ---------- */

@media (max-width: 1099.98px) {
	.jmi-tiles {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.jmi-about-grid {
		grid-template-columns: 1fr;
		gap: 32px;
	}

	.jmi-footer-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 767.98px) {
	.jmi-wrap {
		padding: 0 16px;
	}

	.jmi-hero {
		padding: 100px 0 48px;
	}

	.jmi-hero-logo {
		margin-bottom: 18px;
	}

	.jmi-hero-lede {
		font-size: 15.5px;
	}

	.jmi-search .hm-search-btn span {
		display: none;
	}

	.jmi-search .hm-search-btn {
		padding: 0 18px;
	}

	.jmi-badges li {
		min-width: calc(50% - 6px);
	}

	.jmi-section {
		padding: 52px 0;
	}

	.jmi-section-head {
		flex-direction: column;
		align-items: flex-start;
		gap: 12px;
	}

	.jmi-research-count {
		text-align: left;
	}

	.jmi-tiles,
	.jmi-papers,
	.jmi-steps,
	.jmi-footer-grid {
		grid-template-columns: 1fr;
	}

	.jmi-tile-main {
		grid-column: auto;
	}
}

@media (prefers-reduced-motion: reduce) {
	.jmi-home * {
		transition: none !important;
	}
}

/* last quick-access tile fills the rest of its row (classes set in index.html) */
@media (min-width: 1100px) {
	.jmi-tiles .jmi-tile-span2 { grid-column: span 2; }
	.jmi-tiles .jmi-tile-span3 { grid-column: span 3; }
	.jmi-tiles .jmi-tile-span4 { grid-column: span 4; }
}

@media (min-width: 768px) and (max-width: 1099.98px) {
	.jmi-tiles .jmi-tile-span-t2 { grid-column: span 2; }
}
