/* ============================================================
   MATRICBASE — UNIVERSITY PROFILE TEMPLATE (v1)
   Scope: university.html only. Reuses design tokens/components
   from home-redesign.css (--mb-* variables, .mb-btn, .mb-journey,
   .mb-step, .mb-eyebrow).
   ============================================================ */

.mb-university{
  background: var(--mb-bg);
  color: var(--mb-ink);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

.mb-university *{ box-sizing: border-box; }

.mb-university .mb-shell{
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Active step on the journey tracker — same pattern as Gauteng page */
.mb-university .mb-step-current .mb-step-num{
  background: var(--mb-gold);
  border-color: var(--mb-gold);
  color: var(--mb-ink);
}
.mb-university .mb-step-current .mb-step-label{
  color: #FBF9F2;
}

/* ---------- 1. University header ---------- */

.mb-uni-header{
  padding: 40px 0 32px;
}

.mb-uni-header-inner{
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.mb-uni-header-logo{
  width: 56px;
  height: 56px;
  border-radius: 10px;
  border: 1px solid var(--mb-line);
  background: #fff;
  object-fit: contain;
  padding: 6px;
  flex-shrink: 0;
}

.mb-uni-header h1{
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(24px, 5.5vw, 34px);
  font-weight: 600;
  line-height: 1.15;
  margin: 0;
}

.mb-uni-header-location{
  margin-top: 5px;
  font-size: 13px;
  color: var(--mb-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}
.mb-uni-header-location i{ color: var(--mb-green); font-size: 11px; }

/* Hero photo — sits below the name/location, above the description.
   Hidden automatically (via JS) when a university has no heroImage
   set yet, so the header just falls back to logo + text. */
.mb-uni-hero{
  margin-top: 20px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--mb-line);
  background: var(--mb-line);
}

.mb-uni-hero img{
  display: block;
  width: 100%;
  height: clamp(200px, 38vw, 380px);
  object-fit: cover;
}

.mb-uni-header-desc{
  margin-top: 20px;
  font-size: 15px;
  line-height: 1.6;
  color: var(--mb-body);
  max-width: 58ch;
}

.mb-uni-header-cta{
  margin-top: 20px;
}

/* ---------- 2 & 3. Courses ---------- */

.mb-courses-section{
  padding: 8px 0 40px;
}

.mb-courses-intro{
  max-width: 56ch;
  margin-bottom: 24px;
}

.mb-courses-intro h2{
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(21px, 4.5vw, 27px);
  font-weight: 600;
}

.mb-courses-intro p{
  margin-top: 8px;
  color: var(--mb-body);
  font-size: 14.5px;
  line-height: 1.6;
}

.mb-faculty-group{
  margin-bottom: 28px;
}

.mb-faculty-label{
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--mb-green-dark);
  font-weight: 600;
  margin-bottom: 12px;
}

.mb-course-grid{
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

@media (min-width: 700px){
  .mb-course-grid{ grid-template-columns: repeat(2, 1fr); }
}

.mb-course-card{
  background: var(--mb-surface);
  border: 1px solid var(--mb-line);
  border-radius: var(--mb-radius-md);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mb-course-name{
  font-family: "Fraunces", Georgia, serif;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.25;
}

.mb-course-qual{
  font-size: 12px;
  color: var(--mb-muted);
  margin-top: 2px;
}

.mb-course-aps{
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-family: "IBM Plex Mono", monospace;
}

.mb-course-aps .num{
  font-size: 22px;
  font-weight: 600;
  color: var(--mb-green-dark);
}

.mb-course-aps .label{
  font-size: 12px;
  color: var(--mb-muted);
}

.mb-course-aps.is-composite .label{
  font-size: 12.5px;
  color: var(--mb-gold);
  font-weight: 600;
  font-family: "Inter", sans-serif;
}

.mb-course-subjects{
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 13px;
  color: var(--mb-body);
}

.mb-course-subjects .row{
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 4px 10px;
}

.mb-course-subjects .row .pct{
  font-family: "IBM Plex Mono", monospace;
  color: var(--mb-green-dark);
  font-weight: 600;
  text-align: right;
}

.mb-course-note{
  font-size: 12px;
  color: var(--mb-muted);
  line-height: 1.5;
}

.mb-course-source{
  font-size: 11.5px;
}
.mb-course-source a{
  color: var(--mb-muted);
  text-decoration: underline;
}

/* Eligibility area */

.mb-elig-check{
  margin-top: auto;
  padding-top: 4px;
}

.mb-elig-btn{
  width: 100%;
  font-size: 13.5px;
  font-weight: 600;
  padding: 10px 16px;
  border-radius: var(--mb-radius-sm);
  border: 1.5px solid var(--mb-ink);
  background: transparent;
  color: var(--mb-ink);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.mb-elig-btn:hover{
  background: var(--mb-ink);
  color: #fff;
}
.mb-elig-btn:active{
  background: var(--mb-ink);
  color: #fff;
  transform: scale(0.97);
  transition: background 0.1s ease, color 0.1s ease, transform 0.1s ease;
}

.mb-elig-result{
  display: none;
  flex-direction: column;
  gap: 4px;
  font-size: 13.5px;
  padding: 10px 14px;
  border-radius: var(--mb-radius-sm);
  line-height: 1.4;
}

.mb-elig-result.show{ display: flex; }

.mb-elig-label{ font-weight: 600; }
.mb-elig-detail{ font-weight: 400; font-size: 12.5px; opacity: 0.9; }

.mb-elig-result a{ font-weight: 600; text-decoration: underline; color: inherit; }

.mb-elig-meets{ background: var(--mb-green-tint); color: var(--mb-green-dark); }
.mb-elig-close{ background: var(--mb-gold-tint); color: var(--mb-gold); }
.mb-elig-below{ background: #FBEAE6; color: #B4402C; }
.mb-elig-info{ background: var(--mb-line); color: var(--mb-body); font-weight: 600; }

/* ---------- APS input bar (sticky-ish, sits above course grid) ---------- */

.mb-aps-bar{
  background: var(--mb-ink);
  border-radius: var(--mb-radius-lg);
  padding: 20px 22px;
  margin-bottom: 28px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  color: #FBF9F2;
}

.mb-aps-bar-copy{ flex: 1; min-width: 220px; }

.mb-aps-bar-copy strong{
  font-family: "Fraunces", serif;
  font-size: 16px;
  display: block;
  margin-bottom: 3px;
}

.mb-aps-bar-copy span{
  font-size: 12.5px;
  color: rgba(251,249,242,0.7);
}

.mb-aps-bar-input{
  display: flex;
  align-items: center;
  gap: 8px;
}

.mb-aps-bar-input input{
  width: 78px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 18px;
  font-weight: 600;
  text-align: center;
  padding: 10px 8px;
  border-radius: var(--mb-radius-sm);
  border: 1.5px solid rgba(251,249,242,0.3);
  background: rgba(251,249,242,0.06);
  color: #FBF9F2;
}
.mb-aps-bar-input input:focus{
  outline: none;
  border-color: var(--mb-gold);
}

.mb-aps-bar-input label{
  font-size: 12px;
  color: rgba(251,249,242,0.7);
}

/* ---------- 5. Application section (secondary, low emphasis) ---------- */

.mb-apply-section{
  padding: 8px 0 56px;
}

.mb-apply-card{
  background: var(--mb-surface);
  border: 1px solid var(--mb-line);
  border-radius: var(--mb-radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.mb-apply-card h3{
  font-family: "Fraunces", Georgia, serif;
  font-size: 18px;
  font-weight: 600;
}

.mb-apply-meta{
  font-size: 13px;
  color: var(--mb-body);
  line-height: 1.6;
}

.mb-apply-links{
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 6px;
}

.mb-apply-links a{
  font-size: 13px;
  font-weight: 600;
  color: var(--mb-green-dark);
  text-decoration: none;
  padding: 9px 14px;
  border: 1px solid var(--mb-line);
  border-radius: var(--mb-radius-sm);
  transition: border-color 0.15s ease, background 0.15s ease;
}

.mb-apply-links a:hover{
  border-color: var(--mb-green);
  background: var(--mb-green-tint);
}

.mb-apply-links a:active{
  border-color: var(--mb-green);
  background: var(--mb-green-tint);
  transform: scale(0.96);
  transition: border-color 0.1s ease, background 0.1s ease, transform 0.1s ease;
}

/* ---------- Guidance disclaimer ---------- */

.mb-guidance-note{
  font-size: 12px;
  color: var(--mb-muted);
  line-height: 1.55;
  max-width: 62ch;
  margin-top: 10px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce){
  .mb-elig-btn{ transition: none; }
}
