/* ==========================================================================
   MIMAC Academy — Redesigned Stylesheet
   Palette: Chalkboard & Paper — precision, warmth, scholarly rigor
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Newsreader:opsz,wght@6..72,400;6..72,500;6..72,600;6..72,700&display=swap');

/* ==========================================================================
   1. DESIGN TOKENS
   ========================================================================== */
:root {
  /* ── Palette: Classroom ── */
  --paper:     #fcfaf5;
  --chalk:     #f3f0e8;
  --slate:     #111827;
  --graphite:  #1e293b;
  --ink:       #1a1a1a;
  --ink-muted: #5c6270;
  --blue:      #111827;
  --blue-hover:#1e293b;
  --amber:     #d97706;
  --amber-light:#fef3c7;
  --border:    #ddd8cd;
  --red:       #dc2626;
  --red-bg:    #fef2f2;
  --green-bg:  #ecfdf5;

  /* ── Typography ── */
  --font-display: 'Newsreader', 'Georgia', serif;
  --font-body:    'Inter', system-ui, -apple-system, sans-serif;
  --font-mono:    ui-monospace, 'Cascadia Code', monospace;

  --step--2: clamp(0.69rem, 0.65rem + 0.21vw, 0.8rem);
  --step--1: clamp(0.83rem, 0.77rem + 0.33vw, 1rem);
  --step-0:  clamp(1rem, 0.90rem + 0.49vw, 1.25rem);
  --step-1:  clamp(1.2rem, 1.04rem + 0.78vw, 1.6rem);
  --step-2:  clamp(1.44rem, 1.19rem + 1.24vw, 2.07rem);
  --step-3:  clamp(1.73rem, 1.34rem + 1.93vw, 2.72rem);
  --step-4:  clamp(2.07rem, 1.47rem + 3.00vw, 3.6rem);
  --step-5:  clamp(2.49rem, 1.54rem + 4.72vw, 4.8rem);

  /* ── Spacing ── */
  --s-3xs: 0.25rem;
  --s-2xs: 0.375rem;
  --s-xs:  0.5rem;
  --s-sm:  0.75rem;
  --s-md:  1rem;
  --s-lg:  1.5rem;
  --s-xl:  2rem;
  --s-2xl: 3rem;
  --s-3xl: 4rem;
  --s-4xl: 6rem;

  /* ── Layout ── */
  --w-content: 65ch;
  --w-max:     1200px;
  --w-wide:    1400px;
  --radius:    8px;
  --radius-sm: 5px;
  --radius-lg: 14px;

  /* ── Layers ── */
  --z-drop:  10;
  --z-nav:   50;
  --z-menu:  60;
  --z-modal: 70;

  /* ── Motion ── */
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --fast:  150ms;
  --norm:  300ms;
  --slow:  500ms;
}

/* ==========================================================================
   2. RESET & BASE
   ========================================================================== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

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

body {
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.7;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  /* push content below fixed navbar */
  padding-top: 68px;
}

img, picture, video, svg { display: block; max-width: 100%; height: auto; }

a { color: var(--blue); text-decoration: none; transition: color var(--fast) ease; }
a:hover { color: var(--blue-hover); }

ul, ol { list-style: none; }

button, input, select, textarea { font: inherit; color: inherit; }

table { border-collapse: collapse; width: 100%; }

/* ==========================================================================
   3. TYPOGRAPHY
   ========================================================================== */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.015em;
  text-wrap: balance;
  color: var(--ink);
}

h1 { font-size: var(--step-5); }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-2); }
h4 { font-size: var(--step-1); }
h5 { font-size: var(--step-0); font-weight: 500; }
h6 { font-size: var(--step--1); font-weight: 500; }

p { max-width: var(--w-content); margin-bottom: var(--s-md); }
p:last-child { margin-bottom: 0; }

strong, b { font-weight: 600; }

.email { color: var(--blue); font-weight: 500; font-size: var(--step--2); }

/* ==========================================================================
   4. CONTAINER
   ========================================================================== */
.container {
  width: 100%;
  max-width: var(--w-max);
  margin-inline: auto;
  padding-inline: var(--s-lg);
}

.container-wide {
  max-width: var(--w-wide);
}

/* ==========================================================================
   5. HEADER & NAVIGATION
   ========================================================================== */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--z-nav);
  background: var(--slate);
  height: 68px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

header nav {
  width: 100%;
  max-width: var(--w-wide);
  margin-inline: auto;
  padding-inline: var(--s-lg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.logo { display: flex; align-items: center; gap: var(--s-sm); text-decoration: none; flex-shrink: 0; }
.logo img { height: 38px; width: auto; }
.logo span, .logo strong {
  font-family: var(--font-display);
  font-size: var(--step-1);
  color: #fff;
  font-weight: 600;
  letter-spacing: -0.01em;
}

/* Desktop nav links */
.nav-links {
  display: flex;
  align-items: center;
  gap: var(--s-xs);
}

.nav-links a {
  font-size: var(--step--2);
  font-weight: 500;
  color: rgba(255,255,255,0.72);
  text-decoration: none;
  padding: var(--s-2xs) var(--s-sm);
  border-radius: var(--radius-sm);
  transition: color var(--fast) ease, background var(--fast) ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: #fff;
  background: rgba(255,255,255,0.08);
}

/* Hamburger button */
.menu-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--s-xs);
  width: 44px;
  height: 44px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  z-index: calc(var(--z-menu) + 2);
  position: relative;
}

.menu-btn span {
  display: block;
  width: 22px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: transform var(--norm) var(--ease), opacity var(--fast) ease;
  transform-origin: center;
}

.menu-btn.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-btn.active span:nth-child(2) { opacity: 0; }
.menu-btn.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile overlay */
.mobile-menu {
  position: fixed;
  inset: 0;
  background: var(--slate);
  z-index: var(--z-menu);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--slow) var(--ease);
}

.mobile-menu.active {
  opacity: 1;
  pointer-events: auto;
}

.mobile-menu-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s-xl);
}

.mobile-menu-content a {
  font-family: var(--font-display);
  font-size: var(--step-2);
  color: #fff;
  text-decoration: none;
  opacity: 0.8;
  transition: opacity var(--fast) ease;
}

.mobile-menu-content a:hover,
.mobile-menu-content a.active {
  opacity: 1;
  color: var(--blue);
}

/* Smaller screens: toggle nav */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .menu-btn { display: flex; }
}

/* ==========================================================================
   6. HERO SECTIONS
   ========================================================================== */

/* Graph-paper grid pattern (reusable) */
.hero-grid-bg {
  background-color: var(--slate);
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 40px 40px;
}

.hero {
  background-color: var(--slate);
  background-image:
    linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px);
  background-size: 48px 48px;
  background-position: -24px -24px;
  color: #fff;
  text-align: center;
  padding: var(--s-4xl) var(--s-lg);
  min-height: 70vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 120px;
  background: linear-gradient(transparent, var(--slate));
  pointer-events: none;
}

.hero > * { position: relative; z-index: 1; }

.hero h1 {
  color: #fff;
  margin-bottom: var(--s-md);
  animation: fadeUp 0.7s var(--ease) both;
}

.hero p {
  font-size: var(--step-1);
  color: rgba(255,255,255,0.75);
  max-width: var(--w-content);
  margin-inline: auto;
  margin-bottom: var(--s-xl);
  animation: fadeUp 0.7s var(--ease) 0.1s both;
}

.hero .btn { animation: fadeUp 0.7s var(--ease) 0.2s both; }

/* ── Page heroes (about, lectures, etc.) ── */
.about-hero,
.programs-hero,
.lectures-hero,
.news-hero,
.program-header {
  background-color: var(--slate);
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 48px 48px;
  background-position: -24px -24px;
  color: #fff;
  text-align: center;
  padding: var(--s-2xl) var(--s-lg);
  min-height: 30vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
}

.about-hero::after,
.programs-hero::after,
.lectures-hero::after,
.news-hero::after,
.program-header::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 80px;
  background: linear-gradient(transparent, var(--slate));
  pointer-events: none;
}

.about-hero > *,
.programs-hero > *,
.lectures-hero > *,
.news-hero > *,
.program-header > * { position: relative; z-index: 1; }

.about-hero h1,
.programs-hero h1,
.lectures-hero h1,
.news-hero h1,
.program-header h1 {
  color: #fff;
  font-size: var(--step-3);
  margin-bottom: var(--s-sm);
}

.about-hero p,
.programs-hero p,
.lectures-hero p,
.news-hero p,
.program-header p {
  font-size: var(--step-1);
  color: rgba(255,255,255,0.7);
  max-width: var(--w-content);
  margin-inline: auto;
}

.program-badge {
  display: inline-block;
  background: var(--amber);
  color: var(--slate);
  font-size: var(--step--2);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.3em 1em;
  border-radius: 50px;
  margin-bottom: var(--s-md);
}

/* ==========================================================================
   7. BUTTONS
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2xs);
  font-family: var(--font-body);
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 0.75em 1.75em;
  border-radius: var(--radius);
  border: 2px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: all var(--fast) ease;
  background: var(--blue);
  color: #fff;
}

.btn:hover {
  background: var(--blue-hover);
  color: #fff;
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(17,24,39,0.25);
}

.btn:active { transform: translateY(0); }

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

.btn-block { display: flex; width: 100%; }

/* Submit button for forms */
.btn-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-body);
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 0.75em 1.75em;
  border-radius: var(--radius);
  border: 2px solid var(--blue);
  cursor: pointer;
  background: var(--blue);
  color: #fff;
  transition: all var(--fast) ease;
  width: 100%;
}
.btn-submit:hover {
  background: var(--blue-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(17,24,39,0.25);
}

/* Read more link */
.read-more {
  font-size: var(--step--1);
  font-weight: 600;
  color: var(--blue);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  transition: gap var(--norm) var(--ease);
}
.read-more::after { content: '→'; transition: transform var(--norm) var(--ease); }
.read-more:hover { color: var(--blue-hover); text-decoration: none; gap: 0.7em; }
.read-more:hover::after { transform: translateX(3px); }

/* ==========================================================================
   8. SECTION HEADERS
   ========================================================================== */
.section-header {
  text-align: center;
  margin-bottom: var(--s-xl);
}
.section-header h2 {
  font-size: var(--step-3);
  margin-bottom: var(--s-sm);
}
.section-header p {
  font-size: var(--step-0);
  color: var(--ink-muted);
  max-width: var(--w-content);
  margin-inline: auto;
}
.section-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  margin: 0 auto var(--s-sm);
  background: var(--amber-light);
  border-radius: 50%;
  font-size: var(--step-1);
  color: var(--amber);
}

/* ==========================================================================
   9. ABOUT PAGE
   ========================================================================== */
.about-container { padding: var(--s-2xl) 0; }

.about-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-2xl);
}

.about-content { max-width: none; }
.about-section { margin-bottom: var(--s-2xl); }
.about-section h2 { margin-bottom: var(--s-md); }

.mission-vision {
  display: grid;
  grid-template-columns: 1fr 1fr;
  position: relative;
}

.mission-vision::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 10%;
  bottom: 10%;
  width: 1px;
  background: rgba(255,255,255,0.2);
}

.mv-column {
  padding: 0 var(--s-lg);
}

.mv-icon {
  display: block;
  font-size: var(--step-3);
  color: var(--amber);
  margin-bottom: var(--s-md);
}

.mv-column h2 {
  font-size: var(--step-2);
  color: #fff;
  margin-bottom: var(--s-sm);
}

.mv-column p {
  color: rgba(255,255,255,0.8);
  margin-inline: auto;
  font-size: var(--step-0);
  line-height: 1.7;
}

@media (max-width: 768px) {
  .mission-vision {
    grid-template-columns: 1fr;
    gap: var(--s-xl);
  }
  .mission-vision::after {
    display: none;
  }
  .mv-column {
    padding: 0;
  }
}

.highlight-section {
  background: var(--slate);
  color: #fff;
  padding: var(--s-2xl);
  border-radius: var(--radius-lg);
  text-align: center;
  margin: var(--s-xl) 0;
}
.highlight-section h2,
.highlight-section h3 { color: #fff; margin-bottom: var(--s-md); }
.highlight-section p { color: rgba(255,255,255,0.8); margin-inline: auto; }

.about-cta {
  text-align: center;
  padding: var(--s-xl) 0;
  display: flex;
  gap: var(--s-md);
  justify-content: center;
  flex-wrap: wrap;
}
.about-cta h2 { margin-bottom: var(--s-sm); }
.about-cta p { color: var(--ink-muted); margin-inline: auto; margin-bottom: var(--s-lg); }

/* ==========================================================================
   10. PROGRAMS OVERVIEW
   ========================================================================== */
.program-navigation {
  background: var(--paper);
  border-bottom: 1px solid var(--border);
  padding: var(--s-sm) 0;
  position: sticky;
  top: 68px;
  z-index: var(--z-drop);
}

.program-tabs {
  display: flex;
  gap: var(--s-2xs);
  max-width: var(--w-max);
  margin-inline: auto;
  padding-inline: var(--s-lg);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.program-tabs::-webkit-scrollbar { display: none; }

.program-tabs a {
  font-size: var(--step--2);
  font-weight: 500;
  color: var(--ink-muted);
  text-decoration: none;
  padding: var(--s-xs) var(--s-md);
  border-radius: var(--radius-sm);
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition: all var(--fast) ease;
}
.program-tabs a:hover { color: var(--ink); background: var(--chalk); text-decoration: none; }
.program-tabs a.active {
  color: var(--blue);
  border-bottom-color: var(--blue);
  background: transparent;
}

.program-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--s-lg);
  padding: var(--s-2xl) 0;
}

.program-overview-card {
  background: var(--chalk);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform var(--norm) var(--ease), box-shadow var(--norm) ease;
  display: flex;
  flex-direction: column;
}
.program-overview-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.08);
}

.program-card-header {
  background: var(--slate);
  color: #fff;
  padding: var(--s-lg);
  text-align: center;
}
.program-card-header h3 { color: #fff; font-size: var(--step-1); margin-bottom: var(--s-xs); }
.program-card-header p { color: rgba(255,255,255,0.7); font-size: var(--step--2); max-width: none; }

.card-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin: 0 auto var(--s-sm);
  background: rgba(255,255,255,0.1);
  border-radius: 50%;
  font-size: var(--step-1);
  color: var(--amber);
}

.program-content {
  padding: var(--s-xl);
  flex: 1;
  display: flex;
  flex-direction: column;
}
.program-content h3 { font-size: var(--step-1); margin-bottom: var(--s-sm); }
.program-content p { color: var(--ink-muted); margin-bottom: var(--s-lg); flex: 1; line-height: 1.7; }

.program-features {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-xs);
  margin-bottom: var(--s-md);
}
.program-features span {
  font-size: var(--step--2);
  font-weight: 500;
  color: var(--blue);
  background: rgba(17,24,39,0.08);
  padding: 0.25em 0.75em;
  border-radius: 50px;
}

.program-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2xs);
  font-size: var(--step--2);
  font-weight: 600;
  letter-spacing: 0.03em;
  padding: 0.65em 1.5em;
  border-radius: var(--radius-sm);
  border: 2px solid var(--blue);
  text-decoration: none;
  background: var(--blue);
  color: #fff;
  transition: all var(--fast) ease;
  margin-top: auto;
  align-self: flex-start;
}
.program-cta:hover { background: var(--blue-hover); border-color: var(--blue-hover); color: #fff; text-decoration: none; transform: translateY(-1px); }

.program-main {
  max-width: var(--w-max);
  margin-inline: auto;
  padding: var(--s-2xl) var(--s-lg);
}

.program-content-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: var(--s-2xl);
  align-items: start;
}
.program-content-grid.full-width { grid-template-columns: 1fr; }

.program-main-content { min-width: 0; }

.content-section { margin-bottom: var(--s-xl); }
.content-section h2 {
  font-size: var(--step-2);
  margin-bottom: var(--s-md);
  padding-bottom: var(--s-sm);
  border-bottom: 2px solid var(--chalk);
}
.content-section p { color: var(--ink); line-height: 1.75; }
.content-section ul, .content-section ol { padding-left: 1.5em; margin-bottom: var(--s-md); }
.content-section li { margin-bottom: var(--s-xs); line-height: 1.6; list-style: disc; }
.content-section ol li { list-style: decimal; }

.program-highlights {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--s-md);
  margin-bottom: var(--s-xl);
}

.highlight-card {
  background: var(--chalk);
  border: 1px solid var(--border);
  padding: var(--s-lg);
  border-radius: var(--radius);
  text-align: center;
  transition: transform var(--norm) var(--ease);
}
.highlight-card:hover { transform: translateY(-2px); }
.highlight-card h4 { font-size: var(--step-0); margin-bottom: var(--s-xs); }
.highlight-card p { font-size: var(--step--1); color: var(--ink-muted); margin-inline: auto; }

.schedule-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: var(--s-md);
  margin-bottom: var(--s-xl);
}

.schedule-card {
  background: var(--chalk);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform var(--norm) var(--ease);
}
.schedule-card:hover { transform: translateY(-2px); }

.schedule-date {
  background: var(--slate);
  color: #fff;
  padding: var(--s-xs) var(--s-md);
  font-size: var(--step--2);
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.schedule-day { font-size: var(--step--2); color: rgba(255,255,255,0.6); font-weight: 400; }

.schedule-card h3 { font-size: var(--step-0); padding: var(--s-md) var(--s-md) var(--s-xs); }
.schedule-card p { padding: 0 var(--s-md) var(--s-md); font-size: var(--step--1); color: var(--ink-muted); }

.schedule-divider { height: 1px; background: var(--border); margin: 0 var(--s-md); }

.program-sidebar { position: sticky; top: 100px; }

.sidebar-widget {
  background: var(--chalk);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--s-lg);
  margin-bottom: var(--s-md);
}
.sidebar-widget h3 {
  font-size: var(--step-1);
  margin-bottom: var(--s-md);
  padding-bottom: var(--s-sm);
  border-bottom: 2px solid var(--paper);
}

.info-list { display: flex; flex-direction: column; gap: var(--s-md); }
.info-list li { display: flex; align-items: flex-start; gap: var(--s-sm); }

.info-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px; min-width: 36px;
  background: rgba(17,24,39,0.08);
  color: var(--blue);
  border-radius: var(--radius-sm);
  font-size: var(--step-0);
}
.info-content strong { display: block; font-size: var(--step--2); margin-bottom: 2px; }
.info-content span, .info-content p { font-size: var(--step--2); color: var(--ink-muted); }

.registration-box {
  background: var(--paper);
  border: 2px solid var(--blue);
  border-radius: var(--radius);
  padding: var(--s-lg);
  text-align: center;
}
.registration-box h3 { font-size: var(--step-1); margin-bottom: var(--s-sm); }
.registration-box p { font-size: var(--step--1); color: var(--ink-muted); margin-bottom: var(--s-md); margin-inline: auto; }

.registration-contact { display: flex; flex-direction: column; gap: var(--s-sm); margin-bottom: var(--s-md); }
.contact-email, .contact-phone {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-xs);
  font-size: var(--step--1);
  font-weight: 500;
}

.program-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-lg);
  justify-content: center;
  margin-top: var(--s-md);
  padding-top: var(--s-md);
  border-top: 1px solid rgba(255,255,255,0.12);
}
.meta-item { text-align: center; padding: var(--s-xs) var(--s-md); }
.meta-label {
  display: block;
  font-size: var(--step--2);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.5);
  margin-bottom: 4px;
}
.meta-value {
  display: block;
  font-size: var(--step-1);
  font-weight: 700;
  color: #fff;
}

.topic-list { display: flex; flex-direction: column; gap: var(--s-sm); margin-bottom: var(--s-lg); }
.topic-item {
  display: flex;
  align-items: center;
  gap: var(--s-md);
  padding: var(--s-sm) var(--s-md);
  background: var(--chalk);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: transform var(--fast) var(--ease);
}
.topic-item:hover { transform: translateX(4px); }
.topic-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px; height: 30px; min-width: 30px;
  background: var(--slate);
  color: #fff;
  font-size: var(--step--2);
  font-weight: 600;
  border-radius: 50%;
}
.topic-name { font-size: var(--step--1); font-weight: 500; }

.dual-track {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-xl);
  margin-bottom: var(--s-xl);
}
.track {
  background: var(--chalk);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--s-lg);
}
.track-header { padding-bottom: var(--s-md); margin-bottom: var(--s-md); border-bottom: 2px solid var(--blue); }
.track-header h3 { font-size: var(--step-1); color: var(--slate); margin-bottom: var(--s-xs); }
.track-header p { font-size: var(--step--1); color: var(--ink-muted); }

/* Service blocks */
.service-block {
  background: var(--chalk);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--s-lg);
  margin-bottom: var(--s-lg);
}
.service-block.highlight { border-color: var(--amber); background: var(--amber-light); }

.service-header { display: flex; align-items: center; gap: var(--s-sm); margin-bottom: var(--s-sm); }
.service-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px; min-width: 40px;
  background: var(--slate);
  color: #fff;
  border-radius: var(--radius-sm);
  font-size: var(--step-0);
}
.service-content h3 { font-size: var(--step-1); margin-bottom: var(--s-xs); }
.service-content p { font-size: var(--step--1); color: var(--ink-muted); }
.service-content ul { padding-left: 1.5em; margin-top: var(--s-sm); }
.service-content ul li { list-style: disc; margin-bottom: var(--s-2xs); font-size: var(--step--1); color: var(--ink-muted); }

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: var(--s-md);
  margin-bottom: var(--s-xl);
}
.feature-card {
  background: var(--chalk);
  border: 1px solid var(--border);
  padding: var(--s-lg);
  border-radius: var(--radius);
  text-align: center;
  transition: transform var(--norm) var(--ease);
}
.feature-card:hover { transform: translateY(-3px); }
.feature-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  margin: 0 auto var(--s-sm);
  background: rgba(17,24,39,0.08);
  color: var(--blue);
  border-radius: 50%;
  font-size: var(--step-1);
}
.feature-card h4 { font-size: var(--step-0); margin-bottom: var(--s-xs); }
.feature-card p { font-size: var(--step--1); color: var(--ink-muted); margin-inline: auto; }

@media (max-width: 768px) {
  .program-content-grid { grid-template-columns: 1fr; }
  .program-sidebar { position: static; }
  .program-highlights { grid-template-columns: 1fr; }
  .schedule-grid { grid-template-columns: 1fr; }
  .dual-track { grid-template-columns: 1fr; }
  .program-meta { flex-direction: column; align-items: center; }
}

/* ==========================================================================
   11. LECTURE PAGES
   ========================================================================== */
.lecture-categories {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: var(--s-lg);
  padding: var(--s-2xl) var(--s-lg);
  max-width: var(--w-max);
  margin-inline: auto;
}

.category-card {
  background: var(--slate);
  color: #fff;
  border-radius: var(--radius);
  padding: var(--s-xl);
  text-align: center;
  text-decoration: none;
  transition: transform var(--norm) var(--ease);
  display: block;
  border: 1px solid transparent;
}
.category-card:hover {
  transform: translateY(-4px);
  text-decoration: none;
  color: #fff;
  border-color: rgba(255,255,255,0.15);
}
.category-card h2, .category-card h3 { color: #fff; font-size: var(--step-1); margin-bottom: var(--s-sm); }
.category-card p { font-size: var(--step--1); color: rgba(255,255,255,0.65); margin-inline: auto; }

/* ==========================================================================
   12. SUCCESS STORIES
   ========================================================================== */
.success-stories { padding: var(--s-2xl) 0; }
.success-container { display: flex; flex-direction: column; gap: var(--s-xl); }

.success-tile {
  display: grid;
  grid-template-columns: 280px 1fr;
  align-items: stretch;
  background: var(--chalk);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform var(--norm) var(--ease);
}
.success-tile:hover { transform: translateY(-2px); }

.success-image { min-height: 240px; }
.success-image img { width: 100%; height: 100%; object-fit: cover; }

.success-details {
  padding: var(--s-xl);
  display: flex;
  flex-direction: column;
}

.success-email {
  font-size: var(--step--2);
  color: var(--ink-muted);
  font-style: italic;
  margin-bottom: var(--s-md);
}

.success-details h2, .success-details h3 { font-size: var(--step-1); margin-bottom: var(--s-2xs); }

.success-points { padding-left: 1.5em; flex: 1; }
.success-points li {
  list-style: disc;
  margin-bottom: var(--s-sm);
  font-size: var(--step--1);
  line-height: 1.7;
}

.success-note {
  font-style: italic;
  color: var(--ink-muted);
  font-size: var(--step--2);
  margin-top: var(--s-sm);
  padding-top: var(--s-sm);
  border-top: 1px solid var(--border);
  list-style: none;
}
.success-note::marker { content: none; }

@media (max-width: 768px) {
  .success-tile { grid-template-columns: 1fr; }
  .success-image { min-height: 200px; max-height: 280px; }
}

/* ==========================================================================
   13. NEWS
   ========================================================================== */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--s-lg);
  padding: var(--s-2xl) 0;
}

.news-card {
  background: var(--chalk);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform var(--norm) var(--ease);
  display: flex;
  flex-direction: column;
}
.news-card:hover { transform: translateY(-3px); }

.news-image { width: 100%; height: 180px; overflow: hidden; }
.news-image img { width: 100%; height: 100%; object-fit: cover; }

.news-content { padding: var(--s-lg); flex: 1; display: flex; flex-direction: column; }

.news-date {
  font-size: var(--step--2);
  color: var(--ink-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: var(--s-sm);
}

.news-content h3 { font-size: var(--step-1); margin-bottom: var(--s-sm); }
.news-content p { font-size: var(--step--1); color: var(--ink-muted); flex: 1; margin-bottom: var(--s-md); }

/* ==========================================================================
   14. CONTACT PAGE
   ========================================================================== */
.contact-section { padding: var(--s-2xl) var(--s-lg); max-width: var(--w-max); margin-inline: auto; }
.contact-section h1 { text-align: center; margin-bottom: var(--s-xl); font-size: var(--step-3); }
.contact-section h2 { text-align: center; margin-bottom: var(--s-lg); }

.contact-form {
  max-width: 600px;
  margin-inline: auto;
  background: var(--chalk);
  border: 1px solid var(--border);
  padding: var(--s-xl);
  border-radius: var(--radius);
}

.form-group { margin-bottom: var(--s-md); }
.form-group label {
  display: block;
  font-size: var(--step--2);
  font-weight: 600;
  color: var(--ink);
  margin-bottom: var(--s-xs);
}
.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.7em 0.9em;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--paper);
  font-size: var(--step-0);
  color: var(--ink);
  transition: border-color var(--fast) ease, box-shadow var(--fast) ease;
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(17,24,39,0.12);
}
.form-group textarea { min-height: 140px; resize: vertical; }

.contact-info {
  max-width: 600px;
  margin: var(--s-xl) auto 0;
  text-align: center;
}
.contact-info h2 { font-size: var(--step-1); margin-bottom: var(--s-sm); }
.contact-info p { color: var(--ink-muted); margin-inline: auto; }

/* ==========================================================================
   15. WHY MIMAC SECTION
   ========================================================================== */
.why-mimac {
  padding: var(--s-3xl) 0;
  text-align: center;
}
.why-mimac h2 { margin-bottom: var(--s-md); }
.why-mimac > .container > p {
  color: var(--ink-muted);
  margin-inline: auto;
  margin-bottom: var(--s-xl);
  font-size: var(--step-0);
}
.why-mimac ul {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--s-lg);
  max-width: 900px;
  margin-inline: auto;
}
.why-mimac ul li {
  background: var(--chalk);
  border: 1px solid var(--border);
  padding: var(--s-lg);
  border-radius: var(--radius);
  font-weight: 500;
  font-size: var(--step-0);
}

/* ==========================================================================
   16. LOGIN / ADMIN
   ========================================================================== */
.login-container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 200px);
  padding: var(--s-xl) var(--s-lg);
}

.login-form {
  width: 100%;
  max-width: 400px;
  background: var(--chalk);
  border: 1px solid var(--border);
  padding: var(--s-xl);
  border-radius: var(--radius);
}
.login-form h2 { text-align: center; margin-bottom: var(--s-lg); font-size: var(--step-2); }
.login-form .form-group { margin-bottom: var(--s-md); }
.login-form .form-group label { display: block; font-size: var(--step--2); font-weight: 600; margin-bottom: var(--s-xs); }
.login-form .form-group input {
  width: 100%;
  padding: 0.7em 0.9em;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--paper);
  font-size: var(--step-0);
  transition: border-color var(--fast) ease, box-shadow var(--fast) ease;
}
.login-form .form-group input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(17,24,39,0.12); }

/* Flash messages */
.flash-message {
  padding: var(--s-sm) var(--s-md);
  border-radius: var(--radius-sm);
  margin-bottom: var(--s-md);
  font-size: var(--step--2);
  font-weight: 500;
}
.flash-message.success, .flash-message.message {
  background: var(--green-bg);
  color: #065f46;
  border: 1px solid #a7f3d0;
}
.flash-message.error, .flash-message.danger {
  background: var(--red-bg);
  color: var(--red);
  border: 1px solid #fecaca;
}
.flash-message.warning {
  background: var(--amber-light);
  color: #92400e;
  border: 1px solid #fde68a;
}

/* Admin dashboard */
.admin-dashboard {
  max-width: var(--w-max);
  margin-inline: auto;
  padding: var(--s-xl) var(--s-lg);
}
.admin-dashboard h1 { font-size: var(--step-2); margin-bottom: var(--s-lg); }
.admin-dashboard table {
  background: var(--chalk);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.admin-dashboard th {
  background: var(--slate);
  color: #fff;
  padding: var(--s-sm) var(--s-md);
  text-align: left;
  font-size: var(--step--2);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.admin-dashboard td {
  padding: var(--s-sm) var(--s-md);
  border-bottom: 1px solid var(--border);
  font-size: var(--step--1);
}
.admin-dashboard tr:last-child td { border-bottom: none; }
.admin-dashboard tr:hover td { background: rgba(0,0,0,0.02); }

.edit-post { max-width: 700px; margin-inline: auto; padding: var(--s-xl) var(--s-lg); }
.edit-post h1 { font-size: var(--step-2); margin-bottom: var(--s-lg); }

/* ==========================================================================
   17. FOOTER
   ========================================================================== */
footer {
  background: var(--slate);
  color: rgba(255,255,255,0.75);
  padding: var(--s-3xl) var(--s-lg) var(--s-lg);
  margin-top: auto;
}

.footer-content {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: var(--s-2xl);
  max-width: var(--w-max);
  margin-inline: auto;
  padding-bottom: var(--s-xl);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.footer-logo { display: inline-block; margin-bottom: var(--s-sm); }
.footer-logo img { height: 36px; width: auto; }

.footer-section h3 {
  font-family: var(--font-display);
  font-size: var(--step-1);
  color: #fff;
  margin-bottom: var(--s-md);
}
.footer-section p { font-size: var(--step--1); line-height: 1.7; color: rgba(255,255,255,0.6); max-width: none; }
.footer-section ul { display: flex; flex-direction: column; gap: var(--s-sm); }
.footer-section a { font-size: var(--step--1); color: rgba(255,255,255,0.6); text-decoration: none; transition: color var(--fast) ease; }
.footer-section a:hover { color: #fff; text-decoration: none; }

.footer-bottom {
  text-align: center;
  padding-top: var(--s-lg);
  max-width: var(--w-max);
  margin-inline: auto;
}
.footer-bottom p { font-size: var(--step--2); color: rgba(255,255,255,0.35); max-width: none; margin-inline: auto; }

@media (max-width: 768px) {
  .footer-content { grid-template-columns: 1fr; gap: var(--s-xl); }
}

/* ==========================================================================
   18. ANIMATIONS
   ========================================================================== */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

/* ==========================================================================
   19. UTILITY CLASSES
   ========================================================================== */
.text-center { text-align: center; }
.text-accent { color: var(--blue); }
.text-muted { color: var(--ink-muted); }
.text-white { color: #fff; }
.bg-navy { background-color: var(--slate); color: #fff; }
.bg-chalk { background-color: var(--chalk); }

.mt-sm { margin-top: var(--s-sm); }
.mt-md { margin-top: var(--s-md); }
.mt-lg { margin-top: var(--s-lg); }
.mt-xl { margin-top: var(--s-xl); }
.mb-sm { margin-bottom: var(--s-sm); }
.mb-md { margin-bottom: var(--s-md); }
.mb-lg { margin-bottom: var(--s-lg); }
.mb-xl { margin-bottom: var(--s-xl); }
.py-lg { padding-block: var(--s-lg); }
.py-xl { padding-block: var(--s-xl); }
.py-2xl { padding-block: var(--s-2xl); }
.px-md { padding-inline: var(--s-md); }

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap; border: 0;
}

/* ==========================================================================
   20. RESPONSIVE OVERRIDES
   ========================================================================== */
@media (max-width: 768px) {
  body { padding-top: 60px; }
  header { height: 60px; }
  header nav { padding-inline: var(--s-md); }

  .hero { min-height: 55vh; padding: var(--s-2xl) var(--s-md); }
  .hero h1 { font-size: var(--step-3); }
  .hero p { font-size: var(--step-0); }

  .about-hero,
  .programs-hero,
  .lectures-hero,
  .news-hero,
  .program-header { min-height: 25vh; padding: var(--s-xl) var(--s-md); }

  .lecture-categories { grid-template-columns: 1fr; padding: var(--s-xl) var(--s-md); }
  .news-grid { grid-template-columns: 1fr; }
  .program-cards-grid { grid-template-columns: 1fr; }
  .features-grid { grid-template-columns: 1fr; }

  .contact-section { padding: var(--s-xl) var(--s-md); }
  .contact-form { padding: var(--s-md); }

  .login-form { padding: var(--s-md); }

  .category-card { padding: var(--s-lg) var(--s-md); }

  .service-block { flex-direction: column; align-items: flex-start; }

  .why-mimac ul { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .hero { min-height: 50vh; }
  .hero h1 { font-size: var(--step-2); }
  .hero p { font-size: var(--step--1); }

  h2 { font-size: var(--step-2); }
  h3 { font-size: var(--step-1); }

  .program-cards-grid,
  .news-grid,
  .lecture-categories { gap: var(--s-md); }

  .footer-content { gap: var(--s-lg); }
}

/* ==========================================================================
   21. PRINT
   ========================================================================== */
@media print {
  header, footer, .menu-btn, .mobile-menu, .btn { display: none !important; }
  body { color: #000; background: #fff; font-size: 12pt; padding-top: 0; }
  .hero, .about-hero, .programs-hero, .lectures-hero, .news-hero, .program-header {
    color: #000; background: #fff; min-height: auto; padding: 1em 0;
  }
  .hero h1, .about-hero h1, .programs-hero h1, .lectures-hero h1, .news-hero h1, .program-header h1 { color: #000; }
  .hero p, .about-hero p, .programs-hero p, .lectures-hero p, .news-hero p, .program-header p { color: #000; }
}
