/* ============================================
   EXAM LISTING PAGES — Styles
   ============================================ */

/* ---- Exam hero ---- */
.exam-hero {
  padding: var(--space-12) 0 var(--space-10);
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}
.exam-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(60% 60% at 80% 50%, rgba(79, 70, 229, 0.08), transparent 70%);
  pointer-events: none;
}
.exam-hero-inner {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: var(--space-6);
  flex-wrap: wrap;
}
.exam-hero-icon {
  width: 64px; height: 64px;
  border-radius: var(--radius-lg);
  display: grid; place-items: center;
  flex-shrink: 0;
  box-shadow: var(--shadow);
}
.exam-hero-icon svg { width: 30px; height: 30px; }
.exam-hero-info { flex: 1; min-width: 240px; }
.exam-hero-eyebrow {
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: var(--space-2);
}
.exam-hero h1 {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  margin-bottom: var(--space-3);
  line-height: 1.15;
}
.exam-hero-tagline {
  font-size: 1rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin-bottom: var(--space-4);
}
.exam-hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
}
.exam-meta-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: var(--bg-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-secondary);
}
.exam-hero-actions {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  flex-shrink: 0;
}
@media (max-width: 640px) {
  .exam-hero-actions { flex-direction: row; flex-wrap: wrap; }
}

/* ---- Stats bar ---- */
.stats-bar {
  display: flex;
  gap: var(--space-6);
  padding: var(--space-4) 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: var(--space-6);
}
.stats-bar-item {
  display: flex;
  align-items: baseline;
  gap: var(--space-2);
}
.stats-num {
  font-family: var(--font-display);
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--text-primary);
}
.stats-lbl {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

/* ---- Filter bar ---- */
.filter-bar {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-wrap: wrap;
  padding: var(--space-4);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-6);
}
.filter-bar .filter-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}
.filter-select {
  padding: 8px 12px;
  background: var(--bg-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.875rem;
  color: var(--text-primary);
  cursor: pointer;
  transition: border-color var(--duration-fast);
  min-width: 120px;
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%2394a3b8' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 30px;
}
.filter-select:focus {
  outline: none;
  border-color: var(--brand-primary);
}
.filter-search {
  flex: 1;
  min-width: 160px;
  position: relative;
}
.filter-search input {
  width: 100%;
  padding: 8px 12px 8px 36px;
  background: var(--bg-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.875rem;
  color: var(--text-primary);
  transition: border-color var(--duration-fast);
}
.filter-search input:focus {
  outline: none;
  border-color: var(--brand-primary);
}
.filter-search input::placeholder { color: var(--text-muted); }
.filter-search-icon {
  position: absolute;
  left: 10px; top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}
.filter-clear {
  padding: 8px 12px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--duration-fast);
  white-space: nowrap;
}
.filter-clear:hover { background: var(--bg-muted); color: var(--text-primary); border-color: var(--border-strong); }
@media (max-width: 640px) { .filter-bar { gap: var(--space-2); } }

/* ---- Tier tabs ---- */
.tier-tabs {
  display: flex;
  gap: var(--space-2);
  margin-bottom: var(--space-6);
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.tier-tabs::-webkit-scrollbar { display: none; }
.tier-tab {
  padding: var(--space-3) var(--space-4);
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: all var(--duration-fast);
  white-space: nowrap;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
}
.tier-tab:hover { color: var(--text-primary); }
.tier-tab.active {
  color: var(--brand-primary);
  border-bottom-color: var(--brand-primary);
  font-weight: 600;
}

/* ---- Mock cards grid ---- */
.mock-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.mock-card {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-5);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  text-decoration: none;
  color: inherit;
  transition: all var(--duration) var(--ease-out);
  cursor: pointer;
}
.mock-card:hover {
  border-color: var(--brand-primary);
  box-shadow: var(--shadow-lg);
  transform: translateX(4px);
}
.mock-card-locked {
  opacity: 0.7;
}
.mock-card-locked:hover {
  border-color: var(--brand-gold);
  box-shadow: 0 4px 16px -2px rgba(245, 158, 11, 0.15);
  transform: translateX(0);
}
.mock-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-3);
  flex: 1;
}
.mock-card-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
  margin-bottom: 4px;
}
.mock-card-subtitle {
  font-size: 0.8125rem;
  color: var(--text-muted);
}
.mock-card-stats {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  flex-wrap: wrap;
  margin-top: var(--space-3);
}
.mock-stat {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.8125rem;
  color: var(--text-secondary);
}
.mock-stat svg { flex-shrink: 0; color: var(--text-muted); }
.mock-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: var(--space-3);
  padding-top: var(--space-3);
  border-top: 1px solid var(--border);
}
.mock-sections {
  font-size: 0.75rem;
  color: var(--text-muted);
  max-width: 400px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mock-cta {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--brand-primary);
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 4px;
}
.mock-card-locked .mock-cta { color: var(--brand-gold); }

/* Subject-wise card layout */
.mock-card-left {
  width: 48px; height: 48px;
  border-radius: var(--radius);
  display: grid; place-items: center;
  flex-shrink: 0;
  background: color-mix(in srgb, var(--sub-color, #4f46e5) 12%, transparent);
  color: var(--sub-color, #4f46e5);
}
.mock-card-body { flex: 1; }
.mock-card-action {
  flex-shrink: 0;
  color: var(--text-muted);
}
.mock-card-locked .mock-card-action { color: var(--brand-gold); }

/* ---- Tags ---- */
.mock-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.03em;
}
.free-tag {
  background: rgba(16, 185, 129, 0.1);
  color: var(--success);
}
.premium-tag {
  background: rgba(245, 158, 11, 0.1);
  color: var(--brand-gold);
}

/* ---- Empty state ---- */
.exam-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  padding: var(--space-16) var(--space-6);
  text-align: center;
  color: var(--text-muted);
}
.exam-empty svg { opacity: 0.4; }
.exam-empty h3 { font-size: 1.125rem; color: var(--text-primary); }
.exam-empty p { font-size: 0.9375rem; color: var(--text-secondary); max-width: 360px; }

/* ---- Section layout ---- */
.exam-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: var(--space-8);
  align-items: start;
}
@media (max-width: 900px) { .exam-layout { grid-template-columns: 1fr; } }

/* Sidebar info card */
.exam-sidebar {
  position: sticky;
  top: calc(64px + var(--space-6));
}
.exam-info-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: var(--space-4);
}
.exam-info-card-header {
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid var(--border);
  font-weight: 600;
  font-size: 0.9375rem;
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
.exam-info-card-body { padding: var(--space-4) var(--space-5); }
.exam-info-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-2) 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.875rem;
}
.exam-info-item:last-child { border-bottom: none; }
.exam-info-item .label { color: var(--text-muted); }
.exam-info-item .value { font-weight: 600; color: var(--text-primary); }

/* Section breakdown */
.section-list { display: flex; flex-direction: column; gap: var(--space-3); }
.section-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3);
  background: var(--bg-muted);
  border-radius: var(--radius);
  font-size: 0.875rem;
}
.section-icon {
  width: 32px; height: 32px;
  border-radius: 8px;
  display: grid; place-items: center;
  background: var(--bg-surface);
  color: var(--brand-primary);
  flex-shrink: 0;
}
.section-icon svg { width: 16px; height: 16px; }
.section-info { flex: 1; }
.section-name { font-weight: 500; color: var(--text-primary); }
.section-q { font-size: 0.75rem; color: var(--text-muted); }
.section-count {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--brand-primary);
}

/* ---- Modal ---- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 200;
  animation: fadeIn 0.2s ease-out;
}
.modal-box {
  position: fixed;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%) scale(0.95);
  z-index: 201;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  max-width: 420px;
  width: calc(100% - var(--space-8));
  box-shadow: var(--shadow-xl);
  text-align: center;
  opacity: 0;
  transition: all 0.3s var(--ease-out);
}
.modal-box.visible {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}
.modal-close {
  position: absolute;
  top: var(--space-4); right: var(--space-4);
  width: 32px; height: 32px;
  border-radius: 50%;
  display: grid; place-items: center;
  color: var(--text-muted);
  background: var(--bg-muted);
  transition: all var(--duration-fast);
}
.modal-close:hover { background: var(--border); color: var(--text-primary); }
.modal-icon {
  width: 64px; height: 64px;
  margin: 0 auto var(--space-4);
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.15), rgba(249, 115, 22, 0.15));
  color: var(--brand-gold);
  display: grid; place-items: center;
  box-shadow: 0 0 0 8px rgba(245, 158, 11, 0.08);
}
.modal-box h2 { margin-bottom: var(--space-3); }
.modal-box p { font-size: 0.9375rem; color: var(--text-secondary); margin-bottom: var(--space-4); }
.modal-price {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: var(--space-4);
}
.modal-price small { font-size: 1rem; color: var(--text-muted); font-weight: 500; }
.modal-features {
  list-style: none;
  text-align: left;
  margin-bottom: var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.modal-features li { font-size: 0.9375rem; color: var(--text-secondary); }
.modal-note {
  font-size: 0.8125rem !important;
  color: var(--text-muted) !important;
  margin-top: var(--space-3);
  margin-bottom: 0 !important;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ---- Loading skeleton ---- */
.mock-skeleton {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.skeleton {
  height: 80px;
  background: linear-gradient(90deg, var(--bg-muted) 25%, var(--bg-elevated) 50%, var(--bg-muted) 75%);
  background-size: 200% 100%;
  border-radius: var(--radius-lg);
  animation: shimmer 1.5s infinite;
}
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ---- Back link ---- */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: var(--space-6);
  transition: color var(--duration-fast);
}
.back-link:hover { color: var(--brand-primary); }