/* ═══════════════════════════════════════════════════════════════
   Daily Nation — Main Stylesheet
   Mobile-First · IBM Plex Sans Devanagari · Playfair Display
═══════════════════════════════════════════════════════════════ */

/* ─── Tokens ──────────────────────────────────────────────────── */
:root {
  --clr-white:      #ffffff;
  --clr-bg:         #f9fafb;
  --clr-text:       #000000;
  --clr-muted:      #6b7280;
  --clr-border:     #e5e7eb;
  --clr-accent:     #FE0000;
  --clr-accent-dk:  #E60000;
  --clr-dark:       #000000;

  --font-body:    'IBM Plex Sans Devanagari', sans-serif;
  --font-display: 'Playfair Display', Georgia, serif;

  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 14px;

  --shadow-sm: 0 1px 3px rgba(0,0,0,.08);
  --shadow-md: 0 4px 16px rgba(0,0,0,.10);

  --transition: 0.22s ease;
  --container:  1180px;
}

/* ─── Reset ───────────────────────────────────────────────────── */
*,*::before,*::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--clr-text);
  background: var(--clr-bg);
}
img { display: block; max-width: 100%; height: auto; }
a  { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* ─── Container ───────────────────────────────────────────────── */
.container {
  width: 92%;
  max-width: var(--container);
  margin-inline: auto;
}
.container--narrow { max-width: 780px; }

/* ─── Typography ─────────────────────────────────────────────── */
h1,h2,h3,h4 { font-family: var(--font-display); line-height: 1.25; }

/* ─── Accent Tag ─────────────────────────────────────────────── */
.tag {
  display: inline-block;
  background: var(--clr-accent);
  color: #fff;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .04em;
  padding: 2px 9px;
  border-radius: var(--radius-sm);
  text-transform: uppercase;
}
.tag-sm   { font-size: .65rem; padding: 1px 7px; }
.tag-lg   { font-size: .8rem;  padding: 4px 14px; margin-bottom: .75rem; }
.accent   { color: var(--clr-accent); }

/* ─── Buttons ────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .55rem 1.3rem;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all var(--transition);
}
.btn-primary  { background: var(--clr-accent); color: #ffffff !important; border-color: var(--clr-accent); }
.btn-primary:hover { background: var(--clr-accent-dk); border-color: var(--clr-accent-dk); }
.btn-outline  { background: transparent; color: var(--clr-text); border-color: var(--clr-border); }
.btn-outline:hover { border-color: var(--clr-accent); color: var(--clr-accent); }
.btn-full     { width: 100%; justify-content: center; }
.btn-sm       { padding: .35rem .85rem; font-size: .82rem; }

/* ─── Alerts ─────────────────────────────────────────────────── */
.alert {
  padding: .8rem 1.2rem;
  border-radius: var(--radius-md);
  margin-bottom: 1rem;
  font-size: .9rem;
}
.alert-success { background: #dcfce7; color: #166534; border-left: 4px solid #22c55e; }
.alert-error   { background: #fee2e2; color: #991b1b; border-left: 4px solid var(--clr-accent); }
.alert-info    { background: #dbeafe; color: #1e40af; border-left: 4px solid #3b82f6; }

/* ─── Sections ───────────────────────────────────────────────── */
.section      { padding: 2.5rem 0; }
.section--alt { background: var(--clr-white); }
.section-header { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.5rem; }
.section-title  { font-size: clamp(1.25rem, 3vw, 1.6rem); }
.section-divider { flex: 1; height: 2px; background: var(--clr-border); }

/* ───────────────────────────────────────────────────────────────
   HEADER
─────────────────────────────────────────────────────────────── */
.site-header { background: var(--clr-white); box-shadow: var(--shadow-sm); position: sticky; top: 0; z-index: 100; }

/* Top Bar */
.top-bar { background: var(--clr-dark); color: #fff; }
.top-bar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 80px;
  gap: 1rem;
}
.top-bar__date { font-size: .85rem; color: #9ca3af; flex: 1; }
@media (max-width: 768px) {
  .top-bar__date { display: none; }
}
.top-bar__logo { 
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-family: var(--font-display); 
  font-size: 1.8rem; 
  font-weight: 800;
  color: #fff;
}
.logo-img { height: 60px; width: auto; }
.logo-text { font-size: 1.8rem; font-weight: bold; color: #fff; letter-spacing: 1px; white-space: nowrap; }

/* Hamburger */
.hamburger {
  display: flex; flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer;
  padding: 8px;
}
.hamburger span { display: block; width: 22px; height: 2px; background: #fff; border-radius: 2px; transition: var(--transition); }
@media (min-width: 1024px) { 
  .hamburger { display: none; } 
  .top-bar__inner::after { content: ""; flex: 1; } /* balance flex for logo centering */
}

@media (max-width: 768px) {
  .top-bar__inner { min-height: 60px; }
  .top-bar__logo { justify-content: flex-start; gap: 8px; }
  .logo-img { height: 44px; }
  .logo-text { font-size: 1.3rem; }
}

/* Breaking News Ticker */
.breaking-news { background: var(--clr-accent); color: #fff; overflow: hidden; }
.breaking-news__inner { display: flex; align-items: center; min-height: 34px; gap: 1rem; }
.breaking-news__label { font-size: .72rem; font-weight: 800; letter-spacing: .06em;
                         white-space: nowrap; background: rgba(0,0,0,.25); padding: 2px 10px; border-radius: 3px; }
.ticker-wrap { overflow: hidden; flex: 1; }
.ticker { display: flex; gap: 3rem; animation: ticker 20s linear infinite; white-space: nowrap; font-size: .82rem; }
.ticker__item::before { content: '▸ '; }
@keyframes ticker { 0% { transform: translateX(100%); } 100% { transform: translateX(-100%); } }

/* Category Nav */
.category-nav { border-top: 1px solid var(--clr-border); background: var(--clr-white); }
.category-nav__list { display: flex; overflow-x: auto; gap: 0; scrollbar-width: none; }
.category-nav__list::-webkit-scrollbar { display: none; }
.category-nav__link {
  display: block; white-space: nowrap;
  padding: .75rem 1rem; font-size: .82rem; font-weight: 600;
  color: var(--clr-muted); border-bottom: 2px solid transparent;
  transition: all var(--transition);
}
.category-nav__link:hover,
.category-nav__link.active { color: var(--clr-accent); border-bottom-color: var(--clr-accent); }

/* Mobile Menu */
.mobile-menu {
  position: fixed; inset: 0; background: rgba(0,0,0,.85);
  z-index: 200; display: none;
}
.mobile-menu.is-open { display: block; animation: fadeIn .2s ease; }
.mobile-menu__inner {
  background: var(--clr-dark); width: 80%; max-width: 300px;
  height: 100%; padding: 2rem 1.5rem; overflow-y: auto;
}
.mobile-menu__close {
  background: none; border: none; color: #fff; font-size: 1.4rem;
  cursor: pointer; margin-bottom: 1.5rem; display: block;
}
.mobile-menu__list li a {
  display: block; padding: .7rem 0;
  border-bottom: 1px solid rgba(255,255,255,.08);
  color: #e5e7eb; font-size: .95rem; font-weight: 500;
  transition: color var(--transition);
}
.mobile-menu__list li a:hover { color: var(--clr-accent); }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ───────────────────────────────────────────────────────────────
   HERO SECTION
─────────────────────────────────────────────────────────────── */
.hero-grid { display: grid; gap: 1.5rem; }
@media (min-width: 768px) { .hero-grid { grid-template-columns: 3fr 2fr; } }

/* Main hero card */
.hero-card { display: block; border-radius: var(--radius-lg); overflow: hidden;
             box-shadow: var(--shadow-sm); background: var(--clr-white); }
.hero-img-wrap { aspect-ratio: 16/9; overflow: hidden; }
.hero-img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.hero-card:hover .hero-img { transform: scale(1.04); }
.hero-img-placeholder { background: var(--clr-border); width: 100%; height: 100%; }
.hero-body { padding: 1.25rem; }
.hero-title { font-size: clamp(1rem, 2.5vw, 1.5rem); margin: .5rem 0 .4rem; line-height: 1.3; }
.hero-meta  { font-size: .78rem; color: var(--clr-muted); }

/* Side cards */
.hero-side { display: flex; flex-direction: column; gap: .75rem; }
.side-card { border-radius: var(--radius-md); overflow: hidden;
             background: var(--clr-white); box-shadow: var(--shadow-sm); }
.side-card__link { display: flex; gap: .75rem; align-items: center; padding: .6rem; }
.side-card__img  { width: 72px; height: 56px; object-fit: cover; border-radius: var(--radius-sm); flex-shrink: 0; }
.side-card__body { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.side-card__title { font-size: .86rem; line-height: 1.3; font-weight: 700;
                    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.side-card__time  { font-size: .72rem; color: var(--clr-muted); margin-top: 2px; }

/* ───────────────────────────────────────────────────────────────
   NEWS CARDS GRID
─────────────────────────────────────────────────────────────── */
.news-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}
@media (min-width: 640px) { .news-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .news-grid { grid-template-columns: repeat(3, 1fr); } }
.news-grid--4 { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 1024px) { .news-grid--4 { grid-template-columns: repeat(4, 1fr); } }

.news-card {
  background: var(--clr-white);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--clr-border);
  transition: transform var(--transition), box-shadow var(--transition);
}
.news-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.news-card__inner { display: flex; flex-direction: column; height: 100%; }
.news-card__img-wrap { aspect-ratio: 16/9; overflow: hidden; }
.news-card__img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.news-card:hover .news-card__img { transform: scale(1.05); }
.news-card__img-placeholder {
  background: var(--clr-bg); display: flex; align-items: center;
  justify-content: center; font-size: 2rem; aspect-ratio: 16/9;
}
.news-card__body { padding: .9rem; display: flex; flex-direction: column; gap: .3rem; flex: 1; }
.news-card__title {
  font-size: .95rem; font-weight: 700; line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  transition: color var(--transition);
}
.news-card:hover .news-card__title { color: var(--clr-accent); }
.news-card__excerpt { font-size: .82rem; color: var(--clr-muted); line-height: 1.4;
                       display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.news-card__footer { margin-top: auto; display: flex; gap: .4rem; font-size: .75rem; color: var(--clr-muted); }
.news-card__time { font-size: .75rem; color: var(--clr-muted); }

/* ───────────────────────────────────────────────────────────────
   MUST READ
─────────────────────────────────────────────────────────────── */
.must-read-grid { display: grid; gap: 1.5rem; }
@media (min-width: 768px) { .must-read-grid { grid-template-columns: 2fr 1fr; align-items: start; } }

.must-hero { position: relative; border-radius: var(--radius-lg); overflow: hidden; }
.must-hero a { display: block; position: relative; }
.must-hero__img { width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.must-hero__body {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: linear-gradient(to top, rgba(0,0,0,.88) 0%, transparent 100%);
  padding: 1.5rem 1rem .8rem;
  color: #fff;
}
.must-hero__title { font-size: 1.1rem; color: #fff; margin-top: .3rem; }
.must-hero__views { font-size: .78rem; color: rgba(255,255,255,.7); margin-top: .3rem; }

.must-list { display: flex; flex-direction: column; }
.must-item { display: flex; align-items: start; gap: .75rem; padding: .75rem 0;
              border-bottom: 1px solid var(--clr-border); }
.must-num  { font-family: var(--font-display); font-size: 1.5rem; font-weight: 800;
              color: var(--clr-border); min-width: 28px; }
.must-item__link { display: flex; flex-direction: column; gap: .2rem; flex: 1; }
.must-item__title { font-size: .9rem; font-weight: 700; line-height: 1.35; transition: color var(--transition); }
.must-item__link:hover .must-item__title { color: var(--clr-accent); }
.must-item__views { font-size: .72rem; color: var(--clr-muted); }

/* ───────────────────────────────────────────────────────────────
   CATEGORY PAGE
─────────────────────────────────────────────────────────────── */
.category-header { margin-bottom: 1.5rem; border-bottom: 2px solid var(--clr-border); padding-bottom: 1rem; }
.category-title  { font-size: clamp(1.4rem, 4vw, 2rem); }
.category-count  { color: var(--clr-muted); font-size: .85rem; margin-top: .2rem; }

/* ───────────────────────────────────────────────────────────────
   SINGLE POST
─────────────────────────────────────────────────────────────── */
.breadcrumb { display: flex; align-items: center; gap: .4rem; white-space: nowrap; 
               overflow: hidden; font-size: .8rem; color: var(--clr-muted); margin-bottom: 1rem; }
.breadcrumb a { color: var(--clr-muted); transition: color var(--transition); flex-shrink: 0; }
.breadcrumb a:hover { color: var(--clr-accent); }
.breadcrumb [aria-current] { color: var(--clr-text); overflow: hidden; text-overflow: ellipsis; }

.single-title   { font-size: clamp(1.4rem, 4vw, 2.2rem); margin: .6rem 0; line-height: 1.2; }

/* Grid Layout */
.single-grid { display: grid; gap: 2.5rem; }
@media (min-width: 1024px) {
  .single-grid { grid-template-columns: 1fr 340px; align-items: start; }
}

.single-sidebar { position: sticky; top: 100px; }
.sidebar-widget { background: var(--clr-white); padding: 1.5rem; border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); border: 1px solid var(--clr-border); margin-bottom: 2rem; }
.side-posts { display: flex; flex-direction: column; gap: 1rem; }

.single-meta    { display: flex; flex-wrap: wrap; gap: .6rem; font-size: .82rem;
                   color: var(--clr-muted); }

.single-meta-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.25rem; }

.share-compact { display: flex; gap: 0.5rem; }
.compact-icon { 
  width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; color: #fff; transition: opacity 0.2s;
}
.compact-icon.wa { background: #25d366; }
.compact-icon.fb { background: #1877f2; }
.compact-icon.tw { background: #000000; }
.compact-icon:hover { opacity: 0.8; }

@media (min-width: 1280px) {
  .share-compact { display: none; }
}
@media (max-width: 640px) {
  .hide-mobile { display: none; }
}

.single-excerpt { font-size: 1.05rem; color: var(--clr-muted); font-style: italic;
                   border-left: 4px solid var(--clr-accent); padding-left: 1rem; margin: 1.2rem 0; }
.single-figure  { border-radius: var(--radius-lg); overflow: hidden; margin: 1rem 0 1.5rem; }
.single-img     { width: 100%; max-height: 520px; object-fit: cover; }

/* Rich text body */
.prose { line-height: 1.85; font-size: 1.05rem; }
.prose h2,
.prose h3  { font-family: var(--font-display); margin: 1.5rem 0 .6rem; }
.prose p   { margin-bottom: 1rem; }
.prose a   { color: var(--clr-accent); text-decoration: underline; }
.prose img { border-radius: var(--radius-md); margin: 1rem auto; }
.prose blockquote { border-left: 4px solid var(--clr-accent); padding: .5rem 1rem;
                     background: var(--clr-bg); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; margin: 1rem 0; }

/* Modern Sticky Share */
.share-sticky {
  display: flex;
  gap: 0.8rem;
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--clr-border);
}

.share-icon {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  font-weight: 800;
  color: #fff;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  border: none;
  cursor: pointer;
}

.share-icon:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.share-icon--wa { background: #25d366; }
.share-icon--fb { background: #1877f2; }
.share-icon--tw { background: #000000; }
.share-icon--copy { background: var(--clr-muted); font-size: 1rem; }

@media (min-width: 1280px) {
  .single-main { position: relative; }
  .share-sticky {
    flex-direction: column;
    position: absolute;
    left: -80px;
    top: 100px;
    margin-top: 0;
    padding-top: 0;
    border: none;
  }
}

@media (max-width: 768px) {
  .share-sticky {
    justify-content: center;
    padding: 1.5rem 0;
    margin-top: 1.5rem;
    border-top: 1px solid var(--clr-border);
  }
}

/* ───────────────────────────────────────────────────────────────
   PAGINATION
─────────────────────────────────────────────────────────────── */
.pagination { display: flex; gap: .4rem; flex-wrap: wrap; margin-top: 2rem; justify-content: center; }
.page-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: var(--radius-sm);
  border: 1px solid var(--clr-border); font-size: .85rem;
  transition: all var(--transition);
}
.page-btn:hover, .page-btn.active { background: var(--clr-accent); color: #fff; border-color: var(--clr-accent); }

/* ───────────────────────────────────────────────────────────────
   FOOTER
─────────────────────────────────────────────────────────────── */
.site-footer { background: var(--clr-dark); color: #d1d5db; margin-top: 3rem; }
.footer-inner {
  display: grid; 
  grid-template-columns: repeat(2, 1fr);
  gap: 2.5rem 1.5rem; 
  padding: 3rem 0;
  text-align: left;
}
.footer-brand {
  grid-column: 1 / -1;
}

@media (min-width: 768px) { 
  .footer-inner { 
    grid-template-columns: 2.5fr 1.5fr 1.5fr 1.5fr; 
    gap: 3rem; 
  } 
  .footer-brand {
    grid-column: auto;
  }
}
.footer-logo { display: inline-flex; align-items: center; gap: 0.5rem; font-family: var(--font-display); font-size: 1.5rem; color: var(--clr-accent); font-weight: 800; text-decoration: none; margin-bottom: 1rem; }
.footer-tagline { font-size: .9rem; color: #9ca3af; margin-top: .5rem; line-height: 1.5; }
.footer-socials { display: flex; gap: 1rem; margin-top: 1.25rem; }
.footer-socials a { color: #9ca3af; transition: color var(--transition); display: flex; align-items: center; justify-content: center; }
.footer-socials a:hover { color: var(--clr-accent); }
.footer-heading { font-size: .9rem; font-weight: 700; text-transform: uppercase;
                  letter-spacing: .06em; color: #fff; margin-bottom: 1.25rem; }
.footer-links ul { display: flex; flex-direction: column; gap: .6rem; }
.footer-links a { font-size: .9rem; color: #9ca3af; transition: color var(--transition); }
.footer-links a:hover { color: var(--clr-white); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.08); padding: 1.5rem 0; text-align: center; }
.footer-bottom p { font-size: .85rem; color: #6b7280; }

/* ───────────────────────────────────────────────────────────────
   ERROR PAGE
─────────────────────────────────────────────────────────────── */
.error-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 2rem; }
.error-page__inner { text-align: center; }
.error-code  { font-family: var(--font-display); font-size: clamp(5rem, 20vw, 10rem);
                font-weight: 800; color: var(--clr-accent); line-height: 1; }
.error-title { font-size: 1.5rem; margin: .5rem 0 .8rem; }
.error-desc  { color: var(--clr-muted); max-width: 420px; margin: 0 auto 1.5rem; }

/* ───────────────────────────────────────────────────────────────
   EMPTY STATE
─────────────────────────────────────────────────────────────── */
.empty-state { text-align: center; padding: 4rem 2rem; color: var(--clr-muted); }
.empty-state a { color: var(--clr-accent); }
