/* =========================================================
   Brijesh Kr. Yadav — fluid responsive design
   Uses rem, %, clamp() so mobile feels as polished as laptop
   ========================================================= */

:root {
  /* Fluid base: scales slightly with viewport */
  font-size: clamp(15px, 0.35vw + 14px, 16px);

  --bg: #070b14;
  --fg: #e8eefc;
  --muted: #94a3b8;
  --card: rgba(15, 22, 40, 0.92);
  --border: rgba(148, 163, 184, 0.12);
  --sky: #38bdf8;
  --sky2: #7dd3fc;
  --indigo: #818cf8;
  --glow: rgba(56, 189, 248, 0.35);

  /* Spacing scale (rem) */
  --s-1: 0.25rem;
  --s-2: 0.5rem;
  --s-3: 0.75rem;
  --s-4: 1rem;
  --s-5: 1.25rem;
  --s-6: 1.5rem;
  --s-7: 2rem;
  --s-8: 2.5rem;
  --s-9: 3.5rem;
  --s-10: 5rem;

  /* Layout */
  --container: min(72rem, calc(100% - 1.25rem));
  --radius: 1rem;
  --radius-lg: 1.15rem;
  --radius-full: 9999px;
  --nav-h: 3.5rem;
  --touch: 2.5rem; /* tap target */
  --search-w: 10.5rem;

  /* Type */
  --text-xs: 0.7rem;
  --text-sm: 0.8125rem;
  --text-base: 1rem;
  --text-md: 1.0625rem;
  --text-lg: clamp(1.05rem, 0.5vw + 0.95rem, 1.2rem);
  --text-xl: clamp(1.25rem, 1.2vw + 1rem, 1.5rem);
  --text-2xl: clamp(1.45rem, 2vw + 1rem, 2.1rem);
  --text-3xl: clamp(1.75rem, 3.5vw + 0.75rem, 3.1rem);
  --leading: 1.6;
  --leading-tight: 1.12;
}

@media (min-width: 40rem) {
  :root {
    --container: min(72rem, calc(100% - 2rem));
    --nav-h: 3.75rem;
    --search-w: 11rem;
  }
}
@media (min-width: 64rem) {
  :root {
    --container: min(72rem, calc(100% - 2.5rem));
    --nav-h: 4rem;
    --search-w: 12rem;
  }
}
@media (min-width: 80rem) {
  :root {
    --search-w: 13.5rem;
  }
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  font-size: var(--text-base);
  line-height: var(--leading);
  color: var(--fg);
  background:
    radial-gradient(ellipse 90% 55% at 12% -8%, rgba(56,189,248,.22), transparent 52%),
    radial-gradient(ellipse 70% 45% at 95% 0%, rgba(129,140,248,.16), transparent 48%),
    radial-gradient(ellipse 60% 40% at 70% 95%, rgba(34,211,238,.08), transparent 50%),
    var(--bg);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
body.nav-open { overflow: hidden; touch-action: none; }

a { color: inherit; text-decoration: none; }
img, video, iframe { max-width: 100%; height: auto; display: block; }
button, input, select, textarea { font: inherit; }

.container {
  width: var(--container);
  max-width: 100%;
  margin-inline: auto;
}

/* ========== Nav — professional 3-zone layout ==========
   [ brand ]  ........  [ links ]  ........  [ search | enroll | menu ]
   Search is FIXED width — never grows and steals the bar.
*/
.nav-wrap {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  padding: max(0.5rem, env(safe-area-inset-top, 0px)) 0 0;
  pointer-events: none;
}
.nav-wrap .container,
.nav-wrap .nav,
.nav-wrap .mobile-menu { pointer-events: auto; }

.nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  height: var(--nav-h);
  min-height: var(--nav-h);
  max-height: var(--nav-h);
  padding: 0 0.5rem 0 0.65rem;
  background: rgba(12, 18, 34, 0.9);
  -webkit-backdrop-filter: blur(1rem) saturate(1.25);
  backdrop-filter: blur(1rem) saturate(1.25);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 0.5rem 1.75rem rgba(0, 0, 0, 0.35);
  overflow: visible; /* dropdowns allowed; children must not expand bar */
}

/* LEFT: brand — never grow */
.brand {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 600;
  flex: 0 0 auto;
  min-width: 0;
  max-width: none;
}
.brand img {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: var(--radius-full);
  object-fit: cover;
  object-position: top;
  flex-shrink: 0;
  box-shadow: 0 0 0.9rem var(--glow);
  border: 0.125rem solid rgba(56, 189, 248, 0.45);
}
@media (min-width: 40rem) {
  .brand img { width: 2.5rem; height: 2.5rem; }
}

/* Name always visible (mobile + laptop) — compact so nav never overflows */
.brand-text {
  display: block;
  min-width: 0;
  line-height: 1.15;
  font-size: 0.78rem;
  font-weight: 600;
  max-width: min(7.75rem, 38vw);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.brand-text .brand-accent { color: var(--sky2); }
.brand small {
  display: none; /* subtitle only from tablet — saves height/width on phone */
  font-size: 0.625rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #64748b;
  font-weight: 500;
  margin-top: 0.1rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
@media (min-width: 22.5rem) {
  .brand-text {
    font-size: 0.82rem;
    max-width: min(9rem, 42vw);
  }
}
@media (min-width: 40rem) {
  .brand-text {
    font-size: 0.875rem;
    max-width: 9.5rem;
  }
}
@media (min-width: 48rem) {
  .brand-text { max-width: 11rem; font-size: 0.9rem; }
  .brand small { display: block; }
}

/* CENTER: links — only large laptops+ (avoids crush with 8 items) */
.nav-links {
  display: none;
  flex: 1 1 auto;
  align-items: center;
  justify-content: center;
  gap: 0.1rem;
  min-width: 0;
  overflow: hidden;
}
.nav-links a {
  flex: 0 0 auto;
  color: #94a3b8;
  font-size: 0.8rem;
  font-weight: 500;
  padding: 0.4rem 0.5rem;
  border-radius: 0.5rem;
  white-space: nowrap;
  transition: color .15s, background .15s;
}
.nav-links a:hover,
.nav-links a.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

/* RIGHT: actions — never shrink below content */
.nav-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.35rem;
  flex: 0 0 auto;
  margin-left: auto;
  min-width: 0;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  min-width: 2.5rem;
  min-height: 2.5rem;
  padding: 0;
  flex: 0 0 auto;
  background: transparent;
  border: 0;
  border-radius: 0.65rem;
  color: #cbd5e1;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.icon-btn:hover,
.icon-btn:focus-visible {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  outline: none;
}
.icon-btn .close-icon { display: none; font-size: 1.05rem; line-height: 1; }
.icon-btn.is-open .menu-icon { display: none; }
.icon-btn.is-open .close-icon { display: inline; }

/* Desktop search — FIXED width, never 100% */
.search-form--desktop {
  display: none;
  position: relative;
  flex: 0 0 auto;
  width: var(--search-w);
  max-width: var(--search-w);
}
.search-form--desktop input {
  display: block;
  width: 100%;
  max-width: 100%;
  height: 2.25rem;
  border-radius: var(--radius-full);
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  padding: 0 0.65rem 0 2rem;
  font-size: 0.8125rem;
  outline: none;
  box-sizing: border-box;
}
.search-form--desktop input:focus {
  border-color: rgba(56, 189, 248, 0.5);
  box-shadow: 0 0 0 0.15rem rgba(56, 189, 248, 0.12);
}
.search-form--desktop .search-ico {
  position: absolute;
  left: 0.6rem;
  top: 50%;
  transform: translateY(-50%);
  color: #64748b;
  display: flex;
  pointer-events: none;
  width: 0.9rem;
  height: 0.9rem;
}
.search-form--desktop .search-ico svg {
  width: 0.9rem;
  height: 0.9rem;
}

/* Phone: icon search (opens menu) — not a wide field */
.search-toggle {
  display: inline-flex;
  flex: 0 0 auto;
}

/* Enroll: tablet+ only (mobile has it in menu) */
.enroll-btn {
  display: none !important;
  flex: 0 0 auto !important;
  padding: 0.4rem 0.75rem !important;
  font-size: 0.75rem !important;
  min-height: 2.15rem !important;
  white-space: nowrap;
}

@media (min-width: 40rem) {
  .enroll-btn { display: inline-flex !important; }
  .nav { padding: 0 0.65rem 0 0.85rem; gap: 0.65rem; }
}

/* Tablet: show compact search in bar */
@media (min-width: 48rem) {
  .search-form--desktop { display: block; }
  .search-toggle { display: none; }
}

/* Large laptop: full nav links; hide hamburger */
@media (min-width: 68rem) {
  .nav-links { display: flex; }
  .menu-btn { display: none !important; }
  .nav-links a { font-size: 0.8125rem; padding: 0.4rem 0.55rem; }
  .nav { padding-inline: 0.85rem; }
}
@media (min-width: 80rem) {
  .nav-links a { font-size: 0.875rem; padding: 0.45rem 0.65rem; }
  .nav-actions { gap: 0.5rem; }
}

/* Mobile / tablet slide-down menu */
.mobile-menu {
  margin-top: 0.5rem;
  padding: 0.85rem;
  width: 100%;
  background: rgba(10, 14, 28, 0.98);
  -webkit-backdrop-filter: blur(1.25rem);
  backdrop-filter: blur(1.25rem);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 1.25rem 3rem rgba(0, 0, 0, 0.5);
  max-height: min(78dvh, 32rem);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.mobile-menu[hidden] { display: none !important; }
.mobile-menu.open {
  display: block !important;
  animation: menu-in 0.18s ease-out;
}
@keyframes menu-in {
  from { opacity: 0; transform: translateY(-0.35rem); }
  to { opacity: 1; transform: translateY(0); }
}
@media (min-width: 68rem) {
  .mobile-menu { display: none !important; }
}

.mobile-search { position: relative; margin-bottom: 0.75rem; }
.mobile-search .search-ico {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: #64748b;
  display: flex;
  pointer-events: none;
}
.mobile-search input {
  width: 100%;
  height: 2.75rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  padding: 0 0.9rem 0 2.4rem;
  font-size: 1rem;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  box-sizing: border-box;
}
.mobile-search input:focus {
  border-color: rgba(56, 189, 248, 0.55);
  box-shadow: 0 0 0 0.15rem rgba(56, 189, 248, 0.15);
}

.mobile-links { display: flex; flex-direction: column; gap: 0.1rem; }
.mobile-links a {
  display: block;
  padding: 0.8rem 0.9rem;
  border-radius: 0.75rem;
  color: #cbd5e1;
  font-size: 0.9375rem;
  font-weight: 500;
}
.mobile-links a:active { background: rgba(255, 255, 255, 0.06); }
.mobile-links a.active {
  background: rgba(56, 189, 248, 0.14);
  color: #bae6fd;
}
.mobile-enroll {
  margin-top: 0.65rem;
  width: 100%;
  padding: 0.85rem 1rem !important;
  font-size: 0.9rem !important;
}

/* ========== Buttons ========== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 0.9rem;
  border: 0;
  cursor: pointer;
  text-align: center;
  white-space: nowrap;
  min-height: var(--touch);
  -webkit-tap-highlight-color: transparent;
  transition: filter 0.15s, transform 0.15s, background 0.15s, border-color 0.15s;
}
.btn-primary {
  color: #041018;
  background: linear-gradient(135deg, #38bdf8, #818cf8);
  box-shadow: 0 0.5rem 1.5rem var(--glow);
}
.btn-primary:hover { filter: brightness(1.05); transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); }
.btn-secondary {
  color: #e2e8f0;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(148, 163, 184, 0.25);
}
.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(56, 189, 248, 0.35);
}
.btn-sm {
  padding: 0.45rem 0.75rem;
  font-size: 0.75rem;
  min-height: 2.25rem;
}

/* ========== Layout / Hero ========== */
main {
  padding-top: calc(var(--nav-h) + 1.5rem + env(safe-area-inset-top, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
  min-height: 70vh;
  min-height: 70dvh;
}

.hero {
  display: grid;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
  padding: clamp(1rem, 3vw, 2.5rem) 0 clamp(2rem, 5vw, 3.75rem);
}
@media (min-width: 60rem) {
  .hero {
    grid-template-columns: 1.12fr 0.88fr;
    gap: clamp(2rem, 4vw, 3.5rem);
    min-height: calc(100dvh - 7.5rem);
  }
}

.badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border: 1px solid rgba(56, 189, 248, 0.3);
  background: rgba(56, 189, 248, 0.1);
  color: var(--sky2);
  font-size: var(--text-xs);
  font-weight: 600;
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-full);
  margin-bottom: clamp(0.85rem, 2vw, 1.15rem);
  max-width: 100%;
}

h1 {
  font-size: var(--text-3xl);
  line-height: var(--leading-tight);
  letter-spacing: -0.02em;
  margin: 0 0 0.65rem;
  font-weight: 700;
  word-wrap: break-word;
  overflow-wrap: anywhere;
}
h2 {
  font-size: var(--text-2xl);
  letter-spacing: -0.02em;
  margin: 0 0 0.65rem;
  font-weight: 700;
  line-height: 1.2;
}
h3 { font-size: var(--text-xl); line-height: 1.25; }

.gradient {
  background: linear-gradient(135deg, #7dd3fc, #a5b4fc 45%, #22d3ee);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lead {
  color: #cbd5e1;
  font-size: var(--text-lg);
  font-weight: 500;
  margin: 0 0 0.35rem;
}
.muted { color: var(--muted); }
.hero p.desc {
  color: #94a3b8;
  max-width: 36rem;
  width: 100%;
  margin: 0.65rem 0 0;
  font-size: clamp(0.9rem, 0.4vw + 0.85rem, 1.05rem);
  line-height: 1.65;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: clamp(1.1rem, 3vw, 1.5rem);
}
.hero-actions .btn {
  flex: 1 1 calc(50% - 0.4rem);
  min-width: min(100%, 8.5rem);
}
@media (min-width: 30rem) {
  .hero-actions .btn {
    flex: 0 1 auto;
    min-width: auto;
  }
}
@media (max-width: 22.5rem) {
  .hero-actions .btn {
    flex: 1 1 100%;
  }
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: clamp(1.25rem, 3vw, 1.75rem);
}
.tag {
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  padding: 0.3rem 0.7rem;
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  color: #cbd5e1;
}

.stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem;
  margin-top: clamp(1.25rem, 3vw, 1.75rem);
  width: 100%;
}
@media (min-width: 40rem) {
  .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.75rem; }
}
.stat {
  text-align: center;
  padding: clamp(0.75rem, 2vw, 0.95rem) 0.5rem;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  min-width: 0;
}
.stat strong {
  display: block;
  font-size: clamp(1.15rem, 2vw + 0.75rem, 1.4rem);
}
.stat span {
  font-size: 0.65rem;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* Portrait */
.portrait {
  position: relative;
  width: min(100%, 22rem);
  max-width: 100%;
  margin-inline: auto;
}
@media (min-width: 40rem) {
  .portrait { width: min(100%, 26rem); }
}
@media (min-width: 60rem) {
  .portrait { width: 100%; max-width: 26.25rem; }
}
.portrait-float {
  animation: float-y 7s ease-in-out infinite;
}
@keyframes float-y {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-0.625rem); }
}
.portrait-inner {
  position: relative;
  aspect-ratio: 3 / 4;
  max-height: min(58dvh, 28rem);
  border-radius: 1.35rem;
  overflow: visible;
  background: transparent;
  margin-inline: auto;
}
@media (min-width: 60rem) {
  .portrait-inner { max-height: none; }
}
.portrait-cutout {
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}
.portrait-inner img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: bottom;
  filter: drop-shadow(0 1.5rem 3rem rgba(0, 0, 0, 0.55));
}
.portrait-glow {
  position: absolute;
  inset: 10% 8% 18%;
  border-radius: 50%;
  z-index: -1;
  background: linear-gradient(135deg, rgba(56,189,248,.35), rgba(129,140,248,.2));
  filter: blur(2.25rem);
  animation: pulse-glow 4s ease-in-out infinite;
}
@keyframes pulse-glow {
  0%, 100% { opacity: 0.55; transform: scale(1); }
  50% { opacity: 0.9; transform: scale(1.04); }
}
.portrait-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: -0.5rem auto 0;
  width: min(100%, 17.5rem);
  padding: 0.75rem 0.9rem;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.55);
  -webkit-backdrop-filter: blur(0.75rem);
  backdrop-filter: blur(0.75rem);
  position: relative;
  z-index: 2;
}
.portrait-card img {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--radius-full);
  flex-shrink: 0;
}
.portrait-card strong { font-size: 0.875rem; }
.portrait-card .muted { font-size: 0.75rem; }

/* ========== Sections / Cards ========== */
.section {
  padding: clamp(2.25rem, 6vw, 3.75rem) 0;
}
.section-head {
  text-align: center;
  max-width: 35rem;
  width: 100%;
  margin: 0 auto clamp(1.5rem, 4vw, 2.25rem);
  padding-inline: 0.25rem;
}
.section-head .eyebrow {
  color: var(--sky);
  font-size: var(--text-sm);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.5rem;
}
.section-head p { font-size: clamp(0.9rem, 0.3vw + 0.85rem, 1rem); }

.grid-3,
.grid-4 {
  display: grid;
  gap: clamp(0.85rem, 2vw, 1.1rem);
  width: 100%;
}
@media (min-width: 28rem) {
  .grid-3 { grid-template-columns: 1fr; }
}
@media (min-width: 40rem) {
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 62.5rem) {
  .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.card {
  background: linear-gradient(160deg, rgba(22, 32, 56, 0.95), rgba(12, 18, 34, 0.98));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(1rem, 2.5vw, 1.35rem);
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
  min-width: 0;
  width: 100%;
}
@media (hover: hover) {
  .card:hover {
    transform: translateY(-0.2rem);
    border-color: rgba(56, 189, 248, 0.3);
    box-shadow: 0 0.75rem 2.5rem rgba(0, 0, 0, 0.3);
  }
}
.card h3 {
  margin: 0 0 0.5rem;
  font-size: clamp(1rem, 0.5vw + 0.9rem, 1.1rem);
}
.card p {
  margin: 0;
  color: #94a3b8;
  font-size: clamp(0.85rem, 0.3vw + 0.8rem, 0.9rem);
  line-height: 1.55;
}
.card-img {
  border-radius: 0.75rem;
  overflow: hidden;
  margin: calc(-1 * clamp(1rem, 2.5vw, 1.35rem));
  margin-bottom: 0.9rem;
  height: clamp(8.5rem, 28vw, 10.5rem);
  width: auto;
}
.card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.6rem;
  border-radius: var(--radius-full);
  font-size: 0.7rem;
  font-weight: 600;
  background: rgba(56, 189, 248, 0.12);
  color: var(--sky2);
  border: 1px solid rgba(56, 189, 248, 0.2);
  margin-right: 0.25rem;
  margin-bottom: 0.25rem;
}

/* ========== Forms ========== */
.input,
.textarea,
.select {
  width: 100%;
  max-width: 100%;
  padding: 0.7rem 0.9rem;
  border-radius: 0.65rem;
  background: rgba(7, 11, 20, 0.7);
  border: 1px solid rgba(148, 163, 184, 0.2);
  color: #fff;
  outline: none;
  font: inherit;
  font-size: 1rem; /* iOS: no zoom on focus */
  min-height: var(--touch);
}
.input:focus,
.textarea:focus {
  border-color: rgba(56, 189, 248, 0.55);
  box-shadow: 0 0 0 0.1875rem rgba(56, 189, 248, 0.12);
}
.textarea {
  min-height: 7.5rem;
  resize: vertical;
  min-height: auto;
  padding-top: 0.75rem;
}
.label {
  display: block;
  font-size: var(--text-sm);
  color: #94a3b8;
  margin-bottom: 0.4rem;
  font-weight: 500;
}
.form-group { margin-bottom: 0.9rem; }
.alert {
  padding: 0.75rem 0.9rem;
  border-radius: 0.75rem;
  font-size: 0.9rem;
  margin-bottom: 0.9rem;
  line-height: 1.45;
}
.alert-ok {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.25);
  color: #6ee7b7;
}
.alert-err {
  background: rgba(248, 113, 113, 0.12);
  border: 1px solid rgba(248, 113, 113, 0.25);
  color: #fca5a5;
}

/* ========== Prose ========== */
.prose {
  color: #cbd5e1;
  line-height: 1.75;
  font-size: clamp(0.95rem, 0.4vw + 0.9rem, 1.05rem);
  overflow-wrap: anywhere;
  word-break: break-word;
}
.prose h1, .prose h2, .prose h3 {
  color: #f1f5f9;
  margin: 1.35em 0 0.45em;
  line-height: 1.25;
}
.prose h1 { font-size: 1.5rem; }
.prose h2 { font-size: 1.25rem; }
.prose h3 { font-size: 1.1rem; }
.prose pre {
  background: #0a1020;
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 0.9rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  font-size: 0.85rem;
  max-width: 100%;
}
.prose code {
  background: rgba(56, 189, 248, 0.1);
  color: var(--sky2);
  padding: 0.1em 0.4em;
  border-radius: 0.35rem;
  font-size: 0.9em;
}
.prose pre code { background: transparent; padding: 0; color: #e2e8f0; }
.prose img { border-radius: 0.75rem; margin: 1rem 0; }

/* ========== Footer ========== */
footer {
  margin-top: clamp(2.5rem, 6vw, 3.75rem);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  background: #060a12;
  padding: clamp(2rem, 5vw, 3rem) 0 clamp(1.25rem, 3vw, 1.5rem);
  padding-bottom: max(1.25rem, env(safe-area-inset-bottom));
}
.footer-grid {
  display: grid;
  gap: clamp(1.25rem, 3vw, 1.75rem);
  width: 100%;
}
@media (min-width: 28rem) {
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 50rem) {
  .footer-grid { grid-template-columns: 1.2fr 1fr 1fr 1fr; }
}
footer h4 {
  margin: 0 0 0.75rem;
  font-size: 0.9rem;
}
footer a {
  color: #94a3b8;
  font-size: 0.9rem;
  display: inline-block;
  padding: 0.2rem 0;
}
footer a:hover { color: var(--sky2); }
footer p { color: #94a3b8; font-size: 0.9rem; }
.footer-bottom {
  margin-top: clamp(1.5rem, 4vw, 2.25rem);
  padding-top: 1.1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  justify-content: space-between;
  font-size: 0.75rem;
  color: #64748b;
}

/* ========== Page / two-col ========== */
.page-title {
  padding: 0.5rem 0 clamp(1.5rem, 4vw, 1.75rem);
}
.page-title h1 {
  font-size: var(--text-2xl);
}
.two-col {
  display: grid;
  gap: clamp(1.25rem, 3vw, 1.75rem);
  align-items: start;
  width: 100%;
}
@media (min-width: 56rem) {
  .two-col { grid-template-columns: 1.2fr 0.8fr; }
}
.sticky-card {
  position: static;
}
@media (min-width: 56rem) {
  .sticky-card {
    position: sticky;
    top: calc(var(--nav-h) + 1.5rem);
  }
}

/* Course detail cover */
.page-title .card-img,
.two-col .card-img {
  height: clamp(10rem, 40vw, 14rem);
  margin: 0 0 1.25rem;
  border-radius: var(--radius);
}

/* Embeds (YouTube) */
.video-embed,
iframe {
  width: 100%;
  max-width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
  border: 0;
  border-radius: 0.75rem;
}

/* ========== Admin (mobile-friendly) ========== */
.admin-body { background: var(--bg); min-height: 100vh; min-height: 100dvh; }
.admin-layout {
  display: grid;
  min-height: 100vh;
  min-height: 100dvh;
  grid-template-columns: 1fr;
}
.admin-side {
  background: #0a1020;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding: 0.75rem;
  overflow-x: auto;
  overflow-y: hidden;
  display: flex;
  flex-wrap: nowrap;
  gap: 0.35rem;
  align-items: center;
  -webkit-overflow-scrolling: touch;
  position: sticky;
  top: 0;
  z-index: 40;
}
.admin-side > div:first-child {
  display: none;
}
.admin-side a {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  padding: 0.55rem 0.75rem;
  border-radius: 0.65rem;
  color: #94a3b8;
  font-size: 0.8rem;
  margin: 0;
  flex-shrink: 0;
}
.admin-side a:hover,
.admin-side a.active {
  background: rgba(56, 189, 248, 0.12);
  color: #e0f2fe;
}
.admin-main {
  padding: clamp(1rem, 3vw, 1.5rem) clamp(0.85rem, 3vw, 1.15rem);
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}
.admin-main h1 {
  font-size: clamp(1.35rem, 3vw, 1.75rem);
}
@media (min-width: 56rem) {
  .admin-layout { grid-template-columns: 15rem 1fr; }
  .admin-side {
    display: block;
    position: sticky;
    top: 0;
    height: 100dvh;
    max-height: 100dvh;
    overflow-y: auto;
    overflow-x: hidden;
    border-right: 1px solid rgba(255, 255, 255, 0.06);
    border-bottom: 0;
    padding: 1.25rem 0.75rem;
  }
  .admin-side > div:first-child { display: block; }
  .admin-side a {
    display: block;
    white-space: normal;
    margin-bottom: 0.25rem;
    font-size: 0.875rem;
    padding: 0.65rem 0.75rem;
  }
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  display: block;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
th, td {
  text-align: left;
  padding: 0.65rem 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  white-space: nowrap;
}
th { color: #94a3b8; font-weight: 500; }

.login-box {
  width: min(25rem, calc(100% - 1.5rem));
  margin: 10vh auto;
  padding: clamp(1.25rem, 4vw, 1.75rem);
}

/* ========== Uploads / payments ========== */
.field-hint {
  font-size: 0.75rem;
  color: #64748b;
  margin: 0.4rem 0 0;
  line-height: 1.45;
}
.field-hint a { color: var(--sky2); }
.upload-preview {
  margin-bottom: 0.65rem;
  border-radius: 0.75rem;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  max-width: min(14rem, 100%);
  background: #0a1020;
}
.upload-preview img {
  width: 100%;
  height: 7.5rem;
  object-fit: cover;
  display: block;
}
input[type="file"].input {
  padding: 0.65rem;
  cursor: pointer;
  background: rgba(0, 0, 0, 0.25);
  font-size: 0.85rem;
}
.pay-box {
  background: rgba(56, 189, 248, 0.06);
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: 0.9rem;
  padding: clamp(0.85rem, 2vw, 1rem);
  margin-bottom: 1.1rem;
}
.pay-qr {
  width: min(10rem, 55vw);
  height: min(10rem, 55vw);
  object-fit: contain;
  border-radius: 0.75rem;
  background: #fff;
  padding: 0.5rem;
  margin: 0 auto 0.75rem;
  display: block;
}
.pay-list {
  margin: 0;
  padding-left: 1.1rem;
  color: #cbd5e1;
  font-size: 0.85rem;
  line-height: 1.65;
}
.pay-list strong { color: #e2e8f0; }
.proof-thumb {
  display: block;
  text-align: center;
  text-decoration: none;
  color: var(--sky2);
  font-size: 0.75rem;
}
.proof-thumb img {
  width: min(8.75rem, 40vw);
  height: 6.25rem;
  object-fit: cover;
  border-radius: 0.65rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  display: block;
  margin-bottom: 0.4rem;
}
.media-grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 10rem), 1fr));
  margin-top: 0.9rem;
}
.media-item { padding: 0.65rem; }
.media-item img {
  width: 100%;
  height: 6.875rem;
  object-fit: cover;
  border-radius: 0.65rem;
  background: #0a1020;
}
.media-doc {
  height: 6.875rem;
  border-radius: 0.65rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px dashed rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: #94a3b8;
}
.media-meta { margin-top: 0.5rem; }
.media-path {
  display: block;
  font-size: 0.7rem;
  color: var(--sky2);
  word-break: break-all;
  background: rgba(0, 0, 0, 0.3);
  padding: 0.25rem 0.4rem;
  border-radius: 0.4rem;
  margin-bottom: 0.25rem;
}

/* CTA / misc cards often used inline */
.cta-band {
  text-align: center;
  padding: clamp(1.5rem, 4vw, 2.5rem) clamp(1rem, 3vw, 1.5rem);
}

/* Prevent fixed-width overflow from inline styles */
.container > *,
.two-col > *,
.card { max-width: 100%; }

/* Touch: disable hover lift on coarse pointers */
@media (hover: none) {
  .card:hover { transform: none; }
  .btn-primary:hover { transform: none; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .portrait-float { animation: none; }
}

/* Very small phones (≤360px) — keep name, just tighter */
@media (max-width: 22.5rem) {
  :root {
    font-size: 14.5px;
    --container: calc(100% - 1.1rem);
  }
  .brand-text {
    display: block !important;
    font-size: 0.72rem;
    max-width: min(6.75rem, 36vw);
  }
  .enroll-btn { display: none !important; }
  .badge-pill { font-size: 0.65rem; }
}

/* Landscape phones: tighter hero portrait */
@media (max-height: 28rem) and (orientation: landscape) {
  .hero { min-height: auto; padding-block: 1rem; }
  .portrait-inner { max-height: 70dvh; aspect-ratio: 1 / 1.1; }
  main { padding-top: calc(var(--nav-h) + 0.85rem); }
}
