/* Daily Our Desh — মোবাইল-ফার্স্ট নিউজ থিম */
:root {
  --navy: #0b2545;
  --red: #b91c1c;
  --red-dark: #991b1b;
  --ink: #1a1a1a;
  --muted: #666;
  --line: #e5e5e5;
  --bg: #ffffff;
  --bg-soft: #f6f6f4;
  --accent: #c9a227;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Noto Sans Bengali", "Hind Siliguri", sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.7;
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--red); }
img { max-width: 100%; display: block; }

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 16px;
}

/* ---------- Header ---------- */
.topbar {
  background: var(--navy);
  color: #fff;
  font-size: 0.85rem;
}
.topbar-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 6px 16px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.brand {
  text-align: center;
  padding: 20px 16px 12px;
  border-bottom: 3px solid var(--red);
}
.brand h1 {
  font-family: "Noto Serif Bengali", serif;
  font-size: 2.1rem;
  margin: 0;
  line-height: 1.2;
}
.brand h1 a:hover { color: var(--ink); }
.brand p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.main-nav {
  display: flex;
  gap: 2px;
  overflow-x: auto;
  background: var(--bg-soft);
  border-bottom: 1px solid var(--line);
  padding: 0 8px;
  scrollbar-width: none;
}
.main-nav::-webkit-scrollbar { display: none; }
.main-nav a {
  white-space: nowrap;
  padding: 10px 12px;
  font-weight: 600;
  font-size: 0.95rem;
}
.main-nav a:hover { color: var(--red); }

/* ---------- অনুসন্ধান বার ---------- */
.site-search {
  display: flex;
  gap: 8px;
  padding: 10px 16px 12px;
  max-width: 1100px;
  margin: 0 auto;
}
.site-search-input {
  flex: 1;
  min-width: 0;
  padding: 9px 12px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-family: inherit;
  font-size: 1rem;
}
.site-search-btn {
  background: var(--red);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 9px 18px;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.site-search-btn:hover { background: var(--red-dark); }

/* ---------- Breaking ticker ---------- */
.ticker {
  display: flex;
  align-items: stretch;
  background: #fff7ed;
  border-bottom: 1px solid var(--line);
}
.ticker-label {
  background: var(--red);
  color: #fff;
  font-weight: 700;
  padding: 8px 14px 8px 12px;
  line-height: 1.5;
  white-space: nowrap;
  flex: 0 0 auto;
  min-width: max-content;
  z-index: 1;
}
.ticker-viewport {
  overflow: hidden;
  flex: 1;
  display: flex;
  align-items: center;
}
.ticker-track {
  display: flex;
  width: max-content;
  animation: ticker-scroll 45s linear infinite;
}
.ticker-viewport:hover .ticker-track { animation-play-state: paused; }
.ticker-set { display: flex; align-items: center; white-space: nowrap; }
.ticker-item { padding: 8px 10px; font-weight: 500; }
.ticker-dot { color: var(--red); padding: 0 2px; }
@keyframes ticker-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ---------- Notices ---------- */
.sample-notice,
.info-box {
  background: #fefce8;
  border: 1px solid #fde68a;
  color: #713f12;
  border-radius: 8px;
  padding: 10px 14px;
  margin: 16px 0 0;
  font-size: 0.92rem;
}
.info-box.error {
  background: #fef2f2;
  border-color: #fecaca;
  color: #7f1d1d;
}

/* ---------- Hero ---------- */
.hero-card { margin-top: 20px; }
.hero-body { padding: 14px 2px 4px; }
.hero-body h2 {
  font-family: "Noto Serif Bengali", serif;
  font-size: 1.7rem;
  line-height: 1.35;
  margin: 6px 0;
}
.hero-summary { color: #444; margin: 0 0 8px; }

/* ---------- Thumbnails ---------- */
.thumb-img { width: 100%; object-fit: cover; border-radius: 8px; }
.thumb-hero { aspect-ratio: 16 / 9; }
.thumb-card { aspect-ratio: 16 / 9; }
.thumb-small { width: 110px; height: 74px; flex: none; }
.thumb-placeholder {
  background: linear-gradient(135deg, #0b2545, #b91c1c);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  text-align: center;
  padding: 8px;
}
.thumb-placeholder span {
  font-family: "Noto Serif Bengali", serif;
  font-weight: 700;
  font-size: 1rem;
  opacity: 0.95;
}
.thumb-placeholder.thumb-small span { font-size: 0.8rem; }
.thumb-top5 { aspect-ratio: 4 / 3; }
.thumb-placeholder.thumb-top5 span { font-size: 0.9rem; }

/* ---------- Labels / dates ---------- */
.cat-label {
  display: inline-block;
  background: var(--red);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
}
.card-date { color: var(--muted); font-size: 0.85rem; }

/* ---------- Sections ---------- */
.section-title {
  font-family: "Noto Serif Bengali", serif;
  font-size: 1.35rem;
  border-left: 4px solid var(--red);
  padding-left: 10px;
  margin: 28px 0 14px;
}
.top5-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px 16px;
}
.top5-card { border-bottom: 1px solid var(--line); padding-bottom: 12px; }
.top5-card-body { padding-top: 10px; }
.top5-card-body h3 {
  font-family: "Noto Serif Bengali", serif;
  font-size: 1.05rem;
  line-height: 1.45;
  margin: 6px 0 4px;
}

.cat-block { margin-bottom: 8px; }
.block-item {
  display: flex;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.block-item h3 {
  font-size: 1.02rem;
  line-height: 1.45;
  margin: 0 0 4px;
  font-family: "Noto Serif Bengali", serif;
}

/* ---------- News grid / filter ---------- */
#filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}
.filter-chip {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 999px;
  padding: 6px 14px;
  font-family: inherit;
  font-size: 0.9rem;
  cursor: pointer;
}
.filter-chip.active {
  background: var(--navy);
  color: #fff;
  border-color: var(--navy);
}
.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin-bottom: 32px;
}
.news-card { border-bottom: 1px solid var(--line); padding-bottom: 16px; }
.card-body { padding-top: 10px; }
.card-body h3 {
  font-family: "Noto Serif Bengali", serif;
  font-size: 1.15rem;
  line-height: 1.45;
  margin: 6px 0;
}
.card-summary { color: #444; margin: 0 0 6px; font-size: 0.95rem; }
.empty-note { color: var(--muted); }

/* ---------- Article page ---------- */
.article { max-width: 760px; margin: 0 auto; padding: 20px 0 8px; }
.article h1 {
  font-family: "Noto Serif Bengali", serif;
  font-size: 1.9rem;
  line-height: 1.35;
  margin: 8px 0;
}
.article-summary {
  font-size: 1.08rem;
  color: #444;
  border-left: 3px solid var(--accent);
  padding-left: 12px;
  margin: 14px 0;
}
.article-body p { margin: 0 0 16px; font-size: 1.05rem; }
.share-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 20px 0;
  padding: 14px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.share-btn {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 0.9rem;
  background: #fff;
  cursor: pointer;
  font-family: inherit;
}
.share-btn:hover { border-color: var(--red); color: var(--red); }

/* ---------- Static pages / admin ---------- */
.page { max-width: 760px; margin: 0 auto; padding: 8px 0 32px; }
.page h1 {
  font-family: "Noto Serif Bengali", serif;
  font-size: 1.7rem;
  margin: 20px 0 10px;
}
.page h2 { font-size: 1.2rem; margin: 24px 0 6px; }
.form-field { margin-bottom: 14px; }
.form-field label { display: block; font-weight: 600; margin-bottom: 4px; }
.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  padding: 9px 10px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-family: inherit;
  font-size: 1rem;
}
.form-field textarea { min-height: 180px; }
.btn {
  background: var(--red);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 10px 20px;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
}
.btn:hover { background: var(--red-dark); }
.btn-secondary { background: var(--navy); }
.status-text { margin-top: 12px; font-weight: 600; }

/* ---------- বিভাগসমূহ বাক্স ---------- */
.categories-box {
  border: 1px solid var(--line);
  background: #fff;
  margin-top: 28px;
}
.categories-box h2 {
  background: #f3f4f6;
  font-size: 1.2rem;
  margin: 0;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}
.category-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 16px;
}
.category-chip {
  background: #fee2e2;
  color: var(--red-dark);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 4px 14px;
}
.category-chip:hover { color: var(--red-dark); text-decoration: underline; }

/* ---------- Footer ---------- */
.site-footer {
  background: #0f172a;
  color: #cbd5e1;
  margin-top: 28px;
  text-align: center;
}
.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 32px 16px 20px;
}
.footer-editor-label,
.footer-office-label {
  color: #94a3b8;
  margin: 0 0 4px;
}
.footer-editor-name {
  font-family: "Noto Serif Bengali", serif;
  font-size: 1.6rem;
  font-weight: 800;
  color: #fff;
  margin: 0;
  line-height: 1.4;
}
.footer-divider {
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.25);
  margin: 20px 0;
}
.footer-office { color: #e2e8f0; margin: 0 0 6px; font-size: 1.05rem; }
.footer-contact { margin: 0 0 4px; color: #cbd5e1; }
.footer-contact a { color: #e2e8f0; }
.footer-contact a:hover { color: #fff; }
.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 28px;
  padding: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
}
.footer-links a { color: #e2e8f0; }
.footer-links a:hover { color: #fff; }
.footer-bottom {
  background: var(--red);
  color: #fff;
  text-align: center;
  padding: 12px 16px;
  font-weight: 600;
}

/* ---------- Tablet / desktop ---------- */
@media (min-width: 640px) {
  .grid { grid-template-columns: 1fr 1fr; }
  .brand h1 { font-size: 2.6rem; }
  .hero-body h2 { font-size: 2rem; }
  #category-blocks {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 32px;
  }
}
@media (min-width: 960px) {
  .grid { grid-template-columns: 1fr 1fr 1fr; }
  .top5-grid { grid-template-columns: repeat(4, 1fr); }
  .article h1 { font-size: 2.3rem; }
}

/* ---------- Tags ---------- */
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 10px 0 0;
}
.tag-list:empty { display: none; }
.tag-chip {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.82rem;
  padding: 2px 10px;
  border-radius: 999px;
}

/* ---------- Admin manage list ---------- */
.manage-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.manage-info { min-width: 0; }
.manage-info strong { display: block; line-height: 1.45; }
.manage-meta { color: var(--muted); font-size: 0.85rem; }
.manage-actions { display: flex; gap: 8px; flex: none; }
.btn-small {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 6px;
  padding: 6px 12px;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
}
.btn-small:hover { border-color: var(--red); color: var(--red); }
.btn-danger {
  color: var(--red-dark);
  border-color: #fecaca;
  background: #fef2f2;
}
.btn-danger:hover {
  background: #fee2e2;
  color: var(--red-dark);
  border-color: var(--red);
}

/* ---------- শেয়ার লিংক (অ্যাডমিন তালিকা) ---------- */
.share-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 6px;
}
.share-badge {
  font-size: 0.8rem;
  font-weight: 600;
  padding: 2px 10px;
  border-radius: 999px;
  white-space: nowrap;
}
.share-badge.ready { background: #dcfce7; color: #166534; }
.share-badge.missing { background: #f1f5f9; color: #64748b; }

/* ---------- লাইক ও মন্তব্য ---------- */
.like-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin: 16px 0;
}
.like-btn {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 999px;
  padding: 8px 18px;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
}
.like-btn.liked { background: #dcfce7; border-color: #86efac; color: #166534; }
.like-count { color: var(--muted); font-weight: 600; }
.comments { margin-top: 24px; border-top: 1px solid var(--line); padding-top: 8px; }
.comments h2 { font-size: 1.2rem; }
.comment-item { border-bottom: 1px solid var(--line); padding: 10px 0; }
.comment-item strong { display: block; }
.comment-meta { color: var(--muted); font-size: 0.85rem; }
.comment-text { margin: 4px 0 0; white-space: pre-wrap; }
.comment-empty { color: var(--muted); }
.comment-review { border-bottom: 1px solid var(--line); padding: 10px 0; }
.comment-review strong { display: block; }
.comment-review .manage-actions { margin-top: 8px; }

/* ---------- Admin image upload ---------- */
#f-image-file {
  padding: 8px 10px;
  cursor: pointer;
}
.form-hint {
  color: var(--muted);
  font-size: 0.88rem;
  margin: 6px 0 0;
}
#f-image-preview {
  max-width: 100%;
  max-height: 220px;
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
}
#f-image-preview[hidden] { display: none; }
