/* ==========================================================================
   TISF — "AI for Human Intelligence: Science, Solutions and Society"
   Bootstrap 5 theme. Palette taken from the Mahidol Wittayanusorn School
   crest (royal blue + gold) with a cyan "AI signal" accent.
   ========================================================================== */
:root {
  --mw-navy: #0b1a4a;
  --mw-navy-2: #10245f;
  --mw-blue: #1b3a8c;
  --mw-gold: #f2b826;
  --mw-gold-2: #ffd666;
  --ai-cyan: #4fd1ff;
  --ai-violet: #8b7cff;
  --ink: #18213d;
  --muted: #5b6585;
  --surface: #f5f7fc;
  --card: #ffffff;
  --line: rgba(27, 58, 140, .12);

  --bs-primary: var(--mw-blue);
  --bs-primary-rgb: 27, 58, 140;
  --bs-body-font-family: "Inter", "Sarabun", system-ui, sans-serif;
  --bs-body-color: var(--ink);
  --bs-link-color: var(--mw-blue);
  --bs-link-color-rgb: 27, 58, 140;
  --bs-link-hover-color: #142c6b;
}

html { scroll-behavior: smooth; scroll-padding-top: 72px; }
html { overflow-x: clip; }
body { background: var(--surface); overflow-x: hidden; overflow-x: clip; }
h1, h2, h3, h4, h5, .display-font { font-family: "Space Grotesk", "Sarabun", sans-serif; letter-spacing: -.01em; }
.thai { font-family: "Sarabun", sans-serif; }
.text-gold { color: var(--mw-gold) !important; }
.text-cyan { color: var(--ai-cyan) !important; }

/* ---------- Buttons ---------- */
.btn { border-radius: 999px; font-weight: 500; padding: .65rem 1.4rem; transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease; }
.btn:hover { transform: translateY(-2px); }
.btn-gold { background: var(--mw-gold); color: var(--mw-navy); border: 0; }
.btn-gold:hover, .btn-gold:focus { background: var(--mw-gold-2); color: var(--mw-navy); box-shadow: 0 10px 30px -10px rgba(242, 184, 38, .7); }
.btn-glass { background: rgba(255, 255, 255, .08); color: #fff; border: 1px solid rgba(255, 255, 255, .25); backdrop-filter: blur(6px); }
.btn-glass:hover, .btn-glass:focus { background: rgba(255, 255, 255, .18); color: #fff; }
.btn-primary { background: var(--mw-blue); border-color: var(--mw-blue); }
.btn-primary:hover { background: #142c6b; border-color: #142c6b; }

/* ---------- Navbar ---------- */
#mainNav { padding: 1rem 0; transition: padding .3s ease, background-color .3s ease, box-shadow .3s ease; }
#mainNav.scrolled, #mainNav.solid { background: rgba(11, 26, 74, .92); backdrop-filter: blur(10px); padding: .45rem 0; box-shadow: 0 6px 24px rgba(0, 0, 0, .18); }
#mainNav .brand-logo { height: 42px; width: 42px; background: #fff; border-radius: 50%; padding: 2px; transition: height .3s, width .3s; }
#mainNav.scrolled .brand-logo { height: 36px; width: 36px; }
#mainNav .brand-text { font-family: "Space Grotesk", sans-serif; font-weight: 700; font-size: 1.3rem; letter-spacing: .02em; }
#mainNav .nav-link { color: rgba(255, 255, 255, .8); font-size: .92rem; position: relative; }
#mainNav .nav-link:not(.btn)::after { content: ""; position: absolute; left: .5rem; right: .5rem; bottom: .2rem; height: 2px; background: var(--mw-gold); transform: scaleX(0); transform-origin: left; transition: transform .25s ease; }
#mainNav .nav-link:not(.btn):hover::after, #mainNav .nav-link.active::after { transform: scaleX(1); }
#mainNav .nav-link:hover, #mainNav .nav-link.active { color: #fff; }
#mainNav .nav-link.btn { color: var(--mw-navy); }
@media (max-width: 991.98px) {
  #mainNav { background: rgba(11, 26, 74, .95); }
  #mainNav .navbar-collapse { padding: .75rem 0 1rem; }
  #mainNav .nav-link.btn { display: inline-block; margin-top: .5rem; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 100vh; display: flex; align-items: center; color: #fff; overflow: hidden;
  background:
    radial-gradient(1200px 600px at 85% 10%, rgba(79, 209, 255, .18), transparent 60%),
    radial-gradient(900px 600px at 0% 100%, rgba(242, 184, 38, .14), transparent 60%),
    linear-gradient(160deg, #071237 0%, var(--mw-navy) 45%, var(--mw-blue) 100%);
}
#neural { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero::after { /* Thai-inspired gold lattice fading in from the bottom */
  content: ""; position: absolute; inset: auto 0 0 0; height: 120px; pointer-events: none;
  background: linear-gradient(to top, var(--surface), transparent);
}
.hero .container { position: relative; z-index: 2; padding-top: 6rem; padding-bottom: 6rem; }
.hero-kicker { display: inline-flex; align-items: center; gap: .6rem; padding: .4rem 1rem .4rem .4rem; border-radius: 999px; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .15); font-size: .85rem; }
.hero-kicker img { width: 30px; height: 30px; border-radius: 50%; background: #fff; padding: 2px; }
.hero-title { font-size: clamp(2.4rem, 6vw, 4.6rem); font-weight: 700; line-height: 1.04; margin: 1.4rem 0 1rem; }
.hero-title .grad { background: linear-gradient(90deg, var(--mw-gold-2), var(--mw-gold) 40%, var(--ai-cyan)); -webkit-background-clip: text; background-clip: text; color: transparent; background-size: 200% auto; animation: shimmer 6s linear infinite; }
.hero-pillars { font-family: "Space Grotesk", sans-serif; font-size: clamp(1.1rem, 2.4vw, 1.5rem); color: rgba(255, 255, 255, .85); }
.hero-pillars .sep { color: var(--mw-gold); margin: 0 .5rem; }
.hero-pillars .word { display: inline-block; opacity: 0; transform: translateY(14px); animation: rise .7s ease forwards; }
.hero-pillars .word:nth-of-type(1) { animation-delay: .5s; }
.hero-pillars .word:nth-of-type(2) { animation-delay: .8s; }
.hero-pillars .word:nth-of-type(3) { animation-delay: 1.1s; }
.hero-meta { color: rgba(255, 255, 255, .75); }
.hero-meta i { color: var(--mw-gold); }
.typed-cursor { display: inline-block; width: 2px; height: 1em; background: var(--ai-cyan); margin-left: 3px; vertical-align: -2px; animation: blink 1s steps(1) infinite; }
.edition-badge { font-family: "Space Grotesk", sans-serif; font-size: clamp(3.5rem, 10vw, 7rem); font-weight: 700; line-height: 1; color: transparent; -webkit-text-stroke: 1px rgba(255, 255, 255, .25); }

/* AI "orb": an animated crest with orbiting nodes */
.orb { position: relative; width: min(380px, 80vw); aspect-ratio: 1; margin: 0 auto; }
.orb .crest { position: absolute; inset: 22%; border-radius: 50%; background: #fff; padding: 6%; box-shadow: 0 0 0 10px rgba(242, 184, 38, .18), 0 0 80px rgba(79, 209, 255, .45); animation: float 6s ease-in-out infinite; }
.orb .crest img { width: 100%; height: 100%; object-fit: contain; }
.orb .ring { position: absolute; inset: 0; border-radius: 50%; border: 1px dashed rgba(255, 255, 255, .25); animation: spin 40s linear infinite; }
.orb .ring.r2 { inset: 10%; border: 1px solid rgba(79, 209, 255, .25); animation-duration: 25s; animation-direction: reverse; }
.orb .ring::before, .orb .ring::after { content: ""; position: absolute; width: 12px; height: 12px; border-radius: 50%; background: var(--mw-gold); box-shadow: 0 0 14px var(--mw-gold); top: -6px; left: calc(50% - 6px); }
.orb .ring::after { top: auto; bottom: -6px; background: var(--ai-cyan); box-shadow: 0 0 14px var(--ai-cyan); }
.orb .ring.r2::before { left: -6px; top: calc(50% - 6px); }
.orb .ring.r2::after { left: auto; right: -6px; bottom: auto; top: calc(50% - 6px); }
.orb .chip { position: absolute; padding: .35rem .8rem; border-radius: 999px; font-size: .8rem; background: rgba(11, 26, 74, .75); border: 1px solid rgba(255, 255, 255, .2); backdrop-filter: blur(4px); white-space: nowrap; animation: float 5s ease-in-out infinite; }
.orb .chip i { color: var(--mw-gold); margin-right: .3rem; }
.orb .c1 { top: 4%; left: -4%; }
.orb .c2 { top: 46%; right: -10%; animation-delay: -1.5s; }
.orb .c3 { bottom: 2%; left: 8%; animation-delay: -3s; }

/* Countdown */
.countdown { display: flex; gap: .75rem; flex-wrap: wrap; }
.countdown .unit { min-width: 76px; padding: .7rem .6rem; text-align: center; border-radius: 14px; background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .15); }
.countdown .num { font-family: "Space Grotesk", sans-serif; font-size: 1.8rem; font-weight: 600; line-height: 1; }
.countdown .lbl { font-size: .7rem; text-transform: uppercase; letter-spacing: .1em; color: rgba(255, 255, 255, .6); }

.scroll-cue { position: absolute; left: 50%; bottom: 2rem; transform: translateX(-50%); z-index: 3; color: var(--mw-navy); font-size: 1.6rem; animation: bob 2s ease-in-out infinite; }

/* ---------- Sections ---------- */
section { position: relative; }
.section { padding: 6rem 0; }
.section-dark { background: linear-gradient(160deg, var(--mw-navy), var(--mw-navy-2)); color: #fff; }
.eyebrow { display: inline-flex; align-items: center; gap: .5rem; font-size: .78rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--mw-blue); }
.eyebrow::before { content: ""; width: 26px; height: 2px; background: var(--mw-gold); }
.section-dark .eyebrow { color: var(--mw-gold); }
.section-title { font-size: clamp(1.8rem, 3.6vw, 2.8rem); font-weight: 700; margin: .6rem 0 1rem; }
.lead-muted { color: var(--muted); font-size: 1.08rem; }
.section-dark .lead-muted { color: rgba(255, 255, 255, .7); }

/* Gold Thai-pattern divider (kanok-inspired diamonds) */
.thai-divider { height: 14px; background:
  radial-gradient(circle at 7px 7px, var(--mw-gold) 2.2px, transparent 2.6px) 0 0 / 28px 14px,
  linear-gradient(45deg, transparent 44%, rgba(242, 184, 38, .55) 45% 55%, transparent 56%) 0 0 / 14px 14px,
  linear-gradient(-45deg, transparent 44%, rgba(242, 184, 38, .55) 45% 55%, transparent 56%) 0 0 / 14px 14px,
  var(--mw-navy);
}

/* Pillar cards */
.pillar { height: 100%; padding: 2rem; border-radius: 22px; background: var(--card); border: 1px solid var(--line); position: relative; overflow: hidden; transition: transform .35s ease, box-shadow .35s ease; }
.pillar:hover { transform: translateY(-8px); box-shadow: 0 24px 50px -24px rgba(11, 26, 74, .35); }
.pillar::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: linear-gradient(90deg, var(--mw-blue), var(--ai-cyan), var(--mw-gold)); transform: scaleX(0); transform-origin: left; transition: transform .5s ease; }
.pillar:hover::before { transform: scaleX(1); }
.pillar .icon { width: 60px; height: 60px; display: grid; place-items: center; border-radius: 16px; font-size: 1.6rem; color: #fff; background: linear-gradient(135deg, var(--mw-blue), #3159c9); margin-bottom: 1.2rem; box-shadow: 0 10px 24px -10px rgba(27, 58, 140, .8); }
.pillar.gold .icon { background: linear-gradient(135deg, #d99a0b, var(--mw-gold)); box-shadow: 0 10px 24px -10px rgba(242, 184, 38, .8); }
.pillar.cyan .icon { background: linear-gradient(135deg, #1aa6d6, var(--ai-cyan)); box-shadow: 0 10px 24px -10px rgba(79, 209, 255, .8); }
.pillar .num { position: absolute; right: 1.2rem; top: .6rem; font-family: "Space Grotesk"; font-size: 4rem; font-weight: 700; color: rgba(27, 58, 140, .06); }
.pillar ul { padding-left: 1.1rem; color: var(--muted); margin: 0; }
.pillar li { margin-bottom: .3rem; }

/* Human + AI equation strip */
.equation { display: flex; align-items: center; justify-content: center; gap: 1rem; flex-wrap: wrap; font-family: "Space Grotesk"; font-size: 1.15rem; }
.equation .term { padding: .6rem 1.2rem; border-radius: 14px; background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .15); }
.equation .op { color: var(--mw-gold); font-size: 1.5rem; }

/* Stats */
.stat { text-align: center; }
.stat .val { font-family: "Space Grotesk"; font-weight: 700; font-size: clamp(2.2rem, 5vw, 3.4rem); line-height: 1; color: var(--mw-gold); }
.stat .cap { color: rgba(255, 255, 255, .7); font-size: .9rem; margin-top: .4rem; }

/* MWIT block */
.mwit-card { border-radius: 26px; background: var(--card); border: 1px solid var(--line); overflow: hidden; }
.mwit-card .side { background: linear-gradient(160deg, var(--mw-blue), var(--mw-navy)); color: #fff; position: relative; padding: 2.5rem; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.mwit-card .side img { width: 150px; background: #fff; border-radius: 50%; padding: 6px; box-shadow: 0 0 0 6px rgba(242, 184, 38, .35); }
.mwit-card .motto { font-family: "Sarabun"; font-size: 1.25rem; color: var(--mw-gold-2); margin-top: 1.2rem; }
.fact { display: flex; gap: 1rem; align-items: flex-start; }
.fact i { font-size: 1.4rem; color: var(--mw-blue); flex: none; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; background: rgba(27, 58, 140, .08); }

/* Programme cards */
.prog-card { border: 0; border-radius: 20px; overflow: hidden; height: 100%; background: var(--card); box-shadow: 0 1px 0 var(--line); transition: transform .35s ease, box-shadow .35s ease; }
.prog-card:hover { transform: translateY(-6px); box-shadow: 0 24px 44px -24px rgba(11, 26, 74, .4); }
.prog-card .thumb { position: relative; aspect-ratio: 16 / 10; overflow: hidden; }
.prog-card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.prog-card:hover .thumb img { transform: scale(1.07); }
.prog-card .thumb::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(11, 26, 74, .55), transparent 55%); }
.prog-card .tag { position: absolute; left: 1rem; bottom: .8rem; z-index: 2; color: #fff; font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; }
.prog-card .tag i { color: var(--mw-gold); }
.prog-card .ai-angle { font-size: .85rem; color: var(--mw-blue); background: rgba(27, 58, 140, .07); border-radius: 10px; padding: .5rem .75rem; }

/* Timeline */
.timeline { position: relative; margin: 0; padding: 0; list-style: none; }
.timeline::before { content: ""; position: absolute; left: 21px; top: 0; bottom: 0; width: 2px; background: linear-gradient(var(--mw-gold), var(--ai-cyan)); transform-origin: top; transform: scaleY(var(--progress, 0)); transition: transform 1.2s ease; }
.timeline li { position: relative; padding: 0 0 2rem 64px; }
.timeline .dot { position: absolute; left: 0; top: 0; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--mw-navy-2); border: 2px solid var(--mw-gold); color: var(--mw-gold); }
.timeline .when { font-family: "Space Grotesk"; color: var(--ai-cyan); font-weight: 600; }

/* Schools */
.country-filter .btn { padding: .35rem .9rem; font-size: .85rem; border: 1px solid var(--line); background: var(--card); color: var(--ink); margin: .2rem; }
.country-filter .btn img { width: 20px; height: 14px; object-fit: cover; border-radius: 2px; margin-right: .35rem; vertical-align: -1px; }
.country-filter .btn.active { background: var(--mw-blue); color: #fff; border-color: var(--mw-blue); }
.school { height: 100%; display: flex; align-items: center; gap: .9rem; padding: .9rem 1rem; border-radius: 16px; background: var(--card); border: 1px solid var(--line); transition: transform .25s ease, box-shadow .25s ease, opacity .3s ease; }
.school:hover { transform: translateY(-3px); box-shadow: 0 14px 28px -18px rgba(11, 26, 74, .45); }
.school .logo { width: 52px; height: 52px; flex: none; display: grid; place-items: center; border-radius: 12px; background: #fff; overflow: hidden; }
.school .logo img { max-width: 100%; max-height: 100%; object-fit: contain; }
.school .logo i { font-size: 1.5rem; color: var(--mw-blue); }
.school .name { font-size: .92rem; font-weight: 500; line-height: 1.3; }
.school .ctry { font-size: .75rem; color: var(--muted); }
.school .ctry img { width: 16px; height: 11px; object-fit: cover; border-radius: 2px; margin-right: .25rem; vertical-align: 0; }
.school-col.hide { display: none; }
.school-col.pop { animation: pop .45s ease both; }
.school.is-host { border-color: var(--mw-gold); box-shadow: inset 0 0 0 1px var(--mw-gold); }

/* Resources */
.res-link { display: flex; align-items: center; gap: 1rem; padding: 1.1rem 1.25rem; border-radius: 16px; text-decoration: none; color: #fff; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .12); transition: background-color .2s, transform .2s; }
.res-link:hover { background: rgba(255, 255, 255, .12); color: #fff; transform: translateX(4px); }
.res-link i.lead-ico { font-size: 1.5rem; color: var(--mw-gold); }
.res-link .bi-arrow-right { margin-left: auto; transition: transform .2s; }
.res-link:hover .bi-arrow-right { transform: translateX(4px); }

/* Contact */
.contact-card { border-radius: 22px; background: var(--card); border: 1px solid var(--line); padding: 2rem; height: 100%; }
.contact-card li { display: flex; gap: .8rem; margin-bottom: 1rem; }
.contact-card li i { color: var(--mw-blue); font-size: 1.2rem; }
.map-frame { border: 0; width: 100%; height: 100%; min-height: 340px; border-radius: 22px; }

/* Footer */
.site-footer { background: var(--mw-navy); color: #fff; padding: 2.5rem 0; border-top: 4px solid var(--mw-gold); }
.footer-logo { width: 56px; height: 56px; background: #fff; border-radius: 50%; padding: 3px; }

/* ---------- Scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .8s ease, transform .8s cubic-bezier(.2, .7, .2, 1); transition-delay: var(--d, 0s); }
.reveal.from-left { transform: translateX(-36px); }
.reveal.from-right { transform: translateX(36px); }
.reveal.zoom { transform: scale(.92); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Keyframes ---------- */
@keyframes shimmer { to { background-position: 200% center; } }
@keyframes rise { to { opacity: 1; transform: none; } }
@keyframes blink { 50% { opacity: 0; } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes bob { 0%, 100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, 8px); } }
@keyframes pop { from { opacity: 0; transform: scale(.94) translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes pulse-ring { 0% { box-shadow: 0 0 0 0 rgba(242, 184, 38, .5); } 100% { box-shadow: 0 0 0 18px rgba(242, 184, 38, 0); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
  .hero-pillars .word { opacity: 1; transform: none; }
}

/* ---------- Login page ---------- */
.auth-page { min-height: 100vh; display: flex; align-items: center; color: #fff; position: relative; overflow: hidden;
  background: radial-gradient(900px 500px at 80% 0%, rgba(79, 209, 255, .16), transparent 60%), linear-gradient(160deg, #071237, var(--mw-navy) 50%, var(--mw-blue)); }
.auth-page #neural { opacity: .7; }
.auth-page .modal-content { color: var(--ink); }
.auth-card { position: relative; z-index: 2; width: 100%; max-width: 420px; margin: 2rem auto; padding: 2.5rem 2rem; border-radius: 26px; background: rgba(255, 255, 255, .96); color: var(--ink); box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .55); animation: pop .6s ease both; }
.auth-card .crest { width: 84px; height: 84px; border-radius: 50%; background: #fff; padding: 4px; margin: -82px auto 1rem; display: block; box-shadow: 0 0 0 6px rgba(242, 184, 38, .45); animation: pulse-ring 2.4s ease-out infinite; }
.auth-card .form-floating > .form-control { border-radius: 14px; }
.auth-card .form-control:focus { border-color: var(--mw-blue); box-shadow: 0 0 0 .25rem rgba(27, 58, 140, .15); }
.auth-card .btn-primary { padding: .8rem; }
.spin { display: inline-block; animation: spin 1s linear infinite; }

/* ==========================================================================
   Registration dashboard (main_reg.php)
   ========================================================================== */
.reg-body { background: var(--surface); min-height: 100vh; }
.reg-top { background: var(--mw-blue); color: #fff; border-bottom: 3px solid var(--mw-gold); }
.reg-top .navbar-brand img { width: 38px; height: 38px; border-radius: 50%; background: #fff; padding: 2px; }
.reg-top .school-chip { display: inline-flex; align-items: center; gap: .5rem; padding: .25rem .8rem .25rem .25rem; border-radius: 999px; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .18); font-size: .88rem; max-width: 340px; }
.reg-top .school-chip img, .reg-top .school-chip .ph { width: 30px; height: 30px; border-radius: 50%; background: #fff; object-fit: contain; flex: none; display: grid; place-items: center; color: var(--mw-blue); }
.reg-top .school-chip span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.reg-top .btn-logout { color: #fff; border: 1px solid rgba(255, 255, 255, .3); padding: .35rem .9rem; font-size: .88rem; }
.reg-top .btn-logout:hover { background: rgba(255, 255, 255, .12); color: #fff; }

.reg-side { padding: 1.5rem 1rem; }
@media (min-width: 992px) { .reg-side { position: sticky; top: 0; height: 100vh; overflow-y: auto; border-right: 1px solid var(--line); background: #fff; } }
.ring-card { display: flex; align-items: center; gap: 1rem; padding: 1rem; border-radius: 18px; background: linear-gradient(150deg, var(--mw-navy), var(--mw-blue)); color: #fff; margin-bottom: 1.25rem; position: relative; overflow: hidden; }
.ring-card::after { content: ""; position: absolute; right: -30px; top: -30px; width: 120px; height: 120px; border-radius: 50%; background: radial-gradient(circle, rgba(79, 209, 255, .35), transparent 70%); }
.pring { position: relative; width: 86px; height: 86px; flex: none; }
.pring svg { transform: rotate(-90deg); }
.pring .track { stroke: rgba(255, 255, 255, .15); }
.pring .bar { stroke: url(#ringGrad); stroke-linecap: round; transition: stroke-dashoffset 1s cubic-bezier(.2, .7, .2, 1); }
.pring .val { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-family: "Space Grotesk"; font-weight: 700; font-size: 1.35rem; }

.step-list { list-style: none; padding: 0; margin: 0; position: relative; }
.step-list::before { content: ""; position: absolute; left: 21px; top: 22px; bottom: 22px; width: 2px; background: var(--line); }
.step-list li { position: relative; }
.step { text-decoration: none; display: flex; align-items: center; gap: .8rem; width: 100%; padding: .6rem .5rem; border: 0; background: none; border-radius: 14px; text-align: left; color: var(--ink); transition: background-color .2s; }
.step:hover { background: rgba(27, 58, 140, .06); }
.step.active { background: rgba(27, 58, 140, .1); }
.step .dot { width: 30px; height: 30px; margin: 0 2px 0 6px; flex: none; border-radius: 50%; display: grid; place-items: center; font-size: .85rem; background: #fff; border: 2px solid #c9d1e6; color: var(--muted); position: relative; z-index: 1; transition: all .3s; }
.step[data-state=progress] .dot { border-color: var(--mw-gold); color: #a87800; background: #fff8e1; }
.step[data-state=complete] .dot { border-color: #1f9d55; background: #1f9d55; color: #fff; animation: pop .4s ease; }
.step .meta { flex: 1; min-width: 0; }
.step .ttl { font-weight: 500; font-size: .95rem; display: block; }
.step .sub { font-size: .76rem; color: var(--muted); }
.step .mini { height: 4px; border-radius: 4px; background: #e8ecf6; overflow: hidden; margin-top: .3rem; }
.step .mini span { display: block; height: 100%; background: linear-gradient(90deg, var(--mw-gold), #1f9d55); width: 0; transition: width .8s ease; }

.reg-main { padding: 1.5rem; }
@media (max-width: 575.98px) { .reg-main { padding: 1rem .75rem; } }
.progress-strip { position: sticky; top: 0; z-index: 5; background: rgba(245, 247, 252, .92); backdrop-filter: blur(8px); padding: .75rem 0; margin: -1.5rem 0 1rem; }
.progress-strip .progress { height: 10px; border-radius: 999px; background: #e3e8f4; overflow: visible; }
.progress-strip .progress-bar { border-radius: 999px; background: var(--mw-blue); transition: none; }
.progress-strip .seg { display: flex; gap: 6px; margin-top: .5rem; }
.progress-strip .seg span { flex: 1; height: 5px; border-radius: 4px; background: #dfe5f2; }
.progress-strip .seg span[data-state=progress] { background: var(--mw-gold); }
.progress-strip .seg span[data-state=complete] { background: #1f9d55; }

.sec-card { border: 1px solid var(--line); border-radius: 20px; background: #fff; padding: 1.25rem 1.25rem 1rem; height: 100%; transition: transform .3s, box-shadow .3s; }
.sec-card:hover { transform: translateY(-3px); box-shadow: 0 18px 36px -24px rgba(11, 26, 74, .45); }
.sec-card .ico { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; font-size: 1.3rem; color: #fff; background: linear-gradient(135deg, var(--mw-blue), #3159c9); flex: none; }
.sec-card[data-state=complete] .ico { background: linear-gradient(135deg, #168a48, #2fbf6e); }
.sec-card[data-state=progress] .ico { background: linear-gradient(135deg, #d99a0b, var(--mw-gold)); }
.sec-card .progress { height: 8px; border-radius: 999px; background: #e8ecf6; }
.sec-card .progress-bar { border-radius: 999px; transition: width .9s ease; }
.state-pill { white-space: nowrap; font-size: .72rem; font-weight: 600; padding: .25rem .6rem; border-radius: 999px; text-transform: uppercase; letter-spacing: .05em; }
.state-pill.pill-todo { background: #eef1f8; color: var(--muted); }
.state-pill.pill-progress { background: #fff3cd; color: #8a6400; }
.state-pill.pill-complete { background: #d6f5e3; color: #146c3c; }
.todo-list { list-style: none; padding: 0; margin: .75rem 0 0; max-height: 220px; overflow-y: auto; }
.todo-list li { display: flex; gap: .6rem; padding: .5rem 0; border-top: 1px dashed var(--line); font-size: .86rem; }
.todo-list li i { color: #d9534f; margin-top: .1rem; }
.todo-list a { text-decoration: none; }
.todo-list .det { color: var(--muted); font-size: .8rem; }


.done-banner { border-radius: 20px; padding: 1.5rem; color: #fff; background: linear-gradient(120deg, #146c3c, #1f9d55 50%, var(--mw-gold)); animation: pop .5s ease; }
.toast-progress { position: fixed; right: 1rem; bottom: 1rem; z-index: 1080; }

@media (max-width: 575.98px) { .progress-strip .eyebrow { font-size: .68rem; letter-spacing: .1em; } .progress-strip .eyebrow::before { width: 14px; } }

/* ---------- Registration forms ---------- */
.form-card { background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 1.5rem; margin-bottom: 1.25rem; }
@media (max-width: 575.98px) { .form-card { padding: 1.1rem; } }
.form-card h2, .form-card .card-title { font-size: 1.05rem; font-weight: 700; display: flex; align-items: center; gap: .5rem; margin-bottom: 1rem; }
.form-card h2 i { color: var(--mw-blue); }
.form-label { font-weight: 500; font-size: .9rem; margin-bottom: .35rem; }
.form-label.req::after { content: " *"; color: #d9534f; }
.form-control, .form-select { border-radius: 12px; padding: .6rem .85rem; border-color: #d5dbea; }
.form-control:focus, .form-select:focus { border-color: var(--mw-blue); box-shadow: 0 0 0 .2rem rgba(27, 58, 140, .14); }
.form-check-input:checked { background-color: var(--mw-blue); border-color: var(--mw-blue); }
.choice { display: block; border: 1px solid #d5dbea; border-radius: 14px; padding: .75rem 1rem .75rem 2.6rem; position: relative; cursor: pointer; transition: border-color .2s, background-color .2s; height: 100%; }
.choice .form-check-input { position: absolute; left: 1rem; top: .95rem; margin: 0; }
.choice:hover { border-color: var(--mw-blue); }
.choice:has(input:checked) { border-color: var(--mw-blue); background: rgba(27, 58, 140, .05); }
.choice:has(input:disabled) { opacity: .55; cursor: not-allowed; }
.was-validated .choice:has(input:invalid) { border-color: #dc3545; }
.media-box { width: 100%; max-width: 220px; aspect-ratio: var(--ar, 1); border: 2px dashed #c9d1e6; border-radius: 16px; display: grid; place-items: center; overflow: hidden; background: #f8f9fd; color: #9aa5c4; font-size: 2.4rem; position: relative; }
.media-box img { width: 100%; height: 100%; object-fit: cover; }
.media-box.has-img { border-style: solid; border-color: var(--line); }
.file-chip { display: inline-flex; align-items: center; gap: .5rem; padding: .45rem .8rem; border-radius: 12px; background: #eef7f1; color: #146c3c; font-size: .86rem; text-decoration: none; }
.file-chip:hover { background: #dff1e6; color: #0f5530; }
.file-chip.missing { background: #fdf0f0; color: #a33a3a; }
.upload-row { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; }
.save-bar { position: sticky; bottom: 0; z-index: 4; background: rgba(245, 247, 252, .94); backdrop-filter: blur(6px); padding: .85rem 0; margin-top: .5rem; border-top: 1px solid var(--line); display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; }
.person-row { display: flex; align-items: center; gap: 1rem; padding: .9rem 1rem; border: 1px solid var(--line); border-radius: 16px; background: #fff; margin-bottom: .6rem; }
.person-row .avatar { width: 52px; height: 64px; border-radius: 10px; object-fit: cover; background: #eef1f8; display: grid; place-items: center; color: #9aa5c4; flex: none; overflow: hidden; }
.person-row .avatar img { width: 100%; height: 100%; object-fit: cover; }
.person-row .info { flex: 1; min-width: 0; }
.person-row .info .nm { font-weight: 600; }
.person-row.empty { border-style: dashed; background: transparent; }
.role-head { font-size: .78rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 1.25rem 0 .6rem; display: flex; justify-content: space-between; }
.cr-slider { width: 60%; }
fieldset[disabled] .btn-upload, fieldset[disabled] .save-bar .btn { pointer-events: none; opacity: .6; }
@media (max-width: 575.98px) {
  .save-bar { padding: .6rem 0; gap: .5rem; }
  .save-bar .btn-light { display: none; }
  .save-bar .btn-primary { flex: 1; }
}

/* ---------- Participating schools world map (index_page.php) ---------- */
.map-card { position: relative; background: #fff; border: 1px solid var(--line); border-radius: 22px; padding: .75rem; height: 100%; }
#worldMap { width: 100%; height: 420px; }
@media (max-width: 767.98px) { #worldMap { height: 260px; } }
.map-legend { display: flex; flex-wrap: wrap; gap: 1rem; padding: .25rem .5rem 0; color: var(--muted); }
.lg-dot { display: inline-block; width: 11px; height: 11px; border-radius: 50%; background: var(--mw-gold); border: 2px solid #fff; box-shadow: 0 0 0 1px #c9d1e6; margin-right: .35rem; vertical-align: -1px; }
.lg-dot.host { width: 14px; height: 14px; border-color: var(--mw-navy); }
#worldMap .jvm-zoom-btn { background: var(--mw-navy); border-radius: 8px; width: 26px; height: 26px; line-height: 24px; font-size: 16px; padding: 0; text-align: center; left: 12px; }
#worldMap .jvm-zoom-btn.jvm-zoomin { top: 12px; }
#worldMap .jvm-zoom-btn.jvm-zoomout { top: 44px; }
.jvm-tooltip { background: var(--mw-navy); color: #fff; border-radius: 10px; padding: .35rem .65rem; font-family: "Inter", sans-serif; font-size: .82rem; box-shadow: 0 8px 20px -8px rgba(0, 0, 0, .4); }
#worldMap.map-animated .jvm-line { animation: map-dash 2.5s linear infinite; }
@keyframes map-dash { to { stroke-dashoffset: -18; } }
.map-panel { background: #fff; border: 1px solid var(--line); border-radius: 22px; padding: 1.25rem; height: 100%; max-height: 470px; display: flex; flex-direction: column; }
.map-panel-empty { margin: auto; text-align: center; }
.map-panel-empty > i { font-size: 3rem; color: var(--mw-blue); opacity: .8; }
.map-panel-head { display: flex; align-items: center; gap: .75rem; padding-bottom: .75rem; border-bottom: 1px solid var(--line); margin-bottom: .5rem; }
.map-panel-head .flag { width: 42px; height: 28px; object-fit: cover; border-radius: 4px; box-shadow: 0 0 0 1px var(--line); }
.map-school-list { list-style: none; padding: 0; margin: 0; overflow-y: auto; }
.map-school-list li { display: flex; align-items: center; gap: .75rem; padding: .55rem .25rem; border-bottom: 1px dashed var(--line); font-size: .9rem; }
.map-school-list li:last-child { border-bottom: 0; }
.map-school-list li.is-host .nm { font-weight: 600; }
.map-school-list .logo { width: 40px; height: 40px; flex: none; display: grid; place-items: center; border-radius: 10px; background: #f6f8fd; overflow: hidden; color: var(--mw-blue); }
.map-school-list .logo img { max-width: 100%; max-height: 100%; object-fit: contain; }
.map-panel.pop-in { animation: pop .35s ease both; }
@media (max-width: 991.98px) { .map-panel { max-height: 380px; } }

/* Narrow (1:5) dashboard sidebar on large screens */
@media (min-width: 992px) {
  .reg-side { padding: 1.25rem .6rem; }
  .ring-card { flex-direction: column; text-align: center; gap: .5rem; padding: .9rem .6rem; }
  .ring-card .pring { width: 72px; height: 72px; }
  .ring-card .pring svg { width: 72px; height: 72px; }
  .ring-card .pring .val { font-size: 1.1rem; }
  .step { gap: .55rem; padding: .5rem .35rem; }
  .step .dot { width: 26px; height: 26px; margin: 0 0 0 2px; font-size: .78rem; }
  .step-list::before { left: 15px; }
  .step .ttl { font-size: .86rem; line-height: 1.25; }
  .step .sub { font-size: .7rem; }
}
