/* ==========================================================================
   GAONKAARI.COM — DESIGN SYSTEM & CORE STYLES
   Built with: Impeccable (Typography & Spacing) + Emil Animations (Springs & 60fps)
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Typography & Tokens (Impeccable System)
   -------------------------------------------------------------------------- */
:root {
  /* Fonts */
  --font-headline: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-devanagari: 'Mukta', 'Noto Sans Devanagari', sans-serif;

  /* 8px Mathematical Spacing Grid */
  --space-1: 0.25rem;  /* 4px  */
  --space-2: 0.5rem;   /* 8px  */
  --space-3: 0.75rem;  /* 12px */
  --space-4: 1rem;     /* 16px */
  --space-5: 1.25rem;  /* 20px */
  --space-6: 1.5rem;   /* 24px */
  --space-8: 2rem;     /* 32px */
  --space-10: 2.5rem;  /* 40px */
  --space-12: 3rem;    /* 48px */
  --space-16: 4rem;    /* 64px */
  --space-20: 5rem;    /* 80px */

  /* Type Scale (1.333 Ratio) */
  --text-xs: 0.75rem;    /* 12px */
  --text-sm: 0.875rem;   /* 14px */
  --text-base: 1rem;     /* 16px */
  --text-md: 1.125rem;   /* 18px */
  --text-lg: 1.333rem;   /* 21.3px */
  --text-xl: 1.777rem;   /* 28.4px */
  --text-2xl: 2.369rem;  /* 37.9px */
  --text-3xl: 3.157rem;  /* 50.5px */

  /* Border Radius */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --radius-full: 9999px;

  /* Emil Kowalski Springs & Transitions */
  --spring-snappy: cubic-bezier(0.34, 1.56, 0.64, 1);
  --spring-smooth: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out: cubic-bezier(0, 0, 0.2, 1);

  /* Light Theme (Editorial Newsprint) */
  --color-bg: #f8fafc;
  --color-surface-1: #ffffff;
  --color-surface-2: #f1f5f9;
  --color-surface-3: #e2e8f0;
  --color-border: #e2e8f0;
  --color-border-subtle: #f1f5f9;
  
  --color-text-primary: #0f172a;
  --color-text-secondary: #475569;
  --color-text-muted: #94a3b8;
  --color-text-inverse: #ffffff;

  --color-brand-red: #dc2626;
  --color-brand-red-light: #fee2e2;
  --color-brand-blue: #1d4ed8;

  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 4px 12px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 12px 28px rgba(15, 23, 42, 0.12);
  --shadow-hover: 0 16px 32px rgba(15, 23, 42, 0.14);
}

/* Dark Theme (Sleek Midnight) */
[data-theme="dark"] {
  --color-bg: hsl(220, 20%, 7%);
  --color-surface-1: hsl(220, 18%, 11%);
  --color-surface-2: hsl(220, 16%, 15%);
  --color-surface-3: hsl(220, 14%, 20%);
  --color-border: hsl(220, 12%, 20%);
  --color-border-subtle: hsl(220, 12%, 14%);

  --color-text-primary: hsl(220, 10%, 96%);
  --color-text-secondary: hsl(220, 10%, 70%);
  --color-text-muted: hsl(220, 10%, 45%);
  --color-text-inverse: hsl(220, 20%, 7%);

  --color-brand-red: #ef4444;
  --color-brand-red-light: rgba(239, 68, 68, 0.15);
  --color-brand-blue: #3b82f6;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.6);
  --shadow-hover: 0 16px 36px rgba(0, 0, 0, 0.7);
}

/* --------------------------------------------------------------------------
   2. Base Reset & Layout
   -------------------------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  background-color: var(--color-bg);
  color: var(--color-text-primary);
  line-height: 1.6;
  transition: background-color 0.3s ease, color 0.3s ease;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-headline);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.025em;
  color: var(--color-text-primary);
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

/* Container */
.container {
  width: 100%;
  max-width: 1280px;
  margin-inline: auto;
  padding-inline: clamp(1rem, 4vw, 2.5rem);
}

/* --------------------------------------------------------------------------
   3. Top Bar & Masthead Header
   -------------------------------------------------------------------------- */
.top-bar {
  background: var(--color-surface-2);
  border-bottom: 1px solid var(--color-border);
  padding: var(--space-2) 0;
  font-size: var(--text-xs);
  color: var(--color-text-secondary);
}

.top-bar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.top-bar-left {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.live-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  color: var(--color-brand-red);
}

.beacon-dot {
  width: 7px;
  height: 7px;
  background-color: var(--color-brand-red);
  border-radius: var(--radius-full);
  animation: pulseBeacon 1.4s infinite;
}

@keyframes pulseBeacon {
  0% { transform: scale(0.9); opacity: 1; }
  50% { transform: scale(1.4); opacity: 0.4; }
  100% { transform: scale(0.9); opacity: 1; }
}

.top-bar-right {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.epaper-badge-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--color-brand-blue);
  color: #fff;
  padding: 3px 10px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.75rem;
  transition: transform 0.2s var(--spring-snappy), opacity 0.2s;
}

.epaper-badge-link:hover {
  transform: translateY(-1px);
  opacity: 0.95;
}

.theme-toggle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  background: var(--color-surface-1);
  border: 1px solid var(--color-border);
  color: var(--color-text-primary);
  transition: transform 0.2s var(--spring-snappy), background-color 0.2s;
}

.theme-toggle-btn:hover {
  transform: scale(1.08);
}

/* Site Header */
.site-header {
  background: var(--color-surface-1);
  border-bottom: 2px solid var(--color-border);
  padding: var(--space-6) 0 var(--space-4);
  position: relative;
}

.header-masthead {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: var(--space-4);
}

.brand-logo-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.brand-logo-img {
  height: clamp(95px, 16vw, 145px);
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 2px 10px rgba(0, 0, 0, 0.09));
  transition: transform 0.3s var(--spring-snappy), filter 0.3s ease;
}

.brand-logo-wrap:hover .brand-logo-img {
  transform: scale(1.02);
}

[data-theme="dark"] .brand-logo-img {
  filter: drop-shadow(0 4px 14px rgba(255, 255, 255, 0.12));
}

.admin-logo-img {
  height: 42px;
  width: auto;
  object-fit: contain;
}

.brand-name {
  font-size: clamp(2.4rem, 6vw, 3.8rem);
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1;
  text-transform: uppercase;
  color: var(--color-text-primary);
}

.brand-name span {
  color: var(--color-brand-red);
}

.brand-tagline {
  font-family: var(--font-devanagari);
  font-size: clamp(0.95rem, 2vw, 1.25rem);
  font-weight: 700;
  color: var(--color-text-secondary);
  margin-top: 4px;
  letter-spacing: 0.02em;
}

/* Category Navigation */
.category-nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--color-border);
  padding-top: var(--space-3);
  overflow-x: auto;
  scrollbar-width: none;
}

.category-nav-bar::-webkit-scrollbar {
  display: none;
}

.category-nav-list {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  list-style: none;
}

.nav-pill {
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text-secondary);
  background: transparent;
  transition: all 0.2s var(--spring-snappy);
  white-space: nowrap;
}

.nav-pill:hover, .nav-pill.active {
  color: var(--color-text-primary);
  background: var(--color-surface-2);
}

.nav-pill.active {
  background: var(--color-brand-red);
  color: #fff;
}

.search-trigger-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  transition: all 0.2s ease;
}

.search-trigger-btn:hover {
  background: var(--color-surface-3);
  color: var(--color-text-primary);
}

/* --------------------------------------------------------------------------
   4. Breaking News Ticker (Emil Kowalski Style)
   -------------------------------------------------------------------------- */
.breaking-ticker-wrap {
  background: var(--color-surface-1);
  border-bottom: 1px solid var(--color-border);
  padding: var(--space-2) 0;
}

.breaking-ticker-inner {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.breaking-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--color-brand-red);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  flex-shrink: 0;
}

.ticker-content {
  overflow: hidden;
  white-space: nowrap;
  position: relative;
  width: 100%;
}

.ticker-link {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text-primary);
  display: inline-block;
  transition: color 0.2s;
}

.ticker-link:hover {
  color: var(--color-brand-red);
}

/* --------------------------------------------------------------------------
   5. Bento Grid Hero Section (Taste Guideline)
   -------------------------------------------------------------------------- */
.hero-section {
  padding: var(--space-8) 0;
}

.bento-grid {
  display: grid;
  grid-template-columns: 12fr;
  gap: var(--space-6);
}

@media (min-width: 992px) {
  .bento-grid {
    grid-template-columns: 7fr 5fr;
  }
}

/* Lead Big Story */
.lead-story-card {
  background: var(--color-surface-1);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s var(--spring-snappy), box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}

.lead-story-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.lead-media-wrap {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--color-surface-2);
  overflow: hidden;
}

.lead-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--spring-smooth);
}

.lead-story-card:hover .lead-img {
  transform: scale(1.03);
}

.category-tag-badge {
  position: absolute;
  top: var(--space-4);
  left: var(--space-4);
  background: var(--color-brand-red);
  color: #fff;
  font-size: var(--text-xs);
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  z-index: 2;
}

.lead-content {
  padding: var(--space-6);
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.lead-meta {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-bottom: var(--space-3);
}

.lead-title {
  font-size: clamp(1.4rem, 2.5vw, 2.2rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: var(--space-3);
  color: var(--color-text-primary);
}

.lead-summary {
  font-size: var(--text-base);
  color: var(--color-text-secondary);
  line-height: 1.6;
  margin-bottom: var(--space-6);
  flex-grow: 1;
}

.lead-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--color-border);
  padding-top: var(--space-4);
}

/* Secondary Bento Stack */
.bento-sidebar {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.spotlight-card {
  background: var(--color-surface-1);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s var(--spring-snappy), box-shadow 0.25s ease;
}

@media (min-width: 480px) {
  .spotlight-card {
    grid-template-columns: 140px 1fr;
  }
}

.spotlight-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.spotlight-media {
  aspect-ratio: 16 / 10;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--color-surface-2);
}

.spotlight-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.spotlight-title {
  font-size: var(--text-md);
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: var(--space-2);
}

.spotlight-meta {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

/* Live Wire Box */
.live-wire-box {
  background: var(--color-surface-1);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  box-shadow: var(--shadow-sm);
}

.wire-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 2px solid var(--color-border);
  padding-bottom: var(--space-3);
  margin-bottom: var(--space-4);
}

.wire-title {
  font-size: var(--text-md);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  gap: 8px;
}

.wire-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.wire-item {
  padding-bottom: var(--space-3);
  border-bottom: 1px dashed var(--color-border);
}

.wire-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.wire-time {
  font-size: 0.75rem;
  color: var(--color-brand-red);
  font-weight: 700;
  margin-bottom: 2px;
}

.wire-link {
  font-size: var(--text-sm);
  font-weight: 600;
  line-height: 1.4;
  color: var(--color-text-primary);
  transition: color 0.2s;
}

.wire-link:hover {
  color: var(--color-brand-blue);
}

/* --------------------------------------------------------------------------
   6. Editorial Button & Interaction Design System
   -------------------------------------------------------------------------- */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background-color: var(--color-brand-blue);
  color: #ffffff !important;
  font-size: var(--text-xs);
  font-weight: 700;
  padding: 8px 20px;
  border-radius: var(--radius-full);
  border: 1px solid transparent;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s var(--spring-snappy);
  line-height: 1.2;
}
.btn-primary:hover {
  background-color: #1e40af;
  color: #ffffff !important;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
.btn-primary:active {
  transform: scale(0.97);
}

.btn-primary-red {
  background-color: var(--color-brand-red);
}
.btn-primary-red:hover {
  background-color: #b91c1c;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background-color: var(--color-surface-2);
  color: var(--color-text-primary) !important;
  font-size: var(--text-xs);
  font-weight: 600;
  padding: 8px 18px;
  border-radius: var(--radius-full);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s var(--spring-snappy);
}
.btn-secondary:hover {
  background-color: var(--color-surface-3);
  color: var(--color-brand-blue) !important;
  border-color: var(--color-brand-blue);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
.btn-secondary:active {
  transform: scale(0.97);
}

/* Neutral fallback alias for legacy scripts */
.btn-whatsapp {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background-color: var(--color-surface-2);
  color: var(--color-text-primary) !important;
  border: 1px solid var(--color-border);
  font-size: var(--text-xs);
  font-weight: 600;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s var(--spring-snappy);
}
.btn-whatsapp:hover {
  background-color: var(--color-surface-3);
  color: var(--color-brand-blue) !important;
  border-color: var(--color-brand-blue);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
.btn-whatsapp:active {
  transform: scale(0.97);
}

/* Universal Modern Share Button (Editorial Pill) */
.btn-share {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background-color: var(--color-surface-2);
  color: var(--color-text-primary) !important;
  border: 1px solid var(--color-border);
  font-size: var(--text-xs);
  font-weight: 600;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: all 0.2s var(--spring-snappy);
  text-decoration: none;
}
.btn-share:hover {
  background-color: var(--color-surface-1);
  color: var(--color-brand-blue) !important;
  border-color: var(--color-brand-blue);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
.btn-share:active {
  transform: scale(0.96);
}

/* Universal Share Modal Popup */
.share-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
  animation: shareFadeIn 0.2s ease;
}
@keyframes shareFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
.share-modal-box {
  background: var(--color-surface-1);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  max-width: 440px;
  width: 100%;
  padding: var(--space-6);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.35);
  animation: sharePop 0.25s var(--spring-snappy);
}
@keyframes sharePop {
  from { transform: scale(0.92); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
.share-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.share-close-btn {
  background: transparent;
  border: none;
  font-size: 26px;
  color: var(--color-text-secondary);
  cursor: pointer;
  line-height: 1;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  transition: all 0.2s;
}
.share-close-btn:hover {
  color: var(--color-text-primary);
  background: var(--color-surface-3);
}
.share-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-3);
  margin-bottom: var(--space-5);
  text-align: center;
}
.share-target-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--color-text-secondary);
  font-size: var(--text-xs);
  font-weight: 600;
  transition: all 0.2s ease;
}
.share-target-btn:hover {
  color: var(--color-text-primary);
}
.share-icon-wrap {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-lg);
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  color: var(--color-text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
  transition: all 0.25s var(--spring-snappy);
}
.share-target-btn:hover .share-icon-wrap {
  background: var(--color-surface-1);
  color: var(--color-brand-blue);
  border-color: var(--color-brand-blue);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.share-copy-box {
  display: flex;
  align-items: center;
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  padding: 4px;
  gap: 6px;
}
.share-link-field {
  flex: 1;
  border: none;
  background: transparent;
  padding: 8px 12px;
  font-size: var(--text-xs);
  color: var(--color-text-primary);
  outline: none;
  font-family: inherit;
  text-overflow: ellipsis;
}
.share-copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: var(--radius-md);
  background: var(--color-text-primary);
  color: var(--color-surface-1);
  border: 1px solid transparent;
  font-size: var(--text-xs);
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s var(--spring-snappy);
  white-space: nowrap;
}
.share-copy-btn:hover {
  background: var(--color-brand-blue);
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

/* --------------------------------------------------------------------------
   7. News Grid Section
   -------------------------------------------------------------------------- */
.news-grid-section {
  padding: var(--space-10) 0;
}

.section-heading-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 2px solid var(--color-border);
  padding-bottom: var(--space-3);
  margin-bottom: var(--space-6);
}

.section-title {
  font-size: var(--text-xl);
  font-weight: 800;
  position: relative;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -14px;
  left: 0;
  width: 48px;
  height: 3px;
  background: var(--color-brand-red);
}

.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--space-6);
}

.article-card {
  background: var(--color-surface-1);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: transform 0.3s var(--spring-snappy), box-shadow 0.3s ease;
}

.article-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.card-media {
  aspect-ratio: 16 / 10;
  background: var(--color-surface-2);
  overflow: hidden;
  position: relative;
}

.card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--spring-smooth);
}

.article-card:hover .card-img {
  transform: scale(1.04);
}

.card-content {
  padding: var(--space-5);
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.card-meta {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-bottom: var(--space-2);
}

.card-category {
  font-weight: 700;
  color: var(--color-brand-red);
  text-transform: uppercase;
}

.card-title {
  font-size: var(--text-md);
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: var(--space-3);
  color: var(--color-text-primary);
  cursor: pointer;
}

.card-title:hover {
  color: var(--color-brand-blue);
}

.card-excerpt {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  line-height: 1.5;
  margin-bottom: var(--space-4);
  flex-grow: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--color-border);
  padding-top: var(--space-3);
  margin-top: auto;
}

/* --------------------------------------------------------------------------
   7b. Editorial Pagination Bar
   -------------------------------------------------------------------------- */
.pagination-bar {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-4);
  margin-top: var(--space-10);
  padding-top: var(--space-8);
  border-top: 1px solid var(--color-border);
}

.pagination-info {
  font-size: var(--text-xs);
  color: var(--color-text-secondary);
  font-weight: 600;
  letter-spacing: 0.02em;
}

.pagination-controls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
}

.page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 38px;
  height: 38px;
  padding: 0 14px;
  border-radius: var(--radius-md);
  background: var(--color-surface-1);
  border: 1px solid var(--color-border);
  color: var(--color-text-primary);
  font-size: var(--text-xs);
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s var(--spring-snappy);
  user-select: none;
}

.page-btn:hover:not(:disabled) {
  background: var(--color-surface-2);
  border-color: var(--color-brand-blue);
  color: var(--color-brand-blue);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.page-btn.active {
  background: var(--color-brand-blue);
  color: #ffffff !important;
  border-color: var(--color-brand-blue);
  box-shadow: 0 2px 8px rgba(29, 78, 216, 0.25);
  pointer-events: none;
}

.page-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  border-color: var(--color-border);
  transform: none;
  box-shadow: none;
}

.page-ellipsis {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 38px;
  color: var(--color-text-muted);
  font-size: var(--text-xs);
  font-weight: 700;
  user-select: none;
}

@media (max-width: 640px) {
  .page-btn {
    min-width: 34px;
    height: 34px;
    padding: 0 10px;
    font-size: 11px;
  }
}

/* --------------------------------------------------------------------------
   8. अग्रलेख (Editorial) Section
   -------------------------------------------------------------------------- */
.editorial-spotlight-section {
  background: var(--color-surface-2);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  padding: var(--space-12) 0;
}

.editorial-card {
  background: var(--color-surface-1);
  border-left: 5px solid var(--color-brand-red);
  border-radius: var(--radius-md);
  padding: var(--space-6);
  box-shadow: var(--shadow-sm);
}

.editorial-card-title {
  font-family: var(--font-devanagari);
  font-size: var(--text-xl);
  font-weight: 700;
  margin-bottom: var(--space-3);
}

/* --------------------------------------------------------------------------
   9. Article Reader Modal (Instant Zero-Reload Experience)
   -------------------------------------------------------------------------- */
.reader-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  justify-content: center;
  overflow-y: auto;
  padding: var(--space-6) var(--space-4);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.reader-modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.reader-modal-container {
  background: var(--color-surface-1);
  width: 100%;
  max-width: 820px;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  position: relative;
  margin: auto;
  transform: translateY(20px);
  transition: transform 0.35s var(--spring-snappy);
}

.reader-modal-overlay.active .reader-modal-container {
  transform: translateY(0);
}

.reader-modal-close-btn {
  position: sticky;
  top: var(--space-4);
  right: var(--space-4);
  float: right;
  z-index: 10;
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  color: var(--color-text-primary);
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  margin-bottom: -40px;
  margin-right: var(--space-4);
  transition: transform 0.2s var(--spring-snappy);
}

.reader-modal-close-btn:hover {
  transform: scale(1.1);
  background: var(--color-brand-red);
  color: #fff;
}

.reader-header {
  padding: var(--space-8) var(--space-8) var(--space-4);
}

.reader-category {
  display: inline-block;
  color: var(--color-brand-red);
  font-weight: 700;
  font-size: var(--text-sm);
  text-transform: uppercase;
  margin-bottom: var(--space-3);
}

.reader-title {
  font-size: clamp(1.6rem, 3.5vw, 2.6rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: var(--space-4);
}

.reader-byline {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  color: var(--color-text-secondary);
  font-size: var(--text-sm);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--color-border);
}

.reader-featured-media {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--color-surface-2);
  margin-bottom: var(--space-6);
}

.reader-featured-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.reader-body {
  padding: 0 var(--space-8) var(--space-8);
  font-size: var(--text-md);
  line-height: 1.75;
  color: var(--color-text-primary);
}

.reader-body p {
  margin-bottom: 1.5rem;
}

.reader-body strong {
  color: var(--color-text-primary);
}

.reader-share-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--color-surface-2);
  padding: var(--space-4) var(--space-8);
  border-top: 1px solid var(--color-border);
}

/* --------------------------------------------------------------------------
   10. Instant Search Drawer
   -------------------------------------------------------------------------- */
.search-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(6px);
  z-index: 1001;
  display: flex;
  justify-content: center;
  padding-top: 10vh;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.search-modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.search-box {
  background: var(--color-surface-1);
  width: 90%;
  max-width: 600px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--color-border);
  overflow: hidden;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
}

.search-input-wrap {
  display: flex;
  align-items: center;
  padding: var(--space-4);
  border-bottom: 1px solid var(--color-border);
}

.search-input {
  width: 100%;
  border: none;
  background: none;
  font-size: var(--text-md);
  color: var(--color-text-primary);
  outline: none;
  padding-left: var(--space-3);
}

.search-results-list {
  overflow-y: auto;
  max-height: 400px;
  padding: var(--space-3);
  list-style: none;
}

.search-result-item {
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background-color 0.15s;
}

.search-result-item:hover {
  background: var(--color-surface-2);
}

/* --------------------------------------------------------------------------
   11. Footer
   -------------------------------------------------------------------------- */
.site-footer {
  background: var(--color-surface-1);
  border-top: 2px solid var(--color-border);
  padding: var(--space-12) 0 var(--space-6);
  margin-top: var(--space-12);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-8);
  margin-bottom: var(--space-8);
}

.footer-col-brand .footer-tagline {
  font-family: var(--font-devanagari);
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  margin-top: var(--space-2);
}

.footer-heading {
  font-size: var(--text-sm);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-4);
  color: var(--color-text-primary);
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
}

.footer-links a:hover {
  color: var(--color-brand-red);
}

.footer-bottom {
  border-top: 1px solid var(--color-border);
  padding-top: var(--space-6);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  text-align: center;
}

@media (min-width: 768px) {
  .footer-bottom {
    flex-direction: row;
    justify-content: space-between;
  }
}

/* --------------------------------------------------------------------------
   12. Category Filter Bar & Badges
   -------------------------------------------------------------------------- */
.filter-active-heading {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.cat-pill-badge {
  background: var(--color-brand-red);
  color: #fff;
  padding: 3px 12px;
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: 700;
  letter-spacing: 0.02em;
}

.reset-filter-btn {
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  color: var(--color-text-primary);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s var(--spring-snappy);
}

.reset-filter-btn:hover {
  background: var(--color-brand-red);
  color: #fff;
  border-color: var(--color-brand-red);
}

.nav-pill-epaper {
  color: var(--color-brand-blue) !important;
  font-weight: 700 !important;
  border: 1px solid rgba(30, 58, 138, 0.2);
}

.nav-pill-epaper:hover {
  background: var(--color-brand-blue) !important;
  color: #fff !important;
}

/* --------------------------------------------------------------------------
   13. Mobile Overhaul (max-width: 640px)
   -------------------------------------------------------------------------- */
@media (max-width: 640px) {
  .container {
    padding-inline: 14px;
  }

  /* Top Bar */
  .top-bar {
    padding: 6px 0;
  }
  .top-bar-left span#current-date,
  .top-bar-left span:nth-child(2) {
    display: none; /* Hide date on small mobile to prevent wrapping */
  }
  .live-indicator {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
  }
  .epaper-badge-link {
    font-size: 0.72rem;
    padding: 3px 8px;
  }
  .theme-toggle-btn {
    width: 28px;
    height: 28px;
  }

  /* Masthead & Logo */
  .site-header {
    padding: 12px 0 8px;
  }
  .header-masthead {
    margin-bottom: 8px;
  }
  .brand-logo-img {
    height: 58px !important;
    max-height: 58px;
  }
  .brand-tagline {
    font-size: 0.8rem;
    margin-top: 2px;
  }

  /* Category Nav Bar */
  .category-nav-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .category-nav-bar::-webkit-scrollbar {
    display: none;
  }
  .category-nav-list {
    display: flex;
    align-items: center;
    gap: 6px;
    list-style: none;
    flex-shrink: 0;
  }
  .nav-pill {
    padding: 5px 12px;
    font-size: 0.82rem;
    font-weight: 700;
  }
  .search-trigger-btn {
    margin-left: auto;
    padding: 6px 10px;
    flex-shrink: 0;
  }
  .search-trigger-btn span {
    display: none; /* Hide text, show clean search icon */
  }

  /* Breaking Ticker */
  .breaking-ticker-wrap {
    padding: 6px 0;
  }
  .breaking-label {
    font-size: 0.68rem;
    padding: 3px 8px;
  }
  .ticker-link {
    font-size: 0.82rem;
  }

  /* Hero & Lead Story */
  .hero-section {
    padding: 14px 0;
  }
  .bento-grid {
    gap: 14px;
  }
  .lead-content {
    padding: 14px;
  }
  .lead-meta {
    font-size: 0.72rem;
    margin-bottom: 6px;
  }
  .lead-title {
    font-size: 1.25rem !important;
    line-height: 1.3;
    margin-bottom: 8px;
  }
  .lead-summary {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 0.88rem;
    line-height: 1.5;
    margin-bottom: 14px;
  }
  .lead-footer {
    padding-top: 10px;
  }

  /* Secondary Bento Spotlights (Clean horizontal cards on mobile) */
  .bento-sidebar {
    gap: 14px;
  }
  .spotlight-card {
    display: grid !important;
    grid-template-columns: 100px 1fr !important;
    gap: 12px !important;
    padding: 10px !important;
    align-items: center;
  }
  .spotlight-media {
    width: 100px;
    height: 72px;
    border-radius: var(--radius-sm);
  }
  .spotlight-title {
    font-size: 0.88rem;
    line-height: 1.3;
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .spotlight-meta {
    font-size: 0.72rem;
  }

  /* Live Wire */
  .live-wire-box {
    padding: 14px;
  }
  .wire-item {
    padding: 8px 0;
  }
  .wire-link {
    font-size: 0.85rem;
  }

  /* News Grid Section */
  .news-grid-section {
    padding: 18px 0;
  }
  .section-heading-bar {
    margin-bottom: 14px;
    padding-bottom: 8px;
  }
  .section-title {
    font-size: 1.25rem;
  }
  .articles-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .article-card .card-content {
    padding: 12px 14px;
  }
  .article-card .card-title {
    font-size: 1.05rem;
    line-height: 1.35;
  }
  .article-card .card-excerpt {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 0.85rem;
    line-height: 1.5;
  }

  /* Reader Modal on Mobile */
  .reader-modal-container {
    width: 100%;
    height: 100%;
    max-height: 100vh;
    border-radius: 0;
    padding: 0;
  }
  .reader-header {
    padding: 18px 16px 12px;
  }
  .reader-title {
    font-size: 1.45rem;
  }
  .reader-body {
    padding: 16px;
    font-size: 1rem;
    line-height: 1.7;
  }
  .reader-share-bar {
    padding: 12px 16px;
  }
}

/* ==========================================================================
   Rotating Sponsor Ad Engine (0 CLS, Responsive, Emil-style crossfade)
   ========================================================================== */
.gk-ad-rotator-wrapper {
  position: relative;
  width: 100%;
  margin: var(--space-6) 0;
  background: var(--color-surface-1);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  transition: border-color var(--duration-fast), box-shadow var(--duration-fast);
}

.gk-ad-rotator-wrapper:hover {
  border-color: var(--color-border-hover);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.gk-ad-banner-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 14px;
  background: var(--color-surface-2);
  border-bottom: 1px solid var(--color-border);
  font-size: var(--text-xs);
  gap: var(--space-3);
}

.gk-ad-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--color-text-secondary);
  text-transform: uppercase;
  background: rgba(0, 0, 0, 0.05);
  padding: 2px 7px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
}

[data-theme="dark"] .gk-ad-pill {
  background: rgba(255, 255, 255, 0.08);
}

.gk-ad-tagline-text {
  flex: 1;
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: opacity 0.2s ease;
}

.gk-ad-controls {
  display: flex;
  align-items: center;
  gap: 6px;
}

.gk-ad-nav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1px solid var(--color-border);
  background: var(--color-surface-1);
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: all var(--duration-fast);
  padding: 0;
}

.gk-ad-nav-btn:hover {
  background: var(--color-surface-3);
  color: var(--color-text-primary);
  border-color: var(--color-text-secondary);
}

.gk-ad-dots {
  display: flex;
  align-items: center;
  gap: 4px;
}

.gk-ad-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-border);
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.gk-ad-dot.active {
  width: 14px;
  border-radius: 4px;
  background: var(--color-brand-primary);
}

.gk-ad-stage {
  position: relative;
  width: 100%;
  height: 130px;
  max-height: 140px;
  background: #111;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gk-ad-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  pointer-events: none;
  transform: scale(0.99);
  transition: opacity 0.45s cubic-bezier(0.16, 1, 0.3, 1), transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.gk-ad-slide.active {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
}

.gk-ad-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #0d0d0d;
  display: block;
  transition: transform 0.3s ease;
}

.gk-ad-slide:hover .gk-ad-image {
  transform: scale(1.01);
}

.gk-ad-hover-overlay {
  position: absolute;
  right: 14px;
  bottom: 12px;
  opacity: 0;
  transform: translateY(4px);
  transition: all 0.2s ease;
  pointer-events: none;
}

.gk-ad-slide:hover .gk-ad-hover-overlay {
  opacity: 1;
  transform: translateY(0);
}

.gk-ad-call-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: var(--color-brand-primary);
  color: #fff;
  font-size: var(--text-xs);
  font-weight: 700;
  border-radius: var(--radius-md);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  letter-spacing: 0.02em;
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
  .gk-ad-stage {
    height: 95px;
  }
  .gk-ad-banner-header {
    padding: 4px 10px;
  }
  .gk-ad-tagline-text {
    font-size: 0.72rem;
  }
  .gk-ad-hover-overlay {
    opacity: 1;
    transform: none;
    right: 8px;
    bottom: 8px;
  }
  .gk-ad-call-btn {
    padding: 3px 8px;
    font-size: 0.7rem;
  }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

