/* ---------- GLOBAL FONT (Calibri-like, no external load) ---------- */
.mm-students-wrap,
.mm-students-wrap *{
  font-family: Calibri, "Segoe UI Variable", "Segoe UI", Candara, system-ui, -apple-system, Roboto, sans-serif !important;
}



/* GRID */
.mm-students-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:24px;}
.mm-students-wrap{width:100%;}

/* SEARCH */
.mm-students-search{max-width:900px;margin:0 auto 14px;display:flex;gap:10px;align-items:center;flex-wrap:wrap;}
.mm-students-search input[type="search"]{flex:1 1 320px;width:100%;height:46px;padding:0 14px;border-radius:14px;border:1px solid #e7e7e7;background:#fff;outline:none;}
.mm-students-search button{height:46px;padding:0 16px;border-radius:999px !important;border:1px solid #e7e7e7;background-color:#CD4514 !important;cursor:pointer;font-weight:700;color:#fff;-webkit-appearance:none;appearance:none;display:inline-flex;align-items:center;justify-content:center;}
.mm-students-search button:hover{filter:brightness(0.95);}
.mm-students-search a.mm-search-clear{font-size:14px;color:#777;text-decoration:none;padding:10px 10px;white-space:nowrap;}
.mm-students-search a.mm-search-clear:hover{text-decoration:underline;}
.mm-search-result{text-align:center;margin:6px 0 14px;color:#777;font-size:14px;}

/* Keep search input + button on one line on mobile */
@media (max-width:480px){
  .mm-students-search{flex-wrap:nowrap;}
  .mm-students-search input[type="search"], .mm-students-search input[type="text"]{flex:1 1 auto;min-width:0;width:auto;}
  .mm-students-search button, .mm-students-search input[type="submit"]{flex:0 0 auto;white-space:nowrap;}
}

/* PAGINATION */
.mm-pagination{margin-top:18px;display:flex;justify-content:center;gap:8px;flex-wrap:wrap;}
.mm-page{display:inline-flex;align-items:center;justify-content:center;min-width:42px;height:42px;padding:0 12px;border-radius:12px;border:1px solid #e7e7e7;background:#fff;cursor:pointer;font-weight:800;text-decoration:none;color:#333;box-shadow:0 6px 16px rgba(0,0,0,.05);transition:transform .12s ease, box-shadow .12s ease, background-color .12s ease, color .12s ease, border-color .12s ease;}
.mm-page:hover{transform:translateY(-1px);color:#333 !important;background:#fff !important;}
.mm-page.is-active{background:#CD4514 !important;color:#fff !important;border-color:#CD4514 !important;}
.mm-page.is-active:hover{color:#fff !important;background:#CD4514 !important;}
.mm-page.is-disabled{opacity:.45;pointer-events:none;transform:none;box-shadow:none;}
.mm-page.mm-page--label{min-width:auto;padding:0 14px;}

/* ---------- CARD LAYOUT ---------- */
.mm-card{
  background:#fff;
  border-radius:22px;
  overflow:hidden;
  box-shadow:0 18px 40px rgba(0,0,0,0.08);
  display:flex;
  flex-direction:column;
  height:450px;
}

/* Image bigger: 66% */
.mm-card__image{
  background:#f1f1f1;
  flex:0 0 66%;
  overflow:hidden;
}

/* Slightly “zoom out” feel by shifting focus upward (safer than scale) */
.mm-card__image img{
  width:100%;
  height:100%;
  object-fit:cover;
  object-position:50% 35%;
  display:block;
}

/* Body smaller: 34% — 3-row grid prevents overflow */
.mm-card__body.mm-body3{
  flex:0 0 34%;
  padding:8px 12px 10px;
  box-sizing:border-box;

  display:grid;
  grid-template-rows:auto 1fr auto; /* name / meta / levels */
  gap:6px;
  min-height:0;
}

/* ---------- NAME ---------- */
.mm-card .mm-card__name{
  margin:0;
  font-size:15px;
  font-weight:800;
  color:#1f1f1f !important;
  letter-spacing:.15px;
  line-height:1.06;
  text-align:center;

  display:-webkit-box;
  -webkit-box-orient:vertical;
  -webkit-line-clamp:2;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:normal;
}

/* ---------- PART 2: META (aligned) ---------- */
.mm-part--meta{display:flex;align-items:center;min-height:0;max-height:108px;overflow:hidden;}

.mm-meta3{
  width:100%;
  display:grid;
  grid-template-columns: 74px 1fr 74px;
  gap:10px;
  align-items:center;
  min-height:0;
}

.mm-meta3__col--awards{display:flex;align-items:center;justify-content:center;min-height:0;}
.mm-awards-vert{width:100%;display:flex;flex-direction:column;gap:6px;align-items:stretch;min-height:0;}

.mm-award{
  width:100%;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding:6px 6px;
  border-radius:999px;
  border:1px solid #e7e7e7;
  background:#fff;
  box-shadow:0 6px 16px rgba(0,0,0,.05);
}
.mm-award__count{font-size:12px;font-weight:900;color:#222;line-height:1;}
.mm-award__icon{
  width:clamp(15px, 2.0vw, 22px);
  height:clamp(15px, 2.0vw, 22px);
  object-fit:contain;
  display:block;
}
@media (min-width:1025px){
  .mm-award__icon{width:clamp(13px, 1.4vw, 19px);height:clamp(13px, 1.4vw, 19px);}
}

.mm-meta3__col--center{min-width:0;text-align:center;}
.mm-center-details{
  display:flex;
  flex-direction:column;
  gap:2px;
  align-items:center;
  justify-content:center;
  text-align:center;
  min-width:0;
}
.mm-center-details > div{
  font-size:12px;
  line-height:1.1;
  color:#6f6f6f;
  max-width:100%;
  overflow:hidden;
  text-overflow:ellipsis;

  display:-webkit-box;
  -webkit-box-orient:vertical;
  -webkit-line-clamp:2;
}
.mm-center-details .mm-serial{
  font-weight:900;
  color:#8a8a8a;
  -webkit-line-clamp:1;
}

/* ---------- PART 3: LEVELS (safe) ---------- */
.mm-card__levels{
  display:flex;
  align-items:center;
  justify-content:center;
  min-height:38px;
  padding-top:2px;
  padding-bottom:2px;
  overflow:hidden; /* never leak outside */
}

.mm-levels{
  display:flex;
  flex-wrap:wrap;
  justify-content:center;
  gap:6px;
  max-width:100%;
}

.mm-chip{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:6px 10px;
  border-radius:999px;
  font-size:12px;
  font-weight:800;
  line-height:1;
  color:#fff !important;
  background:#9aa0a6;
  white-space:nowrap;
}
.mm-chip--kg{background:#2AA6B8 !important;}
.mm-chip--primary{background:#CD4514 !important;}
.mm-chip--l1{background:#2F5BFF !important;}
.mm-chip--l2{background:#D13B3B !important;}
.mm-chip--l3{background:#2E9B55 !important;}
.mm-levels--empty .mm-empty{color:#bbb;font-weight:700;}

/* Responsive tweaks */
@media (max-width:520px){
  .mm-meta3{grid-template-columns: 68px 1fr 68px;gap:8px;}
  .mm-chip{padding:6px 9px;font-size:11px;}
  .mm-card__body.mm-body3{padding:8px 10px 10px;}
}
@media (max-width:380px){
  .mm-chip{padding:5px 8px;font-size:10.5px;}
}
