/*
 * MediChakri home page: compact category cards + 2-column job grid (2026-11).
 * Loaded on the front page only. Own namespace .mcx-*; the featured job card is untouched.
 */

/* ---------- Category cards: 4 per row ---------- */
.mcx-cat4 {
	display: grid;
	grid-template-columns: 1fr;
	gap: 16px;
}

@media (min-width: 560px) {
	.mcx-cat4 {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (min-width: 1280px) {
	.mcx-cat4 {
		grid-template-columns: repeat(4, minmax(0, 1fr));
		gap: 20px;
	}
}

.mcx-c4 {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 18px 20px;
	border: 1px solid rgba(226, 232, 240, 0.9);
	border-radius: 16px;
	background: #fff;
	box-shadow: 0 2px 8px -2px rgba(15, 23, 42, 0.06), 0 1px 3px -1px rgba(15, 23, 42, 0.04);
	color: #0f172a;
	text-decoration: none;
	transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.mcx-c4:hover {
	transform: translateY(-3px);
	border-color: #22c55e;
	box-shadow: 0 18px 36px -22px rgba(22, 163, 74, 0.5), 0 4px 12px -6px rgba(15, 23, 42, 0.1);
}

.mcx-c4-ico {
	display: grid;
	flex: none;
	place-items: center;
	width: 52px;
	height: 52px;
	border-radius: 14px;
	background: #ecfdf5;
	color: #16a34a;
	transition: background 0.3s, color 0.3s;
}

.mcx-c4:hover .mcx-c4-ico {
	background: #16a34a;
	color: #fff;
}

.mcx-c4-txt {
	display: flex;
	flex: 1;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}

.mcx-c4-name {
	overflow-wrap: anywhere;
	font-size: 15px;
	font-weight: 700;
	line-height: 1.3;
	color: #0d2b1d;
}

.mcx-c4-sub {
	font-size: 13px;
	font-weight: 500;
	color: #64748b;
}

.mcx-c4-sub--none {
	color: #94a3b8;
}

.mcx-c4-go {
	display: grid;
	flex: none;
	place-items: center;
	width: 34px;
	height: 34px;
	border: 1px solid #e2e8f0;
	border-radius: 50%;
	background: #fff;
	color: #475569;
	box-shadow: 0 2px 6px -2px rgba(15, 23, 42, 0.12);
	transition: background 0.3s, color 0.3s, border-color 0.3s;
}

.mcx-c4:hover .mcx-c4-go {
	border-color: #0d2b1d;
	background: #0d2b1d;
	color: #fff;
}

/* ---------- Jobs: 2 columns on desktop, featured card spans both ---------- */
.mcx-jobs2 {
	display: grid;
	grid-template-columns: 1fr;
	gap: 16px;
}

.mcx-jobcell {
	min-width: 0;
}

@media (min-width: 1024px) {
	.mcx-jobs2 {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		grid-auto-flow: dense;
		gap: 20px;
	}

	.mcx-jobcell--wide {
		grid-column: 1 / -1;
	}

	/* Half-width cards use the same stacked card layout the site already uses on phones. */
	.mcx-jobcell:not(.mcx-jobcell--wide) a.mc-job-card-list {
		flex-direction: column;
		align-items: stretch;
		gap: 8px;
		padding: 16px;
	}

	.mcx-jobcell:not(.mcx-jobcell--wide) a.mc-job-card-list > span:nth-child(2) {
		display: flex !important;
	}

	.mcx-jobcell:not(.mcx-jobcell--wide) a.mc-job-card-list > span:nth-child(3) {
		display: none !important;
	}
}

@media (min-width: 1024px) {
	/* Equal-height cards in each row; the deadline/button row sits at the bottom. */
	.mcx-jobcell:not(.mcx-jobcell--wide) > article,
	.mcx-jobcell:not(.mcx-jobcell--wide) a.mc-job-card-list {
		height: 100%;
	}

	.mcx-jobcell:not(.mcx-jobcell--wide) a.mc-job-card-list > span:nth-child(2) {
		margin-top: auto;
	}
}
