/* ================================================================
   VELIXA KNOWLEDGE BASE — DESIGN SYSTEM
   style.css · Dark-first, glassmorphism, premium feel
   ================================================================ */

/* ── Google Fonts ── */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Inter:wght@300;400;500;600&display=swap');

/* ── CSS Custom Properties ── */
:root {
  /* Colors – Dark Theme (Default) */
  --bg-primary:    #080c1a;
  --bg-secondary:  #0d1225;
  --bg-card:       rgba(255, 255, 255, 0.04);
  --bg-card-hover: rgba(255, 255, 255, 0.07);
  --bg-glass:      rgba(13, 18, 37, 0.8);
  --border:        rgba(255, 255, 255, 0.08);
  --border-hover:  rgba(255, 255, 255, 0.16);

  /* Text */
  --text-primary:  #f1f5f9;
  --text-secondary:#94a3b8;
  --text-muted:    #475569;

  /* Accent Colors */
  --violet:        #7c3aed;
  --violet-light:  #8b5cf6;
  --violet-glow:   rgba(124, 58, 237, 0.25);
  --cyan:          #06b6d4;
  --cyan-glow:     rgba(6, 182, 212, 0.2);
  --emerald:       #10b981;
  --rose:          #f43f5e;
  --amber:         #f59e0b;
  --blue:          #3b82f6;
  --orange:        #f97316;
  --indigo:        #6366f1;
  --teal:          #14b8a6;
  --pink:          #ec4899;

  /* Category Colors */
  --cat-finance:     #10b981;
  --cat-legal:       #7c3aed;
  --cat-health:      #f43f5e;
  --cat-insurance:   #3b82f6;
  --cat-ai:          #06b6d4;
  --cat-webdev:      #f97316;
  --cat-crypto:      #f59e0b;
  --cat-saas:        #6366f1;
  --cat-travel:      #14b8a6;
  --cat-productivity:#ec4899;

  /* Typography */
  --font-heading: 'Outfit', system-ui, sans-serif;
  --font-body:    'Inter', system-ui, sans-serif;

  /* Spacing */
  --space-xs:  0.25rem;
  --space-sm:  0.5rem;
  --space-md:  1rem;
  --space-lg:  1.5rem;
  --space-xl:  2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  --space-4xl: 6rem;

  /* Radii */
  --radius-sm:  8px;
  --radius-md:  12px;
  --radius-lg:  16px;
  --radius-xl:  24px;
  --radius-full:9999px;

  /* Shadows */
  --shadow-sm:  0 1px 3px rgba(0,0,0,0.4);
  --shadow-md:  0 4px 20px rgba(0,0,0,0.5);
  --shadow-lg:  0 8px 40px rgba(0,0,0,0.6);
  --shadow-glow:0 0 30px var(--violet-glow);

  /* Transitions */
  --transition-fast:   0.15s ease;
  --transition-base:   0.25s ease;
  --transition-slow:   0.4s ease;

  /* Layout */
  --container-max: 1280px;
  --header-height: 72px;
}

/* Light Theme */
[data-theme="light"] {
  --bg-primary:    #f8fafc;
  --bg-secondary:  #f1f5f9;
  --bg-card:       rgba(255, 255, 255, 0.9);
  --bg-card-hover: rgba(255, 255, 255, 1);
  --bg-glass:      rgba(248, 250, 252, 0.9);
  --border:        rgba(0, 0, 0, 0.08);
  --border-hover:  rgba(0, 0, 0, 0.16);
  --text-primary:  #0f172a;
  --text-secondary:#475569;
  --text-muted:    #94a3b8;
  --shadow-md:     0 4px 20px rgba(0,0,0,0.1);
  --shadow-lg:     0 8px 40px rgba(0,0,0,0.15);
}

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

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

body {
  font-family: var(--font-body);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  transition: background-color var(--transition-base), color var(--transition-base);
}

/* ── Background Decoration ── */
body::before {
  content: '';
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background:
    radial-gradient(ellipse 80% 50% at 20% -10%, rgba(124,58,237,0.12) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 80% 110%, rgba(6,182,212,0.08) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-xl);
  position: relative;
  z-index: 1;
}

/* ── Typography ── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-primary);
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.5rem); }
h4 { font-size: 1.1rem; }

p { color: var(--text-secondary); line-height: 1.7; }

a {
  color: var(--violet-light);
  text-decoration: none;
  transition: color var(--transition-fast);
}
a:hover { color: var(--cyan); }

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

/* ── Gradient Text ── */
.gradient-text {
  background: linear-gradient(135deg, var(--violet-light) 0%, var(--cyan) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Header / Navigation ── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  height: var(--header-height);
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: var(--space-lg);
}

.logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.4rem;
  color: var(--text-primary);
  text-decoration: none;
  flex-shrink: 0;
}

.logo-icon {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--violet), var(--cyan));
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

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

.nav-links a {
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text-primary);
  background: var(--bg-card);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

/* Search Bar in Nav */
.nav-search {
  position: relative;
  display: flex;
  align-items: center;
}

.nav-search input {
  width: 220px;
  padding: 8px 16px 8px 38px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  color: var(--text-primary);
  font-size: 0.875rem;
  font-family: var(--font-body);
  transition: all var(--transition-base);
  outline: none;
}

.nav-search input::placeholder { color: var(--text-muted); }

.nav-search input:focus {
  border-color: var(--violet);
  box-shadow: 0 0 0 3px var(--violet-glow);
  width: 280px;
}

.nav-search .search-icon {
  position: absolute;
  left: 12px;
  color: var(--text-muted);
  width: 16px; height: 16px;
  pointer-events: none;
}

/* Theme Toggle */
.theme-toggle {
  width: 40px; height: 40px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
  flex-shrink: 0;
}

.theme-toggle:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
  border-color: var(--border-hover);
}

/* Mobile Nav Toggle */
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: var(--space-sm);
  background: none;
  border: none;
  z-index: 1001;
  position: relative;
}

.nav-hamburger span {
  display: block;
  width: 22px; height: 2px;
  background: var(--text-secondary);
  border-radius: 2px;
  transition: all var(--transition-base);
}

/* Mobile menu default state: hidden on desktop */
.mobile-menu {
  display: none;
  z-index: 998 !important;
}

/* Global SVG Search Icon sizing */
.search-icon {
  width: 16px !important;
  height: 16px !important;
  max-width: 16px !important;
  max-height: 16px !important;
  flex-shrink: 0;
}

/* ── Hero Section ── */
.hero {
  padding: var(--space-4xl) 0 var(--space-3xl);
  text-align: center;
  position: relative;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 6px 16px;
  background: rgba(124,58,237,0.15);
  border: 1px solid rgba(124,58,237,0.3);
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--violet-light);
  margin-bottom: var(--space-xl);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.hero-badge .dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--emerald);
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.5; transform: scale(0.8); }
}

.hero-title {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 800;
  margin-bottom: var(--space-lg);
  line-height: 1.1;
}

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto var(--space-2xl);
}

.hero-search {
  max-width: 580px;
  margin: 0 auto var(--space-2xl);
  position: relative;
}

.hero-search input {
  width: 100%;
  padding: 18px 60px 18px 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  color: var(--text-primary);
  font-size: 1rem;
  font-family: var(--font-body);
  outline: none;
  transition: all var(--transition-base);
  backdrop-filter: blur(10px);
}

.hero-search input:focus {
  border-color: var(--violet);
  box-shadow: 0 0 0 3px var(--violet-glow), var(--shadow-md);
}

.hero-search input::placeholder { color: var(--text-muted); }

.hero-search .search-btn {
  position: absolute;
  right: 8px; top: 50%;
  transform: translateY(-50%);
  width: 42px; height: 42px;
  background: linear-gradient(135deg, var(--violet), var(--violet-light));
  border: none;
  border-radius: var(--radius-md);
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.hero-search .search-btn:hover {
  transform: translateY(-50%) scale(1.05);
  box-shadow: 0 4px 15px var(--violet-glow);
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: var(--space-3xl);
  flex-wrap: wrap;
}

.hero-stat { text-align: center; }

.hero-stat-number {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--violet-light), var(--cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 2px;
}

/* ── Badge Category — color from CSS var ── */
.badge-category {
  background: rgba(124,58,237,0.12);
  color: var(--cat-color, var(--violet-light));
  border: 1px solid color-mix(in srgb, var(--cat-color, var(--violet)) 40%, transparent);
}

/* Fallback for browsers without color-mix */
@supports not (color: color-mix(in srgb, red, blue)) {
  .badge-category {
    border: 1px solid rgba(124,58,237,0.3);
  }
}

/* ── Today's Updates Banner ── */
.today-section {
  padding: var(--space-2xl) 0;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-xl);
  gap: var(--space-md);
}

.section-title {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 700;
}

.section-title .badge-live {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  background: rgba(16,185,129,0.15);
  border: 1px solid rgba(16,185,129,0.3);
  border-radius: var(--radius-full);
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--emerald);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.see-all-link {
  font-size: 0.875rem;
  color: var(--violet-light);
  font-weight: 500;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: gap var(--transition-fast);
}
.see-all-link:hover { gap: 8px; }

/* ── Categories Grid ── */
.categories-section { padding: var(--space-2xl) 0; }

.categories-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: var(--space-md);
}

.category-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl) var(--space-lg);
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-base);
  text-decoration: none;
  display: block;
  position: relative;
  overflow: hidden;
}

.category-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--cat-color, var(--violet)), transparent);
  opacity: 0;
  transition: opacity var(--transition-base);
}

.category-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
  box-shadow: var(--shadow-md);
}

.category-card:hover::before { opacity: 0.06; }

.category-icon {
  font-size: 2rem;
  margin-bottom: var(--space-md);
  display: block;
}

.category-name {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.category-count {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.category-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--cat-color, var(--violet));
  margin: var(--space-sm) auto 0;
}

/* ── Article Cards ── */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
}

.articles-grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
.articles-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }

.article-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  transition: all var(--transition-base);
  cursor: pointer;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  position: relative;
  overflow: hidden;
}

.article-card::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--cat-color, var(--violet)), transparent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition-base);
}

.article-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
  box-shadow: var(--shadow-md);
}

.article-card:hover::after { transform: scaleX(1); }

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

.article-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge-new {
  background: rgba(16,185,129,0.15);
  color: var(--emerald);
  border: 1px solid rgba(16,185,129,0.3);
}

.badge-updated {
  background: rgba(6,182,212,0.15);
  color: var(--cyan);
  border: 1px solid rgba(6,182,212,0.3);
}

.badge-category {
  background: rgba(var(--cat-rgb, 124,58,237), 0.15);
  color: var(--cat-color, var(--violet-light));
  border: 1px solid rgba(var(--cat-rgb, 124,58,237), 0.3);
}

.article-read-time {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
}

.article-title {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.4;
  transition: color var(--transition-fast);
}

.article-card:hover .article-title { color: var(--violet-light); }

.article-summary {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.article-date {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.article-arrow {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: all var(--transition-fast);
  font-size: 0.75rem;
}

.article-card:hover .article-arrow {
  background: var(--violet);
  border-color: var(--violet);
  color: white;
}

/* ── Archive Timeline ── */
.archive-section { padding: var(--space-2xl) 0; }

.timeline-group {
  margin-bottom: var(--space-2xl);
}

.timeline-date-header {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

.timeline-date-label {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-secondary);
  white-space: nowrap;
}

.timeline-date-line {
  flex: 1;
  height: 1px;
  background: var(--border);
}

.timeline-date-count {
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.load-more-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  width: 100%;
  padding: var(--space-lg);
  background: var(--bg-card);
  border: 1px dashed var(--border);
  border-radius: var(--radius-lg);
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-base);
  margin-top: var(--space-lg);
  font-family: var(--font-body);
}

.load-more-btn:hover {
  background: var(--bg-card-hover);
  border-color: var(--violet);
  color: var(--violet-light);
}

/* ── Footer ── */
.site-footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: var(--space-3xl) 0 var(--space-xl);
  margin-top: var(--space-4xl);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--space-2xl);
  margin-bottom: var(--space-2xl);
}

.footer-brand p {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-top: var(--space-md);
  max-width: 260px;
  line-height: 1.6;
}

.footer-col-title {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: var(--space-lg);
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.footer-links a {
  font-size: 0.875rem;
  color: var(--text-muted);
  transition: color var(--transition-fast);
}

.footer-links a:hover { color: var(--text-primary); }

.footer-bottom {
  padding-top: var(--space-xl);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-md);
}

.footer-bottom p {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ── Breadcrumb ── */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: var(--space-xl);
  flex-wrap: wrap;
}

.breadcrumb a {
  color: var(--text-muted);
  transition: color var(--transition-fast);
}
.breadcrumb a:hover { color: var(--violet-light); }

.breadcrumb .sep { color: var(--text-muted); }
.breadcrumb .current { color: var(--text-secondary); }

/* ── AdSense Containers ── */
.ad-container {
  background: var(--bg-card);
  border: 1px dashed var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  text-align: center;
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.75rem;
  margin: var(--space-xl) 0;
}

.ad-container.leaderboard { min-height: 90px; }
.ad-container.rectangle  { min-height: 250px; }
.ad-container.sidebar    { min-height: 600px; }

/* ── Article Content Layout ── */
.article-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: var(--space-2xl);
  padding: var(--space-2xl) 0;
}

.article-main {}

.article-sidebar { display: flex; flex-direction: column; gap: var(--space-xl); }

.article-header { margin-bottom: var(--space-2xl); }

.article-header .article-meta {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
  flex-wrap: wrap;
}

.article-header h1 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  margin-bottom: var(--space-lg);
  line-height: 1.2;
}

.article-header .article-intro {
  font-size: 1.1rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

.article-body {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--text-secondary);
}

.article-body h2 {
  font-size: 1.5rem;
  color: var(--text-primary);
  margin: var(--space-2xl) 0 var(--space-lg);
  padding-bottom: var(--space-sm);
  border-bottom: 1px solid var(--border);
}

.article-body h3 {
  font-size: 1.2rem;
  color: var(--text-primary);
  margin: var(--space-xl) 0 var(--space-md);
}

.article-body p { margin-bottom: var(--space-lg); }

.article-body ul,
.article-body ol {
  padding-left: var(--space-xl);
  margin-bottom: var(--space-lg);
}

.article-body li { margin-bottom: var(--space-sm); }

.article-body strong { color: var(--text-primary); font-weight: 600; }

.article-body .callout {
  background: rgba(124,58,237,0.1);
  border: 1px solid rgba(124,58,237,0.25);
  border-left: 4px solid var(--violet);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  margin: var(--space-xl) 0;
  font-size: 0.95rem;
}

/* ── Sidebar Widgets ── */
.sidebar-widget {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
}

.sidebar-widget-title {
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-md);
  border-bottom: 1px solid var(--border);
}

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

.related-list li a {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.4;
  display: flex;
  gap: var(--space-sm);
  transition: color var(--transition-fast);
}

.related-list li a::before {
  content: '→';
  color: var(--violet-light);
  flex-shrink: 0;
}

.related-list li a:hover { color: var(--text-primary); }

/* ── What Changed Today Box ── */
.changed-today {
  background: rgba(16,185,129,0.08);
  border: 1px solid rgba(16,185,129,0.2);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  margin: var(--space-xl) 0;
}

.changed-today-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--emerald);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: var(--space-sm);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.changed-today ul {
  list-style: none;
  padding: 0;
}

.changed-today li {
  font-size: 0.875rem;
  color: var(--text-secondary);
  padding: 3px 0;
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
}

.changed-today li::before {
  content: '✓';
  color: var(--emerald);
  font-weight: 700;
  flex-shrink: 0;
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 10px 22px;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 600;
  font-family: var(--font-body);
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
  border: none;
  outline: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--violet), var(--violet-light));
  color: white;
  box-shadow: 0 4px 15px var(--violet-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px var(--violet-glow);
  color: white;
}

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

.btn-secondary:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
  color: var(--text-primary);
}

/* ── Category Page Header ── */
.category-hero {
  padding: var(--space-3xl) 0 var(--space-2xl);
  position: relative;
}

.category-hero-icon {
  font-size: 3rem;
  margin-bottom: var(--space-md);
  display: block;
}

/* ── Contact Form ── */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3xl);
  padding: var(--space-2xl) 0;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
}

.form-group label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.form-group input,
.form-group textarea,
.form-group select {
  padding: 12px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.9rem;
  font-family: var(--font-body);
  outline: none;
  transition: all var(--transition-base);
  width: 100%;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: var(--violet);
  box-shadow: 0 0 0 3px var(--violet-glow);
}

.form-group select { cursor: pointer; }

.form-group textarea {
  resize: vertical;
  min-height: 140px;
}

.form-group input::placeholder,
.form-group textarea::placeholder { color: var(--text-muted); }

.btn-submit {
  width: 100%;
  padding: 15px;
  font-size: 1rem;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--violet), var(--cyan));
  color: white;
  border: none;
  cursor: pointer;
  font-family: var(--font-heading);
  font-weight: 700;
  transition: all var(--transition-base);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
}

.btn-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px var(--violet-glow);
}

.form-success {
  display: none;
  text-align: center;
  padding: var(--space-2xl);
  background: rgba(16,185,129,0.1);
  border: 1px solid rgba(16,185,129,0.3);
  border-radius: var(--radius-lg);
}

.form-success h3 {
  color: var(--emerald);
  margin-bottom: var(--space-sm);
}

/* ── 404 Page ── */
.error-page {
  min-height: calc(100vh - var(--header-height));
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--space-4xl) 0;
}

.error-code {
  font-size: 8rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--violet-light), var(--cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
}

/* ── Search Page ── */
.search-page { padding: var(--space-2xl) 0; }

.search-stats {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: var(--space-xl);
}

.search-stats strong { color: var(--text-primary); }

.no-results {
  text-align: center;
  padding: var(--space-4xl) 0;
  color: var(--text-muted);
}

/* ── Scroll to Top ── */
#scroll-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 44px; height: 44px;
  background: linear-gradient(135deg, var(--violet), var(--violet-light));
  border: none;
  border-radius: 50%;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  box-shadow: var(--shadow-md);
  opacity: 0;
  transform: translateY(20px);
  transition: all var(--transition-base);
  z-index: 500;
}

#scroll-top.visible { opacity: 1; transform: translateY(0); }
#scroll-top:hover   { transform: translateY(-3px); box-shadow: var(--shadow-lg); }

/* ── Loading Spinner ── */
.spinner {
  width: 32px; height: 32px;
  border: 3px solid var(--border);
  border-top-color: var(--violet);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin: var(--space-xl) auto;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ── Select element dark mode fix ── */
select option {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px !important;
  cursor: pointer;
}

/* ── Contact form name grid responsive fix ── */
.form-name-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

@media (max-width: 480px) {
  .form-name-grid {
    grid-template-columns: 1fr;
  }
}

/* ── Category Cards ── */
.categories-section { padding: var(--space-2xl) 0; }

.categories-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: var(--space-lg);
}

.category-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: var(--space-xl) var(--space-lg);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  text-align: center;
  text-decoration: none;
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

.category-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--cat-color, var(--violet));
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.category-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.3);
}

.category-card:hover::before { opacity: 1; }

.category-icon { font-size: 2rem; line-height: 1; }
.category-name { font-family: var(--font-heading); font-size: 0.95rem; font-weight: 700; color: var(--text-primary); }
.category-count { font-size: 0.75rem; color: var(--text-muted); }
.category-dot { display: none; }

/* ── Category Hero (top of category page) ── */
.category-hero {
  text-align: center;
  padding: var(--space-3xl) 0 var(--space-2xl);
}

.category-hero-icon { font-size: 3.5rem; display: block; margin-bottom: 1rem; }

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 10px 22px;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: all var(--transition-fast);
}

.btn-primary {
  background: linear-gradient(135deg, var(--violet), var(--violet-light));
  color: white;
  box-shadow: 0 4px 15px var(--violet-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px var(--violet-glow);
  color: white;
}

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

.btn-secondary:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
  color: var(--text-primary);
}

/* ── Contact Form ── */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: var(--space-3xl);
  padding: var(--space-2xl) 0;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
}

.form-group label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
}

.form-group input,
.form-group select,
.form-group textarea {
  padding: 12px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.9rem;
  font-family: var(--font-body);
  outline: none;
  transition: all var(--transition-base);
  width: 100%;
}

.form-group input::placeholder,
.form-group textarea::placeholder { color: var(--text-muted); }

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--violet);
  box-shadow: 0 0 0 3px var(--violet-glow);
}

.form-group textarea { resize: vertical; min-height: 140px; }

.btn-submit {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 14px 32px;
  background: linear-gradient(135deg, var(--violet), var(--violet-light));
  color: white;
  border: none;
  border-radius: var(--radius-md);
  font-size: 1rem;
  font-weight: 600;
  font-family: var(--font-body);
  cursor: pointer;
  transition: all var(--transition-fast);
  box-shadow: 0 4px 15px var(--violet-glow);
  width: 100%;
  justify-content: center;
}

.btn-submit:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px var(--violet-glow);
}

.btn-submit:disabled { opacity: 0.7; cursor: not-allowed; }

.form-success {
  display: none;
  background: rgba(16,185,129,0.1);
  border: 1px solid rgba(16,185,129,0.3);
  border-radius: var(--radius-lg);
  padding: var(--space-2xl);
  text-align: center;
  margin-bottom: var(--space-xl);
}

.form-success h3 { color: var(--emerald); margin-bottom: 0.5rem; }
.form-success p  { color: var(--text-secondary); }

/* ── Error / 404 Page ── */
.error-page {
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-3xl) 0;
}

.error-code {
  font-size: clamp(6rem, 20vw, 12rem);
  font-family: var(--font-heading);
  font-weight: 900;
  background: linear-gradient(135deg, var(--violet-light), var(--cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  margin-bottom: var(--space-lg);
}

/* ── Changed Today Box (article page) ── */
.changed-today {
  background: rgba(16,185,129,0.08);
  border: 1px solid rgba(16,185,129,0.25);
  border-left: 4px solid var(--emerald);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  margin: var(--space-xl) 0;
}

.changed-today-title {
  font-weight: 700;
  color: var(--emerald);
  font-size: 0.875rem;
  margin-bottom: var(--space-sm);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.changed-today ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.changed-today li {
  font-size: 0.875rem;
  color: var(--text-secondary);
  padding-left: 1rem;
  position: relative;
}

.changed-today li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--emerald);
  font-size: 0.75rem;
}

/* ── Callout standalone (outside article-body) ── */
.callout {
  background: rgba(124,58,237,0.1);
  border: 1px solid rgba(124,58,237,0.25);
  border-left: 4px solid var(--violet);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  margin: var(--space-xl) 0;
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ── Section Header ── */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-xl);
  flex-wrap: wrap;
  gap: var(--space-md);
}

.section-title {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.section-title h2 { margin: 0; }

.see-all-link {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--violet-light);
  transition: color var(--transition-fast);
}

.see-all-link:hover { color: var(--cyan); }

/* ── Live badge ── */
.badge-live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  background: rgba(16,185,129,0.15);
  border: 1px solid rgba(16,185,129,0.3);
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--emerald);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.badge-live .dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--emerald);
  animation: pulse-dot 1.5s ease-in-out infinite;
}

/* ── Scroll to Top ── */
#scroll-top {
  position: fixed;
  bottom: 32px; right: 32px;
  width: 44px; height: 44px;
  background: linear-gradient(135deg, var(--violet), var(--violet-light));
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px var(--violet-glow);
  transition: all var(--transition-fast);
  opacity: 0;
  pointer-events: none;
  z-index: 500;
}

#scroll-top.visible { opacity: 1; pointer-events: all; }
#scroll-top:hover { transform: translateY(-3px); }

/* ── Search Page ── */
.search-stats {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: var(--space-xl);
  min-height: 1.5rem;
}

.search-stats strong { color: var(--text-primary); }

.no-results {
  text-align: center;
  padding: var(--space-3xl) var(--space-xl);
  color: var(--text-secondary);
}

.no-results h3 { color: var(--text-primary); margin-bottom: var(--space-md); }

/* ── Utility Classes ── */
.text-center  { text-align: center; }
.text-muted   { color: var(--text-muted); }
.mt-sm        { margin-top: var(--space-sm); }
.mt-md        { margin-top: var(--space-md); }
.mt-lg        { margin-top: var(--space-lg); }
.mt-xl        { margin-top: var(--space-xl); }
.mt-2xl       { margin-top: var(--space-2xl); }
.mb-xl        { margin-bottom: var(--space-xl); }
.mb-2xl       { margin-bottom: var(--space-2xl); }
.py-2xl       { padding: var(--space-2xl) 0; }
.hidden       { display: none !important; }

/* ── Animations ── */
.fade-in {
  animation: fadeIn 0.5s ease forwards;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.slide-up {
  animation: slideUp 0.4s ease forwards;
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
