/* ============================================================
   EXAM LISTING PAGE — scoped under .exam-listing-page.
   IMPORTANT: this must NOT reuse the "exams-page" class, since
   exam-details.ejs already uses that class and scopes its own
   rules under it. Using the same class here would make the two
   pages' CSS fight each other since both files load globally
   via the shared head.ejs include.
   ============================================================ */

.exam-listing-page { background: var(--bg-secondary); min-height: 100vh; }

/* Hero */
.exam-listing-page .exams-hero {
  background: linear-gradient(135deg, var(--primary-600) 0%, var(--primary-800) 100%);
  color: var(--text-inverse);
  padding: 1rem 0;
  position: relative;
  overflow: hidden;
}
.exam-listing-page .exams-hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 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.1'%3E%3Ccircle cx='30' cy='30' r='2'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  z-index: 1;
}
.exam-listing-page .exams-header { position: relative; z-index: 2; }
.exam-listing-page .hero-content {
  width: 100%; display: flex; flex-direction: column;
  justify-content: center; align-items: center; text-align: center; margin: 0 auto;
}
.exam-listing-page .hero-title,
.exam-listing-page .hero-subtitle { text-align: center; }
.exam-listing-page .hero-title {
  font-size: 1.5rem; font-weight: 700; margin-bottom: 0.375rem;
  font-family: var(--font-heading); line-height: 1.2; color: #ffffff;
}
.exam-listing-page .hero-subtitle {
  font-size: 0.875rem; color: #ffffff; font-weight: 500;
  margin-bottom: 1rem; line-height: 1.3;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
  max-width: 450px; margin-left: auto; margin-right: auto;
}

/* Stats */
.exam-listing-page .exams-stats { display: flex; justify-content: center; gap: 1.5rem; flex-wrap: wrap; }
.exam-listing-page .stat-item {
  text-align: center;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  border-radius: var(--radius-xl);
  padding: 1rem 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: all 0.3s ease;
}
.exam-listing-page .stat-item:hover { transform: translateY(-4px); background: rgba(255, 255, 255, 0.2); }
.exam-listing-page .stat-number {
  font-size: 1.5rem; font-weight: 700; color: #ffffff; line-height: 1;
  margin-bottom: 0.375rem; text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}
.exam-listing-page .stat-label {
  font-size: 0.75rem; color: #ffffff; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.5px; opacity: 0.9;
}

/* Section */
.exam-listing-page .exams-section { padding: 1rem 0; }
.exam-listing-page .section-header { text-align: center; margin-bottom: 1rem; }
.exam-listing-page .section-title {
  font-size: 1.1rem; font-weight: 700; color: var(--text-primary);
  margin-bottom: 0.25rem; font-family: var(--font-heading);
}
.exam-listing-page .section-subtitle { color: var(--text-secondary); font-size: 0.85rem; margin: 0; }

/* Grid + card */
.exam-listing-page .exams-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
  margin-bottom: 0.75rem;
}
.exam-listing-page .exam-card {
  background: var(--bg-primary);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  transition: all 0.3s ease;
  border: 1px solid var(--border-light);
  position: relative;
}
.exam-listing-page .exam-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }

/* Status badge */
.exam-listing-page .exam-status { position: absolute; top: -1px; right: 8px; z-index: 10; }
.exam-listing-page .status-badge {
  display: flex; align-items: center; gap: 0.375rem;
  padding: 0.375rem 0.75rem; border-radius: var(--radius-lg);
  font-size: 0.70rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.5px; margin: 10px 0;
}
.exam-listing-page .status-free { background: var(--success-100); color: var(--success-700); border: 1px solid var(--success-200); }
.exam-listing-page .status-purchased { background: var(--primary-100); color: var(--primary-700); border: 1px solid var(--primary-200); padding: 1px 5px; }
.exam-listing-page .status-locked { background: var(--warning-100); color: var(--warning-700); border: 1px solid var(--warning-200); }

/* Exam content */
.exam-listing-page .exam-content { padding: 1.25rem; }
.exam-listing-page .exam-header { margin-bottom: 1rem; margin-top: 14px; }
.exam-listing-page .exam-title { font-size: 1.125rem; font-weight: 700; color: var(--text-primary); margin-bottom: 0.375rem; line-height: 1.3; }
.exam-listing-page .exam-category { color: var(--primary-600); font-weight: 600; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.5px; }
.exam-listing-page .exam-details { display: flex; flex-direction: column; gap: 0.5rem; margin-bottom: 1rem; }
.exam-listing-page .detail-item { display: flex; align-items: center; gap: 0.5rem; color: var(--text-secondary); font-size: 0.8rem; }
.exam-listing-page .detail-item i { color: var(--primary-500); width: 16px; text-align: center; }

/* Price block */
.exam-listing-page .exam-price {
  text-align: center; margin-bottom: 1rem; padding: 0.75rem;
  background: var(--bg-secondary); border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
}
.exam-listing-page .price-amount { font-size: 1.25rem; font-weight: 700; color: var(--text-primary); margin-bottom: 0.25rem; }
.exam-listing-page .price-label { font-size: 0.75rem; color: var(--text-secondary); font-weight: 500; }
.exam-listing-page .price-wrapper { display: flex; justify-content: center; align-items: center; gap: 10px; margin-bottom: 4px; }
.exam-listing-page .price-mrp { font-size: 0.95rem; color: #888; text-decoration: line-through; }
.exam-listing-page .price-fee { font-size: 1.35rem; font-weight: 700; color: var(--text-primary); }
.exam-listing-page .price-free { font-size: 1.35rem; font-weight: 700; color: var(--success-600); }
.exam-listing-page .price-purchased {
  font-size: 1.1rem; font-weight: 700; color: var(--primary-700);
  display: flex; align-items: center; justify-content: center; gap: 6px;
}

/* Score display */
.exam-listing-page .score-display {
  display: flex; align-items: center; gap: .85rem;
  background: var(--bg-secondary); border-radius: var(--radius-lg);
  border: 1px solid var(--border-light); padding: .65rem .75rem; margin-bottom: .5rem;
}
.exam-listing-page .score-info { flex: 1; }
.exam-listing-page .marks-row {
  display: flex; align-items: center; border: 1px solid var(--border-light);
  border-radius: var(--radius-md); overflow: hidden; margin-bottom: .4rem; background: var(--bg-primary);
}
.exam-listing-page .marks-cell { flex: 1; text-align: center; padding: .3rem .2rem; }
.exam-listing-page .marks-lbl { display: block; font-size: .55rem; color: var(--text-secondary); font-weight: 600; text-transform: uppercase; letter-spacing: .3px; margin-bottom: 2px; }
.exam-listing-page .marks-val { display: block; font-size: 1rem; font-weight: 800; line-height: 1; color: var(--text-primary); }
.exam-listing-page .marks-sep { width: 1px; background: var(--border-light); align-self: stretch; }
.exam-listing-page .marks-bar { height: 5px; background: var(--border-light); border-radius: 99px; overflow: hidden; }
.exam-listing-page .marks-bar__fill { height: 100%; border-radius: 99px; }
.exam-listing-page .score-txt--high { color: #15803d; }
.exam-listing-page .score-txt--mid  { color: #b45309; }
.exam-listing-page .score-txt--low  { color: #b91c1c; }
.exam-listing-page .score-bar--high { background: linear-gradient(90deg,#4ade80,#16a34a); }
.exam-listing-page .score-bar--mid  { background: linear-gradient(90deg,#fbbf24,#d97706); }
.exam-listing-page .score-bar--low  { background: linear-gradient(90deg,#f87171,#dc2626); }

/* Actions */
.exam-listing-page .exam-actions { padding: 0 1.25rem 1.25rem; }
.exam-listing-page .exam-actions .btn { padding: 0.75rem 1.5rem; font-weight: 600; border-radius: var(--radius-lg); transition: all 0.3s ease; }
.exam-listing-page .exam-actions .btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.exam-listing-page .exam-actions .btn-outline-primary {
  background-color: transparent; border: 2px solid var(--color-primary); color: var(--color-primary); font-weight: 600;
}
.exam-listing-page .exam-actions .btn-outline-primary:hover { background-color: var(--color-primary); color: #fff; }

/* Empty state */
.exam-listing-page .empty-state {
  text-align: center; padding: 4rem 2rem;
  background: var(--bg-primary); border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md); border: 1px solid var(--border-light);
  grid-column: 1 / -1;
}
.exam-listing-page .empty-icon {
  width: 80px; height: 80px; background: var(--primary-50); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 1.5rem; color: var(--color-primary); font-size: 2rem;
}
.exam-listing-page .empty-state h3 { color: var(--text-primary); margin-bottom: 1rem; }
.exam-listing-page .empty-state p { color: var(--text-secondary); margin-bottom: 2rem; line-height: 1.6; }

/* Features section */
.exam-listing-page .features-section { padding: 1.25rem 0; background: var(--bg-primary); }
.exam-listing-page .features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; }
.exam-listing-page .feature-card {
  text-align: center; padding: 1rem;
  background: var(--bg-secondary); border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md); border: 1px solid var(--border-light);
  transition: all 0.3s ease;
}
.exam-listing-page .feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-xl); }
.exam-listing-page .feature-icon {
  width: 45px; height: 45px;
  background: linear-gradient(135deg, var(--primary-500) 0%, var(--primary-600) 100%);
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  margin: 0 auto 0.5rem; color: var(--text-inverse); font-size: 1.125rem;
}
.exam-listing-page .feature-card h3 { font-size: 0.95rem; font-weight: 600; color: var(--text-primary); margin-bottom: 0.375rem; }
.exam-listing-page .feature-card p { color: var(--text-secondary); line-height: 1.3; margin: 0; }

/* CTA section */
.exam-listing-page .cta-section {
  padding: 1.5rem 0;
  background: linear-gradient(135deg, var(--primary-600) 0%, var(--primary-800) 100%);
  color: var(--text-inverse); text-align: center;
}
.exam-listing-page .cta-content h2 { font-size: 1.5rem; font-weight: 700; margin-bottom: 0.5rem; font-family: var(--font-heading); color: #ffffff; }
.exam-listing-page .cta-content p { font-size: 1rem; color: #ffffff; margin-bottom: 1.25rem; line-height: 1.4; }
.exam-listing-page .cta-buttons { display: flex; gap: 0.5rem; justify-content: center; flex-wrap: wrap; }
.exam-listing-page .cta-buttons .btn { padding: 0.625rem 1.25rem; font-weight: 600; border-radius: var(--radius-lg); transition: all 0.3s ease; }
.exam-listing-page .cta-buttons .btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }

/* Modal */
.exam-listing-page #comboSuggestionModal .modal-content {
  border-radius: 16px; padding: 30px 25px;
  background: linear-gradient(145deg, #ffffff, #f1f3f6);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
  border: none; text-align: center; position: relative; transition: all 0.3s ease;
}
.exam-listing-page #comboSuggestionModal .modal-header { border-bottom: none; justify-content: center; padding-bottom: 0; }
.exam-listing-page #comboSuggestionModal .modal-title { font-size: 1.5rem; color: #4154f1; font-weight: 700; }
.exam-listing-page #comboSuggestionModal .btn-close {
  position: absolute; top: 15px; right: 15px; width: 35px; height: 35px;
  border-radius: 50%; background-color: #e9ecef; opacity: 1; border: none; z-index: 1055;
}
.exam-listing-page #comboSuggestionModal .btn-close::before,
.exam-listing-page #comboSuggestionModal .btn-close::after {
  content: ""; position: absolute; left: 50%; top: 50%;
  width: 16px; height: 2px; background-color: #495057; transform-origin: center;
}
.exam-listing-page #comboSuggestionModal .btn-close::before { transform: translate(-50%, -50%) rotate(45deg); }
.exam-listing-page #comboSuggestionModal .btn-close::after  { transform: translate(-50%, -50%) rotate(-45deg); }
.exam-listing-page #comboSuggestionModal .btn-close:hover { background-color: #4154f1; }
.exam-listing-page #comboSuggestionModal .btn-close:hover::before,
.exam-listing-page #comboSuggestionModal .btn-close:hover::after { background-color: #fff; }
.exam-listing-page #comboSuggestionModal .modal-body { font-size: 1rem; color: #495057; margin-top: 15px; }
.exam-listing-page #comboSuggestionModal .btn { padding: 12px 20px; font-size: 1rem; font-weight: 600; border-radius: 10px; transition: all 0.3s ease; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); }
.exam-listing-page #comboSuggestionModal .btn-primary { background: #4154f1; border: none; color: #fff; }
.exam-listing-page #comboSuggestionModal .btn-primary:hover { background: #2e3a8a; transform: translateY(-2px); box-shadow: 0 6px 16px rgba(65, 84, 241, 0.4); }
.exam-listing-page #comboSuggestionModal .btn-success { background: #28a745; border: none; color: #fff; }
.exam-listing-page #comboSuggestionModal .btn-success:hover { background: #218838; transform: translateY(-2px); box-shadow: 0 6px 16px rgba(40, 167, 69, 0.4); }
.exam-listing-page #comboSuggestionModal .d-grid.gap-3 { margin-top: 25px; }

/* Bootstrap modal backdrop is appended directly to <body>, outside
   .exam-listing-page, so this one rule is intentionally left unscoped. */
.modal-backdrop.show { opacity: 0.5; background-color: rgba(0, 0, 0, 0.5); }

/* Responsive */
@media (max-width: 992px) {
  .exam-listing-page .hero-title { font-size: 2.5rem; }
  .exam-listing-page .hero-subtitle { font-size: 1.1rem; }
  .exam-listing-page .section-title { font-size: 2rem; }
  .exam-listing-page .exams-stats { gap: 2rem; }
  .exam-listing-page .stat-item { padding: 1.25rem 1.5rem; }
  .exam-listing-page .stat-number { font-size: 2rem; }
  .exam-listing-page .exams-grid { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.5rem; }
}
@media (max-width: 768px) {
  .exam-listing-page .exams-hero { padding: 0.75rem 0; }
  .exam-listing-page .hero-title { font-size: 1.25rem; }
  .exam-listing-page .hero-subtitle { font-size: 0.8rem; }
  .exam-listing-page .exams-stats { gap: 1rem; }
  .exam-listing-page .stat-item { padding: 0.75rem 1rem; }
  .exam-listing-page .stat-number { font-size: 1.25rem; }
  .exam-listing-page .exams-section { padding: 0.75rem 0; }
  .exam-listing-page .exams-grid { grid-template-columns: 1fr; gap: 1rem; }
  .exam-listing-page .features-grid { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; }
  .exam-listing-page .cta-content h2 { font-size: 1.125rem; }
  .exam-listing-page .cta-content p { font-size: 0.8rem; }
  .exam-listing-page .cta-buttons { flex-direction: column; align-items: center; }
  .exam-listing-page .cta-buttons .btn { width: 100%; max-width: 300px; }
}
@media (max-width: 576px) {
  .exam-listing-page .hero-title { font-size: 1.125rem; }
  .exam-listing-page .exams-stats { flex-direction: column; align-items: center; }
  .exam-listing-page .stat-item { width: 100%; max-width: 200px; }
  .exam-listing-page .section-title { font-size: 1.75rem; }
  .exam-listing-page .exam-card { margin: 0 0.75rem; }
  .exam-listing-page .exam-content { padding: 1rem; }
  .exam-listing-page .exam-actions { padding: 0 1rem 1rem; }
  .exam-listing-page .feature-card { padding: 0.75rem; }
  .exam-listing-page .feature-icon { width: 60px; height: 60px; font-size: 1.5rem; }
  .exam-listing-page .cta-content h2 { font-size: 1.75rem; }
  .exam-listing-page .cta-content p { font-size: 1rem; }
}