/* =============================================
   INSTRUMENTAÇÃO INDUSTRIAL - CURSO ONLINE
   Tema: Industrial Refinado / Dark Steel
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=Rajdhani:wght@300;400;500;600;700&family=Source+Sans+3:ital,wght@0,300;0,400;0,600;1,400&family=JetBrains+Mono:wght@400;600&display=swap');

:root {
  /* Paleta Industrial */
  --steel-dark:    #0d1117;
  --steel-900:     #161b24;
  --steel-800:     #1e2533;
  --steel-700:     #262f42;
  --steel-600:     #2d3a52;
  --steel-400:     #4a5a7a;
  --steel-200:     #8899bb;
  --steel-100:     #c8d4ee;

  --amber:         #f59e0b;
  --amber-light:   #fbbf24;
  --amber-glow:    rgba(245,158,11,0.15);

  --teal:          #14b8a6;
  --teal-light:    #2dd4bf;
  --teal-glow:     rgba(20,184,166,0.12);

  --red-alert:     #ef4444;
  --green-ok:      #22c55e;
  --blue-info:     #3b82f6;

  --text-primary:  #e8edf8;
  --text-secondary: #8899bb;
  --text-muted:    #4a5a7a;

  --border:        rgba(255,255,255,0.07);
  --border-accent: rgba(245,158,11,0.3);

  --font-display:  'Rajdhani', sans-serif;
  --font-body:     'Source Sans 3', sans-serif;
  --font-mono:     'JetBrains Mono', monospace;

  --radius-sm:     6px;
  --radius-md:     12px;
  --radius-lg:     20px;

  --shadow-card:   0 4px 24px rgba(0,0,0,0.4);
  --shadow-glow:   0 0 40px rgba(245,158,11,0.08);

  --transition:    all 0.25s cubic-bezier(0.4,0,0.2,1);
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--steel-dark);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.7;
  min-height: 100vh;
  background-image:
    radial-gradient(ellipse at 20% 0%, rgba(245,158,11,0.04) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 100%, rgba(20,184,166,0.04) 0%, transparent 50%);
}

/* ---- GRID NOISE TEXTURE ---- */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.015'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
}

/* ---- NAVBAR ---- */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(13,17,23,0.92);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
}

.navbar-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 24px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  flex-shrink: 0;
}

.logo-icon {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--amber), #d97706);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  box-shadow: 0 0 16px rgba(245,158,11,0.35);
}

.logo-text {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  line-height: 1.1;
}

.logo-text span { color: var(--amber); }

.nav-links {
  display: flex;
  list-style: none;
  gap: 4px;
  flex-wrap: wrap;
}

.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  white-space: nowrap;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--amber);
  background: var(--amber-glow);
}

.nav-progress {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.progress-label {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
}

.progress-bar-wrap {
  width: 100px;
  height: 4px;
  background: var(--steel-700);
  border-radius: 99px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--amber), var(--teal));
  border-radius: 99px;
  transition: width 0.5s ease;
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.hamburger span {
  display: block;
  width: 24px; height: 2px;
  background: var(--text-secondary);
  border-radius: 2px;
  transition: var(--transition);
}

/* Mobile nav */
.mobile-nav {
  display: none;
  flex-direction: column;
  background: var(--steel-900);
  border-top: 1px solid var(--border);
  padding: 16px 24px 24px;
  gap: 4px;
}

.mobile-nav a {
  color: var(--text-secondary);
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.mobile-nav a:hover { color: var(--amber); background: var(--amber-glow); }
.mobile-nav.open { display: flex; }

/* ---- HERO ---- */
.hero {
  position: relative;
  overflow: hidden;
  padding: 80px 24px 100px;
  text-align: center;
}

.hero::before {
  content: '';
  position: absolute;
  top: -100px; left: 50%;
  transform: translateX(-50%);
  width: 600px; height: 600px;
  background: radial-gradient(ellipse, rgba(245,158,11,0.08) 0%, transparent 70%);
  pointer-events: none;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(245,158,11,0.1);
  border: 1px solid rgba(245,158,11,0.25);
  color: var(--amber-light);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 6px 16px;
  border-radius: 99px;
  margin-bottom: 24px;
}

.hero-badge::before {
  content: '';
  width: 6px; height: 6px;
  background: var(--amber);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--amber);
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(36px, 7vw, 80px);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  margin-bottom: 20px;
}

.hero h1 .accent { color: var(--amber); }
.hero h1 .accent-teal { color: var(--teal); }

.hero-sub {
  font-size: clamp(16px, 2.5vw, 20px);
  color: var(--text-secondary);
  max-width: 640px;
  margin: 0 auto 40px;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
  margin-bottom: 48px;
}

.stat {
  text-align: center;
}

.stat-num {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 700;
  color: var(--amber);
  line-height: 1;
}

.stat-label {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-top: 4px;
}

/* ---- BUTTONS ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius-md);
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: var(--transition);
}

.btn-primary {
  background: linear-gradient(135deg, var(--amber), #d97706);
  color: #0d1117;
  box-shadow: 0 4px 20px rgba(245,158,11,0.35);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(245,158,11,0.5);
}

.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  border-color: var(--amber);
  color: var(--amber);
  background: var(--amber-glow);
}

.btn-teal {
  background: linear-gradient(135deg, var(--teal), #0d9488);
  color: #0d1117;
  box-shadow: 0 4px 20px rgba(20,184,166,0.3);
}

.btn-teal:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(20,184,166,0.45);
}

/* ---- CONTAINERS ---- */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

.container-wide {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

section { padding: 64px 0; }

.section-label {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 12px;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  margin-bottom: 16px;
  line-height: 1.1;
}

.section-desc {
  color: var(--text-secondary);
  font-size: 17px;
  max-width: 600px;
}

/* ---- CARDS ---- */
.card {
  background: var(--steel-900);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(245,158,11,0.02) 0%, transparent 50%);
  pointer-events: none;
}

.card:hover {
  border-color: rgba(245,158,11,0.2);
  transform: translateY(-3px);
  box-shadow: var(--shadow-card), 0 0 30px rgba(245,158,11,0.05);
}

.card-icon {
  width: 52px; height: 52px;
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 24px;
  margin-bottom: 20px;
}

.icon-amber { background: rgba(245,158,11,0.12); }
.icon-teal  { background: rgba(20,184,166,0.12); }
.icon-blue  { background: rgba(59,130,246,0.12); }
.icon-red   { background: rgba(239,68,68,0.12);  }
.icon-green { background: rgba(34,197,94,0.12);  }
.icon-purple{ background: rgba(168,85,247,0.12); }

.card h3 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 10px;
}

.card p {
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.6;
}

/* ---- MODULE CARDS (course index) ---- */
.modules-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
  margin-top: 48px;
}

.module-card {
  background: var(--steel-900);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  transition: var(--transition);
  position: relative;
}

.module-card:hover {
  border-color: rgba(245,158,11,0.25);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.4);
}

.module-thumb {
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 64px;
  position: relative;
  overflow: hidden;
}

.module-thumb-pressure   { background: linear-gradient(135deg, #1a1a2e, #162032); }
.module-thumb-level      { background: linear-gradient(135deg, #0d1a1a, #0d2020); }
.module-thumb-temp       { background: linear-gradient(135deg, #1a0d0d, #2a1010); }
.module-thumb-flow       { background: linear-gradient(135deg, #0d1020, #0d1a30); }
.module-thumb-intro      { background: linear-gradient(135deg, #121218, #1a1a28); }
.module-thumb-sensors    { background: linear-gradient(135deg, #101820, #102028); }
.module-thumb-control    { background: linear-gradient(135deg, #0d1a10, #102010); }
.module-thumb-safety     { background: linear-gradient(135deg, #1a0d0d, #1a1010); }
.module-thumb-exam       { background: linear-gradient(135deg, #1a1200, #1a1600); }

.module-thumb::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(255,255,255,0.04) 0%, transparent 70%);
}

.module-num {
  position: absolute;
  top: 12px; left: 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.15em;
  color: var(--text-muted);
  background: rgba(0,0,0,0.5);
  padding: 3px 8px;
  border-radius: 4px;
}

.module-status {
  position: absolute;
  top: 12px; right: 12px;
  width: 28px; height: 28px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px;
  background: rgba(0,0,0,0.5);
}

.status-done    { background: rgba(34,197,94,0.2); color: var(--green-ok); }
.status-current { background: rgba(245,158,11,0.2); color: var(--amber); }
.status-locked  { background: rgba(255,255,255,0.05); color: var(--text-muted); }

.module-body {
  padding: 20px 24px 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.module-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 4px;
  margin-bottom: 10px;
}

.tag-amber  { background: rgba(245,158,11,0.1); color: var(--amber-light); }
.tag-teal   { background: rgba(20,184,166,0.1); color: var(--teal-light); }
.tag-blue   { background: rgba(59,130,246,0.1); color: #60a5fa; }
.tag-red    { background: rgba(239,68,68,0.1);  color: #f87171; }
.tag-green  { background: rgba(34,197,94,0.1);  color: #4ade80; }
.tag-purple { background: rgba(168,85,247,0.1); color: #c084fc; }

.module-body h3 {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 8px;
}

.module-body p {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.5;
  flex: 1;
  margin-bottom: 16px;
}

.module-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 13px;
  color: var(--text-muted);
}

.module-meta span {
  display: flex;
  align-items: center;
  gap: 5px;
}

/* ---- LESSON LAYOUT ---- */
.lesson-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 0;
  min-height: calc(100vh - 64px);
}

.lesson-sidebar {
  background: var(--steel-900);
  border-right: 1px solid var(--border);
  padding: 32px 0;
  position: sticky;
  top: 64px;
  height: calc(100vh - 64px);
  overflow-y: auto;
  z-index: 10;
}

.sidebar-section {
  margin-bottom: 8px;
}

.sidebar-module-title {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 8px 24px;
  margin-top: 16px;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 24px;
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 14px;
  transition: var(--transition);
  border-left: 3px solid transparent;
}

.sidebar-link:hover {
  color: var(--text-primary);
  background: rgba(255,255,255,0.03);
}

.sidebar-link.active {
  color: var(--amber);
  background: var(--amber-glow);
  border-left-color: var(--amber);
}

.sidebar-link .link-num {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  width: 20px;
  flex-shrink: 0;
}

.sidebar-link .link-check {
  margin-left: auto;
  font-size: 12px;
  color: var(--green-ok);
}

/* ---- LESSON CONTENT ---- */
.lesson-content {
  padding: 48px;
  max-width: 820px;
}

.lesson-header {
  margin-bottom: 40px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--border);
}

.lesson-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 16px;
}

.lesson-title {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 700;
  text-transform: uppercase;
  line-height: 1.1;
  margin-bottom: 16px;
}

.lesson-meta {
  display: flex;
  gap: 20px;
  color: var(--text-muted);
  font-size: 14px;
}

/* Lesson body typography */
.lesson-body h2 {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-primary);
  margin: 40px 0 16px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

.lesson-body h3 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  color: var(--amber-light);
  margin: 28px 0 12px;
}

.lesson-body p {
  color: var(--text-secondary);
  margin-bottom: 16px;
  font-size: 17px;
}

.lesson-body strong { color: var(--text-primary); }

.lesson-body ul, .lesson-body ol {
  color: var(--text-secondary);
  padding-left: 24px;
  margin-bottom: 16px;
}

.lesson-body li { margin-bottom: 6px; }

.lesson-body a {
  color: var(--teal);
  text-decoration: none;
}

.lesson-body a:hover {
  text-decoration: underline;
}

/* Info boxes */
.info-box {
  border-radius: var(--radius-md);
  padding: 20px 24px;
  margin: 24px 0;
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.info-box-icon { font-size: 22px; flex-shrink: 0; margin-top: 2px; }

.info-box-content h4 {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}

.info-box-content p {
  font-size: 15px;
  margin: 0;
}

.info-note    { background: rgba(59,130,246,0.08); border: 1px solid rgba(59,130,246,0.2); }
.info-note .info-box-icon { color: #60a5fa; }
.info-note .info-box-content h4 { color: #60a5fa; }

.info-tip     { background: rgba(20,184,166,0.08); border: 1px solid rgba(20,184,166,0.2); }
.info-tip .info-box-icon { color: var(--teal); }
.info-tip .info-box-content h4 { color: var(--teal); }

.info-warning { background: rgba(245,158,11,0.08); border: 1px solid rgba(245,158,11,0.2); }
.info-warning .info-box-icon { color: var(--amber); }
.info-warning .info-box-content h4 { color: var(--amber); }

.info-danger  { background: rgba(239,68,68,0.08); border: 1px solid rgba(239,68,68,0.2); }
.info-danger .info-box-icon { color: var(--red-alert); }
.info-danger .info-box-content h4 { color: var(--red-alert); }

/* Formula box */
.formula-box {
  background: var(--steel-800);
  border: 1px solid var(--border);
  border-left: 4px solid var(--teal);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  margin: 24px 0;
  font-family: var(--font-mono);
  font-size: 18px;
  color: var(--teal-light);
  text-align: center;
}

.formula-caption {
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--text-muted);
  text-align: center;
  margin-top: 8px;
}

/* Table */
.data-table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  font-size: 15px;
}

.data-table th {
  background: var(--steel-700);
  color: var(--text-primary);
  font-family: var(--font-display);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 13px;
  padding: 12px 16px;
  text-align: left;
  border-bottom: 2px solid var(--amber);
}

.data-table td {
  padding: 11px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
}

.data-table tr:hover td {
  background: rgba(255,255,255,0.02);
  color: var(--text-primary);
}

/* Diagram */
.diagram-wrap {
  background: var(--steel-800);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  margin: 28px 0;
  text-align: center;
}

.diagram-title {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 20px;
}

/* Quiz / Mini test */
.quiz-wrap {
  background: var(--steel-800);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin: 32px 0;
}

.quiz-title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--amber);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.quiz-question {
  color: var(--text-primary);
  font-size: 16px;
  margin-bottom: 16px;
  font-weight: 500;
}

.quiz-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}

.quiz-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--steel-700);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition);
  font-size: 15px;
  color: var(--text-secondary);
}

.quiz-option:hover {
  border-color: rgba(245,158,11,0.3);
  background: var(--amber-glow);
  color: var(--text-primary);
}

.quiz-option.selected {
  border-color: var(--amber);
  background: var(--amber-glow);
  color: var(--text-primary);
}

.quiz-option.correct {
  border-color: var(--green-ok);
  background: rgba(34,197,94,0.1);
  color: var(--green-ok);
}

.quiz-option.wrong {
  border-color: var(--red-alert);
  background: rgba(239,68,68,0.1);
  color: var(--red-alert);
}

.quiz-option-letter {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--steel-600);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  flex-shrink: 0;
}

.quiz-feedback {
  padding: 14px 18px;
  border-radius: var(--radius-md);
  font-size: 15px;
  display: none;
}

.quiz-feedback.show { display: block; }
.quiz-feedback.correct-fb { background: rgba(34,197,94,0.1); border: 1px solid rgba(34,197,94,0.3); color: var(--green-ok); }
.quiz-feedback.wrong-fb   { background: rgba(239,68,68,0.1); border: 1px solid rgba(239,68,68,0.3); color: #f87171; }

/* Lesson nav */
.lesson-nav-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 56px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
  gap: 16px;
}

/* ---- EXAM PAGE ---- */
.exam-header {
  text-align: center;
  padding: 64px 24px 48px;
}

.exam-timer {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(239,68,68,0.1);
  border: 1px solid rgba(239,68,68,0.25);
  color: #f87171;
  font-family: var(--font-mono);
  font-size: 20px;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  margin-bottom: 32px;
  letter-spacing: 0.1em;
}

.exam-progress {
  background: var(--steel-800);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px 28px;
  margin-bottom: 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.exam-q-wrap {
  background: var(--steel-900);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  margin-bottom: 20px;
}

.exam-q-num {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.exam-q-text {
  font-size: 17px;
  color: var(--text-primary);
  margin-bottom: 20px;
  font-weight: 500;
  line-height: 1.55;
}

/* Certificate */
.certificate-wrap {
  text-align: center;
  padding: 64px 24px;
}

.certificate-card {
  max-width: 720px;
  margin: 0 auto;
  background: var(--steel-900);
  border: 2px solid var(--amber);
  border-radius: 24px;
  padding: 48px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 0 60px rgba(245,158,11,0.12);
}

.certificate-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at top, rgba(245,158,11,0.06) 0%, transparent 60%);
}

.certificate-card h1 {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.25em;
  color: var(--amber);
  margin-bottom: 32px;
}

.certificate-card .cert-name {
  font-family: var(--font-display);
  font-size: 48px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 16px 0;
  text-transform: uppercase;
}

.certificate-card .cert-body {
  color: var(--text-secondary);
  font-size: 16px;
  margin-bottom: 32px;
}

.certificate-card .cert-score {
  display: inline-block;
  background: linear-gradient(135deg, var(--amber), #d97706);
  color: #0d1117;
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  padding: 8px 28px;
  border-radius: var(--radius-md);
  margin-bottom: 32px;
}

.cert-seals {
  display: flex;
  justify-content: center;
  gap: 32px;
  margin-top: 40px;
  flex-wrap: wrap;
}

.cert-seal {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.cert-seal .seal-circle {
  width: 64px; height: 64px;
  border: 2px solid var(--amber);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 28px;
}

.cert-seal .seal-label {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  text-align: center;
}

/* ---- FOOTER ---- */
footer {
  background: var(--steel-900);
  border-top: 1px solid var(--border);
  padding: 40px 24px;
  text-align: center;
}

footer p {
  color: var(--text-muted);
  font-size: 14px;
}

footer p a {
  color: var(--amber);
  text-decoration: none;
}

/* ---- DIAGRAM SVG ---- */
.svg-diagram { max-width: 100%; height: auto; }

/* ---- RESPONSIVE ---- */
@media (max-width: 1024px) {
  .lesson-layout {
    grid-template-columns: 240px 1fr;
  }
  .lesson-content { padding: 32px; }
}

@media (max-width: 768px) {
  .nav-links, .nav-progress { display: none; }
  .hamburger { display: flex; }

  .lesson-layout {
    grid-template-columns: 1fr;
  }

  .lesson-sidebar {
    display: none;
    position: fixed;
    top: 64px; left: 0;
    width: 100%; height: calc(100vh - 64px);
    z-index: 50;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }

  .lesson-sidebar.open { display: block; }

  .lesson-content { padding: 24px 20px; }

  .hero-stats { gap: 24px; }
  .modules-grid { grid-template-columns: 1fr; }

  .data-table {
    display: block;
    overflow-x: auto;
  }

  .exam-q-wrap { padding: 20px; }
  .certificate-card { padding: 32px 24px; }
  .certificate-card .cert-name { font-size: 32px; }
}

@media (max-width: 480px) {
  .hero { padding: 60px 20px 80px; }
  .btn { padding: 12px 22px; font-size: 14px; }
  .card { padding: 24px; }
  .lesson-nav-bar { flex-direction: column; }
  .lesson-nav-bar .btn { width: 100%; justify-content: center; }
}

/* ---- ANIMATIONS ---- */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.fade-in { animation: fadeInUp 0.5s ease both; }
.fade-in-1 { animation-delay: 0.1s; }
.fade-in-2 { animation-delay: 0.2s; }
.fade-in-3 { animation-delay: 0.3s; }
.fade-in-4 { animation-delay: 0.4s; }

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--steel-900); }
::-webkit-scrollbar-thumb { background: var(--steel-600); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--steel-400); }
