/* ============================================================
   QUARKS INSTITUTE - Design System (assets/css/main.css)
   Palette : Deep Navy + Crimson Red (flat, solid colors only)
   Type    : Plus Jakarta Sans (headings) / DM Sans (body) - via Google Fonts
   Header  : solid white. Buttons: auto shine animation.
   Radius  : ONE control token (--radius-base) drives everything
   ============================================================ */

/* Fonts are loaded from Google Fonts (see <head>): Plus Jakarta Sans + DM Sans.
   Both are VARIABLE fonts with real weight ranges (200-800 and 100-1000), so the
   font-weight: 700/800 rules throughout - headings, buttons, tabs, labels,
   badges - render as true weights instead of browser-synthesised bold.
   DM Sans also carries an optical-size axis (opsz 9-40); the browser applies it
   automatically, so no extra CSS is needed. */

:root {
  /* Brand - darker blue */
  --navy-900: #071A2E;
  --navy-800: #0A2340;
  --navy-700: #0F3358;
  --navy-600: #154B7D;
  --navy-soft: #E9EFF7;

  /* Neutrals */
  --ink: #14243A;
  --slate: #475970;
  --slate-light: #7F8DA3;
  --line: #E3E9F1;
  --bg: #FFFFFF;
  --bg-soft: #F4F7FB;   /* page canvas - light blue */
  --bg-field: #EDF1F6;  /* light grey field shade */

  /* Accent - professional red */
  --red: #C8102E;
  --red-dark: #9E0C24;
  --red-bright: #F26073;   /* for large text accents on dark navy */
  --red-soft: #FBECEE;
  --red-line: #F1C4CC;

  /* Feedback */
  --green-soft: #E8F6EE;
  --green-line: #B7E2C6;
  --green-text: #14683F;
  --red-err-text: #B42318;

  /* Geometry - change --radius-base once to re-shape the whole site */
  --radius-base: 33px;
  --radius: var(--radius-base);                              /* cards, panels */
  --radius-sm: calc(var(--radius-base) * 0.7);               /* buttons, inputs */
  --radius-xs: calc(var(--radius-base) * 0.45);              /* badges, dots, ticks */

  /* Shadows - small and soft */
  --shadow-sm: 0 1px 2px rgba(10, 35, 64, 0.04), 0 2px 8px rgba(10, 35, 64, 0.06);
  --shadow-md: 0 4px 16px rgba(10, 35, 64, 0.09);
  --shadow-lg: 0 14px 36px rgba(3, 12, 24, 0.30);

  /* Glass (used by hero spotlight card) */
  --glass-dark-bg: rgba(255, 255, 255, 0.08);
  --glass-dark-border: rgba(255, 255, 255, 0.16);
  --glass-blur: blur(16px) saturate(1.5);

  /* Motion - soft, slow, buttery */
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --t-fast: 0.3s;
  --t-med: 0.5s;

  --container: 1240px;
  --font-head: 'Plus Jakarta Sans', sans-serif;
  --font-body: 'DM Sans', sans-serif;
}

/* ---------- Reset & base ---------- */

*, *::before, *::after { box-sizing: border-box; }

/* The hidden attribute must ALWAYS win, even over display rules */
[hidden] { display: none !important; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--slate);
  background: var(--bg-soft);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5 {
  font-family: var(--font-head);
  color: var(--ink);
  line-height: 1.25;
  margin: 0 0 0.55em;
  font-weight: 700;
}

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

a { color: var(--navy-600); text-decoration: none; transition: color var(--t-fast) var(--ease); }
a:hover { color: var(--red); }

img { max-width: 100%; height: auto; }

ul { padding: 0; margin: 0; list-style: none; }

/* Plus Jakarta Sans everywhere - controls never use browser default fonts */
input, button, textarea, select, optgroup { font-family: inherit; }
pre, code, kbd, samp, tt { font-family: var(--font-body); }

::selection { background: var(--red); color: #fff; }

:focus-visible {
  outline: 3px solid rgba(200, 16, 46, 0.5);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--red);
  color: #fff;
  padding: 10px 18px;
  font-weight: 700;
  z-index: 2000;
  border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus { left: 0; }

/* ---------- Icons ---------- */

.icon { width: 20px; height: 20px; flex-shrink: 0; }
.icon-sm { width: 15px; height: 15px; }
.icon-xs { width: 14px; height: 14px; }

/* ---------- Layout ---------- */

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 22px;
}

.section { padding: 50px 0; }

/* Alternating band. The page canvas is light blue (--bg-soft); this paints a
   section white so consecutive sections alternate light blue / white.
   Homepage order: categories(white) courses(blue) faculty(white) gallery(blue) why(white). */
.section-alt { background: var(--bg); }

.section-head { max-width: 680px; margin-bottom: 42px; }
.section-head.center { margin-inline: auto; text-align: center; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 12px;
}
.eyebrow::before {
  content: "";
  width: 24px;
  height: 3px;
  background: var(--red);
  border-radius: var(--radius-xs);
}

.section-title {
  font-size: clamp(1.7rem, 3vw, 2.25rem);
  line-height: 1.2;
  margin-bottom: 0;
}

.section-sub {
  margin-top: 12px;
  font-size: 1.03rem;
  line-height: 1.7;
  color: var(--slate);
}

.section-cta { margin-top: 44px; text-align: center; }

/* Full-width section divider (touches both viewport edges) */
.divider-top { border-top: 1px solid var(--line); }

/* ---------- Buttons (auto shine animation) ---------- */

.btn {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 24px;
  border: 2px solid transparent;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
  text-decoration: none;
  transition: background-color var(--t-med) var(--ease), color var(--t-med) var(--ease),
              border-color var(--t-med) var(--ease), transform var(--t-med) var(--ease),
              box-shadow var(--t-med) var(--ease);
}
.btn:hover { transform: translateY(-2px); }
.btn .icon { transition: transform var(--t-med) var(--ease); }
.btn:hover .icon { transform: translateX(4px); }

/* Shine - a light bar sweeps across every button automatically */
.btn::after {
  content: "";
  position: absolute;
  top: -50%;
  left: -80%;
  width: 42%;
  height: 200%;
  background: rgba(255, 255, 255, 0.26);
  transform: skewX(-24deg);
  pointer-events: none;
  animation: btnShine 4.2s var(--ease) infinite;
}
@keyframes btnShine {
  0%   { left: -80%; }
  36%  { left: 140%; }
  100% { left: 140%; }
}

.btn-red { background: var(--red); color: #fff; }
.btn-red:hover { background: var(--red-dark); color: #fff; box-shadow: var(--shadow-sm); }

.btn-navy { background: var(--navy-800); color: #fff; }
.btn-navy:hover { background: var(--navy-700); color: #fff; box-shadow: var(--shadow-sm); }

.btn-outline { border-color: var(--navy-800); color: var(--navy-800); background: transparent; }
.btn-outline:hover { background: var(--navy-800); color: #fff; }

.btn-outline-light { border-color: rgba(255, 255, 255, 0.5); color: #fff; background: transparent; }
.btn-outline-light:hover { background: #fff; border-color: #fff; color: var(--navy-800); }

.btn-sm { padding: 10px 17px; font-size: 0.95rem; }
.btn-block { width: 100%; }

/* ---------- Top bar ---------- */

.topbar {
  background: var(--navy-900);
  color: #B9C8DC;
  font-size: 0.85rem;
}
.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 40px;
  flex-wrap: wrap;
  padding-top: 5px;
  padding-bottom: 5px;
}
.topbar-contact { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.topbar-contact a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #B9C8DC;
}
.topbar-contact a:hover { color: #fff; }
.topbar-contact .icon-sm { color: var(--red-bright); }
.topbar-note {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  color: #fff;
}
.topbar-note .dot {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-xs);
  background: var(--red);
}

/* ---------- Header / Navigation (solid white) ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: #fff;
  border-bottom: 1px solid var(--line);
  transition: box-shadow var(--t-med) var(--ease);
}
.site-header.is-scrolled { box-shadow: var(--shadow-sm); }

.header-inner {
  display: flex;
  align-items: center;
  gap: 32px;
  min-height: 78px;
}

/* Text-only one-line logo (works with both legacy and new markup) */
.brand { display: inline-flex; align-items: baseline; gap: 7px; line-height: 1.05; }
.brand-mark { display: none !important; }
.brand-text { display: inline-flex; align-items: baseline; gap: 7px; }
.brand-text strong {
  font-family: var(--font-head);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--navy-800);
  letter-spacing: 0.2px;
}
.brand-text small,
.brand-sub {
  font-family: var(--font-head);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--red);
  letter-spacing: 0.2px;
  text-transform: none;
}

.main-nav { margin-left: auto; }
.main-nav ul { display: flex; gap: 4px; }
.main-nav a {
  position: relative;
  display: inline-block;
  padding: 12px 15px;
  font-weight: 700;
  font-size: 0.98rem;
  color: var(--slate);
  transition: color var(--t-fast) var(--ease);
}
.main-nav a:hover { color: var(--navy-800); }
.main-nav a::after {
  content: "";
  position: absolute;
  left: 15px;
  right: 15px;
  bottom: 3px;
  height: 3px;
  border-radius: var(--radius-xs);
  background: var(--red);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--t-med) var(--ease);
}
.main-nav a:hover::after,
.main-nav a.active::after { transform: scaleX(1); }
.main-nav a.active { color: var(--navy-800); }

.header-actions { display: flex; align-items: center; gap: 11px; }

.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 15px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--navy-800);
  transition: border-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.user-chip:hover { border-color: var(--red); color: var(--red); }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 46px;
  height: 46px;
  padding: 12px 11px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  height: 2.5px;
  border-radius: var(--radius-xs);
  background: var(--navy-800);
  transition: transform var(--t-med) var(--ease), opacity var(--t-med) var(--ease);
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  overflow: hidden;
  background: var(--navy-800);
  color: #fff;
  padding: 62px 0 70px;
}
.hero::before,
.hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: var(--navy-700);
}
.hero::before { width: 620px; height: 620px; top: -220px; right: -160px; }
.hero::after { width: 340px; height: 340px; bottom: -190px; left: -140px; }

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 52px;
  align-items: center;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  background: var(--red);
  color: #fff;
  padding: 8px 15px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 1.4px;
  text-transform: uppercase;
}

.hero h1 {
  margin: 20px 0 14px;
  font-size: clamp(2.2rem, 4.4vw, 3.2rem);
  font-weight: 800;
  line-height: 1.14;
  color: #fff;
}
.hero h1 .text-red { color: var(--red-bright); }

.hero-copy > p {
  font-size: 1.06rem;
  line-height: 1.75;
  color: #C2D0E2;
  max-width: 540px;
}

.hero-cta { display: flex; flex-wrap: wrap; gap: 13px; margin-top: 26px; }

.hero-stats { display: flex; flex-wrap: wrap; row-gap: 18px; margin-top: 40px; }
.hero-stats .stat { padding: 0 26px; border-left: 1px solid rgba(255, 255, 255, 0.18); }
.hero-stats .stat:first-child { padding-left: 0; border-left: 0; }
.stat-num {
  display: inline-block;
  min-width: 3ch;               /* keeps layout stable while counting */
  font-family: var(--font-head);
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--red-bright);
  line-height: 1.1;
}
.stat-label { font-size: 0.88rem; color: #A9BAD1; margin-top: 2px; white-space: nowrap; }

/* Hero spotlight - rotating course showcase on frosted glass */

.hero-spot { position: relative; }

.spot-deco {
  position: absolute;
  top: -46px;
  right: -34px;
  width: 380px;
  height: 380px;
  pointer-events: none;
}

.spot-card {
  position: relative;
  z-index: 2;
  background: var(--glass-dark-bg);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-dark-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 28px 28px 24px;
  max-width: 490px;
  margin-left: auto;
  transition: transform var(--t-med) var(--ease), box-shadow var(--t-med) var(--ease),
              border-color var(--t-med) var(--ease);
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .spot-card { background: rgba(15, 51, 88, 0.88); }
}
.spot-card:hover { transform: translateY(-4px); border-color: rgba(255, 255, 255, 0.28); }
.spot-card h3 { font-size: 1.3rem; line-height: 1.35; margin-bottom: 8px; }
.spot-card h3 a { color: #fff; }
.spot-card h3 a:hover { color: var(--red-bright); }
.spot-card > p { font-size: 0.95rem; color: #C2D0E2; margin-bottom: 16px; }

.spot-stage { display: grid; }
.spot-item {
  grid-area: 1 / 1;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease), visibility 0.8s;
}
.spot-item.is-active { opacity: 1; visibility: visible; transform: none; }

.spot-badges { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.spot-badge {
  font-size: 0.71rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  padding: 5px 10px;
  border-radius: var(--radius-xs);
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}
.spot-badge.red { background: var(--red); color: #fff; }

.spot-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  padding-top: 16px;
}
.spot-price { display: flex; align-items: baseline; gap: 8px; }
.spot-price .amount { font-family: var(--font-head); font-size: 1.45rem; font-weight: 800; color: #fff; }
.spot-price-note { font-size: 0.8rem; color: rgba(255, 255, 255, 0.55); }
.spot-price .was { color: rgba(255, 255, 255, 0.55); font-size: 0.95rem; }

.spot-dots { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 18px; }
.spot-dots button {
  width: 22px;
  height: 5px;
  border: 0;
  padding: 0;
  border-radius: var(--radius-xs);
  background: rgba(255, 255, 255, 0.25);
  cursor: pointer;
  transition: background-color var(--t-med) var(--ease), width var(--t-med) var(--ease);
}
.spot-dots button.is-active { background: var(--red); width: 32px; }

/* ---------- Slider (courses page, full width) ---------- */

.slider-band { background: var(--navy-900); }
.slider-band .hero-slider {
  border-radius: 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  box-shadow: none;
}
/* The banners are 1920x720 (8:3) with the headline, feature list and CTA baked
   into the artwork, so the frame keeps that ratio at every width. The previous
   16:9 / 4:3 steps cropped the sides and cut words off the design. */
.slider-band .hero-slides { aspect-ratio: 8 / 3; }
.hero-slider {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--navy-900);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: var(--shadow-lg);
}
.hero-slides { position: relative; aspect-ratio: 16 / 10; }
.slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.9s var(--ease), visibility 0.9s var(--ease);
}
.slide.is-active { opacity: 1; visibility: visible; }
/* picture must be block + full height, or the img's height:100% has nothing to resolve against */
.slide picture { display: block; height: 100%; }
.slide img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Dark wash over each banner - heaviest along the top edge and fading out, so
   the band reads darker at the top without dimming the whole artwork. */
.slide::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(
    to bottom,
    rgba(7, 26, 46, 0.25) 0%,
    rgba(7, 26, 46, 0.10) 32%,
    rgba(7, 26, 46, 0) 70%
  );
}

.slider-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  background: rgba(7, 26, 46, 0.45);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-sm);
  color: #fff;
  cursor: pointer;
  transition: background-color var(--t-med) var(--ease), color var(--t-med) var(--ease);
  z-index: 2;
}
.slider-arrow:hover { background: var(--red); color: #fff; }
.slider-arrow.prev { left: 14px; }
.slider-arrow.next { right: 14px; }

.slider-dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 15px;
  display: flex;
  justify-content: center;
  gap: 8px;
  z-index: 2;
}
.slider-dots button {
  width: 22px;
  height: 6px;
  border: 0;
  padding: 0;
  border-radius: var(--radius-xs);
  background: rgba(255, 255, 255, 0.38);
  cursor: pointer;
  transition: background-color var(--t-med) var(--ease), width var(--t-med) var(--ease);
}
.slider-dots button.is-active { background: var(--red); width: 32px; }

/* ---------- Trust strip ---------- */

.trust-strip { border-bottom: 1px solid var(--line); }
.trust-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  padding: 30px 0;
}
.trust-item { display: flex; align-items: center; gap: 14px; }
.trust-icon {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: var(--radius-sm);
  background: var(--navy-soft);
  color: var(--navy-700);
  display: grid;
  place-items: center;
  transition: background-color var(--t-med) var(--ease), color var(--t-med) var(--ease),
              transform var(--t-med) var(--ease);
}
.trust-item:hover .trust-icon { background: var(--red-soft); color: var(--red); transform: translateY(-3px); }
.trust-item strong { display: block; color: var(--ink); font-size: 0.96rem; }
.trust-item span { font-size: 0.85rem; color: var(--slate-light); }

/* ---------- Categories (compact strip panel) ---------- */

.cat-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.cat-cell {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 24px 26px;
  color: inherit;
  border-left: 1px solid var(--line);
  transition: background-color var(--t-med) var(--ease);
}
.cat-cell:first-child { border-left: 0; }
.cat-cell:hover { background: var(--bg-soft); color: inherit; }
.cat-cell-icon {
  width: 46px;
  height: 46px;
  flex-shrink: 0;
  border-radius: var(--radius-sm);
  background: var(--navy-soft);
  color: var(--navy-700);
  display: grid;
  place-items: center;
  transition: background-color var(--t-med) var(--ease), color var(--t-med) var(--ease);
}
.cat-cell:hover .cat-cell-icon { background: var(--red); color: #fff; }
.cat-cell-body { flex-grow: 1; min-width: 0; }
.cat-cell-body strong {
  display: block;
  font-family: var(--font-head);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.25;
}
.cat-cell-body span { display: block; font-size: 0.86rem; color: var(--slate-light); margin-top: 2px; }
.cat-cell-arrow {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  border-radius: var(--radius-xs);
  display: grid;
  place-items: center;
  background: var(--bg-soft);
  color: var(--slate-light);
  transition: background-color var(--t-med) var(--ease), color var(--t-med) var(--ease),
              transform var(--t-med) var(--ease);
}
.cat-cell-arrow .icon { width: 16px; height: 16px; }
.cat-cell:hover .cat-cell-arrow { background: var(--red); color: #fff; transform: translateX(3px); }

@media (max-width: 760px) {
  .cat-strip { grid-template-columns: 1fr; }
  .cat-cell { border-left: 0; border-top: 1px solid var(--line); }
  .cat-cell:first-child { border-top: 0; }
}

/* ---------- Filter tabs ---------- */

.filter-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 9px;
  margin: 26px 0 34px;
}
.tab {
  padding: 10px 20px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.94rem;
  font-weight: 700;
  color: var(--slate);
  cursor: pointer;
  transition: background-color var(--t-med) var(--ease), color var(--t-med) var(--ease),
              border-color var(--t-med) var(--ease);
}
.tab:hover { border-color: var(--red); color: var(--red); }
.tab.active { background: var(--navy-800); border-color: var(--navy-800); color: #fff; }

/* ---------- Course cards ---------- */

.course-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }

/* Soft entrance after AJAX swap */
.fade-swap { animation: gridIn 0.6s var(--ease) both; }
@keyframes gridIn {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}

.grid-note {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--slate-light);
  padding: 32px 0;
}

.course-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform var(--t-med) var(--ease), box-shadow var(--t-med) var(--ease),
              border-color var(--t-med) var(--ease);
}
.course-card:hover {
  transform: translateY(-6px);
  border-color: #B9C9DE;
  box-shadow: var(--shadow-md);
}

.course-media { position: relative; display: block; aspect-ratio: 8 / 5; overflow: hidden; background: var(--navy-800); }
.course-media picture { display: block; height: 100%; }
.course-media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.7s var(--ease); }
.course-card:hover .course-media img { transform: scale(1.05); }

/* Dark overlay over card images (badges stay above it) */
.course-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(7, 26, 46, 0.06);
  transition: background-color var(--t-med) var(--ease);
  pointer-events: none;
}
.course-card:hover .course-media::after { background: rgba(7, 26, 46, 0.14); }

.badge {
  position: absolute;
  display: inline-block;
  padding: 4px 10px;
  border-radius: var(--radius-xs);
  font-size: 0.71rem;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  z-index: 2;
}
/* Category sits bottom-right on a white chip so the exam name reads clearly
   over any artwork. The course TYPE is not shown here - it leads the
   .course-meta line of plain facts below. */
.badge-cat { bottom: 12px; right: 12px; background: #fff; color: #000; }

.course-body { display: flex; flex-direction: column; flex-grow: 1; padding: 18px 20px 20px; }
.course-title { font-size: 1.1rem; line-height: 1.42; margin: 0 0 7px; }
.course-title a {
  color: var(--ink);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color var(--t-fast) var(--ease);
}
.course-title a:hover { color: var(--red); }

.course-excerpt {
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--slate);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 12px;
}

/* Inline course facts under the excerpt: icon + name, separated by | so they
   read as one line of plain metadata rather than chips. */
.course-meta {
  margin: 0 0 14px;
  font-size: 0.85rem;
  line-height: 1.9;
  color: var(--slate);
}
.meta-item { display: inline-flex; align-items: center; gap: 6px; vertical-align: middle; }
.meta-item .icon-sm { color: var(--red); }
.meta-sep { margin: 0 9px; color: var(--slate-light); opacity: 0.65; }

/* Pricing footer. A stacked block - price line, then a full-width CTA - reads far
   better in a narrow card than one cramped row, and gives the action a proper
   tap target. */
.course-foot {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 11px;
  margin-top: auto;
  margin-left: -20px;
  margin-right: -20px;
  padding: 16px 20px 0;
  border-top: 1px solid var(--line);
}

.course-foot .price-row { align-items: baseline; gap: 9px; width: 100%; }
.course-foot .amount {
  font-family: var(--font-head);
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.5px;
  color: var(--navy-800);
}
.course-foot .was { font-size: 0.92rem; color: var(--slate-light); }

/* Perk badge sits at the far end of the price line */
.course-foot .perk-badge { margin-left: auto; align-self: center; }

/* Full-width CTA - hovering anywhere on the card warms it up, so the card feels
   alive without needing a pointer over the button itself. */
.course-card:hover .course-cta { background: var(--red-dark); box-shadow: var(--shadow-sm); }

/* ---------- Skeleton loaders (pulse, no gradient shimmer) ---------- */

.skeleton-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }

.skeleton-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  animation: sk-in 0.4s var(--ease) both;
}
@keyframes sk-in {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}
.sk {
  background: #E7EDF5;
  border-radius: var(--radius-xs);
  animation: sk-pulse 1.8s ease-in-out infinite;
}
@keyframes sk-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.55; }
}
.sk-media { aspect-ratio: 8 / 5; border-radius: 0; }
.sk-body { padding: 18px 20px 20px; }
.sk-line { height: 13px; margin-bottom: 11px; }
.sk-line.w85 { width: 85%; }
.sk-line.w60 { width: 60%; }
.sk-line.h18 { height: 18px; }
.sk-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 18px; margin-left: -20px; margin-right: -20px; padding: 15px 20px 0; border-top: 1px solid var(--line); }
.sk-price { width: 62px; height: 22px; margin: 0; }
.sk-btn { width: 92px; height: 36px; border-radius: var(--radius-sm); margin: 0; }

/* ---------- Why Quarks (radial orbit on white) ---------- */

.why { background: #fff; }

.why-orbit {
  position: relative;
  max-width: 980px;
  min-height: 800px;
  margin: 0 auto;
}

.orbit-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  translate: -50% -50%;
  border-radius: 50%;
  pointer-events: none;
  z-index: 1;
}
.ring-dashed {
  width: 570px;
  height: 570px;
  border: 1.5px dashed #C7D5E5;
  animation: orbitSpin 90s linear infinite;
}
.ring-solid {
  width: 710px;
  height: 710px;
  border: 1px solid var(--line);
}
@keyframes orbitSpin {
  to { transform: rotate(360deg); }
}

.why-center {
  position: absolute;
  top: 50%;
  left: 50%;
  translate: -50% -50%;
  z-index: 2;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 34px;
}
.why-center h2 { font-size: 1.55rem; margin: 10px 0 8px; }
.why-center .section-sub { margin-top: 0; font-size: 0.93rem; }
.why-center .btn { margin-top: 16px; }

.why-items { display: contents; }

.why-item {
  position: absolute;
  z-index: 3;
  width: 210px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 18px;
  transition: transform var(--t-med) var(--ease), box-shadow var(--t-med) var(--ease),
              border-color var(--t-med) var(--ease);
}
.why-orbit .why-item:hover {
  transform: translateY(-5px);
  border-color: rgba(200, 16, 46, 0.35);
  box-shadow: var(--shadow-md);
}
.pos-1 { top: 7%;  left: 50%; translate: -50% -50%; }
.pos-2 { top: 25%; left: 90%; translate: -50% -50%; }
.pos-3 { top: 75%; left: 90%; translate: -50% -50%; }
.pos-4 { top: 93%; left: 50%; translate: -50% -50%; }
.pos-5 { top: 75%; left: 10%; translate: -50% -50%; }
.pos-6 { top: 25%; left: 10%; translate: -50% -50%; }

.why-num {
  position: absolute;
  top: 12px;
  right: 14px;
  font-family: var(--font-head);
  font-size: 1.7rem;
  font-weight: 800;
  line-height: 1;
  color: rgba(10, 35, 64, 0.08);
  transition: color var(--t-med) var(--ease);
}
.why-item:hover .why-num { color: rgba(200, 16, 46, 0.35); }
.why-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: var(--red);
  color: #fff;
  display: grid;
  place-items: center;
  margin-bottom: 12px;
  transition: transform var(--t-med) var(--ease);
}
.why-icon .icon { width: 18px; height: 18px; }
.why-item:hover .why-icon { transform: scale(1.08) rotate(-4deg); }
.why-item h3 { color: var(--ink); font-size: 1.02rem; margin-bottom: 5px; }
.why-item p { font-size: 0.87rem; line-height: 1.55; color: var(--slate); margin: 0; }

@media (max-width: 1020px) {
  .why-orbit { min-height: 0; }
  .orbit-ring, .why-num { display: none; }
  .why-center {
    position: static;
    translate: none;
    width: auto;
    max-width: 460px;
    height: auto;
    margin: 0 auto 28px;
    border-radius: var(--radius);
    padding: 30px 28px;
  }
  .why-items { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .why-item { position: static; translate: none; width: auto; }
}
@media (max-width: 640px) {
  .why-items { grid-template-columns: 1fr; }
}

/* ---------- CTA band ---------- */

.cta-band { background: var(--red); padding: 54px 0; }
.cta-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 36px;
  flex-wrap: wrap;
}
.cta-inner h2 { font-size: clamp(1.55rem, 2.8vw, 2.05rem); color: #fff; margin: 0 0 7px; }
.cta-inner p { color: rgba(255, 255, 255, 0.92); font-size: 1.03rem; margin: 0; max-width: 560px; }
.cta-actions { display: flex; gap: 13px; flex-wrap: wrap; }

/* ---------- Page hero (shared by every inner page) ----------
   Two-column hero built by page_hero() in includes/functions.php. The left
   column is structurally identical everywhere (breadcrumb -> eyebrow -> h1 ->
   lead -> actions -> checks -> facts); only the right-hand panel changes per
   page, so each page gets its own visual anchor without the shell drifting.
   A page can retune its column ratio with the --ph-cols custom property. */

.page-hero {
  position: relative;
  overflow: hidden;
  background: var(--navy-800);
  color: #fff;
  padding: 54px 0 58px;
}
.page-hero::before,
.page-hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: var(--navy-700);
  pointer-events: none;
}
.page-hero::before { width: 540px; height: 540px; top: -260px; right: -170px; }
.page-hero::after { width: 360px; height: 360px; bottom: -230px; left: -170px; }

/* Soft red bloom that lifts the right-hand panel off the flat navy */
.ph-glow {
  position: absolute;
  top: -130px;
  right: -40px;
  width: 560px;
  height: 560px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(200, 16, 46, 0.32) 0%, rgba(200, 16, 46, 0) 68%);
  pointer-events: none;
}

.ph-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: var(--ph-cols, 1.04fr 0.96fr);
  gap: 54px;
  align-items: center;
}

/* ----- Left column: identical on every page ----- */

.ph-copy { min-width: 0; }

.ph-copy h1 {
  margin: 18px 0 0;
  font-size: clamp(1.95rem, 3.6vw, 2.6rem);
  font-weight: 800;
  line-height: 1.16;
  color: #fff;
}
.ph-copy .lead {
  margin: 14px 0 0;
  max-width: 560px;
  font-size: 1.04rem;
  line-height: 1.75;
  color: #C2D0E2;
}

.ph-facts {
  display: flex;
  flex-wrap: wrap;
  row-gap: 18px;
  margin-top: 34px;
  padding-top: 26px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}
.ph-facts .fact { padding: 0 26px; border-left: 1px solid rgba(255, 255, 255, 0.14); }
.ph-facts .fact:first-child { padding-left: 0; border-left: 0; }
.fact-value {
  display: block;
  font-family: var(--font-head);
  font-size: 1.45rem;
  font-weight: 800;
  line-height: 1.15;
  color: var(--red-bright);
}
.fact-label { display: block; font-size: 0.86rem; color: #A9BAD1; margin-top: 3px; white-space: nowrap; }

.ph-checks { list-style: none; margin: 26px 0 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.ph-checks li { display: flex; align-items: flex-start; gap: 11px; font-size: 0.97rem; line-height: 1.6; color: #D7E0EC; }
.ph-checks .icon { flex-shrink: 0; margin-top: 4px; color: var(--red-bright); }

.breadcrumb { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 0.9rem; color: #9FB2CA; }
.breadcrumb a { color: #C2D0E2; }
.breadcrumb a:hover { color: var(--red-bright); }
.breadcrumb .sep { opacity: 0.5; }
.breadcrumb .current { color: var(--red-bright); font-weight: 700; }

/* ----- Right column: panel shell + shared panel primitives ----- */

.ph-panel { position: relative; min-width: 0; }

/* Frosted card - the default surface for panel content */
.ph-card {
  position: relative;
  background: var(--glass-dark-bg);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-dark-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 26px;
  color: #fff;
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .ph-card { background: rgba(255, 255, 255, 0.1); }
}

.ph-card-head { display: flex; align-items: center; gap: 13px; margin-bottom: 20px; }
.ph-ico {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.13);
  color: #fff;
}
.ph-card-title { font-family: var(--font-head); font-size: 1.02rem; font-weight: 700; color: #fff; margin: 0; line-height: 1.3; }
.ph-card-sub { font-size: 0.83rem; color: #A9BAD1; margin: 3px 0 0; }

/* Tappable rows - contact, pay fees, dashboard, 404 */
.ph-rows { display: flex; flex-direction: column; gap: 2px; }
.ph-row {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 11px 12px;
  border-radius: var(--radius-sm);
  color: #fff;
  transition: background-color var(--t-med) var(--ease);
}
.ph-row .ph-ico { width: 36px; height: 36px; background: rgba(255, 255, 255, 0.1); }
.ph-row .ph-ico .icon { width: 17px; height: 17px; }
a.ph-row:hover { background: rgba(255, 255, 255, 0.1); color: #fff; }
.ph-row-label { display: block; font-size: 0.73rem; font-weight: 700; letter-spacing: 1.1px; text-transform: uppercase; color: #9FB2CA; }
.ph-row-value { display: block; font-size: 0.95rem; font-weight: 700; color: #fff; word-break: break-word; }
.ph-tag {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 9px;
  border-radius: var(--radius-xs);
  background: rgba(255, 255, 255, 0.14);
  font-size: 0.72rem;
  font-weight: 700;
  vertical-align: middle;
}
.ph-tag.ok { background: rgba(64, 196, 132, 0.18); color: #7CE2AE; }
.ph-go { margin-left: auto; flex-shrink: 0; color: #9FB2CA; transition: transform var(--t-med) var(--ease), color var(--t-med) var(--ease); }
a.ph-row:hover .ph-go { color: var(--red-bright); transform: translateX(3px); }

/* Wide action button inside a panel */
.ph-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 100%;
  margin-top: 18px;
  padding: 13px 20px;
  border-radius: var(--radius-sm);
  background: var(--red);
  color: #fff;
  font-family: var(--font-body);
  font-size: 0.97rem;
  font-weight: 700;
  transition: background-color var(--t-fast) var(--ease);
}
.ph-btn:hover { background: var(--red-dark); color: #fff; }
.ph-btn.ghost { background: transparent; border: 1px solid rgba(255, 255, 255, 0.4); }
.ph-btn.ghost:hover { background: #fff; border-color: #fff; color: var(--navy-800); }

/* ----- Panel: courses (browse by category) ----- */

.ph-courses { --ph-cols: 1.06fr 0.94fr; }

.ph-cats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.ph-cat {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 9px;
  padding: 16px;
  border: 1px solid var(--glass-dark-border);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  transition: background-color var(--t-med) var(--ease), border-color var(--t-med) var(--ease),
              transform var(--t-med) var(--ease);
}
.ph-cat:hover {
  background: rgba(255, 255, 255, 0.13);
  border-color: rgba(242, 96, 115, 0.55);
  transform: translateY(-3px);
  color: #fff;
}
.ph-cat .icon { color: var(--red-bright); }
.ph-cat-name { font-family: var(--font-head); font-size: 0.94rem; font-weight: 700; color: #fff; line-height: 1.3; }
.ph-cat-count { font-size: 0.78rem; color: #A9BAD1; }

/* ----- Panel: course detail (artwork) ----- */

.ph-course { --ph-cols: 1fr 0.98fr; }

.ph-course-img {
  position: relative;
  border: 1px solid var(--glass-dark-border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.ph-course-img picture { display: block; }
.ph-course-img img { width: 100%; aspect-ratio: 8 / 5; object-fit: cover; display: block; }
.ph-course-tag {
  position: absolute;
  top: 15px;
  left: 15px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  border-radius: var(--radius-xs);
  background: rgba(255, 255, 255, 0.94);
  color: var(--navy-800);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 1.1px;
  text-transform: uppercase;
}

/* ----- Panel: gallery (photo collage) ----- */

.ph-gallery { --ph-cols: 1fr 1fr; }

.ph-collage {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  grid-template-rows: repeat(2, 1fr);
  gap: 12px;
  height: 330px;
}
.ph-collage figure {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--glass-dark-border);
  border-radius: var(--radius-sm);
  background: var(--navy-700);
}
.ph-collage figure:first-child { grid-row: span 2; }
.ph-collage img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.9s var(--ease); }
.ph-collage figure:hover img { transform: scale(1.06); }
.ph-collage-badge {
  position: absolute;
  bottom: -16px;
  left: -16px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 20px;
  border-radius: var(--radius-sm);
  background: var(--red);
  box-shadow: var(--shadow-md);
  color: #fff;
}
.ph-collage-badge .icon { flex-shrink: 0; }
.ph-collage-badge strong { font-family: var(--font-head); font-size: 1.25rem; font-weight: 800; line-height: 1.1; }
.ph-collage-badge span { font-size: 0.9rem; color: rgba(255, 255, 255, 0.92); }

/* ----- Panel: faculty (team cluster) ----- */

.ph-faculty { --ph-cols: 1.02fr 0.98fr; }

.ph-avatars { display: flex; align-items: center; padding-left: 16px; }
.ph-ava {
  width: 60px;
  height: 60px;
  flex-shrink: 0;
  margin-left: -16px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid var(--navy-800);
  background: var(--navy-700);
  transition: transform var(--t-med) var(--ease);
}
.ph-ava img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ph-ava:hover { transform: translateY(-6px) scale(1.06); }
.ph-ava-more {
  display: grid;
  place-items: center;
  font-family: var(--font-head);
  font-size: 0.92rem;
  font-weight: 800;
  color: #fff;
  background: var(--red);
}
.ph-subjects { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.ph-subject {
  padding: 6px 13px;
  border-radius: var(--radius-xs);
  border: 1px solid var(--glass-dark-border);
  background: rgba(255, 255, 255, 0.07);
  font-size: 0.82rem;
  font-weight: 700;
  color: #D7E0EC;
}
.ph-team-note { margin: 20px 0 18px; font-size: 0.92rem; line-height: 1.65; color: #C2D0E2; }
.ph-team-label {
  display: block;
  margin-bottom: 11px;
  font-size: 0.73rem;
  font-weight: 700;
  letter-spacing: 1.1px;
  text-transform: uppercase;
  color: #9FB2CA;
}

/* ----- Panel: pay fees (UPI) ----- */

.ph-pay { --ph-cols: 1fr 1fr; }

.ph-amount-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}
.ph-amount-row .amt { font-family: var(--font-head); font-size: 1.8rem; font-weight: 800; line-height: 1.1; color: #fff; }
.ph-amount-row .amt-note { font-size: 0.85rem; color: #A9BAD1; margin-left: auto; text-align: right; }

.ph-upi {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 15px;
  border: 1px dashed rgba(255, 255, 255, 0.3);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.1);
}
.ph-upi-value { font-family: var(--font-head); font-size: 1rem; font-weight: 700; color: #fff; word-break: break-all; }
.ph-upi .ph-row-label { margin-bottom: 3px; }
.ph-copybtn {
  margin-left: auto;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 14px;
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: var(--radius-xs);
  background: transparent;
  color: #fff;
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: background-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease),
              border-color var(--t-fast) var(--ease);
}
.ph-copybtn:hover { background: #fff; border-color: #fff; color: var(--navy-800); }
.ph-copybtn.is-done { background: var(--red); border-color: var(--red); color: #fff; }
.ph-pay-note { margin: 16px 0 0; font-size: 0.87rem; line-height: 1.65; color: #A9BAD1; }

/* ----- Panel: dashboard (account) ----- */

.ph-dash { --ph-cols: 1fr 0.92fr; }

.ph-avatar {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  margin-bottom: 16px;
  border-radius: 50%;
  background: var(--red);
  color: #fff;
  font-family: var(--font-head);
  font-size: 1.55rem;
  font-weight: 800;
  text-transform: uppercase;
}
.ph-owed { margin: 16px 0 0; padding: 14px 16px; border-radius: var(--radius-sm); background: rgba(255, 255, 255, 0.08); }
.ph-owed .ph-row-label { margin-bottom: 3px; }
.ph-owed p { margin: 0; font-size: 0.9rem; line-height: 1.6; color: #D7E0EC; }

/* ----- Panel: login (auth card reuses the slot) ----- */

.ph-auth { --ph-cols: 1fr 0.9fr; padding: 58px 0 62px; }
.ph-auth .auth-card { max-width: none; width: 100%; margin: 0; }

@media (max-width: 1080px) {
  .ph-grid { grid-template-columns: 1fr; gap: 40px; }
  .ph-copy .lead { max-width: 640px; }
  .ph-panel { max-width: 620px; }
  .ph-collage { height: 300px; }
  .ph-ava { width: 54px; height: 54px; }
  .ph-avatars { padding-left: 14px; }
  .ph-ava { margin-left: -14px; }
}

@media (max-width: 640px) {
  .page-hero { padding: 42px 0 46px; }
  .ph-auth { padding: 46px 0 50px; }
  .ph-facts { margin-top: 28px; padding-top: 22px; row-gap: 15px; }
  .ph-facts .fact { padding: 0 16px; }
  .fact-value { font-size: 1.25rem; }
  .ph-collage { height: 240px; }
  .ph-collage-badge { left: 12px; bottom: 12px; padding: 10px 16px; }
  .ph-collage-badge strong { font-size: 1.1rem; }
  .ph-cats { grid-template-columns: 1fr; }
  .ph-card { padding: 22px 20px; }
  .ph-upi { flex-wrap: wrap; }
  .ph-copybtn { margin-left: 0; }
  .ph-amount-row .amt-note { margin-left: 0; width: 100%; text-align: left; }
}

/* ---------- Course detail ---------- */

.course-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 370px;
  gap: 36px;
  align-items: start;
}

.detail-block { margin-bottom: 30px; }
.detail-block h2 { font-size: 1.42rem; margin-bottom: 14px; }
.detail-block p { font-size: 1rem; line-height: 1.78; color: var(--slate); }
.detail-block p + p { margin-top: 13px; }

.feature-list li {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.99rem;
  color: var(--ink);
  transition: padding-left var(--t-med) var(--ease);
}
.feature-list li:hover { padding-left: 5px; }
.feature-list li:last-child { border-bottom: 0; }
.feature-list .tick {
  width: 25px;
  height: 25px;
  flex-shrink: 0;
  border-radius: var(--radius-xs);
  background: var(--red-soft);
  color: var(--red);
  display: grid;
  place-items: center;
  margin-top: 1px;
}
.feature-list .tick .icon { width: 13px; height: 13px; }

.course-side-card {
  position: sticky;
  top: 100px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 26px;
}
.side-price { display: flex; align-items: baseline; gap: 10px; }
.side-price .amount { font-family: var(--font-head); font-size: 1.7rem; font-weight: 800; color: var(--navy-800); }
.side-price .was { font-size: 0.98rem; color: var(--slate-light); }
.side-note { font-size: 0.84rem; color: var(--slate-light); margin-top: 3px; }

.side-list { margin: 18px 0; padding-top: 18px; border-top: 1px solid var(--line); }
.side-list li {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 6px 0;
  font-size: 0.94rem;
  color: var(--slate);
}
.side-list .icon-sm { color: var(--navy-600); }

.side-actions { display: flex; flex-direction: column; gap: 11px; }
.side-call {
  text-align: center;
  font-size: 0.91rem;
  color: var(--slate);
  margin-top: 6px;
}
.side-call a { font-weight: 700; color: var(--navy-600); }
.side-call a:hover { color: var(--red); }

/* ---------- Faculty ---------- */

.faculty-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }

.faculty-card {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  scroll-margin-top: 96px;   /* deep links clear the sticky header */
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform var(--t-med) var(--ease), box-shadow var(--t-med) var(--ease),
              border-color var(--t-med) var(--ease);
}
.faculty-card:hover { transform: translateY(-6px); border-color: #B9C9DE; box-shadow: var(--shadow-md); }

/* Accent bar fills on hover - same language as the category cards */
.fc-accent {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 3;
  width: 0;
  height: 4px;
  background: var(--red);
  transition: width 0.6s var(--ease);
}
.faculty-card:hover .fc-accent { width: 100%; }

.fc-photo { position: relative; aspect-ratio: 5 / 4; overflow: hidden; background: var(--navy-800); }
.fc-photo img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 0.7s var(--ease); }
.faculty-card:hover .fc-photo img { transform: scale(1.04); }

.fc-dept,
.fc-exp {
  position: absolute;
  z-index: 2;
  padding: 4px 10px;
  border-radius: var(--radius-xs);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.fc-dept { top: 12px; left: 12px; background: rgba(7, 26, 46, 0.86); }
.fc-exp { right: 12px; bottom: 12px; background: var(--red); letter-spacing: 0.4px; }

.fc-body { display: flex; flex-direction: column; flex-grow: 1; padding: 20px 22px 22px; }
.fc-name { font-size: 1.16rem; margin: 0 0 3px; }
.fc-role { margin: 0 0 14px; font-size: 0.85rem; font-weight: 700; color: var(--navy-600); }

.fc-meta {
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 14px 0;
  margin-bottom: 14px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.fc-meta li { display: flex; align-items: flex-start; gap: 9px; font-size: 0.88rem; color: var(--slate); }
.fc-meta .icon-sm { flex-shrink: 0; margin-top: 3px; color: var(--red); }

.fc-bio {
  margin: 0 0 14px;
  font-size: 0.9rem;
  line-height: 1.62;
  color: var(--slate);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.fc-tags { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 18px; }
.fc-tags li {
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-xs);
  background: var(--bg-soft);
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--slate);
}

.fc-foot {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: auto;
  margin-left: -22px;
  margin-right: -22px;
  padding: 16px 22px 0;
  border-top: 1px solid var(--line);
}
.fc-foot .btn { flex-grow: 1; }
.fc-mail {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  border: 2px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--navy-600);
  transition: background-color var(--t-med) var(--ease), border-color var(--t-med) var(--ease),
              color var(--t-med) var(--ease);
}
.fc-mail:hover { background: var(--red); border-color: var(--red); color: #fff; }

/* ---------- Faculty skeletons ---------- */

.faculty-skeleton-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.sk-fac-photo { aspect-ratio: 5 / 4; border-radius: 0; }
.sk-tags { display: flex; gap: 7px; margin: 14px 0 18px; }
.sk-tag { width: 76px; height: 26px; }
.sk-btn.wide { width: auto; flex-grow: 1; }
.sk-icon-btn { width: 42px; height: 42px; flex-shrink: 0; border-radius: var(--radius-sm); }

/* ---------- Homepage masonry gallery ---------- */

.masonry { columns: 3; column-gap: 18px; }
.m-item {
  break-inside: avoid;
  margin: 0 0 18px;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-sm);
}
.m-item img {
  width: 100%;
  display: block;
  object-fit: cover;
  transition: transform 0.7s var(--ease);
}
.m-item:hover img { transform: scale(1.05); }
/* varied heights create the masonry rhythm */
.m-item:nth-child(6n+1) img { aspect-ratio: 4 / 5; }
.m-item:nth-child(6n+2) img { aspect-ratio: 4 / 3; }
.m-item:nth-child(6n+3) img { aspect-ratio: 1 / 1; }
.m-item:nth-child(6n+4) img { aspect-ratio: 3 / 4; }
.m-item:nth-child(6n+5) img { aspect-ratio: 5 / 4; }
.m-item:nth-child(6n+6) img { aspect-ratio: 5 / 6; }
.m-item figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(7, 26, 46, 0.88);
  color: #fff;
  font-size: 0.88rem;
  font-weight: 700;
  padding: 10px 15px;
  transform: translateY(100%);
  transition: transform var(--t-med) var(--ease);
}
.m-item:hover figcaption { transform: translateY(0); }

@media (max-width: 900px) { .masonry { columns: 2; } }
@media (max-width: 560px) { .masonry { columns: 1; } }

/* ---------- Contact ---------- */

/* Quick-contact tiles + a card per branch (the message form was removed). */
.contact-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }

.contact-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 26px 20px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  text-align: center;
  color: inherit;
  transition: transform var(--t-med) var(--ease), box-shadow var(--t-med) var(--ease),
              border-color var(--t-med) var(--ease);
}
.contact-tile .ct-icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  margin-bottom: 6px;
  border-radius: var(--radius-sm);
  background: var(--navy-soft);
  color: var(--navy-700);
  transition: background-color var(--t-med) var(--ease), color var(--t-med) var(--ease);
}
.contact-tile .ct-label {
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 1.3px;
  text-transform: uppercase;
  color: var(--slate-light);
}
.contact-tile .ct-value { font-size: 0.97rem; font-weight: 700; color: var(--ink); word-break: break-word; }

/* Only the actionable tiles react - the office-hours tile is static */
a.contact-tile:hover {
  transform: translateY(-5px);
  border-color: var(--red);
  box-shadow: var(--shadow-md);
  color: inherit;
}
a.contact-tile:hover .ct-icon { background: var(--red); color: #fff; }

.branch-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.branch-card {
  position: relative;
  overflow: hidden;
  padding: 30px 28px 26px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform var(--t-med) var(--ease), box-shadow var(--t-med) var(--ease),
              border-color var(--t-med) var(--ease);
}
/* Accent bar fills on hover - same language as the category/faculty cards */
.branch-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  height: 4px;
  width: 0;
  background: var(--red);
  transition: width 0.6s var(--ease);
}
.branch-card:hover::before { width: 100%; }
.branch-card:hover { transform: translateY(-5px); border-color: rgba(200, 16, 46, 0.3); box-shadow: var(--shadow-md); }

.bc-num {
  position: absolute;
  top: 16px;
  right: 22px;
  font-family: var(--font-head);
  font-size: 2.2rem;
  font-weight: 800;
  line-height: 1;
  color: rgba(10, 35, 64, 0.07);
  transition: color var(--t-med) var(--ease);
}
.branch-card:hover .bc-num { color: rgba(200, 16, 46, 0.22); }
.bc-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  margin-bottom: 14px;
  border-radius: var(--radius-sm);
  background: var(--red-soft);
  color: var(--red);
}
.bc-name { font-size: 1.22rem; margin: 0 0 8px; }
.bc-address { font-size: 0.97rem; line-height: 1.72; color: var(--slate); margin: 0 0 20px; }

@media (max-width: 1080px) { .contact-tiles { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 760px) { .branch-grid { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .contact-tiles { grid-template-columns: 1fr; } }
.info-card {
  display: flex;
  gap: 15px;
  align-items: flex-start;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
  transition: border-color var(--t-med) var(--ease), transform var(--t-med) var(--ease);
}
.info-card:hover { border-color: #B9C9DE; transform: translateY(-3px); }
.info-icon {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: var(--radius-sm);
  background: var(--navy-soft);
  color: var(--navy-700);
  display: grid;
  place-items: center;
}
.info-card strong { display: block; color: var(--ink); font-size: 0.97rem; margin-bottom: 2px; }
.info-card p, .info-card a { font-size: 0.94rem; color: var(--slate); margin: 0; word-break: break-word; }
.info-card a:hover { color: var(--red); }

.form-card {
  background: rgba(255, 255, 255, 0.85);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px;
  box-shadow: var(--shadow-sm);
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .form-card { background: #fff; }
}
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-field { display: flex; flex-direction: column; }
.form-field.full { grid-column: 1 / -1; }
.form-field label { font-size: 0.89rem; font-weight: 700; color: var(--ink); margin-bottom: 7px; }
.form-control {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid #D5DEEA;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--ink);
  background: #fff;
  transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}
.form-control:focus {
  outline: none;
  border-color: var(--navy-600);
  box-shadow: 0 0 0 3px rgba(21, 75, 125, 0.13);
}
.form-control:disabled { background: var(--bg-soft); color: var(--slate); }
textarea.form-control { resize: vertical; min-height: 120px; }
.form-hint { font-size: 0.83rem; color: var(--slate-light); margin-top: 6px; display: inline-flex; align-items: center; gap: 6px; }
.form-hint .icon-sm { color: var(--red); }

.otp-input {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 12px;
  text-align: center;
  font-family: var(--font-body);
}
.auth-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 18px;
}
.auth-meta form { margin: 0; }
.linklike {
  background: none;
  border: 0;
  padding: 4px 2px;
  font-family: var(--font-body);
  font-size: 0.94rem;
  font-weight: 700;
  color: var(--navy-600);
  cursor: pointer;
  transition: color var(--t-fast) var(--ease);
}
.linklike:hover { color: var(--red); }
.dot-sep { width: 4px; height: 4px; border-radius: 50%; background: var(--slate-light); }

/* ---------- Alerts / flash ---------- */

.alert {
  border-radius: var(--radius-sm);
  border: 1px solid;
  padding: 13px 16px;
  font-size: 0.94rem;
  margin-bottom: 18px;
}
.alert ul { margin: 0; padding-left: 18px; list-style: disc; }
.alert-success { background: var(--green-soft); border-color: var(--green-line); color: var(--green-text); }
.alert-error { background: var(--red-soft); border-color: var(--red-line); color: var(--red-err-text); }
.flash-wrap { padding-top: 18px; }

/* ---------- Auth pages ---------- */

/* The login page now sits in the shared two-column page hero (see .ph-auth), so
   .auth-card is just the panel surface there and keeps its standalone look. */
.auth-card {
  width: 100%;
  max-width: 460px;
  margin: 0 auto;
  background: rgba(255, 255, 255, 0.88);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 34px 30px;
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .auth-card { background: #fff; }
}
.auth-card h1, .auth-card h2 { font-size: 1.5rem; margin-bottom: 5px; }
.auth-card .auth-sub { font-size: 0.95rem; color: var(--slate); margin-bottom: 24px; }
.auth-card .form-field { margin-bottom: 16px; }

/* ---------- Dashboard ---------- */

.dash-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 8px; }
.dash-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  transition: transform var(--t-med) var(--ease), box-shadow var(--t-med) var(--ease);
}
.dash-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-sm); }
.dash-card .icon-box {
  width: 46px;
  height: 46px;
  border-radius: var(--radius-sm);
  background: var(--navy-soft);
  color: var(--navy-700);
  display: grid;
  place-items: center;
  margin-bottom: 4px;
}
.dash-card h3 { font-size: 1.08rem; margin: 0; }
.dash-card p { font-size: 0.92rem; color: var(--slate); margin: 0; }
.dash-card .btn { align-self: flex-start; margin-top: 6px; }
.empty-note {
  background: var(--bg);
  border: 1px dashed #C6D3E4;
  border-radius: var(--radius);
  padding: 28px;
  text-align: center;
  color: var(--slate);
}

/* ---------- Pay fees ---------- */

.steps-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; counter-reset: step; }
.step-card {
  position: relative;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 24px;
  transition: transform var(--t-med) var(--ease), box-shadow var(--t-med) var(--ease);
}
.step-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-sm); }
.step-num {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: var(--red);
  color: #fff;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.1rem;
  margin-bottom: 14px;
}
.step-card h3 { font-size: 1.12rem; margin-bottom: 7px; }
.step-card p { font-size: 0.94rem; color: var(--slate); margin: 0; }

.notice-band {
  display: flex;
  gap: 15px;
  align-items: flex-start;
  background: var(--red-soft);
  border: 1px solid var(--red-line);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-top: 40px;
}
.notice-band .icon { color: var(--red); margin-top: 3px; }
.notice-band p { margin: 0; font-size: 0.95rem; color: #7A1526; }

/* ---------- 404 ---------- */

/* ---------- Footer ---------- */

.site-footer {
  background: var(--navy-900);
  color: #A9BAD1;
  font-size: 0.94rem;
  padding-top: 56px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);   /* full-width divider above footer */
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1.2fr 1.4fr;
  gap: 40px;
  padding-bottom: 42px;
}
.footer-brand .brand-text strong { color: #fff; }
.footer-brand .brand-sub,
.footer-brand .brand-text small { color: var(--red-bright); }
.footer-brand p { color: #8FA3BD; font-size: 0.92rem; line-height: 1.68; margin: 16px 0; max-width: 300px; }

.social-row { display: flex; gap: 9px; }
.social-row a {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius-sm);
  color: #C2D0E2;
  transition: background-color var(--t-med) var(--ease), border-color var(--t-med) var(--ease),
              color var(--t-med) var(--ease), transform var(--t-med) var(--ease);
}
.social-row a:hover {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
  transform: translateY(-3px);
}

.widget-title {
  color: #fff;
  font-size: 1rem;
  margin-bottom: 16px;
  position: relative;
  padding-bottom: 10px;
}
.widget-title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 28px;
  height: 3px;
  border-radius: var(--radius-xs);
  background: var(--red);
}

.footer-links li { margin-bottom: 9px; }
.footer-links a { color: #A9BAD1; transition: color var(--t-fast) var(--ease), padding-left var(--t-fast) var(--ease); }
.footer-links a:hover { color: #fff; padding-left: 4px; }

.footer-contact li { display: flex; gap: 11px; margin-bottom: 12px; }
.footer-contact .icon-sm { color: var(--red-bright); margin-top: 4px; }
.footer-contact a { color: #A9BAD1; }
.footer-contact a:hover { color: #fff; }

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.09);
  padding: 18px 0;
}
.footer-bottom-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 0.87rem;
  color: #7E92AC;
}

/* ---------- Reveal on scroll (slow, smooth, always visible) ---------- */

.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.85s var(--ease), transform 0.85s var(--ease);
  transition-delay: var(--rd, 0ms);
}
.reveal.from-left { transform: translateX(-40px); }
.reveal.from-right { transform: translateX(40px); }
.reveal.zoom-in { transform: scale(0.94); }
.reveal.in { opacity: 1; transform: none; }
/* NOTE: no prefers-reduced-motion override - infinite loops (shine, skeleton
   pulse) must never be compressed to 0.01ms, which causes rapid blinking on
   systems with "animation effects" turned off in the OS. */

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 1080px) {
  .hero-grid { grid-template-columns: 1fr; gap: 44px; }
  .hero-copy > p { max-width: 640px; }
  .spot-card { margin: 0; max-width: 560px; }
  .spot-deco { display: none; }
  .course-grid, .skeleton-grid, .faculty-grid, .faculty-skeleton-grid { grid-template-columns: repeat(2, 1fr); }
  .trust-grid { grid-template-columns: repeat(2, 1fr); }
  .course-detail-grid { grid-template-columns: 1fr; }
  .course-side-card { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 34px; }
}

@media (max-width: 992px) {
  .header-inner { min-height: 68px; gap: 14px; }
  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-md);
  }
  .site-header.nav-open .main-nav { display: block; }
  .main-nav ul { flex-direction: column; padding: 8px 22px 14px; gap: 0; }
  .main-nav a { display: block; padding: 13px 6px; border-top: 1px solid var(--line); font-size: 1rem; }
  .main-nav a::after { display: none; }
  .main-nav a.active { color: var(--red); }
  .nav-toggle { display: flex; margin-left: auto; }
  .header-actions { margin-left: 0; }
  .header-actions .btn-hide-sm { display: none; }
  .topbar-contact a span { display: none; }
  .topbar-contact a .icon-sm + span { display: inline; }
}

@media (max-width: 640px) {
  .section { padding: 48px 0; }
  .hero { padding: 48px 0 56px; }
  .hero-stats { margin-top: 30px; }
  .hero-stats .stat { padding: 0 16px; }
  .stat-num { font-size: 1.5rem; }
  .course-grid, .skeleton-grid, .faculty-grid, .faculty-skeleton-grid,
  .trust-grid, .steps-grid, .dash-grid,
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .form-field { grid-column: 1 / -1; }
  .header-actions .btn-sm { padding: 10px 13px; font-size: 0.87rem; }
  .brand-text strong, .brand-sub { font-size: 1.25rem; }
  .section-head { margin-bottom: 32px; }
  .footer-grid { grid-template-columns: 1fr; gap: 30px; }
  .cta-inner { flex-direction: column; align-items: flex-start; }
  .form-card { padding: 24px 20px; }
  .auth-card { padding: 28px 22px; }
  .otp-input { letter-spacing: 8px; }
  .spot-card { padding: 22px 20px 20px; }
}

/* ============================================================
   CONSOLIDATED OVERRIDES (price layout, perk badges, category
   cards v2, Plus Jakarta Sans metrics)
   ============================================================ */

.price-row { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }


.perk-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  border-radius: var(--radius-xs);
  background: var(--green-text);
  border: 1px solid var(--green-text);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1.3;
  white-space: nowrap;
}
.perk-badge .icon { width: 13px; height: 13px; }

/* Category cards v2 - numbered horizontal cards */
.cat-grid-v2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
}
.cat-card-v2 {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: flex-start;
  gap: 20px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 26px 26px 24px;
  color: inherit;
  transition: transform var(--t-med) var(--ease), box-shadow var(--t-med) var(--ease),
              border-color var(--t-med) var(--ease);
}
.cat-card-v2::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  height: 4px;
  width: 0;
  background: var(--red);
  transition: width 0.6s var(--ease);
}
.cat-card-v2:hover::before { width: 100%; }
.cat-card-v2:hover {
  transform: translateY(-5px);
  border-color: rgba(200, 16, 46, 0.3);
  box-shadow: var(--shadow-md);
  color: inherit;
}
.ccv-num {
  position: absolute;
  bottom: 8px;
  right: 14px;
  font-family: var(--font-head);
  font-size: 2.6rem;
  font-weight: 800;
  line-height: 1;
  color: rgba(10, 35, 64, 0.07);
  transition: color var(--t-med) var(--ease);
}
.cat-card-v2:hover .ccv-num { color: rgba(200, 16, 46, 0.22); }
.ccv-icon {
  width: 56px;
  height: 56px;
  flex-shrink: 0;
  border-radius: var(--radius-sm);
  background: var(--navy-soft);
  color: var(--navy-700);
  display: grid;
  place-items: center;
  transition: background-color var(--t-med) var(--ease), color var(--t-med) var(--ease),
              transform var(--t-med) var(--ease);
}
.ccv-icon .icon { width: 26px; height: 26px; }
.cat-card-v2:hover .ccv-icon { background: var(--red); color: #fff; transform: scale(1.05); }
.ccv-body { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: flex-start; gap: 3px; min-width: 0; flex-grow: 1; }
.ccv-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; width: 100%; }
.ccv-top strong { font-family: var(--font-head); font-size: 1.22rem; font-weight: 700; color: var(--ink); line-height: 1.25; }
.ccv-count {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--red);
  background: var(--red-soft);
  border-radius: var(--radius-xs);
  padding: 3px 9px;
  white-space: nowrap;
}
.ccv-tagline { font-size: 0.85rem; font-weight: 700; color: var(--navy-600); }
.ccv-desc { font-size: 0.9rem; line-height: 1.62; color: var(--slate); margin: 8px 0 12px; }
.ccv-link { display: inline-flex; align-items: center; gap: 7px; font-weight: 700; font-size: 0.93rem; color: var(--navy-600); }
.cat-card-v2:hover .ccv-link { color: var(--red); }
.cat-card-v2:hover .ccv-link .icon { transform: translateX(4px); }
.ccv-link .icon { transition: transform var(--t-med) var(--ease); }

@media (max-width: 1000px) { .cat-grid-v2 { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .cat-card-v2 { flex-direction: column; gap: 14px; } }

/* Plus Jakarta Sans metric adjustments */
.main-nav a { padding: 12px 13px; font-size: 0.95rem; }
.btn { padding: 12px 22px; }
.side-price { flex-direction: column; align-items: flex-start; gap: 2px; }
.side-price .price-row { display: flex; align-items: baseline; gap: 8px; }

/* ============================================================
   STANDARDIZED UTILITIES & SHARED PATTERNS
   Single source of truth - never use inline style="" in pages.
   ============================================================ */

/* Panel sub-headings (dashboard sections, form-card headings) */
.panel-title {
  font-family: var(--font-head);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--ink);
  margin: 0;
  letter-spacing: -0.01em;
}

/* Intro line directly under a panel heading */
.panel-intro { margin: 0 0 26px; }

/* Inline text accents */
.text-red { color: var(--red); font-weight: 700; }
.text-strong { font-weight: 700; color: var(--navy-800); }

/* Submit-button row inside forms */
.form-actions { margin-top: 26px; }

/* Centered action-button row - combine with .hero-cta or .section-cta */
.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
  text-align: center;
}

/* Vertical rhythm utilities */
.mt-0  { margin-top: 0; }
.mt-18 { margin-top: 18px; }
.mt-24 { margin-top: 24px; }
.mt-56 { margin-top: 56px; }

/* ============================================================
   GALLERY - filterable wall + photo viewer
   ============================================================ */

/* ---------- Filter tabs ----------
   The gallery reuses the shared .filter-tabs / .tab component exactly as the
   courses page renders it, with no local overrides, so the two stay in step.
   NB: if a scoped variant is ever added, never redeclare `background` - a
   two-class selector like `.scope .tab` ties with `.tab.active` on specificity
   and, sitting later in the file, silently wipes out the selected state. */

/* A category with no photos: dimmed and not clickable (marked by gallery.php) */
.tab.is-empty { opacity: 0.42; cursor: not-allowed; }
.tab.is-empty:hover { border-color: var(--line); color: var(--slate); }

/* ---------- Result line ---------- */

.g-status {
  margin: 0 0 20px;
  font-size: 0.9rem;
  color: var(--slate-light);
  text-align: center;
}

/* ---------- The wall ---------- */

.g-open {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  overflow: hidden;
  cursor: zoom-in;
}
.g-open img { display: block; }

.g-chip {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  padding: 4px 10px;
  border-radius: var(--radius-xs);
  background: rgba(7, 26, 46, 0.86);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  color: #fff;
  font-size: 0.69rem;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
}

/* Staggered entrance - applied by JS on load and after each filter change */
.gallery-wall.is-swapped .g-item {
  animation: gIn 0.5s var(--ease) both;
  animation-delay: var(--gd, 0ms);
}
@keyframes gIn {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: none; }
}

/* ---------- Photo viewer ---------- */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1500;
  display: grid;
  place-items: center;
  padding: 30px 20px;
  background: rgba(5, 18, 33, 0.93);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  animation: lbFade 0.28s var(--ease) both;
}
@keyframes lbFade { from { opacity: 0; } to { opacity: 1; } }

body.lb-lock { overflow: hidden; }

.lb-figure {
  margin: 0;
  max-width: min(1040px, 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.lb-img {
  display: block;
  max-width: 100%;
  max-height: 72vh;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius);
  background: var(--navy-900);
  box-shadow: var(--shadow-lg);
  animation: lbZoom 0.34s var(--ease) both;
}
@keyframes lbZoom {
  from { opacity: 0; transform: scale(0.96); }
  to   { opacity: 1; transform: none; }
}

.lb-count { display: block; font-size: 0.8rem; font-weight: 700; letter-spacing: 1px; color: #C2D0E2; }

.lb-close,
.lb-nav {
  position: fixed;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  padding: 0;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: var(--radius-sm);
  color: #fff;
  cursor: pointer;
  transition: background-color var(--t-med) var(--ease), border-color var(--t-med) var(--ease);
}
.lb-close:hover, .lb-nav:hover { background: var(--red); border-color: var(--red); }

.lb-close { top: 20px; right: 20px; }
.lb-nav { top: 50%; transform: translateY(-50%); }
.lb-nav.prev { left: 20px; }
.lb-nav.next { right: 20px; }

@media (max-width: 640px) {
  .lightbox { padding: 20px 12px; }
  .lb-close { top: 12px; right: 12px; width: 40px; height: 40px; }
  .lb-nav { width: 40px; height: 40px; }
  .lb-nav.prev { left: 8px; }
  .lb-nav.next { right: 8px; }
  .lb-img { max-height: 60vh; }
}

/* ============================================================
   COURSE SEARCH (courses page, sits above the filter tabs)
   ============================================================ */

.course-search { max-width: 560px; margin: 0 auto; }

.search-box { position: relative; display: flex; align-items: center; }
.search-box .icon {
  position: absolute;
  left: 16px;
  width: 18px;
  height: 18px;
  color: var(--slate-light);
  pointer-events: none;
  transition: color var(--t-fast) var(--ease);
}
.search-box:focus-within .icon { color: var(--navy-600); }

.search-input {
  width: 100%;
  padding: 14px 18px 14px 46px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg);
  box-shadow: var(--shadow-sm);
  font-family: var(--font-body);
  font-size: 0.98rem;
  color: var(--ink);
  transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}
.search-input::placeholder { color: var(--slate-light); }
.search-input:focus {
  outline: none;
  border-color: var(--navy-600);
  box-shadow: var(--shadow-sm), 0 0 0 3px rgba(21, 75, 125, 0.13);
}

.search-hint {
  margin: 8px 0 0;
  text-align: center;
  font-size: 0.84rem;
  color: var(--slate-light);
}

/* Results are being re-fetched while the user types */
.course-grid { transition: opacity 0.2s var(--ease); }
.course-grid.is-searching { opacity: 0.5; }

@media (max-width: 640px) {
  .search-input { padding: 12px 14px 12px 42px; font-size: 0.94rem; }
  .search-box .icon { left: 14px; width: 16px; height: 16px; }
}