/**
 * NadiKabar.com - Modern Slate Dark Mode Design System (Default)
 * Typography: Inter (Sans) + Lora (Editorial Serif)
 */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&family=Lora:ital,wght@0,400;0,500;0,600;1,400;1,600&display=swap');

:root, [data-theme="dark"] {
  /* Slate Modern Dark Mode Palette (Default) */
  --bg-primary: #0F172A;        /* Slate-900 */
  --bg-surface: #1E293B;        /* Slate-800 */
  --bg-elevated: #334155;       /* Slate-700 */
  --bg-input: #0B132B;          /* Deep Dark Input */
  
  --border-color: #334155;      /* Slate-700 */
  --border-subtle: #1E293B;     /* Slate-800 */

  --text-primary: #FFFFFF;      /* Pure White for Headings */
  --text-body: #F1F5F9;         /* Slate-100 for Body Content */
  --text-secondary: #94A3B8;    /* Slate-400 for Meta/Excerpts */
  --text-muted: #64748B;        /* Slate-500 for Sub-labels */

  /* Brand Accents */
  --brand-pulse: #E63946;
  --brand-pulse-hover: #FF4D5E;
  --brand-cyan: #00E5FF;
  --brand-cyan-glow: rgba(0, 229, 255, 0.12);

  --header-bg: rgba(15, 23, 42, 0.94);
  --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.3);

  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-serif: 'Lora', Georgia, serif;

  /* Layout Consts */
  --container-max: 1280px;      /* max-w-7xl */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-full: 9999px;
  --transition-smooth: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="light"] {
  /* Premium Editorial High-Contrast Light Theme */
  --bg-primary: #F8FAFC;        /* Slate-50 */
  --bg-surface: #FFFFFF;        /* Pure White */
  --bg-elevated: #F1F5F9;       /* Slate-100 */
  --bg-input: #FFFFFF;          /* Clean White Input */

  --border-color: #E2E8F0;      /* Slate-200 */
  --border-subtle: #F1F5F9;     /* Slate-100 */

  --text-primary: #0F172A;      /* Slate-900 Headings (Deep Black) */
  --text-body: #1E293B;         /* Slate-800 Body (Dark Charcoal Black) */
  --text-secondary: #475569;    /* Slate-600 Meta */
  --text-muted: #64748B;        /* Slate-500 Muted */

  --brand-pulse: #E63946;
  --brand-pulse-hover: #D62839;
  --brand-cyan: #0284C7;
  --brand-cyan-glow: rgba(2, 132, 199, 0.12);

  --header-bg: rgba(255, 255, 255, 0.96);
  --shadow-card: 0 4px 16px rgba(15, 23, 42, 0.08);
}

[data-theme="light"] body {
  color: #1E293B;
  background-color: #F8FAFC;
}

[data-theme="light"] h1,
[data-theme="light"] h2,
[data-theme="light"] h3,
[data-theme="light"] h4,
[data-theme="light"] h5,
[data-theme="light"] h6,
[data-theme="light"] .hero-news__title,
[data-theme="light"] .news-card__title,
[data-theme="light"] .popular-item__title,
[data-theme="light"] .article-header__title,
[data-theme="light"] .sidebar-box__title {
  color: #0F172A !important;
}

[data-theme="light"] .article-content,
[data-theme="light"] .article-content p {
  color: #1E293B !important;
}

[data-theme="light"] .hero-news__excerpt,
[data-theme="light"] .news-meta,
[data-theme="light"] .news-meta__author,
[data-theme="light"] .header__nav-link,
[data-theme="light"] .top-bar__time,
[data-theme="light"] .top-bar__trending-links a {
  color: #475569 !important;
}

[data-theme="light"] .header__nav-link:hover,
[data-theme="light"] .header__nav-link.is-active,
[data-theme="light"] .top-bar__trending-links a:hover {
  color: #0F172A !important;
}

[data-theme="light"] .news-card__title a,
[data-theme="light"] .hero-news__title a,
[data-theme="light"] .popular-item__title a {
  color: #0F172A !important;
}

[data-theme="light"] .news-card__title a:hover,
[data-theme="light"] .hero-news__title a:hover,
[data-theme="light"] .popular-item__title a:hover {
  color: #0284C7 !important;
}

/* CSS Reset & Baseline */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-body);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
  color: var(--text-primary);
  font-weight: 800;
  line-height: 1.25;
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition-smooth);
}

img, picture, svg {
  display: block;
  max-width: 100%;
}

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

/* Reading Progress Bar */
.reading-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--brand-pulse), var(--brand-cyan));
  z-index: 1200;
  transition: width 0.1s ease-out;
}

/* Centralized Max-W-7XL Container */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

/* Interactive Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.625rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: var(--radius-sm);
  line-height: 1;
}

.badge--breaking {
  background-color: var(--brand-pulse);
  color: #FFFFFF;
}

.badge--category {
  background-color: var(--brand-cyan-glow);
  color: var(--brand-cyan);
  border: 1px solid rgba(0, 229, 255, 0.25);
}

.pulse-dot {
  width: 7px;
  height: 7px;
  background-color: currentColor;
  border-radius: 50%;
  display: inline-block;
  animation: pulse-dot-anim 1.4s infinite;
}

@keyframes pulse-dot-anim {
  0% { transform: scale(0.9); opacity: 0.6; }
  50% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.6; }
}

/* Lazy Load Images */
img.lazy-img {
  filter: blur(8px);
  transition: filter 0.35s ease-out, opacity 0.35s ease-out;
  opacity: 0.5;
}

img.lazy-img.loaded {
  filter: blur(0);
  opacity: 1;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 700;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: var(--transition-smooth);
  text-decoration: none;
}

.btn--primary {
  background-color: var(--brand-pulse);
  color: #FFFFFF;
}

.btn--primary:hover {
  background-color: var(--brand-pulse-hover);
  transform: translateY(-1px);
}

.btn--secondary {
  background-color: var(--bg-surface);
  color: var(--text-body);
  border: 1px solid var(--border-color);
}

.btn--secondary:hover {
  background-color: var(--bg-elevated);
  color: #FFFFFF;
}

.btn--danger {
  background-color: #EF4444;
  color: #FFFFFF;
}

.btn--danger:hover {
  background-color: #DC2626;
}

.btn--sm {
  padding: 0.35rem 0.75rem;
  font-size: 0.75rem;
}

/* Strict Responsive Display Isolation */
.mobile-drawer,
.mobile-drawer__backdrop,
.bottom-nav,
.mobile-only {
  display: none;
}

@media (max-width: 767.98px) {
  .desktop-only {
    display: none !important;
  }
  .mobile-only {
    display: block !important;
  }
  .bottom-nav {
    display: flex !important;
  }
  .mobile-drawer {
    display: flex !important;
  }
}

@media (min-width: 768px) {
  .mobile-only,
  .mobile-drawer,
  .mobile-drawer__backdrop,
  .bottom-nav {
    display: none !important;
  }
  .desktop-only {
    display: block !important;
  }
}
