/* GovtJobPreparation.org - Premium CSS v18
   Fully responsive, mobile-first, premium design */

/* ── Google Fonts ── */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&family=Hind:wght@400;600;700&family=Hind+Siliguri:wght@400;600;700&display=swap');

/* ── CSS Variables ── */
:root {
  --primary:     #1558A6;
  --primary-dark:#0e3f7d;
  --accent:      #F97316;
  --accent-dark: #e0620f;
  --dark:        #0F1923;
  --dark2:       #111827;
  --success:     #198754;
  --danger:      #dc3545;
  --warning:     #ffc107;
  --border:      #e2e8f0;
  --text:        #1e293b;
  --text-muted:  #64748b;
  --bg:          #f4f6fb;
  --bg-card:     #ffffff;
  --radius:      14px;
  --radius-sm:   8px;
  --shadow:      0 2px 16px rgba(0,0,0,.07);
  --shadow-lg:   0 8px 32px rgba(0,0,0,.12);
  --transition:  all .2s ease;
}

/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Poppins', sans-serif;
  background: var(--bg);
  color: var(--text);
  margin: 0;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
body.lang-hi { font-family: 'Hind', sans-serif; }
body.lang-bn { font-family: 'Hind Siliguri', sans-serif; }

/* ── Typography ── */
h1,h2,h3,h4,h5,h6 { font-weight: 700; line-height: 1.25; }
a { color: var(--primary); transition: var(--transition); }
a:hover { color: var(--primary-dark); }
p { margin-bottom: 1rem; }

/* ── Navbar ── */
.navbar {
  background: var(--dark);
  box-shadow: 0 2px 20px rgba(0,0,0,.2);
  padding: 10px 0;
  position: sticky;
  top: 0;
  z-index: 1030;
}
.navbar-brand { text-decoration: none; font-weight: 800; }
.nav-link {
  color: rgba(255,255,255,.82) !important;
  font-size: .88rem;
  font-weight: 500;
  padding: 8px 12px !important;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}
.nav-link:hover, .nav-link.active {
  color: var(--accent) !important;
  background: rgba(255,255,255,.07);
}
.navbar-toggler { border: none; padding: 4px 8px; }
.navbar-toggler:focus { box-shadow: none; }

/* ── Buttons ── */
.btn {
  font-weight: 600;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  font-size: .875rem;
  letter-spacing: .01em;
}
.btn-accent {
  background: var(--accent);
  color: #fff !important;
  border: none;
}
.btn-accent:hover {
  background: var(--accent-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(249,115,22,.35);
}
.btn-primary {
  background: var(--primary) !important;
  border-color: var(--primary) !important;
}
.btn-primary:hover {
  background: var(--primary-dark) !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(21,88,166,.3);
}
.btn-lg { padding: 12px 28px; font-size: 1rem; }

/* ── Cards ── */
.card {
  background: var(--bg-card);
  border: none;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: var(--transition);
  overflow: hidden;
}
.card-header {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  font-weight: 600;
  padding: 16px 20px;
  border-radius: var(--radius) var(--radius) 0 0 !important;
}
.card-header.bg-primary-header {
  background: var(--primary);
  color: #fff;
  border-bottom: none;
}
.hover-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
}

/* ── Hero sections ── */
.hero-gradient {
  background: linear-gradient(135deg, var(--dark) 0%, #1558A6 60%, #1e40af 100%);
  color: #fff;
  position: relative;
  overflow: hidden;
}
.hero-gradient::before {
  content: '';
  position: absolute;
  top: -50%; right: -20%;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(249,115,22,.15) 0%, transparent 70%);
  pointer-events: none;
}

/* ── Alerts ── */
.alert { border-radius: var(--radius-sm); border: none; padding: 14px 18px; }
.alert-success { background: #f0fdf4; border-left: 4px solid var(--success); color: #166534; }
.alert-danger, .alert-error { background: #fef2f2; border-left: 4px solid var(--danger); color: #991b1b; }
.alert-info { background: #eff6ff; border-left: 4px solid var(--primary); color: #1e40af; }
.alert-warning { background: #fffbeb; border-left: 4px solid var(--warning); color: #92400e; }

/* ── Badges ── */
.badge-live {
  background: var(--danger);
  color: #fff;
  font-size: .68rem;
  padding: 2px 8px;
  border-radius: 50px;
  animation: blink 1.5s infinite;
  font-weight: 700;
  letter-spacing: .02em;
}
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:.55} }

/* ── Forms ── */
.form-control, .form-select {
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  padding: 10px 14px;
  font-size: .9rem;
  transition: var(--transition);
}
.form-control:focus, .form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(21,88,166,.12);
}
.input-group-text {
  background: #f8fafc;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
  color: var(--text-muted);
}

/* ── Tables ── */
.table { font-size: .875rem; }
.table th {
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--text-muted);
  font-weight: 600;
  background: #f8fafc;
  border-bottom: 1.5px solid var(--border);
  padding: 10px 16px;
}
.table td { padding: 12px 16px; vertical-align: middle; border-color: #f1f5f9; }
.table-hover tbody tr:hover { background: #f8fafc; }

/* ── Progress bars ── */
.progress { background: #e2e8f0; border-radius: 50px; overflow: hidden; }
.progress-bar { transition: width .6s ease; border-radius: 50px; }

/* ── Breadcrumb ── */
.breadcrumb { background: transparent; padding: 0; font-size: .82rem; margin-bottom: 12px; }
.breadcrumb-item + .breadcrumb-item::before { color: #94a3b8; }
.breadcrumb-item a { color: var(--primary); text-decoration: none; }
.breadcrumb-item.active { color: var(--text-muted); }

/* ── Sub banner ── */
.sub-banner {
  background: linear-gradient(90deg, var(--primary), var(--accent));
  color: #fff;
  padding: 8px 0;
  font-size: .83rem;
  text-align: center;
  font-weight: 500;
}

/* ── Footer ── */
footer {
  background: var(--dark);
  color: rgba(255,255,255,.72);
  font-size: .875rem;
}
footer h6 { color: #fff; font-weight: 700; }
footer a { color: var(--accent); text-decoration: none; transition: var(--transition); }
footer a:hover { color: #fff; }

/* ── Ad container ── */
.ad-container {
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: var(--radius-sm);
  text-align: center;
  overflow: hidden;
}

/* ── Utility classes ── */
.fw-600 { font-weight: 600; }
.text-accent { color: var(--accent) !important; }
.text-primary-site { color: var(--primary) !important; }
.bg-gradient-primary { background: linear-gradient(135deg, var(--dark), var(--primary)); }
.section-title { font-weight: 700; font-size: 1.5rem; margin-bottom: 1.25rem; }
.shadow-sm-custom { box-shadow: 0 1px 8px rgba(0,0,0,.06); }

/* ── Exam card ── */
.exam-card-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  font-size: 1.4rem;
}

/* ── Score circle ── */
.score-circle {
  width: 160px; height: 160px;
  border-radius: 50%;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  margin: 0 auto 20px;
  background: rgba(255,255,255,.07);
}

/* ── Question palette (exam mode) ── */
.q-palette-btn {
  width: 36px; height: 36px;
  border-radius: 6px;
  border: none;
  font-size: .8rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
}
.q-answered  { background: #166534; color: #fff; }
.q-wrong     { background: #7f1d1d; color: #fff; }
.q-marked    { background: #92400e; color: #fff; }
.q-current   { outline: 2px solid #60a5fa; }
.q-unvisited { background: #374151; color: #9ca3af; }

/* ── MathJax ── */
.mathjax-content mjx-container { overflow-x: auto; max-width: 100%; }

/* ── Responsive ── */
@media (max-width: 991px) {
  .navbar-collapse { background: var(--dark2); border-radius: 0 0 12px 12px; padding: 12px 16px; }
  .nav-link { padding: 10px 14px !important; }
  .card-body { padding: 16px !important; }
}

@media (max-width: 767px) {
  h1 { font-size: 1.6rem; }
  h2 { font-size: 1.3rem; }
  .display-5 { font-size: 1.8rem; }
  .btn-lg { padding: 10px 20px; font-size: .95rem; }
  .table-responsive { font-size: .8rem; }
  .score-circle { width: 130px; height: 130px; }
}

@media (max-width: 480px) {
  body { font-size: 14px; }
  .container { padding-left: 14px; padding-right: 14px; }
  .card-body { padding: 14px !important; }
  h1 { font-size: 1.4rem; }
}

/* ── Print styles (for result/certificate) ── */
@media print {
  .navbar, footer, .btn, .ad-container, .sub-banner { display: none !important; }
  .card { box-shadow: none !important; border: 1px solid #ddd !important; }
  body { background: #fff; }
}

/* ── Dark mode support ── */
@media (prefers-color-scheme: dark) {
  /* Light mode is intentionally kept for exam clarity */
  /* Dark mode not applied to avoid confusion during exams */
}

/* ── Scrollbar styling ── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: #f1f5f9; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* ── Loading animation ── */
.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}
@keyframes shimmer { 0%{background-position:200% 0} 100%{background-position:-200% 0} }

/* ── Certificate styles ── */
.certificate {
  border: 8px solid var(--primary);
  border-radius: 16px;
  padding: 40px;
  text-align: center;
  background: linear-gradient(135deg, #fff 0%, #f0f6ff 100%);
  position: relative;
}
.certificate::before {
  content: '';
  position: absolute; inset: 4px;
  border: 2px solid var(--accent);
  border-radius: 12px;
  pointer-events: none;
}
