/* ============================================================
   FINVESTALGO BLOG — Premium Brand Theme
   blog.finvestalgo.com
   Brand Colors: #046BD2 (Primary Blue), #161B50 (Dark Navy),
                  #10B048 (Green Accent), #020617 (Deep Dark),
                  #F2FBFB (Light Teal), #f0f5fa (Light Blue-Gray)
   ============================================================ */

/* ---------- CSS Custom Properties ---------- */
:root {
  /* === FinvestAlgo Brand Colors === */
  --brand-primary: #046BD2;
  --brand-primary-dark: #045cb4;
  --brand-primary-light: #1a7fe0;
  --brand-primary-deeper: #034a8f;

  --brand-navy: #161B50;
  --brand-navy-dark: #020617;
  --brand-navy-light: #1e2a6e;

  --brand-accent: #10B048;
  --brand-accent-light: #33CC7D;
  --brand-accent-dark: #0d8e3a;
  --brand-accent-glow: rgba(16, 176, 72, 0.15);

  --brand-bg-teal: #F2FBFB;
  --brand-bg-light: #f0f5fa;
  --brand-bg-white: #ffffff;
  --brand-bg-alt: #f8fafc;

  --text-dark: #0f172a;
  --text-primary: #1e293b;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --text-light: #94a3b8;

  --border-color: #e2e8f0;
  --border-light: #f1f5f9;

  --surface-card: #ffffff;
  --surface-card-hover: #f8fafc;

  --shadow-sm: 0 1px 2px rgba(2, 6, 23, 0.06);
  --shadow-md: 0 4px 12px rgba(2, 6, 23, 0.08);
  --shadow-lg: 0 8px 30px rgba(2, 6, 23, 0.10);
  --shadow-xl: 0 16px 48px rgba(2, 6, 23, 0.12);
  --shadow-glow-brand: 0 4px 24px rgba(4, 107, 210, 0.20);

  --gradient-brand: linear-gradient(135deg, #046BD2, #045cb4);
  --gradient-accent: linear-gradient(135deg, #10B048, #0d8e3a);
  --gradient-navy: linear-gradient(135deg, #161B50, #020617);
  --gradient-hero: linear-gradient(160deg, #020617 0%, #161B50 40%, #046BD2 100%);
  --gradient-card: linear-gradient(135deg, #046BD2, #1a7fe0);

  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', Consolas, monospace;

  /* 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;
  --space-5xl: 8rem;

  /* Layout */
  --max-width: 1200px;
  --max-width-narrow: 720px;
  --content-padding: 1.5rem;

  /* Borders */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-full: 9999px;

  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 300ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---------- Dark Theme ---------- */
[data-theme="dark"] {
  --brand-primary: #3b82f6;
  --brand-primary-dark: #2563eb;
  --brand-primary-light: #60a5fa;
  --brand-primary-deeper: #1d4ed8;

  --brand-navy: #1e293b;
  --brand-navy-dark: #0f172a;
  --brand-navy-light: #334155;

  --brand-accent: #22c55e;
  --brand-accent-light: #4ade80;
  --brand-accent-dark: #16a34a;

  --brand-bg-teal: #0f1a2e;
  --brand-bg-light: #1e293b;
  --brand-bg-white: #0f172a;
  --brand-bg-alt: #1e293b;

  --text-dark: #f1f5f9;
  --text-primary: #e2e8f0;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-light: #475569;

  --border-color: #334155;
  --border-light: #1e293b;

  --surface-card: #1e293b;
  --surface-card-hover: #263142;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.5);
  --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.6);
  --shadow-glow-brand: 0 4px 24px rgba(59, 130, 246, 0.25);

  --gradient-brand: linear-gradient(135deg, #3b82f6, #2563eb);
  --gradient-accent: linear-gradient(135deg, #22c55e, #16a34a);
  --gradient-navy: linear-gradient(135deg, #1e293b, #0f172a);
  --gradient-hero: linear-gradient(160deg, #020617 0%, #0f172a 50%, #1e293b 100%);
  --gradient-card: linear-gradient(135deg, #3b82f6, #60a5fa);
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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

body {
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-primary);
  background-color: var(--brand-bg-white);
  transition: background-color var(--transition-base), color var(--transition-base);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

::selection {
  background: rgba(4, 107, 210, 0.15);
  color: var(--text-dark);
}

[data-theme="dark"] ::selection {
  background: rgba(59, 130, 246, 0.3);
  color: #fff;
}

/* ============================================================
   TYPOGRAPHY
   ============================================================ */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-dark);
  margin-bottom: var(--space-md);
  transition: color var(--transition-base);
}

h1 { font-size: clamp(2rem, 4vw, 3.25rem); letter-spacing: -0.03em; }
h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); letter-spacing: -0.02em; }
h3 { font-size: clamp(1.25rem, 2vw, 1.5rem); }
h4 { font-size: 1.125rem; }
h5 { font-size: 1rem; }

p { margin-bottom: var(--space-lg); }
p:last-child { margin-bottom: 0; }

a {
  color: var(--brand-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--brand-primary-dark);
}

strong { font-weight: 600; }
small { font-size: 0.875rem; }

/* ============================================================
   UTILITY
   ============================================================ */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--content-padding);
}

.container-narrow {
  max-width: var(--max-width-narrow);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* Brand accent line */
.brand-accent-line {
  width: 48px;
  height: 4px;
  background: var(--gradient-brand);
  border-radius: var(--radius-full);
  margin-bottom: var(--space-lg);
}

.section-label {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--brand-primary);
  margin-bottom: var(--space-md);
}

.section-label::before {
  content: '';
  width: 24px;
  height: 2px;
  background: var(--brand-primary);
  border-radius: var(--radius-full);
}

/* ============================================================
   SKIP LINK
   ============================================================ */
.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-md);
  padding: var(--space-sm) var(--space-lg);
  background: var(--brand-primary);
  color: #fff;
  z-index: 1000;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  font-weight: 600;
  font-size: 0.9rem;
}

.skip-link:focus {
  top: 0;
}

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

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

@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(4, 107, 210, 0.4); }
  50% { box-shadow: 0 0 0 12px rgba(4, 107, 210, 0); }
}

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

.animate-in {
  animation: fadeInUp 0.6s ease forwards;
}

.animate-in-delay-1 { animation-delay: 0.1s; }
.animate-in-delay-2 { animation-delay: 0.2s; }
.animate-in-delay-3 { animation-delay: 0.3s; }
.animate-in-delay-4 { animation-delay: 0.4s; }
.animate-in-delay-5 { animation-delay: 0.5s; }

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

/* ============================================================
   HEADER & NAVIGATION
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-color);
  transition: background var(--transition-base), border-color var(--transition-base);
}

[data-theme="dark"] .site-header {
  background: rgba(15, 23, 42, 0.92);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--content-padding);
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  text-decoration: none;
  flex-shrink: 0;
}

.logo-icon-wrap {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient-card);
  color: #fff;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  box-shadow: var(--shadow-glow-brand);
  transition: transform var(--transition-fast);
}

.logo:hover .logo-icon-wrap {
  transform: scale(1.05);
}

.logo-text {
  display: flex;
  flex-direction: column;
}

.logo-text-main {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text-dark);
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.logo-text-sub {
  font-size: 0.65rem;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

/* Navigation */
.nav-main {
  display: flex;
  align-items: center;
  gap: var(--space-2xl);
}

.nav-list {
  display: flex;
  list-style: none;
  gap: var(--space-xl);
}

.nav-item {
  position: relative;
}

.nav-link {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  padding: var(--space-xs) 0;
  position: relative;
  transition: color var(--transition-fast);
  white-space: nowrap;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient-brand);
  border-radius: var(--radius-full);
  transition: width var(--transition-base);
}

.nav-link:hover,
.nav-link.active {
  color: var(--text-dark);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.nav-link.active {
  font-weight: 600;
  color: var(--brand-primary);
}

/* Header Actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 1.1rem;
  transition: all var(--transition-fast);
  position: relative;
}

.icon-btn:hover {
  border-color: var(--brand-primary);
  color: var(--brand-primary);
  background: rgba(4, 107, 210, 0.05);
}

[data-theme="dark"] .icon-btn:hover {
  background: rgba(59, 130, 246, 0.1);
}

.theme-toggle .sun-icon { display: none; }
.theme-toggle .moon-icon { display: block; }

[data-theme="dark"] .theme-toggle .sun-icon { display: block; }
[data-theme="dark"] .theme-toggle .moon-icon { display: none; }

/* Mobile Menu */
.mobile-menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 1.3rem;
  transition: all var(--transition-fast);
}

.mobile-menu-toggle:hover {
  border-color: var(--brand-primary);
  color: var(--brand-primary);
}

/* Mobile Nav Overlay */
@media (max-width: 900px) {
  .mobile-menu-toggle {
    display: flex;
  }

  .nav-main {
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    flex-direction: column;
    padding: var(--space-2xl);
    gap: var(--space-2xl);
    transform: translateX(100%);
    transition: transform var(--transition-base);
    z-index: 99;
    overflow-y: auto;
    border-top: 1px solid var(--border-color);
  }

  [data-theme="dark"] .nav-main {
    background: rgba(15, 23, 42, 0.98);
  }

  .nav-main.open {
    transform: translateX(0);
  }

  .nav-list {
    flex-direction: column;
    gap: var(--space-xs);
    width: 100%;
  }

  .nav-link {
    display: block;
    font-size: 1.125rem;
    padding: var(--space-md) 0;
    border-bottom: 1px solid var(--border-light);
  }

  .nav-link::after { display: none; }

  .header-actions {
    width: 100%;
    justify-content: flex-start;
    border-top: 1px solid var(--border-light);
    padding-top: var(--space-lg);
  }
}

/* ============================================================
   SEARCH OVERLAY
   ============================================================ */
.search-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(2, 6, 23, 0.6);
  backdrop-filter: blur(8px);
  z-index: 200;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 120px var(--content-padding) var(--content-padding);
  animation: fadeIn 0.2s ease;
}

.search-overlay.open { display: flex; }

.search-modal {
  background: var(--brand-bg-white);
  width: 100%;
  max-width: 640px;
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--border-color);
  animation: slideDown 0.25s ease;
}

.search-input-wrapper {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  border-bottom: 2px solid var(--brand-primary);
  padding-bottom: var(--space-md);
}

.search-input-wrapper .search-icon {
  font-size: 1.25rem;
  color: var(--text-muted);
  flex-shrink: 0;
}

.search-input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 1.2rem;
  font-family: var(--font-sans);
  color: var(--text-dark);
  outline: none;
}

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

.search-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: none;
  background: var(--brand-bg-alt);
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 1rem;
  transition: background var(--transition-fast);
  flex-shrink: 0;
}

.search-close:hover { background: var(--border-color); }

.search-results {
  margin-top: var(--space-lg);
  max-height: 400px;
  overflow-y: auto;
}

.search-result-item {
  display: block;
  padding: var(--space-md) var(--space-sm);
  border-radius: var(--radius-md);
  transition: background var(--transition-fast);
  margin-bottom: var(--space-xs);
}

.search-result-item:hover { background: var(--brand-bg-alt); }

.search-result-item h4 {
  margin-bottom: var(--space-xs);
  font-size: 0.95rem;
}

.search-result-item p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0;
}

.search-empty {
  text-align: center;
  padding: var(--space-2xl);
  color: var(--text-light);
}

.search-kbd {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-size: 0.7rem;
  color: var(--text-light);
  background: var(--brand-bg-alt);
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid var(--border-color);
  font-family: var(--font-sans);
}

/* ============================================================
   HERO SECTION (Homepage)
   ============================================================ */
.hero-section {
  background: var(--gradient-hero);
  color: #fff;
  padding: var(--space-4xl) 0 var(--space-3xl);
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: -20%;
  right: -10%;
  width: 700px;
  height: 700px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(4, 107, 210, 0.15), transparent 70%);
  pointer-events: none;
}

.hero-section::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -5%;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(16, 176, 72, 0.08), transparent 70%);
  pointer-events: none;
}

.hero-pattern {
  position: absolute;
  inset: 0;
  opacity: 0.04;
  background-image:
    radial-gradient(circle at 25% 25%, #fff 1px, transparent 1px),
    radial-gradient(circle at 75% 75%, #fff 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 680px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
  padding: var(--space-sm) var(--space-lg);
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: var(--space-xl);
  border: 1px solid rgba(255, 255, 255, 0.08);
  animation: fadeInUp 0.6s ease;
}

.hero-badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brand-accent);
  animation: pulseGlow 2s infinite;
}

.hero-title {
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 800;
  line-height: 1.08;
  color: #fff;
  margin-bottom: var(--space-lg);
  letter-spacing: -0.03em;
  animation: fadeInUp 0.6s ease 0.1s both;
}

.hero-title .highlight {
  background: linear-gradient(135deg, #33CC7D, #10B048);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-description {
  font-size: clamp(1rem, 1.5vw, 1.2rem);
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: var(--space-2xl);
  max-width: 560px;
  animation: fadeInUp 0.6s ease 0.2s both;
}

/* Hero Search */
.hero-search {
  display: flex;
  gap: var(--space-sm);
  max-width: 520px;
  animation: fadeInUp 0.6s ease 0.3s both;
}

.hero-search-input-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  gap: var(--space-md);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-lg);
  padding: 0 var(--space-lg);
  transition: all var(--transition-fast);
}

.hero-search-input-wrap:focus-within {
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.15);
}

.hero-search-input {
  flex: 1;
  background: transparent;
  border: none;
  padding: 14px 0;
  font-size: 0.95rem;
  font-family: var(--font-sans);
  color: #fff;
  outline: none;
}

.hero-search-input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.hero-search-btn {
  padding: 14px 28px;
  background: var(--gradient-accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-lg);
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.hero-search-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(16, 176, 72, 0.4);
}

/* Hero Stats */
.hero-stats {
  display: flex;
  gap: var(--space-3xl);
  padding-top: var(--space-2xl);
  margin-top: var(--space-2xl);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  animation: fadeInUp 0.6s ease 0.4s both;
}

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

.hero-stat-value {
  font-size: 1.75rem;
  font-weight: 800;
  color: #fff;
  line-height: 1;
  margin-bottom: var(--space-xs);
  letter-spacing: -0.02em;
}

.hero-stat-label {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.5);
  font-weight: 400;
}

@media (max-width: 768px) {
  .hero-section {
    padding: var(--space-3xl) 0 var(--space-2xl);
  }

  .hero-stats {
    gap: var(--space-2xl);
    flex-wrap: wrap;
  }

  .hero-search {
    flex-direction: column;
  }

  .hero-search-btn {
    width: 100%;
    text-align: center;
  }
}

/* ============================================================
   BLOG LAYOUT
   ============================================================ */
.blog-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: var(--space-3xl);
  padding: var(--space-3xl) 0;
}

.blog-main { min-width: 0; }
.blog-sidebar { min-width: 0; }

@media (max-width: 900px) {
  .blog-layout {
    grid-template-columns: 1fr;
  }
  .blog-sidebar {
    order: -1;
  }
}

/* ============================================================
   SECTION HEADERS
   ============================================================ */
.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: var(--space-2xl);
  gap: var(--space-lg);
}

.section-header-left {
  flex: 1;
}

.section-header h2 {
  margin-bottom: var(--space-sm);
}

.section-header .section-subtitle {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.section-header .section-link {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--brand-primary);
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  transition: gap var(--transition-fast);
  flex-shrink: 0;
}

.section-header .section-link:hover {
  gap: var(--space-md);
  color: var(--brand-primary-dark);
}

@media (max-width: 500px) {
  .section-header {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ============================================================
   FEATURED POST
   ============================================================ */
.featured-section {
  padding: var(--space-3xl) 0;
}

.featured-card {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 0;
  background: var(--surface-card);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  transition: box-shadow var(--transition-base), transform var(--transition-base);
  border: 1px solid var(--border-color);
}

.featured-card:hover {
  box-shadow: var(--shadow-xl);
  transform: translateY(-3px);
}

.featured-card-image {
  position: relative;
  overflow: hidden;
  min-height: 360px;
  background: var(--gradient-navy);
}

.featured-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
  transition: transform var(--transition-slow);
}

.featured-card:hover .featured-card-image img {
  transform: scale(1.05);
}

.featured-card-image-placeholder {
  width: 100%;
  height: 100%;
  min-height: 360px;
  background: var(--gradient-card);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.featured-card-image-placeholder .placeholder-icon {
  font-size: 4rem;
  opacity: 0.2;
  filter: brightness(10);
}

.featured-card-image .image-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, transparent 50%, rgba(2, 6, 23, 0.3));
}

.featured-card-image .card-category-flag {
  position: absolute;
  top: var(--space-lg);
  left: var(--space-lg);
  display: inline-flex;
  padding: var(--space-xs) var(--space-md);
  background: rgba(16, 176, 72, 0.9);
  backdrop-filter: blur(8px);
  color: #fff;
  border-radius: var(--radius-full);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.featured-card-body {
  padding: var(--space-2xl);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.featured-card-body .card-category {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--brand-accent);
  margin-bottom: var(--space-md);
}

.featured-card-body h2 {
  font-size: clamp(1.35rem, 2.5vw, 1.85rem);
  margin-bottom: var(--space-md);
  line-height: 1.3;
}

.featured-card-body h2 a {
  color: var(--text-dark);
  transition: color var(--transition-fast);
}

.featured-card-body h2 a:hover {
  color: var(--brand-primary);
}

.featured-card-body .card-excerpt {
  color: var(--text-secondary);
  margin-bottom: var(--space-lg);
  line-height: 1.7;
  font-size: 0.95rem;
}

.featured-card .card-meta {
  margin-top: auto;
}

@media (max-width: 768px) {
  .featured-card {
    grid-template-columns: 1fr;
  }

  .featured-card-image,
  .featured-card-image-placeholder {
    min-height: 220px;
  }

  .featured-card-image .image-overlay {
    background: linear-gradient(to top, rgba(2, 6, 23, 0.4), transparent);
  }

  .featured-card-body {
    padding: var(--space-xl);
  }
}

/* ============================================================
   ARTICLE CARDS
   ============================================================ */
.article-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-xl);
}

.article-grid.cols-3 {
  grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 900px) {
  .article-grid.cols-3 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .article-grid,
  .article-grid.cols-3 {
    grid-template-columns: 1fr;
  }
}

.article-card {
  background: var(--surface-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-base);
  border: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  position: relative;
}

.article-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
  border-color: var(--brand-primary);
}

.article-card-image-wrap {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: var(--brand-bg-light);
}

.article-card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.article-card:hover .article-card-image {
  transform: scale(1.06);
}

.article-card-image-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  color: var(--text-light);
  background: linear-gradient(135deg, var(--brand-bg-teal), var(--brand-bg-light));
  transition: transform var(--transition-slow);
}

.article-card:hover .article-card-image-placeholder {
  transform: scale(1.06);
}

.article-card-body {
  padding: var(--space-lg);
  flex: 1;
  display: flex;
  flex-direction: column;
}

.article-card-meta-top {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-sm);
}

.article-card .card-category {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--brand-primary);
  transition: color var(--transition-fast);
}

.article-card .card-category:hover {
  color: var(--brand-primary-dark);
}

.article-card .card-read-time {
  font-size: 0.75rem;
  color: var(--text-light);
}

.article-card h3 {
  font-size: 1.1rem;
  margin-bottom: var(--space-sm);
  line-height: 1.35;
}

.article-card h3 a {
  color: var(--text-dark);
  transition: color var(--transition-fast);
}

.article-card h3 a:hover {
  color: var(--brand-primary);
}

.article-card .card-excerpt {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-bottom: var(--space-lg);
  line-height: 1.65;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Card Meta */
.card-meta {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  font-size: 0.8rem;
  color: var(--text-muted);
  padding-top: var(--space-md);
  border-top: 1px solid var(--border-light);
}

.card-meta-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--gradient-card);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

.card-meta-author {
  font-weight: 500;
  color: var(--text-secondary);
}

.card-meta-date {
  margin-left: auto;
}

/* ============================================================
   CATEGORIES SECTION (Homepage)
   ============================================================ */
.categories-section {
  padding: var(--space-3xl) 0;
  background: var(--brand-bg-alt);
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

[data-theme="dark"] .categories-section {
  background: var(--brand-bg-light);
}

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

@media (max-width: 900px) {
  .category-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 500px) {
  .category-grid {
    grid-template-columns: 1fr;
  }
}

.category-card {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  padding: var(--space-lg);
  background: var(--surface-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  transition: all var(--transition-base);
  cursor: pointer;
}

.category-card:hover {
  border-color: var(--brand-primary);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.category-card-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.category-card-icon.blue { background: rgba(4, 107, 210, 0.1); color: var(--brand-primary); }
.category-card-icon.green { background: rgba(16, 176, 72, 0.1); color: var(--brand-accent); }
.category-card-icon.navy { background: rgba(22, 27, 80, 0.1); color: var(--brand-navy); }
.category-card-icon.teal { background: rgba(16, 176, 72, 0.08); color: var(--brand-accent-dark); }
.category-card-icon.purple { background: rgba(139, 92, 246, 0.1); color: #8b5cf6; }
.category-card-icon.orange { background: rgba(251, 146, 60, 0.1); color: #fb923c; }

.category-card-info h4 {
  font-size: 0.95rem;
  margin-bottom: 2px;
}

.category-card-info span {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ============================================================
   NEWSLETTER SECTION
   ============================================================ */
.newsletter-section {
  padding: var(--space-4xl) 0;
  text-align: center;
  background: var(--brand-bg-teal);
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

[data-theme="dark"] .newsletter-section {
  background: var(--brand-bg-light);
}

.newsletter-inner {
  max-width: 540px;
  margin: 0 auto;
}

.newsletter-section h2 {
  margin-bottom: var(--space-sm);
}

.newsletter-section .section-subtitle {
  color: var(--text-secondary);
  margin-bottom: var(--space-xl);
  font-size: 1rem;
}

.newsletter-form-wrap {
  display: flex;
  gap: var(--space-sm);
  background: var(--brand-bg-white);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: var(--space-sm);
  box-shadow: var(--shadow-md);
}

.newsletter-input {
  flex: 1;
  padding: 12px var(--space-lg);
  border: none;
  background: transparent;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  color: var(--text-dark);
  outline: none;
}

.newsletter-input::placeholder {
  color: var(--text-light);
}

.newsletter-btn {
  padding: 12px 28px;
  background: var(--gradient-brand);
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.newsletter-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(4, 107, 210, 0.35);
}

.newsletter-disclaimer {
  font-size: 0.78rem;
  color: var(--text-light);
  margin-top: var(--space-md);
}

@media (max-width: 500px) {
  .newsletter-form-wrap {
    flex-direction: column;
    padding: var(--space-md);
  }

  .newsletter-btn {
    width: 100%;
  }
}

/* ============================================================
   FOOTER — Minimal
   ============================================================ */
.site-footer {
  background: var(--brand-navy-dark);
  padding: var(--space-xl) 0;
  position: relative;
  overflow: hidden;
}

.site-footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-brand);
}

.footer-minimal {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-lg);
  flex-wrap: wrap;
}

.footer-minimal .logo {
  margin-bottom: 0;
}

.footer-minimal .logo .logo-text-main {
  color: #fff;
  font-size: 1rem;
}

.footer-minimal .logo .logo-icon-wrap {
  width: 32px;
  height: 32px;
  font-size: 0.7rem;
}

.footer-minimal-home {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 0.85rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.6);
  padding: var(--space-sm) var(--space-lg);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-full);
  transition: all var(--transition-fast);
  text-decoration: none;
}

.footer-minimal-home:hover {
  color: #fff;
  border-color: var(--brand-primary);
  background: rgba(4, 107, 210, 0.15);
}

.footer-minimal-copy {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.35);
}

@media (max-width: 500px) {
  .footer-minimal {
    flex-direction: column;
    text-align: center;
    justify-content: center;
  }
}

/* ============================================================
   PAGINATION
   ============================================================ */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--space-sm);
  margin-top: var(--space-3xl);
  padding-top: var(--space-2xl);
  border-top: 1px solid var(--border-color);
}

.pagination-item {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 42px;
  padding: 0 var(--space-sm);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.pagination-item:hover {
  border-color: var(--brand-primary);
  color: var(--brand-primary);
  background: rgba(4, 107, 210, 0.05);
}

.pagination-item.active {
  background: var(--gradient-brand);
  color: #fff;
  border-color: transparent;
  box-shadow: var(--shadow-glow-brand);
}

.pagination-item.disabled {
  opacity: 0.4;
  pointer-events: none;
  cursor: not-allowed;
}

/* ============================================================
   SIDEBAR
   ============================================================ */
.sidebar-section {
  margin-bottom: var(--space-2xl);
}

.sidebar-title {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-sm);
  border-bottom: 2px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.sidebar-title::before {
  content: '';
  width: 3px;
  height: 16px;
  background: var(--gradient-brand);
  border-radius: var(--radius-full);
}

/* About Widget */
.about-widget {
  background: var(--brand-bg-alt);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  border: 1px solid var(--border-color);
  text-align: center;
}

.about-widget-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--gradient-card);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
  margin: 0 auto var(--space-md);
  box-shadow: var(--shadow-glow-brand);
}

.about-widget h3 {
  font-size: 1.05rem;
  margin-bottom: var(--space-sm);
}

.about-widget p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-bottom: var(--space-lg);
  text-align: center;
}

.about-widget .social-links {
  display: flex;
  justify-content: center;
  gap: var(--space-sm);
}

.about-widget .social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: 0.9rem;
  transition: all var(--transition-fast);
  background: var(--brand-bg-white);
}

.about-widget .social-link:hover {
  border-color: var(--brand-primary);
  color: var(--brand-primary);
  background: rgba(4, 107, 210, 0.05);
  transform: translateY(-2px);
}

/* Category List */
.category-list {
  list-style: none;
}

.category-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-sm) 0;
  border-bottom: 1px solid var(--border-light);
}

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

.category-link {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  transition: color var(--transition-fast);
}

.category-link:hover { color: var(--brand-primary); }

.category-count {
  font-size: 0.78rem;
  color: var(--text-muted);
  background: var(--brand-bg-alt);
  padding: 2px 10px;
  border-radius: var(--radius-full);
  font-weight: 500;
}

/* Tag Cloud */
.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.tag {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 500;
  padding: 4px 14px;
  background: var(--brand-bg-alt);
  color: var(--text-secondary);
  border-radius: var(--radius-full);
  border: 1px solid var(--border-color);
  transition: all var(--transition-fast);
}

.tag:hover {
  background: var(--brand-primary);
  color: #fff;
  border-color: var(--brand-primary);
  transform: translateY(-1px);
}

/* Newsletter Widget */
.newsletter-widget {
  background: var(--gradient-navy);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  color: #fff;
  position: relative;
  overflow: hidden;
}

.newsletter-widget::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: rgba(4, 107, 210, 0.1);
  pointer-events: none;
}

.newsletter-widget h3 {
  font-size: 1.1rem;
  color: #fff;
  margin-bottom: var(--space-sm);
  position: relative;
}

.newsletter-widget p {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.65);
  margin-bottom: var(--space-lg);
  position: relative;
}

.newsletter-widget .newsletter-form-wrap {
  flex-direction: column;
  gap: var(--space-sm);
  background: transparent;
  border: none;
  padding: 0;
  box-shadow: none;
}

.newsletter-widget .newsletter-input {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-md);
  padding: 12px var(--space-md);
  color: #fff;
}

.newsletter-widget .newsletter-input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.newsletter-widget .newsletter-btn {
  width: 100%;
  background: var(--gradient-accent);
}

.newsletter-widget .newsletter-btn:hover {
  box-shadow: 0 4px 16px rgba(16, 176, 72, 0.4);
}

/* Recent Posts (Sidebar) */
.recent-posts-list {
  list-style: none;
}

.recent-post-item {
  display: flex;
  gap: var(--space-md);
  padding: var(--space-md) 0;
  border-bottom: 1px solid var(--border-light);
}

.recent-post-item:last-child { border-bottom: none; }

.recent-post-thumb {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-md);
  background: var(--brand-bg-light);
  flex-shrink: 0;
  overflow: hidden;
}

.recent-post-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.recent-post-thumb-placeholder {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--brand-bg-teal), var(--brand-bg-light));
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: var(--text-light);
}

.recent-post-info h4 {
  font-size: 0.88rem;
  margin-bottom: var(--space-xs);
  line-height: 1.35;
}

.recent-post-info h4 a {
  color: var(--text-dark);
}

.recent-post-info h4 a:hover {
  color: var(--brand-primary);
}

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

/* ============================================================
   BLOG LISTING PAGE (blog.html)
   ============================================================ */
.page-header {
  padding: var(--space-3xl) 0 var(--space-xl);
  text-align: center;
  background: var(--brand-bg-alt);
  border-bottom: 1px solid var(--border-color);
}

[data-theme="dark"] .page-header {
  background: var(--brand-bg-light);
}

.page-header h1 {
  margin-bottom: var(--space-sm);
}

.page-header p {
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto;
  font-size: 1.05rem;
}

/* Blog Controls (filter bar) */
.blog-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-lg);
  margin-bottom: var(--space-2xl);
  padding: var(--space-lg);
  background: var(--surface-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  flex-wrap: wrap;
}

.blog-controls-left {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  flex-wrap: wrap;
}

.blog-filter-btn {
  padding: 8px 18px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  background: transparent;
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.blog-filter-btn:hover {
  border-color: var(--brand-primary);
  color: var(--brand-primary);
}

.blog-filter-btn.active {
  background: var(--brand-primary);
  color: #fff;
  border-color: var(--brand-primary);
}

.blog-controls-right {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.blog-view-toggle {
  display: flex;
  align-items: center;
  gap: 2px;
  background: var(--brand-bg-alt);
  border-radius: var(--radius-md);
  padding: 2px;
  border: 1px solid var(--border-color);
}

.blog-view-btn {
  padding: 6px 10px;
  border: none;
  background: transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--text-muted);
  font-size: 0.9rem;
  transition: all var(--transition-fast);
}

.blog-view-btn.active {
  background: var(--brand-bg-white);
  color: var(--brand-primary);
  box-shadow: var(--shadow-sm);
}

.blog-result-count {
  font-size: 0.85rem;
  color: var(--text-muted);
  white-space: nowrap;
}

/* List View */
.article-list-view {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.article-list-item {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: var(--space-xl);
  background: var(--surface-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  transition: all var(--transition-base);
}

.article-list-item:hover {
  box-shadow: var(--shadow-lg);
  border-color: var(--brand-primary);
  transform: translateY(-2px);
}

.article-list-item .article-card-image-wrap {
  aspect-ratio: auto;
  height: 100%;
  min-height: 180px;
}

.article-list-item .article-card-body {
  padding: var(--space-lg) var(--space-lg) var(--space-lg) 0;
}

@media (max-width: 768px) {
  .article-list-item {
    grid-template-columns: 1fr;
  }

  .article-list-item .article-card-image-wrap {
    height: 200px;
  }

  .article-list-item .article-card-body {
    padding: var(--space-lg);
  }
}

/* ============================================================
   SINGLE POST
   ============================================================ */
.post-header {
  padding: var(--space-3xl) 0 var(--space-xl);
  text-align: center;
  background: var(--brand-bg-alt);
  border-bottom: 1px solid var(--border-color);
}

.post-header-inner {
  max-width: 780px;
  margin: 0 auto;
}

.post-category {
  display: inline-flex;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--brand-primary);
  margin-bottom: var(--space-lg);
}

.post-title {
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1.12;
  margin-bottom: var(--space-lg);
}

.post-excerpt {
  font-size: 1.1rem;
  color: var(--text-secondary);
  line-height: 1.7;
  max-width: 600px;
  margin: 0 auto var(--space-xl);
}

.post-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-lg);
  font-size: 0.88rem;
  color: var(--text-muted);
  flex-wrap: wrap;
}

.post-meta-item {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.post-meta-divider {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--text-light);
}

/* ============================================================
   POST CONTENT
   ============================================================ */
.post-content-wrapper {
  padding: var(--space-3xl) 0;
}

.post-content {
  font-size: 1.08rem;
  line-height: 1.85;
}

.post-content h2 {
  margin-top: var(--space-3xl);
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-sm);
  border-bottom: 2px solid var(--border-light);
}

.post-content h3 {
  margin-top: var(--space-2xl);
  margin-bottom: var(--space-md);
}

.post-content p {
  margin-bottom: var(--space-lg);
}

.post-content img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-lg);
  margin: var(--space-xl) 0;
  box-shadow: var(--shadow-md);
}

.post-content blockquote {
  margin: var(--space-xl) 0;
  padding: var(--space-lg) var(--space-xl);
  border-left: 4px solid var(--brand-primary);
  background: var(--brand-bg-alt);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-style: italic;
  color: var(--text-secondary);
}

.post-content pre {
  margin: var(--space-xl) 0;
  padding: var(--space-lg);
  background: #0f172a;
  color: #e2e8f0;
  border-radius: var(--radius-lg);
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  line-height: 1.7;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.post-content code {
  font-family: var(--font-mono);
  font-size: 0.87em;
}

.post-content p code,
.post-content li code {
  background: rgba(4, 107, 210, 0.08);
  color: var(--brand-primary-dark);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  font-size: 0.85em;
}

/* ============================================================
   TABLE OF CONTENTS
   ============================================================ */
.toc-wrapper {
  background: var(--surface-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: var(--space-lg) var(--space-xl);
  margin-bottom: var(--space-2xl);
}

.toc-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-sm);
  border-bottom: 1px solid var(--border-color);
}

.toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.toc-item {
  margin: 0;
}

.toc-link {
  display: block;
  padding: 6px 0 6px var(--space-md);
  font-size: 0.85rem;
  color: var(--text-secondary);
  text-decoration: none;
  border-left: 2px solid transparent;
  transition: all var(--transition-fast);
  line-height: 1.5;
}

.toc-link:hover {
  color: var(--brand-primary);
  border-left-color: var(--brand-primary);
}

.toc-link.active {
  color: var(--brand-primary);
  border-left-color: var(--brand-primary);
  font-weight: 600;
}

.toc-h3 {
  padding-left: var(--space-xl);
  font-size: 0.8rem;
}

.toc-h4 {
  padding-left: var(--space-2xl);
  font-size: 0.78rem;
}

.blog-sidebar .toc-wrapper.sidebar-only {
  margin-bottom: var(--space-xl);
}

@media (max-width: 900px) {
  .toc-wrapper.sidebar-only {
    display: none;
  }
}

/* ============================================================
   FAQ SECTION
   ============================================================ */
.faq-section {
  margin: var(--space-3xl) 0;
  padding: var(--space-xl);
  background: var(--surface-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
}

.faq-section h2 {
  font-size: 1.5rem;
  margin-bottom: var(--space-lg);
  text-align: center;
}

.faq-item {
  border-bottom: 1px solid var(--border-color);
  padding: var(--space-md) 0;
}

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

.faq-question {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-md);
  background: none;
  border: none;
  padding: var(--space-sm) 0;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  text-align: left;
  line-height: 1.5;
}

.faq-question:hover {
  color: var(--brand-primary);
}

.faq-toggle {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--brand-bg-alt);
  font-size: 1rem;
  color: var(--text-muted);
  transition: transform var(--transition-fast);
}

.faq-item.open .faq-toggle {
  transform: rotate(45deg);
  background: var(--brand-primary);
  color: #fff;
}

.faq-answer {
  display: none;
  padding: var(--space-sm) 0 var(--space-xs);
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

.faq-item.open .faq-answer {
  display: block;
}

/* ============================================================
   HERO IMAGE (Article)
   ============================================================ */
.post-hero-image {
  position: relative;
  width: 100%;
  height: 340px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: linear-gradient(135deg, var(--brand-primary-dark) 0%, var(--brand-navy) 100%);
  margin-bottom: var(--space-2xl);
  display: flex;
  align-items: center;
  justify-content: center;
}

.post-hero-image::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 80%, rgba(16, 176, 72, 0.15) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 20%, rgba(4, 107, 210, 0.2) 0%, transparent 60%);
  z-index: 1;
}

.post-hero-image-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: var(--space-xl);
}

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

.post-hero-image-content h2 {
  color: #fff;
  font-size: 1.4rem;
  font-weight: 700;
  margin: 0;
}

.post-hero-image-content p {
  color: rgba(255,255,255,0.7);
  font-size: 0.9rem;
  margin: var(--space-sm) 0 0;
}

@media (max-width: 600px) {
  .post-hero-image {
    height: 220px;
  }
  .post-hero-image-content .hero-icon {
    font-size: 2rem;
  }
  .post-hero-image-content h2 {
    font-size: 1.1rem;
  }
}

/* ============================================================
   RELATED ARTICLES FIX
   ============================================================ */
.related-posts {
  margin-top: var(--space-3xl);
  padding-top: var(--space-2xl);
  border-top: 1px solid var(--border-color);
}

.related-posts h3 {
  font-size: 1.3rem;
  margin-bottom: var(--space-lg);
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-lg);
}

.related-grid .article-card {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.related-grid .article-card .article-card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.related-grid .article-card .card-excerpt {
  flex: 1;
}

/* ============================================================
   INFOGRAPHIC / DATA VISUALIZATION (Article Content)
   ============================================================ */
.post-content .infographic-box {
  margin: var(--space-2xl) 0;
  padding: var(--space-xl);
  background: var(--brand-bg-alt);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  position: relative;
}

.post-content .infographic-box .infographic-title {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: var(--space-lg);
}

.post-content .data-row {
  display: flex;
  align-items: baseline;
  gap: var(--space-md);
  padding: var(--space-md) 0;
  border-bottom: 1px solid var(--border-light);
}

.post-content .data-row:last-child {
  border-bottom: none;
}

.post-content .data-label {
  font-size: 0.9rem;
  color: var(--text-secondary);
  min-width: 140px;
  flex-shrink: 0;
}

.post-content .data-value {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-dark);
}

.post-content .data-bar-wrap {
  flex: 1;
  height: 8px;
  background: var(--border-color);
  border-radius: var(--radius-full);
  overflow: hidden;
  max-width: 300px;
}

.post-content .data-bar-fill {
  height: 100%;
  border-radius: var(--radius-full);
  background: var(--gradient-brand);
}

.post-content .data-bar-fill.green {
  background: var(--gradient-accent);
}

.post-content .data-bar-fill.teal {
  background: linear-gradient(135deg, #14b8a6, #0d9488);
}

.post-content .metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: var(--space-md);
  margin: var(--space-lg) 0;
}

.post-content .metric-card {
  padding: var(--space-lg);
  background: var(--brand-bg-white);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  text-align: center;
}

.post-content .metric-card .metric-value {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--brand-primary);
  line-height: 1.2;
  margin-bottom: var(--space-xs);
}

.post-content .metric-card .metric-value.green {
  color: var(--brand-accent);
}

.post-content .metric-card .metric-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.post-content .comparison-table-wrap {
  overflow-x: auto;
  margin: var(--space-xl) 0;
}

.post-content .comparison-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.post-content .comparison-table th {
  background: var(--brand-navy-dark);
  color: #fff;
  padding: var(--space-md);
  text-align: left;
  font-weight: 600;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.post-content .comparison-table th:first-child {
  border-radius: var(--radius-md) 0 0 0;
}

.post-content .comparison-table th:last-child {
  border-radius: 0 var(--radius-md) 0 0;
}

.post-content .comparison-table td {
  padding: var(--space-md);
  border-bottom: 1px solid var(--border-light);
}

.post-content .comparison-table tr:last-child td {
  border-bottom: none;
}

.post-content .comparison-table tr:hover td {
  background: var(--brand-bg-alt);
}

.post-content .comparison-table .highlight-row td {
  background: rgba(4, 107, 210, 0.04);
  font-weight: 500;
}

.post-content .tip-box {
  margin: var(--space-xl) 0;
  padding: var(--space-lg);
  background: var(--brand-bg-white);
  border: 1px solid var(--border-color);
  border-left: 4px solid var(--brand-primary);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.post-content .tip-box .tip-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--brand-primary);
  margin-bottom: var(--space-sm);
}

.post-content .tip-box p {
  font-size: 0.92rem;
  color: var(--text-secondary);
  margin-bottom: 0;
}

.post-content .strategy-summary {
  margin: var(--space-xl) 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.post-content .strategy-summary-item {
  padding: var(--space-lg);
  background: var(--brand-bg-white);
}

.post-content .strategy-summary-item h4 {
  font-size: 0.85rem;
  margin-bottom: var(--space-xs);
}

.post-content .strategy-summary-item p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 0;
}

@media (max-width: 500px) {
  .post-content .strategy-summary {
    grid-template-columns: 1fr;
  }
  .post-content .data-row {
    flex-wrap: wrap;
    gap: var(--space-sm);
  }
  .post-content .data-label {
    min-width: 100px;
  }
}

/* ============================================================
   PIPELINE INFOGRAPHIC
   ============================================================ */
.post-content .pipeline {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  padding: var(--space-lg) 0;
  flex-wrap: wrap;
}

.post-content .pipeline-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-xs);
  min-width: 80px;
}

.post-content .pipeline-num {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--brand-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
  box-shadow: 0 2px 8px rgba(4, 107, 210, 0.25);
}

.post-content .pipeline-arrow {
  width: 24px;
  height: 2px;
  background: var(--border-color);
  position: relative;
  flex-shrink: 0;
}

.post-content .pipeline-arrow::after {
  content: '';
  position: absolute;
  right: -4px;
  top: 50%;
  transform: translateY(-50%);
  border: 5px solid transparent;
  border-left-color: var(--border-color);
}

.post-content .pipeline-label {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-align: center;
}

@media (max-width: 600px) {
  .post-content .pipeline {
    gap: var(--space-sm);
  }
  .post-content .pipeline-arrow {
    display: none;
  }
}

/* ============================================================
   ENHANCED BLOG LISTING
   ============================================================ */
.blog-page-layout {
  padding: var(--space-3xl) 0;
}

.blog-page-layout .blog-main {
  max-width: 100%;
}

.blog-page-layout .blog-sidebar {
  display: none;
}

.blog-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-lg);
  margin-bottom: var(--space-2xl);
  padding: var(--space-lg) var(--space-xl);
  background: var(--surface-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  flex-wrap: wrap;
}

.blog-controls-left {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

.blog-filter-btn {
  padding: 7px 18px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  background: transparent;
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.blog-filter-btn:hover {
  border-color: var(--brand-primary);
  color: var(--brand-primary);
  background: rgba(4, 107, 210, 0.04);
}

.blog-filter-btn.active {
  background: var(--brand-primary);
  color: #fff;
  border-color: var(--brand-primary);
  box-shadow: 0 2px 8px rgba(4, 107, 210, 0.25);
}

.blog-controls-right {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.blog-view-toggle {
  display: flex;
  align-items: center;
  gap: 2px;
  background: var(--brand-bg-alt);
  border-radius: var(--radius-md);
  padding: 3px;
  border: 1px solid var(--border-color);
}

.blog-view-btn {
  padding: 5px 8px;
  border: none;
  background: transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--text-muted);
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
}

.blog-view-btn.active {
  background: var(--brand-bg-white);
  color: var(--brand-primary);
  box-shadow: var(--shadow-sm);
}

.blog-view-btn svg {
  width: 16px;
  height: 16px;
}

.blog-result-count {
  font-size: 0.82rem;
  color: var(--text-muted);
  white-space: nowrap;
}

/* Article Featured Badge */
.article-card-featured-badge {
  position: absolute;
  top: var(--space-md);
  left: var(--space-md);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  background: rgba(4, 107, 210, 0.92);
  backdrop-filter: blur(8px);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-radius: var(--radius-full);
  z-index: 2;
}

.article-card-trending-badge {
  position: absolute;
  top: var(--space-md);
  right: var(--space-md);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  background: rgba(239, 68, 68, 0.9);
  backdrop-filter: blur(8px);
  color: #fff;
  font-size: 0.6rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-radius: var(--radius-full);
  z-index: 2;
}

.article-card-featured-badge.new {
  background: rgba(16, 176, 72, 0.9);
}

.article-card-image-wrap {
  position: relative;
}

/* List view */
.article-list-view {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.article-list-item {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 0;
  background: var(--surface-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  transition: all var(--transition-base);
}

.article-list-item:hover {
  box-shadow: var(--shadow-lg);
  border-color: var(--brand-primary);
  transform: translateY(-2px);
}

.article-list-item .article-card-image-wrap {
  height: 100%;
  min-height: 170px;
}

.article-list-item .article-card-body {
  padding: var(--space-lg) var(--space-xl);
}

@media (max-width: 768px) {
  .article-list-item {
    grid-template-columns: 1fr;
  }
  .article-list-item .article-card-image-wrap {
    height: 180px;
  }
  .article-list-item .article-card-body {
    padding: var(--space-lg);
  }
}

/* ============================================================
   SCROLLBAR
   ============================================================ */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ============================================================
   PRINT
   ============================================================ */
@media print {
  .site-header, .site-footer, .sidebar-section,
  .newsletter-section, .search-overlay, .blog-controls,
  .mobile-menu-toggle, .theme-toggle, .search-toggle,
  .pagination { display: none !important; }

  body { font-size: 12pt; color: #000; background: #fff; }
  .post-content { max-width: 100%; }
  a { color: #000; text-decoration: underline; }
}
