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

:root {
  --navy: #1a3a5c;
  --navy-light: #254d7a;
  --gold: #d4a847;
  --green: #27ae60;
  --red: #e74c3c;
  --bg: #f0f2f5;
  --card: #ffffff;
  --text: #1e293b;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --radius: 10px;
  --shadow: 0 2px 12px rgba(0,0,0,0.08);
}

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

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  font-size: 15px;
  line-height: 1.6;
}

a { color: var(--navy); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Nav ── */
nav {
  background: var(--navy);
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-weight: 700;
  font-size: 17px;
  text-decoration: none;
}

.nav-brand img { height: 36px; width: auto; object-fit: contain; }
.nav-brand span { color: var(--gold); }

.nav-links { display: flex; align-items: center; gap: 8px; }

.nav-links a {
  color: rgba(255,255,255,0.8);
  font-size: 14px;
  padding: 6px 14px;
  border-radius: 6px;
  text-decoration: none;
  transition: background 0.15s;
}

.nav-links a:hover { background: rgba(255,255,255,0.1); color: #fff; text-decoration: none; }

.nav-links .btn-nav {
  background: var(--gold);
  color: #1a3a5c;
  font-weight: 600;
}

.nav-links .btn-nav:hover { background: #e5bb58; }

/* ── Container ── */
.container { max-width: 1100px; margin: 0 auto; padding: 32px 20px; }
.container-sm { max-width: 520px; margin: 0 auto; padding: 40px 20px; }

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 22px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.15s;
  text-decoration: none;
}

.btn-primary { background: var(--navy); color: #fff; }
.btn-primary:hover { background: var(--navy-light); color: #fff; text-decoration: none; }

.btn-gold { background: var(--gold); color: #1a3a5c; }
.btn-gold:hover { background: #e5bb58; text-decoration: none; }

.btn-green { background: var(--green); color: #fff; }
.btn-green:hover { background: #219a52; text-decoration: none; }

.btn-outline {
  background: transparent;
  border: 2px solid var(--navy);
  color: var(--navy);
}
.btn-outline:hover { background: var(--navy); color: #fff; text-decoration: none; }

.btn-lg { padding: 14px 30px; font-size: 16px; }
.btn-full { width: 100%; }

.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ── Cards ── */
.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px;
  border: 1px solid var(--border);
}

.card-sm { padding: 20px; }

/* ── Forms ── */
.form-group { margin-bottom: 18px; }

label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

input[type="text"], input[type="email"], input[type="password"] {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 15px;
  font-family: inherit;
  transition: border-color 0.15s;
  background: #fff;
  color: var(--text);
}

input:focus {
  outline: none;
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(26,58,92,0.1);
}

/* ── Alert ── */
.alert {
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 14px;
  margin-bottom: 16px;
  font-weight: 500;
}

.alert-error { background: #fef2f2; color: #c0392b; border: 1px solid #fecaca; }
.alert-success { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; }
.alert-info { background: #eff6ff; color: #1e40af; border: 1px solid #bfdbfe; }

/* ── Badge ── */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.badge-navy { background: #dbeafe; color: var(--navy); }
.badge-gold { background: #fef3c7; color: #92400e; }
.badge-green { background: #dcfce7; color: #166534; }
.badge-red { background: #fef2f2; color: #c0392b; }

/* ── Hero ── */
.hero {
  background: linear-gradient(135deg, var(--navy) 0%, #254d7a 100%);
  color: #fff;
  padding: 80px 20px;
  text-align: center;
}

.hero h1 { font-size: 42px; font-weight: 700; margin-bottom: 14px; line-height: 1.2; }
.hero h1 span { color: var(--gold); }
.hero p { font-size: 18px; opacity: 0.85; max-width: 600px; margin: 0 auto 32px; }

/* ── Course card ── */
.course-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 24px; margin-top: 32px; }

.course-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: transform 0.15s, box-shadow 0.15s;
}

.course-card:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,0.12); }

.course-card-header {
  background: linear-gradient(135deg, var(--navy) 0%, #254d7a 100%);
  padding: 24px;
  color: #fff;
}

.course-card-header h3 { font-size: 18px; line-height: 1.3; margin-bottom: 8px; }

.course-card-body { padding: 20px 24px 24px; }

.course-meta { display: flex; gap: 16px; margin-bottom: 14px; flex-wrap: wrap; }
.course-meta span { font-size: 13px; color: var(--text-muted); display: flex; align-items: center; gap: 4px; }

.course-price { font-size: 28px; font-weight: 700; color: var(--navy); margin-bottom: 16px; }
.course-price small { font-size: 14px; font-weight: 400; color: var(--text-muted); }

/* ── Tabs ── */
.tabs { display: flex; gap: 2px; border-bottom: 2px solid var(--border); margin-bottom: 28px; }

.tab-btn {
  padding: 10px 20px;
  background: none;
  border: none;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all 0.15s;
  font-family: inherit;
}

.tab-btn.active { color: var(--navy); border-bottom-color: var(--navy); }
.tab-btn:hover:not(.active) { color: var(--text); }

.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ── Assessment ── */
.question-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 16px;
}

.question-num {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  margin-bottom: 8px;
}

.question-text { font-size: 16px; font-weight: 600; margin-bottom: 16px; line-height: 1.5; }

.options { display: flex; flex-direction: column; gap: 8px; }

.option-label {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 16px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.12s;
  font-size: 14px;
  line-height: 1.5;
}

.option-label:hover { border-color: var(--navy); background: #f8faff; }
.option-label input { margin-top: 2px; flex-shrink: 0; accent-color: var(--navy); }
.option-label.selected { border-color: var(--navy); background: #eff6ff; }
.option-label.correct { border-color: var(--green); background: #f0fdf4; }
.option-label.incorrect { border-color: var(--red); background: #fef2f2; }

.question-result {
  margin-top: 12px;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  display: none;
}

.result-correct { background: #dcfce7; color: #166534; border: 1px solid #86efac; }
.result-incorrect { background: #fef2f2; color: #c0392b; border: 1px solid #fca5a5; }

/* ── Score panel ── */
.score-panel {
  text-align: center;
  padding: 40px 32px;
}

.score-circle {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  font-weight: 700;
}

.score-circle.pass { background: #dcfce7; color: var(--green); border: 4px solid var(--green); }
.score-circle.fail { background: #fef2f2; color: var(--red); border: 4px solid var(--red); }

/* ── Progress bar ── */
.progress-bar {
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
  margin: 12px 0;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--navy), var(--gold));
  border-radius: 3px;
  transition: width 0.4s ease;
}

/* ── Section heading ── */
.section-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 6px;
}

.section-sub { color: var(--text-muted); font-size: 14px; margin-bottom: 24px; }

/* ── File item ── */
.file-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 10px;
  background: #fff;
}

.file-icon { font-size: 28px; margin-right: 14px; }
.file-info h4 { font-size: 15px; font-weight: 600; }
.file-info p { font-size: 13px; color: var(--text-muted); margin-top: 2px; }

/* ── Spinner ── */
.spinner {
  width: 20px; height: 20px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ── Empty state ── */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}

.empty-state .icon { font-size: 48px; margin-bottom: 16px; }
.empty-state h3 { font-size: 18px; color: var(--text); margin-bottom: 8px; }

/* ── Responsive ── */
@media (max-width: 640px) {
  .hero h1 { font-size: 28px; }
  .hero p { font-size: 15px; }
  nav { padding: 0 16px; }
  .container { padding: 20px 14px; }
  .course-grid { grid-template-columns: 1fr; }
  .tabs { overflow-x: auto; }
  .tab-btn { white-space: nowrap; padding: 10px 14px; }
}
