/* ============================================================
   ITS Education Asia — Student Results Page
   css/style.css
   ============================================================ */

/* ─── Reset & Base ─────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary:   #0077CC;
  --primary-d: #005FA3;
  --accent:    #00C9A7;
  --dark:      #0D1B2A;
  --mid:       #1E3A5F;
  --text:      #2C3E50;
  --muted:     #6B7C93;
  --bg:        #F5F7FA;
  --white:     #F5F7FA;
  --border:    #E3EAF3;
  --radius:    12px;
  --shadow:    0 4px 24px rgba(0,50,100,.08);
  --shadow-lg: 0 8px 40px rgba(0,50,100,.14);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Poppins';
  background: #F5F7FA;
  color: var(--text);
  line-height: 1.7;
  overflow-x: hidden;
}

a { color: var(--primary); text-decoration: none; transition: color .2s; }
a:hover { color: var(--accent); }


/* ─── BUTTONS ───────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: .85rem;
  font-weight: 600;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all .22s;
  white-space: nowrap;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-d); color: #fff; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,119,204,.3); }
.btn-outline { background: transparent; border-color: var(--primary); color: var(--primary); }
.btn-outline:hover { background: var(--primary); color: #fff; }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: #00b095; color: #fff; }
.btn-ghost { background: rgba(255,255,255,.12); color: #fff; border-color: rgba(255,255,255,.25); }
.btn-ghost:hover { background: rgba(255,255,255,.22); color: #fff; }

/* ─── PAGE BANNER ─────────────────────────────────────── */
.page-banner {
  background: #003760;
  padding: 28px 24px 22px;
  text-align: center;
}
.page-banner-inner {
  max-width: 1200px;
  margin: auto;
}
.page-banner h1 {
  font-size: clamp(1.1rem, 2.5vw, 1.45rem);
  font-weight: 700;
  letter-spacing: .06em;
  color: #2e96db;
  text-transform: uppercase;
  line-height: 1.3;
  margin-bottom: 14px;
}
.banner-sub {
  font-size: .9rem;
  color: rgba(255,255,255,.75);
  margin-bottom: 8px;
}
.banner-sub a {
  color: #5bb8f5;
  font-weight: 500;
}
.banner-sub a:hover { color: var(--accent); }
.banner-links {
  font-size: .88rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.banner-links a { color: #2e96db; }
.banner-links a:hover { color: var(--accent); }
.banner-links span { color: rgba(255,255,255,.3); }

/* ─── SECTION WRAPPERS ──────────────────────────────── */
section { padding: 48px 24px; }
section.alt { background: transparent; }
.section-inner { max-width: 1200px; margin: auto; }

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 10px;
}
.section-label::before {
  content: '';
  display: block;
  width: 20px;
  height: 2px;
  background: var(--primary);
  border-radius: 2px;
}
.section-title {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 800;
  letter-spacing: -.03em;
  color: #003760;
  margin-bottom: 12px;
  line-height: 1.2;
}
.section-desc {
  color: var(--muted);
  max-width: 560px;
  font-size: .95rem;
}
.section-head { margin-bottom: 32px; }

/* ─── RESULTS TABLE ─────────────────────────────────── */
.results-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 32px;
}
.result-block {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: box-shadow .2s;
}
.result-block:hover { box-shadow: var(--shadow-lg); }
.result-block-header {
  background: #003760;
  color: #fff;
  padding: 14px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.result-block-header h3 { font-size: 1.1rem; font-weight: 700; }
.result-block-header .entries-badge {
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.2);
  font-size: .78rem;
  padding: 4px 10px;
  border-radius: 100px;
  color: rgba(255,255,255,.8);
}
.result-grades {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}
.grade-item-container {
    position: relative;
    text-align: center;
}
.grade-item {
    padding: 18px 12px;
    text-align: center;
    border-right: 1px solid var(--border);
    width: 100px;
    height: 100px;
    border-radius: 50%;
    flex-shrink: 0;
    background: conic-gradient(var(--clr) 0% var(--pct), #E3EAF3 var(--pct) 100%);
    position: relative;
    margin: 10px 20px 5px 20px;
    align-content: center;
}
.grade-item::after {
    content: '';
    position: absolute;
    inset: 10px;
    border-radius: 50%;
    background: #fff;
}
.grade-item:last-child { border-right: none; }
.grade-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 4px;
  border-radius: 2px;
}
.grade-bar.green  { background: #22C55E; }
.grade-bar.yellow { background: #EAB308; }
.grade-bar.red    { background: #EF4444; }
.grade-pct {
  font-size: 1.7rem;
  font-weight: 800;
  letter-spacing: -.04em;
  line-height: 1;
  z-index: 999;
    position: inherit;
}
.grade-pct.green  { color: #16A34A; }
.grade-pct.yellow { color: #CA8A04; }
.grade-pct.red    { color: #DC2626; }
.grade-label { font-size: .72rem; color: var(--muted); margin-top: 6px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.grade-range {
  display: inline-block;
  margin: 5px auto;
  /* background: #EEF2F7;
  border: 1px solid var(--border); */
  font-size: .7rem;
  font-weight: 700;
  /* padding: 2px 8px; */
  /* border-radius: 100px; */
  color: var(--text);
}

/* ─── CONTEXT BLOCK ────────────────────────────────── */
.context-block {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 36px;
  align-items: start;
  margin-bottom: 28px;
}
.context-block .text-col p {
  font-size: .9rem;
  color: var(--text);
  line-height: 1.75;
  margin-bottom: 10px;
}
.context-block .text-col p:last-child { margin-bottom: 0; }
.context-block .text-col .course-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}
.context-block .text-col .course-links a {
  font-size: .82rem;
  font-weight: 600;
  color: var(--primary);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 4px 12px;
  background: #fff;
  transition: background .2s, border-color .2s;
}
.context-block .text-col .course-links a:hover {
  background: #EBF4FF;
  border-color: var(--primary);
}

/* Two-photo stack in results section */
.photos-col {
  display: flex;
  flex-direction: column;
}
.photos-stack {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  align-items: start;
}
.photo-item img {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  display: block;
}
.photo-item-caption {
  text-align: center;
  font-size: .78rem;
  font-weight: 600;
  color: var(--accent);
  margin-top: 8px;
  line-height: 1.4;
}
.photo-item-caption i { margin-right: 4px; }

/* ─── INFO BAND ─────────────────────────────────────── */
.info-band {
  background: #003760;
  border-radius: var(--radius);
  padding: 32px 36px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 32px;
  align-items: center;
  margin-top: 16px;
}
.info-band h3 { font-size: 1.15rem; font-weight: 700; margin-bottom: 8px; color: #fff; }
.info-band p  { color: rgba(255,255,255,.7); font-size: .87rem; line-height: 1.7; }
.info-links   { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.pill-link {
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.2);
  color: rgba(255,255,255,.85);
  font-size: .78rem;
  font-weight: 600;
  padding: 5px 13px;
  border-radius: 100px;
  transition: background .2s, color .2s;
}
.pill-link:hover { background: rgba(255,255,255,.2); color: #fff; }

/* ─── QS STATS ───────────────────────────────────────── */
.qs-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 36px;
}
.qs-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 20px;
  display: flex;
  align-items: center;
  gap: 20px;
  box-shadow: var(--shadow);
}
/* CSS-only arc donut */
.qs-donut {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  flex-shrink: 0;
  background: conic-gradient(var(--clr) 0% var(--pct), #E3EAF3 var(--pct) 100%);
  position: relative;
}
.qs-donut::after {
  content: '';
  position: absolute;
  inset: 10px;
  border-radius: 50%;
  background: #fff;
}
.qs-num {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--dark);
  letter-spacing: -.03em;
  line-height: 1;
}
.qs-label {
  font-size: .72rem;
  color: var(--muted);
  margin-top: 3px;
}
.qs-rank {
  font-size: .8rem;
  font-weight: 700;
  color: var(--primary);
  margin-top: 2px;
}

/* ─── SUBJECT BREAKDOWN ───────────────────────────── */
.subject-row {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  margin-bottom: 32px;
  box-shadow: var(--shadow);
}
.sub-section-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 6px;
}
.sub-section-desc {
  font-size: .85rem;
  color: var(--muted);
  margin-bottom: 20px;
}
.sub-section-title-row { margin-bottom: 16px; }
.subject-bars { display: flex; flex-direction: column; gap: 12px; margin-bottom: 16px; }
.subject-bar-item {}
.subject-bar-label {
  display: flex;
  justify-content: space-between;
  font-size: .82rem;
  margin-bottom: 5px;
  color: var(--text);
}
.subject-bar-label strong { font-weight: 700; color: var(--dark); }
.subject-bar-track {
  height: 8px;
  background: var(--bg);
  border-radius: 100px;
  overflow: hidden;
}
.subject-bar-fill {
  height: 100%;
  border-radius: 100px;
  transition: width .8s ease;
}
.subject-note {
  font-size: .78rem;
  color: var(--muted);
  border-top: 1px solid var(--border);
  padding-top: 14px;
  margin-top: 4px;
  line-height: 1.6;
}

/* ─── UNIVERSITY ALPHA LIST ─────────────────────────────── */
.uni-alpha-list {
  columns: 3;
  column-gap: 32px;
  list-style: none;
  padding: 0;
  margin: 8px 0 0;
}
.uni-alpha-list li {
  break-inside: avoid;
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
  font-size: .9rem;
}
.uni-alpha-list li a {
  color: var(--text);
  text-decoration: none;
  transition: color .2s;
}
.uni-alpha-list li a:hover {
  color: var(--primary);
  text-decoration: underline;
}
.uni-hidden { display: none !important; }

/* ─── NOTICE STRIP ───────────────────────────────── */
.notice-strip {
  background: #fff;
  border: 1px solid var(--border);
  border-left: 3px solid var(--primary);
  border-radius: var(--radius);
  padding: 18px 24px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 28px;
}
.notice-strip i { color: var(--primary); font-size: 1rem; margin-top: 3px; flex-shrink: 0; }
.notice-strip p { font-size: .875rem; color: var(--text); line-height: 1.65; }

/* ─── DIVIDER ────────────────────────────────────────── */
.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
  margin: 0;
}

/* ─── ANIMATIONS ────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fade-up { animation: fadeUp .6s ease both; }
.fade-up-d1 { animation-delay: .1s; }
.fade-up-d2 { animation-delay: .2s; }
.fade-up-d3 { animation-delay: .3s; }
.fade-up-d4 { animation-delay: .4s; }

/* ─── RESPONSIVE ─────────────────────────────────────── */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; gap: 28px; }
  .hero-stats { grid-template-columns: 1fr 1fr; }
  .results-grid { grid-template-columns: 1fr; }
  .context-block { grid-template-columns: 1fr; gap: 28px; }
  .photos-stack { grid-template-columns: 1fr 1fr; }
  .info-band { grid-template-columns: 1fr; gap: 18px; }
  .qs-stats { grid-template-columns: 1fr; gap: 12px; }
  .uni-alpha-list { columns: 2; }
}

@media (max-width: 560px) {
  section { padding: 32px 16px; }
  .hero { padding: 36px 16px 48px; }
  .hero-stats { grid-template-columns: 1fr 1fr; gap: 8px; }
  .stat-num { font-size: 1.6rem; }
  .filter-tabs { display: none; }
  .qs-stats { grid-template-columns: 1fr 1fr; }
  .uni-alpha-list { columns: 1; }
}

@media (max-width: 480px) {
  .photos-stack { grid-template-columns: 1fr; }
}
