/* ============================================================
   SARKARILOK — Question Papers page (Stitch MCP Alignment)
   ============================================================ */

/* ── Base ── */
.qp-page {
  padding: 0 0 80px;
  background-color: #f8fafc;
  font-family: 'Poppins', 'Anek Gujarati', sans-serif;
}

/* ── Hero (Gradient Mesh — full width) ── */
.qp-hero {
  text-align: center;
  padding: 70px 20px 110px;
  background: radial-gradient(circle at 10% 20%, rgba(56, 189, 248, 0.15) 0%, transparent 40%),
              radial-gradient(circle at 90% 80%, rgba(99, 102, 241, 0.15) 0%, transparent 40%),
              linear-gradient(135deg, #1e40af 0%, #1e3a8a 100%);
  color: #ffffff;
  margin-bottom: 0;
  width: 100%;
  box-sizing: border-box;
}
.qp-hero-accent {
  background: linear-gradient(90deg, #38bdf8 0%, #a5b4fc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}
.qp-breadcrumb {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.7);
  margin: 0 auto 24px;
  max-width: 1280px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.qp-breadcrumb a {
  color: #ffffff;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s;
}
.qp-breadcrumb a:hover { color: #fbd38d; }
.qp-breadcrumb span[aria-current="page"] { color: #bfdbfe; font-weight: 700; }

.qp-hero h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 900;
  margin: 0 0 16px;
  letter-spacing: -0.02em;
  color: #ffffff;
}
.qp-hero-sub {
  color: #dbeafe;
  font-size: 1.15rem;
  margin: 0 auto;
  max-width: 800px;
  line-height: 1.6;
}

/* ── Container ── */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
  position: relative;
  z-index: 10;
}
@media (min-width: 1025px) {
  .qp-page .container {
    max-width: 1440px !important;
    padding: 0 40px !important;
  }
}
/* Top spacing from the qp-recent strip to the filter bar */
.qp-page .container {
  margin-top: 30px;
}

/* ── Filter / Search Bar ── */
.qp-search-bar {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  margin-bottom: 30px;
  padding: 20px 24px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  /* position: sticky removed — was floating over footer when scrolling */
}
.qp-search-bar-top {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  width: 100%;
}
.qp-search-input-wrap {
  position: relative;
  flex: 1;
  min-width: 250px;
  max-width: 450px;
}
.qp-search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  display: flex;
  align-items: center;
}
#qp-search {
  width: 100%;
  padding: 12px 16px 12px 42px;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 500;
  color: #1e293b;
  outline: none;
  background: #f8fafc;
  transition: all 0.2s ease;
}
#qp-search::placeholder { color: #94a3b8; }
#qp-search:focus {
  border-color: #2563eb;
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15);
}
.qp-search-bar-top select {
  padding: 12px 36px 12px 16px;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  color: #334155;
  background: #f8fafc url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%2364748b' viewBox='0 0 16 16'%3E%3Cpath d='M4.646 6.646a.5.5 0 01.708 0L8 9.293l2.646-2.647a.5.5 0 01.708.708l-3 3a.5.5 0 01-.708 0l-3-3a.5.5 0 010-.708z'/%3E%3C/svg%3E") no-repeat right 12px center;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  outline: none;
  transition: all 0.2s ease;
  min-width: 130px;
}
.qp-search-bar-top select:focus {
  border-color: #2563eb;
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15);
}
#qp-clear-btn {
  padding: 12px 20px;
  background: #f1f5f9;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  font-size: 14px;
  cursor: pointer;
  color: #475569;
  font-weight: 700;
  transition: all 0.2s ease;
}
#qp-clear-btn:hover {
  background: #e2e8f0;
  color: #0f172a;
}

/* ── Year Range Selects ── */
.qp-year-select-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  border-top: 1px solid #f1f5f9;
  margin-top: 16px;
  padding-top: 16px;
}
.qp-year-select-label {
  font-size: 14px;
  font-weight: 600;
  color: #64748b;
  white-space: nowrap;
}
.qp-year-select-wrap select {
  padding: 10px 36px 10px 16px;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  color: #334155;
  background: #f8fafc url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%2364748b' viewBox='0 0 16 16'%3E%3Cpath d='M4.646 6.646a.5.5 0 01.708 0L8 9.293l2.646-2.647a.5.5 0 01.708.708l-3 3a.5.5 0 01-.708 0l-3-3a.5.5 0 010-.708z'/%3E%3C/svg%3E") no-repeat right 12px center;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  outline: none;
  transition: all 0.2s ease;
  min-width: 100px;
}
.qp-year-select-wrap select:focus {
  border-color: #2563eb;
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15);
}

/* ── Recent Uploads Strip (full-width) ── */
.qp-recent {
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid rgba(255, 255, 255, 0.6);
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
  margin: -60px 0 0;
  box-shadow: 0 10px 40px rgba(31, 38, 135, 0.08);
  position: relative;
  z-index: 20;
  width: 100%;
  box-sizing: border-box;
}
/* Inner wrapper constrains content width, matching the container */
.qp-recent-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 28px 20px;
}
@media (min-width: 1025px) {
  .qp-recent-inner {
    max-width: 1440px;
    padding: 28px 40px;
  }
}
.qp-recent-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: #1e293b;
  margin: 0 0 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.qp-recent-title::before {
  content: '⚡';
}
.qp-recent-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}
.qp-recent-card {
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 14px;
  padding: 14px 18px;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.qp-recent-card:hover {
  transform: translateY(-4px);
  background: #ffffff;
  border-color: rgba(37, 99, 235, 0.25);
  box-shadow: 0 12px 30px rgba(37, 99, 235, 0.08);
}
.qp-recent-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.qp-recent-card-board { color: #2563eb; }
.qp-recent-card-year {
  color: #fff;
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  padding: 2px 8px;
  border-radius: 12px;
  font-weight: 800;
  letter-spacing: 0.03em;
}
.qp-recent-card-title {
  color: #0f172a;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
}
.qp-recent-card-date { color: #94a3b8; font-size: 11px; font-weight: 500; }

/* ── Results Info ── */
.qp-results-info {
  font-size: 14px;
  font-weight: 600;
  color: #64748b;
  text-align: center;
  margin-bottom: 20px;
}

/* ── Data Grid (Desktop) ── */
.qp-table-wrap {
  overflow-x: auto;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  border: 1px solid #e2e8f0;
  margin-bottom: 30px;
}
.qp-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 14px;
  min-width: 800px;
}
.qp-table thead tr { background: #f8fafc; }
.qp-table thead th {
  padding: 16px 20px;
  text-align: left;
  font-weight: 700;
  color: #334155;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 2px solid #e2e8f0;
  white-space: nowrap;
}
.qp-table thead th[data-sort] { cursor: pointer; transition: background 0.2s; }
.qp-table thead th[data-sort]:hover { background: #f1f5f9; }
.qp-sort-ind { margin-left: 6px; color: #94a3b8; }
.qp-row td {
  padding: 16px 20px;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
  background: #ffffff;
  transition: background 0.15s ease;
}
.qp-row:hover td { background: #f8fafc; }
.qp-row-cbt-parent td { background: #fdfaf4 !important; }
.qp-row-cbt-parent:hover td { background: #fef3c7 !important; }

/* ── Badges ── */
.badge {
  display: inline-flex; align-items: center;
  padding: 4px 12px; border-radius: 20px;
  font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.03em;
}
.badge-prelim { background: #e0e7ff; color: #3730a3; }
.badge-mains { background: #fce7f3; color: #9d174d; }
.badge-cbt { background: #ffedd5; color: #c2410c; margin-left: 6px; }
.type-tag {
  display: inline-flex; margin-left: 6px;
  padding: 2px 8px; border-radius: 12px;
  font-size: 10px; font-weight: 800;
}
.type-tag.omr { background: #f1f5f9; color: #475569; }
.type-tag.descriptive { background: #f3e8ff; color: #6b21a8; }

.qp-group-label { color: #1e40af; font-weight: 700; font-size: 13px; display: block; }
.qp-paper-label { color: #64748b; font-size: 12px; font-weight: 500; margin-top: 2px; display: block; }
.qp-shift-count {
  display: inline-block; background: #f59e0b; color: #fff;
  padding: 3px 10px; border-radius: 12px; font-size: 11px; font-weight: 800;
}

/* ── CBT Toggles ── */
.qp-cbt-toggle-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; margin-right: 10px;
  background: #f59e0b; color: #fff;
  border: none; border-radius: 6px; cursor: pointer;
  font-size: 12px; transition: transform 0.2s, background 0.2s;
}
.qp-cbt-toggle-btn:hover { background: #d97706; transform: translateY(-1px); }
.qp-cbt-toggle-btn[aria-expanded="true"] .qp-cbt-chevron { transform: rotate(90deg); }
.qp-cbt-chevron { transition: transform 0.25s ease; }

.qp-cbt-toggle-btn-text {
  background: #ffffff; color: #d97706;
  border: 1px solid #fcd34d; border-radius: 8px;
  padding: 6px 14px; font-size: 12px; font-weight: 700;
  cursor: pointer; transition: all 0.2s ease;
}
.qp-cbt-toggle-btn-text:hover { background: #fef3c7; }

/* ── CBT Shifts Grid ── */
.qp-cbt-shifts-row td { background: #f8fafc !important; padding: 0 !important; }
.qp-cbt-shifts-cell { border-bottom: 2px solid #e2e8f0 !important; border-top: 1px solid #e2e8f0 !important; }
.qp-cbt-shifts-grid { padding: 20px; }
.qp-shifts-table { width: 100%; border-collapse: collapse; font-size: 13px; background: #fff; border-radius: 12px; overflow: hidden; border: 1px solid #e2e8f0; }
.qp-shifts-table thead th { background: #f1f5f9 !important; color: #475569 !important; padding: 12px 16px !important; font-size: 11px; text-transform: uppercase; }
.qp-shifts-table tbody td { padding: 12px 16px !important; border-bottom: 1px solid #f1f5f9 !important; }

/* ── Action Links ── */
.qp-link {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 8px 16px; border-radius: 8px;
  text-decoration: none; font-size: 12px; font-weight: 700;
  transition: all 0.2s ease; white-space: nowrap; border: none;
}
.qp-link.dl { background: #2563eb; color: #ffffff; }
.qp-link.dl:hover { background: #1d4ed8; }
.qp-link.prov { background: #f59e0b; color: #ffffff; }
.qp-link.prov:hover { background: #d97706; }
.qp-link.final { background: #10b981; color: #ffffff; }
.qp-link.final:hover { background: #059669; }
.qp-actions-inline { display: flex; gap: 8px; flex-wrap: wrap; }
.na { color: #94a3b8; font-style: italic; }
.cell-exam .exam-name { font-weight: 700; color: #1e293b; text-decoration: none; font-size: 15px; transition: color 0.2s; }
.cell-exam .exam-name:hover { color: #2563eb; }

/* ── Mobile Cards ── */
.qp-cards-wrap { display: none; }
.qp-card {
  background: #ffffff; border: 1px solid #e2e8f0;
  border-radius: 16px; padding: 20px; margin-bottom: 16px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.03);
  transition: all 0.2s ease;
}
.qp-card:hover {
  box-shadow: 0 8px 25px rgba(0,0,0,0.06);
  border-color: #cbd5e1;
}
.qp-card-cbt { border-left: 4px solid #f59e0b; }
.qp-card-head { margin-bottom: 12px; }
.qp-card-title {
  display: block; font-size: 1.15rem; font-weight: 800; color: #1e293b;
  text-decoration: none; line-height: 1.4; margin-bottom: 6px;
}
.qp-card-title:hover { color: #2563eb; }
.qp-card-paper { font-size: 0.9rem; color: #64748b; font-weight: 600; }
.qp-card-pills { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.qp-pill {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 12px; border-radius: 20px; font-size: 11px; font-weight: 700; text-transform: uppercase;
}
.qp-pill-year { background: #f1f5f9; color: #334155; }
.qp-pill-board { background: #e0e7ff; color: #3730a3; }
.qp-pill-prelim { background: #dbeafe; color: #1e40af; }
.qp-pill-mains { background: #f3e8ff; color: #7e22ce; }
.qp-pill-group { background: #fdf4ff; color: #a21caf; }
.qp-pill-cbt { background: #ffedd5; color: #c2410c; }
.qp-card-actions { display: flex; flex-direction: column; gap: 8px; }
.qp-card-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 12px; border-radius: 10px; font-size: 13px; font-weight: 700;
  text-decoration: none; width: 100%; transition: all 0.2s ease;
}
.qp-card-btn.btn-dl { background: #2563eb; color: #ffffff; }
.qp-card-btn.btn-dl:hover { background: #1d4ed8; }
.qp-card-btn.btn-prov { background: #f59e0b; color: #ffffff; }
.qp-card-btn.btn-prov:hover { background: #d97706; }
.qp-card-btn.btn-final { background: #10b981; color: #ffffff; }
.qp-card-btn.btn-final:hover { background: #059669; }
.qp-card-cbt-toggle {
  width: 100%; padding: 12px;
  background: #f8fafc; color: #d97706;
  border: 1px solid #fcd34d; border-radius: 12px; font-size: 13px; font-weight: 800;
  cursor: pointer; transition: all 0.2s ease;
}
.qp-card-cbt-toggle:hover { background: #fef3c7; }
.qp-card-shifts { margin-top: 12px; background: #f8fafc; border-radius: 12px; padding: 12px; border: 1px solid #e2e8f0; }
.qp-card-shift-row { background: #fff; border: 1px solid #e2e8f0; border-radius: 10px; padding: 12px; margin-bottom: 8px; }
.qp-card-shift-row:last-child { margin-bottom: 0; }
.qp-card-shift-head { display: flex; justify-content: space-between; font-size: 13px; font-weight: 700; color: #334155; margin-bottom: 12px; }
.qp-card-shift-date { font-size: 11px; color: #64748b; }
.qp-card-shift-actions { display: flex; gap: 8px; }
.qp-card-shift-actions .qp-card-btn { padding: 10px; font-size: 12px; flex: 1; }

/* ── Pagination / Load More ── */
.qp-load-more-wrap { text-align: center; margin: 30px 0; }
.qp-load-more {
  padding: 14px 32px;
  background: #ffffff;
  color: #2563eb; border: 2px solid #2563eb; border-radius: 12px;
  font-size: 15px; font-weight: 700; cursor: pointer;
  transition: all 0.2s ease;
}
.qp-load-more:hover { background: #2563eb; color: #ffffff; }
.qp-load-more:disabled { border-color: #cbd5e1; color: #94a3b8; cursor: not-allowed; }

/* ── Hidden rows ── */
.qp-row-paginated, .qp-card.qp-row-paginated { display: none !important; }

/* ── No Results ── */
.qp-no-results {
  text-align: center; padding: 80px 20px;
  background: #ffffff; border: 1px solid #e2e8f0; border-radius: 16px;
}
.qp-no-results[hidden] { display: none; }
.qp-no-results-icon { font-size: 3rem; margin-bottom: 16px; opacity: 0.5; }
.qp-no-results h2 { font-size: 1.5rem; color: #1e293b; margin: 0 0 8px; }
.qp-no-results p { color: #64748b; font-size: 15px; margin: 0 0 24px; }
.qp-no-results button {
  padding: 12px 24px; background: #2563eb; color: #fff;
  border: none; border-radius: 10px; font-size: 14px; font-weight: 700;
  cursor: pointer; transition: background 0.2s;
}
.qp-no-results button:hover { background: #1d4ed8; }

/* ── SEO & FAQ Block ── */
.qp-seo-block {
  margin-top: 60px; padding: 40px;
  background: #ffffff;
  border: 1px solid #e2e8f0; border-radius: 24px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.03); line-height: 1.7;
}
.qp-seo-block h2 {
  font-size: 1.4rem; font-weight: 800; color: #1e293b;
  margin: 40px 0 20px; padding: 14px 20px;
  background: #f8fafc;
  border-left: 4px solid #2563eb; border-radius: 0 12px 12px 0;
}
.qp-seo-block h2:first-child { margin-top: 0; }
.qp-seo-block p { color: #475569; font-size: 1.05rem; margin-bottom: 20px; }
.qp-seo-block strong { color: #0f172a; font-weight: 700; }
.qp-howto { margin: 0 0 24px 1.5rem; padding: 0; }
.qp-howto li { margin-bottom: 10px; color: #475569; font-size: 1.05rem; }
.qp-howto li::marker { color: #2563eb; font-weight: 800; }
.qp-faq-list { display: flex; flex-direction: column; gap: 12px; }
.qp-faq-item {
  background: #ffffff; border: 1px solid #e2e8f0; border-radius: 12px;
  transition: all 0.2s ease; overflow: hidden;
}
.qp-faq-item:hover { border-color: #cbd5e1; }
.qp-faq-item[open] { background: #f8fafc; border-color: #93c5fd; }
.qp-faq-item summary {
  padding: 18px 24px; cursor: pointer; font-weight: 700; font-size: 1.05rem; color: #1e293b;
  list-style: none; position: relative; padding-right: 50px;
}
.qp-faq-item summary::-webkit-details-marker { display: none; }
.qp-faq-item summary::after {
  content: '+'; position: absolute; right: 24px; top: 50%; transform: translateY(-50%);
  font-size: 24px; color: #2563eb; transition: transform 0.2s ease;
}
.qp-faq-item[open] summary::after { content: '−'; transform: translateY(-50%) rotate(180deg); }
.qp-faq-item p { padding: 0 24px 20px; color: #475569; font-size: 1rem; line-height: 1.7; margin: 0; }
.qp-empty { text-align: center; padding: 80px 20px; color: #94a3b8; font-size: 1.1rem; }

/* ── Responsive ── */
@media (max-width: 900px) {
  .qp-table-wrap { display: none; }
  .qp-cards-wrap { display: block; }
}
@media (max-width: 768px) {
  .qp-page { padding: 0 0 60px; }
  .qp-hero { padding: 40px 20px 60px; border-radius: 0 0 24px 24px; }
  .qp-search-bar { flex-direction: column; align-items: stretch; gap: 12px; margin-top: -20px; }
  .qp-search-input-wrap { max-width: 100%; min-width: 0; }
  .qp-search-bar-top select, #qp-clear-btn { width: 100%; }
  .qp-year-select-wrap { flex-direction: column; align-items: stretch; gap: 8px; }
  .qp-year-select-wrap select { width: 100%; max-width: 100%; }
  .qp-year-select-label { margin-top: 4px; }
  .qp-recent-grid { grid-template-columns: repeat(2, 1fr); }
  .qp-seo-block { padding: 24px; }
  .qp-seo-block h2 { font-size: 1.2rem; padding: 12px 16px; }
}
@media (max-width: 480px) {
  .qp-hero h1 { font-size: 1.75rem; }
  .qp-hero-sub { font-size: 1rem; }
  .qp-card { padding: 16px; }
  .qp-recent-grid { grid-template-columns: 1fr; }
  .qp-card-shift-actions { flex-direction: column; }
}