/* ==========================================================================
   News View v1 — "Newsroom White" (সংবাদ বিস্তারিত পেজ)
   File: assets/css/post-view.css
   - বাঁয়ে: এই বিভাগের খবর · মাঝে: মূল সংবাদ · ডানে: সর্বশেষ/জনপ্রিয়
   - সাদা প্রফেশনাল থিম, লাল অ্যাকসেন্ট
   - কোনো এক-পাশের বর্ডার/লাইন নেই; ১০০% রেসপনসিভ
   ========================================================================== */
.pv-page {
    --pv-red: var(--accent-red, #cc0000);
    --pv-red-soft: #fdecec;
    --pv-text: #111827;
    --pv-body: #1f2937;
    --pv-muted: #6b7280;
    --pv-line: #e8ebef;
    --pv-card: #ffffff;
    --pv-soft: #f5f7f9;
    --pv-ph: #eef1f4;
    --pv-radius: 12px;
    --pv-shadow: 0 2px 12px rgba(16, 24, 40, .05);
    padding-top: 18px;
    padding-bottom: 30px;
}
.pv-page *, .pv-page *::before, .pv-page *::after { box-sizing: border-box; }
:where(.pv-page) a { color: inherit; text-decoration: none; }
:where(.pv-page) :where(h1, h2, h3, h4, ol) { margin: 0; padding: 0; }

/* ---------- পড়ার অগ্রগতি বার (পূর্ণ প্রস্থের পাতলা বার) ---------- */
.pv-progress {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    z-index: 9999;
    background: transparent;
    pointer-events: none;
}
.pv-progress span {
    display: block;
    width: 0;
    height: 100%;
    background: var(--accent-red, #cc0000);
    border-radius: 0 3px 3px 0;
    transition: width .1s linear;
}

/* ---------- ব্রেডক্রাম্ব ---------- */
.pv-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 8px;
    margin-bottom: 16px;
    padding: 9px 14px;
    background: var(--pv-soft);
    border-radius: 10px;
    font-size: 14px;
    color: var(--pv-muted);
}
.pv-breadcrumb a { color: var(--pv-text); font-weight: 600; }
.pv-page .pv-breadcrumb a:hover { color: var(--pv-red); }
.pv-sep { font-size: 11px; color: #9ca3af; }
.pv-current { color: var(--pv-muted); }

/* ---------- ৩-কলাম লেআউট ---------- */
.pv-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "main" "left" "right";
    gap: 22px;
    align-items: start;
}
.pv-main { grid-area: main; min-width: 0; }
.pv-left { grid-area: left; min-width: 0; }
.pv-right { grid-area: right; min-width: 0; }
.pv-sticky { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.pv-sticky > .dynamic-ad-box { margin: 0 !important; }

/* ট্যাবলেট (৬৪০–৯৯১): ডান ও বাঁ কলাম পাশাপাশি মূল খবরের নিচে */
@media (min-width: 640px) and (max-width: 991px) {
    .pv-layout {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-template-areas: "main main" "left right";
    }
    .pv-layout:not(:has(.pv-left)) { grid-template-areas: "main main" "right right"; }
    /* দুই কলাম সমান উচ্চতা — নিচে ফাঁকা থাকবে না */
    .pv-left, .pv-right { align-self: stretch; }
    .pv-left .pv-sticky, .pv-right .pv-sticky { height: 100%; }
    .pv-sticky > .pv-box:last-of-type { flex: 1 1 auto; }
}

/* ছোট ডেস্কটপ (৯৯২–১১৯৯): মূল খবর + ডান কলাম; বাঁ কলাম মূল খবরের নিচে */
@media (min-width: 992px) {
    .pv-layout {
        grid-template-columns: minmax(0, 1fr) 300px;
        grid-template-areas: "main right" "left right";
        gap: 24px;
    }
    .pv-right { align-self: stretch; }
    .pv-right .pv-sticky {
        position: sticky;
        top: 16px;
        max-height: calc(100vh - 32px);
        overflow-y: auto;
    }
    .pv-left .pv-left-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 18px; }
    .pv-left .pv-left-list > .pv-card { grid-row: span 3; }
}

/* বড় ডেস্কটপ (≥১২০০): বাঁ | মাঝে | ডানে */
@media (min-width: 1200px) {
    .pv-layout {
        grid-template-columns: 250px minmax(0, 1fr) 300px;
        grid-template-areas: "left main right";
        gap: 24px;
    }
    .pv-layout:not(:has(.pv-left)) {
        grid-template-columns: minmax(0, 1fr) 320px;
        grid-template-areas: "main right";
    }
    .pv-left { align-self: stretch; }
    .pv-left .pv-sticky {
        position: sticky;
        top: 16px;
        max-height: calc(100vh - 32px);
        overflow-y: auto;
    }
    .pv-left .pv-left-list { display: flex; flex-direction: column; gap: 2px; }
    .pv-left .pv-left-list > .pv-card { grid-row: auto; }
}
/* চওড়া স্ক্রিন (≥১৪০০): পাশের কলাম একটু চওড়া */
@media (min-width: 1400px) {
    .pv-layout { grid-template-columns: 270px minmax(0, 1fr) 320px; gap: 26px; }
    .pv-layout:not(:has(.pv-left)) { grid-template-columns: minmax(0, 1fr) 340px; }
}
/* সরু স্ক্রলবার (৪px) — Chrome/Edge/Safari: ::-webkit-scrollbar; Firefox: scrollbar-width
   (নতুন Chrome-এ scrollbar-width দিলে সরু স্টাইল উপেক্ষিত হয়, তাই সেটি শুধু Firefox-এ) */
.pv-sticky::-webkit-scrollbar { width: 4px; height: 4px; }
.pv-sticky::-webkit-scrollbar-track { background: transparent; }
.pv-sticky::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 4px; }
.pv-sticky::-webkit-scrollbar-thumb:hover { background: #9ca3af; }
@supports (-moz-appearance: none) {
    .pv-sticky { scrollbar-width: thin; scrollbar-color: #d1d5db transparent; }
    html.dark-mode .pv-sticky { scrollbar-color: #475569 transparent; }
}
html.dark-mode .pv-sticky::-webkit-scrollbar-thumb { background: #475569; }
html.dark-mode .pv-sticky::-webkit-scrollbar-thumb:hover { background: #64748b; }

/* ==========================================================================
   মূল সংবাদ
   ========================================================================== */
.pv-article {
    padding: 26px;
    background: var(--pv-card);
    border: 1px solid var(--pv-line);
    border-radius: var(--pv-radius);
    box-shadow: var(--pv-shadow);
    min-width: 0;
}
.pv-chip {
    display: inline-block;
    margin-bottom: 12px;
    padding: 3px 14px;
    background: var(--pv-red);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.7;
    border-radius: 20px;
}
.pv-page a.pv-chip:hover { background: #a80000; color: #fff; }
.pv-title {
    font-size: 34px;
    font-weight: 800;
    line-height: 1.42;
    color: var(--pv-text);
    margin-bottom: 18px;
    word-wrap: break-word;
}

.pv-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px 20px;
    padding: 12px 14px;
    background: var(--pv-soft);
    border-radius: 12px;
}
.pv-author { display: flex; align-items: center; gap: 11px; min-width: 0; }
.pv-avatar {
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--pv-red-soft);
    color: var(--pv-red);
    border-radius: 50%;
    font-size: 16px;
}
.pv-author-txt { display: flex; flex-direction: column; min-width: 0; line-height: 1.45; }
.pv-author-txt strong { font-size: 15.5px; color: var(--pv-text); }
.pv-page .pv-author:hover strong { color: var(--pv-red); }
.pv-author-txt small { font-size: 13px; color: var(--pv-muted); }
.pv-author-txt small i { margin-right: 3px; }
.pv-stats { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13.5px; color: var(--pv-muted); }
.pv-stats i { color: var(--pv-red); margin-right: 4px; }

.pv-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 14px 0 20px;
}
.pv-share { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.pv-share-label { font-size: 14px; font-weight: 700; color: var(--pv-text); margin-right: 2px; }
.pv-sbtn {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 50%;
    color: #fff;
    font-size: 15px;
    cursor: pointer;
    transition: transform .2s ease, opacity .2s ease;
}
.pv-page .pv-sbtn { color: #fff; }
.pv-sbtn:hover { transform: translateY(-2px); opacity: .92; }
.pv-fb { background: #1877f2; }
.pv-tw { background: #111827; }
.pv-wa { background: #25d366; }
.pv-tg { background: #229ed9; }
.pv-cp { background: #6b7280; }
.pv-tools { display: flex; flex-wrap: wrap; gap: 8px; }
.pv-tbtn {
    height: 36px;
    min-width: 38px;
    padding: 0 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: #fff;
    color: var(--pv-text);
    border: 1px solid var(--pv-line);
    border-radius: 18px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: background .2s ease, color .2s ease, border-color .2s ease;
}
.pv-page .pv-tbtn:hover { background: var(--pv-red); border-color: var(--pv-red); color: #fff; }
.pv-card-btn i { font-size: 13px; }

.pv-figure {
    margin: 0 0 22px;
    border-radius: var(--pv-radius);
    overflow: hidden;
    background: var(--pv-ph);
}
.pv-figure img { display: block; width: 100%; height: auto; }
.pv-video {
    position: relative;
    margin-bottom: 22px;
    padding-bottom: 56.25%;
    height: 0;
    border-radius: var(--pv-radius);
    overflow: hidden;
    background: #000;
}
.pv-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ---------- লেখা ---------- */
.pv-content {
    --pv-fs: 18px;
    font-size: var(--pv-fs);
    line-height: 1.85;
    color: var(--pv-body);
    word-wrap: break-word;
    overflow-wrap: anywhere;
}
.pv-page .pv-content { font-size: var(--pv-fs); }
.pv-content p { margin: 0 0 18px; text-align: justify; }
.pv-content img { max-width: 100%; height: auto !important; border-radius: 10px; margin: 14px 0; }
.pv-content iframe, .pv-content video { max-width: 100%; }
.pv-content table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; }
.pv-content td, .pv-content th { border: 1px solid var(--pv-line); padding: 8px 10px; }
.pv-content h2, .pv-content h3, .pv-content h4 { margin: 24px 0 12px; color: var(--pv-text); line-height: 1.45; }
.pv-content ul, .pv-content ol { margin: 0 0 18px; padding-left: 22px; }
.pv-content a { color: var(--pv-red); text-decoration: underline; text-underline-offset: 3px; }
.pv-page .pv-content blockquote {
    position: relative;
    margin: 22px 0;
    padding: 18px 20px 18px 54px;
    background: var(--pv-soft);
    border: 0;
    border-radius: 12px;
    font-style: normal;
    color: var(--pv-text);
}
.pv-page .pv-content blockquote::before {
    content: "\201C";
    position: absolute;
    left: 16px;
    top: 4px;
    font-size: 48px;
    line-height: 1;
    color: var(--pv-red);
    font-family: Georgia, serif;
}

/* ---------- ট্যাগ / শেষের শেয়ার / আগের-পরের ---------- */
.pv-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 24px; }
.pv-tags-label { font-size: 14.5px; font-weight: 700; color: var(--pv-text); margin-right: 2px; }
.pv-tags-label i { color: var(--pv-red); }
.pv-tag {
    padding: 5px 14px;
    background: var(--pv-soft);
    color: var(--pv-text);
    border: 1px solid var(--pv-line);
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    transition: background .2s ease, color .2s ease;
}
.pv-page .pv-tag:hover { background: var(--pv-red); border-color: var(--pv-red); color: #fff; }

.pv-endshare {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px 16px;
    margin-top: 22px;
    padding: 14px 16px;
    background: var(--pv-soft);
    border-radius: 12px;
    font-size: 15px;
    font-weight: 700;
    color: var(--pv-text);
}

.pv-prevnext { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 18px; }
.pv-pn-one { grid-template-columns: minmax(0, 1fr); }
.pv-pn {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 14px 16px;
    background: #fff;
    border: 1px solid var(--pv-line);
    border-radius: 12px;
    min-width: 0;
    transition: border-color .2s ease, box-shadow .2s ease;
}
.pv-pn:hover { border-color: var(--pv-red); box-shadow: 0 6px 18px rgba(204, 0, 0, .08); }
.pv-pn small { font-size: 13px; font-weight: 700; color: var(--pv-red); }
.pv-pn span {
    font-size: 15.5px;
    font-weight: 700;
    line-height: 1.5;
    color: var(--pv-text);
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}
.pv-pn-next { text-align: right; }

/* ==========================================================================
   পাশের কলামের বক্স, কার্ড, সারি
   ========================================================================== */
.pv-box {
    padding: 14px;
    background: var(--pv-card);
    border: 1px solid var(--pv-line);
    border-radius: var(--pv-radius);
    box-shadow: var(--pv-shadow);
    min-width: 0;
}
.pv-box-title {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 12px;
    padding: 8px 12px;
    background: var(--pv-soft);
    border-radius: 10px;
    font-size: 18px;
    font-weight: 800;
    line-height: 1.45;
    color: var(--pv-text);
}
.pv-dot { flex: 0 0 10px; width: 10px; height: 10px; border-radius: 3px; background: var(--pv-red); }
.pv-box-more {
    display: block;
    margin-top: 10px;
    padding: 9px 12px;
    text-align: center;
    background: var(--pv-soft);
    color: var(--pv-red);
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    transition: background .2s ease, color .2s ease;
}
.pv-page .pv-box-more:hover { background: var(--pv-red); color: #fff; }

.pv-thumb { position: absolute; inset: 0; display: block; overflow: hidden; background: var(--pv-ph); }
.pv-thumb::before {
    content: "\f1ea";
    font-family: "Font Awesome 6 Free", "Font Awesome 5 Free", sans-serif;
    font-weight: 900;
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: rgba(107, 114, 128, .28);
}
.pv-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s ease; }
.pv-media:hover img, .pv-row:hover .pv-row-img img { transform: scale(1.05); }

.pv-time { display: inline-block; font-size: 12.5px; color: var(--pv-muted); line-height: 1.5; }
.pv-time i { margin-right: 3px; font-size: 11px; }

.pv-card { display: flex; flex-direction: column; min-width: 0; }
.pv-media { position: relative; display: block; aspect-ratio: 16 / 10; border-radius: 10px; overflow: hidden; background: var(--pv-ph); margin-bottom: 9px; }
.pv-card-title { font-size: 16px; font-weight: 700; line-height: 1.5; color: var(--pv-text); margin-bottom: 4px; }
.pv-card-title a, .pv-row-title a, .pv-rank-txt a {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
}
.pv-page .pv-card-title a:hover, .pv-page .pv-row-title a:hover, .pv-page .pv-rank-txt a:hover { color: var(--pv-red); }
.pv-left .pv-card { padding: 4px 4px 10px; }

.pv-row {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    padding: 9px 6px;
    border-radius: 10px;
    min-width: 0;
    transition: background .2s ease;
}
.pv-row:hover { background: var(--pv-soft); }
.pv-row-text { flex: 1 1 auto; min-width: 0; }
.pv-row-title { font-size: 14.5px; font-weight: 700; line-height: 1.5; color: var(--pv-text); margin-bottom: 2px; }
.pv-row-img {
    position: relative;
    display: block;
    flex: 0 0 84px;
    width: 84px;
    height: 58px;
    border-radius: 8px;
    overflow: hidden;
    background: var(--pv-ph);
}

/* ট্যাব */
.pv-tabs { padding: 0; overflow: hidden; }
.pv-tab-head { display: flex; gap: 6px; padding: 8px; background: var(--pv-soft); }
.pv-tab-btn {
    flex: 1 1 0;
    padding: 9px 10px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--pv-muted);
    font-size: 16px;
    font-weight: 800;
    cursor: pointer;
    transition: background .2s ease, color .2s ease;
}
.pv-tab-btn:hover { color: var(--pv-text); }
.pv-tab-btn.is-active { background: var(--pv-red); color: #fff; }
.pv-tab-pane { display: none; padding: 6px 8px 10px; }
.pv-tab-pane.is-active { display: block; }

.pv-rank { list-style: none; display: flex; flex-direction: column; gap: 2px; }
.pv-rank li { display: flex; align-items: flex-start; gap: 12px; padding: 9px 8px; border-radius: 10px; transition: background .2s ease; }
.pv-rank li:hover { background: var(--pv-soft); }
.pv-rank-no {
    flex: 0 0 30px;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--pv-red-soft);
    color: var(--pv-red);
    border-radius: 8px;
    font-size: 15px;
    font-weight: 800;
    line-height: 1;
}
.pv-rank-txt { flex: 1 1 auto; min-width: 0; font-size: 14.5px; font-weight: 700; line-height: 1.5; color: var(--pv-text); }

/* মূল খবরের নিচে "আরও খবর" */
.pv-more {
    margin-top: 22px;
    padding: 16px;
    background: var(--pv-card);
    border: 1px solid var(--pv-line);
    border-radius: var(--pv-radius);
    box-shadow: var(--pv-shadow);
}
.pv-grid { display: grid; gap: 20px 16px; }
.pv-gn3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pv-gn2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pv-gn1 { grid-template-columns: minmax(0, 1fr); }

/* টোস্ট বার্তা */
.pv-toast {
    position: fixed;
    left: 50%;
    bottom: 24px;
    z-index: 10000;
    transform: translate(-50%, 20px);
    opacity: 0;
    visibility: hidden;
    padding: 11px 20px;
    background: #111827;
    color: #fff;
    border-radius: 30px;
    font-size: 14.5px;
    font-weight: 600;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .2);
    transition: opacity .25s ease, transform .25s ease, visibility .25s;
    max-width: calc(100% - 32px);
    text-align: center;
}
.pv-toast i { color: #4ade80; margin-right: 6px; }
.pv-toast.show { opacity: 1; visibility: visible; transform: translate(-50%, 0); }

/* ==========================================================================
   ডার্ক মোড
   ========================================================================== */
html.dark-mode .pv-page {
    --pv-text: #f1f5f9;
    --pv-body: #e2e8f0;
    --pv-muted: #94a3b8;
    --pv-line: #334155;
    --pv-card: #1e293b;
    --pv-soft: #172033;
    --pv-ph: #1e293b;
    --pv-red-soft: rgba(204, 0, 0, .22);
    --pv-shadow: none;
}
html.dark-mode .pv-page a { color: inherit; }
html.dark-mode .pv-page .pv-chip,
html.dark-mode .pv-page .pv-sbtn { color: #fff; }
html.dark-mode .pv-page .pv-tbtn,
html.dark-mode .pv-page .pv-pn { background: #1e293b; }
html.dark-mode .pv-page .pv-content a,
html.dark-mode .pv-page .pv-pn small,
html.dark-mode .pv-page .pv-box-more,
html.dark-mode .pv-page .pv-rank-no { color: #fca5a5; }
html.dark-mode .pv-page .pv-box-more:hover { color: #fff; }
html.dark-mode .pv-page .pv-tab-btn.is-active { color: #fff; }
html.dark-mode .pv-page .pv-thumb::before { color: rgba(148, 163, 184, .3); }

/* ==========================================================================
   রেসপনসিভ
   ========================================================================== */
@media (max-width: 1199px) {
    .pv-title { font-size: 30px; }
}
@media (max-width: 767px) {
    .pv-page { padding-top: 14px; }
    .pv-article { padding: 16px; }
    .pv-title { font-size: 25px; margin-bottom: 14px; }
    .pv-meta { padding: 10px 12px; }
    .pv-toolbar { margin: 12px 0 16px; }
    .pv-content { --pv-fs: 17px; }
    .pv-gn3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    /* মোট সংখ্যা বিজোড় হলে প্রথমটি পূর্ণ প্রস্থে — শেষ সারিতে ফাঁকা থাকবে না */
    .pv-gn3 .pv-card:first-child:nth-last-child(odd) { grid-column: 1 / -1; }
    .pv-gn3 .pv-card:first-child:nth-last-child(odd) .pv-card-title { font-size: 18px; }
    .pv-card-title { font-size: 15px; }
    .pv-more { padding: 14px; }
}
@media (max-width: 520px) {
    .pv-breadcrumb { font-size: 13px; padding: 8px 12px; }
    .pv-title { font-size: 22px; }
    .pv-meta { flex-direction: column; align-items: flex-start; }
    .pv-toolbar { flex-direction: column; align-items: flex-start; }
    .pv-sbtn { width: 34px; height: 34px; font-size: 14px; }
    .pv-tbtn { height: 34px; }
    .pv-prevnext { grid-template-columns: minmax(0, 1fr); }
    .pv-pn-next { text-align: left; }
    .pv-endshare { flex-direction: column; align-items: flex-start; }
    .pv-content p { text-align: left; }
}

/* ==========================================================================
   প্রিন্ট — শুধু মূল খবর
   ========================================================================== */
@media print {
    .site-header, .site-footer, .pv-left, .pv-right, .pv-more, .pv-toolbar,
    .pv-endshare, .pv-prevnext, .pv-progress, .pv-toast, .pv-breadcrumb, .dynamic-ad-box { display: none !important; }
    .pv-layout { display: block; }
    .pv-article { border: 0; box-shadow: none; padding: 0; }
    .pv-content { --pv-fs: 13pt; color: #000; }
}
