/* =====================================================================
   News Portal — public site styles (Bootstrap 5 + custom)
   ===================================================================== */
:root {
    --brand: #c8102e;
    --brand-dark: #9c0c24;
    --ink: #141414;
    --ink-2: #333;
    --muted: #6d6d6d;
    --line: #e7e3dc;
    --paper: #ffffff;
    --tint: #f6f4ef;
    --night: #111418;
    --radius: 4px;
    --head-font: 'Source Serif 4', Georgia, 'Times New Roman', serif;
    --body-font: 'Inter', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
}
.edition-bn {
    --head-font: 'Noto Serif Bengali', 'Hind Siliguri', serif;
    --body-font: 'Hind Siliguri', 'Noto Sans Bengali', system-ui, sans-serif;
}

body { font-family: var(--body-font); color: var(--ink); background: var(--paper); font-size: 16px; }
.edition-bn body { font-size: 17px; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--brand); }
img { max-width: 100%; }
.btn-brand { background: var(--brand); color: #fff; border: 0; }
.btn-brand:hover { background: var(--brand-dark); color: #fff; }

/* ---------- Top bar ---------- */
.topbar { background: var(--night); color: #cfd3d8; font-size: .82rem; padding: 6px 0; }
.topbar a { color: #cfd3d8; }
.topbar a:hover { color: #fff; }
.edition-switch { background: var(--brand); color: #fff !important; padding: 2px 12px; border-radius: 20px; font-weight: 600; }
.edition-switch:hover { background: #fff; color: var(--brand) !important; }

/* ---------- Masthead ---------- */
.masthead { padding: 18px 0 14px; border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; flex-direction: column; line-height: 1; }
.brand img { max-height: 64px; width: auto; }
.brand-text { font-family: var(--head-font); font-weight: 800; font-size: 2.6rem; color: var(--ink); letter-spacing: -.02em; }
.brand-text::first-letter { color: var(--brand); }
.brand-tag { font-size: .82rem; color: var(--muted); margin-top: 6px; }
.small-brand { font-size: 1.5rem; }

/* ---------- Main nav ---------- */
.mainnav { background: var(--paper); border-bottom: 3px solid var(--brand); box-shadow: 0 1px 0 var(--line); z-index: 1020; }
.mainnav .container { min-height: 48px; }
.nav-home { color: var(--brand); font-size: 1.15rem; padding: 0 12px 0 0; }
.nav-burger { font-size: 1.6rem; padding: 0 10px 0 0; border: 0; }
.nav-list { list-style: none; margin: 0; padding: 0; gap: 2px; flex-wrap: nowrap; }
.nav-list > li { position: relative; }
.nav-list > li > a { display: block; padding: 13px 10px; font-weight: 600; font-size: .95rem; white-space: nowrap; }
.nav-list > li > a.active { color: var(--brand); box-shadow: inset 0 -3px 0 var(--brand); }
.nav-list .sub { display: none; position: absolute; top: 100%; left: 0; min-width: 190px; background: #fff; list-style: none; padding: 6px 0;
    margin: 0; border: 1px solid var(--line); border-top: 3px solid var(--brand); box-shadow: 0 8px 24px rgba(0,0,0,.08); z-index: 30; }
.nav-list .sub a { display: block; padding: 7px 16px; font-size: .92rem; }
.nav-list .sub a:hover { background: var(--tint); }
.nav-list li.has-sub:hover > .sub, .nav-list li.has-sub:focus-within > .sub { display: block; }
.nav-search { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 20px; overflow: hidden; }
.nav-search input { border: 0; outline: 0; padding: 5px 12px; width: 170px; font-size: .9rem; background: transparent; transition: width .2s; }
.nav-search input:focus { width: 230px; }
.nav-search button { border: 0; background: transparent; padding: 5px 12px 5px 4px; color: var(--muted); }
@media (max-width: 575.98px) {
    .nav-search input { width: 120px; }
    .nav-search input:focus { width: 150px; }
    .brand-text { font-size: 2rem; }
}
.mobile-menu .offcanvas-body a { display: block; padding: 10px 4px; border-bottom: 1px solid var(--line); font-weight: 600; }
.mobile-menu .offcanvas-body a.child { font-weight: 400; padding-left: 18px; font-size: .92rem; }

/* ---------- Ticker ---------- */
.ticker { background: var(--tint); border-bottom: 1px solid var(--line); font-size: .93rem; }
.ticker .container { height: 40px; }
.ticker-label { background: var(--brand); color: #fff; font-weight: 700; display: flex; align-items: center; padding: 0 14px; gap: 8px; flex-shrink: 0; }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: #fff; animation: pulse 1.2s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .25; } }
.ticker-track { overflow: hidden; flex: 1; display: flex; align-items: center; mask-image: linear-gradient(90deg, transparent, #000 3%, #000 97%, transparent); }
.ticker-move { display: inline-flex; white-space: nowrap; animation: ticker 45s linear infinite; padding-left: 100%; }
.ticker-move:hover { animation-play-state: paused; }
.ticker-move a, .ticker-move span { padding: 0 22px; position: relative; }
.ticker-move a::before, .ticker-move span::before { content: ''; position: absolute; left: 4px; top: 50%; width: 6px; height: 6px; background: var(--brand); transform: translateY(-50%) rotate(45deg); }
@keyframes ticker { from { transform: translateX(0); } to { transform: translateX(-100%); } }
@media (prefers-reduced-motion: reduce) { .ticker-move { animation: none; padding-left: 0; } }

/* ---------- Cards ---------- */
.img-wrap { display: block; overflow: hidden; background: #e9e6df; border-radius: var(--radius); position: relative; }
.img-wrap img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
a.img-wrap:hover img { transform: scale(1.04); }
.play-badge { position: absolute; left: 10px; bottom: 10px; width: 38px; height: 38px; border-radius: 50%; background: rgba(200,16,46,.92);
    color: #fff; display: flex; align-items: center; justify-content: center; font-size: 1.3rem; }
.title { font-family: var(--head-font); font-weight: 700; color: var(--ink); margin: 0; line-height: 1.35; }
.title a:hover { color: var(--brand); }
.meta { font-size: .78rem; color: var(--muted); margin-top: 6px; }
.shoulder { color: var(--brand); font-weight: 700; font-size: .88rem; margin-bottom: 4px; }
.cat-label { display: inline-block; color: var(--brand); font-size: .78rem; font-weight: 700; margin-bottom: 4px; text-transform: uppercase; letter-spacing: .02em; }
.edition-bn .cat-label { text-transform: none; letter-spacing: 0; font-size: .85rem; }

.card-lead .body { padding-top: 12px; }
.card-lead .title { font-size: 1.85rem; font-weight: 800; letter-spacing: -.01em; }
.edition-bn .card-lead .title { font-size: 1.75rem; line-height: 1.4; }
.card-lead .summary { color: var(--ink-2); margin: 8px 0 0; font-size: 1rem; }

.card-md .body { padding-top: 8px; }
.card-md .title { font-size: 1.02rem; }

.card-sm { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.card-sm:last-child { border-bottom: 0; }
.card-sm .img-wrap { flex: 0 0 110px; height: 72px; }
.card-sm .title { font-size: .97rem; }

.card-text { padding: 10px 0; border-top: 1px solid var(--line); }
.card-text .title { font-size: .98rem; }

.card-wide { display: flex; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.card-wide .img-wrap { flex: 0 0 34%; max-width: 260px; }
.card-wide .title { font-size: 1.2rem; }
.card-wide .summary { color: var(--ink-2); font-size: .95rem; margin: 6px 0 0; }
@media (max-width: 575.98px) { .card-wide .img-wrap { flex-basis: 38%; } .card-wide .title { font-size: 1rem; } }

.lead-side { border-left: 1px solid var(--line); }
@media (max-width: 767.98px) { .lead-side { border-left: 0; } }
.top-grid { border-top: 1px solid var(--line); padding-top: 14px; }

/* ---------- Sections ---------- */
.cat-section { margin: 34px 0 10px; }
.section-head { display: flex; align-items: center; gap: 14px; border-top: 3px solid var(--cat, var(--brand)); padding-top: 8px; margin-bottom: 14px; }
.section-head h2 { font-family: var(--head-font); font-weight: 800; font-size: 1.35rem; margin: 0; }
.section-head h2 a:hover, .section-head h2 span { color: var(--cat, var(--brand)); }
.section-head .sub-links { gap: 12px; font-size: .88rem; color: var(--muted); }
.section-head .more { margin-left: auto; font-size: .85rem; color: var(--muted); white-space: nowrap; }
.section-head .more:hover { color: var(--cat, var(--brand)); }

.video-strip { background: var(--night); color: #fff; margin: 34px -12px 10px; padding: 16px 12px 22px; border-radius: var(--radius); }
.video-strip .section-head { border-top-color: var(--brand); }
.video-strip .section-head h2 a, .video-strip .title, .video-strip .title a { color: #fff; }
.video-strip .meta { color: #9aa1a8; }

/* ---------- Sidebar ---------- */
.sidebar > * + * { margin-top: 22px; }
.side-tabs .nav-tabs { border-bottom: 2px solid var(--ink); }
.side-tabs .nav-link { color: var(--muted); font-weight: 700; border: 0; padding: 8px 12px; border-radius: 0; }
.side-tabs .nav-link.active { color: #fff; background: var(--ink); }
.rank-list { list-style: none; padding: 0; margin: 0; }
.rank-list li { padding: 10px 0; border-bottom: 1px solid var(--line); font-size: .95rem; line-height: 1.45; }
.rank-list li .meta { display: block; margin-top: 3px; }
.rank-list.numbered li { display: flex; gap: 12px; align-items: flex-start; }
.rank-no { font-family: var(--head-font); font-weight: 800; font-size: 1.6rem; line-height: 1; color: #d0cbc2; min-width: 28px; }
.side-more { display: inline-block; margin-top: 8px; font-size: .88rem; font-weight: 600; color: var(--brand); }
.side-box { background: var(--tint); padding: 16px; border-radius: var(--radius); }
.side-box h5 { font-family: var(--head-font); font-weight: 700; font-size: 1.05rem; }
.side-box p { font-size: .9rem; color: var(--ink-2); }
.sticky-ad { position: sticky; top: 70px; }

/* ---------- Ads ---------- */
.ad-slot { text-align: center; margin: 18px 0; }
.ad-slot img { max-width: 100%; height: auto; }
.ad-label { display: block; font-size: .65rem; color: #a3a3a3; text-transform: uppercase; letter-spacing: .1em; margin-bottom: 2px; }
.masthead .ad-slot { margin: 0; }

/* ---------- Page heads ---------- */
.page-head { padding: 22px 0 14px; margin-bottom: 18px; border-bottom: 3px solid var(--cat, var(--ink)); }
.page-head h1 { font-family: var(--head-font); font-weight: 800; font-size: 2rem; margin: 0; color: var(--cat, var(--ink)); }
.page-head .parent { font-size: .9rem; color: var(--muted); }
.page-head .sub-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.page-head .sub-links a { border: 1px solid var(--line); padding: 3px 12px; border-radius: 20px; font-size: .88rem; }
.page-head .sub-links a:hover { border-color: var(--brand); }
.search-big { display: flex; gap: 8px; margin-top: 12px; max-width: 640px; }
.author-head { display: flex; gap: 16px; align-items: center; }
.avatar-lg { width: 84px; height: 84px; border-radius: 50%; object-fit: cover; }
.empty-state { padding: 60px 20px; text-align: center; color: var(--muted); background: var(--tint); border-radius: var(--radius); }

/* ---------- Article ---------- */
.crumbs { font-size: .88rem; color: var(--muted); display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.crumbs .bi-chevron-right { font-size: .7rem; }
.crumbs .current { color: var(--brand); font-weight: 600; }
.article .shoulder { font-size: 1rem; }
.headline { font-family: var(--head-font); font-weight: 800; font-size: 2.3rem; line-height: 1.3; letter-spacing: -.01em; margin: 0 0 10px; }
.edition-bn .headline { font-size: 2.1rem; line-height: 1.45; }
@media (max-width: 575.98px) { .headline, .edition-bn .headline { font-size: 1.55rem; } }
.dek { font-size: 1.15rem; color: var(--ink-2); margin-bottom: 14px; }
.byline-bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.byline { display: flex; gap: 10px; align-items: center; }
.byline .avatar { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; }
.avatar-ph { display: inline-flex; align-items: center; justify-content: center; background: var(--tint); color: var(--muted); font-size: 1.2rem; }
.byline .who { font-weight: 700; }
.byline .loc { font-weight: 400; color: var(--muted); }
.byline .when { font-size: .82rem; color: var(--muted); }
.share { display: flex; gap: 6px; }
.share a, .share button { width: 34px; height: 34px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: #fff; border: 0; font-size: .95rem; }
.s-fb { background: #1877f2; } .s-x { background: #111; } .s-wa { background: #25d366; } .s-li { background: #0a66c2; }
.s-copy { background: #6c757d; } .s-print { background: #adb5bd; }
.share a:hover, .share button:hover { opacity: .85; color: #fff; }
.lead-figure { margin: 0 0 16px; }
.lead-figure img { width: 100%; border-radius: var(--radius); }
.lead-figure figcaption { font-size: .85rem; color: var(--muted); padding: 8px 0; border-bottom: 1px solid var(--line); }
.article-meta-line { display: flex; gap: 18px; align-items: center; font-size: .85rem; color: var(--muted); margin-bottom: 14px; }
.font-tools button { border: 1px solid var(--line); background: #fff; border-radius: 4px; padding: 0 8px; font-weight: 700; }
.article-body { font-size: 1.12rem; line-height: 1.85; color: #1d1d1d; }
.edition-bn .article-body { font-size: 1.18rem; line-height: 1.95; }
.article-body p { margin-bottom: 1.15em; }
.article-body img { height: auto; border-radius: var(--radius); margin: 8px 0; }
.article-body h2, .article-body h3 { font-family: var(--head-font); font-weight: 700; margin: 1.3em 0 .6em; }
.article-body blockquote { border-left: 4px solid var(--brand); padding: 4px 0 4px 18px; margin: 1.2em 0; font-family: var(--head-font); font-size: 1.2rem; color: var(--ink-2); }
.article-body a { color: var(--brand); text-decoration: underline; }
.article-body iframe { max-width: 100%; }
.article-body table { width: 100%; border-collapse: collapse; margin: 1em 0; }
.article-body td, .article-body th { border: 1px solid var(--line); padding: 6px 10px; }
.tag-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 16px 0; border-top: 1px solid var(--line); }
.tag-row .lbl { color: var(--muted); font-size: .9rem; }
.tag-row a { background: var(--tint); padding: 4px 12px; border-radius: 20px; font-size: .88rem; }
.tag-row a:hover { background: var(--brand); color: #fff; }
.share-bottom { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }

/* ---------- Pagination ---------- */
.pagination .page-link { color: var(--ink); }
.pagination .active > .page-link { background: var(--brand); border-color: var(--brand); color: #fff; }

/* ---------- Footer ---------- */
.site-footer { background: var(--night); color: #b9bfc6; margin-top: 50px; padding: 44px 0 0; font-size: .92rem; }
.site-footer a { color: #d9dde1; }
.site-footer a:hover { color: #fff; }
.footer-brand { color: #fff; font-size: 2rem; }
.footer-about { margin: 10px 0 14px; }
.footer-head { color: #fff; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; font-size: .8rem; margin-bottom: 14px; }
.footer-cats { list-style: none; padding: 0; margin: 0; columns: 3; column-gap: 20px; }
.footer-cats li { padding: 3px 0; }
.social { display: flex; gap: 8px; }
.social a { width: 36px; height: 36px; border-radius: 50%; background: #23282e; display: inline-flex; align-items: center; justify-content: center; }
.social a:hover { background: var(--brand); }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; border-top: 1px solid #262b31; margin-top: 30px; padding: 16px 0; font-size: .84rem; }
.footer-pages { display: flex; flex-wrap: wrap; gap: 16px; }
.back-top { position: fixed; right: 18px; bottom: 18px; width: 42px; height: 42px; border-radius: 50%; border: 0; background: var(--brand); color: #fff;
    opacity: 0; pointer-events: none; transition: opacity .2s; z-index: 1030; }
.back-top.show { opacity: 1; pointer-events: auto; }

/* ---------- Print ---------- */
@media print {
    .topbar, .mainnav, .ticker, .sidebar, .site-footer, .share, .share-bottom, .ad-slot, .related, .back-top, .font-tools, .masthead .ad-slot { display: none !important; }
    .col-lg-8 { width: 100% !important; }
    .article-body { font-size: 12pt; }
}
