/* ===========================================================================
   MyUniDesk — ONLINE UNIVERSITIES listing (cards)
   Desktop 5 per row · tablet 4 / 3 · mobile 2.
   Every size inside a card is in "em", and the card's font-size follows the
   card's own width (container query units), so text, chips, logo, button
   all scale down together automatically — on any screen.
   =========================================================================== */

.mud-ou {
	--ou-primary: var(--mud-primary, #1450F5);
	--ou-accent: #F35000;
	--ou-navy: #14206b;
	--ou-ink: #111318;
	--ou-muted: #6b7280;
	--ou-line: var(--mud-border, #e6e9f0);

	box-sizing: border-box;
	width: 100%;
	max-width: 1300px;
	margin: 0 auto;
	padding: 14px 12px 24px;
	font-family: var(--mud-font, 'Poppins', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif);
	line-height: 1.4;
	color: var(--ou-ink);
}
.mud-ou *, .mud-ou *::before, .mud-ou *::after { box-sizing: border-box; }
.mud-ou :where(ul, h3, p) { margin: 0; padding: 0; }
.mud-ou :where(ul) { list-style: none; }
.mud-ou :where(a) { text-decoration: none; }
.mud-ou :focus-visible { outline: 3px solid var(--ou-primary); outline-offset: 2px; }

/* -------------------------------------------------------------- Grid */
.mud-ou-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));   /* mobile: 2 per row */
	gap: 8px;
	align-items: stretch;
}
.mud-ou-item { min-width: 0; container-type: inline-size; }

/* -------------------------------------------------------------- Card */
.mud-ou-card {
	font-size: 9.5px; /* fallback for very old browsers */
	position: relative; display: flex; flex-direction: column; height: 100%;
	background: #fff; border: 1px solid var(--ou-line); border-radius: .9em;
	overflow: hidden; box-shadow: 0 1px 8px rgba(17, 19, 24, .05);
	transition: border-color .18s, box-shadow .18s, transform .18s;
}
@supports (width: 1cqw) {
	/* card font follows card width: ~12.5px on a wide 5-up desktop card, ~8px on a small phone card */
	.mud-ou-card { font-size: clamp(8px, 4.6cqw, 12.5px); }
}
.mud-ou-card:hover { border-color: var(--ou-primary); box-shadow: 0 10px 26px rgba(20, 80, 245, .14); transform: translateY(-3px); }

/* Cover + logo */
.mud-ou-media {
	position: relative; aspect-ratio: 3.6 / 1;
	background: linear-gradient(120deg, #0b2a6b 0%, var(--ou-primary) 60%, #3f7dfb 100%);
}
.mud-ou-cover { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.mud-ou-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(6, 20, 60, 0) 55%, rgba(6, 20, 60, .28) 100%); pointer-events: none; }
.mud-ou-badge {
	position: absolute; top: .5em; left: 0; z-index: 2;
	max-width: 80%; padding: .2em .65em .2em .55em; border-radius: 0 999px 999px 0;
	background: var(--ou-accent); color: #fff; font-size: .68em; font-weight: 500; letter-spacing: .02em;
	white-space: nowrap; overflow: hidden; text-overflow: ellipsis; box-shadow: 0 3px 10px rgba(0, 0, 0, .18);
}
.mud-ou-logo {
	position: absolute; left: .8em; bottom: -1.6em; z-index: 3;
	width: 3.4em; height: 3.4em; padding: .3em; border-radius: .8em;
	display: flex; align-items: center; justify-content: center;
	background: #fff; border: 1px solid var(--ou-line); box-shadow: 0 .3em 1em rgba(17, 19, 24, .14);
}
.mud-ou-logo img { display: block; max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
.mud-ou-logo-fallback {
	width: 100%; height: 100%; border-radius: .7em; display: flex; align-items: center; justify-content: center;
	font-size: 1.4em; font-weight: 500; color: #fff; background: linear-gradient(135deg, var(--ou-primary), #5c82ff);
}

/* Body */
.mud-ou-body { display: flex; flex-direction: column; flex: 1 1 auto; padding: 2.1em .8em .8em; }
.mud-ou-name {
	margin-bottom: .2em; font-size: 1.1em; font-weight: 500; line-height: 1.25; color: var(--ou-navy); overflow-wrap: anywhere;
	display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.mud-ou-name a { color: inherit; }
.mud-ou-name a::after { content: ""; position: absolute; inset: 0; z-index: 1; } /* whole card clickable */
.mud-ou-name em { font-style: normal; color: var(--ou-primary); }
.mud-ou-card:hover .mud-ou-name a { text-decoration: underline; text-underline-offset: .2em; }
.mud-ou-tag {
	margin-bottom: .45em; font-size: .85em; line-height: 1.35; color: var(--ou-muted);
	display: -webkit-box; -webkit-line-clamp: 1; line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden;
}

.mud-ou-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .3em .55em; margin-bottom: .5em; font-size: .85em; color: #2a2a2a; }
.mud-ou-ico { flex: 0 0 auto; width: 1.05em; height: 1.05em; }
.mud-ou-rating {
	display: inline-flex; align-items: center; gap: .3em; padding: .18em .55em; border-radius: 999px;
	background: #fff4d6; color: #8a5300; font-weight: 400;
}
.mud-ou-rating .mud-ou-ico { color: #f0a500; fill: #f0a500; }
.mud-ou-loc { display: inline-flex; align-items: flex-start; gap: .3em; min-width: 0; }
.mud-ou-loc .mud-ou-ico { margin-top: .12em; color: #3d4250; }
.mud-ou-loc span { overflow-wrap: anywhere; }

.mud-ou-chips { display: flex; flex-wrap: wrap; gap: .3em; margin-bottom: .6em; }
.mud-ou-chip {
	padding: .2em .55em; border-radius: .45em; background: #eaf0ff; color: var(--ou-primary);
	font-size: .72em; font-weight: 400; line-height: 1.2; overflow-wrap: anywhere;
}
/* Approval / accreditation LOGOS (real images) */
.mud-ou-appr {
	display: inline-flex; align-items: center; justify-content: center;
	height: 2.6em; min-width: 2.6em; max-width: 6.5em; padding: .25em .4em;
	background: #fff; border: 1px solid var(--ou-line); border-radius: .5em;
}
.mud-ou-appr img { display: block; height: 100%; width: auto; max-width: 100%; object-fit: contain; }

/* Duration / Fees + button always sit at the bottom, so every card lines up */
.mud-ou-foot { margin-top: auto; }
.mud-ou-stats {
	display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr);
	margin-bottom: .6em; border: 1px solid var(--ou-line); border-radius: .7em; background: #f7f8fc; overflow: hidden;
}
.mud-ou-stat { min-width: 0; padding: .35em .65em; }
.mud-ou-stat + .mud-ou-stat { border-left: 1px solid var(--ou-line); }
.mud-ou-stat small { display: block; margin-bottom: .05em; font-size: .66em; font-weight: 500; letter-spacing: .04em; text-transform: uppercase; color: #8a8f98; }
.mud-ou-stat strong { display: block; font-size: .9em; font-weight: 400; line-height: 1.3; color: var(--ou-ink); overflow-wrap: anywhere; }

.mud-ou-btn {
	position: relative; z-index: 2; display: flex; align-items: center; justify-content: center;
	width: 100%; padding: .6em 1em; border: 1px solid var(--ou-accent); border-radius: .5em;
	background: var(--ou-accent); color: #fff; font-size: .9em; font-weight: 500; letter-spacing: .01em; line-height: 1.2;
	transition: background-color .15s, border-color .15s;
}
.mud-ou-btn:hover, .mud-ou-btn:focus-visible { background: #d94700; border-color: #d94700; color: #fff; }

.mud-ou-empty { padding: 30px 0; text-align: center; color: var(--ou-muted); }

/* ===================================================== Breakpoints */
@media (min-width: 640px) {
	.mud-ou { padding: 18px 20px 30px; }
	.mud-ou-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
}
@media (min-width: 900px) {
	.mud-ou-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
}
@media (min-width: 1200px) {
	.mud-ou-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }   /* desktop: 5 per row */
}
@media (min-width: 1340px) {
	.mud-ou { padding-left: 0; padding-right: 0; }
}

@media (hover: none) {
	.mud-ou-card:hover { transform: none; box-shadow: 0 1px 8px rgba(17, 19, 24, .05); border-color: var(--ou-line); }
}
@media (prefers-reduced-motion: reduce) {
	.mud-ou *, .mud-ou *::before, .mud-ou *::after { transition: none !important; }
}


/* ===========================================================================
   HOW WE WORK + FAQs (after the university cards)
   =========================================================================== */
.mud-sec {
	--s-primary: var(--mud-primary, #1450F5);
	--s-accent: #F35000;
	--s-navy: #14206b;
	--s-ink: #111318;
	--s-muted: #5b6272;
	--s-line: #e3e8f2;
	box-sizing: border-box; width: 100%;
	font-family: var(--mud-font, 'Poppins', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif);
	color: var(--s-ink); line-height: 1.6;
}
.mud-sec *, .mud-sec *::before, .mud-sec *::after { box-sizing: border-box; }
.mud-sec :where(h2, h3, p, ol) { margin: 0; padding: 0; }
.mud-sec :where(ol) { list-style: none; }
.mud-sec-inner { width: 100%; max-width: 1300px; margin: 0 auto; padding: 0 20px; }
.mud-sec-head { max-width: 720px; margin: 0 auto 44px; text-align: center; }
.mud-eyebrow { display: inline-block; margin-bottom: 12px; font-size: 13px; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; color: var(--s-accent); }
.mud-sec-title { font-size: clamp(24px, 3.2vw, 34px); font-weight: 500; line-height: 1.25; color: var(--s-navy); }
.mud-sec-sub { margin-top: 12px; font-size: 16px; color: var(--s-muted); }
.mud-sec :focus-visible { outline: 3px solid var(--s-primary); outline-offset: 3px; }

/* ---------- How we work: numbered process rail ---------- */
.mud-how { padding: 72px 0; margin-top: 24px; background: #f5f8ff; border-top: 1px solid var(--s-line); border-bottom: 1px solid var(--s-line); }
.mud-how-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px; counter-reset: none; }
.mud-how-step { position: relative; }
.mud-how-num {
	position: relative; z-index: 1; display: flex; align-items: center; justify-content: center;
	width: 48px; height: 48px; margin-bottom: 20px; border-radius: 50%;
	background: #fff; border: 2px solid var(--s-primary); color: var(--s-primary);
	font-size: 15px; font-weight: 500; letter-spacing: .02em;
}
.mud-how-step:not(:last-child)::after { /* connector to the next step */
	content: ""; position: absolute; top: 23px; left: 62px; right: -14px; height: 2px;
	background: repeating-linear-gradient(90deg, #b9c8f5 0 6px, transparent 6px 12px);
}
.mud-how-title { margin-bottom: 8px; font-size: 18px; font-weight: 500; line-height: 1.35; color: var(--s-navy); }
.mud-how-text { font-size: 15px; color: var(--s-muted); }

/* ---------- FAQs ---------- */
.mud-faq { padding: 72px 0 110px; }   /* generous space between the FAQs and the footer */
.mud-faq-inner { max-width: 900px; }
.mud-faq-list { border: 1px solid var(--s-line); border-radius: 14px; background: #fff; overflow: hidden; }
.mud-faq-item + .mud-faq-item { border-top: 1px solid var(--s-line); }
.mud-faq.is-collapsed .mud-faq-item.is-extra { display: none; }
.mud-faq-item summary {
	display: flex; align-items: center; justify-content: space-between; gap: 16px;
	padding: 18px 22px; cursor: pointer; list-style: none; transition: background-color .15s;
}
.mud-faq-item summary::-webkit-details-marker { display: none; }
.mud-faq-item summary:hover { background: #f8faff; }
.mud-faq-q { font-size: 16px; font-weight: 500; line-height: 1.45; color: var(--s-navy); }
.mud-faq-icon { position: relative; flex: 0 0 auto; width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--s-line); background: #fff; transition: background-color .15s, border-color .15s; }
.mud-faq-icon::before, .mud-faq-icon::after { content: ""; position: absolute; top: 50%; left: 50%; width: 10px; height: 1.5px; background: var(--s-primary); transform: translate(-50%, -50%); transition: transform .2s; }
.mud-faq-icon::after { transform: translate(-50%, -50%) rotate(90deg); }
.mud-faq-item[open] .mud-faq-icon { background: var(--s-primary); border-color: var(--s-primary); }
.mud-faq-item[open] .mud-faq-icon::before, .mud-faq-item[open] .mud-faq-icon::after { background: #fff; }
.mud-faq-item[open] .mud-faq-icon::after { transform: translate(-50%, -50%) rotate(0deg); }
.mud-faq-a { padding: 0 22px 20px; }
.mud-faq-a p { max-width: 760px; font-size: 15px; line-height: 1.75; color: var(--s-muted); }

.mud-faq-actions { display: flex; justify-content: center; margin-top: 26px; }
.mud-faq-more {
	display: inline-flex; align-items: center; gap: 8px; padding: 10px 22px; border-radius: 8px;
	border: 1px solid var(--s-accent); background: #fff; color: var(--s-accent);
	font: inherit; font-size: 15px; font-weight: 500; cursor: pointer; transition: background-color .15s, color .15s;
}
.mud-faq-more[hidden] { display: none; }
.mud-faq-more:hover, .mud-faq-more:focus-visible { background: var(--s-accent); color: #fff; }
.mud-faq-more svg { transition: transform .2s; }
.mud-faq-more[aria-expanded="true"] svg { transform: rotate(180deg); }

/* ---------- Responsive ---------- */
@media (max-width: 991px) {
	.mud-how-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 36px 28px; }
	.mud-how-step:nth-child(2)::after { display: none; }
}
@media (max-width: 640px) {
	.mud-how { padding: 48px 0; }
	.mud-sec-head { margin-bottom: 30px; }
	.mud-how-steps { grid-template-columns: 1fr; gap: 0; }
	.mud-how-step { padding: 0 0 30px 68px; }
	.mud-how-step:last-child { padding-bottom: 0; }
	.mud-how-num { position: absolute; top: 0; left: 0; margin: 0; }
	.mud-how-step:not(:last-child)::after, .mud-how-step:nth-child(2)::after {
		display: block; top: 52px; bottom: 4px; left: 23px; right: auto; width: 2px; height: auto;
		background: repeating-linear-gradient(180deg, #b9c8f5 0 6px, transparent 6px 12px);
	}
	.mud-how-title { padding-top: 10px; }
	.mud-faq { padding: 48px 0 80px; }
	.mud-faq-item summary { padding: 15px 16px; }
	.mud-faq-a { padding: 0 16px 16px; }
	.mud-faq-q { font-size: 15px; }
}
@media (prefers-reduced-motion: reduce) {
	.mud-sec *, .mud-sec *::before, .mud-sec *::after { transition: none !important; }
}
