/* Shared styles for news listing (category / subcategory / date / tag / location / search) and details pages.
   --np-ac is set inline from the theme colour (see frontend/partials/np_assets). */
.np { --np-ac: #c4161c; --np-text: #1f2328; --np-muted: #667085; --np-line: #e7e9ee; --np-soft: #f6f7f9; --np-card: #fff; padding-bottom: 36px; color: var(--np-text); }
html[data-theme="dark"] .np { --np-text: #e6e8eb; --np-muted: #9aa3ad; --np-line: #2c323a; --np-soft: #1b2027; --np-card: #161a20; }
.np a { color: inherit; text-decoration: none; }
.np a:hover h1, .np a:hover h2, .np a:hover h3 { color: var(--np-ac); }
.np h1, .np h2, .np h3 { transition: color .2s; }

/* ---------- section heading ---------- */
.np-head { margin: 20px 0 22px; }
.np-crumb { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 14px; color: var(--np-muted); margin-bottom: 8px; }
.np-crumb a:hover { color: var(--np-ac); }
.np-crumb .fa { font-size: 11px; opacity: .7; }
/* admin edit / delete, right after the category name */
.np-crumb-admin { display: inline-flex; align-items: center; gap: 6px; margin: 0 0 0 auto; }
.np-crumb-admin form { margin: 0; display: inline-flex; }
.np-crumb-admin .edit, .np-crumb-admin .del { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border: 0; border-radius: 999px; color: #fff !important; font-size: 12.5px; font-weight: 600; line-height: 1.6; cursor: pointer; text-decoration: none !important; font-family: inherit; }
.np-crumb-admin .edit { background: #2563eb; } .np-crumb-admin .del { background: #dc2626; }
.np-crumb-admin .edit:hover { background: #1d4ed8; } .np-crumb-admin .del:hover { background: #b91c1c; }
.np-crumb-admin .fa { font-size: 11px; opacity: 1; }
.np-head h1 { display: inline-flex; align-items: center; gap: 10px; margin: 0; font-size: 30px; font-weight: 700; line-height: 1.3; color: var(--np-text); }
.np-head h1 .dot { width: 12px; height: 12px; border-radius: 3px; background: var(--np-ac); transform: rotate(45deg); flex: 0 0 auto; }
.np-head .np-sub { margin: 6px 0 0; font-size: 15px; color: var(--np-muted); }
.np-head-line { height: 3px; margin-top: 14px; background: linear-gradient(90deg, var(--np-ac) 0 70px, var(--np-line) 70px); border-radius: 2px; }

/* ---------- thumbs / meta ---------- */
.np-thumb { position: relative; display: block; overflow: hidden; border-radius: 8px; background: var(--np-soft); aspect-ratio: 16 / 9; }
.np-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s ease; }
.np a:hover .np-thumb img { transform: scale(1.05); }
.np-meta { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--np-muted); }
.np-tag { display: inline-block; font-size: 12px; font-weight: 600; color: var(--np-ac); margin-bottom: 6px; }

/* ---------- lead story (overlay card) ---------- */
.np-lead { position: relative; display: block; border-radius: 10px; overflow: hidden; margin-bottom: 6px; }
.np-lead .np-thumb { border-radius: 0; aspect-ratio: 16 / 8.2; }
.np-lead-body { position: absolute; left: 0; right: 0; bottom: 0; padding: 70px 26px 22px; background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,.55) 40%, rgba(0,0,0,.88) 100%); color: #fff; }
.np-lead-body h2 { font-size: 28px; line-height: 1.38; font-weight: 700; margin: 0 0 8px; color: #fff !important; }
.np-lead-body p { font-size: 15.5px; line-height: 1.65; margin: 0 0 10px; color: rgba(255,255,255,.85); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.np-lead-body .np-meta { color: rgba(255,255,255,.75); }
.np-lead-body .np-tag { background: var(--np-ac); color: #fff; padding: 2px 10px; border-radius: 3px; }

/* ---------- list rows ---------- */
.np-list { list-style: none; margin: 0; padding: 0; }
.np-row { border-bottom: 1px dashed var(--np-line); }
.np-row:last-child { border-bottom: 0; }
.np-row > a { display: grid; grid-template-columns: 1fr 230px; gap: 20px; padding: 20px 0; align-items: center; }
.np-row h3 { font-size: 20px; line-height: 1.45; font-weight: 600; margin: 0 0 8px; color: var(--np-text); }
.np-row p { font-size: 15px; line-height: 1.7; color: var(--np-muted); margin: 0 0 8px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.np-empty { margin: 20px 0; padding: 46px 20px; text-align: center; color: var(--np-muted); font-size: 17px; background: var(--np-soft); border-radius: 10px; }
.np-empty .fa { display: block; font-size: 34px; margin-bottom: 10px; opacity: .5; }

/* ---------- pager ---------- */
.np-pager { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px; margin: 30px 0 8px; padding: 0; list-style: none; }
.np-pager a, .np-pager span { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; height: 40px; padding: 0 12px; border-radius: 20px; font-size: 15px; color: var(--np-text); background: var(--np-soft); }
.np-pager a:hover { background: var(--np-ac); color: #fff; }
.np-pager .active span { background: var(--np-ac); color: #fff; font-weight: 600; }
.np-pager .disabled span { opacity: .4; }
.np-pager .np-more a { padding: 0 20px; border: 1px solid var(--np-ac); background: transparent; color: var(--np-ac); font-weight: 600; }
.np-pager .np-more a:hover { background: var(--np-ac); color: #fff; }

/* ---------- sidebar ---------- */
.np-side { margin-top: 20px; position: sticky; top: 80px; }
.np-box { background: var(--np-card); border: 1px solid var(--np-line); border-radius: 10px; overflow: hidden; margin-bottom: 22px; }
.np-tabs { display: flex; margin: 0; padding: 4px; list-style: none; background: var(--np-soft); gap: 4px; }
.np-tabs li { flex: 1; }
.np-tabs a { display: block; text-align: center; padding: 9px 6px; font-size: 16px; font-weight: 600; border-radius: 7px; color: var(--np-muted) !important; }
.np-tabs a.active { background: var(--np-card); color: var(--np-ac) !important; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.np-box-title { margin: 0; padding: 12px 16px; font-size: 17px; font-weight: 700; border-bottom: 1px solid var(--np-line); }
.np-box-title::before { content: ""; display: inline-block; width: 4px; height: 16px; margin-right: 8px; border-radius: 2px; background: var(--np-ac); vertical-align: -2px; }
.np-rank { list-style: none; margin: 0; padding: 4px 14px; counter-reset: np; }
.np-rank li { border-bottom: 1px solid var(--np-line); }
.np-rank li:last-child { border-bottom: 0; }
.np-rank a { display: flex; gap: 12px; align-items: center; padding: 11px 0; }
.np-rank .n { flex: 0 0 30px; height: 30px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 15px; font-weight: 700; background: var(--np-soft); color: var(--np-ac); }
.np-rank li:nth-child(-n+3) .n { background: var(--np-ac); color: #fff; }
.np-rank h3 { font-size: 15.5px; line-height: 1.5; font-weight: 500; margin: 0; color: var(--np-text); }
.np-mini { list-style: none; margin: 0; padding: 4px 14px; }
.np-mini li { border-bottom: 1px solid var(--np-line); }
.np-mini li:last-child { border-bottom: 0; }
.np-mini a { display: grid; grid-template-columns: 92px 1fr; gap: 12px; align-items: center; padding: 11px 0; }
.np-mini .np-thumb { border-radius: 6px; }
.np-mini h3 { font-size: 15px; line-height: 1.5; font-weight: 500; margin: 0; color: var(--np-text); }

/* ---------- article ---------- */
.np-article { padding-top: 20px; }
.np-article .np-crumb { margin-bottom: 12px; }
.np-article .np-cat { display: inline-block; padding: 3px 12px; border-radius: 3px; background: var(--np-ac); color: #fff !important; font-size: 13px; font-weight: 600; }
.np-title { font-size: 34px; line-height: 1.4; font-weight: 700; margin: 0 0 12px; color: var(--np-text); }
.np-lede { font-size: 18px; line-height: 1.7; color: var(--np-muted); margin: 0 0 18px; padding-left: 14px; border-left: 3px solid var(--np-ac); }
.np-byline { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 0; border-top: 1px solid var(--np-line); border-bottom: 1px solid var(--np-line); margin-bottom: 20px; }
.np-author { display: flex; align-items: center; gap: 12px; }
.np-author img, .np-author .ph { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; background: var(--np-soft); display: inline-flex; align-items: center; justify-content: center; color: var(--np-ac); font-size: 20px; }
.np-author strong { display: block; font-size: 16px; color: var(--np-text); }
.np-author-link:hover { color: var(--np-ac) !important; text-decoration: underline !important; }
.np-author .np-desig { display: block; font-size: 13.5px; font-weight: 600; color: var(--np-ac); margin-top: 1px; }
.np-author small { display: block; font-size: 13px; color: var(--np-muted); margin-top: 2px; }
/* story text can't be selected by readers (see the script in details.blade.php) */
.np-nocopy { -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; -webkit-touch-callout: none; }
.np-nocopy img { -webkit-user-drag: none; user-drag: none; pointer-events: auto; }
.np-nocopy input, .np-nocopy textarea, .np-nocopy select, .np-nocopy [contenteditable="true"] { -webkit-user-select: text; user-select: text; }

/* photo · name + designation on one level, centred against each other */
.np-author-pic { display: inline-flex; flex: none; line-height: 0; }
.np-author-txt { display: flex; flex-direction: column; justify-content: center; min-width: 0; line-height: 1.35; }
.np-author-txt strong, .np-author-txt .np-desig { margin: 0 !important; }
/* time · updated · reading time: its own line under the author */
.np-author-meta { flex: 1 1 100%; }
.np-author-meta .np-when { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 0; font-size: 13px; color: var(--np-muted); }
.np-when .np-upd { margin-left: auto; }
.np-tools { display: flex; flex-wrap: wrap; gap: 6px; }
.np-tools a, .np-tools button { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--np-line); background: var(--np-card); color: var(--np-text); display: inline-flex; align-items: center; justify-content: center; font-size: 15px; cursor: pointer; padding: 0; transition: all .2s; }
.np-tools a:hover, .np-tools button:hover { background: var(--np-ac); border-color: var(--np-ac); color: #fff; }
.np-tools .fb:hover { background: #1877f2; border-color: #1877f2; }
.np-tools .wa:hover { background: #25d366; border-color: #25d366; }
.np-tools .tw:hover { background: #111; border-color: #111; }
.np-tools .txt { width: auto; padding: 0 10px; border-radius: 18px; font-size: 13px; font-weight: 600; }
.np-figure { margin: 0 0 22px; }
.np-figure img { width: 100%; height: auto; border-radius: 10px; display: block; }
.np-figure figcaption { font-size: 14px; color: var(--np-muted); padding: 8px 2px 0; line-height: 1.6; }
.np-figure figcaption .fa { margin-right: 5px; }
.np-body { font-size: 19px; line-height: 1.9; color: var(--np-text); word-wrap: break-word; }
.np-body p { margin: 0 0 1.1em; text-align: justify; }
.np-body img { max-width: 100%; height: auto; border-radius: 8px; }
.np-body iframe { max-width: 100%; }
.np-body h2, .np-body h3, .np-body h4 { font-size: 1.1em; font-weight: 700; margin: 1.4em 0 .6em; }
.np-body blockquote { margin: 1.3em 0; padding: 14px 18px; background: var(--np-soft); border-left: 4px solid var(--np-ac); border-radius: 0 8px 8px 0; font-style: normal; }
.np-body a { color: var(--np-ac); text-decoration: underline; }
.np-body.fs-1 { font-size: 17px; } .np-body.fs-3 { font-size: 21px; } .np-body.fs-4 { font-size: 23px; }
.np-video { position: relative; aspect-ratio: 16 / 9; margin: 0 0 22px; border-radius: 10px; overflow: hidden; background: #000; }
.np-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.np-audio { margin: 0 0 22px; padding: 14px; border-radius: 10px; background: var(--np-soft); }
.np-audio audio { width: 100%; }
.np-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 26px 0 0; padding-top: 18px; border-top: 1px solid var(--np-line); }
.np-tags .lbl { font-weight: 700; margin-right: 4px; }
.np-tags a { padding: 5px 14px; border-radius: 18px; background: var(--np-soft); font-size: 14px; }
.np-tags a:hover { background: var(--np-ac); color: #fff; }
.np-section-title { display: flex; align-items: center; gap: 10px; margin: 36px 0 16px; font-size: 22px; font-weight: 700; }
.np-section-title::after { content: ""; flex: 1; height: 2px; background: var(--np-line); }
.np-section-title::before { content: ""; width: 10px; height: 10px; border-radius: 2px; background: var(--np-ac); transform: rotate(45deg); }
.np-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.np-grid h3 { font-size: 16.5px; line-height: 1.5; font-weight: 600; margin: 10px 0 0; color: var(--np-text); }
.np-comments { margin-top: 10px; padding: 18px; border: 1px solid var(--np-line); border-radius: 10px; }

/* =========================================================
   Story page (v4): cleaner reading layout
   ========================================================= */
.np-progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 1003; pointer-events: none; }
.np-progress span { display: block; height: 100%; width: 0; background: var(--tk-accent, #c4161c); transition: width .1s linear; }

.np-story .np-article { padding-top: 22px; }
.np-story .np-crumb { gap: 8px; font-size: 13.5px; margin-bottom: 14px; }
.np-story .np-crumb > a:first-child { width: 28px; height: 28px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--np-soft); color: var(--np-muted); }
.np-story .np-crumb > a:first-child:hover { background: var(--np-ac); color: #fff; }
.np-story .np-crumb > span { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; background: var(--np-soft); }
.np-story .np-cat { border-radius: 999px; padding: 4px 14px; letter-spacing: .01em; }

.np-story .np-title { font-size: 33px; line-height: 1.38; font-weight: 800; letter-spacing: -.003em; margin: 0 0 14px; }
.np-story .np-lede { font-size: 18.5px; line-height: 1.75; color: var(--np-text); opacity: .82; background: var(--np-soft); border-left: 4px solid var(--np-ac); border-radius: 0 10px 10px 0; padding: 14px 18px; margin: 0 0 20px; }

/* byline: author + time / updated / reading time */
.np-story .np-byline { border: 0; padding: 0; margin: 0 0 16px; }
.np-story .np-author img, .np-story .np-author .ph { width: 36px; height: 36px; font-size: 16px; box-shadow: 0 0 0 2px var(--np-card), 0 0 0 3px var(--np-line); }
.np-story .np-author { gap: 10px; }
.np-story .np-author strong { font-size: 16.5px; }
.np-when { display: flex !important; flex-wrap: wrap; gap: 4px 14px; margin-top: 4px !important; }
.np-when span { display: inline-flex; align-items: center; gap: 5px; }
.np-when .fa { opacity: .7; }

/* toolbar: share on the left, print / photocard / text size on the right */
.np-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 0; margin: 0 0 22px; border-top: 1px solid var(--np-line); border-bottom: 1px solid var(--np-line); }
.np-share, .np-util { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.np-share-lbl { font-size: 13px; font-weight: 700; color: var(--np-muted); text-transform: uppercase; letter-spacing: .06em; margin-right: 2px; }
.np-toolbar a, .np-toolbar button { height: 38px; min-width: 38px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--np-line); background: var(--np-card); color: var(--np-text) !important; display: inline-flex; align-items: center; justify-content: center; gap: 7px; font-size: 14px; font-weight: 600; cursor: pointer; transition: background .15s, color .15s, border-color .15s; font-family: inherit; }
.np-toolbar a .fa, .np-toolbar button .fa { font-size: 15px; }
.np-toolbar .fb { background: #1877f2; border-color: #1877f2; color: #fff !important; }
.np-toolbar .wa { background: #25d366; border-color: #25d366; color: #fff !important; }
.np-toolbar .fb:hover { background: #0f63d5; } .np-toolbar .wa:hover { background: #1eb457; }
.np-toolbar .tw:hover, .np-toolbar .np-copy:hover, .np-util a:hover { background: var(--np-text); border-color: var(--np-text); color: var(--np-card) !important; }
.np-fs { display: inline-flex; border: 1px solid var(--np-line); border-radius: 999px; overflow: hidden; }
.np-toolbar .np-fs button { border: 0; border-radius: 0; height: 36px; min-width: 40px; padding: 0 10px; }
.np-toolbar .np-fs button + button { border-left: 1px solid var(--np-line); }
.np-toolbar .np-fs button:hover { background: var(--np-soft); }

/* photo */
.np-story .np-figure { margin: 0 0 24px; }
.np-story .np-figure img { border-radius: 12px; }
.np-story .np-figure figcaption { font-size: 13.5px; padding: 10px 2px 0; border-bottom: 1px solid var(--np-line); padding-bottom: 10px; }

/* body: comfortable reading */
.np-story .np-body { font-size: 19px; line-height: 1.9; }
.np-story .np-body p { text-align: left; margin: 0 0 1.15em; }
.np-story .np-body img { border-radius: 10px; margin: 6px 0; }
.np-story .np-body a { text-underline-offset: 3px; }

/* "আরও পড়ুন" card inside the story */
.np-readmore { margin: 8px 0 26px !important; border-left: 4px solid var(--np-ac) !important; box-shadow: 0 6px 20px rgba(16, 24, 40, .06); }
.np-readmore .np-box-title { background: var(--np-soft); border-bottom: 0; font-size: 15px; }
.np-readmore .np-box-title::before { display: none; }

.np-story .np-tags a { border: 1px solid var(--np-line); background: var(--np-card); }

/* admin strip (signed-in editors only) */
.np-admin-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 14px; padding: 8px 10px; border: 1px dashed var(--np-line); border-radius: 10px; font-size: 14px; background: var(--np-soft); }
.np-admin-bar .lbl { color: var(--np-muted); font-weight: 600; margin-right: 4px; }
.np-admin-bar form { margin: 0; }
.np-admin-bar .edit, .np-admin-bar .del { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border: 0; border-radius: 8px; color: #fff !important; font-size: 14px; font-weight: 600; cursor: pointer; }
.np-admin-bar .edit { background: #2563eb; } .np-admin-bar .del { background: #dc2626; }

/* phone bottom bar + toast */
.np-mbar { display: none; }
.np-toast { position: fixed; left: 50%; bottom: 84px; transform: translate(-50%, 20px); z-index: 1100; padding: 10px 18px; border-radius: 999px; background: #111827; color: #fff; font-size: 14.5px; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; }
.np-toast.on { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 991px) {
  .np-side { position: static; margin-top: 30px; }
}
@media (max-width: 767px) {
  .np-story .np-title { font-size: 25px; line-height: 1.45; }
  .np-story .np-lede { font-size: 16.5px; padding: 12px 14px; }
  .np-story .np-body { font-size: 18px; line-height: 1.85; }
  .np-toolbar { padding: 10px 0; }
  .np-toolbar .np-share { display: none; } /* the bottom bar takes over on phones */
  .np-util { width: 100%; justify-content: flex-end; }
  .np-mbar { display: grid; grid-template-columns: repeat(4, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 1050; background: var(--np-card, #fff); border-top: 1px solid var(--np-line, #e7e9ee); box-shadow: 0 -6px 18px rgba(0, 0, 0, .06); padding-bottom: env(safe-area-inset-bottom); }
  .np-mbar a, .np-mbar button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; height: 56px; border: 0; background: none; color: var(--np-text, #1f2328) !important; font-size: 12px; font-family: inherit; text-decoration: none !important; }
  .np-mbar .fa { font-size: 19px; }
  .np-mbar .wa .fa { color: #25d366; }
  .np-story { padding-bottom: 76px; }
}
html[data-theme="dark"] .np-mbar { background: #161a20; border-color: #2c323a; }
html[data-theme="dark"] .np-mbar a, html[data-theme="dark"] .np-mbar button { color: #e6e8eb !important; }
@media (max-width: 767px) {
  .np-head h1 { font-size: 24px; }
  .np-lead .np-thumb { aspect-ratio: 4 / 3; }
  .np-lead-body { padding: 50px 16px 16px; }
  .np-lead-body h2 { font-size: 20px; }
  .np-lead-body p { display: none; }
  .np-row > a { grid-template-columns: 1fr 120px; gap: 12px; padding: 14px 0; }
  .np-row h3 { font-size: 16.5px; margin-bottom: 4px; }
  .np-row p { display: none; }
  .np-title { font-size: 25px; }
  .np-lede { font-size: 16px; }
  .np-body { font-size: 17.5px; }
  .np-grid { grid-template-columns: 1fr 1fr; gap: 14px; }
  .np-grid h3 { font-size: 15px; }
}
