/* Nawaj Study Lab – WB  |  local prototype styles */
:root {
  --brand: #0f5c4d;
  --brand-dark: #0a4035;
  --brand-soft: #e3f1ec;
  --accent: #f2a20c;
  --accent-soft: #fff4dc;
  --bg: #f5f6f2;
  --surface: #ffffff;
  --ink: #1d2421;
  --muted: #5f6b66;
  --line: #e1e6e2;
  --ok: #1f8a4c;
  --bad: #c0392b;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(0,0,0,.05), 0 4px 14px rgba(0,0,0,.05);
  --font: "Hind Siliguri", "Noto Sans Bengali", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.7;
}
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
h1, h2, h3, h4 { line-height: 1.35; margin: 1.2em 0 .5em; }
h1 { font-size: 1.7rem; margin-top: .3em; }
h2 { font-size: 1.35rem; }
h3 { font-size: 1.12rem; }

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 16px; }

/* ---------- top bar ---------- */
.topbar { background: var(--brand-dark); color: #d6e8e2; font-size: .85rem; }
.topbar .wrap { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-top: 6px; padding-bottom: 6px; }
.topbar a { color: #fff; margin-left: 14px; }

/* ---------- header ---------- */
.site-head { background: var(--surface); border-bottom: 1px solid var(--line); }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 14px; padding-bottom: 14px; }
.logo { display: flex; align-items: center; gap: 10px; color: var(--ink); }
.logo:hover { text-decoration: none; }
.logo-mark {
  width: 46px; height: 46px; border-radius: 12px;
  background: var(--brand); color: #fff;
  display: grid; place-items: center;
  font-weight: 700; font-size: 1.05rem; letter-spacing: .5px;
  box-shadow: inset 0 -4px 0 var(--accent);
}
.logo-text b { display: block; font-size: 1.3rem; line-height: 1.1; }
.logo-text span { font-size: .85rem; color: var(--muted); }

.search { display: flex; flex: 0 1 340px; min-width: 0; }
.search input {
  flex: 1; min-width: 0; width: 100%; padding: 9px 12px;
  border: 1px solid var(--line); border-right: 0;
  border-radius: 8px 0 0 8px; font: inherit; font-size: .95rem;
}
.search button {
  border: 0; background: var(--brand); color: #fff;
  padding: 0 16px; border-radius: 0 8px 8px 0; font: inherit; cursor: pointer;
}

/* ---------- nav ---------- */
.nav { background: var(--brand); position: sticky; top: 0; z-index: 20; }
.nav ul { list-style: none; margin: 0; padding: 0; }
.nav > .wrap > ul { display: flex; flex-wrap: wrap; }
.nav li { position: relative; }
.nav a, .nav .drop-btn {
  display: block; color: #fff; padding: 11px 13px;
  font-size: .95rem; background: none; border: 0; font-family: inherit; cursor: pointer;
}
.nav a:hover, .nav .drop-btn:hover, .nav a.active { background: var(--brand-dark); text-decoration: none; }
.nav .sub-menu {
  display: none; position: absolute; top: 100%; left: 0; min-width: 180px;
  background: var(--surface); box-shadow: var(--shadow); border-radius: 0 0 8px 8px;
}
.nav .sub-menu a { color: var(--ink); }
.nav .sub-menu a:hover { background: var(--brand-soft); }
.nav li:hover > .sub-menu, .nav li.open > .sub-menu { display: block; }
.nav-toggle { display: none; }

/* ---------- highlight strip ---------- */
.hl { background: var(--accent-soft); border-bottom: 1px solid #f3dfae; font-size: .95rem; }
.hl .wrap { display: flex; gap: 10px; align-items: center; padding-top: 8px; padding-bottom: 8px; }
.hl .tag { background: var(--accent); color: #2b1d00; font-weight: 700; padding: 1px 10px; border-radius: 99px; font-size: .8rem; white-space: nowrap; }
.hl a { color: #5a3d00; font-weight: 600; }

/* ---------- layout ---------- */
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 26px; padding-top: 24px; padding-bottom: 40px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.main-card { padding: 22px 26px; }

/* ---------- home hero ---------- */
.hero { padding: 22px 26px; margin-bottom: 22px; background: linear-gradient(120deg, var(--brand) 0%, #187563 100%); color: #fff; border: 0; }
.hero h1 { margin: 0 0 6px; font-size: 1.5rem; }
.hero p { margin: 0 0 14px; color: #d9efe8; }
.quick { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.quick a {
  background: rgba(255,255,255,.12); color: #fff; padding: 10px 12px;
  border-radius: 8px; font-weight: 600; font-size: .95rem;
  border: 1px solid rgba(255,255,255,.18);
}
.quick a:hover { background: rgba(255,255,255,.22); text-decoration: none; }
.quick small { display: block; font-weight: 400; color: #cfe7df; font-size: .8rem; }

/* ---------- post list ---------- */
.section-title { display: flex; align-items: center; justify-content: space-between; margin: 0 0 14px; font-size: 1.2rem; }
.section-title::before { content: ""; width: 5px; height: 22px; background: var(--accent); border-radius: 3px; margin-right: 10px; }
.section-title span { flex: 1; }
.post-item { display: flex; gap: 16px; padding: 16px 0; border-top: 1px solid var(--line); }
.post-item:first-of-type { border-top: 0; padding-top: 4px; }
.post-thumb {
  flex: 0 0 120px; height: 84px; border-radius: 8px;
  display: grid; place-items: center; text-align: center;
  font-weight: 700; font-size: .85rem; padding: 6px; color: var(--brand-dark);
  background: var(--brand-soft);
}
.post-thumb.t-news { background: #e6eefb; color: #1f4b99; }
.post-thumb.t-scholarships { background: #f8e9f1; color: #8a2457; }
.post-thumb.t-qp { background: var(--accent-soft); color: #7a5000; }
.post-thumb.t-mock { background: #ece8fb; color: #4b2ea0; }
.post-item h3 { margin: 0 0 4px; font-size: 1.08rem; }
.post-item h3 a { color: var(--ink); }
.post-item p { margin: 4px 0 0; color: var(--muted); font-size: .95rem; }
.meta { font-size: .82rem; color: var(--muted); display: flex; flex-wrap: wrap; gap: 4px 12px; }
.chip { display: inline-block; background: var(--brand-soft); color: var(--brand-dark); border-radius: 99px; padding: 0 9px; font-size: .78rem; font-weight: 600; }
.more { font-weight: 600; font-size: .9rem; }

.pager { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 18px; }
.pager a, .pager span { padding: 5px 12px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); font-size: .9rem; }
.pager span { background: var(--brand); color: #fff; border-color: var(--brand); }

/* ---------- tables ---------- */
.tbl { width: 100%; border-collapse: collapse; margin: 12px 0 18px; font-size: .96rem; }
.tbl th, .tbl td { border: 1px solid var(--line); padding: 9px 12px; text-align: left; vertical-align: top; }
.tbl thead th { background: var(--brand); color: #fff; font-weight: 600; }
.tbl tbody tr:nth-child(even) { background: #fafbf9; }
.tbl td.num { width: 56px; text-align: center; color: var(--muted); }
.tbl-scroll { overflow-x: auto; }
.badge-ext { font-size: .72rem; background: #eee; color: #555; padding: 0 6px; border-radius: 4px; margin-left: 6px; }

/* ---------- post page ---------- */
.crumbs { font-size: .85rem; color: var(--muted); margin-bottom: 8px; }
.crumbs a { color: var(--muted); }
.share { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0 18px; }
.share a { padding: 6px 14px; border-radius: 6px; color: #fff; font-size: .88rem; font-weight: 600; }
.share .wa { background: #1f9d55; }
.share .tg { background: #2a8bd1; }
.share a:hover { text-decoration: none; opacity: .9; }
.note-box { background: var(--accent-soft); border-left: 4px solid var(--accent); padding: 10px 14px; border-radius: 6px; margin: 14px 0; font-size: .95rem; }
.demo-note { background: #fdeceb; border-left-color: var(--bad); }
.btn {
  display: inline-block; background: var(--brand); color: #fff; border: 0; cursor: pointer;
  padding: 10px 20px; border-radius: 8px; font: inherit; font-weight: 600;
}
.btn:hover { background: var(--brand-dark); text-decoration: none; }
.btn.alt { background: var(--accent); color: #2b1d00; }
.btn.ghost { background: transparent; color: var(--brand); border: 1px solid var(--brand); }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.dl-box { text-align: center; padding: 18px; border: 2px dashed var(--line); border-radius: var(--radius); margin: 14px 0; }

/* Q&A */
.qa { border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; margin: 10px 0; }
.qa .q { font-weight: 600; }
.qa ol { margin: 6px 0 0; padding-left: 0; list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 2px 16px; }
.ans-btn { margin-top: 8px; background: var(--brand-soft); color: var(--brand-dark); border: 0; border-radius: 6px; padding: 3px 12px; font: inherit; font-size: .88rem; cursor: pointer; }
.ans { display: none; margin-top: 8px; padding: 8px 12px; background: #f1f8f5; border-radius: 6px; border-left: 3px solid var(--ok); }
.ans.show { display: block; }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; margin: 6px 0 4px; }

/* scholarship */
.dates { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; margin: 10px 0 16px; }
.dates div { background: var(--brand-soft); border-radius: 8px; padding: 10px 12px; }
.dates b { display: block; font-size: .8rem; color: var(--muted); font-weight: 600; }
details.faq { border: 1px solid var(--line); border-radius: 8px; padding: 10px 14px; margin: 8px 0; }
details.faq summary { font-weight: 600; cursor: pointer; }

/* related + comments */
.related { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 12px; }
.related a { display: block; padding: 12px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); font-weight: 600; font-size: .95rem; background: #fafbf9; }
.comment-form textarea, .comment-form input { width: 100%; padding: 9px 12px; border: 1px solid var(--line); border-radius: 8px; font: inherit; margin-bottom: 10px; }
.comment-form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* ---------- quiz ---------- */
.quiz-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 16px; background: var(--brand-soft); border-radius: 8px; margin: 10px 0 16px; position: sticky; top: 46px; z-index: 5; }
.timer { font-weight: 700; font-size: 1.15rem; color: var(--brand-dark); font-variant-numeric: tabular-nums; }
.timer.low { color: var(--bad); }
.progress { height: 6px; background: #d6e5df; border-radius: 3px; overflow: hidden; flex: 1 1 140px; }
.progress i { display: block; height: 100%; width: 0; background: var(--brand); transition: width .2s; }
.quiz-q { border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; margin-bottom: 12px; }
.quiz-q .q { font-weight: 600; margin-bottom: 8px; }
.opt { display: flex; gap: 10px; align-items: flex-start; padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px; margin: 6px 0; cursor: pointer; }
.opt:hover { background: #f7faf8; }
.opt input { margin-top: 6px; }
.opt.correct { border-color: var(--ok); background: #eaf7ef; }
.opt.wrong { border-color: var(--bad); background: #fcecea; }
.explain { display: none; margin-top: 8px; font-size: .93rem; color: var(--muted); }
.done .explain { display: block; }
.done .opt { cursor: default; }
.result { text-align: center; padding: 20px; border-radius: 10px; background: var(--accent-soft); margin-bottom: 16px; }
.result .score { font-size: 2.2rem; font-weight: 700; color: var(--brand-dark); }

/* ---------- sidebar ---------- */
.side .widget { padding: 16px 18px; margin-bottom: 18px; }
.side h4 { margin: 0 0 10px; font-size: 1.02rem; display: flex; align-items: center; }
.side h4::before { content: ""; width: 4px; height: 18px; background: var(--accent); border-radius: 2px; margin-right: 8px; }
.side ul { list-style: none; margin: 0; padding: 0; }
.side li { padding: 7px 0; border-top: 1px dashed var(--line); font-size: .93rem; line-height: 1.45; }
.side li:first-child { border-top: 0; }
.side li a { color: var(--ink); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tags a { background: var(--brand-soft); color: var(--brand-dark); padding: 2px 10px; border-radius: 99px; font-size: .85rem; }
.social { display: grid; gap: 8px; }
.social a { color: #fff; padding: 8px 12px; border-radius: 8px; font-weight: 600; font-size: .92rem; }
.social .fb { background: #1f5fbf; }
.social .wa { background: #1f9d55; }
.social .tg { background: #2a8bd1; }

/* ---------- footer ---------- */
.site-foot { background: #142b25; color: #c3d6cf; font-size: .92rem; }
.site-foot .cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 28px; padding-top: 32px; padding-bottom: 20px; }
.site-foot h5 { color: #fff; font-size: 1rem; margin: 0 0 10px; }
.site-foot a { color: #e6f1ed; }
.site-foot ul { list-style: none; margin: 0; padding: 0; }
.site-foot li { padding: 3px 0; }
.foot-bottom { border-top: 1px solid #25453c; padding: 12px 0; font-size: .83rem; }
.foot-bottom .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }

.to-top {
  position: fixed; right: 16px; bottom: 16px; width: 42px; height: 42px; border-radius: 50%;
  background: var(--accent); color: #2b1d00; border: 0; font-size: 1.2rem; cursor: pointer;
  box-shadow: var(--shadow); display: none;
}
.to-top.show { display: block; }

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
  .site-foot .cols { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  body { font-size: 16px; }
  .topbar .date { display: none; }
  .site-head .wrap { flex-wrap: wrap; }
  .search { flex: 1 1 100%; }
  .nav-toggle { display: block; width: 100%; text-align: left; background: none; border: 0; color: #fff; font: inherit; font-weight: 600; padding: 11px 0; cursor: pointer; }
  .nav > .wrap > ul { display: none; flex-direction: column; padding-bottom: 8px; }
  .nav.open > .wrap > ul { display: flex; }
  .nav .sub-menu { position: static; box-shadow: none; background: var(--brand-dark); border-radius: 0; }
  .nav .sub-menu a { color: #fff; padding-left: 28px; }
  .nav .sub-menu a:hover { background: var(--brand); }
  .nav li:hover > .sub-menu { display: none; }
  .nav li.open > .sub-menu { display: block; }
  .main-card, .hero { padding: 16px; }
  .post-thumb { flex-basis: 84px; height: 70px; font-size: .75rem; }
  .qa ol { grid-template-columns: 1fr; }
  .related { grid-template-columns: 1fr; }
  .comment-form .row { grid-template-columns: 1fr; }
  .site-foot .cols { grid-template-columns: 1fr; }
  .quiz-head { top: 44px; }
}

/* ---------- WordPress additions ---------- */
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px,1px,1px,1px); }
.custom-logo { max-height: 52px; width: auto; }
.nav .current-menu-item > a, .nav .current-menu-parent > a { background: var(--brand-dark); }
.nav .menu-item-has-children > a::after { content: " ▾"; }
.post-thumb img { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; }
.post-thumb:has(img) { padding: 0; }
.entry > :first-child { margin-top: 0; }
.entry img { height: auto; border-radius: 8px; }
.entry table, .wp-block-table table { width: 100%; border-collapse: collapse; margin: 12px 0 18px; font-size: .96rem; }
.entry th, .entry td { border: 1px solid var(--line); padding: 9px 12px; text-align: left; vertical-align: top; }
.entry thead th { background: var(--brand); color: #fff; font-weight: 600; }
.entry tbody tr:nth-child(even) { background: #fafbf9; }
.entry tbody th { background: #f3f6f4; width: 34%; }
.wp-block-table { overflow-x: auto; margin: 0; }
.entry blockquote { margin: 14px 0; padding: 10px 14px; background: var(--accent-soft); border-left: 4px solid var(--accent); border-radius: 6px; }
.alignleft { float: left; margin: 0 16px 10px 0; }
.alignright { float: right; margin: 0 0 10px 16px; }
.aligncenter { display: block; margin: 0 auto; }
.wp-caption-text, figcaption { font-size: .85rem; color: var(--muted); text-align: center; }
.pager .page-numbers { padding: 5px 12px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); font-size: .9rem; }
.pager .page-numbers.current { background: var(--brand); color: #fff; border-color: var(--brand); }
.pager .dots { border: 0; background: none; }
.comment-list { list-style: none; padding: 0; margin: 0 0 20px; }
.comment-list .children { list-style: none; padding-left: 22px; }
.comment-body { border: 1px solid var(--line); border-radius: 8px; padding: 10px 14px; margin: 10px 0; }
.comment-meta { font-size: .85rem; color: var(--muted); }
.comment-author { font-weight: 600; color: var(--ink); }
.comment-author img { display: none; }
.reply a { font-size: .85rem; font-weight: 600; }
.comment-form label { display: block; font-size: .9rem; font-weight: 600; }
.comment-form textarea, .comment-form input[type=text], .comment-form input[type=email], .comment-form input[type=url] { width: 100%; padding: 9px 12px; border: 1px solid var(--line); border-radius: 8px; font: inherit; margin-bottom: 10px; }
.comment-form .submit { background: var(--brand); color: #fff; border: 0; padding: 10px 20px; border-radius: 8px; font: inherit; font-weight: 600; cursor: pointer; }
.comment-form-cookies-consent { display: flex; gap: 8px; align-items: flex-start; font-size: .85rem; }
.comment-form-cookies-consent label { font-weight: 400; }
.side .widget_block, .side .widget { overflow-wrap: anywhere; }
.side .tagcloud a { font-size: .85rem !important; }
.views { font-size: .82rem; color: var(--muted); margin-top: 18px; }
