/* Tab features (one big post per tab), tab slide and scroll motion. */
.tab-feature { margin: 0 0 18px; }
.tab-feature[hidden] { display: none; }
.tab-feature .card.big {
  display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  max-width: none; min-height: 0; overflow: hidden;
}
.tab-feature .card.big .thumb { aspect-ratio: 16 / 10; height: 100%; min-height: 220px; }
.tab-feature .card.big .thumb img { width: 100%; height: 100%; object-fit: cover; }
.tab-feature .card.big .card-body {
  padding: 22px 24px; display: flex; flex-direction: column; justify-content: center;
}
.tab-feature .card.big h3 { font-size: clamp(1.2rem, 2.3vw, 1.8rem); line-height: 1.25; }
.tab-feature .card.big p { font-size: 1.02rem; line-height: 1.6; }
.tab-feature .card.big:hover { transform: translateY(-3px); }
@media (max-width: 700px) {
  .tab-feature .card.big { grid-template-columns: 1fr; }
  .tab-feature .card.big .thumb { min-height: 0; }
  .tab-feature .card.big .card-body { padding: 16px 16px 20px; }
}

/* Tab change: slide in from the side */
.tab-panel.tp-in { animation: tpSlide .45s cubic-bezier(.2, .7, .2, 1); }
.tab-feature.tp-in { animation: tpSlide .45s cubic-bezier(.2, .7, .2, 1); }
@keyframes tpSlide { from { opacity: 0; transform: translateX(28px); } to { opacity: 1; transform: none; } }
[dir="rtl"] .tab-panel.tp-in, [dir="rtl"] .tab-feature.tp-in { animation-name: tpSlideRtl; }
@keyframes tpSlideRtl { from { opacity: 0; transform: translateX(-28px); } to { opacity: 1; transform: none; } }

/* Scroll motion (enabled by motion.js, so content stays visible without JS) */
.js-motion .cat-row,
.js-motion .cat-banner,
.js-motion .tab-feature,
.js-motion .sub-tabs {
  transition: opacity .6s ease, transform .6s cubic-bezier(.2, .7, .2, 1);
}
.js-motion .cat-row:not(.in),
.js-motion .cat-banner:not(.in),
.js-motion .tab-feature:not(.in) { opacity: 0; transform: translateY(22px); }
.js-motion .sub-tabs:not(.in) { opacity: 0; transform: translateX(-16px); }
.js-motion .sub-tabs.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js-motion *, .tab-panel.tp-in, .tab-feature.tp-in { animation: none !important; transition: none !important; }
  .js-motion .cat-row, .js-motion .cat-banner, .js-motion .tab-feature, .js-motion .sub-tabs { opacity: 1 !important; transform: none !important; }
}

/* Designed thumbnail (used when a post has no safe photo): headline on the category colour */
.ph { position: relative; display: flex; flex-direction: column; justify-content: flex-end; align-items: flex-start;
  padding: 14px 16px; text-align: start; overflow: hidden; }
.ph::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,0) 35%, rgba(0,0,0,.45)); pointer-events: none; }
.ph-ic { position: absolute; top: 12px; inset-inline-start: 14px; font-size: 1.5rem; z-index: 1; }
.ph-title { position: relative; z-index: 1; font-weight: 800; font-size: clamp(.95rem, 1.5vw, 1.2rem); line-height: 1.25;
  color: #fff; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden;
  text-shadow: 0 2px 10px rgba(0, 0, 0, .45); }
.rthumb .ph { padding: 6px; }
.rthumb .ph-title { font-size: .62rem; -webkit-line-clamp: 3; }
.rthumb .ph-ic, .fi-thumb .ph-ic { font-size: .9rem; top: 4px; inset-inline-start: 5px; }
.fi-thumb .ph-title { font-size: .8rem; }

/* ---------- on-this-day: a plain scrollable list (the old auto-scrolling track could render empty) ---------- */
.otd-track { animation: none !important; height: auto !important; }
.otd-view { flex: 1 1 auto !important; height: auto !important; min-height: 0 !important; max-height: 390px; overflow-y: auto !important; mask-image: none !important; margin-top: 8px; }
.otd-view .otd-slide { height: auto !important; min-height: 74px; display: flex !important; align-items: center; opacity: 1 !important; animation: none !important; }
.top-pair > .otd-band { height: 450px !important; max-height: 450px !important; }
.top-pair.solo { grid-template-columns: minmax(0, 1fr) !important; }
.top-pair.solo > .otd-band { height: auto !important; max-height: none !important; }
.top-pair.solo .otd-view { max-height: 560px; }

/* ---------- home: notice shown when there is no news yet today ---------- */
.fresh-wait { margin: 18px 0 0; padding: 12px 16px; border-radius: 14px; background: var(--panel-2); color: var(--muted); text-align: center; font-weight: 600; }
/* Phone width: let the gold box text wrap instead of pushing the page sideways */
@media (max-width: 640px) {
  .gold-foot, .gold-foot span, .gold-intl, .gold-note { white-space: normal !important; overflow-wrap: anywhere; text-overflow: clip !important; overflow: visible !important; }
  .gold-row1 .gold-foot { flex-wrap: wrap !important; }
  body { overflow-x: clip; }
}
/* Bangladeshi newspapers: sliding strip (sidebar and home) and the category grid */
.np-slider { overflow: hidden; position: relative; margin: 6px 0 4px; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.np-track { display: flex; gap: 12px; width: max-content; padding: 6px 0; animation: npSlide 45s linear infinite; }
.np-slider:hover .np-track { animation-play-state: paused; }
@keyframes npSlide { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.np-slider .np-chip, .np-home .np-chip { display: inline-flex; align-items: center; gap: 8px; padding: 9px 18px 9px 9px; border-radius: 99px; background: var(--panel-2); border: 2px solid var(--accent-2); color: var(--text); font-size: 1.05rem; font-weight: 800; white-space: nowrap; text-decoration: none; }
.np-slider .np-chip:hover { border-color: var(--accent); background: var(--panel); }
.np-badge { width: 32px; height: 32px; border-radius: 50%; background: var(--grad); color: #fff; display: inline-grid; place-items: center; font-weight: 800; font-size: .95rem; flex-shrink: 0; }
.np-badge.big { width: 44px; height: 44px; font-size: 1.2rem; }
.np-logo { width: 32px; height: 32px; object-fit: contain; border-radius: 8px; background: #fff; padding: 2px; flex-shrink: 0; }
.np-logo.big { width: 52px; height: 52px; padding: 4px; border-radius: 12px; }
/* Full wordmark logos: white plate so black and coloured logos both read on the dark theme */
.np-slider .np-chip.has-wm { background: #fff; border-color: #fff; padding: 8px 14px; }
.np-slider .np-chip.has-wm:hover { border-color: var(--accent); }
.np-slider .np-wm { height: 40px; width: auto; max-width: 200px; object-fit: contain; display: block; }
.np-page .np-card { min-height: 130px; justify-content: center; align-items: stretch; background: #fff; border-color: #fff; }
.np-page .np-card.has-wm { padding: 12px; }
.np-page .np-card.has-wm:hover { border-color: var(--accent); }
.np-page .np-wm { height: 92px; width: 100%; object-fit: contain; display: block; }
.np-page .np-card:not(.has-wm) { align-items: center; color: #10162e; }
.np-page .np-card:not(.has-wm) strong { color: #10162e; }
/* Phone: two papers per row, smaller cards */
@media (max-width: 640px) {
  .np-page .np-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .np-page .np-card { min-height: 96px; padding: 10px; }
  .np-page .np-card.has-wm { padding: 8px; }
  .np-page .np-wm { height: 60px; }
}
.np-head { margin: 22px 0 10px; }
.np-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.np-card { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 16px; border-radius: 16px; background: var(--panel); border: 2px solid var(--accent-2); color: var(--text); text-decoration: none; }
.np-page .np-card strong { font-size: 1.2rem; font-weight: 800; line-height: 1.25; }
.np-card:hover { border-color: var(--accent); }
.np-card small { color: var(--muted); }
.np-home { margin: 18px 0; }
/* E-paper chips and cards: same look as the website ones, with an "ই-পেপার" label */
.np-tag { font-weight: 800; color: var(--accent); white-space: nowrap; font-size: .95rem; }
.np-slider .np-chip.np-ep { border-style: dashed; }
/* Category page: one ranked list; each paper is a box with a smaller logo and two icon links below */
.np-page .np-grid.np-all { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
.np-page .np-card { min-height: 0; padding: 12px; gap: 10px; align-items: stretch; justify-content: flex-start; background: #fff; border-color: #fff; color: #10162e; }
.np-page .np-plate { display: flex; align-items: center; justify-content: center; min-height: 62px; }
.np-page .np-plate strong { color: #10162e; font-size: 1.05rem; font-weight: 800; text-align: center; }
.np-page .np-plate .np-badge { margin-inline-end: 8px; }
.np-page .np-plate .np-logo.big { width: 40px; height: 40px; padding: 3px; margin-inline-end: 8px; }
.np-page .np-plate .np-badge.big { width: 36px; height: 36px; font-size: 1rem; }
.np-page .np-wm { height: 56px; width: 100%; object-fit: contain; display: block; }
.np-links { display: flex; flex-direction: column; gap: 6px; }
.np-link { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 10px; background: #eef1fb; color: #10162e; font-weight: 700; font-size: .9rem; text-decoration: none; }
.np-link:hover { background: #dfe5f7; }
.np-link svg { flex-shrink: 0; color: #3b4cca; }
.np-link-ep { background: #fff4e6; }
.np-link-ep svg { color: #b8650a; }
.np-link-ep:hover { background: #ffe8c7; }
@media (max-width: 640px) { .np-page .np-grid.np-all { grid-template-columns: 1fr 1fr; gap: 10px; } .np-page .np-wm { height: 40px; } .np-page .np-plate { min-height: 48px; } .np-link { font-size: .8rem; padding: 6px 7px; } }
@media (prefers-reduced-motion: reduce) { .np-track { animation: none; } }
