/**
 * 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;
}

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(2rem, 4vw + 1rem, 3.25rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: var(--ag-text-primary);
}

.ag-hero-headline {
  font-size: clamp(1.6rem, 2.5vw + 0.8rem, 2.4rem);
  font-weight: 800;
  line-height: 1.2;
  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.45rem;
  letter-spacing: -0.03em;
  color: var(--ag-text-primary);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.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.1 Cinematic Featured Hero Card */
.ag-card-hero {
  position: relative;
  border-radius: var(--ag-radius-lg);
  overflow: hidden;
  background: #000;
  min-height: 480px;
  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: 2.5rem 2rem 2rem 2rem;
  background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.4) 30%, rgba(0,0,0,0.88) 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: 760px;
  margin-left: auto;
  margin-right: auto;
}

.ag-article-prose {
  font-family: var(--ag-font-serif);
  font-size: 1.25rem;
  line-height: 1.8;
  color: var(--ag-text-primary);
}

.ag-article-prose.font-sm { font-size: 1.05rem; line-height: 1.7; }
.ag-article-prose.font-md { font-size: 1.25rem; line-height: 1.8; }
.ag-article-prose.font-lg { font-size: 1.45rem; line-height: 1.85; }

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

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

.ag-article-prose blockquote, .ag-pullquote {
  font-style: italic;
  padding: 1.25rem 1.75rem;
  margin: 2rem 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.35rem;
  line-height: 1.6;
}

/* Floating Reading Tools (Desktop Sidebar) */
.ag-floating-tools {
  position: sticky;
  top: 100px;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.ag-tool-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--ag-surface);
  border: 1px solid var(--ag-border);
  color: var(--ag-text-secondary);
  box-shadow: var(--ag-shadow-xs);
  transition: all var(--ag-transition-fast);
  cursor: pointer;
}

.ag-tool-btn:hover {
  color: var(--ag-accent);
  border-color: var(--ag-accent);
  transform: translateY(-2px);
  box-shadow: var(--ag-shadow-sm);
}

/* 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;
  width: 100vw;
  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);
}

/* 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;
  }
}
