/* ===================================
   StatisticsFundamentals.com - Main CSS
   =================================== */

/* CSS Variables */
:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-light: #3b82f6;
  --secondary: #10b981;
  --secondary-dark: #059669;
  --accent: #8b5cf6;
  --gradient-start: #1e3a8a;
  --gradient-mid: #2563eb;
  --gradient-end: #0ea5e9;
  --gradient-green: #10b981;
  --bg-primary: #f8fafc;
  --bg-secondary: #f1f5f9;
  --bg-card: #ffffff;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --border: #e2e8f0;
  --border-light: #f1f5f9;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.08), 0 2px 8px rgba(0,0,0,0.04);
  --shadow-lg: 0 10px 40px rgba(0,0,0,0.1), 0 4px 16px rgba(0,0,0,0.06);
  --shadow-xl: 0 20px 60px rgba(0,0,0,0.12), 0 8px 24px rgba(0,0,0,0.08);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'Fira Code', 'Cascadia Code', monospace;
  --nav-height: 70px;
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-sans);
  color: var(--text-primary);
  background: var(--bg-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { cursor: pointer; font-family: inherit; border: none; background: none; }
input, textarea, select { font-family: inherit; }

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4, h5, h6 {
  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.25rem, 2.5vw, 1.75rem); }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.1rem; }
h6 { font-size: 1rem; }

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

.text-gradient {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ===== LAYOUT ===== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.container-wide {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 32px;
}

.section {
  padding: 96px 0;
}

.section-sm {
  padding: 64px 0;
}

.section-header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 64px;
}

.section-label {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--primary);
  background: rgba(37, 99, 235, 0.08);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  margin-bottom: 16px;
}

.section-title {
  margin-bottom: 16px;
}

.section-desc {
  color: var(--text-secondary);
  font-size: 1.1rem;
}

/* ===== GRID ===== */
.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* ===== FLEX ===== */
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-col { display: flex; flex-direction: column; }
.gap-2 { gap: 8px; }
.gap-4 { gap: 16px; }
.gap-6 { gap: 24px; }
.gap-8 { gap: 32px; }

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  font-weight: 600;
  transition: var(--transition);
  cursor: pointer;
  border: none;
  white-space: nowrap;
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: white;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.45);
}

.btn-secondary {
  background: linear-gradient(135deg, var(--secondary) 0%, #34d399 100%);
  color: white;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
}

.btn-secondary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.45);
}

.btn-outline {
  border: 2px solid var(--border);
  color: var(--text-primary);
  background: transparent;
}

.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(37, 99, 235, 0.04);
}

.btn-outline-white {
  border: 2px solid rgba(255,255,255,0.5);
  color: white;
  background: rgba(255,255,255,0.1);
  backdrop-filter: blur(8px);
}

.btn-outline-white:hover {
  background: rgba(255,255,255,0.2);
  border-color: white;
}

.btn-lg {
  padding: 16px 32px;
  font-size: 1.05rem;
  border-radius: var(--radius-lg);
}

.btn-sm {
  padding: 8px 16px;
  font-size: 0.85rem;
  border-radius: var(--radius-sm);
}

.btn-icon {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 50%;
}

/* ===== CARDS ===== */
.card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: 32px;
  transition: var(--transition);
}

.card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
  border-color: rgba(37, 99, 235, 0.15);
}

.card-sm {
  padding: 20px;
  border-radius: var(--radius-md);
}

.card-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 16px;
}

.card-icon-blue { background: rgba(37, 99, 235, 0.1); color: var(--primary); }
.card-icon-green { background: rgba(16, 185, 129, 0.1); color: var(--secondary); }
.card-icon-purple { background: rgba(139, 92, 246, 0.1); color: var(--accent); }
.card-icon-orange { background: rgba(245, 158, 11, 0.1); color: #f59e0b; }
.card-icon-red { background: rgba(239, 68, 68, 0.1); color: #ef4444; }

/* ===== BADGE ===== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 600;
}

.badge-blue { background: rgba(37, 99, 235, 0.1); color: var(--primary); }
.badge-green { background: rgba(16, 185, 129, 0.1); color: var(--secondary); }
.badge-purple { background: rgba(139, 92, 246, 0.1); color: var(--accent); }
.badge-gray { background: var(--bg-secondary); color: var(--text-secondary); }

/* ===== NAVIGATION ===== */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  height: var(--nav-height);
  transition: var(--transition);
}

.navbar.scrolled {
  box-shadow: var(--shadow-md);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}

.nav-logo-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.1rem;
  font-weight: 800;
}

.nav-logo-text {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text-primary);
}

.nav-logo-text span {
  color: var(--primary);
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
}

.nav-item {
  position: relative;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: var(--transition);
  cursor: pointer;
  white-space: nowrap;
}

.nav-link:hover, .nav-link.active {
  color: var(--primary);
  background: rgba(37, 99, 235, 0.06);
}

.nav-link i.fa-chevron-down {
  font-size: 0.7rem;
  transition: transform 0.2s;
}

.nav-item:hover .nav-link i.fa-chevron-down {
  transform: rotate(180deg);
}

/* Dropdown */
.nav-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) translateY(-8px);
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  min-width: 240px;
  padding: 8px;
  z-index: 100;
}

.nav-item:hover .nav-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.nav-dropdown-wide {
  min-width: 560px;
  padding: 24px;
}

.nav-dropdown-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.dropdown-section-title {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 8px 12px 4px;
  display: block;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
  transition: var(--transition);
  text-decoration: none;
}

.dropdown-item:hover {
  background: rgba(37, 99, 235, 0.06);
  color: var(--primary);
}

.dropdown-item-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.dropdown-item-text { font-size: 0.78rem; color: var(--text-muted); font-weight: 400; }

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  cursor: pointer;
}

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

/* Mobile Nav */
.mobile-nav {
  display: none;
  position: fixed;
  inset: 0;
  background: white;
  z-index: 999;
  padding: 80px 24px 24px;
  overflow-y: auto;
  flex-direction: column;
  gap: 8px;
}

.mobile-nav.active { display: flex; }

.mobile-nav-item {
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.mobile-nav-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  font-weight: 600;
  color: var(--text-primary);
  font-size: 1.05rem;
  cursor: pointer;
}

.mobile-nav-sub {
  display: none;
  padding: 8px 0 8px 16px;
  border-left: 2px solid var(--border);
  margin-left: 16px;
}

.mobile-nav-sub.active { display: block; }

.mobile-nav-sub a {
  display: block;
  padding: 10px 12px;
  color: var(--text-secondary);
  font-size: 0.9rem;
  border-radius: var(--radius-sm);
}

.mobile-nav-sub a:hover { color: var(--primary); background: rgba(37,99,235,0.05); }

/* ===== HERO SECTION ===== */
.hero {
  min-height: calc(100vh - var(--nav-height));
  background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 40%, #1e40af 70%, #0369a1 100%);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 60% at 70% 50%, rgba(16, 185, 129, 0.12) 0%, transparent 70%),
              radial-gradient(ellipse 50% 80% at 20% 80%, rgba(139, 92, 246, 0.1) 0%, transparent 60%);
}

.hero-bg-grid {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 48px 48px;
}

.hero-content {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 80px 24px;
}

.hero-left {}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.1);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.15);
  padding: 8px 16px;
  border-radius: var(--radius-full);
  color: rgba(255,255,255,0.9);
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 32px;
}

.hero-badge i { color: #fbbf24; }

.hero-title {
  font-size: clamp(2.2rem, 4.5vw, 3.75rem);
  font-weight: 800;
  color: white;
  line-height: 1.15;
  margin-bottom: 24px;
  letter-spacing: -0.02em;
}

.hero-title span {
  background: linear-gradient(135deg, #34d399 0%, #60a5fa 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-desc {
  font-size: 1.15rem;
  color: rgba(255,255,255,0.75);
  max-width: 500px;
  margin-bottom: 40px;
  line-height: 1.8;
}

.hero-buttons {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.hero-stats {
  display: flex;
  gap: 32px;
  margin-top: 48px;
}

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

.hero-stat-number {
  font-size: 1.75rem;
  font-weight: 800;
  color: white;
  display: block;
}

.hero-stat-label {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.6);
  margin-top: 2px;
}

/* Hero Right - Chart Area */
.hero-right {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-chart-wrapper {
  background: rgba(255,255,255,0.05);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius-xl);
  padding: 28px;
  width: 100%;
  max-width: 480px;
  position: relative;
}

.hero-chart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.hero-chart-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: rgba(255,255,255,0.9);
}

.hero-chart-badge {
  background: rgba(52, 211, 153, 0.2);
  color: #34d399;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 600;
}

#heroChart {
  height: 220px !important;
}

/* Floating Cards */
.floating-card {
  position: absolute;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(12px);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(255,255,255,0.5);
  animation: float 3s ease-in-out infinite;
}

.floating-card-1 {
  top: -20px;
  right: -20px;
  animation-delay: 0s;
}

.floating-card-2 {
  bottom: 40px;
  left: -30px;
  animation-delay: 1s;
}

.floating-card-3 {
  bottom: -10px;
  right: 40px;
  animation-delay: 2s;
}

.floating-card-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 500;
}

.floating-card-value {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text-primary);
}

.floating-card-value.green { color: var(--secondary); }
.floating-card-value.blue { color: var(--primary); }
.floating-card-value.purple { color: var(--accent); }

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-8px); }
}

/* ===== LEARN CATEGORIES SECTION ===== */
.learn-categories {
  background: white;
}

.categories-wrapper {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 0;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  min-height: 520px;
}

.categories-sidebar {
  background: var(--bg-secondary);
  border-right: 1px solid var(--border);
  overflow-y: auto;
  max-height: 580px;
}

.categories-sidebar::-webkit-scrollbar { width: 4px; }
.categories-sidebar::-webkit-scrollbar-track { background: transparent; }
.categories-sidebar::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

.category-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  cursor: pointer;
  transition: var(--transition);
  border-left: 3px solid transparent;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.category-item:hover {
  background: rgba(37, 99, 235, 0.05);
  color: var(--primary);
}

.category-item.active {
  background: rgba(37, 99, 235, 0.08);
  color: var(--primary);
  border-left-color: var(--primary);
  font-weight: 600;
}

.category-item i {
  width: 18px;
  text-align: center;
  font-size: 0.9rem;
  opacity: 0.7;
}

.categories-content {
  padding: 40px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.category-content-block { display: none; }
.category-content-block.active { display: block; }

.category-content-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.category-content-desc {
  color: var(--text-secondary);
  margin-bottom: 24px;
  line-height: 1.75;
}

.category-topics {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 32px;
}

.category-topic-tag {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 500;
  transition: var(--transition);
  border: 1px solid var(--border);
}

.category-topic-tag:hover {
  background: rgba(37, 99, 235, 0.06);
  color: var(--primary);
  border-color: rgba(37, 99, 235, 0.2);
}

.category-topic-tag i {
  color: var(--primary);
  font-size: 0.8rem;
}

/* ===== AUTHORITY SECTION ===== */
.authority {
  background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 50%, #0f2a5e 100%);
  color: white;
  position: relative;
  overflow: hidden;
}

.authority::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 50% at 80% 50%, rgba(16, 185, 129, 0.1) 0%, transparent 70%);
}

.authority-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  position: relative;
  z-index: 1;
}

.authority-card {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-lg);
  padding: 32px;
  transition: var(--transition);
}

.authority-card:hover {
  background: rgba(255,255,255,0.08);
  transform: translateY(-4px);
}

.authority-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 20px;
}

.authority-card h3 { color: white; margin-bottom: 12px; font-size: 1.25rem; }
.authority-card p { color: rgba(255,255,255,0.65); font-size: 0.95rem; line-height: 1.7; }

/* ===== TOOLS SECTION ===== */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.tool-group {
  background: white;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: var(--transition);
}

.tool-group:hover { box-shadow: var(--shadow-lg); }

.tool-group-header {
  padding: 20px 24px;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
}

.tool-group-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.tool-group-title { font-size: 1rem; font-weight: 700; }

.tool-links {
  padding: 12px;
}

.tool-link-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  transition: var(--transition);
  text-decoration: none;
}

.tool-link-item:hover {
  background: rgba(37, 99, 235, 0.05);
  color: var(--primary);
}

.tool-link-item i { width: 16px; font-size: 0.85rem; color: var(--text-muted); }
.tool-link-item:hover i { color: var(--primary); }

.tool-link-arrow { margin-left: auto; opacity: 0; transition: var(--transition); }
.tool-link-item:hover .tool-link-arrow { opacity: 1; transform: translateX(4px); }

/* ===== TUTORIALS SECTION ===== */
.tutorials-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.tutorial-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  text-align: center;
  transition: var(--transition);
  text-decoration: none;
  cursor: pointer;
  display: block;
}

.tutorial-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
  border-color: rgba(37, 99, 235, 0.2);
}

.tutorial-icon {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-lg);
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
}

.tutorial-name {
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 6px;
  color: var(--text-primary);
}

.tutorial-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* ===== BLOG SECTION ===== */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.blog-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
  text-decoration: none;
  display: block;
}

.blog-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.blog-card-img {
  height: 200px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: rgba(255,255,255,0.4);
  position: relative;
  overflow: hidden;
}

.blog-card-body {
  padding: 24px;
}

.blog-card-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.blog-card-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 10px;
  line-height: 1.4;
}

.blog-card:hover .blog-card-title { color: var(--primary); }

.blog-card-excerpt {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-card-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.blog-author {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.blog-author-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
}

/* ===== FAQ SECTION ===== */
.faq-list {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq-item {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: var(--transition);
}

.faq-item.open { border-color: rgba(37, 99, 235, 0.2); box-shadow: var(--shadow-sm); }

.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-primary);
  gap: 16px;
}

.faq-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--bg-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  flex-shrink: 0;
  transition: var(--transition);
  color: var(--text-muted);
}

.faq-item.open .faq-icon {
  background: var(--primary);
  color: white;
  transform: rotate(45deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
  padding: 0 24px;
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.75;
}

.faq-item.open .faq-answer {
  max-height: 300px;
  padding-bottom: 20px;
}

/* ===== REVIEWS SECTION ===== */
.reviews-section {
  background: var(--bg-secondary);
  overflow: hidden;
}

.reviews-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  max-height: 600px;
  overflow: hidden;
  position: relative;
}

.reviews-columns::before,
.reviews-columns::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  height: 80px;
  z-index: 2;
  pointer-events: none;
}

.reviews-columns::before {
  top: 0;
  background: linear-gradient(to bottom, var(--bg-secondary), transparent);
}

.reviews-columns::after {
  bottom: 0;
  background: linear-gradient(to top, var(--bg-secondary), transparent);
}

.reviews-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.reviews-col-up { animation: scrollUp 30s linear infinite; }
.reviews-col-down { animation: scrollDown 30s linear infinite; }

@keyframes scrollUp {
  0% { transform: translateY(0); }
  100% { transform: translateY(-50%); }
}

@keyframes scrollDown {
  0% { transform: translateY(-50%); }
  100% { transform: translateY(0); }
}

.reviews-col:hover { animation-play-state: paused; }

.review-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
  transition: var(--transition);
  flex-shrink: 0;
}

.review-card:hover { box-shadow: var(--shadow-md); border-color: rgba(37, 99, 235, 0.15); }

.review-stars {
  color: #fbbf24;
  font-size: 0.85rem;
  margin-bottom: 10px;
  letter-spacing: 2px;
}

.review-text {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 14px;
}

.review-author {
  display: flex;
  align-items: center;
  gap: 10px;
}

.review-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 0.78rem;
  font-weight: 700;
  flex-shrink: 0;
}

.review-name { font-weight: 600; font-size: 0.875rem; color: var(--text-primary); }
.review-role { font-size: 0.78rem; color: var(--text-muted); }

/* ===== CTA SECTION ===== */
.cta-section {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 50%, #0c4a6e 100%);
  color: white;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 50% 80% at 50% 100%, rgba(16, 185, 129, 0.2) 0%, transparent 70%);
}

.cta-content { position: relative; z-index: 1; max-width: 640px; margin: 0 auto; }
.cta-title { font-size: clamp(1.75rem, 3vw, 2.5rem); color: white; margin-bottom: 16px; }
.cta-desc { color: rgba(255,255,255,0.75); margin-bottom: 40px; font-size: 1.05rem; }

.cta-email-form {
  display: flex;
  gap: 12px;
  max-width: 480px;
  margin: 0 auto 24px;
}

.cta-email-input {
  flex: 1;
  padding: 14px 20px;
  border-radius: var(--radius-md);
  border: none;
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(8px);
  color: white;
  font-size: 0.95rem;
  outline: none;
}

.cta-email-input::placeholder { color: rgba(255,255,255,0.5); }
.cta-email-input:focus { background: rgba(255,255,255,0.2); }

.cta-privacy { font-size: 0.8rem; color: rgba(255,255,255,0.5); }

/* ===== FOOTER ===== */
.footer {
  background: #0f172a;
  color: rgba(255,255,255,0.7);
  padding: 64px 0 32px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}

.footer-brand {}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.footer-logo-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.1rem;
  font-weight: 800;
}

.footer-logo-text {
  font-size: 1rem;
  font-weight: 700;
  color: white;
}

.footer-tagline {
  font-size: 0.875rem;
  line-height: 1.7;
  margin-bottom: 20px;
  color: rgba(255,255,255,0.55);
}

.footer-socials {
  display: flex;
  gap: 10px;
}

.social-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.5);
  font-size: 0.9rem;
  transition: var(--transition);
}

.social-btn:hover {
  background: var(--primary);
  color: white;
}

.footer-col-title {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
  margin-bottom: 16px;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links a {
  color: rgba(255,255,255,0.6);
  font-size: 0.875rem;
  transition: var(--transition);
}

.footer-links a:hover { color: white; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  font-size: 0.82rem;
}

.footer-copyright { color: rgba(255,255,255,0.4); }

.footer-bottom-links {
  display: flex;
  gap: 20px;
}

.footer-bottom-links a {
  color: rgba(255,255,255,0.4);
  transition: var(--transition);
}

.footer-bottom-links a:hover { color: rgba(255,255,255,0.8); }

/* ===== PAGE HEADER ===== */
.page-header {
  background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 60%, #0369a1 100%);
  padding: 80px 0 72px;
  position: relative;
  overflow: hidden;
}

.page-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 48px 48px;
}

.page-header-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(255,255,255,0.6);
  font-size: 0.85rem;
  margin-bottom: 16px;
}

.breadcrumb a { color: rgba(255,255,255,0.6); transition: var(--transition); }
.breadcrumb a:hover { color: white; }
.breadcrumb i { font-size: 0.65rem; }

.page-header h1 {
  color: white;
  font-size: clamp(1.75rem, 3.5vw, 2.75rem);
  margin-bottom: 16px;
}

.page-header p {
  color: rgba(255,255,255,0.7);
  font-size: 1.1rem;
  max-width: 600px;
  line-height: 1.7;
}

/* ===== CONTENT LAYOUT ===== */
.content-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 40px;
  align-items: start;
}

.content-sidebar {}

.sidebar-widget {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 24px;
}

.sidebar-widget-title {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.sidebar-links {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.875rem;
  transition: var(--transition);
}

.sidebar-link:hover, .sidebar-link.active {
  background: rgba(37, 99, 235, 0.06);
  color: var(--primary);
}

.sidebar-link i { width: 16px; font-size: 0.8rem; color: var(--text-muted); }
.sidebar-link:hover i, .sidebar-link.active i { color: var(--primary); }

/* ===== ARTICLE CONTENT ===== */
.article-content {
  background: white;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: 48px;
}

.article-content h2 {
  font-size: 1.5rem;
  margin: 40px 0 16px;
  padding-top: 8px;
  color: var(--text-primary);
}

.article-content h2:first-child { margin-top: 0; }

.article-content h3 {
  font-size: 1.2rem;
  margin: 28px 0 12px;
}

.article-content p {
  margin-bottom: 16px;
}

.article-content ul, .article-content ol {
  list-style: none;
  margin-bottom: 16px;
  padding-left: 0;
}

.article-content ul li, .article-content ol li {
  padding: 6px 0 6px 24px;
  position: relative;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.article-content ul li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--primary);
  font-size: 0.85rem;
}

.article-content ol { counter-reset: list; }
.article-content ol li { counter-increment: list; }
.article-content ol li::before {
  content: counter(list);
  position: absolute;
  left: 0;
  width: 18px;
  height: 18px;
  background: var(--primary);
  color: white;
  border-radius: 50%;
  font-size: 0.65rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  top: 8px;
}

.callout {
  border-radius: var(--radius-md);
  padding: 20px 24px;
  margin: 24px 0;
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.callout-info { background: rgba(37, 99, 235, 0.06); border-left: 3px solid var(--primary); }
.callout-success { background: rgba(16, 185, 129, 0.06); border-left: 3px solid var(--secondary); }
.callout-warning { background: rgba(245, 158, 11, 0.06); border-left: 3px solid #f59e0b; }
.callout-tip { background: rgba(139, 92, 246, 0.06); border-left: 3px solid var(--accent); }

.callout i { font-size: 1rem; margin-top: 2px; }
.callout-info i { color: var(--primary); }
.callout-success i { color: var(--secondary); }
.callout-warning i { color: #f59e0b; }
.callout-tip i { color: var(--accent); }

.callout p { margin: 0; font-size: 0.9rem; }

/* Formula Box */
.formula-box {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  margin: 20px 0;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 1.1rem;
  color: var(--primary);
  font-weight: 600;
}

/* Example Box */
.example-box {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.04) 0%, rgba(16, 185, 129, 0.04) 100%);
  border: 1px solid rgba(37, 99, 235, 0.12);
  border-radius: var(--radius-md);
  padding: 24px;
  margin: 20px 0;
}

.example-box-title {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--primary);
  margin-bottom: 12px;
}

/* Data Table */
.data-table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  margin: 24px 0;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.data-table th {
  background: var(--bg-secondary);
  padding: 12px 16px;
  text-align: left;
  font-weight: 700;
  color: var(--text-primary);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--border);
}

.data-table td {
  padding: 11px 16px;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-secondary);
}

.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: rgba(37, 99, 235, 0.03); }

/* ===== CALCULATOR ===== */
.calculator-box {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.calculator-header {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  padding: 28px 32px;
  color: white;
}

.calculator-header h2 { color: white; font-size: 1.25rem; margin-bottom: 4px; }
.calculator-header p { color: rgba(255,255,255,0.7); font-size: 0.9rem; }

.calculator-body {
  padding: 32px;
}

.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.form-input {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  color: var(--text-primary);
  background: white;
  transition: var(--transition);
  outline: none;
}

.form-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-hint { font-size: 0.8rem; color: var(--text-muted); margin-top: 6px; }

.results-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-top: 24px;
}

.result-card {
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  padding: 20px;
  text-align: center;
  border: 1px solid var(--border);
}

.result-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.result-value {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--primary);
}

/* ===== STAT TABLE ===== */
.stat-table-wrapper {
  background: white;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.stat-table-header {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  padding: 20px 28px;
  color: white;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.stat-table-scroll {
  overflow-x: auto;
  max-height: 500px;
  overflow-y: auto;
}

.stat-table-scroll::-webkit-scrollbar { width: 6px; height: 6px; }
.stat-table-scroll::-webkit-scrollbar-track { background: var(--bg-secondary); }
.stat-table-scroll::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

.stat-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.stat-table th {
  background: #1e3a8a;
  color: white;
  padding: 10px 14px;
  text-align: center;
  font-weight: 600;
  white-space: nowrap;
  position: sticky;
  top: 0;
  z-index: 1;
}

.stat-table th:first-child { text-align: left; background: #1e40af; }

.stat-table td {
  padding: 8px 14px;
  text-align: center;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-secondary);
  transition: var(--transition);
}

.stat-table td:first-child {
  text-align: left;
  font-weight: 600;
  color: var(--text-primary);
  background: var(--bg-secondary);
  position: sticky;
  left: 0;
}

.stat-table tr:hover td { background: rgba(37, 99, 235, 0.05); }
.stat-table tr:hover td:first-child { background: rgba(37, 99, 235, 0.08); }

/* ===== GLOSSARY ===== */
.glossary-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 32px;
}

.glossary-letter-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: white;
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

.glossary-letter-btn:hover, .glossary-letter-btn.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.glossary-letter-btn.empty {
  color: var(--text-muted);
  cursor: default;
  opacity: 0.4;
}

.glossary-search-box {
  position: relative;
  max-width: 400px;
  margin-bottom: 32px;
}

.glossary-search-box i {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 0.9rem;
}

.glossary-search {
  width: 100%;
  padding: 12px 16px 12px 40px;
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  outline: none;
  transition: var(--transition);
}

.glossary-search:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37,99,235,0.1); }

.glossary-section { margin-bottom: 40px; }

.glossary-section-letter {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--primary);
  border-bottom: 2px solid rgba(37, 99, 235, 0.15);
  padding-bottom: 8px;
  margin-bottom: 16px;
}

.glossary-item {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  margin-bottom: 10px;
  transition: var(--transition);
}

.glossary-item:hover { border-color: rgba(37,99,235,0.2); box-shadow: var(--shadow-sm); }

.glossary-term {
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.glossary-short {
  font-size: 0.875rem;
  color: var(--primary);
  font-weight: 500;
  margin-bottom: 8px;
}

.glossary-def {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

/* ===== BACK TO TOP ===== */
.back-to-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 44px;
  height: 44px;
  background: var(--primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  box-shadow: var(--shadow-md);
  z-index: 100;
  border: none;
}

.back-to-top.visible { opacity: 1; visibility: visible; }
.back-to-top:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); background: var(--primary-dark); }

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .nav-menu { display: none; }
  .nav-actions .btn { display: none; }
  .hamburger { display: flex; }
  .footer-grid { grid-template-columns: 1fr 1fr 1fr; }
  .tutorials-grid { grid-template-columns: repeat(2, 1fr); }
  .tools-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .hero-content { grid-template-columns: 1fr; gap: 48px; padding: 60px 24px; }
  .hero-right { display: none; }
  .hero-stats { gap: 20px; }
  .categories-wrapper { grid-template-columns: 1fr; }
  .categories-sidebar { max-height: 200px; display: flex; overflow-x: auto; border-right: none; border-bottom: 1px solid var(--border); }
  .category-item { border-left: none; border-bottom: 3px solid transparent; white-space: nowrap; }
  .category-item.active { border-left: none; border-bottom-color: var(--primary); }
  .authority-grid { grid-template-columns: 1fr; }
  .tools-grid { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .content-layout { grid-template-columns: 1fr; }
  .content-sidebar { order: -1; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .blog-grid { grid-template-columns: 1fr; }
  .reviews-columns { grid-template-columns: 1fr; }
  .results-grid { grid-template-columns: 1fr; }
  .cta-email-form { flex-direction: column; }
  .article-content { padding: 28px; }
  .category-topics { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .section { padding: 64px 0; }
  .grid-4 { grid-template-columns: 1fr; }
  .hero-buttons { flex-direction: column; }
  .hero-buttons .btn { width: 100%; justify-content: center; }
  .tutorials-grid { grid-template-columns: 1fr 1fr; }
}

/* ===== UTILITIES ===== */
.text-center { text-align: center; }
.text-left { text-align: left; }
.mt-4 { margin-top: 16px; }
.mt-8 { margin-top: 32px; }
.mb-4 { margin-bottom: 16px; }
.mb-8 { margin-bottom: 32px; }
.hidden { display: none; }
.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; }

/* ===== ANIMATIONS ===== */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.stagger-1 { transition-delay: 0.1s; }
.stagger-2 { transition-delay: 0.2s; }
.stagger-3 { transition-delay: 0.3s; }
.stagger-4 { transition-delay: 0.4s; }

/* Progress bar */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  z-index: 9999;
  transition: width 0.1s linear;
}

/* TOC links (used on article pages) */
.toc { background: white; border: 1px solid var(--border); border-radius: var(--radius-md); padding: 20px; position: sticky; top: 88px; }
.toc-title { font-size:0.78rem;font-weight:700;text-transform:uppercase;letter-spacing:0.08em;color:var(--text-muted);margin-bottom:12px; }
.toc-link { display:flex;align-items:center;gap:8px;padding:7px 10px;border-radius:var(--radius-sm);color:var(--text-secondary);font-size:0.83rem;transition:var(--transition);text-decoration:none; }
.toc-link:hover, .toc-link.active { background:rgba(37,99,235,0.06);color:var(--primary); }
.toc-link i { font-size:0.65rem; }

/* Highlighted table cell */
.stat-table td.highlighted {
  background: rgba(37, 99, 235, 0.15) !important;
  color: var(--primary) !important;
  font-weight: 700 !important;
  outline: 2px solid var(--primary);
  outline-offset: -1px;
}

/* Smooth page transitions */
.page-fade-in {
  animation: pageFadeIn 0.3s ease forwards;
}

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

/* Tooltip */
.tooltip {
  position: relative;
}

.tooltip::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: #0f172a;
  color: white;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.78rem;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s;
  pointer-events: none;
  z-index: 10;
}

.tooltip:hover::after {
  opacity: 1;
  visibility: visible;
}
