/* Institution Management frontend styles */
.im-directory {
	--im-accent: #111;
	--im-text: #111;
	--im-muted: #222;
	--im-border: #bdbdbd;
	--im-card-border: #9e9e9e;
	--im-card-bg: #fff;
	--im-gap: 16px;
	width: 100%;
	max-width: 100%;
	position: relative;
	color: var(--im-text);
	font-family: inherit;
	box-sizing: border-box;
}
.im-directory *,
.im-directory *::before,
.im-directory *::after {
	box-sizing: border-box;
}
.im-slider-shell {
	position: relative;
	display: flex;
	align-items: stretch;
	gap: 10px;
	width: 100%;
}
.im-directory .im-viewport {
	flex: 1 1 auto;
	width: 100%;
	min-width: 0;
	/* Keep 1px room so card borders are not clipped by overflow. */
	overflow: hidden;
	padding: 1px;
}
.im-directory .im-track {
	display: flex;
	align-items: stretch;
	gap: var(--im-gap);
	transition: transform .45s ease;
	will-change: transform;
	/* Extra bottom space avoids subpixel border clipping while sliding. */
	padding-bottom: 1px;
}
.im-directory.im-grid .im-slider-shell {
	display: block;
}
.im-directory.im-grid .im-viewport {
	overflow: visible;
	padding: 0;
}
.im-directory.im-grid .im-track {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: var(--im-gap);
	padding-bottom: 0;
	transform: none !important;
}
.im-card {
	flex: 0 0 calc(25% - 12px);
	min-width: 0;
	display: flex;
	flex-direction: column;
	height: auto;
	background: var(--im-card-bg);
	border: 1px solid var(--im-card-border);
	border-radius: 2px;
	box-shadow: none;
	text-align: center;
	overflow: visible;
}
.im-card-image {
	width: 100%;
	padding: 14px 14px 0;
}
.im-profile-image {
	display: block;
	width: 100%;
	max-width: 100%;
	height: auto;
	aspect-ratio: 3 / 4;
	margin: 0 auto;
	object-fit: cover;
	object-position: center top;
	background: #f3f3f3;
	border: 1px solid #cfcfcf;
}
.im-image-placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	aspect-ratio: 3 / 4;
	margin: 0 auto;
	background: #f3f3f3;
	border: 1px solid #cfcfcf;
	color: #666;
	font-size: clamp(24px, 6vw, 36px);
	font-weight: 700;
}
.im-card-content {
	flex: 1 1 auto;
	padding: 12px 12px 16px;
	display: flex;
	flex-direction: column;
	align-items: center;
}
.im-name {
	margin: 0 0 6px;
	font-size: clamp(15px, 1.5vw, 18px);
	line-height: 1.35;
	font-weight: 700;
	color: #111;
	word-break: break-word;
}
.im-designation {
	margin: 0 0 6px;
	font-size: clamp(13px, 1.3vw, 15px);
	line-height: 1.4;
	font-weight: 400;
	color: #111;
	word-break: break-word;
}
.im-detail {
	margin: 4px 0 0;
	font-size: clamp(13px, 1.3vw, 15px);
	line-height: 1.45;
	color: #111;
	overflow-wrap: anywhere;
}
.im-detail a {
	color: inherit;
	text-decoration: none;
}
.im-detail a:hover {
	text-decoration: underline;
}
.im-detail-label {
	font-weight: 600;
	color: #333;
}
.im-phone {
	font-weight: 400;
}
.im-description {
	margin-top: 10px;
	font-size: 14px;
	line-height: 1.6;
	color: #444;
	text-align: left;
	width: 100%;
}
.im-description > :last-child { margin-bottom: 0; }
.im-status {
	display: inline-block;
	margin-top: 8px;
	padding: 3px 9px;
	border-radius: 2px;
	font-size: 11px;
	line-height: 1.4;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .03em;
}
.im-status-active { background: #e8f7ee; color: #167342; }
.im-status-expired { background: #fff0ef; color: #b42318; }
.im-nav {
	flex: 0 0 auto;
	align-self: center;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	padding: 0;
	border: 0;
	border-radius: 2px;
	background: #111;
	color: #fff;
	font: inherit;
	font-size: 16px;
	line-height: 1;
	cursor: pointer;
	z-index: 2;
}
.im-nav:hover:not(:disabled) {
	background: #000;
}
.im-nav:disabled {
	opacity: .35;
	cursor: not-allowed;
}
.im-pagination {
	display: flex;
	justify-content: center;
	align-items: center;
	flex-wrap: wrap;
	gap: 7px;
	margin-top: 14px;
}
.im-dot {
	width: 8px;
	height: 8px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: #c8d0d9;
	cursor: pointer;
}
.im-dot.is-active {
	width: 22px;
	border-radius: 8px;
	background: #111;
}
.im-empty {
	padding: 14px;
	text-align: center;
	color: #666;
}

/* Large tablets / small desktops */
@media (max-width: 1100px) {
	.im-directory {
		--im-gap: 14px;
	}
	.im-directory.im-grid .im-track {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
	.im-card-image {
		padding: 12px 12px 0;
	}
	.im-card-content {
		padding: 10px 10px 14px;
	}
}

/* Tablets */
@media (max-width: 900px) {
	.im-directory {
		--im-gap: 12px;
	}
	.im-slider-shell {
		gap: 8px;
	}
	.im-directory.im-grid .im-track {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
	.im-nav {
		width: 32px;
		height: 32px;
		font-size: 15px;
	}
}

/* Large phones */
@media (max-width: 700px) {
	.im-directory {
		--im-gap: 10px;
	}
	.im-slider-shell {
		gap: 6px;
	}
	.im-card-image {
		padding: 10px 10px 0;
	}
	.im-card-content {
		padding: 10px 8px 12px;
	}
}

/* Phones */
@media (max-width: 600px) {
	.im-directory {
		--im-gap: 10px;
	}
	.im-directory.im-grid .im-track {
		grid-template-columns: 1fr;
		max-width: 360px;
		margin: 0 auto;
	}
	.im-slider-shell {
		gap: 0;
		padding: 0 36px;
	}
	.im-directory .im-viewport {
		padding: 1px;
	}
	.im-nav {
		position: absolute;
		top: 50%;
		transform: translateY(-50%);
		width: 30px;
		height: 30px;
		font-size: 14px;
	}
	.im-prev {
		left: 0;
	}
	.im-next {
		right: 0;
	}
	.im-card-image {
		padding: 12px 12px 0;
	}
	.im-card-content {
		padding: 10px 10px 14px;
	}
}

/* Small phones */
@media (max-width: 400px) {
	.im-slider-shell {
		padding: 0 32px;
	}
	.im-nav {
		width: 28px;
		height: 28px;
		font-size: 13px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.im-directory .im-track {
		transition: none;
	}
}
