/* ============================================================
   Mock Test Mitra™ — exam-page.css
   Shared layout for exam-category landing pages.
   (exams/civil-engineering.html, exams/upsc-cse.html, …)

   Depends on: main.css (variables, .subject-card, .subjects,
               .exam-section-header, @keyframes fadeUp),
               nav.css  (sidebar offset, topbar, bottom-nav)
   ============================================================ */

/* ── Per-exam accent colours ─────────────────────────────────
   Override per page via:  <style>:root{ --exam-accent1:#hex; --exam-accent2:#hex; }</style>  */
:root {
  --exam-accent1: #0d47a1;
  --exam-accent2: #1976d2;
}

/* ── 1. Page wrapper ─────────────────────────────────────────
   Sits inside nav.css's main-content offset region.           */
.exam-page {
  max-width: 1280px;
  margin: 0 auto;
  padding: 40px 28px 100px;
}

/* ── 2. Breadcrumb ───────────────────────────────────────────
   "← All Exams"  back-link above the hero.                    */
.exam-breadcrumb {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--fs-sm);          /* 0.8rem */
  font-weight: 600;
  color: var(--text-secondary);
  text-decoration: none;
  margin-bottom: 22px;
  padding: 4px 0;
  transition: color var(--dur-normal) ease;
}
.exam-breadcrumb:hover { color: var(--exam-accent1); }

.exam-breadcrumb svg {
  width: 15px; height: 15px;
  flex-shrink: 0;
  stroke: currentColor;
  fill: none;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ── 3. Exam hero ────────────────────────────────────────────
   Title + tag-pill + description paragraph.                    */
.exam-hero { margin-bottom: 40px; }

.exam-hero h1 {
  font-size: var(--fs-3xl);         /* 1.9rem */
  font-weight: 700;
  color: var(--exam-accent1);
  margin: 0 0 10px;
  line-height: 1.2;
}

/* Coloured pill beneath h1: "ESE / GATE / SSC JE" */
.exam-tag-pill {
  display: inline-block;
  font-size: var(--fs-xs);          /* 0.7rem */
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: #fff;
  background: linear-gradient(90deg, var(--exam-accent1), var(--exam-accent2));
  padding: 3px 14px;
  border-radius: 999px;
  margin-bottom: 14px;
}

.exam-hero p {
  font-size: var(--fs-base);        /* 0.9rem */
  line-height: 1.65;
  color: var(--text-secondary);
  max-width: 700px;
  margin: 10px 0 0;
}

/* ── 4. Stats strip ──────────────────────────────────────────
   "9 subjects"  "25 tests"  "Active" pill row.                 */
.exam-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
  align-items: center;
}

.exam-stat {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: var(--fs-xs);          /* 0.7rem */
  font-weight: 700;
  letter-spacing: .5px;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  white-space: nowrap;
}

.exam-stat svg {
  width: 12px; height: 12px;
  flex-shrink: 0;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Status variants */
.exam-stat.status-active {
  background: #e8f5e9;
  border-color: #a5d6a7;
  color: #2e7d32;
}
.exam-stat.status-soon {
  background: #fff8e1;
  border-color: #ffe082;
  color: #f57f17;
}

[data-theme="dark"] .exam-stat {
  background: var(--bg-secondary);
  border-color: var(--border);
  color: var(--text-secondary);
}
[data-theme="dark"] .exam-stat.status-active {
  background: #0d2a13;
  border-color: #2e7d32;
  color: #a5d6a7;
}
[data-theme="dark"] .exam-stat.status-soon {
  background: #2a1e00;
  border-color: #5d4200;
  color: #ffe082;
}

/* ── 5. Coming-soon notice (exam not yet live) ───────────────
   Replaces .exam-subjects on pages with no tests yet.          */
.exam-coming-soon {
  text-align: center;
  padding: 56px 24px;
  background: var(--bg-secondary);
  border: 2px dashed var(--border);
  border-radius: 16px;
  margin-top: 8px;
}
.exam-coming-soon .cs-emoji { font-size: 3rem; margin-bottom: 12px; display: block; }
.exam-coming-soon h2 {
  font-size: var(--fs-2xl);   /* 1.55rem */
  font-weight: 700;
  margin: 0 0 12px;
  color: var(--text);
}
.exam-coming-soon p {
  font-size: var(--fs-base);  /* 0.9rem */
  color: var(--text-secondary);
  line-height: 1.65;
  max-width: 500px;
  margin: 0 auto 28px;
}

/* Planned subject chips inside the coming-soon box */
.exam-cs-subjects {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-bottom: 28px;
}
.exam-cs-chip {
  font-size: var(--fs-sm);    /* 0.8rem */
  font-weight: 600;
  padding: 5px 14px;
  border-radius: 999px;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text-secondary);
}

/* Back-to-home button */
.exam-cs-back {
  display: inline-block;
  padding: 10px 24px;
  border-radius: 8px;
  background: var(--exam-accent1);
  color: #fff;
  text-decoration: none;
  font-size: var(--fs-base);
  font-weight: 600;
  transition: opacity var(--dur-normal) ease;
}
.exam-cs-back:hover { opacity: .85; }

/* ── 6. Subject grid ─────────────────────────────────────────
   Uses .subject-card from main.css; grid sizing independent
   of the homepage .subjects grid so we can tune separately.   */
.exam-subjects {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 28px;
  margin-top: 8px;
}

/* Ensure .exam-section-header (defined in main.css) spans
   the full exam-subjects grid when nested inside it.          */
.exam-subjects .exam-section-header { grid-column: 1 / -1; }

/* ── 7. Dark mode: hero title ────────────────────────────────
   --primary in dark mode is #90caf9 (light blue), readable.   */
[data-theme="dark"] .exam-hero h1 { color: var(--primary); }

/* ── 8. Responsive ───────────────────────────────────────────*/
@media (max-width: 768px) {
  .exam-page  { padding: 28px 18px 100px; }
  .exam-hero h1 { font-size: var(--fs-2xl); } /* 1.55rem */
}

@media (max-width: 480px) {
  .exam-page  { padding: 20px 14px 100px; }
  .exam-hero h1 { font-size: var(--fs-xl); }  /* 1.3rem */
  .exam-subjects { gap: 16px; }
}
