/* =====================================================================
   Daily Madhukar News (দৈনিক মধুকর)
   Design: ink & honey — "madhukar" means honeybee, so the identity is
   warm paper, dark ink, and a single honey-amber accent.
   ===================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+Bengali:wght@500;700;900&family=Hind+Siliguri:wght@400;500;600;700&display=swap');

:root {
  --paper:   #FBF8F1;
  --surface: #FFFFFF;
  --ink:     #201B14;
  --ink-2:   #57503F;
  --line:    #E7DFCE;
  --honey:   #B57708;
  --honey-2: #8F5D05;
  --breaking:#B3261E;
  --live:    #0B7A3B;
  --radius:  4px;
  --font-display: 'Noto Serif Bengali', 'Noto Serif', serif;
  --font-body: 'Hind Siliguri', 'Segoe UI', sans-serif;
}
[data-theme="dark"] {
  --paper:   #171310;
  --surface: #221D17;
  --ink:     #F0E9DC;
  --ink-2:   #B3A88F;
  --line:    #3A3226;
  --honey:   #E3A32B;
  --honey-2: #F0BC55;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; animation: none !important; } }

body {
  font-family: var(--font-body);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.65;
  font-size: 16.5px;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 2px solid var(--honey); outline-offset: 2px; }

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

/* ------------------------------------------------ top utility bar */
.topbar {
  background: var(--ink); color: #EDE5D4;
  font-size: 13px;
}
[data-theme="dark"] .topbar { background: #0E0B08; }
.topbar .container { display: flex; justify-content: space-between; align-items: center; min-height: 34px; gap: 12px; }
.topbar a { opacity: .85; } .topbar a:hover { opacity: 1; color: var(--honey-2); }
.topbar .right { display: flex; gap: 14px; align-items: center; }
.lang-switch { border: 1px solid #55503f; border-radius: 20px; padding: 1px 10px; font-weight: 600; }
.theme-toggle { background: none; border: none; color: inherit; cursor: pointer; font-size: 15px; }

/* ------------------------------------------------ masthead */
.masthead { padding: 22px 0 14px; text-align: center; border-bottom: 3px double var(--line); }
.masthead .brand {
  font-family: var(--font-display); font-weight: 900;
  font-size: clamp(34px, 6vw, 56px); line-height: 1.15; color: var(--ink);
  letter-spacing: .5px;
}
.masthead .brand .bee { color: var(--honey); }
.masthead .tagline { color: var(--ink-2); font-size: 14px; margin-top: 2px; letter-spacing: 2px; text-transform: uppercase; }
.masthead .date { font-size: 13px; color: var(--ink-2); margin-top: 4px; }

/* ------------------------------------------------ nav */
.mainnav { position: sticky; top: 0; z-index: 60; background: var(--surface); border-bottom: 2px solid var(--honey); box-shadow: 0 1px 4px rgba(0,0,0,.06); }
.mainnav .container { display: flex; align-items: center; gap: 4px; }
.mainnav .navbrand { display: none; font-family: var(--font-display); font-weight: 900; font-size: 20px; margin-right: 10px; white-space: nowrap; }
.mainnav.scrolled .navbrand { display: block; }
.navlinks { display: flex; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; flex: 1; }
.navlinks::-webkit-scrollbar { display: none; }
.navlinks a { padding: 11px 13px; font-weight: 600; white-space: nowrap; border-bottom: 3px solid transparent; }
.navlinks a:hover, .navlinks a.active { color: var(--honey-2); border-bottom-color: var(--honey); }
.nav-search { display: flex; align-items: center; }
.nav-search input { border: 1px solid var(--line); background: var(--paper); color: var(--ink); border-radius: 20px 0 0 20px; padding: 6px 12px; width: 150px; font-family: inherit; }
.nav-search button { border: 1px solid var(--honey); background: var(--honey); color: #fff; border-radius: 0 20px 20px 0; padding: 6px 12px; cursor: pointer; }

/* ------------------------------------------------ breaking ticker */
.breaking-bar { background: var(--breaking); color: #fff; overflow: hidden; }
.breaking-bar .container { display: flex; align-items: center; gap: 0; }
.breaking-label { background: #7f1812; padding: 8px 14px; font-weight: 700; white-space: nowrap; font-size: 14px; }
.breaking-label::before { content: '●'; margin-right: 6px; animation: blink 1.2s infinite; }
@keyframes blink { 50% { opacity: .25; } }
.ticker { flex: 1; overflow: hidden; position: relative; }
.ticker-track { display: inline-flex; white-space: nowrap; padding: 8px 0; animation: ticker 30s linear infinite; will-change: transform; }
.ticker-track:hover { animation-play-state: paused; }
.ticker a { color: #fff; font-size: 14.5px; margin-right: 48px; } .ticker a:hover { text-decoration: underline; }
/* The headline list is duplicated in the markup, so moving exactly one copy width
   (-50%) produces a seamless, continuous right-to-left scroll with no gap or jump. */
@keyframes ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }
/* The global reduced-motion rule disables all animation; the site owner wants the
   breaking ticker to keep scrolling, so re-enable it here (higher specificity + the
   duplicated track means it still loops smoothly). */
@media (prefers-reduced-motion: reduce) {
  .ticker-track { animation: ticker 30s linear infinite !important; }
}
.ticker a { color: #fff; font-size: 14.5px; } .ticker a:hover { text-decoration: underline; }

/* ------------------------------------------------ layout grids */
.section { padding: 26px 0; }
.section-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.section-head h2 { font-family: var(--font-display); font-size: 22px; font-weight: 700; white-space: nowrap; }
.section-head::after { content: ''; flex: 1; height: 1px; background: repeating-linear-gradient(90deg, var(--honey) 0 8px, transparent 8px 14px); }

.hero-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 22px; }
.lead-card { position: relative; }
.lead-card img { width: 100%; aspect-ratio: 16/9; object-fit: cover; border-radius: var(--radius); }
.lead-card h1, .lead-card h3 { font-family: var(--font-display); }
.lead-card h1 { font-size: clamp(22px, 3vw, 32px); margin-top: 12px; line-height: 1.35; }
.lead-card h1 a:hover { color: var(--honey-2); }
.lead-card .excerpt { color: var(--ink-2); margin-top: 6px; }

.side-list { display: flex; flex-direction: column; }
.side-list .item { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.side-list .item:first-child { padding-top: 0; }
.side-list img { width: 110px; height: 74px; object-fit: cover; border-radius: var(--radius); flex-shrink: 0; }
.side-list h4 { font-family: var(--font-display); font-size: 16px; font-weight: 700; line-height: 1.4; }
.side-list h4 a:hover { color: var(--honey-2); }

.card-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.news-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: transform .15s, box-shadow .15s; }
.news-card:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(0,0,0,.08); }
.news-card img { width: 100%; aspect-ratio: 16/10; object-fit: cover; }
.news-card .body { padding: 12px 14px 14px; }
.news-card h3 { font-family: var(--font-display); font-size: 16.5px; font-weight: 700; line-height: 1.45; }
.news-card h3 a:hover { color: var(--honey-2); }
.meta { font-size: 12.5px; color: var(--ink-2); display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.badge-cat { display: inline-block; font-size: 11.5px; font-weight: 700; color: var(--honey-2); text-transform: uppercase; letter-spacing: .8px; margin-bottom: 6px; }
.badge-live { background: var(--live); color: #fff; font-size: 11px; padding: 1px 8px; border-radius: 3px; font-weight: 700; animation: blink 1.4s infinite; }

.two-col { display: grid; grid-template-columns: 1fr 320px; gap: 28px; align-items: start; }

/* ------------------------------------------------ sidebar widgets */
.widget { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-bottom: 22px; }
.widget h3 { font-family: var(--font-display); font-size: 18px; border-bottom: 2px solid var(--honey); display: inline-block; padding-bottom: 4px; margin-bottom: 12px; }
.rank-list { counter-reset: rank; }
.rank-list a { display: flex; gap: 12px; padding: 9px 0; border-bottom: 1px dashed var(--line); font-weight: 600; line-height: 1.45; }
.rank-list a:last-child { border-bottom: none; }
.rank-list a::before { counter-increment: rank; content: counter(rank); font-family: var(--font-display); font-size: 22px; font-weight: 900; color: var(--honey); min-width: 24px; line-height: 1.1; }
.rank-list a:hover { color: var(--honey-2); }

.ad-slot { display: block; text-align: center; margin: 14px auto; }
.ad-slot img { margin: 0 auto; border-radius: var(--radius); }

.newsletter-box input { width: 100%; padding: 9px 12px; border: 1px solid var(--line); background: var(--paper); color: var(--ink); border-radius: var(--radius); margin-bottom: 8px; font-family: inherit; }
.btn { display: inline-block; background: var(--honey); color: #fff; border: none; padding: 9px 20px; border-radius: var(--radius); font-weight: 700; cursor: pointer; font-family: inherit; font-size: 15px; }
.btn:hover { background: var(--honey-2); }
.btn-outline { background: transparent; color: var(--honey-2); border: 1px solid var(--honey); }
.btn-block { width: 100%; text-align: center; }

.poll-option { display: block; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 8px; cursor: pointer; }
.poll-option:hover { border-color: var(--honey); }
.poll-bar { height: 8px; background: var(--line); border-radius: 4px; overflow: hidden; margin-top: 4px; }
.poll-bar span { display: block; height: 100%; background: var(--honey); }

/* ------------------------------------------------ single article */
.article { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(16px, 4vw, 36px); }
.article h1 { font-family: var(--font-display); font-size: clamp(24px, 4vw, 36px); line-height: 1.35; margin: 8px 0 12px; }
.article .lead-img { border-radius: var(--radius); }
.article .caption { font-size: 13px; color: var(--ink-2); margin-top: 6px; font-style: italic; }
.article-body { margin-top: 20px; font-size: 18px; line-height: 1.9; }
.article-body p { margin-bottom: 18px; }
.article-body img { border-radius: var(--radius); margin: 14px 0; max-width: 100%; height: auto; }
.article-body figure { margin: 20px 0; }
.article-body figure img { width: 100%; margin: 0; }
.article-body figcaption { font-size: 14px; color: var(--ink-2); margin-top: 6px; padding-left: 4px; border-left: 3px solid var(--honey); padding-left: 10px; }
.article-body h2, .article-body h3 { font-family: var(--font-display); margin: 22px 0 10px; }
.article-body blockquote { border-left: 4px solid var(--honey); padding: 8px 18px; color: var(--ink-2); background: var(--paper); margin: 18px 0; }
.byline { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-block: 1px solid var(--line); font-size: 14px; color: var(--ink-2); flex-wrap: wrap; }
.byline .avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.share-row { display: flex; gap: 8px; margin: 18px 0; flex-wrap: wrap; }
.share-row a, .share-row button { border: 1px solid var(--line); background: var(--paper); color: var(--ink); padding: 6px 14px; border-radius: 20px; font-size: 14px; cursor: pointer; font-family: inherit; }
.share-row a:hover, .share-row button:hover { border-color: var(--honey); color: var(--honey-2); }
.video-wrap { position: relative; padding-top: 56.25%; margin: 18px 0; }
.video-wrap iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; border-radius: var(--radius); }

.live-feed { border: 1px solid var(--line); border-radius: var(--radius); margin: 20px 0; }
.live-feed .lf-head { background: var(--live); color:#fff; padding: 8px 14px; font-weight: 700; border-radius: var(--radius) var(--radius) 0 0; }
.live-feed .lf-item { padding: 12px 16px; border-bottom: 1px dashed var(--line); }
.live-feed .lf-item time { font-size: 12.5px; color: var(--ink-2); display: block; }

/* comments */
.comment { display: flex; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.comment .avatar { width: 42px; height: 42px; border-radius: 50%; background: var(--honey); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; flex-shrink: 0; }
.comment .who { font-weight: 700; font-size: 14.5px; }
.comment .when { font-size: 12px; color: var(--ink-2); }
.comment .actions { font-size: 13px; color: var(--ink-2); margin-top: 4px; display: flex; gap: 14px; }
.comment .actions button { background: none; border: none; cursor: pointer; color: inherit; font-family: inherit; }
.comment .actions button:hover { color: var(--honey-2); }
.comment-form textarea { width: 100%; min-height: 90px; padding: 10px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); color: var(--ink); font-family: inherit; font-size: 15px; }
.comment-form input { width: 100%; padding: 9px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); color: var(--ink); margin-bottom: 8px; font-family: inherit; }

/* forms / auth */
.auth-box { max-width: 420px; margin: 40px auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 30px; }
.auth-box h1 { font-family: var(--font-display); font-size: 24px; margin-bottom: 16px; }
.auth-box label { font-weight: 600; font-size: 14px; display: block; margin: 12px 0 4px; }
.auth-box input { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); color: var(--ink); font-family: inherit; }
.alert { padding: 10px 14px; border-radius: var(--radius); margin-bottom: 14px; font-size: 14.5px; }
.alert-error { background: #FBE9E7; color: #8f1d16; border: 1px solid #f0c4bf; }
.alert-ok { background: #E8F5EC; color: #0b5c2d; border: 1px solid #bfe3cb; }
[data-theme="dark"] .alert-error { background: #3a1815; color: #f5b8b2; border-color: #5c231d; }
[data-theme="dark"] .alert-ok { background: #14301d; color: #a9dcbb; border-color: #1e4a2c; }

.pagination { display: flex; gap: 6px; justify-content: center; margin: 26px 0; }
.pagination a { border: 1px solid var(--line); padding: 6px 13px; border-radius: var(--radius); font-weight: 600; }
.pagination a.active, .pagination a:hover { background: var(--honey); border-color: var(--honey); color: #fff; }

/* footer */
footer.site-footer { background: var(--ink); color: #CFC6B2; margin-top: 40px; padding: 36px 0 20px; }
[data-theme="dark"] footer.site-footer { background: #0E0B08; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1.4fr; gap: 26px; }
.site-footer h4 { color: #fff; font-family: var(--font-display); margin-bottom: 12px; }
.site-footer a { display: block; padding: 3px 0; font-size: 14.5px; opacity: .85; }
.site-footer a:hover { opacity: 1; color: var(--honey-2); }
.footer-bottom { border-top: 1px solid #3a3428; margin-top: 26px; padding-top: 14px; font-size: 13.5px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.footer-brand { font-family: var(--font-display); font-size: 26px; font-weight: 900; color: #fff; }
.footer-brand .bee { color: var(--honey); }

/* responsive */
@media (max-width: 900px) {
  .hero-grid, .two-col { grid-template-columns: 1fr; }
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .nav-search input { width: 110px; }
}
@media (max-width: 560px) {
  .card-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  body { font-size: 16px; }
}
