/* MyCodeLab public pages — the home page (index.php) and every institute page (i.php).
   Brand: the MyCodeLab.in banner — deep navy type, a bright blue, and orange / purple / green / yellow accents
   on white and the palest blue. Rounded, friendly, no hard outlines. These two pages do not load Bootstrap.
   An institute page overrides --brand with its own theme colour and the whole page follows. */

:root {
  --navy: #16224a;          /* headings, body text */
  --ink: #2e3a5c;           /* secondary text */
  --muted: #6b7794;
  --brand: #0b63e5;         /* primary — an institute page replaces this */
  --brand-deep: #0846a8;
  --brand-soft: #e8f1ff;
  --orange: #f59426;
  --purple: #7a3ff2;
  --green: #17b26a;
  --yellow: #ffd43b;
  --pink: #f4508e;
  --paper: #ffffff;
  --bg: #f6f9ff;
  --line: #e4ebf7;
  --shadow: 0 10px 30px rgba(22, 34, 74, .08);
  --shadow-lg: 0 20px 50px rgba(22, 34, 74, .14);
  --r: 20px;
  --pad: 48px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Nunito Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .display { font-family: 'Baloo 2', 'Nunito Sans', system-ui, sans-serif; font-weight: 800; color: var(--navy); line-height: 1.12; letter-spacing: -0.01em; margin: 0; }
h1 { font-size: clamp(34px, 5.2vw, 60px); line-height: 1.05; }
h2 { font-size: clamp(26px, 3.4vw, 40px); }
h3 { font-size: clamp(19px, 2.2vw, 24px); }
p { margin: 0; }

a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-deep); text-decoration: underline; }
img { max-width: 100%; }

.wrap { max-width: 1200px; margin: 0 auto; padding: 0 var(--pad); }
.section { padding-top: 64px; }
.muted { color: var(--muted); }
.lead { font-size: clamp(17px, 1.5vw, 20px); line-height: 1.65; color: var(--ink); }
.small { font-size: 15px; }
.mt { margin-top: 14px; }
.stack { display: flex; flex-direction: column; gap: 18px; }
.row { display: flex; gap: 22px; align-items: center; }
.row.top { align-items: flex-start; }
.grow { flex: 1 1 0; min-width: 0; }
.spacer { flex-grow: 1; }
.center { text-align: center; }

.g2, .g3, .g4 { display: grid; gap: 20px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* surfaces */
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); padding: 26px; }
.card.shadow { box-shadow: var(--shadow); border-color: transparent; }
.card.lift { transition: transform .15s ease, box-shadow .15s ease; }
.card.lift:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.band { border-radius: 26px; padding: 40px; }
.band.paper { background: var(--paper); box-shadow: var(--shadow); }
.band.brand { background: linear-gradient(135deg, var(--brand) 0%, var(--purple) 100%); color: #fff; }
.band.tint { background: var(--brand-soft); }
.band.sun { background: linear-gradient(135deg, #ffb648 0%, var(--orange) 100%); color: #3d2405; }
.band h2, .band h3 { color: inherit; }
.on-dark { color: rgba(255, 255, 255, .88); }

.pill { display: inline-flex; align-items: center; gap: 8px; background: var(--brand-soft); color: var(--brand-deep); border-radius: 999px; padding: 8px 16px; font-size: 13px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.pill.sun { background: #fff3e0; color: #a35a05; }

.btn { display: inline-block; font-family: 'Baloo 2', sans-serif; font-weight: 700; font-size: 17px; padding: 13px 26px; border: 2px solid transparent; border-radius: 14px; background: var(--paper); color: var(--navy); cursor: pointer; text-decoration: none; transition: transform .12s ease, box-shadow .12s ease, background .12s ease; }
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 10px 22px rgba(11, 99, 229, .32); }
.btn-primary:hover { background: var(--brand-deep); color: #fff; }
.btn-sun { background: var(--orange); color: #fff; box-shadow: 0 10px 22px rgba(245, 148, 38, .34); }
.btn-sun:hover { color: #fff; background: #dd8115; }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--navy); }
.btn-ghost:hover { border-color: var(--brand); color: var(--brand); }
.btn-white { background: #fff; color: var(--brand); }
.btn-sm { font-size: 15px; padding: 9px 18px; border-radius: 11px; }
.btn-block { display: block; width: 100%; text-align: center; }

/* header — full-bleed background, but the contents keep the same centred column as every section */
.bar-in { max-width: 1200px; margin: 0 auto; padding: 0 var(--pad); width: 100%; display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.nav { position: sticky; top: 0; z-index: 20; padding: 14px 0; background: rgba(255, 255, 255, .92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.nav a.link { font-size: 15px; font-weight: 700; color: var(--ink); }
.nav a.link:hover { color: var(--brand); text-decoration: none; }
.brand { display: flex; align-items: center; gap: 10px; font-family: 'Baloo 2', sans-serif; font-weight: 800; font-size: 22px; color: var(--navy); }
.brand img { width: 38px; height: 38px; border-radius: 10px; }
.brand .in { color: var(--brand); }

/* hero */
.hero { position: relative; overflow: hidden; background: radial-gradient(900px 480px at 82% -10%, #dbe9ff 0%, rgba(219,233,255,0) 70%), radial-gradient(700px 420px at -5% 110%, #f1e6ff 0%, rgba(241,230,255,0) 70%), var(--paper); }
.blob { position: absolute; border-radius: 50%; filter: blur(2px); opacity: .5; pointer-events: none; }

/* stats */
.stat { background: var(--paper); border-radius: var(--r); padding: 22px 18px; text-align: center; box-shadow: var(--shadow); }
.stat .n { font-family: 'Baloo 2', sans-serif; font-weight: 800; font-size: 38px; line-height: 1.05; }
.stat .l { font-size: 14px; color: var(--muted); margin-top: 4px; }

.ico { width: 48px; height: 48px; border-radius: 14px; display: flex; align-items: center; justify-content: center; margin-bottom: 14px; }

.photo { display: block; width: 100%; height: 250px; object-fit: cover; border-radius: var(--r); box-shadow: var(--shadow); }
.photo-slot { height: 250px; border: 2px dashed #c3d3ee; border-radius: var(--r); background: var(--paper); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center; padding: 18px; }
.photo-slot b { font-size: 16px; color: var(--navy); }
.photo-slot span { font-size: 14px; color: var(--muted); }
.art { display: block; width: 100%; border-radius: var(--r); background: var(--paper); box-shadow: var(--shadow); }

/* forms */
.field { display: block; font-size: 14px; font-weight: 700; color: var(--navy); margin-bottom: 7px; }
.input { width: 100%; font-family: inherit; font-size: 17px; padding: 14px 16px; border: 2px solid var(--line); border-radius: 14px; background: #fbfdff; color: var(--navy); transition: border-color .12s ease, box-shadow .12s ease; }
.input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px rgba(11, 99, 229, .14); }

.alert { border-radius: 16px; padding: 15px 20px; display: flex; gap: 12px; align-items: center; background: #fff6e0; color: #6b4708; }
.alert.danger { background: #ffeaea; color: #9b1c1c; }
.alert.info { background: var(--brand-soft); color: var(--brand-deep); }

.list-row { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.list-row:last-child { border-bottom: 0; }
.rank { width: 30px; height: 30px; border-radius: 10px; color: #fff; font-family: 'Baloo 2', sans-serif; font-weight: 700; font-size: 15px; display: flex; align-items: center; justify-content: center; flex: none; }

.foot { margin-top: 56px; padding: 26px 0; border-top: 1px solid var(--line); background: var(--paper); font-size: 14px; color: var(--muted); }
.topbar { padding: 10px 0; font-size: 13px; font-weight: 600; }
.foot a { color: var(--muted); }
.foot a:hover { color: var(--brand); }

@media (max-width: 960px) {
  :root { --pad: 22px; }
  .g2 { grid-template-columns: minmax(0, 1fr); }
  .g3, .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .row { flex-direction: column; align-items: stretch; }
  .row.keep { flex-direction: row; align-items: center; }
  .band { padding: 26px 22px; }
  .hide-sm { display: none; }
}
@media (max-width: 620px) {
  body { font-size: 16px; }
  .g2, .g3, .g4 { grid-template-columns: minmax(0, 1fr); }
  .photo, .photo-slot { height: 200px; }
  .btn { display: block; text-align: center; }
  .btn.inline { display: inline-block; }
  .row.keep { flex-direction: column; align-items: flex-start; }
  .row.keep > img { width: 150px !important; align-self: center; }
  h1, h2, h3 { overflow-wrap: anywhere; }
  /* the header stays on ONE line: logo left, both buttons together on the right */
  .nav .bar-in { flex-wrap: nowrap; gap: 6px; }
  .nav .brand { font-size: 17px; gap: 7px; min-width: 0; flex: 0 1 auto; margin-right: 2px; overflow: hidden; }
  .nav .brand > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .nav .brand img { width: 30px; height: 30px; }
  .nav .btn { display: inline-block; flex: none; white-space: nowrap; font-size: 14px; padding: 9px 13px; border-radius: 10px; }
}
/* small phones (iPhone SE and friends): logo and buttons a shade tighter, still one line */
@media (max-width: 385px) {
  .nav .brand { font-size: 15px; }
  .nav .brand img { width: 27px; height: 27px; }
  .nav .btn { font-size: 13px; padding: 8px 11px; }
}
/* the very narrowest (340px and under): the icon alone carries the logo, so both buttons still fit beside it */
@media (max-width: 340px) {
  .nav .brand > span { display: none; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto; } }
@media print { .no-print, .nav { display: none; } body { background: #fff; } }

/* Institute "About / welcome" text written in the rich editor (headings, lists, images, embedded video) */
.about .rich { line-height: 1.65; overflow-wrap: anywhere; }
.about .rich > :first-child { margin-top: 0; }
.about .rich h1, .about .rich h2 { font-family: 'Baloo 2', system-ui, sans-serif; font-size: 24px; margin: 18px 0 8px; }
.about .rich h3, .about .rich h4 { font-family: 'Baloo 2', system-ui, sans-serif; font-size: 19px; margin: 16px 0 6px; }
.about .rich p { margin: 0 0 12px; }
.about .rich ul, .about .rich ol { margin: 0 0 12px; padding-left: 22px; }
.about .rich li { margin-bottom: 4px; }
.about .rich img { max-width: 100%; height: auto; border-radius: 12px; margin: 6px 0; }
.about .rich iframe { max-width: 100%; aspect-ratio: 16 / 9; width: 100%; height: auto; border: 0; border-radius: 12px; }
.about .rich blockquote { margin: 0 0 12px; padding: 8px 14px; border-left: 4px solid var(--brand, #0b63e5); background: rgba(0, 0, 0, .03); border-radius: 0 8px 8px 0; }
.about .rich a { color: var(--brand, #0b63e5); }
.about .rich .ql-align-center { text-align: center; } .about .rich .ql-align-right { text-align: right; }
