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

:root {
  --bg: #050510;
  --bg-card: rgba(255,255,255,0.03);
  --bg-card-hover: rgba(255,255,255,0.06);
  --border: rgba(255,255,255,0.08);
  --border-hover: rgba(255,255,255,0.15);
  --text: #e2e8f0;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --white: #ffffff;
  --blue: #0ea5e9;
  --cyan: #06b6d4;
  --violet: #8b5cf6;
  --amber: #f59e0b;
  --emerald: #10b981;
  --rose: #f43f5e;
  --gradient: linear-gradient(135deg, var(--blue), var(--violet));
  --gradient-text: linear-gradient(135deg, var(--blue) 0%, var(--cyan) 30%, var(--violet) 100%);
  --radius: 16px;
  --radius-sm: 10px;
  --radius-xs: 6px;
  --shadow-glow: 0 0 60px rgba(14,165,233,0.15), 0 0 120px rgba(139,92,246,0.1);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-heading: 'Space Grotesk', 'Inter', sans-serif;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  max-width: 100vw;
}
img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; }
button { border: none; background: none; cursor: pointer; font-family: inherit; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.gradient-text {
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ═══════════════ NAVBAR ═══════════════ */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  padding: 16px 0;
  transition: var(--transition);
}
.navbar.scrolled {
  background: rgba(5,5,16,0.85);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--border);
  padding: 10px 0;
}
.nav-container {
  max-width: 1200px; margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between;
}
.nav-logo {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-heading); font-weight: 700; font-size: 20px; color: var(--white);
}
.nav-links { display: flex; gap: 32px; }
.nav-links a {
  font-size: 14px; font-weight: 500; color: var(--text-muted);
  transition: var(--transition); position: relative;
}
.nav-links a:hover { color: var(--white); }
.nav-links a::after {
  content: ''; position: absolute; bottom: -4px; left: 0; width: 0; height: 2px;
  background: var(--gradient); border-radius: 1px; transition: var(--transition);
}
.nav-links a:hover::after { width: 100%; }
.nav-actions { display: flex; align-items: center; gap: 12px; }
.nav-burger { display: none; flex-direction: column; gap: 5px; padding: 4px; }
.nav-burger span { width: 22px; height: 2px; background: var(--white); border-radius: 1px; transition: var(--transition); }

/* ═══════════════ BUTTONS ═══════════════ */
.btn-primary {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 24px; border-radius: var(--radius-sm);
  background: var(--gradient); color: var(--white);
  font-weight: 600; font-size: 14px;
  transition: var(--transition); position: relative; overflow: hidden;
}
.btn-primary::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.15), transparent);
  opacity: 0; transition: var(--transition);
}
.btn-primary:hover::before { opacity: 1; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(14,165,233,0.3); }

.btn-outline {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 24px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); color: var(--text);
  font-weight: 600; font-size: 14px; transition: var(--transition);
}
.btn-outline:hover { border-color: var(--blue); color: var(--white); background: rgba(14,165,233,0.05); }

.btn-ghost {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 20px; border-radius: var(--radius-sm);
  color: var(--text-muted); font-weight: 500; font-size: 14px;
  transition: var(--transition);
}
.btn-ghost:hover { color: var(--white); }

.btn-sm { padding: 8px 18px; font-size: 13px; }
.btn-lg { padding: 16px 32px; font-size: 16px; }
.btn-block { width: 100%; justify-content: center; }

/* ═══════════════ HERO ═══════════════ */
.hero {
  position: relative; min-height: 100vh;
  display: flex; flex-direction: column; align-items: center;
  padding: 140px 24px 0; overflow: hidden;
}
.hero-bg { position: absolute; inset: 0; z-index: 0; }
.hero-bg canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-gradient {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% 0%, rgba(14,165,233,0.12) 0%, transparent 50%),
    radial-gradient(ellipse 60% 40% at 70% 10%, rgba(139,92,246,0.08) 0%, transparent 50%);
}
.hero-container {
  position: relative; z-index: 1;
  max-width: 800px; text-align: center;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 16px 6px 10px; border-radius: 100px;
  background: rgba(14,165,233,0.1); border: 1px solid rgba(14,165,233,0.2);
  font-size: 13px; font-weight: 500; color: var(--blue);
  margin-bottom: 28px;
}
.badge-dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--blue);
  animation: pulse-dot 2s infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(14,165,233,0.4); }
  50% { opacity: 0.8; box-shadow: 0 0 0 6px rgba(14,165,233,0); }
}
.hero-title {
  font-family: var(--font-heading); font-size: clamp(42px, 7vw, 80px);
  font-weight: 800; line-height: 1.1; color: var(--white);
  margin-bottom: 24px; letter-spacing: -0.02em;
}
.hero-subtitle {
  font-size: clamp(16px, 2vw, 20px); color: var(--text-muted);
  max-width: 600px; margin: 0 auto 40px; line-height: 1.7;
}
.hero-cta { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; margin-bottom: 56px; }
.hero-stats {
  display: flex; gap: 40px; justify-content: center; align-items: center;
  padding: 24px 0; flex-wrap: wrap;
}
.stat { text-align: center; }
.stat-number {
  font-family: var(--font-heading); font-size: 32px; font-weight: 700; color: var(--white);
  display: inline;
}
.stat-suffix { font-family: var(--font-heading); font-size: 32px; font-weight: 700; color: var(--white); }
.stat-label { display: block; font-size: 13px; color: var(--text-dim); margin-top: 4px; }
.stat-divider { width: 1px; height: 40px; background: var(--border); }

.hero-board-fullwidth {
  position: relative; z-index: 1; width: 100%;
  margin: 40px 0 0; border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border); background: #0a0a1a;
  box-shadow: 0 0 80px rgba(14,165,233,0.08);
}
.hero-board-fullwidth .hero-image-glow {
  position: absolute; top: -40%; left: 15%; right: 15%; height: 80%;
  background: radial-gradient(ellipse at center, rgba(14,165,233,0.15), transparent 70%);
  filter: blur(60px); pointer-events: none; z-index: 0;
}
.hero-board-fullwidth .board-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 20px; background: rgba(255,255,255,0.04);
  border-bottom: 1px solid var(--border); gap: 12px; flex-wrap: nowrap;
  position: relative; z-index: 5;
}
.toolbar-left { display: flex; gap: 4px; }
.toolbar-icon {
  width: 28px; height: 28px; display: flex; align-items: center; justify-content: center;
  border-radius: 6px; color: var(--text-dim); transition: var(--transition); flex-shrink: 0;
  cursor: pointer;
}
.toolbar-icon:hover { color: var(--text); background: rgba(255,255,255,0.06); }
.toolbar-icon.active { color: var(--blue); background: rgba(14,165,233,0.12); }
.toolbar-center { flex: 1; text-align: center; min-width: 0; }
.toolbar-title {
  font-size: 13px; color: var(--text-muted); font-weight: 500;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.toolbar-right { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.toolbar-avatars { display: flex; }
.toolbar-avatar {
  width: 24px; height: 24px; border-radius: 50%; display: flex; align-items: center;
  justify-content: center; font-size: 10px; font-weight: 700; color: #fff;
  margin-left: -6px; border: 2px solid #0a0a1a;
}
.toolbar-avatar:first-child { margin-left: 0; }
.toolbar-online { font-size: 11px; color: var(--emerald); white-space: nowrap; }

.board-canvas-fw {
  position: relative; width: 100%; height: 580px; overflow: hidden;
  background:
    radial-gradient(circle at 20% 30%, rgba(14,165,233,0.04), transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(139,92,246,0.04), transparent 50%),
    #0a0a1a;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(14,165,233,0.04), transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(139,92,246,0.04), transparent 50%),
    radial-gradient(circle, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: auto, auto, 24px 24px;
  cursor: default;
}
.board-canvas-fw::before {
  content: ''; position: absolute; inset: 0; pointer-events: none; z-index: 10;
  background:
    linear-gradient(90deg, #0a0a1a 0%, transparent 5%),
    linear-gradient(270deg, #0a0a1a 0%, transparent 5%),
    linear-gradient(180deg, transparent 85%, #0a0a1a);
}

.board-lines {
  position: absolute; inset: 0; width: 100%; height: 100%;
  pointer-events: none; z-index: 1;
}
.board-lines path {
  fill: none; stroke-width: 1.5;
}

.bel {
  position: absolute; z-index: 3; cursor: grab;
  user-select: none; touch-action: none;
  transition: box-shadow 0.25s, filter 0.25s;
}
.bel:active { cursor: grabbing; }
.bel.dragging {
  z-index: 30; filter: brightness(1.15);
  box-shadow: 0 12px 40px rgba(0,0,0,0.5);
}

.sticky {
  width: 130px; padding: 14px; border-radius: 4px; font-size: 12px;
  font-weight: 600; line-height: 1.4; box-shadow: 2px 3px 8px rgba(0,0,0,0.3);
  transform: rotate(-1deg); transition: transform 0.3s, box-shadow 0.3s;
  pointer-events: none;
}
.bel:nth-child(even) .sticky { transform: rotate(1.5deg); }
.bel:hover .sticky { transform: rotate(0deg) scale(1.05); box-shadow: 2px 3px 16px rgba(0,0,0,0.4); }
.sticky-blue { background: #3b82f6; color: #fff; }
.sticky-green { background: #10b981; color: #fff; }
.sticky-yellow { background: #f59e0b; color: #1a1a2e; }
.sticky-pink { background: #ec4899; color: #fff; }
.sticky-body { pointer-events: none; }

.mind-node {
  padding: 10px 20px; border-radius: 24px; font-size: 13px; font-weight: 600;
  white-space: nowrap; border: 2px solid; pointer-events: none;
}
.mind-root {
  background: rgba(14,165,233,0.15); border-color: var(--blue); color: var(--blue);
  font-size: 15px; padding: 12px 24px;
}
.mind-child {
  background: rgba(255,255,255,0.05); border-color: var(--border-hover); color: var(--text);
}

.board-card {
  width: 190px; background: rgba(255,255,255,0.06); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 12px;
  pointer-events: none; transition: transform 0.3s, box-shadow 0.3s;
}
.bel:hover .board-card { box-shadow: 0 8px 24px rgba(0,0,0,0.3); }
.card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.card-badge {
  font-size: 10px; font-weight: 600; padding: 2px 8px; border-radius: 10px;
  text-transform: uppercase; letter-spacing: 0.05em;
}
.badge-blue { background: rgba(59,130,246,0.2); color: #60a5fa; }
.badge-green { background: rgba(16,185,129,0.2); color: #34d399; }
.badge-violet { background: rgba(139,92,246,0.2); color: #a78bfa; }
.badge-amber { background: rgba(245,158,11,0.2); color: #fbbf24; }
.card-priority { font-size: 10px; font-weight: 800; color: var(--rose); }
.board-card h4 { font-size: 13px; font-weight: 600; color: var(--white); margin-bottom: 10px; }

.card-chart { display: flex; align-items: flex-end; gap: 4px; height: 50px; margin-bottom: 10px; }
.mini-bar {
  flex: 1; background: rgba(14,165,233,0.3); border-radius: 2px 2px 0 0;
  transition: height 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.mini-bar.highlight { background: var(--blue); }

.card-sparkline { height: 40px; margin-bottom: 8px; }
.card-sparkline svg { width: 100%; height: 100%; }

.card-meta { display: flex; align-items: center; justify-content: space-between; }
.card-meta span:first-child { font-size: 11px; color: var(--emerald); font-weight: 600; }
.card-avatar {
  width: 20px; height: 20px; border-radius: 50%; display: flex; align-items: center;
  justify-content: center; font-size: 9px; font-weight: 700; color: #fff;
}

.card-zones { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 10px; }
.zone { font-size: 10px; padding: 3px 8px; border-radius: 4px; font-weight: 500; }
.zone-red { background: rgba(239,68,68,0.15); color: #f87171; }
.zone-blue { background: rgba(59,130,246,0.15); color: #60a5fa; }
.zone-green { background: rgba(16,185,129,0.15); color: #34d399; }
.zone-yellow { background: rgba(245,158,11,0.15); color: #fbbf24; }

.card-kpi { display: flex; gap: 12px; }
.kpi-item { display: flex; flex-direction: column; align-items: center; flex: 1; }
.kpi-value { font-size: 16px; font-weight: 800; color: var(--white); }
.kpi-label { font-size: 10px; color: var(--text-dim); margin-top: 2px; }

.board-table {
  width: 240px; background: rgba(255,255,255,0.05); border: 1px solid var(--border);
  border-radius: var(--radius-sm); overflow: hidden; pointer-events: none;
}
.table-title {
  padding: 10px 14px; font-size: 12px; font-weight: 700; color: var(--white);
  background: rgba(14,165,233,0.08); border-bottom: 1px solid var(--border);
}
.board-table table { width: 100%; border-collapse: collapse; font-size: 11px; }
.board-table th {
  padding: 6px 10px; text-align: left; color: var(--text-dim);
  font-weight: 600; border-bottom: 1px solid rgba(255,255,255,0.05);
}
.board-table td { padding: 6px 10px; color: var(--text-muted); border-bottom: 1px solid rgba(255,255,255,0.03); }
.td-green { color: var(--emerald); font-weight: 700; }
.td-yellow { color: var(--amber); font-weight: 700; }

.board-cursor {
  position: absolute; pointer-events: none; z-index: 20;
  background: none; border: none; box-shadow: none;
  display: flex; align-items: flex-start; gap: 2px;
  transition: left 2s cubic-bezier(0.4, 0, 0.2, 1), top 2s cubic-bezier(0.4, 0, 0.2, 1);
}
.board-cursor svg {
  display: block; flex-shrink: 0; filter: drop-shadow(0 1px 3px rgba(0,0,0,0.5));
}
.cursor-label {
  display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 10px;
  font-weight: 600; color: #fff; white-space: nowrap;
  margin-top: 12px; margin-left: -4px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.board-hint {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  padding: 8px; font-size: 12px; color: var(--text-dim);
  background: rgba(255,255,255,0.02); border-top: 1px solid var(--border);
  animation: hintPulse 3s ease-in-out infinite;
}
.hint-mobile { display: none; }
@media (max-width: 768px) {
  .hint-desktop { display: none; }
  .hint-mobile { display: inline; }
}
@keyframes hintPulse {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

@media (max-width: 768px) {
  .board-canvas-fw { height: 350px; }
  .toolbar-center { display: none; }
  .toolbar-online { display: none; }
  .hero-board-fullwidth { max-width: 100vw; }
  .board-toolbar { max-width: 100vw; overflow: hidden; }
  .toolbar-left { gap: 2px; }
  .toolbar-icon { width: 24px; height: 24px; }
  .toolbar-icon svg { width: 14px; height: 14px; }
  .toolbar-right { gap: 6px; }
  .toolbar-avatar { width: 20px; height: 20px; font-size: 8px; }
  
  /* Demo board zoom controls */
  .board-canvas-fw {
    touch-action: pan-x pan-y pinch-zoom;
    transform-origin: center center;
  }
}

/* Zoom controls for demo board */
.board-zoom-controls {
  position: absolute;
  bottom: 12px;
  right: 12px;
  display: flex;
  gap: 4px;
  z-index: 15;
  background: rgba(10, 10, 26, 0.9);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 4px;
}
.board-zoom-btn {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-xs);
  color: var(--text-muted);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  font-size: 18px;
  font-weight: 600;
}
.board-zoom-btn:hover {
  background: rgba(255,255,255,0.1);
  color: var(--white);
}
.board-zoom-level {
  min-width: 48px;
  text-align: center;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-dim);
  line-height: 32px;
}

@media (max-width: 768px) {
  .board-zoom-controls {
    bottom: 8px;
    right: 8px;
    padding: 2px;
  }
  .board-zoom-btn {
    width: 28px;
    height: 28px;
    font-size: 16px;
  }
  .board-zoom-level {
    min-width: 40px;
    font-size: 11px;
    line-height: 28px;
  }
}

.hero-logos {
  position: relative; z-index: 1;
  padding: 60px 0 80px; text-align: center; width: 100%;
  max-width: 100vw;
}
.hero-logos p { font-size: 13px; color: var(--text-dim); text-transform: uppercase; letter-spacing: 2px; margin-bottom: 24px; }
.logo-track { overflow: hidden; mask-image: linear-gradient(90deg, transparent, black 10%, black 90%, transparent); max-width: 100vw; }
.logo-slide {
  display: flex; gap: 60px; width: max-content;
  animation: logo-scroll 30s linear infinite;
}
@keyframes logo-scroll { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }
.company-logo {
  font-family: var(--font-heading); font-size: 18px; font-weight: 600;
  color: var(--text-dim); white-space: nowrap; opacity: 0.5;
  transition: var(--transition);
}
.company-logo:hover { opacity: 1; color: var(--text-muted); }

/* ═══════════════ SECTIONS COMMON ═══════════════ */
.section-header { text-align: center; margin-bottom: 64px; }
.section-tag {
  display: inline-block; padding: 4px 14px; border-radius: 100px;
  background: rgba(14,165,233,0.1); border: 1px solid rgba(14,165,233,0.2);
  font-size: 12px; font-weight: 600; color: var(--blue);
  text-transform: uppercase; letter-spacing: 1.5px; margin-bottom: 20px;
}
.section-title {
  font-family: var(--font-heading); font-size: clamp(32px, 4.5vw, 52px);
  font-weight: 800; line-height: 1.15; color: var(--white);
  letter-spacing: -0.02em;
}
.section-desc { font-size: 18px; color: var(--text-muted); margin-top: 16px; max-width: 560px; margin-left: auto; margin-right: auto; }

/* ═══════════════ FEATURES ═══════════════ */
.features { padding: 80px 0; }
.features-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
}
.feature-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 32px;
  transition: var(--transition); position: relative; overflow: hidden;
}
.feature-card:hover { border-color: var(--border-hover); background: var(--bg-card-hover); transform: translateY(-4px); }
.feature-card-large { grid-column: span 3; display: grid; grid-template-columns: 1fr 1.2fr; gap: 40px; align-items: center; }
.feature-card-visual { border-radius: var(--radius-sm); overflow: hidden; }
.feature-card-visual img { border-radius: var(--radius-sm); }
.feature-icon {
  width: 48px; height: 48px; border-radius: 12px;
  background: rgba(14,165,233,0.1); color: var(--blue);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 20px;
}
.feature-icon.icon-cyan { background: rgba(6,182,212,0.1); color: var(--cyan); }
.feature-icon.icon-violet { background: rgba(139,92,246,0.1); color: var(--violet); }
.feature-icon.icon-amber { background: rgba(245,158,11,0.1); color: var(--amber); }
.feature-icon.icon-emerald { background: rgba(16,185,129,0.1); color: var(--emerald); }
.feature-icon.icon-rose { background: rgba(244,63,94,0.1); color: var(--rose); }
.feature-card h3 { font-family: var(--font-heading); font-size: 24px; font-weight: 700; color: var(--white); margin-bottom: 14px; }
.feature-card p { font-size: 17px; color: var(--text-muted); line-height: 1.65; }

.feature-live-cursors { position: relative; height: 80px; margin-top: 20px; }
.feature-live-cursors .live-cursor {
  position: absolute; pointer-events: none; display: flex; align-items: flex-start; gap: 2px;
}
.feature-live-cursors .live-cursor svg {
  display: block; flex-shrink: 0; filter: drop-shadow(0 1px 3px rgba(0,0,0,0.5));
}
.feature-live-cursors .cursor-label {
  display: inline-block; padding: 3px 8px; border-radius: 4px; font-size: 11px;
  font-weight: 600; color: #fff; white-space: nowrap;
  margin-top: 12px; margin-left: -4px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.feature-live-cursors .cursor-1 { top: 5px; left: 15%; animation: cursor-move-1 4s ease-in-out infinite; }
.feature-live-cursors .cursor-2 { top: 35px; left: 48%; animation: cursor-move-2 5s ease-in-out infinite; }
.feature-live-cursors .cursor-3 { top: 15px; left: 72%; animation: cursor-move-3 3.5s ease-in-out infinite; }
@keyframes cursor-move-1 { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(30px, 15px); } }
@keyframes cursor-move-2 { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(-20px, -10px); } }
@keyframes cursor-move-3 { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(-15px, 20px); } }

/* ═══════════════ AUDIENCE ═══════════════ */
.audience { padding: 80px 0; background: linear-gradient(180deg, transparent, rgba(14,165,233,0.02), transparent); }
.audience-tabs {
  display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-bottom: 48px;
}
.tab-btn {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 24px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); color: var(--text-muted);
  font-weight: 500; font-size: 14px; transition: var(--transition);
}
.tab-btn:hover { border-color: var(--border-hover); color: var(--white); }
.tab-btn.active { background: var(--gradient); border-color: transparent; color: var(--white); }

.tab-panel {
  display: none; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center;
}
.tab-panel.active { display: grid; }
.tab-panel-text h3 { font-family: var(--font-heading); font-size: 32px; font-weight: 700; color: var(--white); margin-bottom: 16px; line-height: 1.3; }
.tab-panel-text p { font-size: 16px; color: var(--text-muted); margin-bottom: 28px; line-height: 1.7; }
.tab-features { list-style: none; display: flex; flex-direction: column; gap: 12px; margin-bottom: 32px; }
.tab-features li { display: flex; align-items: center; gap: 10px; font-size: 15px; color: var(--text); }

.use-case-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden;
}
.use-case-header {
  padding: 12px 20px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 10px;
  font-size: 13px; color: var(--text-muted);
}
.use-case-dot { width: 8px; height: 8px; border-radius: 50%; }
.use-case-dot.green { background: var(--emerald); }
.use-case-dot.amber { background: var(--amber); }
.use-case-dot.violet { background: var(--violet); }
.use-case-dot.emerald { background: var(--emerald); }
.use-case-body {
  padding: 32px; display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
  position: relative; min-height: 200px;
}
.mini-sticky {
  padding: 16px; border-radius: var(--radius-xs);
  background: rgba(14,165,233,0.1); color: var(--blue);
  font-weight: 600; font-size: 14px; line-height: 1.4;
  transition: var(--transition);
}
.mini-sticky:hover { transform: scale(1.05); }
.mini-sticky small { font-weight: 400; opacity: 0.7; font-size: 12px; }

/* ═══════════════ HOW IT WORKS ═══════════════ */
.how-it-works { padding: 80px 0; }
.steps { max-width: 700px; margin: 0 auto; }
.step {
  display: grid; grid-template-columns: auto 1fr 200px; gap: 24px; align-items: center;
}
.step-connector { display: flex; justify-content: center; padding-left: 24px; }
.step-number {
  font-family: var(--font-heading); font-size: 48px; font-weight: 800;
  background: var(--gradient-text); -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text; line-height: 1;
}
.step-content h3 { font-family: var(--font-heading); font-size: 26px; font-weight: 700; color: var(--white); margin-bottom: 10px; }
.step-content p { font-size: 18px; color: var(--text-muted); line-height: 1.6; }
.step-visual { display: flex; justify-content: flex-end; }
.step-mockup {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 16px; width: 180px;
}
.mockup-dot { width: 8px; height: 8px; background: var(--emerald); border-radius: 50%; margin-bottom: 10px; }
.mockup-line { height: 6px; background: rgba(255,255,255,0.06); border-radius: 3px; margin-bottom: 8px; }
.mockup-line.w60 { width: 60%; } .mockup-line.w40 { width: 40%; } .mockup-line.w80 { width: 80%; }
.mockup-btn {
  padding: 6px 12px; background: var(--gradient); border-radius: var(--radius-xs);
  font-size: 11px; font-weight: 600; color: white; text-align: center; margin-top: 8px;
}
.mockup-sticky {
  display: inline-block; padding: 6px 12px; border-radius: var(--radius-xs);
  font-size: 11px; font-weight: 600; margin: 3px;
}
.mockup-sticky.y { background: #fef3c7; color: #92400e; }
.mockup-sticky.b { background: #dbeafe; color: #1e40af; }
.mockup-sticky.g { background: #d1fae5; color: #065f46; }
.mockup-avatars { display: flex; gap: -8px; margin-bottom: 12px; }
.avatar {
  width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; color: white; margin-left: -8px;
  border: 2px solid var(--bg);
}
.avatar:first-child { margin-left: 0; }
.avatar.a1 { background: var(--blue); }
.avatar.a2 { background: var(--rose); }
.avatar.a3 { background: var(--violet); }
.avatar.a4 { background: var(--text-dim); font-size: 10px; }
.mockup-status { font-size: 11px; color: var(--emerald); font-weight: 500; }

/* ═══════════════ TESTIMONIALS ═══════════════ */
.testimonials { padding: 80px 0; background: linear-gradient(180deg, transparent, rgba(139,92,246,0.02), transparent); }
.testimonials-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 60px; }
.testimonial-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 32px; transition: var(--transition);
}
.testimonial-card:hover { border-color: var(--border-hover); transform: translateY(-4px); }
.testimonial-card.featured { border-color: rgba(14,165,233,0.3); background: rgba(14,165,233,0.03); }
.testimonial-stars { color: var(--amber); font-size: 16px; margin-bottom: 16px; letter-spacing: 2px; }
.testimonial-card blockquote { font-size: 15px; color: var(--text); line-height: 1.7; margin-bottom: 24px; font-style: italic; }
.testimonial-author { display: flex; align-items: center; gap: 12px; }
.author-avatar {
  width: 44px; height: 44px; border-radius: 50%; background: var(--gradient);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700; color: white; flex-shrink: 0;
}
.testimonial-author strong { display: block; font-size: 14px; color: var(--white); }
.testimonial-author span { font-size: 12px; color: var(--text-dim); }

.social-proof {
  display: flex; justify-content: center; gap: 60px;
  padding: 40px; background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius);
}
.proof-item { text-align: center; }
.proof-number { font-family: var(--font-heading); font-size: 40px; font-weight: 800; color: var(--white); display: block; }
.proof-label { font-size: 14px; color: var(--text-dim); }

/* ═══════════════ PRICING ═══════════════ */
.pricing { padding: 80px 0; }
.pricing-toggle { display: flex; align-items: center; gap: 16px; justify-content: center; margin-bottom: 48px; }
.toggle-label { font-size: 14px; color: var(--text-dim); font-weight: 500; transition: var(--transition); }
.toggle-label.active { color: var(--white); }
.toggle-switch {
  width: 52px; height: 28px; border-radius: 14px; padding: 3px;
  background: rgba(255,255,255,0.1); position: relative; transition: var(--transition);
}
.toggle-switch.active { background: var(--gradient); }
.toggle-knob {
  width: 22px; height: 22px; border-radius: 50%; background: white;
  display: block; transition: var(--transition);
}
.toggle-switch.active .toggle-knob { transform: translateX(24px); }
.toggle-badge {
  display: inline-block; padding: 2px 8px; border-radius: 100px;
  background: rgba(16,185,129,0.1); color: var(--emerald); font-size: 11px; font-weight: 700;
}

.pricing-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.price-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 36px; transition: var(--transition); position: relative;
}
.price-card:hover { border-color: var(--border-hover); transform: translateY(-4px); }
.price-card.popular { border-color: rgba(14,165,233,0.4); background: rgba(14,165,233,0.03); }
.popular-badge {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  padding: 4px 16px; border-radius: 100px; background: var(--gradient);
  font-size: 12px; font-weight: 700; color: white;
}
.price-card-header h3 { font-family: var(--font-heading); font-size: 24px; font-weight: 700; color: var(--white); }
.price-card-header p { font-size: 14px; color: var(--text-dim); margin-top: 4px; }
.price-amount { margin: 28px 0; }
.price-currency { font-size: 24px; font-weight: 700; color: var(--text-muted); vertical-align: top; }
.price-value { font-family: var(--font-heading); font-size: 56px; font-weight: 800; color: var(--white); line-height: 1; }
.price-period { font-size: 14px; color: var(--text-dim); }
.price-custom { font-family: var(--font-heading); font-size: 32px; font-weight: 700; color: var(--white); }
.price-features { list-style: none; display: flex; flex-direction: column; gap: 12px; margin-bottom: 32px; }
.price-features li {
  font-size: 14px; color: var(--text-muted); padding-left: 24px; position: relative;
}
.price-features li::before {
  content: '✓'; position: absolute; left: 0; color: var(--emerald); font-weight: 700;
}

/* ═══════════════ FINAL CTA ═══════════════ */
.final-cta { padding: 80px 0; }
.cta-card {
  position: relative; overflow: hidden;
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 24px;
  padding: 80px 40px; text-align: center;
}
.cta-bg-pattern {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 30% 20%, rgba(14,165,233,0.08), transparent 50%),
    radial-gradient(ellipse 60% 50% at 70% 80%, rgba(139,92,246,0.06), transparent 50%);
}
.cta-card h2 { font-family: var(--font-heading); font-size: clamp(32px, 4vw, 48px); font-weight: 800; color: var(--white); margin-bottom: 16px; position: relative; }
.cta-card p { font-size: 18px; color: var(--text-muted); max-width: 500px; margin: 0 auto 36px; position: relative; }
.cta-buttons { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; position: relative; }
.cta-note { display: block; font-size: 17px; color: var(--text-dim); margin-top: 80px; padding-top: 20px; position: relative; }

/* ═══════════════ FOOTER ═══════════════ */
.footer { padding: 80px 0 40px; border-top: 1px solid var(--border); }
.footer-grid { display: grid; grid-template-columns: 1.5fr repeat(4, 1fr); gap: 40px; margin-bottom: 60px; }
.footer-brand p { font-size: 14px; color: var(--text-dim); margin-top: 12px; line-height: 1.6; }
.footer-social { display: flex; gap: 16px; margin-top: 20px; }
.footer-social a {
  width: 36px; height: 36px; border-radius: 8px; background: rgba(255,255,255,0.05);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-dim); transition: var(--transition);
}
.footer-social a:hover { background: rgba(255,255,255,0.1); color: var(--white); }
.footer-links h4 { font-size: 13px; font-weight: 700; color: var(--white); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 16px; }
.footer-links a { display: block; font-size: 14px; color: var(--text-dim); padding: 4px 0; transition: var(--transition); }
.footer-links a:hover { color: var(--text); }
.footer-bottom {
  display: flex; justify-content: space-between; padding-top: 24px;
  border-top: 1px solid var(--border); font-size: 13px; color: var(--text-dim);
}

/* ═══════════════ ANIMATIONS ═══════════════ */
[data-animate] { opacity: 0; transform: translateY(30px); transition: opacity 0.7s ease, transform 0.7s ease; }
[data-animate].visible { opacity: 1; transform: translateY(0); }

/* ═══════════════ RESPONSIVE ═══════════════ */
@media (max-width: 1024px) {
  .features-grid { grid-template-columns: 1fr 1fr; }
  .feature-card-large { grid-column: span 2; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  .nav-links, .nav-actions { display: none; }
  .nav-burger { display: flex; }
  
  /* Mobile menu open state */
  .nav-links.mobile-open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(5,5,16,0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 24px;
    gap: 16px;
    border-bottom: 1px solid var(--border);
    animation: slideDown 0.3s ease;
  }
  .nav-links.mobile-open a {
    font-size: 16px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
  }
  .nav-links.mobile-open a:last-child { border-bottom: none; }
  
  /* Burger animation */
  .nav-burger.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
  .nav-burger.open span:nth-child(2) { opacity: 0; }
  .nav-burger.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }
  
  @keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
  }
  
  .features-grid { grid-template-columns: 1fr; }
  .feature-card-large { grid-column: span 1; grid-template-columns: 1fr; }
  .tab-panel { grid-template-columns: 1fr; gap: 32px; }
  .tab-panel.active { display: grid; }
  .step { grid-template-columns: auto 1fr; }
  .step-visual { display: none; }
  .testimonials-grid { grid-template-columns: 1fr; }
  .pricing-grid { grid-template-columns: 1fr; }
  .hero-stats { gap: 24px; }
  .stat-divider { display: none; }
  .social-proof { flex-direction: column; gap: 24px; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }
  .audience-tabs { gap: 4px; }
  .tab-btn { padding: 10px 16px; font-size: 13px; }
}

/* ═══════════════ TEMPLATES CATALOG ═══════════════ */

.templates-section {
  padding: 80px 0;
  position: relative;
  background: linear-gradient(180deg, transparent 0%, rgba(14,165,233,0.02) 50%, transparent 100%);
}

.templates-section .container {
  max-width: 1440px;
}
.templates-layout {
  display: flex;
  gap: 24px;
  min-height: 700px;
  align-items: flex-start;
}

/* --- Sidebars --- */

.templates-sidebar {
  width: 300px;
  flex-shrink: 0;
  max-height: 80vh;
  overflow-y: auto;
  position: sticky;
  top: 100px;
}

.templates-sidebar::-webkit-scrollbar { width: 4px; }
.templates-sidebar::-webkit-scrollbar-track { background: transparent; }
.templates-sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 4px; }
.templates-sidebar::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.2); }

.templates-sidebar-left { padding-right: 8px; }
.templates-sidebar-right { padding-left: 8px; }

.sidebar-title {
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 700;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 12px;
  padding: 0 16px;
}

/* --- Sidebar Groups --- */

.sidebar-group { margin-bottom: 8px; }

.sidebar-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}
.sidebar-group-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text);
  font-weight: 500;
  font-size: 14px;
  cursor: pointer;
  transition: all var(--transition);
}

.sidebar-group-toggle:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
}

.sidebar-group-toggle.active {
  border-color: var(--blue);
  background: rgba(14,165,233,0.08);
}

.sidebar-group-list {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.4s ease;
  padding-left: 8px;
}

.sidebar-group-list.expanded {
  max-height: 2000px;
}

/* --- Sidebar Template Buttons --- */

.sidebar-tpl-btn {
  width: 100%;
  text-align: left;
  padding: 8px 12px;
  border-radius: var(--radius-xs);
  font-size: 13px;
  color: var(--text-muted);
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  background: transparent;
  overflow: hidden;
  position: relative;
}

.sidebar-tpl-btn:hover {
  color: var(--text);
  background: var(--bg-card-hover);
  transform: translateX(4px) scale(1.02);
  border-color: var(--border);
}

.sidebar-tpl-btn:active {
  transform: translateX(2px) scale(0.98);
}

.sidebar-tpl-btn.active {
  color: var(--white);
  background: rgba(14,165,233,0.12);
  border-color: var(--blue);
  box-shadow: 0 0 15px rgba(14,165,233,0.15);
}

.sidebar-tpl-btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at var(--ripple-x, 50%) var(--ripple-y, 50%), rgba(255,255,255,0.15) 0%, transparent 60%);
  opacity: 0;
  transform: scale(0);
  transition: transform 0.5s ease, opacity 0.4s ease;
  pointer-events: none;
}

.sidebar-tpl-btn:active::after {
  opacity: 1;
  transform: scale(2.5);
  transition: transform 0.3s ease, opacity 0s;
}

.sidebar-count {
  background: var(--bg-card);
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 11px;
  color: var(--text-dim);
  margin-left: auto;
}

.tpl-btn-icon {
  font-size: 18px;
  flex-shrink: 0;
  width: 20px;
  text-align: center;
}

/* --- Showcase --- */

.template-showcase {
  flex: 1;
  min-width: 0;
  position: relative;
  overflow: hidden;
}

/* --- School Block (Right Sidebar) --- */

.sidebar-school { margin-bottom: 16px; }

.school-header {
  display: flex;
  gap: 12px;
  padding: 16px;
  margin-bottom: 8px;
}

.school-logo {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 16px;
  flex-shrink: 0;
}

.harvard-logo { background: #a51c30; color: white; }
.stanford-logo { background: #8c1515; color: white; }
.mit-logo { background: #750014; color: white; }

.school-desc {
  font-size: 16px;
  color: var(--text-dim);
  line-height: 1.6;
  margin-top: 4px;
}

/* --- Template Detail Card --- */

.template-detail {
  display: none;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  opacity: 0;
  transform: translateX(-30px) scale(0.97);
}

.template-detail.active {
  display: block;
  opacity: 1;
  transform: translateX(0) scale(1);
}

.template-detail.entering-from-left {
  animation: slideFromLeft 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.template-detail.entering-from-right {
  animation: slideFromRight 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.template-detail.leaving {
  animation: slideOut 0.25s ease-out forwards;
}

@keyframes slideFromLeft {
  from { opacity: 0; transform: translateX(-60px) scale(0.95); }
  to { opacity: 1; transform: translateX(0) scale(1); }
}

@keyframes slideFromRight {
  from { opacity: 0; transform: translateX(60px) scale(0.95); }
  to { opacity: 1; transform: translateX(0) scale(1); }
}

@keyframes slideOut {
  from { opacity: 1; transform: translateX(0) scale(1); }
  to { opacity: 0; transform: translateY(20px) scale(0.97); }
}

/* --- Detail Header --- */

.template-detail-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 4px;
}

.template-badge {
  display: inline-flex;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.template-badge.harvard {
  background: rgba(165,28,48,0.15);
  color: #e87d8f;
  border: 1px solid rgba(165,28,48,0.3);
}

.template-badge.stanford {
  background: rgba(140,21,21,0.15);
  color: #e07070;
  border: 1px solid rgba(140,21,21,0.3);
}

.template-badge.mit {
  background: rgba(117,0,20,0.15);
  color: #e06070;
  border: 1px solid rgba(117,0,20,0.3);
}

/* --- Tags --- */

.template-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-left: auto;
}

.template-tag {
  padding: 3px 10px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 11px;
  color: var(--text-dim);
}

/* --- Detail Content --- */

.template-detail-title {
  font-family: var(--font-heading);
  font-size: 32px;
  font-weight: 700;
  color: var(--white);
  margin: 16px 0 14px;
}

.template-detail-desc {
  color: var(--text);
  font-size: 18px;
  line-height: 1.7;
  margin-bottom: 24px;
}

.template-detail-section {
  margin-bottom: 24px;
}

.template-detail-section h4 {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 600;
  color: var(--white);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.template-detail-section p {
  color: var(--text-muted);
  font-size: 17px;
  line-height: 1.7;
}

/* --- Benefits --- */

.template-benefits {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 0;
  margin: 0;
}

.template-benefits li {
  padding: 10px 14px 10px 32px;
  background: rgba(14,165,233,0.06);
  border: 1px solid rgba(14,165,233,0.12);
  border-radius: var(--radius-xs);
  font-size: 17px;
  color: var(--text);
  position: relative;
}

.template-benefits li::before {
  content: '✓';
  position: absolute;
  left: 10px;
  color: var(--emerald);
  font-weight: 700;
}

/* --- History --- */

.template-history {
  background: rgba(139,92,246,0.06);
  border: 1px solid rgba(139,92,246,0.12);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
}

.template-history h4::before {
  content: '📚 ';
}

/* --- Table --- */

.template-table-wrap {
  overflow-x: auto;
  margin: 20px 0;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.template-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 16px;
}

.template-table th {
  padding: 12px 16px;
  background: rgba(14,165,233,0.08);
  color: var(--white);
  font-weight: 600;
  text-align: left;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.template-table td {
  padding: 10px 16px;
  color: var(--text-muted);
  border-bottom: 1px solid rgba(255,255,255,0.04);
}

.template-table tr:hover td {
  background: rgba(255,255,255,0.02);
}

.template-table tr:nth-child(even) td {
  background: rgba(255,255,255,0.015);
}

/* --- CTA --- */

.template-cta {
  display: inline-flex;
  margin-top: 24px;
  padding: 12px 28px;
}

/* --- Templates Responsive --- */

@media (max-width: 1024px) {
  .templates-layout {
    flex-direction: column;
  }
  .templates-sidebar {
    width: 100%;
    max-height: none;
    position: static;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .templates-sidebar-left,
  .templates-sidebar-right {
    padding: 0;
  }
  .templates-sidebar-right {
    order: -1;
    margin-bottom: 16px;
  }
  .sidebar-group-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px 0;
  }
  .sidebar-group-list.expanded {
    max-height: none;
  }
  .sidebar-tpl-btn {
    flex: 0 0 auto;
    white-space: nowrap;
    padding: 8px 14px;
    border: 1px solid var(--border);
    border-radius: 20px;
  }
  .sidebar-count { display: none; }
}

@media (max-width: 768px) {
  .templates-section { padding: 40px 0; }
  .templates-layout { min-height: auto; gap: 12px; }
  
  /* Sidebar groups - vertical list with proper spacing */
  .templates-sidebar-left {
    display: flex;
    flex-direction: column;
    gap: 0;
  }
  .sidebar-group { 
    margin-bottom: 0;
    position: relative;
    z-index: 1;
  }
  .sidebar-group-toggle {
    padding: 14px 16px;
    font-size: 14px;
    text-align: left;
    background: var(--bg);
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 12px;
  }
  .sidebar-group-toggle span {
    text-align: left;
    flex: 1;
  }
  .sidebar-icon { width: 18px; height: 18px; flex-shrink: 0; }
  
  /* Template list - vertical dropdown, pushes content down */
  .sidebar-group-list {
    display: none;
    flex-direction: column;
    gap: 2px;
    padding: 4px 0 8px 20px;
    overflow: visible;
    background: var(--bg);
    position: relative;
    z-index: 1;
  }
  .sidebar-group-list.expanded {
    display: flex;
    max-height: none;
  }
  
  .sidebar-tpl-btn {
    padding: 10px 14px;
    font-size: 13px;
    flex-shrink: 0;
    white-space: normal;
    text-align: left;
    border: 1px solid var(--border);
    border-radius: var(--radius-xs);
    background: var(--bg-card);
  }
  .tpl-btn-icon { font-size: 14px; width: 18px; flex-shrink: 0; }
  
  /* Showcase block - HORIZONTAL scroll */
  .template-showcase {
    overflow-x: scroll !important;
    overflow-y: visible !important;
    -webkit-overflow-scrolling: touch;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0;
    max-width: 100vw;
  }
  .template-showcase::-webkit-scrollbar { height: 8px; }
  .template-showcase::-webkit-scrollbar-track { background: rgba(255,255,255,0.05); border-radius: 4px; }
  .template-showcase::-webkit-scrollbar-thumb { background: var(--blue); border-radius: 4px; }
  
  .template-detail {
    display: none;
    padding: 20px;
    padding-right: 40px;
    box-sizing: border-box;
  }
  .template-detail.active {
    display: block;
    width: 600px !important;
    min-width: 600px !important;
  }
  
  /* Ensure right border is visible when scrolled */
  .template-showcase::after {
    content: '';
    display: block;
    min-width: 1px;
    height: 1px;
  }
  
  .template-table-wrap {
    overflow-x: visible;
  }
  .template-table {
    min-width: 450px;
  }
  .template-detail-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .template-tags {
    margin-left: 0;
    margin-top: 8px;
  }
  .template-detail-title {
    font-size: 22px;
    margin: 12px 0 10px;
  }
  .template-detail-desc {
    font-size: 14px;
    margin-bottom: 16px;
  }
  .template-detail-section h4 {
    font-size: 16px;
  }
  .template-detail-section p {
    font-size: 14px;
  }
  .template-benefits {
    grid-template-columns: 1fr;
  }
  .template-benefits li {
    font-size: 14px;
    padding: 8px 12px 8px 28px;
  }
  .template-benefits li::before { left: 8px; }
  
  .template-history {
    padding: 12px 14px;
  }
  
  .template-table-wrap {
    margin: 12px 0;
  }
  .template-table {
    font-size: 12px;
  }
  .template-table th,
  .template-table td {
    padding: 8px 10px;
  }
  
  .template-cta {
    width: 100%;
    justify-content: center;
    margin-top: 16px;
    padding: 10px 20px;
  }
  
  .school-header { padding: 12px; }
  .school-logo { width: 32px; height: 32px; font-size: 14px; }
  .school-desc { font-size: 14px; }
  
  .sidebar-title { font-size: 11px; padding: 0 12px; margin-bottom: 8px; }
  
  /* Board demo elements - make them smaller on mobile */
  .bel .sticky {
    width: 65px;
    padding: 7px;
    font-size: 6px;
    transform: rotate(-1deg) scale(0.5);
  }
  .bel .board-card {
    width: 95px;
    padding: 6px;
    transform: scale(0.5);
  }
  .bel .board-card h4 { font-size: 7px; margin-bottom: 5px; }
  .bel .card-badge { font-size: 5px; padding: 1px 4px; }
  .bel .card-chart { height: 25px; margin-bottom: 5px; }
  .bel .card-meta span:first-child { font-size: 5px; }
  .bel .card-avatar { width: 10px; height: 10px; font-size: 5px; }
  .bel .card-kpi { gap: 6px; }
  .bel .kpi-value { font-size: 8px; }
  .bel .kpi-label { font-size: 5px; }
  
  .bel .mind-node {
    padding: 5px 10px;
    font-size: 7px;
  }
  .bel .mind-root {
    padding: 6px 12px;
    font-size: 8px;
  }
  
  .bel .board-table {
    width: 120px;
    transform: scale(0.5);
  }
  .bel .table-title { padding: 5px 7px; font-size: 6px; }
  .bel .board-table th,
  .bel .board-table td { padding: 3px 5px; font-size: 5px; }
}

.sidebar-tpl-btn .ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
  width: 10px;
  height: 10px;
  transform: translate(-50%, -50%) scale(0);
  animation: ripple-expand 0.6s ease-out forwards;
  pointer-events: none;
}
@keyframes ripple-expand {
  to { transform: translate(-50%, -50%) scale(25); opacity: 0; }
}
