/* =========================================================================
   RODH-IT News — ১০টি হোমপেজ লেআউট, ই-পেপার ও ফটো কার্ড
   style.css-এর পরে লোড হয়।
   ========================================================================= */

/* ---------- ০. সাধারণ ঠিকঠাক (bug fixes) ---------- */
html, body { max-width: 100%; overflow-x: hidden; }
img, video, iframe, table, pre { max-width: 100%; }
.wrap, .wrap-narrow { width: 100%; }
.skip-link:focus {
	position: fixed; top: 10px; left: 10px; z-index: 999; width: auto; height: auto;
	clip: auto; background: var(--red); color: #fff; padding: 10px 16px; border-radius: 6px;
}
.prose table { display: block; overflow-x: auto; }
.card-body { min-width: 0; }
.rdt-tip {
	margin: 18px 0; padding: 14px 16px; border: 1px dashed var(--line);
	border-radius: var(--radius); background: var(--soft); color: var(--muted); font-size: 14.5px;
}

/* ফটো-কার্ড বোতাম (মেটা সারিতে) */
.photocard-btn {
	display: inline-flex; align-items: center; gap: 5px; border: 1px solid var(--line);
	background: transparent; color: var(--muted); font-size: 12.5px; font-weight: 600;
	padding: 3px 9px; border-radius: 100px; transition: .18s; line-height: 1.6;
}
.photocard-btn:hover { color: var(--red); border-color: var(--red); background: var(--red-soft); }
.no-photocard .photocard-btn { display: none; }

/* ---------- ১. লিড কার্ড ---------- */
.lead-card .thumb { aspect-ratio: 16 / 9; }
.lead-card .lead-body { padding-top: 14px; }
.lead-card .h-lead { margin-top: 6px; }

/* ---------- ২. ম্যাগাজিন গ্রিড (লেআউট ২) ---------- */
.mag-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 26px; }
.mag-lead { grid-column: span 4; }
.mag-lead .thumb { aspect-ratio: 21 / 9; }
.mag-cell { min-width: 0; }
@media (min-width: 981px) {
	.mag-grid { grid-template-columns: repeat(4, 1fr); }
	.mag-lead { grid-column: span 2; grid-row: span 2; }
	.mag-lead .thumb { aspect-ratio: 4 / 3; }
	.mag-cell { grid-column: span 2; }
	.mag-cell .card { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 16px; align-items: start; }
	.mag-cell .card .thumb { aspect-ratio: 4 / 3; }
	.mag-cell .card h3 { margin-top: 0; }
}

/* ---------- ৩. কভার স্টোরি (লেআউট ৩) ---------- */
.cover-hero { position: relative; min-height: 460px; display: flex; align-items: flex-end; overflow: hidden; }
.cover-img { position: absolute; inset: 0; }
.cover-img img { width: 100%; height: 100%; object-fit: cover; }
.cover-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(8,11,14,.15) 0%, rgba(8,11,14,.55) 55%, rgba(8,11,14,.92) 100%); }
.cover-text { position: relative; padding-top: 70px; padding-bottom: 46px; color: #fff; max-width: 900px; }
.cover-text .tag { position: static; display: inline-block; margin-bottom: 14px; }
.h-cover { font-family: var(--display); font-size: clamp(26px, 4.4vw, 50px); line-height: 1.28; font-weight: 700; margin: 0 0 14px; color: #fff; }
.h-cover a { color: #fff; }
.h-cover a:hover { color: #fff; text-decoration: underline; text-underline-offset: 6px; }
.cover-text p { color: rgba(255,255,255,.86); font-size: 17px; margin: 0 0 12px; max-width: 700px; }
.cover-text .meta { color: rgba(255,255,255,.72); }
.cover-under { padding-top: 34px; }

/* ---------- ৪. তালিকা প্রধান (লেআউট ৪) ---------- */
.wall { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, 1fr); gap: 34px; }
.wall-col { border-left: 1px solid var(--line); padding-left: 24px; }
.head-list { list-style: none; margin: 0; padding: 0; }
.head-list li { padding: 12px 0; border-bottom: 1px dashed var(--line); }
.head-list li:last-child { border-bottom: 0; }
.head-list .h-4 { font-size: 16.5px; }
.head-list.numbered li { display: flex; gap: 12px; }
.head-list .n { font-family: var(--display); font-size: 20px; font-weight: 700; color: var(--red); opacity: .45; line-height: 1.4; }
.home-4 .lead-card .thumb { aspect-ratio: 16 / 10; }

/* ---------- ৫. কার্ড ডেক (লেআউট ৫) ---------- */
.deck .card {
	background: var(--surface); border: 1px solid var(--line); border-radius: calc(var(--radius) + 6px);
	padding: 14px; transition: transform .25s ease, box-shadow .25s ease;
}
.deck .card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.deck .card .thumb { border-radius: var(--radius); }
.deck .card .card-body { padding: 6px 4px 2px; }
.deck .deck-lead { margin-bottom: 26px; }
.deck .deck-lead .card { padding: 16px; }
.deck .deck-lead .thumb { aspect-ratio: 21 / 9; }
@media (min-width: 981px) {
	.deck .deck-lead .card { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 26px; align-items: center; }
	.deck .deck-lead .thumb { aspect-ratio: 4 / 3; height: 100%; }
}

/* ---------- ৬. স্প্লিট স্ক্রিন (লেআউট ৬) ---------- */
.split-home { padding: 30px 0 10px; }
.split-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 40px; align-items: start; }
.split-left { position: sticky; top: 76px; }
.split-right .feed { display: grid; gap: 18px; }
.split-right .card-side { padding-bottom: 18px; border-bottom: 1px solid var(--line-soft); }
.split-right .card-side:last-child { border-bottom: 0; }
.feed-more { width: 100%; margin-top: 18px; }

/* ---------- ৭. মিনিমাল (লেআউট ৭) ---------- */
.minimal .min-lead { padding-bottom: 26px; border-bottom: 3px solid var(--ink); margin-bottom: 8px; }
.minimal .min-lead .h-lead { font-size: clamp(26px, 3.6vw, 42px); margin: 6px 0 12px; }
.minimal .min-list { list-style: none; margin: 0; padding: 0; }
.minimal .min-list li { padding: 22px 0; border-bottom: 1px solid var(--line); }
.minimal .min-list li:last-child { border-bottom: 0; }
.minimal .min-meta { font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.minimal .min-list .h-3 { font-size: 21px; display: block; margin: 0; }
.minimal .min-list .excerpt { font-size: 15px; color: var(--muted); margin-top: 6px; }
.minimal .section { border-bottom: 0; }

/* ---------- ৮. মোজাইক (লেআউট ৮) ---------- */
.mosaic { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 190px; gap: 14px; }
.tile { position: relative; overflow: hidden; border-radius: var(--radius); display: block; background: var(--soft); }
.tile img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.2,.7,.3,1); }
.tile:hover img { transform: scale(1.06); }
.tile-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(8,11,14,0) 35%, rgba(8,11,14,.88) 100%); }
.tile-text { position: absolute; inset: auto 0 0 0; padding: 16px; color: #fff; display: block; }
.tile-cat { display: inline-block; font-size: 12px; font-weight: 600; background: var(--red); color: #fff; padding: 2px 9px; border-radius: 3px; margin-bottom: 8px; }
.tile-title { display: block; font-family: var(--display); font-weight: 700; font-size: 16px; line-height: 1.45; }
.tile time { display: block; font-size: 12px; opacity: .75; margin-top: 6px; }
.m-big { grid-column: span 2; grid-row: span 2; }
.m-big .tile-title { font-size: 26px; }
.m-mid { grid-column: span 2; }
.m-mid .tile-title { font-size: 19px; }

/* ---------- ৯. ভিডিও স্ট্রিপ (লেআউট ৯) ---------- */
.video-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.video-strip .video-card.big { grid-column: span 2; grid-row: span 2; }
.video-strip .video-card.big .thumb { aspect-ratio: 16 / 10; }
.video-hero-sec { padding-top: 26px; }

/* ---------- ১০. ক্যাটাগরি সেকশন ---------- */
.cat-split { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 32px; align-items: start; }
.cat-rest { margin: 0; }

/* =========================================================================
   ই-পেপার
   ========================================================================= */
.rdt-epaper-sec .epaper-feature {
	display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: 34px; align-items: start;
	background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px;
}
.rdt-epaper-sec.compact .epaper-feature { grid-template-columns: minmax(0, 210px) minmax(0, 1fr); gap: 24px; padding: 16px; }
.ep-cover { position: relative; display: block; border-radius: var(--radius-sm); overflow: hidden; box-shadow: var(--shadow); background: var(--soft); }
.ep-cover img { width: 100%; height: auto; aspect-ratio: 3 / 4; object-fit: cover; transition: transform .5s ease; }
.ep-cover:hover img { transform: scale(1.03); }
.ep-badge { position: absolute; top: 12px; left: 12px; background: var(--red); color: #fff; font-size: 12px; font-weight: 600; padding: 4px 11px; border-radius: 3px; }
.ep-info .h-2 { margin-top: 4px; }
.ep-btns { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.ep-more { display: flex; gap: 14px; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line-soft); flex-wrap: wrap; }
.ep-more a { width: 86px; text-align: center; font-size: 12px; color: var(--muted); }
.ep-more img { width: 86px; height: 112px; object-fit: cover; border: 1px solid var(--line); border-radius: 4px; margin-bottom: 6px; }
.ep-more a:hover { color: var(--red); }
.ep-more a:hover img { border-color: var(--red); }

/* সংখ্যার তালিকা */
.ep-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 20px; }
.ep-grid.big { grid-template-columns: repeat(5, 1fr); gap: 26px; margin-bottom: 26px; }
.ep-item { display: block; text-align: center; }
.ep-item-img { display: block; border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; background: var(--soft); transition: .22s; }
.ep-item img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; }
.ep-item:hover .ep-item-img { border-color: var(--red); box-shadow: var(--shadow); transform: translateY(-3px); }
.ep-item b { display: block; font-family: var(--display); font-size: 15px; color: var(--ink); margin-top: 10px; line-height: 1.5; }
.ep-item time { display: block; font-size: 12.5px; color: var(--muted); margin-top: 3px; }

/* পাঠক */
.ep-reader { padding: 10px 0 40px; background: var(--bg); }
.ep-reader:fullscreen { overflow: auto; padding: 20px; }
.ep-bar { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.ep-title { font-family: var(--display); font-size: clamp(22px, 3vw, 32px); color: var(--ink); margin: 0 0 6px; }
.ep-bar-right { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ep-modes { display: inline-flex; border: 1px solid var(--line); border-radius: 100px; overflow: hidden; }
.ep-modes button { border: 0; background: transparent; padding: 9px 18px; font-weight: 600; font-size: 14px; color: var(--muted); }
.ep-modes button.on { background: var(--red); color: #fff; }
.ep-view { background: var(--soft); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.ep-stage { position: relative; display: flex; align-items: center; }
.ep-canvas { flex: 1; overflow: auto; max-height: 82vh; text-align: center; padding: 14px; }
.ep-canvas img { display: inline-block; width: 100%; max-width: 940px; height: auto; background: #fff; box-shadow: var(--shadow); border-radius: 3px; }
.ep-nav {
	position: absolute; top: 50%; transform: translateY(-50%); z-index: 3; width: 44px; height: 44px; border-radius: 50%;
	border: 1px solid var(--line); background: var(--surface); color: var(--ink); display: grid; place-items: center; box-shadow: var(--shadow-sm);
}
.ep-nav:hover { background: var(--red); border-color: var(--red); color: #fff; }
.ep-nav.prev { left: 10px; }
.ep-nav.next { right: 10px; }
.ep-tools {
	display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: center;
	padding: 12px 14px; border-top: 1px solid var(--line); background: var(--surface); font-size: 14px; color: var(--muted);
}
.ep-tools button { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); background: var(--bg); color: var(--ink); font-size: 18px; line-height: 1; }
.ep-tools button:hover { border-color: var(--red); color: var(--red); }
.ep-pageno b { color: var(--ink); }
.ep-dl { font-weight: 600; color: var(--green); }
.ep-dl:hover { color: var(--red); }
.ep-thumbs { display: flex; gap: 10px; overflow-x: auto; padding: 12px 14px; background: var(--surface); border-top: 1px solid var(--line); scrollbar-width: thin; }
.ep-thumbs button { border: 1px solid var(--line); background: var(--bg); border-radius: 4px; padding: 0; flex: none; width: 66px; position: relative; overflow: hidden; }
.ep-thumbs button.on { border-color: var(--red); box-shadow: 0 0 0 2px var(--red-soft); }
.ep-thumbs img { width: 100%; height: 86px; object-fit: cover; display: block; }
.ep-thumbs span { display: block; font-size: 11.5px; color: var(--muted); padding: 3px 0; }
.ep-pdf object, .ep-pdf iframe { width: 100%; height: 84vh; border: 0; display: block; background: var(--soft); }
.ep-pdf-fallback { padding: 40px 20px; text-align: center; color: var(--muted); }
.ep-note { padding: 22px 4px 0; }
.ep-reader .share-row { margin-top: 22px; }

/* =========================================================================
   ফটো কার্ড মোডাল
   ========================================================================= */
.pc-modal { position: fixed; inset: 0; z-index: 240; background: rgba(8,11,14,.86); display: none; place-items: center; padding: 18px; }
.pc-modal.open { display: grid; }
.pc-box { background: var(--surface); border-radius: calc(var(--radius) + 6px); width: min(460px, 100%); max-height: 92vh; overflow: auto; padding: 18px; }
.pc-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.pc-head b { font-family: var(--display); font-size: 18px; color: var(--ink); }
.pc-x { border: 0; background: transparent; font-size: 26px; line-height: 1; color: var(--muted); }
.pc-x:hover { color: var(--red); }
.pc-shapes { display: flex; gap: 8px; margin-bottom: 14px; }
.pc-shapes button { flex: 1; border: 1px solid var(--line); background: var(--bg); color: var(--text); padding: 8px 6px; border-radius: var(--radius-sm); font-size: 14px; font-weight: 600; }
.pc-shapes button.on { background: var(--red); border-color: var(--red); color: #fff; }
.pc-stage { background: var(--soft); border-radius: var(--radius-sm); padding: 12px; display: grid; place-items: center; }
.pc-stage canvas { max-width: 100%; max-height: 52vh; height: auto; border-radius: 4px; box-shadow: var(--shadow); }
.pc-actions { display: flex; gap: 8px; margin-top: 14px; }
.pc-actions .btn { flex: 1; padding: 10px 8px; font-size: 14px; }
.pc-socials { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.pc-socials a { flex: 1; text-align: center; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 8px 4px; font-size: 13px; font-weight: 600; color: var(--text); min-width: 88px; }
.pc-socials a:hover { border-color: var(--red); color: var(--red); }
.pc-toast { position: fixed; bottom: 22px; left: 50%; transform: translate(-50%, 20px); background: var(--ink); color: #fff; padding: 11px 18px; border-radius: 100px; font-size: 14px; z-index: 260; opacity: 0; transition: .25s; }
.pc-toast.in { opacity: 1; transform: translate(-50%, 0); }

/* হেডারের ই-পেপার লিংক */
.nav-epaper { display: inline-flex; align-items: center; gap: 6px; font-size: 14.5px; font-weight: 600; color: var(--red) !important; }
.nav-epaper:hover { color: var(--red-dark) !important; }
.btn-ep { gap: 7px; }
.topbar-ep { color: #fff; font-weight: 600; }
.drawer-links { display: flex; flex-wrap: wrap; gap: 8px; padding: 16px; border-top: 1px solid var(--line); }
.drawer-links a { border: 1px solid var(--line); border-radius: 100px; padding: 7px 14px; font-size: 14px; color: var(--text); }
.drawer-links a:hover { border-color: var(--red); color: var(--red); }
.foot-widgets { padding: 24px 0 8px; border-top: 1px solid rgba(255,255,255,.08); }

/* =========================================================================
   রেসপনসিভ — সব ডিভাইসে ঠিকঠাক
   ========================================================================= */
@media (max-width: 1100px) {
	.wall { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); }
	.wall-col:last-child { grid-column: 1 / -1; border-left: 0; padding-left: 0; border-top: 1px solid var(--line); padding-top: 18px; }
	.ep-grid { grid-template-columns: repeat(4, 1fr); }
	.ep-grid.big { grid-template-columns: repeat(4, 1fr); }
	.video-strip { grid-template-columns: repeat(3, 1fr); }
	.video-strip .video-card.big { grid-column: span 3; grid-row: auto; }
	.mosaic { grid-auto-rows: 170px; }
}

@media (max-width: 980px) {
	.mag-grid { grid-template-columns: repeat(2, 1fr); gap: 22px; }
	.mag-lead { grid-column: span 2; }
	.split-grid { grid-template-columns: 1fr; gap: 28px; }
	.split-left { position: static; }
	.cat-split { grid-template-columns: 1fr; gap: 22px; }
	.rdt-epaper-sec .epaper-feature,
	.rdt-epaper-sec.compact .epaper-feature { grid-template-columns: minmax(0, 200px) minmax(0, 1fr); gap: 20px; }
	.cover-hero { min-height: 380px; }
	.cover-text { padding-top: 60px; padding-bottom: 34px; }
	.ep-canvas { max-height: 70vh; }
	.ep-pdf object, .ep-pdf iframe { height: 72vh; }
}

@media (max-width: 760px) {
	.wall { grid-template-columns: 1fr; gap: 24px; }
	.wall-col { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); padding-top: 18px; }
	.mosaic { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 150px; gap: 10px; }
	.m-big { grid-column: span 2; grid-row: span 2; }
	.m-mid { grid-column: span 1; }
	.m-big .tile-title { font-size: 19px; }
	.m-mid .tile-title, .m-small .tile-title { font-size: 15px; }
	.video-strip { grid-template-columns: repeat(2, 1fr); }
	.video-strip .video-card.big { grid-column: span 2; }
	.ep-grid, .ep-grid.big { grid-template-columns: repeat(3, 1fr); gap: 14px; }
	.deck .deck-lead .card { padding: 12px; }
	.minimal .min-list .h-3 { font-size: 18.5px; }
}

@media (max-width: 600px) {
	.mag-grid { grid-template-columns: 1fr; }
	.mag-lead { grid-column: span 1; }
	.cover-hero { min-height: 320px; }
	.cover-text p { font-size: 15.5px; }
	.rdt-epaper-sec .epaper-feature,
	.rdt-epaper-sec.compact .epaper-feature { grid-template-columns: 1fr; padding: 14px; }
	.ep-cover { max-width: 260px; margin: 0 auto; }
	.ep-more a, .ep-more img { width: 72px; }
	.ep-more img { height: 94px; }
	.ep-grid, .ep-grid.big { grid-template-columns: repeat(2, 1fr); }
	.ep-bar { flex-direction: column; align-items: stretch; }
	.ep-bar-right { justify-content: space-between; }
	.ep-nav { width: 36px; height: 36px; }
	.ep-nav.prev { left: 4px; }
	.ep-nav.next { right: 4px; }
	.ep-canvas { padding: 8px; max-height: 64vh; }
	.ep-thumbs button { width: 54px; }
	.ep-thumbs img { height: 70px; }
	.ep-pdf object, .ep-pdf iframe { height: 64vh; }
	.head-list .h-4 { font-size: 15.5px; }
	.pc-actions { flex-wrap: wrap; }
	.pc-actions .btn { min-width: 46%; }
	.photocard-btn span { display: none; }
	.photocard-btn { padding: 4px 7px; }
	.video-strip { grid-template-columns: 1fr; }
	.video-strip .video-card.big { grid-column: span 1; }
	.mosaic { grid-auto-rows: 132px; }
}

@media (max-width: 380px) {
	.mosaic { grid-template-columns: 1fr; grid-auto-rows: 180px; }
	.m-big, .m-mid { grid-column: span 1; grid-row: span 1; }
	.ep-grid, .ep-grid.big { grid-template-columns: 1fr 1fr; }
}

/* ---------- ডার্ক মোডে ছোট সমন্বয় ---------- */
[data-theme="dark"] .ep-canvas img,
[data-theme="dark"] .ep-thumbs img { filter: brightness(.92); }
[data-theme="dark"] .cover-shade { background: linear-gradient(180deg, rgba(4,6,8,.2) 0%, rgba(4,6,8,.65) 55%, rgba(4,6,8,.95) 100%); }
[data-theme="dark"] .deck .card { background: var(--surface); }

@media print {
	.photocard-btn, .pc-modal, .rdt-fab, .rdt-panel, .ep-thumbs, .ep-tools, .ep-nav { display: none !important; }
}
