/* E-Paper Theme — Developed by Elias Mahmud */

@font-face { font-family: "Noto Sans Bengali"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/noto-sans-bengali-bengali-400-normal.woff2") format("woff2"); unicode-range: U+0951-0952,U+0964-0965,U+0980-09FE,U+1CD0,U+1CD2,U+1CD5-1CD6,U+1CD8,U+1CE1,U+1CEA,U+1CED,U+1CF2,U+1CF5-1CF7,U+200C-200D,U+20B9,U+25CC,U+A8F1; }
@font-face { font-family: "Noto Sans Bengali"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/noto-sans-bengali-bengali-600-normal.woff2") format("woff2"); unicode-range: U+0951-0952,U+0964-0965,U+0980-09FE,U+1CD0,U+1CD2,U+1CD5-1CD6,U+1CD8,U+1CE1,U+1CEA,U+1CED,U+1CF2,U+1CF5-1CF7,U+200C-200D,U+20B9,U+25CC,U+A8F1; }
@font-face { font-family: "Noto Sans Bengali"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/noto-sans-bengali-bengali-700-normal.woff2") format("woff2"); unicode-range: U+0951-0952,U+0964-0965,U+0980-09FE,U+1CD0,U+1CD2,U+1CD5-1CD6,U+1CD8,U+1CE1,U+1CEA,U+1CED,U+1CF2,U+1CF5-1CF7,U+200C-200D,U+20B9,U+25CC,U+A8F1; }
@font-face { font-family: "Noto Sans Bengali"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/noto-sans-bengali-latin-400-normal.woff2") format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Noto Sans Bengali"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/noto-sans-bengali-latin-600-normal.woff2") format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Noto Sans Bengali"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/noto-sans-bengali-latin-700-normal.woff2") format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Noto Serif Bengali"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/noto-serif-bengali-bengali-700-normal.woff2") format("woff2"); unicode-range: U+0951-0952,U+0964-0965,U+0980-09FE,U+1CD0,U+1CD2,U+1CD5-1CD6,U+1CD8,U+1CE1,U+1CEA,U+1CED,U+1CF2,U+1CF5-1CF7,U+200C-200D,U+20B9,U+25CC,U+A8F1; }
@font-face { font-family: "Noto Serif Bengali"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/noto-serif-bengali-latin-700-normal.woff2") format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }

:root {
	--font-body: "Noto Sans Bengali", "Hind Siliguri", "SolaimanLipi", system-ui, sans-serif;
	--font-head: "Noto Serif Bengali", "Noto Sans Bengali", Georgia, serif;
	--ink: #1b1b1b;
	--muted: #6b665e;
	--line: #e4dfd5;
	--paper: #f7f5f0;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font-body); font-size: 17px; line-height: 1.7; color: var(--ink); background: var(--paper); -webkit-font-smoothing: antialiased; }
img, svg, canvas { max-width: 100%; }
img { height: auto; }
a { color: var(--epm-primary); }
h1, h2, h3 { font-family: var(--font-head); font-weight: 700; line-height: 1.3; }
.epm-page-title, .epm-latest-date, .section-title, .entry-title { font-family: var(--font-head); }
button, input, select, textarea { font-family: inherit; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--epm-primary) 45%, transparent); outline-offset: 2px; }

.screen-reader-text { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link:focus { position: fixed !important; top: 8px; left: 8px; z-index: 100001; width: auto; height: auto; clip: auto; padding: 10px 16px; background: #fff; color: var(--ink); border-radius: 6px; }

.container { width: min(1200px, 100% - 32px); margin-inline: auto; }
.container.narrow { width: min(820px, 100% - 32px); }
.site-main { padding-block: 28px 56px; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: #fff; border-bottom: 3px solid var(--ink); }
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 0; position: relative; } }
.topbar { background: var(--ink); color: #eee; font-size: .82rem; }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 34px; }
.topbar-dates { display: flex; flex-wrap: wrap; gap: 4px 10px; }
.date-sep { opacity: .4; }
.date-en { letter-spacing: .01em; }
.social-links { display: flex; gap: 4px; }
.social-links a { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 6px; color: inherit; }
.social-links a:hover { background: rgba(255,255,255,.12); color: #fff; }

.masthead { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; padding-block: 14px; }
.header-left .masthead { grid-template-columns: auto 1fr; }
.header-left .masthead-left { display: none; }
.header-left .brand { align-items: flex-start; text-align: left; }
.brand { display: flex; flex-direction: column; align-items: center; text-align: center; min-width: 0; }
.brand-title { margin: 0; line-height: 1; font-size: inherit; }
.brand-title a { display: inline-block; color: var(--ink); text-decoration: none; }
.brand-name { font-family: var(--font-head); font-weight: 700; font-size: clamp(1.9rem, 1.2rem + 3vw, 3.2rem); letter-spacing: -.01em; }
.brand-logo { display: block; max-height: 78px; width: auto; }
.brand-tag { margin-top: 6px; padding: 1px 14px; border-radius: 99px; background: var(--epm-primary); color: #fff; font-size: .82rem; font-weight: 700; letter-spacing: .04em; }
.masthead-side { display: flex; gap: 8px; align-items: center; }
.masthead-right { justify-content: flex-end; }
.hbtn { display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 8px 14px; border-radius: 8px; border: 1px solid var(--line); background: #fff; color: var(--ink); font: inherit; font-size: .95rem; font-weight: 600; text-decoration: none; cursor: pointer; white-space: nowrap; transition: border-color .15s, background-color .15s, color .15s; }
.hbtn:hover { border-color: var(--ink); color: var(--ink); }
.hbtn-primary { background: var(--epm-primary); border-color: var(--epm-primary); color: #fff; }
.hbtn-primary:hover { background: color-mix(in srgb, var(--epm-primary) 85%, #000); color: #fff; border-color: transparent; }

/* Compact header on the reader page so the newspaper gets the space. */
.epaper-view-reader .topbar { display: none; }
.epaper-view-reader .site-header { position: relative; border-bottom-width: 2px; }
.epaper-view-reader .masthead { padding-block: 6px; }
.epaper-view-reader .brand-logo { max-height: 40px; }
.epaper-view-reader .brand-name { font-size: 1.6rem; }
.epaper-view-reader .brand-tag { display: none; }
.epaper-view-reader .hbtn { min-height: 36px; padding: 6px 12px; }

/* Date search dialog */
.search-dialog { width: min(440px, 100% - 32px); border: 0; border-radius: 14px; padding: 28px 24px 22px; box-shadow: 0 30px 80px rgba(0,0,0,.35); color: var(--ink); }
.search-dialog::backdrop { background: rgba(20,20,20,.55); }
.search-dialog h2 { margin: 0 0 4px; font-size: 1.3rem; }
.search-dialog p { margin: 0 0 16px; color: var(--muted); }
.search-dialog-close { position: absolute; top: 10px; right: 10px; }
.search-dialog-close button { display: grid; place-items: center; width: 36px; height: 36px; border: 0; border-radius: 8px; background: transparent; cursor: pointer; color: var(--ink); }
.search-dialog-close button:hover { background: var(--paper); }
.search-dialog-more { margin-top: 16px !important; font-size: .92rem; }

/* ---------- Home ---------- */
.home-main { padding: 0; }
.home-hero { padding-block: clamp(28px, 5vw, 64px); background: linear-gradient(180deg, #fff 0%, var(--paper) 100%); border-bottom: 1px solid var(--line); }
.home-recent { padding-block: 44px 24px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 20px; border-bottom: 2px solid var(--ink); }
.section-title { margin: 0; padding-bottom: 8px; font-size: 1.5rem; position: relative; }
.section-head .section-title::after { content: ""; position: absolute; left: 0; bottom: -2px; width: 64px; height: 4px; background: var(--epm-primary); }
.section-link { font-weight: 600; text-decoration: none; white-space: nowrap; }
.home-search { padding-block: 32px 56px; }
.home-search-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; padding: 24px; background: #fff; border: 1px solid var(--line); border-radius: 14px; }
.home-search-inner p { margin: 4px 0 0; color: var(--muted); }
.home-search .epm-date-search { flex: 0 1 380px; }

/* ---------- Content pages ---------- */
.entry { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: clamp(20px, 4vw, 40px); }
.entry + .entry { margin-top: 16px; }
.entry-title { margin-top: 0; font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2.1rem); }
.entry-title a { color: var(--ink); text-decoration: none; }
.notfound { text-align: center; display: grid; justify-items: center; gap: 8px; }
.notfound-code { margin: 0; font-family: var(--font-head); font-size: 5rem; line-height: 1; color: var(--epm-primary); }
.notfound .epm-date-search { width: min(380px, 100%); }

/* ---------- Footer ---------- */
.site-footer { background: #151515; color: #cfcac1; font-size: .95rem; }
.epaper-view-reader .site-footer { border-top: 0; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; padding-block: 44px 28px; }
.footer-brand { margin: 0 0 8px; font-family: var(--font-head); font-size: 1.6rem; font-weight: 700; color: #fff; }
.footer-title { margin: 0 0 10px; font-size: 1.05rem; color: #fff; }
.footer-col p { margin: 0 0 10px; }
.site-footer a { color: #fff; }
.footer-more { font-weight: 600; text-decoration: none; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); }
.footer-bottom-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 20px; padding-block: 16px; font-size: .86rem; }
.footer-links ul { display: flex; flex-wrap: wrap; gap: 4px 18px; margin: 0; padding: 0; list-style: none; }
.footer-links a { color: #cfcac1; text-decoration: none; }
.footer-links a:hover { color: #fff; }
.copyright, .credit { margin: 0; }
.credit { opacity: .7; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
	.footer-grid { grid-template-columns: 1fr 1fr; }
	.footer-about { grid-column: 1 / -1; }
	.hide-sm { display: none; }
	.masthead { grid-template-columns: auto 1fr auto; }
	.masthead-left { display: none; }
	.brand { grid-column: 1 / 3; align-items: flex-start; text-align: left; }
}
@media (max-width: 600px) {
	body { font-size: 16px; }
	.topbar .social-links, .date-en, .date-bangabda + .date-sep { display: none; }
	.topbar-inner { justify-content: center; }
	.brand-logo { max-height: 52px; }
	.hide-xs { display: none; }
	.hbtn { padding: 8px 11px; }
	.footer-grid { grid-template-columns: 1fr; gap: 20px; }
	.footer-bottom-inner { flex-direction: column; text-align: center; }
	.home-search-inner { padding: 18px; }
	.home-search .epm-date-search { flex-basis: 100%; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
