html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

:root {
  --brand: #1f6feb;
  --ink: #172033;
  --muted: #5f6b7a;
  --line: #dde3ea;
  --soft: #f5f8fc;
}

.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus,
.form-control:focus,
.form-check-input:focus {
  box-shadow: 0 0 0 0.1rem #fff, 0 0 0 0.25rem rgba(31, 111, 235, 0.35);
}

html {
  position: relative;
  min-height: 100%;
}

body {
  color: var(--ink);
  background: #fff;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
}

.navbar-brand {
  color: var(--brand) !important;
}

.hero-section {
  padding: 72px 0 48px;
  background: linear-gradient(180deg, #f6f9ff 0%, #fff 100%);
}

.hero-section h1 {
  max-width: 820px;
  font-size: clamp(2rem, 4vw, 3.7rem);
  line-height: 1.05;
  margin-bottom: 1rem;
}

.eyebrow {
  color: var(--brand);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 0;
}

.topic-panel,
.empty-state,
.sidebar-block,
.article-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.topic-panel {
  padding: 24px;
}

.topic-panel ul {
  margin-bottom: 0;
  padding-left: 1.2rem;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

.article-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
}

.article-list {
  display: grid;
  gap: 16px;
}

.article-card {
  padding: 22px;
}

.article-card h2,
.article-card h3 {
  font-size: 1.25rem;
}

.article-card a,
.sidebar a,
.footer-links a,
.read-link {
  text-decoration: none;
}

.article-card a:hover,
.sidebar a:hover,
.footer-links a:hover,
.read-link:hover {
  text-decoration: underline;
}

.read-link {
  font-weight: 700;
}

.content-band,
.page-header {
  background: var(--soft);
  padding: 42px 0;
}

.page-section {
  padding: 48px 0;
}

.narrow-content {
  max-width: 820px;
}

.narrow-content h2 {
  font-size: 1.35rem;
  margin-top: 2rem;
}

.search-form {
  max-width: 720px;
  margin-bottom: 18px;
}

.category-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0 24px;
}

.category-strip a {
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  padding: 7px 12px;
  text-decoration: none;
}

.category-strip a:hover {
  border-color: var(--brand);
  color: var(--brand);
}

.featured-image {
  border-radius: 8px;
  margin: 20px 0;
}

.article-detail {
  font-size: 1.05rem;
  line-height: 1.75;
}

.article-content img {
  max-width: 100%;
  height: auto;
}

.sidebar {
  display: grid;
  gap: 18px;
  align-content: start;
}

.sidebar-block {
  padding: 18px;
}

.sidebar-block h2 {
  font-size: 1.1rem;
  margin-bottom: 12px;
}

.ad-wrapper {
  border: 1px dashed #c8d1dd;
  border-radius: 8px;
  background: #fafcff;
  margin: 24px 0;
  min-height: 110px;
  padding: 10px;
  text-align: center;
}

.ad-label {
  color: var(--muted);
  font-size: 0.75rem;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.ad-placeholder {
  align-items: center;
  color: var(--muted);
  display: flex;
  justify-content: center;
  min-height: 72px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  justify-content: flex-end;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-footer {
  background: #fbfcfe;
}

@media (max-width: 767.98px) {
  .hero-section {
    padding: 46px 0 32px;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }
}

.admin-login-wrap {
  align-items: center;
  background: var(--soft);
  display: flex;
  min-height: 70vh;
  padding: 48px 16px;
}

.admin-login-panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  margin: 0 auto;
  max-width: 420px;
  padding: 28px;
  width: 100%;
}

.admin-shell {
  min-height: 65vh;
}

.admin-nav {
  align-items: center;
  background: #111827;
  border-radius: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
  padding: 10px;
}

.admin-nav a,
.admin-nav button {
  background: transparent;
  border: 0;
  border-radius: 6px;
  color: #e5e7eb;
  font: inherit;
  padding: 8px 12px;
  text-decoration: none;
}

.admin-nav a:hover,
.admin-nav button:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.admin-nav form {
  margin-left: auto;
}

.admin-page-title,
.admin-panel-header {
  align-items: center;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  margin-bottom: 18px;
}

.admin-page-title h1,
.admin-panel-header h2 {
  margin: 0;
}

.admin-stat-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.admin-stat,
.admin-panel,
.admin-side-box {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.admin-stat {
  padding: 20px;
}

.admin-stat span {
  color: var(--muted);
  display: block;
  font-size: 0.9rem;
}

.admin-stat strong {
  display: block;
  font-size: 2rem;
  line-height: 1.2;
  margin-top: 6px;
}

.admin-panel {
  padding: 18px;
}

.admin-form .form-control,
.admin-form .form-select {
  border-color: #cfd7e3;
}

.admin-side-box {
  padding: 16px;
}

.content-editor {
  font-family: Consolas, Monaco, monospace;
  min-height: 360px;
}

.table-actions {
  white-space: nowrap;
}

.table-actions form {
  display: inline-block;
}

.narrow-admin-form {
  max-width: 720px;
}

@media (max-width: 767.98px) {
  .admin-nav form,
  .admin-page-title .btn {
    margin-left: 0;
  }

  .admin-page-title,
  .admin-panel-header {
    align-items: flex-start;
    flex-direction: column;
  }
}

.admin-body {
  background: #eef3f8;
}

.admin-brand {
  background: rgba(31, 111, 235, 0.22) !important;
  color: #fff !important;
  font-weight: 700 !important;
}

.admin-current-user {
  color: #b8c2d1;
  margin-left: auto;
  padding: 8px 10px;
}

.admin-hero {
  align-items: center;
  background: #111827;
  border-radius: 8px;
  color: #fff;
  display: flex;
  gap: 24px;
  justify-content: space-between;
  margin-bottom: 20px;
  padding: 28px;
}

.admin-hero h1 {
  margin: 0 0 8px;
}

.admin-hero p:not(.eyebrow) {
  color: #c9d3e1;
  margin-bottom: 0;
  max-width: 720px;
}

.admin-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.admin-dashboard-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1fr) 320px;
}

.admin-quick-panel h2 {
  font-size: 1.15rem;
}

.admin-quick-panel ul {
  margin-bottom: 0;
  padding-left: 1.1rem;
}

.status-pill {
  border-radius: 999px;
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 4px 9px;
}

.status-pill.is-live {
  background: #dcfce7;
  color: #166534;
}

.status-pill.is-draft {
  background: #fef3c7;
  color: #92400e;
}

.compact-form {
  display: inline-block;
  margin: 0;
}

.tools-header {
  background: #eef6ff;
}

.tools-layout {
  display: grid;
  gap: 20px;
  grid-template-columns: 280px minmax(0, 1fr);
}

.tools-menu,
.tool-workspace {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.tools-menu {
  align-self: start;
  display: grid;
  gap: 6px;
  padding: 12px;
}

.tools-menu a {
  border-radius: 6px;
  color: var(--ink);
  padding: 10px 12px;
  text-decoration: none;
}

.tools-menu a.active,
.tools-menu a:hover {
  background: #eaf2ff;
  color: var(--brand);
}

.tool-workspace {
  padding: 22px;
}

.tool-result {
  border-top: 1px solid var(--line);
  margin-top: 22px;
  padding-top: 18px;
}

.tool-result h3 {
  font-size: 1.1rem;
}

.tool-result pre {
  background: #111827;
  border-radius: 8px;
  color: #f8fafc;
  overflow-x: auto;
  padding: 16px;
  white-space: pre-wrap;
}

@media (max-width: 991.98px) {
  .admin-dashboard-grid,
  .tools-layout {
    grid-template-columns: 1fr;
  }

  .admin-hero {
    align-items: flex-start;
    flex-direction: column;
  }

  .admin-current-user,
  .admin-nav form {
    margin-left: 0;
  }
}

.exam-admin-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.question-form-grid {
  display: grid;
  gap: 12px 16px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.question-form-grid .full-span {
  grid-column: 1 / -1;
}

.exam-corner-header {
  background: #f0fdf4;
}

.exam-practice {
  user-select: none;
}

.exam-selector-panel {
  align-items: end;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 14px;
  grid-template-columns: 1fr 1fr auto;
  padding: 18px;
}

.practice-toolbar {
  align-items: center;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  margin: 24px 0 16px;
}

.question-list {
  display: grid;
  gap: 16px;
}

.practice-question {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 20px;
}

.practice-question h3 {
  font-size: 1.1rem;
}

.exam-stepper {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.exam-stepper-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.exam-stepper > .btn,
.exam-stepper-actions > .btn {
  white-space: normal;
}

.practice-question details {
  background: #f8fafc;
  border-radius: 6px;
  margin-top: 12px;
  padding: 10px 12px;
}

.payment-panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 28px;
}

.payment-box {
  background: #f8fafc;
  border-radius: 8px;
  margin: 20px 0;
  padding: 18px;
}

@media (max-width: 767.98px) {
  .exam-selector-panel,
  .question-form-grid {
    grid-template-columns: 1fr;
  }

  .practice-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .exam-stepper {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .exam-stepper-actions {
    display: contents;
  }

  .exam-stepper > .btn,
  .exam-stepper-actions > .btn {
    font-size: .95rem;
    min-width: 0;
    padding: .65rem .5rem;
    width: 100%;
  }
}

.score-line {
  color: #166534;
  font-size: 1.1rem;
  margin: 6px 0 0;
}

.option-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.option-choice {
  align-items: flex-start;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  display: grid;
  gap: 8px;
  grid-template-columns: auto auto 1fr;
  padding: 12px;
}

.option-choice input {
  margin-top: 4px;
}

.option-choice span {
  color: var(--muted);
  font-weight: 700;
}

.option-choice:hover {
  border-color: var(--brand);
}

.option-choice.correct-option {
  background: #dcfce7;
  border-color: #22c55e;
}

.option-choice.wrong-option {
  background: #fee2e2;
  border-color: #ef4444;
}

.practice-question.is-correct {
  border-color: #22c55e;
}

.practice-question.is-wrong {
  border-color: #ef4444;
}

.answer-explanation {
  background: #f8fafc;
  border-radius: 8px;
  margin-top: 14px;
  padding: 14px;
}

.final-submit-panel {
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  gap: 14px;
  justify-content: flex-end;
  padding: 18px;
}

.result-panel {
  justify-content: space-between;
}

.home-hero {
  background: #f7fbff;
  border-bottom: 1px solid #e5edf6;
  padding: 72px 0 56px;
}

.home-hero-grid {
  align-items: center;
  display: grid;
  gap: 36px;
  grid-template-columns: minmax(0, 1.4fr) minmax(320px, 0.8fr);
}

.home-hero-copy h1 {
  font-size: clamp(2.35rem, 5vw, 4.6rem);
  line-height: 1.02;
  margin-bottom: 18px;
  max-width: 920px;
}

.home-hero-copy .lead {
  color: var(--muted);
  font-size: 1.2rem;
  max-width: 760px;
}

.home-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.home-hero-panel {
  background: #111827;
  border-radius: 8px;
  box-shadow: 0 22px 60px rgba(17, 24, 39, 0.18);
  color: #fff;
  overflow: hidden;
  padding: 24px;
}

.hero-panel-top,
.hero-metric-row {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

.hero-panel-top span {
  color: #cbd5e1;
}

.hero-panel-top strong {
  background: #dcfce7;
  border-radius: 999px;
  color: #166534;
  padding: 4px 10px;
}

.hero-metric-row {
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  gap: 16px;
  margin: 24px 0;
  padding: 22px 0;
}

.hero-metric-row div {
  flex: 1;
}

.hero-metric-row strong {
  display: block;
  font-size: 2.4rem;
  line-height: 1;
}

.hero-metric-row span,
.hero-task-list {
  color: #cbd5e1;
}

.hero-task-list {
  display: grid;
  gap: 12px;
}

.task-dot {
  border-radius: 999px;
  display: inline-block;
  height: 10px;
  margin-right: 8px;
  width: 10px;
}

.task-dot.green { background: #22c55e; }
.task-dot.blue { background: #38bdf8; }
.task-dot.amber { background: #f59e0b; }

.home-portals {
  margin-top: -28px;
  position: relative;
  z-index: 2;
}

.portal-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.portal-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
  color: var(--ink);
  display: block;
  min-height: 210px;
  padding: 24px;
  text-decoration: none;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.portal-card:hover {
  border-color: var(--brand);
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.12);
  color: var(--ink);
  transform: translateY(-3px);
}

.portal-card span,
.article-card-label {
  border-radius: 999px;
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 800;
  margin-bottom: 14px;
  padding: 5px 10px;
  text-transform: uppercase;
}

.portal-card.exam span { background: #dcfce7; color: #166534; }
.portal-card.tools span { background: #e0f2fe; color: #075985; }
.portal-card.blog span { background: #fef3c7; color: #92400e; }

.portal-card h2 {
  font-size: 1.35rem;
  margin-bottom: 10px;
}

.portal-card p {
  color: var(--muted);
  margin-bottom: 0;
}

.rich-heading h2 {
  font-size: 2rem;
}

.view-all-link {
  font-weight: 700;
  text-decoration: none;
}

.featured-article-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.home-article-card {
  min-height: 240px;
  position: relative;
}

.home-article-card::after {
  background: var(--brand);
  bottom: 0;
  content: "";
  height: 3px;
  left: 22px;
  position: absolute;
  right: 22px;
}

.article-card-label {
  background: #eef2ff;
  color: #3730a3;
}

.polished-empty {
  padding: 28px;
}

.home-study-flow {
  background: #111827;
  color: #fff;
  margin-top: 52px;
  padding: 56px 0;
}

.study-flow-copy {
  display: flex;
  gap: 24px;
  justify-content: space-between;
  margin-bottom: 26px;
}

.study-flow-copy h2 {
  font-size: clamp(1.8rem, 3vw, 3rem);
  max-width: 720px;
}

.study-flow-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.study-flow-grid div {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 20px;
}

.study-flow-grid strong {
  color: #93c5fd;
  display: block;
  margin-bottom: 18px;
}

.study-flow-grid h3 {
  font-size: 1.1rem;
}

.study-flow-grid p {
  color: #cbd5e1;
  margin-bottom: 0;
}

@media (max-width: 991.98px) {
  .home-hero-grid,
  .portal-grid,
  .featured-article-grid,
  .study-flow-grid {
    grid-template-columns: 1fr;
  }

  .home-portals {
    margin-top: 24px;
  }

  .study-flow-copy {
    display: block;
  }
}

@media (max-width: 575.98px) {
  .home-hero {
    padding: 48px 0 32px;
  }

  .home-hero-actions .btn {
    width: 100%;
  }

  .hero-metric-row {
    align-items: flex-start;
    flex-direction: column;
  }
}

.ocr-header {
  background: #f0fdf4;
}

.ocr-layout {
  display: grid;
  gap: 20px;
  grid-template-columns: minmax(320px, 0.85fr) minmax(0, 1.15fr);
}

.ocr-panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px;
}

.ocr-actions,
.ocr-result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.ocr-result-header,
.tool-result-header.enhanced {
  align-items: center;
  display: flex;
  gap: 14px;
  justify-content: space-between;
  margin-bottom: 14px;
}

.ocr-output {
  font-family: Consolas, Monaco, monospace;
  min-height: 420px;
  white-space: pre-wrap;
}

.ocr-progress .progress {
  height: 22px;
}

.tool-result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

@media (max-width: 991.98px) {
  .ocr-layout {
    grid-template-columns: 1fr;
  }

  .ocr-result-header,
  .tool-result-header.enhanced {
    align-items: flex-start;
    flex-direction: column;
  }
}

.pdf-editor-section {
  margin-top: 56px;
}

.pdf-editor-heading {
  align-items: flex-end;
  display: flex;
  gap: 18px;
  justify-content: space-between;
}

.pdf-editor-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.pdf-editor-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: minmax(280px, 0.35fr) minmax(0, 0.65fr);
}

.pdf-editor-sidebar {
  align-self: start;
}

.pdf-editor-workspace {
  overflow: auto;
}

.pdf-editor-canvas-wrap {
  background: #e5e7eb;
  border: 1px solid var(--line);
  display: inline-block;
  min-height: 520px;
  min-width: 100%;
  padding: 18px;
  position: relative;
}

.pdf-editor-canvas-wrap canvas {
  background: #fff;
  box-shadow: 0 12px 34px rgba(15, 23, 42, 0.14);
  display: block;
}

.pdf-editor-overlay {
  cursor: crosshair;
  left: 18px;
  position: absolute;
  top: 18px;
  z-index: 2;
}

.pdf-editor-overlay.whiteout-mode {
  cursor: cell;
}

.pdf-text-edit {
  background: rgba(255, 255, 255, 0.72);
  border: 1px dashed #2563eb;
  cursor: move;
  line-height: 1.25;
  max-width: 75%;
  padding: 2px 4px;
  position: absolute;
  white-space: pre-wrap;
}

.pdf-whiteout {
  background: #fff;
  border: 1px dashed #dc2626;
  position: absolute;
}

.pdf-whiteout.draft {
  opacity: 0.78;
}

body.content-protected {
  -webkit-touch-callout: none;
  user-select: none;
}

body.content-protected input,
body.content-protected textarea,
body.content-protected select,
body.content-protected button,
body.content-protected .pdf-editor-section,
body.content-protected .ocr-layout,
body.content-protected .admin-shell {
  -webkit-touch-callout: default;
  user-select: text;
}

@media (max-width: 991.98px) {
  .pdf-editor-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .pdf-editor-grid {
    grid-template-columns: 1fr;
  }
}
.pdf-payment-backdrop {
  align-items: center;
  background: rgba(15, 23, 42, 0.58);
  bottom: 0;
  display: flex;
  justify-content: center;
  left: 0;
  padding: 20px;
  position: fixed;
  right: 0;
  top: 0;
  z-index: 2000;
}

.pdf-payment-backdrop[hidden] {
  display: none;
}

.pdf-payment-modal {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.28);
  max-width: 620px;
  padding: 24px;
  width: min(100%, 620px);
}

.pdf-payment-header,
.pdf-payment-body {
  align-items: flex-start;
  display: flex;
  gap: 18px;
  justify-content: space-between;
}

.pdf-payment-body {
  border-top: 1px solid var(--line);
  margin-top: 14px;
  padding-top: 18px;
}

.pdf-payment-qr-wrap {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}

.pdf-payment-qr {
  min-height: 180px;
  min-width: 180px;
}

body.payment-modal-open {
  overflow: hidden;
}

body.content-protected .pdf-payment-modal {
  user-select: text;
}

@media (max-width: 575.98px) {
  .pdf-payment-header,
  .pdf-payment-body {
    display: block;
  }

  .pdf-payment-qr-wrap {
    display: inline-block;
    margin-bottom: 16px;
  }
}
/* HR टैग और सेक्शन के बड़े गैप को फ़िक्स करने के लिए */
.ck-content hr, article hr {
    margin: 15px 0 !important;
    border: none;
    border-top: 1px solid #ddd;
}

/* Headings और Lists के बीच का गैप कंट्रोल करने के लिए */
.ck-content h2, article h2 {
    margin-top: 20px !important;
    margin-bottom: 10px !important;
}

.ck-content ul, article ul {
    margin-bottom: 15px !important;
}
/* CKEditor 5 के अंदर के एक्स्ट्रा मार्जिन/पैडिंग को पूरी तरह ज़ीरो/कम करने के लिए */
.ck-content h1, .ck-content h2, .ck-content h3, .ck-content h4,
article h1, article h2, article h3, article h4 {
    margin-top: 12px !important;
    margin-bottom: 6px !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

.ck-content p, article p {
    margin-top: 0 !important;
    margin-bottom: 8px !important;
    padding: 0 !important;
}

    /* अगर CKEditor खाली पैराग्राफ या div बना रहा हो */
    .ck-content p:empty, .ck-content p:has(br:only-child) {
        display: none !important;
    }

/* टेबल और लिस्ट का मार्जिन */
.ck-content table, article table,
.ck-content ul, article ul {
    margin-top: 8px !important;
    margin-bottom: 12px !important;
}
.ck-content > *, article > * {
    margin-top: 0.25rem !important;
    margin-bottom: 0.5rem !important;
}

/* अगर CKEditor खाली <p></p> या <p>&nbsp;</p> बना रहा हो तो उसे छुपाएं */
.ck-content p:empty,
.ck-content p:has(br:only-child) {
    margin: 0 !important;
    padding: 0 !important;
    line-height: 0 !important;
}

/* Headings के ऊपर केवल हल्का सा गैप रखने के लिए */
.ck-content h1, .ck-content h2, .ck-content h3,
article h1, article h2, article h3 {
    margin-top: 1rem !important;
    margin-bottom: 0.4rem !important;
}
.blog-content h1,
.blog-content h2,
.blog-content h3,
.blog-content h4 {
    margin-top: 18px !important;
    margin-bottom: 8px !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    line-height: 1.3 !important;
}

.blog-content p {
    margin-top: 0 !important;
    margin-bottom: 10px !important;
    padding: 0 !important;
    line-height: 1.6 !important;
}

.blog-content ul,
.blog-content ol {
    margin-top: 5px !important;
    margin-bottom: 12px !important;
    padding-left: 20px !important;
}

.blog-content li {
    margin-bottom: 4px !important;
}

.blog-content table {
    margin-top: 10px !important;
    margin-bottom: 15px !important;
}

/* खाली पैराग्राफ या एक्स्ट्रा ब्रेक को छुपाने के लिए */
.blog-content p:empty {
    display: none !important;
}
.pdf-splitter-section {
  margin-top: 56px;
}

.pdf-splitter-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: minmax(280px, 0.32fr) minmax(0, 0.68fr);
}

.pdf-splitter-sidebar {
  align-self: start;
}

.pdf-splitter-results {
  min-height: 420px;
}

.pdf-splitter-toolbar {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 12px;
}

.pdf-splitter-pages {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

.pdf-split-page-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  transition: border-color 0.15s ease, opacity 0.15s ease;
}

.pdf-split-page-card.is-unselected {
  opacity: 0.48;
}

.pdf-split-page-card img {
  background: #e5e7eb;
  border-bottom: 1px solid var(--line);
  display: block;
  height: 180px;
  object-fit: contain;
  width: 100%;
}

.pdf-split-page-body {
  display: grid;
  gap: 10px;
  padding: 12px;
}

.pdf-split-check {
  align-items: center;
  display: flex;
  font-weight: 700;
  gap: 8px;
}

.pdf-split-text-preview {
  color: var(--muted);
  display: -webkit-box;
  font-size: 0.82rem;
  line-height: 1.35;
  margin: 0;
  min-height: 2.7em;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

@media (max-width: 991.98px) {
  .pdf-splitter-grid {
    grid-template-columns: 1fr;
  }
}
.blog-share-card {
  align-items: center;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  gap: 14px;
  justify-content: space-between;
  margin: 18px 0 22px;
  padding: 12px 14px;
}

.blog-share-card > span {
  color: var(--ink);
  font-weight: 800;
}

.blog-share-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.share-btn {
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  font-size: 0.85rem;
  font-weight: 700;
  line-height: 1;
  padding: 9px 12px;
  text-decoration: none;
}

.share-btn:hover {
  border-color: var(--brand);
  color: var(--brand);
}

.share-btn.copy {
  background: #fff;
}

.sidebar-category-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.sidebar-category-chip {
  background: #eef6ff;
  border: 1px solid #cfe3ff;
  border-radius: 999px;
  color: #1d4ed8;
  font-size: 0.88rem;
  font-weight: 700;
  padding: 8px 11px;
  text-decoration: none;
}

.sidebar-category-chip:hover {
  background: #dbeafe;
  color: #1e40af;
}

body.content-protected .blog-share-card {
  user-select: text;
}

@media (max-width: 575.98px) {
  .blog-share-card {
    align-items: flex-start;
    flex-direction: column;
  }
}
/* ---------- Navbar ---------- */

.site-header {
    background: #fff;
    box-shadow: 0 4px 20px rgba(0,0,0,.05);
}

.menu-link {
    color: #334155 !important;
    font-weight: 600;
    padding: 10px 16px !important;
    border-radius: 40px;
    transition: .35s;
    position: relative;
}

    .menu-link:hover {
        color: #fff !important;
        background: linear-gradient(135deg,#2563eb,#0ea5a4);
        transform: translateY(-2px);
        box-shadow: 0 10px 20px rgba(37,99,235,.25);
    }

    .menu-link i {
        transition: .3s;
    }

    .menu-link:hover i {
        transform: rotate(-10deg) scale(1.15);
    }

    /* Active Menu */

    .menu-link.active {
        background: #2563eb;
        color: #fff !important;
    }

/* Logo */

.navbar-brand img {
    transition: .3s;
}

.navbar-brand:hover img {
    transform: rotate(-6deg) scale(1.08);
}

/* Mobile */

@media(max-width:991px) {

    .menu-link {
        margin: 4px 0;
    }

    .navbar-collapse {
        padding-top: 15px;
    }
}
/* Focus करने पर Placeholder को गायब (Hide) करने के लिए */
input:focus::placeholder,
textarea:focus::placeholder {
    color: transparent !important;
    opacity: 0 !important;
}

/* Chrome, Safari, Edge के लिए विशेष सपोर्ट */
input:focus::-webkit-input-placeholder,
textarea:focus::-webkit-input-placeholder {
    color: transparent !important;
    opacity: 0 !important;
}

/* Firefox के लिए सपोर्ट */
input:focus::-moz-placeholder,
textarea:focus::-moz-placeholder {
    color: transparent !important;
    opacity: 0 !important;
}
/* Mobile Responsive Enhancements */
@media (max-width: 768px) {
    /* Table Responsive Wrapper */
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* Inputs touch-friendly */
    .form-control, .form-select, .btn {
        font-size: 14px;
        padding: 8px 10px;
    }

    /* Stack buttons vertically on mobile */
    .btn-export-group {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }
}
/* AI tools */
.ai-tools-header,
.ocr-header {
    background: linear-gradient(135deg, #0f3d68, #0d6efd);
    color: #ffffff;
    padding: 3rem 0;
}

.ai-tool-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 12px;
}

.ai-tool-card {
    display: grid;
    gap: 6px;
    min-height: 132px;
    padding: 16px;
    border: 1px solid #dce7f5;
    border-radius: 8px;
    background: #ffffff;
    color: #172033;
    text-decoration: none;
    box-shadow: 0 10px 24px rgba(15, 45, 82, 0.06);
}

.ai-tool-card i {
    color: #0d6efd;
    font-size: 1.35rem;
}

.ai-tool-card span {
    color: #5f6c7c;
    font-size: 0.9rem;
    line-height: 1.35;
}

.ai-tool-card:hover,
.ai-tool-card.active {
    border-color: #0d6efd;
    background: #f5f9ff;
    text-decoration: none;
}

.ai-tool-panel {
    padding: 1.25rem;
    border: 1px solid #dfe8f4;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 12px 28px rgba(15, 45, 82, 0.06);
}

.ai-tool-panel h2 {
    font-size: 1.35rem;
    margin-bottom: 0.5rem;
}

.ai-result-box {
    min-height: 430px;
    max-height: 620px;
    overflow: auto;
    white-space: pre-wrap;
    padding: 1rem;
    border: 1px solid #e4eaf3;
    border-radius: 8px;
    background: #f8fbff;
    color: #162033;
}

.article-author-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 16px;
    margin: 0.85rem 0 1rem;
    color: #5a6677;
    font-size: 0.95rem;
}

.article-author-meta span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.pdf-generator-top .tools-header {
    margin-bottom: 0 !important;
    padding: 2rem 0 !important;
}

.pdf-generator-top > .container {
    margin-top: 1rem !important;
    margin-bottom: 1.5rem !important;
}
/* =========================================================
   ARTICLE CARD IMAGE FIX
   Latest Articles + Recent Articles
   ========================================================= */


/* =========================================================
   LATEST ARTICLES
   ========================================================= */

.latest-article-card {
    height: 100%;
    overflow: hidden;
    border: 1px solid #e3e9f0;
    border-radius: 16px;
    background: #ffffff;
    display: flex;
    flex-direction: column;
}

.latest-article-image-link {
    display: block !important;
    width: 100% !important;
    height: 220px !important;
    overflow: hidden !important;
    background: #f1f5f9;
    flex-shrink: 0;
}

.latest-article-image {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: contain !important;
    object-position: center !important;
    background: #f1f5f9;
}


/* Latest article body */

.latest-article-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 1.25rem;
}

.latest-article-title {
    margin: 0.8rem 0;
    font-size: 1.15rem;
    line-height: 1.45;
}

    .latest-article-title a {
        text-decoration: none;
    }

        .latest-article-title a:hover {
            text-decoration: underline;
        }

.latest-article-summary {
    color: #687386;
    font-size: 0.95rem;
    line-height: 1.65;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.latest-article-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.35rem;
    color: #718096;
    font-size: 0.82rem;
}

.latest-article-body .read-more {
    margin-top: auto;
    padding-top: 0.5rem;
}


/* =========================================================
   RECENT POSTS
   ========================================================= */

.recent-post-card {
    height: 100%;
    overflow: hidden;
    border: 1px solid #e3e9f0;
    border-radius: 16px;
    background: #ffffff;
}


    /*
 * Bootstrap .row अंदर image को properly contain करने के लिए
 */

    .recent-post-card .row {
        height: 100%;
    }


    /* Image column */

    .recent-post-card .col-4 {
        height: 100%;
        min-height: 190px;
    }


/* Recent post image */

.recent-post-image {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 190px;
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: contain !important;
    object-position: center !important;
    background: #f1f5f9;
}


/* Recent body */

.recent-post-body {
    padding: 1.25rem;
}

    .recent-post-body h3 {
        margin: 0.65rem 0;
        font-size: 1.05rem;
        line-height: 1.45;
    }

        .recent-post-body h3 a {
            text-decoration: none;
        }

            .recent-post-body h3 a:hover {
                text-decoration: underline;
            }


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 767.98px) {

    .latest-article-image-link {
        height: 200px !important;
    }

    .recent-post-card .col-4 {
        min-height: 150px;
    }

    .recent-post-image {
        min-height: 150px;
    }
}


/* =========================================================
   COOKIE CONSENT BANNER
   ========================================================= */

.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 99999;
    background: #1a1a2e;
    color: #e8edf3;
    padding: 14px 20px;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.35);
    font-size: 0.88rem;
    line-height: 1.5;
}

.cookie-banner__inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.cookie-banner__text {
    flex: 1 1 300px;
}

.cookie-banner__text strong {
    display: block;
    font-size: 0.95rem;
    margin-bottom: 4px;
    color: #ffffff;
}

.cookie-banner__text p {
    margin: 0;
    color: #c5cdd8;
}

.cookie-banner__link {
    color: #7eb3ff;
    text-decoration: underline;
}

.cookie-banner__link:hover {
    color: #a8ccff;
}

.cookie-banner__actions {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
    flex-wrap: wrap;
}

.cookie-banner__btn {
    padding: 9px 22px;
    border: none;
    border-radius: 6px;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    white-space: nowrap;
}

.cookie-banner__btn:active {
    transform: scale(0.97);
}

.cookie-banner__btn--accept {
    background: #2563eb;
    color: #ffffff;
}

.cookie-banner__btn--accept:hover {
    background: #1d4ed8;
}

.cookie-banner__btn--decline {
    background: transparent;
    color: #c5cdd8;
    border: 1px solid #4a5568;
}

.cookie-banner__btn--decline:hover {
    background: #2d3748;
    color: #e8edf3;
}

@media (max-width: 575.98px) {
    .cookie-banner__inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .cookie-banner__actions {
        width: 100%;
    }

    .cookie-banner__btn {
        flex: 1;
        text-align: center;
    }
}


/* =========================================================
   IMAGE LAZY LOAD — blur-up progressive loading
   ========================================================= */

/* Images start blurred and scale up slightly while loading */
img.img-lazy {
    filter: blur(8px);
    transform: scale(1.02);
    transition: filter 0.4s ease, transform 0.4s ease;
    will-change: filter, transform;
}

/* Once loaded, snap to sharp */
img.img-lazy.img-loaded {
    filter: blur(0);
    transform: scale(1);
}

/* Skeleton placeholder shown while image is pending */
.img-skeleton {
    background: linear-gradient(90deg, #e8edf3 25%, #d0d9e5 50%, #e8edf3 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.4s infinite;
    border-radius: 4px;
    display: block;
    width: 100%;
}

@keyframes skeleton-shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Article content images — contain within column, lazy by default */
.article-content img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 1.25rem auto;
    border-radius: 6px;
    box-shadow: 0 2px 12px rgba(0,0,0,.08);
}
.question-answer-card {
  background: #f0f8f5;
  border: 1px solid #b8dfce;
  border-left: 4px solid #198754;
  border-radius: 10px;
  color: #173b2c;
  padding: 18px 20px;
}

.question-answer-heading {
  color: #146c43;
  font-weight: 700;
  margin-bottom: 10px;
}

.question-answer-text {
  font-size: 1rem;
  line-height: 1.8;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.question-answer-attachment a {
  color: #146c43;
  font-weight: 600;
}

