/* ============================================================
   LOK MANCH NEWS — Design tokens
   Ink:      #141414   (headlines, primary text)
   Paper:    #FFFFFF   (background)
   Signal:   #C8102E   (breaking news / accent red)
   Saffron:  #E8960C   (video / secondary accent)
   Steel:    #5B6472   (meta text, timestamps)
   Hairline: #E4E4E4   (borders/rules)
   Mist:     #F7F6F4   (section backgrounds)
   ============================================================ */

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

:root {
  --ink: #141414;
  --paper: #ffffff;
  --signal: #C8102E;
  --saffron: #E8960C;
  --steel: #5B6472;
  --hairline: #E4E4E4;
  --mist: #F7F6F4;
  --font-display: 'Noto Serif Devanagari', 'Noto Serif', serif;
  --font-body: 'Noto Sans Devanagari', 'Noto Sans', sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }

a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 2px solid var(--signal);
  outline-offset: 2px;
}

/* ---------- Breaking ticker ---------- */
.ticker-bar {
  background: var(--ink);
  color: var(--paper);
  display: flex;
  align-items: center;
  overflow: hidden;
  height: 40px;
}
.ticker-label {
  background: var(--signal);
  color: var(--paper);
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  padding: 0 14px;
  height: 100%;
  display: flex;
  align-items: center;
  white-space: nowrap;
  flex-shrink: 0;
}
.ticker-track-wrap { overflow: hidden; flex: 1; }
.ticker-track {
  display: inline-flex;
  white-space: nowrap;
  animation: ticker-scroll 30s linear infinite;
  padding-left: 100%;
}
.ticker-track span { padding: 0 2.5rem; font-size: 0.85rem; }
@keyframes ticker-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-100%); }
}
@media (prefers-reduced-motion: reduce) {
  .ticker-track { animation: none; padding-left: 1rem; }
}

/* ---------- Header ---------- */
.site-header {
  border-bottom: 3px solid var(--ink);
  padding: 18px 20px 14px;
  background: var(--paper);
}
.site-header-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}
.brand {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 2rem;
  letter-spacing: -0.01em;
}
.brand .accent { color: var(--signal); }
.site-date {
  font-size: 0.8rem;
  color: var(--steel);
}
.admin-link {
  font-size: 0.78rem;
  color: var(--steel);
  border: 1px solid var(--hairline);
  padding: 5px 10px;
  border-radius: 3px;
}

/* ---------- Category nav ---------- */
.cat-nav {
  background: var(--ink);
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: none;
}
.cat-nav::-webkit-scrollbar { display: none; }
.cat-nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
}
.cat-nav a {
  color: #cfcfcf;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 11px 16px;
  flex-shrink: 0;
}
.cat-nav a:hover, .cat-nav a.active { color: var(--paper); background: var(--signal); }

/* ---------- Layout ---------- */
.wrap { max-width: 1200px; margin: 0 auto; padding: 24px 20px 60px; }
.tag {
  display: inline-block;
  background: var(--signal);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 3px 8px;
  border-radius: 2px;
  margin-bottom: 8px;
}
.tag.video { background: var(--saffron); }
.meta { color: var(--steel); font-size: 0.78rem; }

/* ---------- Hero ---------- */
.hero-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 24px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--hairline);
  margin-bottom: 28px;
}
.hero-lead img { aspect-ratio: 16/10; object-fit: cover; border-radius: 4px; }
.hero-lead h1 {
  font-family: var(--font-display);
  font-size: 1.9rem;
  line-height: 1.2;
  margin: 12px 0 8px;
}
.hero-lead p { color: var(--steel); font-size: 0.95rem; line-height: 1.5; }
.hero-side { display: flex; flex-direction: column; gap: 16px; }
.hero-side-item { display: flex; gap: 12px; border-bottom: 1px solid var(--hairline); padding-bottom: 14px; }
.hero-side-item:last-child { border-bottom: none; }
.hero-side-item img { width: 110px; height: 78px; object-fit: cover; border-radius: 3px; flex-shrink: 0; }
.hero-side-item h3 { font-family: var(--font-display); font-size: 1rem; line-height: 1.3; margin: 0 0 4px; }

@media (max-width: 760px) {
  .hero-grid { grid-template-columns: 1fr; }
}

/* ---------- Category sections ---------- */
.section-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}
.section-head h2 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  margin: 0;
  padding-left: 12px;
  border-left: 5px solid var(--signal);
}
.section-head .see-all { margin-left: auto; font-size: 0.78rem; color: var(--signal); font-weight: 600; }

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 40px;
}
@media (max-width: 900px) { .card-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .card-grid { grid-template-columns: 1fr; } }

.card { display: block; }
.card .thumb-wrap { position: relative; }
.card img { aspect-ratio: 16/10; object-fit: cover; border-radius: 4px; }
.card .play-badge {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
}
.card .play-badge svg { width: 44px; height: 44px; filter: drop-shadow(0 1px 4px rgba(0,0,0,.5)); }
.card h3 { font-family: var(--font-display); font-size: 1.05rem; line-height: 1.35; margin: 10px 0 6px; }

/* ---------- Article page ---------- */
.article-header { max-width: 780px; margin: 0 auto 20px; }
.article-header h1 { font-family: var(--font-display); font-size: 1.9rem; line-height: 1.25; margin: 10px 0; }
.article-media { max-width: 900px; margin: 0 auto 24px; }
.article-media img, .article-media video { width: 100%; border-radius: 4px; }
.article-body { max-width: 780px; margin: 0 auto; font-size: 1.05rem; line-height: 1.8; }
.article-body p { margin: 0 0 1.2em; }

/* ---------- Forms / Admin ---------- */
.panel { max-width: 560px; margin: 40px auto; padding: 28px; border: 1px solid var(--hairline); border-radius: 6px; }
.panel h1 { font-family: var(--font-display); font-size: 1.5rem; margin-top: 0; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--hairline); border-radius: 4px;
  font-family: inherit; font-size: 0.95rem;
}
.field textarea { min-height: 140px; resize: vertical; }
.btn {
  background: var(--signal); color: #fff; border: none; padding: 11px 20px;
  border-radius: 4px; font-weight: 700; font-size: 0.9rem;
}
.btn:hover { background: #a80d24; }
.btn.secondary { background: var(--ink); }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--hairline); }
.error-msg { color: var(--signal); font-size: 0.85rem; margin-top: 8px; }
.success-msg { color: #1a7f37; font-size: 0.85rem; margin-top: 8px; }

.admin-shell { display: flex; min-height: 100vh; }
.admin-nav {
  width: 200px; background: var(--ink); color: #cfcfcf; padding: 20px 0; flex-shrink: 0;
}
.admin-nav .brand { color: #fff; font-size: 1.2rem; padding: 0 20px 20px; display: block; }
.admin-nav a { display: block; padding: 10px 20px; font-size: 0.9rem; }
.admin-nav a:hover, .admin-nav a.active { background: var(--signal); color: #fff; }
.admin-main { flex: 1; padding: 28px; max-width: 900px; }
.admin-main h1 { font-family: var(--font-display); }
@media (max-width: 700px) {
  .admin-shell { flex-direction: column; }
  .admin-nav { width: 100%; display: flex; align-items: center; padding: 10px; overflow-x: auto; }
  .admin-nav .brand { display: none; }
  .admin-nav a { white-space: nowrap; padding: 8px 12px; }
}

table.data-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
table.data-table th, table.data-table td { text-align: left; padding: 10px; border-bottom: 1px solid var(--hairline); }
table.data-table th { color: var(--steel); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.03em; }
.status-badge { font-size: 0.72rem; padding: 2px 8px; border-radius: 10px; background: var(--mist); }
.status-badge.published { background: #dcf5e3; color: #1a7f37; }
.icon-btn { background: none; border: none; color: var(--signal); font-size: 0.85rem; font-weight: 600; }

.empty-state { text-align: center; padding: 60px 20px; color: var(--steel); }
.empty-state h3 { font-family: var(--font-display); color: var(--ink); }

.site-footer { border-top: 3px solid var(--ink); margin-top: 40px; padding: 24px 20px; text-align: center; color: var(--steel); font-size: 0.82rem; }
