/* =========================
   Test Harbor - Header + Hero
   ========================= */

/* --- Color Palette --- */
:root {
  --bg: #f8fafc;       /* sand white */
  --card: #ffffff;
  --text: #0f172a;     /* deep navy */
  --muted: #6b7280;
  --primary: #0a7bd8;  /* harbor blue */
  --primary-2: #065ea6;
  --seafoam: #38bdf8;  /* accent hover */
  --ok: #0a9d4a;
  --danger: #e03131;
  --border: #e5e7eb;
  --shadow: rgba(15, 23, 42, 0.08);
}

/* --- Reset & Base --- */
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

/* --- Header --- */
header {
  background: var(--text);
  color: #fff;
  padding: 24px 16px;
  text-align: center;
  box-shadow: 0 4px 12px rgba(0,0,0,.15);
  position: sticky;
  top: 0;
  z-index: 100;
}
header h1#site-title {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 2rem;
  letter-spacing: -0.5px;
  cursor: pointer;
  text-decoration: underline dotted transparent;
}
header h1#site-title:hover {
  text-decoration-color: var(--seafoam);
}
header nav {
  margin-top: 8px;
}
header nav a {
  color: #e0e7ff;
  margin: 0 12px;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}
header nav a:hover {
  color: var(--seafoam);
}

/* --- Hero Section --- */
.hero {
  text-align: center;
  padding: 80px 20px;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: #fff;
  position: relative;
}
.hero h2 {
  font-family: 'Montserrat', sans-serif;
  font-size: 2.5rem;
  margin-bottom: 16px;
}
.hero p {
  font-size: 1.2rem;
  margin-bottom: 28px;
  color: #e0f2fe;
}
.hero .cta {
  background: #fff;
  color: var(--primary-2);
  font-weight: 600;
  padding: 14px 28px;
  border-radius: 14px;
  border: none;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 4px 10px rgba(0,0,0,.15);
}
.hero .cta:hover {
  background: var(--seafoam);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0,0,0,.2);
}
/* Wave divider */
.hero::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  height: 60px;
  background: url('data:image/svg+xml;utf8,<svg viewBox="0 0 1440 320" xmlns="http://www.w3.org/2000/svg"><path fill="%23f8fafc" fill-opacity="1" d="M0,224L48,213.3C96,203,192,181,288,176C384,171,480,181,576,192C672,203,768,213,864,197.3C960,181,1056,139,1152,128C1248,117,1344,139,1392,149.3L1440,160L1440,320L0,320Z"></path></svg>') no-repeat bottom;
  background-size: cover;
}
/* =========================
   Test Harbor - Menu + Cards
   ========================= */

/* --- Layout --- */
main { 
  max-width: 1100px; 
  margin: 40px auto; 
  padding: 0 20px; 
}
footer {
  color: var(--muted);
  text-align: center;
  padding: 32px 0;
  font-size: 0.9rem;
  background: #f1f5f9;
  margin-top: 40px;
}

/* --- Menu --- */
.menu { 
  text-align: center; 
  margin: 40px 0; 
}
.menu button {
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: #fff;
  border: 0;
  border-radius: 14px;
  padding: 14px 22px;
  margin: 12px;
  cursor: pointer;
  font-size: 1.05rem;
  font-weight: 600;
  box-shadow: 0 4px 10px rgba(0,0,0,.1);
  transition: all 0.25s ease;
}
.menu button:hover {
  background: var(--seafoam);
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(0,0,0,.15);
}

/* --- Cards --- */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px;
  margin: 20px 0;
  box-shadow: 0 6px 16px var(--shadow);
  border-top: 4px solid var(--primary);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(0,0,0,.12);
}

/* --- Controls --- */
.controls {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin: 16px 0;
}
.controls input, 
.controls select {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: .95rem;
}
.toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--border);
  padding: 6px 12px;
  border-radius: 999px;
  background: #fff;
}
/* =========================
   Test Harbor - Exam UI + Q&A
   ========================= */

/* --- Exam Top Bar --- */
.exam-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.exam-meta { 
  color: var(--muted); 
  display: flex; 
  gap: 8px; 
  align-items: center; 
}
.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 600;
  background: #f3f4f6;
  color: var(--primary-2);
}
.badge:empty { display: none; }

/* --- Progress Bar --- */
#progress-bar {
  height: 6px;
  background: linear-gradient(90deg, var(--primary), var(--seafoam));
  border-radius: 999px;
  transition: width 0.3s ease;
}

/* --- Question Styling --- */
.question {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 16px 0 10px;
}
.passage {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px;
  margin: 8px 0 12px;
  line-height: 1.5;
  white-space: pre-wrap;
}
.q-image { 
  margin: 10px 0; 
  text-align: center; 
}
.q-image img { 
  max-width: 220px; 
  height: auto; 
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(0,0,0,.1);
}

/* --- Answer Buttons --- */
.answers { 
  display: flex; 
  flex-direction: column; 
  gap: 10px; 
}
.answers button {
  text-align: left;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  font-size: 1rem;
  transition: all 0.2s ease;
}
.answers button:hover {
  border-color: var(--primary);
  background: #f0f9ff;
}
.answers button.correct {
  border-color: var(--ok);
  background: #e6f9ef;
}
.answers button.wrong {
  border-color: var(--danger);
  background: #ffecec;
}

/* --- Animations for polish --- */
.answers button, .card, .menu button, .primary, .secondary {
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
/* =========================
   Test Harbor - Footer + Utilities
   ========================= */

/* --- Footer --- */
footer {
  color: var(--muted);
  text-align: center;
  padding: 32px 0;
  font-size: 0.9rem;
  background: #f1f5f9;
  margin-top: 40px;
  border-top: 2px solid var(--border);
}
footer p {
  margin: 6px 0;
}
footer a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
}
footer a:hover {
  color: var(--seafoam);
  text-decoration: underline;
}

/* --- Misc Utilities --- */
.row { 
  margin-top: 16px; 
  display: flex; 
  gap: 10px; 
  flex-wrap: wrap; 
}
.small { 
  font-size: .9rem; 
  color: var(--muted); 
}
hr { 
  border: 0; 
  border-top: 1px solid var(--border); 
  margin: 12px 0; 
}
.review-item { 
  margin: 10px 0; 
}

/* --- Animations for polish --- */
.fade-in {
  opacity: 0;
  transform: translateY(10px);
  animation: fadeInUp 0.4s ease forwards;
}
@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --- Ensure hidden sections stay hidden --- */
.hidden { 
  display: none !important; 
}