/* Ulipur News — public site */
:root {
  --brand: #b91c1c;
  --brand-dark: #7f1d1d;
  --ink: #1c1917;
  --muted: #6b6560;
  --line: #e7e2dc;
  --bg: #f7f5f2;
  --card: #ffffff;
  --radius: 10px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: 'Noto Sans Bengali', system-ui, sans-serif;
  font-size: 17px; line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
a:hover .t, a.t:hover { color: var(--brand); }
img { max-width: 100%; display: block; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 16px; }

/* Top bar */
.topbar { background: var(--ink); color: #d6d3d1; font-size: 14px; }
.topbar .wrap { display: flex; justify-content: space-between; align-items: center; height: 36px; gap: 12px; }
.topbar a { color: #fff; font-weight: 600; }
.topbar a:hover { text-decoration: underline; }

/* Header */
.header { background: var(--card); border-bottom: 1px solid var(--line); }
.header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 18px; padding-bottom: 18px; }
.logo { display: flex; align-items: center; gap: 12px; }
.logo-mark { width: 54px; height: 54px; display: block; flex-shrink: 0; filter: drop-shadow(0 2px 4px rgba(127,29,29,.25)); }
.logo-text b { display: block; font-family: 'Inter', system-ui, sans-serif; font-size: 30px; font-weight: 800; line-height: 1; letter-spacing: -1px; }
.logo-text b span { color: var(--brand); }
.logo-text small { display: block; color: var(--muted); font-size: 13.5px; margin-top: 4px; padding-top: 3px; border-top: 2px solid var(--brand); }
.search { display: flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; background: var(--bg); }
.search input { border: 0; background: transparent; padding: 9px 16px; font: inherit; font-size: 15px; width: 220px; outline: none; }
.search button { border: 0; background: var(--brand); color: #fff; padding: 0 18px; font: inherit; font-size: 15px; cursor: pointer; }

/* Category nav */
.nav { background: var(--brand); position: sticky; top: 0; z-index: 20; box-shadow: 0 2px 6px rgba(0,0,0,.12); }
.nav .wrap { display: flex; overflow-x: auto; scrollbar-width: none; }
.nav .wrap::-webkit-scrollbar { display: none; }
.nav a { color: #fff; padding: 11px 14px; white-space: nowrap; font-weight: 500; font-size: 16px; }
.nav a:hover, .nav a.on { background: var(--brand-dark); }

/* Breaking ticker */
.ticker { background: var(--card); border-bottom: 1px solid var(--line); }
.ticker .wrap { display: flex; align-items: center; height: 42px; gap: 12px; overflow: hidden; }
.ticker-label { background: var(--brand); color: #fff; padding: 3px 12px; border-radius: 4px; font-weight: 700; font-size: 14px; white-space: nowrap; flex-shrink: 0; }
.ticker-track { overflow: hidden; flex: 1; mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); }
.ticker-move { display: inline-flex; gap: 48px; white-space: nowrap; animation: tick 40s linear infinite; padding-left: 100%; }
.ticker-move a { font-size: 15px; }
.ticker-move a::before { content: '●'; color: var(--brand); margin-right: 8px; font-size: 10px; vertical-align: middle; }
.ticker:hover .ticker-move { animation-play-state: paused; }
@keyframes tick { to { transform: translateX(-100%); } }

/* Layout */
main { padding: 24px 0 40px; }
.grid-main { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 28px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }

/* Thumbs */
.thumb { aspect-ratio: 16 / 9; border-radius: 8px; overflow: hidden; background: #eee; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb.ph {
  display: grid; place-items: center; color: #fff;
  background: linear-gradient(135deg, var(--c), color-mix(in srgb, var(--c) 55%, #000));
}
.thumb.ph span { font-weight: 700; font-size: 18px; opacity: .9; }

/* Lead section */
.lead { display: grid; grid-template-columns: 1.4fr 1fr; gap: 20px; margin-bottom: 28px; }
.lead-main .thumb { margin-bottom: 12px; }
.lead-main .thumb.ph span { font-size: 30px; }
.lead-main h1 { font-size: 30px; line-height: 1.3; margin: 0 0 8px; font-weight: 700; }
.lead-main p { color: var(--muted); margin: 0 0 6px; }
.lead-side { display: grid; gap: 14px; align-content: start; }
.lead-side a { display: grid; grid-template-columns: 120px 1fr; gap: 12px; align-items: start; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.lead-side a:last-child { border-bottom: 0; }
.lead-side h3 { font-size: 17px; line-height: 1.4; margin: 0; font-weight: 600; }

.meta { color: var(--muted); font-size: 13.5px; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.tag { display: inline-block; color: var(--c, var(--brand)); font-weight: 700; font-size: 13.5px; }

/* Sections */
.section { margin-bottom: 30px; }
.section-head { display: flex; justify-content: space-between; align-items: center; border-bottom: 2px solid var(--ink); margin-bottom: 16px; }
.section-head h2 { margin: 0; font-size: 21px; padding: 0 14px 4px 0; position: relative; }
.section-head h2::after { content: ''; position: absolute; left: 0; bottom: -2px; height: 2px; width: 100%; background: var(--c, var(--brand)); }
.section-head a { font-size: 14px; color: var(--brand); font-weight: 600; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 18px; }
.cards a h3 { font-size: 17px; line-height: 1.4; margin: 10px 0 4px; font-weight: 600; }

/* Ad slot in photo-card grids */
.ad-card { display: block; position: relative; }
.ad-lbl { position: absolute; top: 6px; right: 6px; z-index: 1; background: rgba(255,255,255,.92); color: var(--muted); font-size: 11.5px; font-weight: 600; border-radius: 4px; padding: 0 6px; }
.ad-img { background: var(--bg); border: 1px solid var(--line); }
.ad-img img { object-fit: contain; }
.ad-txt { display: grid; place-items: center; text-align: center; padding: 14px; color: #fff; background: linear-gradient(135deg, var(--c), color-mix(in srgb, var(--c) 60%, #000)); }
.ad-txt span { font-weight: 700; font-size: 19px; line-height: 1.35; }
.ad-card p { margin: 8px 0 0; color: var(--muted); font-size: 15px; line-height: 1.5; white-space: pre-line; }
.ad-empty .thumb { display: grid; place-items: center; border: 2px dashed var(--line); background: var(--card); color: var(--muted); font-size: 15px; font-weight: 600; text-align: center; padding: 12px; }

/* List view (category / search) */
.list a { display: grid; grid-template-columns: 220px 1fr; gap: 18px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.list h3 { font-size: 20px; margin: 0 0 6px; line-height: 1.35; }
.list p { margin: 0 0 6px; color: var(--muted); font-size: 15.5px; }
.page-title { font-size: 26px; margin: 0 0 4px; }
.empty { padding: 40px; text-align: center; color: var(--muted); }

/* Sidebar */
.side-box { padding: 16px; margin-bottom: 20px; }
.tabs { display: grid; grid-template-columns: 1fr 1fr; margin: -16px -16px 12px; border-bottom: 1px solid var(--line); }
.tabs button { border: 0; background: none; padding: 12px; font: inherit; font-weight: 600; cursor: pointer; color: var(--muted); border-bottom: 3px solid transparent; }
.tabs button.on { color: var(--brand); border-bottom-color: var(--brand); }
.rank a { display: grid; grid-template-columns: 34px 1fr; gap: 8px; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.rank a:last-child { border-bottom: 0; }
.rank .num { font-size: 26px; font-weight: 700; color: #d6d3d1; line-height: 1; }
.rank h4 { margin: 0; font-size: 15.5px; font-weight: 600; line-height: 1.4; }
.side-box h3 { margin: 0 0 12px; font-size: 18px; }
.cat-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.cat-chips a { border: 1px solid var(--line); border-radius: 999px; padding: 3px 12px; font-size: 14.5px; background: var(--bg); }
.cat-chips a:hover { border-color: var(--brand); color: var(--brand); }

/* Article */
.article { padding: 28px; }
.article h1 { font-size: 34px; line-height: 1.3; margin: 8px 0 12px; }
.article .summary { font-size: 19px; color: #44403c; border-left: 4px solid var(--brand); padding-left: 14px; margin: 16px 0; }
.article .thumb { margin: 18px 0; }
.article .thumb.ph span { font-size: 34px; }
.article .body p { margin: 0 0 16px; font-size: 18.5px; line-height: 1.8; }
.photo { margin: 18px 0; }
.article .photo .thumb { margin: 0; }
.photo figcaption { font-size: 13px; color: var(--muted); margin-top: 6px; }
.photo figcaption a:hover { color: var(--brand); }
.article .dateline { color: var(--brand); font-weight: 700; }
.source { color: var(--muted); font-size: 15px; margin: 4px 0 0; }
.source a { color: var(--brand); text-decoration: underline; }
.share { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); }
.share button, .share a { border: 1px solid var(--line); background: var(--bg); border-radius: 6px; padding: 6px 14px; font: inherit; font-size: 14.5px; cursor: pointer; }
.share button:hover, .share a:hover { border-color: var(--brand); color: var(--brand); }
.crumb { font-size: 14px; color: var(--muted); margin-bottom: 12px; }
.crumb a { color: var(--brand); }

/* Footer */
.footer { background: var(--ink); color: #a8a29e; padding: 32px 0 20px; font-size: 15px; }
.footer .logo-text b { color: #fff; }
.footer .cols { display: grid; grid-template-columns: 1fr 2fr; gap: 28px; }
.footer h4 { color: #fff; margin: 0 0 10px; }
.footer .az { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.footer .az a:hover { color: #fff; }
.footer .copy { border-top: 1px solid #3f3a36; margin-top: 24px; padding-top: 14px; font-size: 14px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

@media (max-width: 900px) {
  .grid-main { grid-template-columns: 1fr; }
  .lead { grid-template-columns: 1fr; }
  .footer .cols { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  body { font-size: 16px; }
  .header .wrap { flex-direction: column; align-items: stretch; }
  .search input { width: 100%; flex: 1; }
  .lead-main h1 { font-size: 24px; }
  .lead-side a { grid-template-columns: 100px 1fr; }
  .list a { grid-template-columns: 110px 1fr; gap: 12px; }
  .list h3 { font-size: 16.5px; }
  .list p { display: none; }
  .article { padding: 18px; }
  .article h1 { font-size: 25px; }
  .topbar .hide-sm { display: none; }
}

/* All-news page: category filter chips and day headings */
.filter-bar { display: flex; gap: 8px; overflow-x: auto; padding: 14px 0 6px; margin-bottom: 4px; scrollbar-width: none; }
.filter-bar::-webkit-scrollbar { display: none; }
.filter-bar a { flex-shrink: 0; border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: 5px 14px; font-size: 15px; font-weight: 500; white-space: nowrap; }
.filter-bar a span { display: inline-block; min-width: 22px; text-align: center; margin-left: 4px; padding: 0 6px; border-radius: 999px; background: var(--bg); color: var(--muted); font-size: 13px; }
.filter-bar a:hover { border-color: var(--brand); color: var(--brand); }
.filter-bar a.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.filter-bar a.on span { background: rgba(255,255,255,.22); color: #fff; }
.day-head { margin: 22px 0 0; padding-bottom: 6px; font-size: 16px; color: var(--brand); border-bottom: 2px solid var(--brand); display: inline-block; }
.all-btn { display: block; text-align: center; border: 2px solid var(--brand); color: var(--brand); border-radius: 8px; padding: 11px; font-weight: 700; margin-bottom: 30px; }
.all-btn:hover { background: var(--brand); color: #fff; }
