/**
 * Antigravity Premium News & Media Design System
 * Inspired by Google Antigravity, Modern Digital Newsrooms & Native Mobile Apps
 */

/* ==========================================================================
   1. CSS Custom Properties / Design Tokens
   ========================================================================== */
:root {
  /* Color System - Sophisticated Light Theme (Default) */
  --ag-bg: #fbfbfa;
  --ag-surface: #ffffff;
  --ag-surface-secondary: #f4f5f6;
  --ag-surface-elevated: #ffffff;
  
  --ag-text-primary: #11141a;
  --ag-text-secondary: #4b525d;
  --ag-text-muted: #737c8b;
  --ag-text-subtle: #9ca3af;
  
  --ag-border: #e8eaed;
  --ag-border-light: #f1f3f5;
  --ag-border-focus: #1a73e8;

  /* Accent & Status Colors (Admin customizable via --ag-accent) */
  --ag-accent: #1a73e8;
  --ag-accent-hover: #1557b0;
  --ag-accent-subtle: rgba(26, 115, 232, 0.08);
  --ag-accent-rgb: 26, 115, 232;
  
  --ag-danger: #ea4335;
  --ag-danger-subtle: rgba(234, 67, 53, 0.08);
  --ag-success: #1e8e3e;
  --ag-success-subtle: rgba(30, 142, 62, 0.08);
  --ag-warning: #f9ab00;
  --ag-warning-subtle: rgba(249, 171, 0, 0.08);
  --ag-info: #0284c7;

  /* Typography Scale */
  --ag-font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --ag-font-serif: 'Newsreader', Georgia, Cambria, serif;
  --ag-font-tamil: 'Noto Sans Tamil', 'Plus Jakarta Sans', sans-serif;

  /* Spacing & Radii */
  --ag-radius-xs: 6px;
  --ag-radius-sm: 10px;
  --ag-radius-md: 16px;
  --ag-radius-lg: 22px;
  --ag-radius-xl: 32px;
  --ag-radius-full: 9999px;

  /* Shadows - Layered & Subtle */
  --ag-shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
  --ag-shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.02);
  --ag-shadow-md: 0 8px 24px -4px rgba(0, 0, 0, 0.06), 0 2px 6px -1px rgba(0, 0, 0, 0.04);
  --ag-shadow-lg: 0 16px 36px -6px rgba(0, 0, 0, 0.08), 0 6px 12px -2px rgba(0, 0, 0, 0.04);
  --ag-shadow-hover: 0 20px 40px -8px rgba(0, 0, 0, 0.12);

  /* Transitions */
  --ag-transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --ag-transition-base: 220ms cubic-bezier(0.4, 0, 0.2, 1);
  --ag-transition-smooth: 320ms cubic-bezier(0.16, 1, 0.3, 1);

  /* Mobile App Bar */
  --ag-bottom-nav-height: 64px;
}

/* ==========================================================================
   2. Dark Theme
   ========================================================================== */
[data-theme="dark"] {
  --ag-bg: #090c13;
  --ag-surface: #111622;
  --ag-surface-secondary: #171f30;
  --ag-surface-elevated: #1a2336;

  --ag-text-primary: #f8fafc;
  --ag-text-secondary: #cbd5e1;
  --ag-text-muted: #8b9bb4;
  --ag-text-subtle: #5f708a;

  --ag-border: rgba(255, 255, 255, 0.08);
  --ag-border-light: rgba(255, 255, 255, 0.04);
  --ag-border-focus: #3b82f6;

  --ag-accent: #3b82f6;
  --ag-accent-hover: #60a5fa;
  --ag-accent-subtle: rgba(59, 130, 246, 0.15);
  --ag-accent-rgb: 59, 130, 246;

  --ag-danger-subtle: rgba(234, 67, 53, 0.15);
  --ag-success-subtle: rgba(30, 142, 62, 0.15);
  --ag-warning-subtle: rgba(249, 171, 0, 0.15);

  --ag-shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.3);
  --ag-shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.35);
  --ag-shadow-md: 0 8px 24px -4px rgba(0, 0, 0, 0.45);
  --ag-shadow-lg: 0 16px 36px -6px rgba(0, 0, 0, 0.6);
  --ag-shadow-hover: 0 20px 40px -8px rgba(0, 0, 0, 0.7);
}

/* ==========================================================================
   3. Global Resets & Typography
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  overflow-x: hidden;
  max-width: 100%;
}

body {
  margin: 0;
  padding: 0;
  background-color: var(--ag-bg);
  color: var(--ag-text-primary);
  font-family: var(--ag-font-sans);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color var(--ag-transition-base), color var(--ag-transition-base);
}

@media (max-width: 991.98px) {
  body {
    padding-bottom: calc(var(--ag-bottom-nav-height) + env(safe-area-inset-bottom, 0px) + 12px);
  }
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--ag-transition-fast);
}
a:hover {
  color: var(--ag-accent);
}

img {
  max-width: 100%;
  height: auto;
  vertical-align: middle;
}

/* Tamil Typography Enhancement */
[lang="ta"], .font-tamil {
  font-family: var(--ag-font-tamil);
  line-height: 1.75;
  letter-spacing: 0.01em;
}

/* Editorial Headlines */
.ag-display-headline {
  font-size: clamp(1.4rem, 2.4vw + 0.6rem, 2.35rem);
  font-weight: 850;
  line-height: 1.32;
  letter-spacing: -0.02em;
  color: var(--ag-text-primary);
}
[lang="ta"] .ag-display-headline {
  font-family: var(--ag-font-tamil);
  line-height: 1.42;
  letter-spacing: 0;
}

.ag-hero-headline {
  font-size: clamp(1.35rem, 2vw + 0.5rem, 2.05rem);
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.025em;
  color: #ffffff;
}

.ag-card-headline {
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.015em;
  color: var(--ag-text-primary);
  transition: color var(--ag-transition-fast);
}
.ag-card-headline:hover {
  color: var(--ag-accent);
}

.ag-metadata {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--ag-text-muted);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* ==========================================================================
   4. Top Bar & Floating Sticky Header
   ========================================================================== */
.reading-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: var(--ag-accent);
  z-index: 1060;
  transition: width 0.1s ease-out;
}

.ag-topbar {
  background-color: var(--ag-surface);
  border-bottom: 1px solid var(--ag-border-light);
  font-size: 0.78rem;
  color: var(--ag-text-muted);
  transition: all var(--ag-transition-base);
}

.ag-navbar {
  position: sticky;
  top: 0;
  z-index: 1030;
  background-color: var(--ag-surface);
  border-bottom: 1px solid var(--ag-border);
  transition: all var(--ag-transition-smooth);
}

.ag-navbar.scrolled {
  background-color: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: var(--ag-shadow-sm);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] .ag-navbar.scrolled {
  background-color: rgba(17, 22, 34, 0.88);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.ag-navbar.scrolled .navbar-inner {
  padding-top: 0.45rem !important;
  padding-bottom: 0.45rem !important;
}

.ag-logo {
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: -0.03em;
  color: var(--ag-text-primary);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  flex-shrink: 0;
}
.ag-logo-dot {
  width: 9px;
  height: 9px;
  background-color: var(--ag-accent);
  border-radius: 50%;
  box-shadow: 0 0 10px rgba(var(--ag-accent-rgb), 0.5);
  display: inline-block;
}

.ag-nav-link {
  font-weight: 600;
  font-size: 0.9rem;
  padding: 6px 12px;
  color: var(--ag-text-secondary);
  border-radius: var(--ag-radius-full);
  transition: all var(--ag-transition-fast);
}
.ag-nav-link:hover, .ag-nav-link.active {
  color: var(--ag-accent);
  background-color: var(--ag-accent-subtle);
}

/* Category Strip */
.ag-category-strip {
  background-color: var(--ag-surface);
  border-bottom: 1px solid var(--ag-border-light);
  overflow-x: auto;
  white-space: nowrap;
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.ag-category-strip::-webkit-scrollbar {
  display: none;
}
.cat-pill {
  display: inline-flex;
  align-items: center;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ag-text-secondary);
  padding: 6px 14px;
  border-radius: var(--ag-radius-full);
  transition: all var(--ag-transition-fast);
}
.cat-pill:hover, .cat-pill.active {
  color: var(--ag-accent);
  background-color: var(--ag-accent-subtle);
}

/* ==========================================================================
   5. Modern Compact Breaking News Alert Bar
   ========================================================================== */
.ag-breaking-alert {
  background: var(--ag-surface);
  border-bottom: 1px solid var(--ag-border);
  padding: 0.55rem 0;
  font-size: 0.85rem;
  transition: background-color var(--ag-transition-base);
}

.ag-live-pulse {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--ag-danger-subtle);
  color: var(--ag-danger);
  font-weight: 800;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  padding: 4px 10px;
  border-radius: var(--ag-radius-full);
  text-transform: uppercase;
}
.ag-pulse-dot {
  width: 7px;
  height: 7px;
  background: var(--ag-danger);
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(234, 67, 53, 0.7);
  animation: pulse-ring 1.8s infinite;
}
@keyframes pulse-ring {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(234, 67, 53, 0.7);
  }
  70% {
    transform: scale(1);
    box-shadow: 0 0 0 6px rgba(234, 67, 53, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(234, 67, 53, 0);
  }
}

.ag-breaking-headline {
  color: var(--ag-text-primary);
  font-weight: 600;
  transition: color var(--ag-transition-fast);
}
.ag-breaking-headline:hover {
  color: var(--ag-accent);
}

/* ==========================================================================
   6. Reusable Section Header Component
   ========================================================================== */
.ag-section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--ag-border);
  position: relative;
}

.ag-section-header::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 48px;
  height: 2px;
  background: var(--ag-accent);
  border-radius: var(--ag-radius-full);
}

.ag-section-tag {
  display: block;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ag-accent);
  margin-bottom: 0.2rem;
}

.ag-section-title {
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ag-text-primary);
  margin: 0;
}

.ag-section-desc {
  font-size: 0.85rem;
  color: var(--ag-text-muted);
  margin: 0.15rem 0 0 0;
}

.ag-section-link {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ag-text-secondary);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: color var(--ag-transition-fast), transform var(--ag-transition-fast);
}
.ag-section-link:hover {
  color: var(--ag-accent);
  transform: translateX(3px);
}

/* ==========================================================================
   7. Reusable Card Variants
   ========================================================================== */
.ag-card {
  background: var(--ag-surface);
  border: 1px solid var(--ag-border);
  border-radius: var(--ag-radius-md);
  transition: transform var(--ag-transition-fast), box-shadow var(--ag-transition-fast), border-color var(--ag-transition-fast);
  overflow: hidden;
}

.ag-card:hover {
  border-color: var(--ag-border-focus);
  box-shadow: var(--ag-shadow-md);
}

/* 7.0 High-Density Lead Story Card (Compact & Premium) */
.ag-card-lead {
  background: var(--ag-surface);
  border: 1px solid var(--ag-border);
  border-radius: var(--ag-radius-md);
  padding: 1.25rem;
  height: 100%;
  display: flex;
  flex-direction: column;
  transition: all var(--ag-transition-base);
}
.ag-card-lead:hover {
  border-color: var(--ag-border-focus);
  box-shadow: var(--ag-shadow-md);
  transform: translateY(-2px);
}
.ag-card-lead-img-wrap {
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: 240px;
  overflow: hidden;
  border-radius: var(--ag-radius-sm);
  background-color: var(--ag-surface-secondary);
  margin-bottom: 1rem;
}
.ag-card-lead-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.ag-card-lead:hover .ag-card-lead-img {
  transform: scale(1.03);
}
.ag-card-lead-title {
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: -0.02em;
  color: var(--ag-text-primary);
  margin-bottom: 0.5rem;
  transition: color var(--ag-transition-fast);
}
.ag-card-lead-title:hover {
  color: var(--ag-accent);
}

/* 7.0.1 Compact Horizontal Mini Card */
.ag-card-mini {
  background: var(--ag-surface);
  border: 1px solid var(--ag-border);
  border-radius: var(--ag-radius-sm);
  padding: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  transition: all var(--ag-transition-fast);
  text-decoration: none;
}
.ag-card-mini:hover {
  border-color: var(--ag-border-focus);
  box-shadow: var(--ag-shadow-xs);
  transform: translateX(2px);
}
.ag-card-mini-img {
  width: 96px;
  height: 72px;
  border-radius: var(--ag-radius-xs);
  object-fit: cover;
  flex-shrink: 0;
  background: var(--ag-surface-secondary);
}
.ag-card-mini-title {
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--ag-text-primary);
  margin-bottom: 0.25rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color var(--ag-transition-fast);
}
.ag-card-mini:hover .ag-card-mini-title {
  color: var(--ag-accent);
}

/* 7.1 Cinematic Featured Hero Card */
.ag-card-hero {
  position: relative;
  border-radius: var(--ag-radius-lg);
  overflow: hidden;
  background: #000;
  min-height: 440px;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  box-shadow: var(--ag-shadow-md);
}

.ag-card-hero-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.ag-card-hero:hover .ag-card-hero-img {
  transform: scale(1.03);
}

.ag-card-hero-overlay {
  position: relative;
  z-index: 2;
  padding: 1.75rem 1.5rem 1.5rem 1.5rem;
  background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.45) 25%, rgba(0,0,0,0.92) 100%);
}

/* 7.2 Standard Card */
.ag-card-standard {
  background: var(--ag-surface);
  border: 1px solid var(--ag-border);
  border-radius: var(--ag-radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
  transition: all var(--ag-transition-base);
}

.ag-card-standard:hover {
  transform: translateY(-3px);
  box-shadow: var(--ag-shadow-md);
  border-color: var(--ag-border-focus);
}

.ag-card-standard-img-wrap {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background-color: var(--ag-surface-secondary);
}

.ag-card-standard-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

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

.ag-card-standard-body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

/* 7.3 Compact Card (Thumbnail + Text) */
.ag-card-compact {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--ag-border-light);
  transition: background-color var(--ag-transition-fast);
}

.ag-card-compact:last-child {
  border-bottom: none;
}

.ag-card-compact-img {
  width: 90px;
  height: 70px;
  border-radius: var(--ag-radius-sm);
  object-fit: cover;
  flex-shrink: 0;
  background-color: var(--ag-surface-secondary);
}

.ag-card-compact-title {
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--ag-text-primary);
  margin-bottom: 0.25rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 7.4 Horizontal Card */
.ag-card-horizontal {
  background: var(--ag-surface);
  border: 1px solid var(--ag-border);
  border-radius: var(--ag-radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all var(--ag-transition-base);
}

@media (min-width: 768px) {
  .ag-card-horizontal {
    flex-direction: row;
  }
  .ag-card-horizontal-img-wrap {
    width: 38%;
    min-height: 100%;
  }
  .ag-card-horizontal-body {
    width: 62%;
  }
}

.ag-card-horizontal:hover {
  transform: translateY(-2px);
  box-shadow: var(--ag-shadow-md);
  border-color: var(--ag-border-focus);
}

.ag-card-horizontal-img-wrap {
  position: relative;
  overflow: hidden;
  background-color: var(--ag-surface-secondary);
}

.ag-card-horizontal-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  min-height: 180px;
  transition: transform 0.4s ease;
}

.ag-card-horizontal:hover .ag-card-horizontal-img {
  transform: scale(1.03);
}

.ag-card-horizontal-body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* 7.5 Trending Section (#01, #02, #03...) */
.ag-trending-list {
  display: flex;
  flex-direction: column;
}

.ag-trending-item {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--ag-border-light);
  transition: all var(--ag-transition-fast);
}

.ag-trending-item:last-child {
  border-bottom: none;
}

.ag-trending-number {
  font-size: 1.75rem;
  font-weight: 800;
  line-height: 1;
  color: var(--ag-border-focus);
  opacity: 0.85;
  font-family: var(--ag-font-sans);
  letter-spacing: -0.04em;
  flex-shrink: 0;
  width: 38px;
}

.ag-trending-content {
  flex-grow: 1;
}

.ag-trending-title {
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--ag-text-primary);
  margin-bottom: 0.35rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color var(--ag-transition-fast);
}
.ag-trending-title:hover {
  color: var(--ag-accent);
}

/* Badges */
.ag-badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: var(--ag-radius-full);
  background-color: var(--ag-accent-subtle);
  color: var(--ag-accent);
}

.ag-badge-danger {
  background-color: var(--ag-danger-subtle);
  color: var(--ag-danger);
}

/* ==========================================================================
   8. Multimedia: Video & Gallery & Podcast Cards
   ========================================================================== */
.ag-video-card {
  position: relative;
  border-radius: var(--ag-radius-md);
  overflow: hidden;
  background: #000;
  aspect-ratio: 16 / 9;
}

.ag-video-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.88;
  transition: transform 0.4s ease, opacity 0.4s ease;
}

.ag-video-card:hover img {
  transform: scale(1.04);
  opacity: 0.95;
}

.ag-video-play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 52px;
  height: 52px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--ag-accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  transition: all var(--ag-transition-fast);
  z-index: 2;
}

.ag-video-card:hover .ag-video-play-btn {
  transform: translate(-50%, -50%) scale(1.1);
  background: #ffffff;
}

.ag-video-duration {
  position: absolute;
  bottom: 12px;
  right: 12px;
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  backdrop-filter: blur(4px);
  z-index: 2;
}

/* Podcast Player Component */
.podcast-player-card {
  background: var(--ag-surface);
  border: 1px solid var(--ag-border);
  border-radius: var(--ag-radius-md);
  padding: 1.25rem;
  box-shadow: var(--ag-shadow-xs);
}

.podcast-play-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--ag-accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  transition: transform var(--ag-transition-fast), background-color var(--ag-transition-fast);
}
.podcast-play-btn:hover {
  background: var(--ag-accent-hover);
  transform: scale(1.05);
}

.podcast-progress-bar {
  height: 4px;
  background: var(--ag-border);
  border-radius: 2px;
  overflow: hidden;
  position: relative;
  cursor: pointer;
}
.podcast-progress {
  height: 100%;
  background: var(--ag-accent);
  width: 0%;
  transition: width 0.1s linear;
}

/* ==========================================================================
   9. Article Reading Experience & Floating Controls
   ========================================================================== */
.ag-article-reading-container {
  max-width: 820px;
  margin-left: auto;
  margin-right: auto;
}

/* 9.1 Compact Featured Image Frame (Proportional Small Grid Height) */
.ag-article-featured-card {
  background: var(--ag-surface);
  border: 1px solid var(--ag-border);
  border-radius: var(--ag-radius-sm);
  overflow: hidden;
  box-shadow: var(--ag-shadow-xs);
  transition: all var(--ag-transition-base);
}
.ag-article-featured-card:hover {
  border-color: var(--ag-border-focus);
  box-shadow: var(--ag-shadow-sm);
}
.ag-article-featured-img-wrap {
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: 290px;
  overflow: hidden;
  position: relative;
  background: var(--ag-surface-secondary);
}
.ag-article-featured-img {
  width: 100%;
  height: 100%;
  max-height: 290px;
  object-fit: cover;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.ag-article-featured-card:hover .ag-article-featured-img {
  transform: scale(1.03);
}
.ag-article-credit-bar {
  padding: 0.45rem 0.85rem;
  background: var(--ag-surface-secondary);
  border-top: 1px solid var(--ag-border-light);
  font-size: 0.72rem;
  color: var(--ag-text-muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.ag-article-expand-img {
  backdrop-filter: blur(4px);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  border: 1px solid rgba(255,255,255,0.2);
}

/* 9.2 Executive Summary Highlight Callout */
.ag-article-lead-summary {
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--ag-text-secondary);
  background: var(--ag-surface-secondary);
  border-left: 3px solid #dc2626;
  border-radius: 0 var(--ag-radius-xs) var(--ag-radius-xs) 0;
  padding: 0.85rem 1.15rem;
  margin-bottom: 1.5rem;
  font-weight: 500;
}
[lang="ta"] .ag-article-lead-summary {
  font-family: var(--ag-font-tamil);
  line-height: 1.7;
}

/* 9.3 Article Prose Body */
.ag-article-prose {
  font-family: var(--ag-font-serif);
  font-size: 1.18rem;
  line-height: 1.82;
  color: var(--ag-text-primary);
}
[lang="ta"] .ag-article-prose {
  font-family: var(--ag-font-tamil);
  font-size: 1.05rem;
  line-height: 1.85;
}

.ag-article-prose.font-sm { font-size: 1rem; line-height: 1.7; }
.ag-article-prose.font-md { font-size: 1.18rem; line-height: 1.82; }
.ag-article-prose.font-lg { font-size: 1.35rem; line-height: 1.88; }
[lang="ta"] .ag-article-prose.font-sm { font-size: 0.95rem; line-height: 1.72; }
[lang="ta"] .ag-article-prose.font-md { font-size: 1.05rem; line-height: 1.85; }
[lang="ta"] .ag-article-prose.font-lg { font-size: 1.2rem; line-height: 1.9; }

.ag-article-prose p {
  margin-bottom: 1.45rem;
}

.ag-article-prose img {
  border-radius: var(--ag-radius-sm);
  max-height: 280px;
  width: 100%;
  object-fit: cover;
  margin: 1.25rem 0;
  box-shadow: var(--ag-shadow-xs);
  border: 1px solid var(--ag-border-light);
}

.ag-article-prose h2, .ag-article-prose h3 {
  font-family: var(--ag-font-sans);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-top: 2rem;
  margin-bottom: 0.9rem;
  color: var(--ag-text-primary);
}

.ag-article-prose blockquote, .ag-pullquote {
  font-style: italic;
  padding: 1rem 1.5rem;
  margin: 1.75rem 0;
  border-left: 3px solid var(--ag-accent);
  background-color: var(--ag-surface-secondary);
  border-radius: 0 var(--ag-radius-sm) var(--ag-radius-sm) 0;
  font-size: 1.18rem;
  line-height: 1.6;
}

/* 9.4 Floating Reading Tools (Desktop Sidebar Pill) */
.ag-floating-tools {
  position: sticky;
  top: 90px;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  background: var(--ag-surface);
  border: 1px solid var(--ag-border);
  border-radius: 999px;
  padding: 6px 4px;
  box-shadow: var(--ag-shadow-xs);
  align-items: center;
  width: 44px;
}

.ag-tool-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: var(--ag-text-secondary);
  font-size: 0.95rem;
  transition: all var(--ag-transition-fast);
  cursor: pointer;
  padding: 0;
}

.ag-tool-btn:hover {
  color: #dc2626;
  background: rgba(220, 38, 38, 0.08);
  transform: scale(1.1);
}
[data-theme="dark"] .ag-tool-btn:hover {
  color: #f87171;
  background: rgba(220, 38, 38, 0.2);
}

/* Story Nav with Thumbnails */
.ag-story-nav-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.85rem;
  background: var(--ag-surface);
  border: 1px solid var(--ag-border);
  border-radius: var(--ag-radius-sm);
  text-decoration: none;
  color: inherit;
  height: 100%;
  transition: all var(--ag-transition-fast);
}
.ag-story-nav-card:hover {
  border-color: var(--ag-border-focus);
  box-shadow: var(--ag-shadow-xs);
  transform: translateY(-2px);
}
.ag-story-nav-thumb {
  width: 60px;
  height: 48px;
  border-radius: 5px;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--ag-surface-secondary);
}

/* Mobile Sticky Bottom Reading Bar */
.ag-mobile-reading-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--ag-surface);
  border-top: 1px solid var(--ag-border);
  padding: 8px 16px;
  display: flex;
  align-items: center;
  justify-content: space-around;
  z-index: 1040;
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.08);
  padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px));
}

/* ==========================================================================
   10. Native Mobile App Bottom Navigation
   ========================================================================== */
.ag-mobile-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: calc(var(--ag-bottom-nav-height) + env(safe-area-inset-bottom, 0px));
  background: var(--ag-surface);
  border-top: 1px solid var(--ag-border);
  display: flex;
  align-items: center;
  justify-content: space-around;
  z-index: 1040;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

@media (min-width: 992px) {
  .ag-mobile-nav, .ag-mobile-reading-bar {
    display: none !important;
  }
}

.mobile-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--ag-text-muted);
  font-size: 0.72rem;
  font-weight: 600;
  text-decoration: none;
  flex: 1;
  padding: 6px 0;
  transition: color var(--ag-transition-fast);
}

.mobile-nav-item i {
  font-size: 1.25rem;
  margin-bottom: 2px;
}

.mobile-nav-item.active, .mobile-nav-item:hover {
  color: var(--ag-accent);
}

/* ==========================================================================
   11. AI-Era Expanded Search Overlay
   ========================================================================== */
.ag-search-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  height: 100vh;
  background: rgba(17, 20, 26, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 2000;
  display: flex;
  justify-content: center;
  padding-top: 8vh;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--ag-transition-smooth);
}

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

.ag-search-box {
  width: 100%;
  max-width: 720px;
  background: var(--ag-surface);
  border: 1px solid var(--ag-border);
  border-radius: var(--ag-radius-lg);
  box-shadow: var(--ag-shadow-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.ag-search-input-wrap {
  display: flex;
  align-items: center;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--ag-border);
  gap: 1rem;
}

.ag-search-input {
  border: none;
  outline: none;
  background: transparent;
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--ag-text-primary);
  width: 100%;
}

.ag-search-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: var(--ag-radius-full);
  background: var(--ag-surface-secondary);
  color: var(--ag-text-secondary);
  transition: all var(--ag-transition-fast);
  cursor: pointer;
}
.ag-search-chip:hover {
  background: var(--ag-accent-subtle);
  color: var(--ag-accent);
}

/* ==========================================================================
   12. Skeletons & Empty States
   ========================================================================== */
.ag-skeleton {
  background: linear-gradient(90deg, var(--ag-surface-secondary) 25%, var(--ag-border-light) 50%, var(--ag-surface-secondary) 75%);
  background-size: 200% 100%;
  animation: ag-pulse 1.6s infinite ease-in-out;
  border-radius: var(--ag-radius-sm);
}

@keyframes ag-pulse {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.ag-empty-state {
  text-align: center;
  padding: 3.5rem 1.5rem;
  background: var(--ag-surface);
  border: 1px dashed var(--ag-border);
  border-radius: var(--ag-radius-md);
  color: var(--ag-text-muted);
}
.ag-empty-icon {
  font-size: 2.5rem;
  color: var(--ag-text-subtle);
  margin-bottom: 1rem;
}

/* ==========================================================================
   13. Footer Styling
   ========================================================================== */
.ag-footer {
  background: var(--ag-surface);
  border-top: 1px solid var(--ag-border);
  padding: 4.5rem 0 2.5rem 0;
  color: var(--ag-text-secondary);
}

.footer-heading {
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ag-text-primary);
  margin-bottom: 1.25rem;
}

.footer-link {
  font-size: 0.88rem;
  color: var(--ag-text-muted);
  display: block;
  margin-bottom: 0.65rem;
  transition: color var(--ag-transition-fast);
}
.footer-link:hover {
  color: var(--ag-accent);
}

.social-share-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--ag-surface-secondary);
  border: 1px solid var(--ag-border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ag-text-secondary);
  transition: all var(--ag-transition-fast);
}
.social-share-btn:hover {
  background: var(--ag-accent-subtle);
  color: var(--ag-accent);
  transform: translateY(-2px);
}

/* Buttons */
.btn-ag-primary {
  background-color: var(--ag-accent);
  color: #ffffff !important;
  font-weight: 600;
  border-radius: var(--ag-radius-full);
  padding: 6px 18px;
  border: 1px solid transparent;
  transition: all var(--ag-transition-fast);
}
.btn-ag-primary:hover {
  background-color: var(--ag-accent-hover);
  box-shadow: 0 4px 12px rgba(var(--ag-accent-rgb), 0.3);
}

.btn-ag-light {
  background-color: var(--ag-surface-secondary);
  color: var(--ag-text-primary);
  font-weight: 600;
  border-radius: var(--ag-radius-full);
  padding: 6px 14px;
  border: 1px solid var(--ag-border);
  transition: all var(--ag-transition-fast);
}
.btn-ag-light:hover {
  background-color: var(--ag-border-light);
  color: var(--ag-accent);
}

/* ==========================================================================
   Homepage Pro Advanced Systems & Telemetry Styles
   ========================================================================== */

/* Weather & World Clock Ribbon */
.ag-weather-ribbon {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 0.25rem 0;
}
.ag-weather-ribbon::-webkit-scrollbar {
  display: none;
}
.ag-weather-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem 0.65rem;
  background: var(--ag-surface);
  border: 1px solid var(--ag-border);
  border-radius: var(--ag-radius-full);
  font-size: 0.74rem;
  color: var(--ag-text-secondary);
  white-space: nowrap;
  transition: all var(--ag-transition-fast);
}
.ag-weather-chip:hover {
  border-color: var(--ag-accent);
  color: var(--ag-text-primary);
}

/* View Mode Switcher */
.view-mode-btn {
  color: var(--ag-text-secondary);
  font-size: 0.8rem;
  transition: all var(--ag-transition-fast);
}
.view-mode-btn.active {
  background: var(--ag-surface) !important;
  color: var(--ag-text-primary) !important;
  box-shadow: var(--ag-shadow-xs);
}

/* List Mode */
#latestNewsGrid.view-mode-list .article-grid-item {
  width: 100% !important;
  flex: 0 0 100% !important;
  max-width: 100% !important;
}
#latestNewsGrid.view-mode-list .ag-card-standard {
  flex-direction: row !important;
  align-items: stretch;
}
#latestNewsGrid.view-mode-list .ag-card-standard-img-wrap {
  width: 200px !important;
  flex-shrink: 0 !important;
  max-height: none !important;
  aspect-ratio: 16 / 11 !important;
}
#latestNewsGrid.view-mode-list .ag-card-standard-body {
  padding: 1rem 1.25rem !important;
  flex-grow: 1;
}

/* Compact Mode */
#latestNewsGrid.view-mode-compact .article-grid-item {
  width: 100% !important;
  flex: 0 0 100% !important;
  max-width: 100% !important;
}
#latestNewsGrid.view-mode-compact .ag-card-standard {
  flex-direction: row !important;
  padding: 0.65rem 1rem !important;
  align-items: center;
}
#latestNewsGrid.view-mode-compact .ag-card-standard-img-wrap {
  display: none !important;
}
#latestNewsGrid.view-mode-compact .ag-card-standard-body {
  padding: 0 !important;
  flex-direction: row !important;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 1rem;
}
#latestNewsGrid.view-mode-compact .ag-card-headline {
  margin-bottom: 0 !important;
  font-size: 0.92rem !important;
}
#latestNewsGrid.view-mode-compact .text-truncate-2 {
  display: none !important;
}

/* Deep Dive Investigative Banner */
.ag-deep-dive-card {
  background: linear-gradient(135deg, #0a0e1a 0%, #111827 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--ag-radius-lg);
  color: #ffffff;
  position: relative;
  overflow: hidden;
  box-shadow: var(--ag-shadow-lg);
}
.ag-deep-dive-glow {
  position: absolute;
  top: -50px;
  right: -50px;
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, rgba(26, 115, 232, 0.3) 0%, rgba(26, 115, 232, 0) 70%);
  border-radius: 50%;
  pointer-events: none;
}

/* Community Consensus / Daily Poll */
.ag-poll-card {
  background: var(--ag-surface);
  border: 1px solid var(--ag-border);
  border-radius: var(--ag-radius-md);
  padding: 1.5rem;
  position: relative;
}
.ag-poll-opt {
  border: 1px solid var(--ag-border);
  border-radius: var(--ag-radius-sm);
  padding: 0.65rem 0.85rem;
  margin-bottom: 0.5rem;
  cursor: pointer;
  transition: all var(--ag-transition-fast);
  display: flex;
  align-items: center;
  gap: 0.65rem;
  background: var(--ag-surface-secondary);
}
.ag-poll-opt:hover {
  border-color: var(--ag-accent);
  background: var(--ag-surface);
}
.ag-poll-opt.selected {
  border-color: var(--ag-accent);
  background: var(--ag-accent-subtle);
}
.ag-poll-bar-wrap {
  position: relative;
  background: var(--ag-surface-secondary);
  border-radius: var(--ag-radius-full);
  height: 30px;
  overflow: hidden;
  margin-bottom: 0.65rem;
  border: 1px solid var(--ag-border-light);
}
.ag-poll-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--ag-accent) 0%, #4285f4 100%);
  border-radius: var(--ag-radius-full);
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}
.ag-poll-bar-text {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 0.85rem;
  font-size: 0.78rem;
  font-weight: 600;
  z-index: 1;
}

/* Currency Converter & Financial Telemetry Hub */
.ag-fx-card {
  background: var(--ag-surface);
  border: 1px solid var(--ag-border);
  border-radius: var(--ag-radius-md);
  padding: 1.25rem;
}
.ag-fx-rate-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--ag-border-light);
  font-size: 0.82rem;
}
.ag-fx-rate-row:last-child {
  border-bottom: none;
}

/* Opinion & Perspectives Section */
.ag-opinion-card {
  background: var(--ag-surface);
  border: 1px solid var(--ag-border);
  border-radius: var(--ag-radius-md);
  padding: 1.35rem;
  height: 100%;
  display: flex;
  flex-direction: column;
  transition: all var(--ag-transition-base);
  border-top: 3px solid var(--ag-accent);
}
.ag-opinion-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--ag-shadow-md);
  border-top-color: var(--ag-accent-hover);
}
.ag-columnist-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--ag-accent-subtle);
}

/* ==========================================================================
   News18 Style Editorial 3-Column Layout & Header Styles
   ========================================================================== */

/* News18 Brand Block */
.news18-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
}
.news18-logo-box {
  background: #dc2626;
  color: #ffffff;
  font-weight: 900;
  font-size: 1.15rem;
  padding: 4px 10px;
  border-radius: 4px;
  letter-spacing: -0.02em;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}
.news18-logo-box .sub-badge {
  background: #1e3a8a;
  color: #fff;
  padding: 2px 5px;
  border-radius: 2px;
  font-size: 0.72rem;
  margin-left: 2px;
}

/* Weather & AQI Center Widget */
.news18-weather-widget {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  background: var(--ag-surface);
  border: 1px solid #93c5fd;
  border-radius: var(--ag-radius-full);
  padding: 4px 14px;
  font-size: 0.78rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.news18-weather-divider {
  color: #cbd5e1;
  font-weight: 300;
}

/* Action Buttons */
.news18-live-btn {
  background: #dc2626 !important;
  color: #ffffff !important;
  font-weight: 700;
  font-size: 0.78rem;
  border-radius: 4px;
  padding: 6px 14px;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border: none;
  transition: all 0.2s ease;
  text-decoration: none;
}
.news18-live-btn:hover {
  background: #b91c1c !important;
  color: #ffffff !important;
  box-shadow: 0 3px 10px rgba(220, 38, 38, 0.35);
}
.news18-app-btn {
  background: var(--ag-surface);
  color: var(--ag-text-primary);
  font-weight: 600;
  font-size: 0.78rem;
  border: 1px solid var(--ag-border);
  border-radius: 4px;
  padding: 5px 12px;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  text-decoration: none;
}
.news18-app-btn:hover {
  background: var(--ag-surface-secondary);
  color: var(--ag-accent);
}

/* Category Navigation Strip */
.news18-nav-strip {
  position: sticky;
  top: 0;
  z-index: 1025;
  border-top: 1px solid var(--ag-border);
  border-bottom: 1px solid var(--ag-border);
  background: var(--ag-surface);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}
.news18-nav-link {
  color: var(--ag-text-primary);
  font-weight: 700;
  font-size: 0.92rem;
  padding: 8px 12px;
  text-decoration: none;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: color 0.15s ease;
}
.news18-nav-link:hover, .news18-nav-link.active {
  color: #dc2626;
}

/* Trending Sub-strip */
.news18-trending-bar {
  background: var(--ag-surface-secondary);
  border-bottom: 1px solid var(--ag-border);
  padding: 6px 0;
  font-size: 0.78rem;
}
.news18-trending-tag {
  color: #dc2626;
  font-weight: 700;
  white-space: nowrap;
}
.news18-trending-chip {
  color: var(--ag-text-secondary);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.15s ease;
  font-weight: 500;
}
.news18-trending-chip:hover {
  color: #dc2626;
}

/* ==========================================================================
   New Jaffna Tamil Pro Header & Navigation Enhancements
   ========================================================================== */

/* Pro Brand Logo */
.pro-brand-logo {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  text-decoration: none;
  line-height: 1.1;
  transition: transform 0.2s ease;
}
.pro-brand-logo:hover {
  transform: translateY(-1px);
}
.pro-brand-top {
  display: flex;
  align-items: center;
}
.pro-brand-new {
  font-size: 1.62rem;
  font-weight: 900;
  color: #0f172a;
  letter-spacing: -0.04em;
  font-family: 'Plus Jakarta Sans', sans-serif;
  position: relative;
}
[data-theme="dark"] .pro-brand-new {
  color: #f8fafc;
}
.pro-brand-new::after {
  content: '';
  display: inline-block;
  width: 5px;
  height: 5px;
  background: #dc2626;
  border-radius: 50%;
  margin-left: 2px;
  vertical-align: top;
  box-shadow: 0 0 6px rgba(220, 38, 38, 0.6);
}
.pro-brand-badge {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 50%, #b91c1c 100%);
  color: #ffffff;
  font-size: 1.22rem;
  font-weight: 900;
  padding: 2px 9px;
  border-radius: 4px;
  margin-left: 5px;
  letter-spacing: 0.03em;
  font-family: 'Plus Jakarta Sans', sans-serif;
  box-shadow: 0 3px 10px rgba(220, 38, 38, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.2);
  white-space: nowrap;
}

@media (max-width: 767.98px) {
  .pro-brand-new {
    font-size: 1.38rem;
  }
  .pro-brand-badge {
    font-size: 1.08rem;
    padding: 2px 7px;
  }
}

@media (max-width: 480px) {
  .pro-brand-new {
    font-size: 1.20rem;
  }
  .pro-brand-badge {
    font-size: 0.92rem;
    padding: 2px 6px;
    letter-spacing: 0.02em;
  }
}
.pro-brand-sub {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 3px;
}
.pro-brand-tamil-badge {
  background: #dc2626;
  color: #ffffff;
  font-size: 0.70rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 3px;
  letter-spacing: 0.02em;
  font-family: 'Noto Sans Tamil', sans-serif;
  box-shadow: 0 1px 4px rgba(220, 38, 38, 0.25);
}
.pro-brand-media-tag {
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #64748b;
  text-transform: uppercase;
}

/* ==========================================================================
   Pro Smart Live Search Field & Instant Dropdown
   ========================================================================== */
.header-live-search-wrapper {
  position: relative;
  z-index: 1040;
}

.header-search-capsule {
  background: rgba(241, 245, 249, 0.9);
  border: 1px solid #e2e8f0;
  border-radius: 9999px;
  padding: 4px 12px;
  height: 38px;
  width: 100%;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

[data-theme="dark"] .header-search-capsule {
  background: rgba(30, 41, 59, 0.85);
  border-color: #334155;
}

.header-search-capsule:focus-within {
  background: #ffffff;
  border-color: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15), 0 4px 12px rgba(220, 38, 38, 0.08);
}

[data-theme="dark"] .header-search-capsule:focus-within {
  background: #0f172a;
  border-color: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.25);
}

.header-search-icon {
  font-size: 0.85rem;
  margin-right: 8px;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.header-search-capsule:focus-within .header-search-icon {
  transform: scale(1.1);
}

.header-search-input {
  border: none;
  background: transparent;
  outline: none;
  font-size: 0.82rem;
  color: var(--ag-text-primary);
  width: 100%;
  padding: 0;
  line-height: 1.4;
  font-family: inherit;
}

.header-search-input::placeholder {
  color: #64748b;
  font-size: 0.78rem;
}

.header-search-clear-btn {
  background: none;
  border: none;
  padding: 0 4px;
  color: #94a3b8;
  cursor: pointer;
  display: flex;
  align-items: center;
  font-size: 0.82rem;
  transition: color 0.15s ease;
}

.header-search-clear-btn:hover {
  color: #ef4444;
}

.header-search-kbd {
  font-family: 'Plus Jakarta Sans', monospace;
  font-size: 0.65rem;
  user-select: none;
  pointer-events: none;
}

/* Instant Search Dropdown */
.header-search-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: 440px;
  max-width: 90vw;
  background: var(--ag-surface);
  border: 1px solid var(--ag-border);
  border-radius: 12px;
  overflow: hidden;
  z-index: 1090;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.14), 0 4px 12px rgba(0, 0, 0, 0.06);
  animation: headerSearchFadeIn 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes headerSearchFadeIn {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.header-search-dropdown-header {
  background: var(--ag-surface-secondary);
}

.header-search-dropdown-title {
  font-size: 0.70rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ag-text-secondary);
}

.header-search-results-list {
  max-height: 380px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.header-search-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--ag-border-light);
  text-decoration: none;
  color: var(--ag-text-primary);
  transition: background 0.15s ease;
}

.header-search-item:last-child {
  border-bottom: none;
}

.header-search-item:hover,
.header-search-item.active {
  background: rgba(239, 68, 68, 0.06);
}

[data-theme="dark"] .header-search-item:hover,
[data-theme="dark"] .header-search-item.active {
  background: rgba(239, 68, 68, 0.15);
}

.header-search-thumb {
  width: 58px;
  height: 42px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--ag-surface-secondary);
}

.header-search-item-info {
  flex: 1;
  min-width: 0;
}

.header-search-item-title {
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--ag-text-primary);
  margin-bottom: 2px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.header-search-item-title mark {
  background: rgba(239, 68, 68, 0.18);
  color: #dc2626;
  padding: 0 2px;
  border-radius: 2px;
  font-weight: 700;
}

.header-search-item-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.70rem;
  color: var(--ag-text-muted);
}

.header-search-badge {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
  background: var(--ag-accent-subtle);
  color: var(--ag-accent);
}

/* Radar Pulsing Beacon for Live TV */
.live-beacon-ring {
  width: 8px;
  height: 8px;
  background: #ffffff;
  border-radius: 50%;
  display: inline-block;
  position: relative;
  flex-shrink: 0;
}
.live-beacon-ring::after {
  content: '';
  position: absolute;
  top: -4px;
  left: -4px;
  right: -4px;
  bottom: -4px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.85);
  animation: beaconPulse 1.6s cubic-bezier(0.24, 0, 0.38, 1) infinite;
}
@keyframes beaconPulse {
  0% { transform: scale(0.6); opacity: 1; }
  100% { transform: scale(2.4); opacity: 0; }
}

/* Pro Smart Search Capsule */
.pro-search-capsule {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--ag-surface);
  border: 1px solid var(--ag-border);
  border-radius: 24px;
  padding: 5px 14px;
  font-size: 0.78rem;
  color: var(--ag-text-secondary);
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  max-width: 360px;
  min-width: 140px;
  flex: 1 1 auto;
  overflow: hidden;
}
.pro-search-capsule:hover {
  border-color: #dc2626;
  box-shadow: 0 3px 12px rgba(220, 38, 38, 0.12);
  transform: translateY(-1px);
}
[data-theme="dark"] .pro-search-capsule {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.12);
}

/* Audio Wire / Radio Button with Animated Bars */
.audio-wire-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #f8fafc;
  color: #0f172a;
  border: 1px solid var(--ag-border);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 4px;
  text-decoration: none;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.audio-wire-btn:hover {
  background: #f1f5f9;
  color: #dc2626;
  border-color: #cbd5e1;
}
[data-theme="dark"] .audio-wire-btn {
  background: rgba(255, 255, 255, 0.05);
  color: #f1f5f9;
  border-color: rgba(255, 255, 255, 0.1);
}
.equalizer-bars {
  display: inline-flex;
  align-items: flex-end;
  gap: 2px;
  height: 12px;
}
.equalizer-bar {
  width: 2px;
  background: #dc2626;
  border-radius: 1px;
  animation: eqBounce 1.2s ease-in-out infinite alternate;
}
.equalizer-bar:nth-child(1) { height: 4px; animation-delay: 0.1s; }
.equalizer-bar:nth-child(2) { height: 11px; animation-delay: 0.3s; }
.equalizer-bar:nth-child(3) { height: 6px; animation-delay: 0.5s; }
@keyframes eqBounce {
  0% { height: 3px; }
  100% { height: 12px; }
}

/* Category Navigation Smooth Container */
.category-nav-scroll-container {
  display: flex;
  align-items: center;
  gap: 2px;
  overflow-x: auto;
  scrollbar-width: none;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}
.category-nav-scroll-container::-webkit-scrollbar {
  display: none;
}
.pro-cat-pill {
  color: var(--ag-text-primary);
  font-weight: 700;
  font-size: 0.86rem;
  padding: 6px 10px;
  text-decoration: none;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  border-radius: 4px;
  transition: all 0.15s ease;
}
.pro-cat-pill:hover {
  color: #dc2626;
  background: rgba(220, 38, 38, 0.06);
}
.pro-cat-pill.active {
  color: #ffffff !important;
  background: #dc2626 !important;
  padding: 5px 12px;
  box-shadow: 0 2px 8px rgba(220, 38, 38, 0.3);
}

/* Flame Animation for Trending Tag */
.trending-flame {
  display: inline-block;
  color: #f97316;
  animation: flameFlicker 1.8s infinite ease-in-out;
}
@keyframes flameFlicker {
  0%, 100% { transform: scale(1); filter: drop-shadow(0 0 2px rgba(249, 115, 22, 0.4)); }
  50% { transform: scale(1.18) rotate(4deg); filter: drop-shadow(0 0 6px rgba(239, 68, 68, 0.8)); }
}

/* Social Hover Colors */
.hover-fb:hover { color: #1877f2 !important; }
.hover-x:hover { color: #0f172a !important; }
[data-theme="dark"] .hover-x:hover { color: #f8fafc !important; }
.hover-yt:hover { color: #ff0000 !important; }
.hover-wa:hover { color: #25d366 !important; }

/* ==========================================================================
   14. Modern Small Image Grid & Premium Pro Editorial Design System
   ========================================================================== */

/* Section Column Headers */
.news18-col-title {
  font-size: 1.05rem;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  color: var(--ag-text-primary);
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-left: 3px solid #dc2626;
  padding-left: 0.5rem;
}

/* 14.1 High-Density Compact Lead Story Card (Col 1 Top) */
.news18-lead-card {
  background: var(--ag-surface);
  border: 1px solid var(--ag-border);
  border-radius: var(--ag-radius-sm);
  padding: 0.65rem;
  margin-bottom: 0.75rem;
  transition: all var(--ag-transition-base);
  box-shadow: var(--ag-shadow-xs);
}
.news18-lead-card:hover {
  border-color: var(--ag-border-focus);
  box-shadow: var(--ag-shadow-md);
  transform: translateY(-2px);
}
.news18-lead-img-wrap {
  width: 100%;
  aspect-ratio: 16 / 10;
  max-height: 165px;
  border-radius: calc(var(--ag-radius-sm) - 2px);
  overflow: hidden;
  position: relative;
  background: var(--ag-surface-secondary);
}
.news18-lead-img {
  width: 100%;
  height: 100%;
  max-height: 165px;
  object-fit: cover;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.news18-lead-card:hover .news18-lead-img {
  transform: scale(1.04);
}
.news18-lead-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.45rem;
  margin-bottom: 0.25rem;
}
.news18-cat-tag {
  color: #dc2626 !important;
  background: rgba(220, 38, 38, 0.08);
  font-size: 0.68rem !important;
  font-weight: 700 !important;
  padding: 2px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  display: inline-block;
}
[data-theme="dark"] .news18-cat-tag {
  background: rgba(220, 38, 38, 0.2);
  color: #f87171 !important;
}
.news18-lead-title {
  font-size: 1.05rem !important;
  font-weight: 800 !important;
  line-height: 1.35 !important;
  color: var(--ag-text-primary) !important;
  text-decoration: none !important;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0.2rem 0 0.35rem !important;
  letter-spacing: -0.01em !important;
  font-family: 'Noto Sans Tamil', 'Plus Jakarta Sans', sans-serif !important;
  transition: color 0.15s ease;
}
.news18-lead-title a {
  color: inherit;
  text-decoration: none;
}
.news18-lead-title a:hover,
.news18-lead-card:hover .news18-lead-title a {
  color: #dc2626 !important;
}
.news18-lead-summary {
  font-size: 0.78rem;
  color: var(--ag-text-secondary);
  line-height: 1.4;
  margin-bottom: 0.4rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 14.2 Compact Horizontal Story Item (Thumb on Right) */
.news18-thumb-right {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 0.75rem !important;
  padding: 0.55rem 0.6rem !important;
  background: var(--ag-surface);
  border: 1px solid var(--ag-border-light);
  border-radius: var(--ag-radius-xs);
  margin-bottom: 0.45rem;
  text-decoration: none !important;
  color: inherit !important;
  transition: all var(--ag-transition-fast);
}
.news18-thumb-right:hover {
  background: var(--ag-surface-secondary);
  border-color: var(--ag-border-focus);
  transform: translateX(2px);
}
.news18-thumb-right-content {
  flex: 1 1 auto !important;
  min-width: 0 !important;
}
.news18-thumb-right-cat {
  color: #64748b;
  font-size: 0.68rem;
  font-weight: 700;
  display: inline-block;
  margin-bottom: 0.15rem;
}
.news18-thumb-right-title {
  font-size: 0.84rem !important;
  font-weight: 700 !important;
  line-height: 1.34 !important;
  color: var(--ag-text-primary) !important;
  margin-bottom: 0 !important;
  text-decoration: none !important;
  display: -webkit-box !important;
  -webkit-line-clamp: 2 !important;
  -webkit-box-orient: vertical !important;
  overflow: hidden !important;
  font-family: 'Noto Sans Tamil', 'Plus Jakarta Sans', sans-serif !important;
  transition: color 0.15s ease;
}
.news18-thumb-right:hover .news18-thumb-right-title {
  color: #dc2626 !important;
}
.news18-thumb-right-img {
  width: 82px !important;
  height: 60px !important;
  flex-shrink: 0 !important;
  border-radius: 5px !important;
  object-fit: cover !important;
  background: var(--ag-surface-secondary);
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  transition: transform 0.3s ease;
}
.news18-thumb-right:hover .news18-thumb-right-img {
  transform: scale(1.04);
}

/* 14.3 Live TV Player Frame (Symmetrical with Lead Card) */
.news18-live-player {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: 165px;
  border-radius: var(--ag-radius-sm);
  overflow: hidden;
  background: #000;
  margin-bottom: 0.75rem;
  box-shadow: var(--ag-shadow-sm);
  cursor: pointer;
  border: 1px solid rgba(220, 38, 38, 0.3);
}
.news18-live-player img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.88;
  transition: transform 0.4s ease;
}
.news18-live-player:hover img {
  transform: scale(1.03);
}
.news18-live-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: #dc2626;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 3px;
  letter-spacing: 0.06em;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  z-index: 2;
  box-shadow: 0 2px 6px rgba(220, 38, 38, 0.4);
}
.news18-live-badge::before {
  content: '';
  width: 5px;
  height: 5px;
  background: #fff;
  border-radius: 50%;
  animation: ag-pulse 1.2s infinite;
}
.news18-live-play-center {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.3);
  transition: background 0.2s ease;
}
.news18-live-player:hover .news18-live-play-center {
  background: rgba(0,0,0,0.15);
}
.news18-live-play-icon {
  width: 44px;
  height: 44px;
  background: rgba(220, 38, 38, 0.92);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  box-shadow: 0 4px 14px rgba(0,0,0,0.45);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.news18-live-player:hover .news18-live-play-icon {
  transform: scale(1.12);
  background: #dc2626;
}
.news18-live-ticker-strip {
  position: absolute;
  bottom: 0;
  inset-inline: 0;
  background: linear-gradient(0deg, rgba(0,0,0,0.92) 0%, rgba(0,0,0,0) 100%);
  padding: 6px 10px;
  color: #ffffff;
  font-size: 0.74rem;
  font-weight: 600;
  z-index: 2;
}

/* 14.4 Column 3: High-Density Bulletin Wire */
.news18-bulletin-box {
  background: var(--ag-surface);
  border: 1px solid var(--ag-border);
  border-radius: var(--ag-radius-sm);
  padding: 0.75rem;
  height: 100%;
}
.news18-bulletin-item {
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--ag-border-light);
  transition: transform 0.15s ease;
}
.news18-bulletin-item:first-child {
  padding-top: 0;
}
.news18-bulletin-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}
.news18-bulletin-item:hover {
  transform: translateX(2px);
}
.news18-bulletin-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 0.15rem;
}
.news18-bulletin-cat {
  color: #64748b;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
}
.news18-bulletin-time {
  color: var(--ag-text-muted);
  font-size: 0.66rem;
}
.news18-bulletin-title {
  font-size: 0.85rem;
  font-weight: 700;
  line-height: 1.36;
  color: var(--ag-text-primary);
  text-decoration: none;
  display: block;
  font-family: 'Noto Sans Tamil', 'Plus Jakarta Sans', sans-serif;
  transition: color 0.15s ease;
}
.news18-bulletin-title:hover {
  color: #dc2626;
}
.news18-bulletin-icon {
  color: #dc2626;
  margin-left: 4px;
  font-size: 0.75rem;
}

/* ==========================================================================
   15. Standardized Small Image Grid System (.ag-card-sm)
   ========================================================================== */
.ag-card-sm {
  background: var(--ag-surface);
  border: 1px solid var(--ag-border);
  border-radius: var(--ag-radius-sm);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
  transition: all var(--ag-transition-base);
  position: relative;
}
.ag-card-sm:hover {
  border-color: var(--ag-border-focus);
  box-shadow: var(--ag-shadow-md);
  transform: translateY(-3px);
}
.ag-card-sm-img-wrap {
  width: 100%;
  aspect-ratio: 16 / 10;
  max-height: 125px;
  overflow: hidden;
  position: relative;
  background: var(--ag-surface-secondary);
}
.ag-card-sm-img {
  width: 100%;
  height: 100%;
  max-height: 125px;
  object-fit: cover;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.ag-card-sm:hover .ag-card-sm-img {
  transform: scale(1.06);
}
.ag-card-sm-body {
  padding: 0.65rem 0.75rem 0.65rem 0.75rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}
.ag-card-sm-title {
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1.34;
  color: var(--ag-text-primary);
  margin-top: 0.25rem;
  margin-bottom: 0.35rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-family: 'Noto Sans Tamil', 'Plus Jakarta Sans', sans-serif;
  transition: color 0.15s ease;
}
.ag-card-sm-title a {
  color: inherit;
  text-decoration: none;
}
.ag-card-sm-title a:hover,
.ag-card-sm:hover .ag-card-sm-title a {
  color: var(--ag-accent);
}
.ag-card-sm-summary {
  font-size: 0.74rem;
  color: var(--ag-text-secondary);
  line-height: 1.36;
  margin-bottom: 0.4rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.ag-card-sm-footer {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.35rem;
  border-top: 1px solid var(--ag-border-light);
  font-size: 0.7rem;
  color: var(--ag-text-muted);
}

/* Quick Floating Action Trigger */
.quick-action-pill {
  position: absolute;
  top: 6px;
  right: 6px;
  display: flex;
  gap: 4px;
  z-index: 3;
}
.quick-action-btn {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(0,0,0,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #1e293b;
  font-size: 0.74rem;
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 0;
}
.quick-action-btn:hover {
  background: #ffffff;
  color: var(--ag-accent);
  transform: scale(1.1);
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}
[data-theme="dark"] .quick-action-btn {
  background: rgba(17, 24, 39, 0.85);
  border-color: rgba(255, 255, 255, 0.15);
  color: #f1f5f9;
}
[data-theme="dark"] .quick-action-btn:hover {
  background: #1e293b;
  color: #60a5fa;
}

/* Bookmark Action Active State */
.quick-bookmark-btn.saved i {
  color: #e11d48;
}

/* 15.1 View Modes Styles (Grid vs List vs Compact) */
#latestNewsGrid.view-list .col-md-6,
#latestNewsGrid.view-list .col-lg-3,
#latestNewsGrid.view-list .col-md-4 {
  width: 100% !important;
}
#latestNewsGrid.view-list .ag-card-sm {
  flex-direction: row;
  align-items: center;
}
#latestNewsGrid.view-list .ag-card-sm-img-wrap {
  width: 110px;
  max-height: 80px;
  flex-shrink: 0;
  margin: 0.5rem 0 0.5rem 0.5rem;
  border-radius: var(--ag-radius-xs);
}
#latestNewsGrid.view-list .ag-card-sm-body {
  padding: 0.5rem 0.85rem;
}
#latestNewsGrid.view-list .ag-card-sm-summary {
  display: -webkit-box;
}

#latestNewsGrid.view-compact .col-md-6,
#latestNewsGrid.view-compact .col-lg-3,
#latestNewsGrid.view-compact .col-md-4 {
  width: 100% !important;
}
#latestNewsGrid.view-compact .ag-card-sm-img-wrap {
  display: none;
}
#latestNewsGrid.view-compact .ag-card-sm {
  padding: 0.4rem 0.75rem;
  border-radius: 4px;
}
#latestNewsGrid.view-compact .ag-card-sm-title {
  font-size: 0.88rem;
  margin-bottom: 0.2rem;
}
#latestNewsGrid.view-compact .ag-card-sm-summary {
  display: none;
}

/* 15.2 Curated Category 4-Card Small Grid */
.ag-cat-card-sm {
  background: var(--ag-surface);
  border: 1px solid var(--ag-border);
  border-radius: var(--ag-radius-sm);
  overflow: hidden;
  height: 100%;
  display: flex;
  flex-direction: column;
  transition: all var(--ag-transition-base);
  border-top: 3px solid var(--ag-accent);
}
.ag-cat-card-sm:hover {
  border-color: var(--ag-border-focus);
  box-shadow: var(--ag-shadow-sm);
  transform: translateY(-2px);
}
.ag-cat-card-sm-img-wrap {
  width: 100%;
  aspect-ratio: 16 / 10;
  max-height: 115px;
  overflow: hidden;
  background: var(--ag-surface-secondary);
}
.ag-cat-card-sm-img {
  width: 100%;
  height: 100%;
  max-height: 115px;
  object-fit: cover;
  transition: transform 0.35s ease;
}
.ag-cat-card-sm:hover .ag-cat-card-sm-img {
  transform: scale(1.05);
}
.ag-cat-card-sm-body {
  padding: 0.6rem 0.7rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}
.ag-cat-card-sm-title {
  font-size: 0.83rem;
  font-weight: 700;
  line-height: 1.34;
  color: var(--ag-text-primary);
  margin-bottom: 0.3rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-family: 'Noto Sans Tamil', 'Plus Jakarta Sans', sans-serif;
  transition: color 0.15s ease;
}
.ag-cat-card-sm:hover .ag-cat-card-sm-title {
  color: var(--ag-accent);
}

/* 15.3 Video & Gallery Small Grid Refinements */
.ag-video-card-sm {
  background: var(--ag-surface);
  border: 1px solid var(--ag-border);
  border-radius: var(--ag-radius-sm);
  overflow: hidden;
  transition: all var(--ag-transition-base);
  height: 100%;
  display: flex;
  flex-direction: column;
}
.ag-video-card-sm:hover {
  border-color: var(--ag-border-focus);
  box-shadow: var(--ag-shadow-sm);
  transform: translateY(-2px);
}
.ag-video-card-sm-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: 120px;
  overflow: hidden;
  background: #000;
}
.ag-video-card-sm-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}
.ag-video-card-sm:hover .ag-video-card-sm-thumb img {
  transform: scale(1.05);
}
.ag-video-play-badge {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.25);
  color: #fff;
  font-size: 1.35rem;
  transition: all 0.2s ease;
}
.ag-video-card-sm:hover .ag-video-play-badge {
  background: rgba(0,0,0,0.1);
  color: #ef4444;
}
.ag-video-duration-pill {
  position: absolute;
  bottom: 6px;
  right: 6px;
  background: rgba(0,0,0,0.8);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 3px;
}

/* ==========================================================================
   16. Responsive Resolution Optimizations
   ========================================================================== */

/* Mobile Phones (under 576px) */
@media (max-width: 575.98px) {
  .news18-editorial-grid .row {
    --bs-gutter-y: 1rem;
  }
  .news18-lead-img-wrap {
    max-height: 145px;
  }
  .news18-lead-img {
    max-height: 145px;
  }
  .news18-lead-title {
    font-size: 0.95rem !important;
  }
  .news18-thumb-right {
    padding: 0.45rem !important;
  }
  .news18-thumb-right-img {
    width: 72px !important;
    height: 52px !important;
  }
  .news18-thumb-right-title {
    font-size: 0.78rem !important;
  }
  .news18-live-player {
    max-height: 150px;
  }
  .ag-card-sm-img-wrap {
    max-height: 100px;
  }
  .ag-card-sm-img {
    max-height: 100px;
  }
  .ag-card-sm-title {
    font-size: 0.8rem;
  }
  .ag-cat-card-sm-img-wrap {
    max-height: 95px;
  }
  .ag-cat-card-sm-img {
    max-height: 95px;
  }
  .ag-cat-card-sm-title {
    font-size: 0.78rem;
  }
  .ag-video-card-sm-thumb {
    max-height: 100px;
  }
}

/* Tablets (576px to 991px) */
@media (min-width: 576px) and (max-width: 991.98px) {
  .news18-lead-img-wrap {
    max-height: 160px;
  }
  .news18-live-player {
    max-height: 160px;
  }
}

/* Laptops & Desktops (992px and up) */
@media (min-width: 992px) {
  .news18-editorial-grid {
    margin-bottom: 2rem;
  }
}

/* Ultra-wide Displays (1400px and up) */
@media (min-width: 1400px) {
  .ag-card-sm-title {
    font-size: 0.88rem;
  }
}



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