/*
Theme Name: Maintenance GENIUS
Theme URI: https://maintenancegenius.ca
Author: 1001Web.ca
Author URI: https://1001web.ca
Description: Thème officiel du plugin Maintenance GENIUS — design dark futuriste avec les couleurs de la marque. Inclut landing page, changelog, documentation et espace téléchargements.
Version: 2.3.49
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
License: Proprietary
License URI: https://maintenancegenius.ca/licence/
Text Domain: mg-theme
Tags: dark, one-column, custom-menu, featured-images, translation-ready
*/

/* ═══════════════════════════════════════════
   MAINTENANCE GENIUS THEME
   Brand: #9353AC → #D87BA8 + 1001Web.ca
   ═══════════════════════════════════════════ */

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --violet: #9353AC;
  --violet-deep: #764ba2;
  --rose: #D87BA8;
  --rose-light: #f0c6d9;
  --green: #00d26a;
  --green-dark: #00bf60;
  --orange: #f39c12;
  --dark: #0a0a0f;
  --dark-card: #12121a;
  --dark-surface: #1a1a26;
  --dark-border: #2a2a3a;
  --light: #f8f6fa;
  --text: #e0dce6;
  --text-muted: #8a8599;
  --glow-violet: rgba(147, 83, 172, 0.4);
  --glow-rose: rgba(216, 123, 168, 0.3);
  --gradient-main: linear-gradient(135deg, var(--violet) 0%, var(--rose) 100%);
  --gradient-dark: linear-gradient(135deg, #2d3436 0%, #1e272e 100%);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Outfit', sans-serif;
  background: var(--dark);
  color: var(--text);
  overflow-x: hidden;
  line-height: 1.6;
}

a { color: var(--rose-light); text-decoration: none; transition: color 0.3s, text-shadow 0.3s; }
a:hover { color: #fff; text-shadow: 0 0 12px var(--glow-rose); }

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

/* ═══ CURSOR GLOW ═══ */
.cursor-glow {
  position: fixed;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(147,83,172,0.35) 0%, rgba(216,123,168,0.12) 35%, transparent 70%);
  pointer-events: none;
  z-index: 0;
  transform: translate(-50%, -50%);
  transition: transform 0.1s ease-out;
}

/* ═══ GRAIN OVERLAY ═══ */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}

/* ═══ NAVIGATION ═══ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 16px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  backdrop-filter: blur(20px);
  background: rgba(10, 10, 15, 0.7);
  border-bottom: 1px solid rgba(147, 83, 172, 0.1);
  transition: all 0.3s;
}

.nav.scrolled {
  padding: 10px 40px;
  background: rgba(10, 10, 15, 0.95);
  box-shadow: 0 4px 30px rgba(0,0,0,0.3);
}

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

.nav-logo-icon {
  width: 38px;
  height: 38px;
  background: var(--gradient-main);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 900;
  color: #fff;
  box-shadow: 0 2px 15px var(--glow-violet);
  transform: rotate(45deg);
}
.nav-logo-icon span {
  display: block;
  transform: rotate(-45deg);
  line-height: 1;
}

.nav-logo-text {
  font-size: 20px;
  font-weight: 700;
  color: #fff;
}

.nav-logo-text span {
  background: var(--gradient-main);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-logo-img {
  height: 38px;
  width: auto;
  display: block;
}

.nav-logo-text {
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
}

.nav-logo-text span {
  background: var(--gradient-main);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ═══ GO TO TOP ═══ */
.go-to-top {
  position: fixed;
  bottom: 96px;
  right: 32px;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(30, 20, 40, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(16px);
  transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease, background 0.2s ease, box-shadow 0.2s ease;
  z-index: 999;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.go-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.go-to-top:hover {
  background: var(--gradient-main);
  border-color: transparent;
  box-shadow: 0 4px 24px var(--glow-violet);
  transform: translateY(-2px);
}

.go-to-top:active {
  transform: translateY(0);
}

@media (max-width: 768px) {
  .go-to-top {
    bottom: 80px;
    right: 20px;
    width: 40px;
    height: 40px;
  }
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.3s;
  position: relative;
}

.nav-links a:hover { color: #fff; text-shadow: 0 0 12px var(--glow-rose); }

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient-main);
  transition: width 0.3s;
}

.nav-links a:hover::after { width: 100%; }

.nav-links .current-menu-item a,
.nav-links .current_page_item a {
  color: #fff;
}

.nav-links .current-menu-item a::after,
.nav-links .current_page_item a::after {
  width: 100%;
}

.nav-cta {
  padding: 10px 24px !important;
  background: var(--gradient-main) !important;
  color: #fff !important;
  border-radius: 8px !important;
  font-weight: 600 !important;
  box-shadow: 0 2px 15px var(--glow-violet);
  transition: all 0.3s !important;
}

.nav-cta:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 25px var(--glow-violet) !important;
}

.nav-cta::after { display: none !important; }

/* ═══ LANGUAGE SWITCHER (Polylang) ═══ */
.lang-switcher {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 8px;
  padding-left: 16px;
  border-left: 1px solid rgba(255, 255, 255, 0.1);
}

.lang-switcher ul {
  display: flex;
  align-items: center;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.lang-switcher li {
  display: flex;
}

.lang-switcher a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.2s ease;
  opacity: 0.6;
}

.lang-switcher a:hover,
.lang-switcher .current-lang a {
  opacity: 1;
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

.lang-switcher .current-lang a {
  background: var(--gradient-main);
  border-color: transparent;
  box-shadow: 0 2px 10px var(--glow-violet);
}

.lang-switcher img {
  width: 20px;
  height: 14px;
  border-radius: 2px;
  object-fit: cover;
}

.lang-switcher a::after {
  display: none !important;
}

@media (max-width: 768px) {
  .lang-switcher {
    margin-left: 0;
    padding-left: 0;
    border-left: none;
    padding-top: 16px;
    margin-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    justify-content: center;
  }
}

/* ═══ DROPDOWN SUBMENU ═══ */
.nav-links li { position: relative; }
.nav-links .sub-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  min-width: 180px;
  background: rgba(18, 18, 26, 0.97);
  border: 1px solid var(--dark-border);
  border-radius: 10px;
  padding: 8px 0;
  padding-top: 20px; /* Space for bridge */
  margin-top: 0; /* Remove gap */
  backdrop-filter: blur(20px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.5);
  z-index: 1001;
  list-style: none;
}
/* Invisible bridge to prevent hover loss */
.nav-links li:hover > .sub-menu,
.nav-links li:focus-within > .sub-menu { display: block; }
.nav-links .sub-menu::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  height: 20px; /* Bridge height */
  background: transparent;
}
.nav-links .sub-menu::after {
  content: '';
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  border: 8px solid transparent;
  border-bottom-color: var(--dark-border);
}
.nav-links .sub-menu li { padding: 0; }
.nav-links .sub-menu a {
  display: block;
  padding: 10px 20px;
  font-size: 13px;
  white-space: nowrap;
}
.nav-links .sub-menu a:hover {
  background: var(--dark-surface);
}
.nav-links .sub-menu a::after { display: none; }

/* Mobile menu toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: #fff;
  margin: 5px 0;
  transition: all 0.3s;
}

/* ═══ BUTTONS ═══ */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 32px;
  background: var(--gradient-main);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.3s;
  box-shadow: 0 4px 20px var(--glow-violet);
  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: opacity 0.3s;
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 35px var(--glow-violet);
  color: #fff;
}

.btn-primary:hover::before { opacity: 1; }

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 32px;
  background: transparent;
  color: var(--text);
  border: 1px solid var(--dark-border);
  border-radius: 12px;
  font-family: inherit;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.3s;
}

.btn-secondary:hover {
  border-color: var(--violet);
  color: #fff;
  transform: translateY(-2px);
}

/* ═══ SECTION SHARED ═══ */
.section {
  padding: 100px 40px;
  position: relative;
}

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

.section-eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 3px;
  background: var(--gradient-main);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 16px;
}

.section-title {
  font-size: clamp(28px, 3.5vw, 44px);
  font-weight: 800;
  color: #fff;
  line-height: 1.15;
  margin-bottom: 16px;
}

.section-subtitle {
  font-size: 16px;
  color: var(--text-muted);
}

.gradient-text {
  background: var(--gradient-main);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ═══ HERO SECTION ═══ */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  padding: 120px 40px 80px;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  animation: orbFloat 8s ease-in-out infinite;
}

.hero-orb-1 {
  width: 600px;
  height: 600px;
  background: rgba(147, 83, 172, 0.15);
  top: -10%;
  right: -5%;
}

.hero-orb-2 {
  width: 400px;
  height: 400px;
  background: rgba(216, 123, 168, 0.1);
  bottom: -10%;
  left: -5%;
  animation-delay: -4s;
}

.hero-orb-3 {
  width: 300px;
  height: 300px;
  background: rgba(0, 210, 106, 0.05);
  top: 40%;
  left: 30%;
  animation-delay: -2s;
}

@keyframes orbFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -20px) scale(1.05); }
  66% { transform: translate(-20px, 20px) scale(0.95); }
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(147,83,172,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(147,83,172,0.03) 1px, transparent 1px);
  background-size: 60px 60px;
}

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

.hero-left { position: relative; }

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: rgba(147, 83, 172, 0.1);
  border: 1px solid rgba(147, 83, 172, 0.2);
  border-radius: 100px;
  font-size: 13px;
  font-weight: 500;
  color: var(--rose-light);
  margin-bottom: 24px;
  animation: fadeInUp 0.8s ease-out;
}

.hero-badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(0, 210, 106, 0.4); }
  50% { opacity: 0.8; box-shadow: 0 0 0 8px rgba(0, 210, 106, 0); }
}

.hero-title {
  font-size: clamp(40px, 5vw, 68px);
  font-weight: 900;
  line-height: 1.25;
  margin-bottom: 24px;
  color: #fff;
  animation: fadeInUp 0.8s ease-out 0.1s both;
}

.hero-title-line { display: block; }
.hero-title-line:last-child { padding-bottom: 8px; }

.hero-subtitle {
  font-size: 18px;
  color: var(--text-muted);
  max-width: 480px;
  margin-bottom: 40px;
  animation: fadeInUp 0.8s ease-out 0.2s both;
}

.hero-actions {
  display: flex;
  gap: 16px;
  align-items: center;
  animation: fadeInUp 0.8s ease-out 0.3s both;
}

/* Hero mockup */
.hero-right {
  position: relative;
  animation: fadeInUp 0.8s ease-out 0.4s both;
}

.hero-mockup {
  position: relative;
  background: var(--dark-card);
  border: 1px solid var(--dark-border);
  border-radius: 16px;
  overflow: hidden;
  box-shadow:
    0 20px 60px rgba(0,0,0,0.5),
    0 0 0 1px rgba(147,83,172,0.1),
    inset 0 1px 0 rgba(255,255,255,0.05);
}

.mockup-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 18px;
  background: rgba(255,255,255,0.03);
  border-bottom: 1px solid var(--dark-border);
}

.mockup-dot { width: 12px; height: 12px; border-radius: 50%; }
.mockup-dot-red { background: #ff5f57; }
.mockup-dot-yellow { background: #febc2e; }
.mockup-dot-green { background: #28c840; }

.mockup-url {
  flex: 1;
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
  font-family: 'JetBrains Mono', monospace;
}

.mockup-body {
  padding: 40px;
  min-height: 320px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: linear-gradient(180deg, rgba(147,83,172,0.05) 0%, transparent 100%);
  position: relative;
}

.mockup-maintenance-icon {
  font-size: 48px;
  margin-bottom: 16px;
  animation: float 3s ease-in-out infinite;
}

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

.mockup-maintenance-title {
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 8px;
}

.mockup-maintenance-text {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.mockup-progress {
  width: 200px;
  height: 6px;
  background: var(--dark-border);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 16px;
}

.mockup-progress-bar {
  height: 100%;
  background: var(--gradient-main);
  border-radius: 3px;
  animation: progressAnim 3s ease-in-out infinite;
}

@keyframes progressAnim {
  0% { width: 0%; }
  50% { width: 75%; }
  100% { width: 100%; }
}

.mockup-countdown {
  font-family: 'JetBrains Mono', monospace;
  font-size: 28px;
  font-weight: 600;
  color: var(--rose);
  letter-spacing: 4px;
}

.mockup-label {
  position: absolute;
  padding: 8px 14px;
  background: var(--dark-surface);
  border: 1px solid var(--dark-border);
  border-radius: 8px;
  font-size: 11px;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.mockup-label-1 {
  top: -12px;
  right: -20px;
  border-color: var(--violet);
  color: var(--rose-light);
  animation: labelFloat 4s ease-in-out infinite;
}

.mockup-label-2 {
  bottom: 40px;
  left: -30px;
  border-color: var(--green);
  color: var(--green);
  animation: labelFloat 4s ease-in-out infinite 2s;
}

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

/* ═══ STATS BAR ═══ */
.stats-bar {
  padding: 48px 40px;
  background: var(--dark-card);
  border-top: 1px solid var(--dark-border);
  border-bottom: 1px solid var(--dark-border);
}

.stats-bar-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
}

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

.stat-number {
  font-size: 36px;
  font-weight: 800;
  background: var(--gradient-main);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-label {
  font-size: 14px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ═══ FEATURES GRID ═══ */
.features-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.feature-card {
  background: var(--dark-card);
  border: 1px solid var(--dark-border);
  border-radius: 16px;
  padding: 36px;
  transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(147,83,172,0.05), transparent);
  opacity: 0;
  transition: opacity 0.4s;
}

.feature-card:hover {
  transform: translateY(-8px);
  border-color: rgba(147, 83, 172, 0.3);
  box-shadow: 0 20px 40px rgba(0,0,0,0.3), 0 0 0 1px rgba(147,83,172,0.15);
}

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

.feature-icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin-bottom: 20px;
  position: relative;
  z-index: 1;
}

.feature-icon-violet { background: rgba(147, 83, 172, 0.15); border: 1px solid rgba(147, 83, 172, 0.2); }
.feature-icon-green { background: rgba(0, 210, 106, 0.1); border: 1px solid rgba(0, 210, 106, 0.2); }
.feature-icon-rose { background: rgba(216, 123, 168, 0.1); border: 1px solid rgba(216, 123, 168, 0.2); }
.feature-icon-orange { background: rgba(243, 156, 18, 0.1); border: 1px solid rgba(243, 156, 18, 0.2); }

.feature-title {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  margin: 0 0 10px 0;
  position: relative;
  z-index: 1;
}

.feature-desc {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
  position: relative;
  z-index: 1;
}

.feature-more {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  color: var(--rose-light);
  text-decoration: none;
  margin-top: 12px;
  position: relative;
  z-index: 1;
  transition: color 0.2s;
}
.feature-more:hover {
  color: var(--rose);
}

/* ═══ DEMO SECTION ═══ */
.demo-section {
  background: var(--dark-card);
  border-top: 1px solid var(--dark-border);
  border-bottom: 1px solid var(--dark-border);
}

.demo-content {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.demo-toggle-container { margin: 32px 0; }

.demo-toggle {
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  user-select: none;
}

.demo-toggle-track {
  width: 72px;
  height: 38px;
  border-radius: 19px;
  background: #3a3a4a;
  border: 2px solid #555;
  position: relative;
  transition: all 0.3s;
  box-shadow: 0 0 12px rgba(0,0,0,0.3);
}

.demo-toggle-track:hover {
  border-color: var(--violet);
  box-shadow: 0 0 20px var(--glow-violet);
}

.demo-toggle-track.active {
  background: var(--gradient-main);
  border-color: var(--rose);
  box-shadow: 0 0 24px var(--glow-violet), 0 0 48px var(--glow-rose);
}

.demo-toggle-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #fff;
  transition: all 0.3s cubic-bezier(0.68, -0.55, 0.27, 1.55);
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.demo-toggle-track.active .demo-toggle-thumb { left: 37px; }

.demo-toggle-label {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-muted);
  transition: color 0.3s;
  letter-spacing: 0.3px;
}

.demo-feature-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.demo-feature-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 15px;
  color: var(--text);
}

.demo-feature-list li::before {
  content: '✓';
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: rgba(0, 210, 106, 0.1);
  color: var(--green);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}

.demo-preview {
  background: var(--dark-surface);
  border: 1px solid var(--dark-border);
  border-radius: 16px;
  overflow: hidden;
  transition: all 0.5s;
}

.demo-preview-header {
  padding: 12px 18px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.02);
  border-bottom: 1px solid var(--dark-border);
}

.demo-preview-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  margin-left: auto;
}

.demo-preview-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  transition: background 0.3s;
}

.demo-preview-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0;
  text-align: center;
  transition: all 0.5s;
  overflow: hidden;
  min-height: 0;
}

.demo-preview-body.site-live {
  background: linear-gradient(180deg, rgba(0,210,106,0.03) 0%, transparent 100%);
  padding: 40px;
  min-height: 280px;
}
.demo-preview-body.site-maintenance {
  background: none;
  padding: 0;
}
.demo-state-maintenance {
  width: 100%;
  line-height: 0;
}
.demo-state-maintenance img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 0 0 15px 15px;
}
.demo-state-maintenance > div {
  border-radius: 0 0 15px 15px !important;
  min-height: 280px;
}

/* ═══ PRESETS CAROUSEL ═══ */
.presets-showcase {
  max-width: 1200px;
  margin: 0 auto;
}

.presets-carousel {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  padding: 20px 0;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.presets-carousel::-webkit-scrollbar { display: none; }

.preset-card {
  flex: 0 0 280px;
  scroll-snap-align: start;
  background: var(--dark-card);
  border: 1px solid var(--dark-border);
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s;
  cursor: pointer;
}

.preset-card:hover {
  border-color: var(--violet);
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(0,0,0,0.3);
}

.preset-preview {
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
}

.preset-info {
  padding: 16px;
  border-top: 1px solid var(--dark-border);
}

.preset-name { font-size: 14px; font-weight: 600; color: #fff; margin: 0; }
.preset-tag { font-size: 11px; color: var(--text-muted); margin-top: 4px; }

/* ═══ PRICING ═══ */
.pricing-grid {
  max-width: 900px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}

.pricing-card {
  background: var(--dark-card);
  border: 1px solid var(--dark-border);
  border-radius: 20px;
  padding: 44px 36px;
  position: relative;
  transition: all 0.4s;
}

.pricing-card:hover { transform: translateY(-6px); }

.pricing-card.featured {
  border-color: var(--violet);
  box-shadow: 0 0 0 1px rgba(147,83,172,0.3), 0 20px 60px rgba(147,83,172,0.15);
}

.pricing-popular {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  padding: 6px 20px;
  background: var(--gradient-main);
  border-radius: 100px;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.pricing-name { font-size: 20px; font-weight: 700; color: #fff; margin: 0 0 8px 0; }
.pricing-desc { font-size: 14px; color: var(--text-muted); margin-bottom: 24px; }

.pricing-price {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin-bottom: 32px;
}

.pricing-currency { font-size: 22px; font-weight: 600; color: var(--text-muted); }
.pricing-amount { font-size: 52px; font-weight: 900; color: #fff; line-height: 1; }
.pricing-period { font-size: 14px; color: var(--text-muted); }

.pricing-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 32px;
}

.pricing-features li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--text);
}

.pricing-features .check { color: var(--green); font-weight: 700; }
.pricing-features .cross { color: var(--text-muted); opacity: 0.4; }

.pricing-btn {
  display: block;
  width: 100%;
  padding: 14px;
  text-align: center;
  border-radius: 12px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.3s;
}

.pricing-btn-outline {
  background: transparent;
  border: 1px solid var(--dark-border);
  color: var(--text);
}

.pricing-btn-outline:hover { border-color: var(--violet); color: #fff; }

.pricing-btn-primary {
  background: var(--gradient-main);
  border: none;
  color: #fff;
  box-shadow: 0 4px 20px var(--glow-violet);
}

.pricing-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px var(--glow-violet);
  color: #fff;
}

/* ═══ TESTIMONIALS ═══ */
.testimonials-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.testimonial-card {
  background: var(--dark-card);
  border: 1px solid var(--dark-border);
  border-radius: 16px;
  padding: 32px;
  transition: all 0.3s;
}

.testimonial-card:hover {
  border-color: rgba(147,83,172,0.2);
  transform: translateY(-4px);
}

.testimonial-stars { color: var(--orange); font-size: 14px; margin-bottom: 16px; letter-spacing: 2px; }

.testimonial-text {
  font-size: 15px;
  color: var(--text);
  line-height: 1.7;
  margin-bottom: 20px;
  font-style: italic;
}

.testimonial-author { display: flex; align-items: center; gap: 12px; }

.testimonial-avatar {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--gradient-main);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
}

.testimonial-name { font-size: 14px; font-weight: 600; color: #fff; }
.testimonial-role { font-size: 12px; color: var(--text-muted); }

/* ═══ CTA SECTION ═══ */
.cta-section {
  padding: 100px 40px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-bg-orb {
  position: absolute;
  width: 800px;
  height: 800px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(147,83,172,0.12), transparent 70%);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  filter: blur(40px);
}

.cta-content {
  position: relative;
  z-index: 1;
  max-width: 600px;
  margin: 0 auto;
}

.cta-title {
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 900;
  color: #fff;
  line-height: 1.15;
  margin-bottom: 16px;
}

.cta-subtitle {
  font-size: 18px;
  color: var(--text-muted);
  margin-bottom: 40px;
}

.cta-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
}

/* ═══ FOOTER ═══ */
.footer {
  padding: 32px 40px 10px;
  border-top: 1px solid var(--dark-border);
  background: var(--dark-card);
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-left { display: flex; align-items: center; gap: 12px; }

.footer-logo-img {
  width: 32px;
  height: 32px;
  max-width: 32px;
  max-height: 32px;
  object-fit: contain;
  flex-shrink: 0;
}

.footer-text { font-size: 13px; color: var(--text-muted); }
.footer-text a { color: var(--rose-light); }
.footer-text a:hover { color: #fff; }

.footer-links { display: flex; gap: 24px; }
.footer-links a { font-size: 13px; color: var(--text-muted); transition: color 0.3s, text-shadow 0.3s; }
.footer-links a:hover { color: #fff; text-shadow: 0 0 10px var(--glow-rose); }

/* ═══ CHANGELOG PAGE ═══ */
.page-header {
  padding: 140px 40px 60px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.page-header-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(147,83,172,0.08) 0%, transparent 100%);
}

.page-header h1 {
  font-size: clamp(32px, 4vw, 52px);
  font-weight: 900;
  color: #fff;
  position: relative;
  z-index: 1;
}

.page-header p {
  font-size: 18px;
  color: var(--text-muted);
  margin-top: 12px;
  position: relative;
  z-index: 1;
}

.changelog-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 40px 100px;
}

.changelog-entry {
  position: relative;
  padding: 32px;
  margin-bottom: 24px;
  background: var(--dark-card);
  border: 1px solid var(--dark-border);
  border-radius: 16px;
  transition: all 0.3s;
}

.changelog-entry:hover {
  border-color: rgba(147,83,172,0.2);
  transform: translateX(4px);
}

.changelog-entry::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  border-radius: 3px 0 0 3px;
}

.changelog-entry.major::before { background: var(--gradient-main); }
.changelog-entry.minor::before { background: var(--green); }
.changelog-entry.patch::before { background: var(--orange); }

.changelog-version {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.changelog-version h2 {
  font-size: 22px;
  font-weight: 800;
  color: #fff;
  margin: 0;
}

.changelog-tag {
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.changelog-tag-major { background: rgba(147,83,172,0.2); color: var(--rose-light); }
.changelog-tag-minor { background: rgba(0,210,106,0.15); color: var(--green); }
.changelog-tag-patch { background: rgba(243,156,18,0.15); color: var(--orange); }

.changelog-date {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 16px;
  font-family: 'JetBrains Mono', monospace;
}

.changelog-notes {
  font-size: 14px;
  line-height: 1.8;
  color: var(--text);
}

.changelog-notes ul {
  list-style: none;
  padding: 0;
}

.changelog-notes li {
  padding: 4px 0 4px 24px;
  position: relative;
}

.changelog-notes li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--violet);
  font-weight: 600;
}

/* ═══ DOCUMENTATION PAGE ═══ */
.docs-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 40px 100px;
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 48px;
}

.docs-sidebar {
  position: sticky;
  top: 100px;
  height: fit-content;
}

.docs-nav {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.docs-nav a {
  display: block;
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 14px;
  color: var(--text-muted);
  transition: all 0.2s;
}

.docs-nav a:hover,
.docs-nav .active a {
  background: rgba(147,83,172,0.1);
  color: #fff;
}

.docs-nav .active a {
  border-left: 2px solid var(--violet);
}

.docs-content {
  min-height: 60vh;
}

.docs-content h2 {
  font-size: 28px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--dark-border);
}

.docs-content h3 {
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  margin: 32px 0 12px;
}

.docs-content p {
  margin-bottom: 16px;
  line-height: 1.8;
}

.docs-content code {
  font-family: 'JetBrains Mono', monospace;
  background: var(--dark-surface);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 13px;
  color: var(--rose-light);
}

.docs-content pre {
  background: var(--dark-card);
  border: 1px solid var(--dark-border);
  border-radius: 12px;
  padding: 24px;
  margin: 16px 0;
  overflow-x: auto;
}

.docs-content pre code {
  background: none;
  padding: 0;
  font-size: 13px;
  line-height: 1.8;
}

/* ═══ DOWNLOADS PAGE ═══ */
.downloads-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 40px 100px;
}

.download-card {
  background: var(--dark-card);
  border: 1px solid var(--dark-border);
  border-radius: 16px;
  padding: 32px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all 0.3s;
}

.download-card:hover {
  border-color: rgba(147,83,172,0.2);
  transform: translateY(-2px);
}

.download-info h3 {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 4px;
}

.download-meta {
  font-size: 13px;
  color: var(--text-muted);
  display: flex;
  gap: 16px;
}

.download-btn {
  padding: 12px 24px;
  background: var(--gradient-main);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.3s;
  box-shadow: 0 2px 15px var(--glow-violet);
  white-space: nowrap;
}

.download-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px var(--glow-violet);
  color: #fff;
}

/* Login required notice */
.login-required {
  text-align: center;
  padding: 80px 40px;
}

.login-required h2 {
  font-size: 28px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 16px;
}

.login-required p {
  color: var(--text-muted);
  margin-bottom: 32px;
}

/* ═══ BLOG / SINGLE ═══ */
.blog-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 40px 100px;
}

.blog-post {
  background: var(--dark-card);
  border: 1px solid var(--dark-border);
  border-radius: 16px;
  padding: 36px;
  margin-bottom: 32px;
  transition: all 0.3s;
}

.blog-post:hover {
  border-color: rgba(147,83,172,0.2);
}

.blog-post h2 {
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 8px;
}

.blog-post h2 a { color: #fff; }
.blog-post h2 a:hover { color: var(--rose-light); }

.blog-post-meta {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.blog-post-excerpt {
  font-size: 15px;
  line-height: 1.7;
  color: var(--text);
}

.blog-post-content {
  font-size: 16px;
  line-height: 1.8;
  color: var(--text);
}

.blog-post-content h2,
.blog-post-content h3,
.blog-post-content h4 {
  color: #fff;
  margin-top: 32px;
  margin-bottom: 12px;
}

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

.blog-post-content img {
  border-radius: 12px;
  margin: 24px 0;
}

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

.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: all 0.8s cubic-bezier(0.23, 1, 0.32, 1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ═══ RESPONSIVE ═══ */
@media (max-width: 1024px) {
  .hero-content { grid-template-columns: 1fr; gap: 48px; }
  .demo-content { grid-template-columns: 1fr; gap: 48px; }
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .testimonials-grid { grid-template-columns: repeat(2, 1fr); }
  .docs-container { grid-template-columns: 1fr; }
  .docs-sidebar { position: static; }
}

@media (max-width: 768px) {
  .nav { padding: 12px 20px; }
  .nav-links { 
    display: none;
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    background: rgba(10,10,15,0.98);
    flex-direction: column;
    padding: 20px;
    gap: 16px;
    border-bottom: 1px solid var(--dark-border);
  }
  .nav-links.active { display: flex; }
  .nav-toggle { display: block; }
  .hero { padding: 100px 20px 60px; }
  .section { padding: 60px 20px; }
  .features-grid { grid-template-columns: 1fr; }
  .pricing-grid { grid-template-columns: 1fr; max-width: 400px; }
  .testimonials-grid { grid-template-columns: 1fr; }
  .stats-bar-inner { grid-template-columns: repeat(2, 1fr); }
  .hero-actions { flex-direction: column; }
  .cta-actions { flex-direction: column; align-items: center; }
  .footer-inner { flex-direction: column; gap: 20px; text-align: center; }
  .footer-links { justify-content: center; }
  .changelog-container,
  .downloads-container,
  .blog-container { padding: 0 20px 60px; }
  .download-card { flex-direction: column; gap: 16px; text-align: center; }
  .page-header { padding: 100px 20px 40px; }
}

/* ═══ RED ARROW "ESSAYEZ-MOI" ═══ */
.demo-try-arrow {
    display: flex;
    align-items: center;
    gap: 4px;
    animation: mg-bounce-arrow 1.8s ease-in-out infinite;
}
.demo-try-text {
    font-family: 'Outfit', sans-serif;
    font-size: 15px;
    font-weight: 700;
    color: #ff3b3b;
    letter-spacing: 0.5px;
    text-shadow: 0 0 20px rgba(255, 59, 59, 0.4);
    white-space: nowrap;
}
.demo-try-svg {
    flex-shrink: 0;
}
@keyframes mg-bounce-arrow {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(6px); }
}

/* ═══ DEMO STATE TRANSITIONS ═══ */
.demo-state-live {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.demo-progress-animate {
    animation: mg-demo-progress 3s ease-in-out infinite alternate;
}
@keyframes mg-demo-progress {
    0% { width: 45%; }
    100% { width: 85%; }
}

/* ═══ PAGE TOUR ═══ */
.tour-nav {
    position: sticky;
    top: 80px;
    background: var(--dark-card);
    border: 1px solid var(--dark-border);
    border-radius: 12px;
    padding: 20px;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
}
.tour-nav a {
    display: block;
    padding: 8px 12px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 14px;
    border-radius: 6px;
    transition: all 0.2s;
    border-left: 2px solid transparent;
}
.tour-nav a:hover,
.tour-nav a.active {
    color: var(--rose-light);
    background: rgba(147, 83, 172, 0.1);
    border-left-color: var(--violet);
}
.tour-section {
    scroll-margin-top: 100px;
    margin-bottom: 64px;
    padding-bottom: 48px;
    border-bottom: 1px solid var(--dark-border);
}
.tour-section:last-child { border-bottom: none; }
.tour-section-header {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    margin-bottom: 24px;
}
.tour-section-icon {
    font-size: 40px;
    flex-shrink: 0;
    line-height: 1;
}
.tour-section h2 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--light);
}
.tour-section-intro {
    font-size: 16px;
    color: var(--rose-light);
    font-weight: 500;
}
.tour-section-content {
    color: var(--text-muted);
    font-size: 15px;
    line-height: 1.8;
}
.tour-section-content p {
    margin-bottom: 16px;
}
.tour-features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 10px;
    margin: 24px 0;
    padding: 20px;
    background: var(--dark-card);
    border: 1px solid var(--dark-border);
    border-radius: 12px;
}
.tour-feature-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: var(--text);
    padding: 6px 0;
}
.tour-feature-item svg { flex-shrink: 0; }
.tour-usecase {
    margin: 24px 0;
    padding: 20px 24px;
    background: rgba(147, 83, 172, 0.06);
    border-left: 3px solid var(--violet);
    border-radius: 0 10px 10px 0;
}
.tour-usecase-label {
    font-size: 13px;
    font-weight: 700;
    color: var(--violet);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}
.tour-usecase p {
    font-size: 14px;
    font-style: italic;
    color: var(--text);
    margin: 0;
}
.tour-screenshot-wrap {
    margin: 24px 0;
}
.tour-screenshot {
    width: 100%;
    border-radius: 12px;
    border: 1px solid var(--dark-border);
    display: block;
}
.tour-screenshot-caption {
    text-align: center;
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 8px;
}
.tour-cta-box {
    margin: 32px 0 0;
    padding: 32px;
    background: var(--dark-card);
    border: 1px solid var(--violet);
    border-radius: 14px;
    box-shadow: 0 0 24px var(--glow-violet);
}
.tour-bottom-cta {
    text-align: center;
    padding: 48px 0;
    border-top: 1px solid var(--dark-border);
}
.tour-bottom-cta h3 {
    font-size: 28px;
    margin-bottom: 12px;
}
.tour-bottom-cta p {
    color: var(--text-muted);
    margin-bottom: 0;
}
.tour-grid {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 40px;
    max-width: 1100px;
    margin: 0 auto;
}
@media (max-width: 768px) {
    .tour-grid {
        grid-template-columns: 1fr;
    }
    .tour-nav {
        position: static;
        margin-bottom: 32px;
    }
    .tour-section-header { flex-direction: column; }
    .tour-features-grid { grid-template-columns: 1fr; }
}

/* ═══ DOCS SEARCH ═══ */
.docs-search-box {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--dark-card);
    border: 1px solid var(--dark-border);
    border-radius: 12px;
    padding: 14px 20px;
    transition: border-color 0.3s;
}
.docs-search-box:focus-within {
    border-color: var(--violet);
    box-shadow: 0 0 0 3px var(--glow-violet);
}
.docs-search-box input {
    flex: 1;
    background: none;
    border: none;
    outline: none;
    color: var(--text);
    font-size: 16px;
    font-family: 'Outfit', sans-serif;
}
.docs-search-box input::placeholder { color: var(--text-muted); }
.docs-search-results {
    margin-top: 12px;
    padding: 10px 16px;
    background: var(--dark-surface);
    border-radius: 8px;
    font-size: 14px;
    color: var(--text-muted);
}
.docs-quick-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    background: var(--dark-card);
    border: 1px solid var(--dark-border);
    border-radius: 8px;
    color: var(--text);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
}
.docs-quick-link:hover {
    border-color: var(--violet);
    background: rgba(147, 83, 172, 0.1);
    color: var(--rose-light);
}

/* ═══ FAQ ═══ */
.faq-container {
    max-width: 800px;
    margin: 0 auto;
}
.faq-category {
    margin-bottom: 40px;
}
.faq-category-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--dark-border);
    color: var(--rose-light);
}
.faq-item {
    border: 1px solid var(--dark-border);
    border-radius: 10px;
    margin-bottom: 8px;
    overflow: hidden;
    transition: border-color 0.3s;
}
.faq-item:hover,
.faq-item.open {
    border-color: var(--violet);
}
.faq-question {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: var(--dark-card);
    border: none;
    cursor: pointer;
    color: var(--text);
    font-family: 'Outfit', sans-serif;
    font-size: 15px;
    font-weight: 500;
    text-align: left;
    gap: 16px;
    transition: background 0.2s;
}
.faq-question:hover { background: var(--dark-surface); }
.faq-chevron {
    flex-shrink: 0;
    transition: transform 0.3s;
    color: var(--text-muted);
}
.faq-item.open .faq-chevron { transform: rotate(180deg); color: var(--violet); }
.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.3s;
}
.faq-item.open .faq-answer {
    max-height: 500px;
    padding: 0 20px 20px;
}
.faq-answer p {
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.8;
}

/* ═══ CHANGELOG TIMELINE ═══ */
.changelog-timeline {
    max-width: 700px;
    margin: 0 auto;
    position: relative;
    padding-left: 32px;
}
.changelog-timeline::before {
    content: '';
    position: absolute;
    left: 7px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--dark-border);
}
.changelog-entry {
    position: relative;
    margin-bottom: 24px;
}
.changelog-dot {
    position: absolute;
    left: -28px;
    top: 18px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid var(--dark);
    z-index: 1;
}
.changelog-card {
    background: var(--dark-surface);
    border: 1px solid var(--dark-border);
    border-radius: 10px;
    padding: 20px;
}
.changelog-header {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}
.changelog-version {
    font-weight: 700;
    font-size: 16px;
    color: var(--text);
}
.changelog-type {
    font-size: 12px;
    padding: 2px 8px;
    background: rgba(255,255,255,0.05);
    border-radius: 4px;
}
.changelog-date {
    font-size: 13px;
    color: var(--text-muted);
    margin-left: auto;
}
.changelog-body {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.7;
}
.changelog-body ul { padding-left: 20px; margin: 8px 0; }
.changelog-body li { margin-bottom: 4px; }

/* ═══ SUPPORT CARDS ═══ */
.support-card {
    background: var(--dark-card);
    border: 1px solid var(--dark-border);
    border-radius: 14px;
    padding: 32px 24px;
    text-align: center;
    transition: border-color 0.3s, transform 0.3s;
}
.support-card:hover {
    border-color: var(--violet);
    transform: translateY(-4px);
}
.support-icon {
    font-size: 36px;
    margin-bottom: 16px;
}
.support-card h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 10px;
}
.support-card p {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.6;
}

/* ═══ AI CHAT WIDGET ═══ */
.mg-ai-chat {
    position: fixed;
    bottom: 90px;
    right: 24px;
    width: 380px;
    max-height: 520px;
    background: var(--dark-card);
    border: 1px solid var(--dark-border);
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    display: flex;
    flex-direction: column;
    z-index: 9999;
    transform: translateY(20px) scale(0.95);
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
}
.mg-ai-chat.open {
    transform: translateY(0) scale(1);
    opacity: 1;
    pointer-events: auto;
}
.mg-ai-chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: var(--gradient-main);
    border-radius: 16px 16px 0 0;
    color: #fff;
}
.mg-ai-chat-close {
    background: rgba(255,255,255,0.2);
    border: none;
    color: #fff;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}
.mg-ai-chat-close:hover { background: rgba(255,255,255,0.3); }
.mg-ai-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    max-height: 360px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.mg-ai-msg {
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.6;
    max-width: 88%;
    word-wrap: break-word;
}
.mg-ai-msg-bot {
    background: var(--dark-surface);
    color: var(--text);
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}
.mg-ai-msg-user {
    background: var(--gradient-main);
    color: #fff;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}
/* Typing indicator */
.mg-ai-typing {
    display: flex;
    gap: 4px;
    padding: 14px 18px;
}
.mg-ai-typing span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--text-muted);
    animation: mg-typing-bounce 1.4s infinite;
}
.mg-ai-typing span:nth-child(2) { animation-delay: 0.2s; }
.mg-ai-typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes mg-typing-bounce {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
    30% { transform: translateY(-6px); opacity: 1; }
}
.mg-ai-chat-input {
    display: flex;
    gap: 8px;
    padding: 12px 16px;
    border-top: 1px solid var(--dark-border);
}
.mg-ai-chat-input input {
    flex: 1;
    background: var(--dark-surface);
    border: 1px solid var(--dark-border);
    border-radius: 8px;
    padding: 10px 14px;
    color: var(--text);
    font-family: 'Outfit', sans-serif;
    font-size: 14px;
    outline: none;
}
.mg-ai-chat-input input:focus { border-color: var(--violet); }
.mg-ai-chat-input button {
    background: var(--gradient-main);
    border: none;
    border-radius: 8px;
    width: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #fff;
    transition: opacity 0.2s;
}
.mg-ai-chat-input button:hover { opacity: 0.9; }

/* FAB Button */
.mg-ai-fab {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--gradient-main);
    border: none;
    cursor: pointer;
    z-index: 9998;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 24px var(--glow-violet);
    transition: transform 0.2s;
}
.mg-ai-fab:hover { transform: scale(1.1); }
.mg-ai-fab-icon { font-size: 24px; }
.mg-ai-fab-pulse {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: var(--gradient-main);
    animation: mg-fab-pulse 2s ease-out infinite;
    z-index: -1;
}
@keyframes mg-fab-pulse {
    0% { transform: scale(1); opacity: 0.5; }
    100% { transform: scale(1.8); opacity: 0; }
}

@media (max-width: 480px) {
    .mg-ai-chat {
        right: 8px;
        left: 8px;
        width: auto;
        bottom: 76px;
    }
}

/* ═══ TURNSTILE IN CHAT ═══ */
.mg-ai-turnstile {
    padding: 16px;
    text-align: center;
}
.mg-ai-input-wrap {
    display: flex;
    gap: 8px;
    flex: 1;
}
.mg-ai-input-wrap input {
    flex: 1;
    background: var(--dark-surface);
    border: 1px solid var(--dark-border);
    border-radius: 8px;
    padding: 10px 14px;
    color: var(--text);
    font-family: 'Outfit', sans-serif;
    font-size: 14px;
    outline: none;
}
.mg-ai-input-wrap input:focus { border-color: var(--violet); }
.mg-ai-input-wrap button {
    background: var(--gradient-main);
    border: none;
    border-radius: 8px;
    width: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #fff;
    flex-shrink: 0;
    transition: opacity 0.2s;
}
.mg-ai-input-wrap button:hover { opacity: 0.9; }

/* ═══ TOUR EXTRAS ═══ */
.tour-badge {
    display: inline-block;
    padding: 3px 10px;
    font-size: 11px;
    font-weight: 700;
    border-radius: 4px;
    background: rgba(147, 83, 172, 0.15);
    color: var(--rose-light);
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}
.tour-screenshot-placeholder {
    margin: 24px 0;
    padding: 48px 24px;
    background: var(--dark-card);
    border: 2px dashed var(--dark-border);
    border-radius: 12px;
    text-align: center;
}
.tour-screenshot-placeholder span { font-size: 48px; display: block; margin-bottom: 12px; }
.tour-screenshot-placeholder p { font-size: 14px; color: var(--text-muted); margin: 0; }
.tour-comparison {
    margin: 24px 0;
    overflow-x: auto;
}
.tour-comparison table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}
.tour-comparison th {
    background: var(--dark-surface);
    padding: 12px 16px;
    text-align: left;
    font-weight: 700;
    border-bottom: 2px solid var(--dark-border);
    color: var(--text);
}
.tour-comparison td {
    padding: 10px 16px;
    border-bottom: 1px solid var(--dark-border);
    color: var(--text-muted);
}
.tour-comparison tr:hover td { background: rgba(255,255,255,0.02); }
.tour-compare-pro {
    color: var(--rose-light) !important;
    font-weight: 600;
}

/* Tab badges in tour header */
.tour-tab-badge {
    display: inline-block;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 600;
    background: var(--dark-card);
    border: 1px solid var(--dark-border);
    border-radius: 8px;
    color: var(--text);
}

/* Tour hero mockup */
.tour-hero-mockup {
    margin-top: 32px;
    max-width: 520px;
    margin-left: auto;
    margin-right: auto;
}
.tour-hero-mockup img {
    width: 100%;
    border-radius: 16px;
    border: 2px solid var(--dark-border);
    box-shadow: 0 12px 40px rgba(0,0,0,0.4);
}
.tour-hero-caption {
    text-align: center;
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 12px;
    font-style: italic;
}

/* ═══ DOWNLOAD PAGE ═══ */
.download-hero-card {
    background: var(--dark-card);
    border: 1px solid var(--dark-border);
    border-radius: 16px;
    padding: 40px;
    margin-bottom: 32px;
}
.download-hero-top {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 28px;
}
.download-hero-icon {
    font-size: 48px;
    width: 72px;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--dark-surface);
    border-radius: 16px;
    flex-shrink: 0;
}
.download-meta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 28px;
}
.download-meta-item {
    background: var(--dark-surface);
    border-radius: 10px;
    padding: 14px 18px;
}
.download-meta-label {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    margin-bottom: 4px;
}
.download-meta-value {
    font-size: 15px;
    font-weight: 600;
    color: #fff;
}
.download-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}
.download-btn-large {
    padding: 16px 32px !important;
    font-size: 16px !important;
    font-weight: 700;
    border-radius: 12px;
    text-decoration: none;
}
.download-install-box {
    background: var(--dark-card);
    border: 1px solid var(--dark-border);
    border-radius: 16px;
    padding: 32px;
}
.download-install-box h3 {
    font-size: 20px;
    color: #fff;
    margin-bottom: 24px;
}
.download-steps {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.download-step {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}
.download-step-num {
    width: 32px;
    height: 32px;
    min-width: 32px;
    background: var(--gradient-main);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    color: #fff;
}
.download-step strong {
    color: #fff;
    display: block;
    margin-bottom: 2px;
}
.download-step p {
    font-size: 14px;
    color: var(--text-muted);
    margin: 0;
}

/* ═══ TOUR SUB-SECTIONS ═══ */
.tour-subsections {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 24px 0;
}
.tour-subsection {
  background: var(--dark-surface);
  border: 1px solid var(--dark-border);
  border-radius: 12px;
  padding: 20px 24px;
  scroll-margin-top: 100px;
}
.tour-subsection-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  gap: 12px;
}
.tour-subsection h3 {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  margin: 0;
}
.tour-subsection p {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text);
  margin: 0;
}
.tour-subtag {
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 20px;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
}
.tour-subtag-free {
  background: rgba(0, 210, 106, 0.15);
  color: var(--green);
}
.tour-subtag-pro {
  background: rgba(147, 83, 172, 0.2);
  color: var(--rose);
}
.tour-section { scroll-margin-top: 90px; }

/* ═══ DOCUMENTATION FAQ ACCORDION ═══ */
.doc-faq-item {
  background: var(--dark-card);
  border: 1px solid var(--dark-border);
  border-radius: 10px;
  overflow: hidden;
  transition: border-color 0.3s;
}
.doc-faq-item[open] {
  border-color: var(--violet);
}
.doc-faq-question {
  padding: 16px 20px;
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background 0.2s;
}
.doc-faq-question:hover {
  background: var(--dark-surface);
}
.doc-faq-question::-webkit-details-marker { display: none; }
.doc-faq-question::after {
  content: '+';
  font-size: 20px;
  font-weight: 300;
  color: var(--violet);
  transition: transform 0.3s;
  flex-shrink: 0;
  margin-left: 12px;
}
.doc-faq-item[open] .doc-faq-question::after {
  content: '−';
}
.doc-faq-answer {
  padding: 0 20px 16px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--text);
}

/* ═══ AI CHAT IN DOCUMENTATION ═══ */
.ai-chat-box {
  background: var(--dark-card);
  border: 1px solid var(--dark-border);
  border-radius: 16px;
  overflow: hidden;
}
.ai-chat-messages {
  padding: 20px;
  max-height: 400px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.ai-chat-msg {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  max-width: 85%;
}
.ai-msg-user {
  align-self: flex-end;
  flex-direction: row-reverse;
}
.ai-msg-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--dark-surface);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}
.ai-msg-content {
  background: var(--dark-surface);
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text);
}
.ai-msg-user .ai-msg-content {
  background: var(--violet-deep);
  color: #fff;
}
.ai-msg-bot .ai-msg-content {
  border: 1px solid var(--dark-border);
}
.ai-chat-input-wrap {
  display: flex;
  border-top: 1px solid var(--dark-border);
}
.ai-chat-input {
  flex: 1;
  padding: 16px 20px;
  background: transparent;
  border: none;
  outline: none;
  font-size: 14px;
  color: #fff;
  font-family: inherit;
}
.ai-chat-input::placeholder {
  color: var(--text-muted);
}
.ai-chat-send {
  padding: 16px 20px;
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 18px;
  color: var(--violet);
  transition: color 0.2s, transform 0.2s;
}
.ai-chat-send:hover:not(:disabled) {
  color: var(--rose);
  transform: scale(1.15);
}
.ai-chat-send:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.ai-chat-footer {
  padding: 8px 20px;
  font-size: 12px;
  color: var(--text-muted);
  border-top: 1px solid var(--dark-border);
  background: rgba(0,0,0,0.2);
}

/* ═══ WHY GENIUS — COMPETITIVE DIFFERENTIATORS ═══ */
.why-genius-section {
  padding-bottom: 40px;
}
.why-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}
.why-card {
  background: var(--dark-card);
  border: 1px solid var(--dark-border);
  border-radius: 16px;
  padding: 28px;
  transition: border-color 0.3s, transform 0.3s;
  position: relative;
  overflow: hidden;
}
.why-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-main);
  opacity: 0;
  transition: opacity 0.3s;
}
.why-card:hover {
  border-color: var(--violet);
  transform: translateY(-4px);
}
.why-card:hover::before {
  opacity: 1;
}
.why-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.why-icon {
  font-size: 32px;
}
.why-badge {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 20px;
  background: var(--gradient-main);
  color: #fff;
}
.why-title {
  font-size: 17px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 16px;
  line-height: 1.3;
}
.why-compare {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.why-them,
.why-us {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13px;
  line-height: 1.5;
  padding: 10px 12px;
  border-radius: 8px;
}
.why-them {
  background: rgba(255, 80, 80, 0.08);
  border: 1px solid rgba(255, 80, 80, 0.15);
  color: var(--text-muted);
}
.why-us {
  background: rgba(80, 255, 130, 0.08);
  border: 1px solid rgba(80, 255, 130, 0.15);
  color: var(--text);
}
.why-x {
  color: #ff5050;
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
  margin-top: 1px;
}
.why-check {
  color: #50ff82;
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
  margin-top: 1px;
}
@media (max-width: 900px) {
  .why-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 600px) {
  .why-grid {
    grid-template-columns: 1fr;
  }
}

/* ═══ QUEBEC PRIDE BANNER ═══ */
.quebec-banner {
  max-width: 1000px;
  margin: 0 auto 60px;
  padding: 0 24px;
}
.quebec-banner-inner {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 24px 32px;
  background: linear-gradient(135deg, rgba(0, 63, 135, 0.15) 0%, rgba(147, 83, 172, 0.1) 50%, rgba(255, 255, 255, 0.05) 100%);
  border: 1px solid rgba(0, 63, 135, 0.3);
  border-radius: 16px;
  position: relative;
  overflow: hidden;
}
.quebec-banner-inner::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #003f87 0%, #fff 50%, #003f87 100%);
}
.quebec-flag {
  font-size: 36px;
  flex-shrink: 0;
}
.quebec-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.quebec-text strong {
  font-size: 16px;
  color: #fff;
}
.quebec-text span {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
}
@media (max-width: 600px) {
  .quebec-banner-inner {
    flex-direction: column;
    text-align: center;
    gap: 12px;
    padding: 20px;
  }
  .quebec-flag:last-child {
    display: none;
  }
}

/* ═══ FAQ LANDING PAGE (FULL WIDTH) ═══ */
#faq .faq-list {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

#faq .faq-item {
  background: var(--dark-card);
  border: 1px solid var(--dark-border);
  border-radius: 12px;
  overflow: hidden;
  transition: border-color 0.3s;
}

#faq .faq-item:hover {
  border-color: rgba(147, 83, 172, 0.3);
}

#faq .faq-question {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  background: none;
  border: none;
  color: #fff;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  gap: 16px;
  transition: color 0.3s;
}

#faq .faq-question:hover {
  color: var(--rose-light);
}

#faq .faq-arrow {
  font-size: 14px;
  color: var(--violet);
  transition: transform 0.3s;
  flex-shrink: 0;
}

#faq .faq-item.open .faq-arrow {
  transform: rotate(180deg);
}

#faq .faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease-out;
}

#faq .faq-item.open .faq-answer {
  max-height: 300px;
}

#faq .faq-answer-inner {
  padding: 0 24px 20px;
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.7;
}

@media (max-width: 768px) {
  #faq .faq-question {
    padding: 16px 18px;
    font-size: 14px;
  }
  #faq .faq-answer-inner {
    padding: 0 18px 16px;
    font-size: 13px;
  }
}

/* ═══════════════════════════════════════════
   KNOWLEDGE BASE — Hub + Article
   @since 2.3.42
   ═══════════════════════════════════════════ */

/* KB Grid — Category Cards */
.kb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 24px; max-width: 1200px; margin: 0 auto; }
.kb-category-card { background: var(--dark-card); border: 1px solid var(--dark-border); border-radius: 12px; padding: 28px; transition: border-color 0.3s, transform 0.2s; }
.kb-category-card:hover { border-color: var(--violet); transform: translateY(-2px); }
.kb-category-header { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.kb-category-icon { font-size: 32px; flex-shrink: 0; }
.kb-category-title { font-size: 18px; font-weight: 700; color: var(--text-main); margin: 0; }
.kb-category-count { font-size: 12px; color: var(--text-muted); }
.kb-category-desc { font-size: 13px; color: var(--text-muted); margin-bottom: 16px; line-height: 1.5; }

/* KB Article List */
.kb-article-list { list-style: none; padding: 0; margin: 0; }
.kb-article-list li { border-top: 1px solid var(--dark-border); }
.kb-article-list li:first-child { border-top: none; }
.kb-article-link { display: flex; align-items: center; justify-content: space-between; padding: 10px 4px; color: var(--text-main); text-decoration: none; font-size: 14px; transition: color 0.2s, padding-left 0.2s; }
.kb-article-link:hover { color: var(--rose); padding-left: 8px; }
.kb-article-link svg { flex-shrink: 0; opacity: 0.4; transition: opacity 0.2s; }
.kb-article-link:hover svg { opacity: 1; }
.kb-see-all { display: block; text-align: center; margin-top: 12px; padding: 8px; font-size: 13px; color: var(--rose); text-decoration: none; border-top: 1px solid var(--dark-border); transition: color 0.2s; }
.kb-see-all:hover { color: var(--rose-light); }

/* KB Article Layout */
.kb-article-layout { display: grid; grid-template-columns: 1fr 280px; gap: 40px; max-width: 1100px; margin: 0 auto; padding: 40px 20px; }
.kb-article-content { min-width: 0; }
.kb-article-body { color: var(--text-main); line-height: 1.8; font-size: 15px; }
.kb-article-body h2 { font-size: 22px; font-weight: 700; margin-top: 36px; margin-bottom: 12px; color: var(--text-main); border-bottom: 1px solid var(--dark-border); padding-bottom: 8px; }
.kb-article-body h3 { font-size: 17px; font-weight: 600; margin-top: 28px; margin-bottom: 8px; color: var(--rose-light); }
.kb-article-body p { margin-bottom: 16px; }
.kb-article-body ul, .kb-article-body ol { margin-bottom: 16px; padding-left: 24px; }
.kb-article-body li { margin-bottom: 6px; }
.kb-article-body code { background: rgba(147, 83, 172, 0.15); padding: 2px 6px; border-radius: 4px; font-size: 13px; color: var(--rose-light); }
.kb-article-body pre { background: var(--dark-card); border: 1px solid var(--dark-border); border-radius: 8px; padding: 16px; overflow-x: auto; margin-bottom: 16px; }
.kb-article-body pre code { background: none; padding: 0; font-size: 13px; color: var(--text-main); }
.kb-article-body blockquote { border-left: 3px solid var(--violet); padding: 12px 20px; margin: 16px 0; background: rgba(147, 83, 172, 0.05); border-radius: 0 8px 8px 0; font-style: italic; color: var(--text-muted); }
.kb-article-body img { max-width: 100%; height: auto; border-radius: 8px; border: 1px solid var(--dark-border); margin: 16px 0; }

/* Breadcrumbs */
.kb-breadcrumbs { font-size: 13px; color: var(--text-muted); }
.kb-breadcrumbs a { color: var(--text-muted); text-decoration: none; transition: color 0.2s; }
.kb-breadcrumbs a:hover { color: var(--rose); }
.kb-breadcrumb-sep { margin: 0 6px; opacity: 0.5; }

/* Article Meta */
.kb-article-meta { display: flex; gap: 16px; margin-top: 10px; font-size: 13px; color: var(--text-muted); flex-wrap: wrap; }
.kb-meta-cat { background: rgba(147, 83, 172, 0.2); padding: 2px 10px; border-radius: 12px; font-size: 12px; }

/* Article Footer */
.kb-article-footer { margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--dark-border); }
.kb-article-helpful { display: flex; align-items: center; gap: 12px; margin-bottom: 24px; }
.kb-article-helpful p { margin: 0; color: var(--text-muted); font-size: 14px; }
.kb-helpful-btn { background: var(--dark-card); border: 1px solid var(--dark-border); color: var(--text-main); padding: 6px 16px; border-radius: 6px; cursor: pointer; font-size: 13px; transition: border-color 0.2s; }
.kb-helpful-btn:hover { border-color: var(--violet); }

/* Article Navigation */
.kb-article-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.kb-nav-prev, .kb-nav-next { display: block; padding: 16px; background: var(--dark-card); border: 1px solid var(--dark-border); border-radius: 8px; text-decoration: none; transition: border-color 0.2s; }
.kb-nav-prev:hover, .kb-nav-next:hover { border-color: var(--violet); }
.kb-nav-next { text-align: right; }
.kb-nav-label { display: block; font-size: 12px; color: var(--text-muted); margin-bottom: 4px; }
.kb-nav-title { display: block; font-size: 14px; color: var(--text-main); font-weight: 500; }

/* Sidebar */
.kb-sidebar { position: sticky; top: 80px; align-self: start; }
.kb-sidebar-section { background: var(--dark-card); border: 1px solid var(--dark-border); border-radius: 10px; padding: 20px; margin-bottom: 16px; }
.kb-sidebar-section h3 { font-size: 14px; font-weight: 600; color: var(--text-main); margin: 0 0 12px; text-transform: uppercase; letter-spacing: 0.5px; }
.kb-sidebar-list { list-style: none; padding: 0; margin: 0; }
.kb-sidebar-list li { padding: 6px 0; border-bottom: 1px solid rgba(255,255,255,0.05); }
.kb-sidebar-list li:last-child { border-bottom: none; }
.kb-sidebar-list a { color: var(--text-muted); text-decoration: none; font-size: 13px; transition: color 0.2s; }
.kb-sidebar-list a:hover { color: var(--rose); }
.kb-sidebar-cta { background: var(--dark-card); border: 1px solid var(--violet); border-radius: 10px; padding: 20px; text-align: center; }
.kb-sidebar-cta p { margin: 0 0 12px; color: var(--text-main); font-size: 14px; font-weight: 600; }

/* Responsive KB */
@media (max-width: 768px) {
    .kb-grid { grid-template-columns: 1fr; }
    .kb-article-layout { grid-template-columns: 1fr; gap: 24px; }
    .kb-sidebar { position: static; }
    .kb-article-nav { grid-template-columns: 1fr; }
}

/* ═══════════════════════════════════════════
   FLOATING AI CHAT WIDGET
   @since 2.3.43
   ═══════════════════════════════════════════ */

/* Trigger button */
.mg-chat-trigger {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9998;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--violet);
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(139, 92, 246, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.mg-chat-trigger:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 28px rgba(139, 92, 246, 0.6);
}
.mg-chat-trigger .mg-chat-icon-open,
.mg-chat-trigger .mg-chat-icon-close {
    font-size: 26px;
    line-height: 1;
    transition: opacity 0.2s, transform 0.3s;
    position: absolute;
}
.mg-chat-trigger .mg-chat-icon-close {
    opacity: 0;
    transform: rotate(-90deg);
}
.mg-chat-trigger.active .mg-chat-icon-open {
    opacity: 0;
    transform: rotate(90deg);
}
.mg-chat-trigger.active .mg-chat-icon-close {
    opacity: 1;
    transform: rotate(0deg);
}

/* Notification pulse */
.mg-chat-trigger::after {
    content: '';
    position: absolute;
    top: -2px;
    right: -2px;
    width: 16px;
    height: 16px;
    background: var(--rose-light);
    border-radius: 50%;
    border: 2px solid var(--dark-bg);
    animation: mg-pulse 2s infinite;
}
.mg-chat-trigger.active::after { display: none; }
.mg-chat-trigger.mg-pulse-off::after { display: none; }

@keyframes mg-pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.3); opacity: 0.7; }
}

/* Chat panel */
.mg-chat-panel {
    position: fixed;
    bottom: 96px;
    right: 24px;
    z-index: 9999;
    width: 380px;
    max-height: 520px;
    background: var(--dark-card);
    border: 1px solid var(--dark-border);
    border-radius: 16px;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    opacity: 0;
    transform: translateY(20px) scale(0.95);
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
}
.mg-chat-panel.open {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

/* Chat header */
.mg-chat-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px;
    background: linear-gradient(135deg, var(--violet) 0%, var(--rose-light) 100%);
    border-bottom: 1px solid var(--dark-border);
}
.mg-chat-header-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}
.mg-chat-header-info h4 {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
    color: #fff;
}
.mg-chat-header-info span {
    font-size: 11px;
    color: rgba(255,255,255,0.8);
}

/* Messages area */
.mg-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 260px;
    max-height: 340px;
    scrollbar-width: thin;
    scrollbar-color: var(--violet) transparent;
}

/* Single message bubble */
.mg-chat-msg {
    display: flex;
    gap: 8px;
    max-width: 90%;
    animation: mg-msg-in 0.3s ease;
}
.mg-chat-msg.mg-msg-bot { align-self: flex-start; }
.mg-chat-msg.mg-msg-user { align-self: flex-end; flex-direction: row-reverse; }
.mg-chat-msg-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
}
.mg-msg-bot .mg-chat-msg-avatar { background: rgba(139,92,246,0.2); }
.mg-msg-user .mg-chat-msg-avatar { background: rgba(244,114,182,0.2); }
.mg-chat-msg-content {
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 13px;
    line-height: 1.5;
    color: var(--text-light);
}
.mg-msg-bot .mg-chat-msg-content {
    background: var(--dark-bg);
    border-bottom-left-radius: 4px;
}
.mg-msg-user .mg-chat-msg-content {
    background: var(--violet);
    color: #fff;
    border-bottom-right-radius: 4px;
}

@keyframes mg-msg-in {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Typing indicator */
.mg-chat-typing {
    display: none;
    align-self: flex-start;
    padding: 10px 16px;
    background: var(--dark-bg);
    border-radius: 12px;
    gap: 4px;
}
.mg-chat-typing.visible { display: flex; }
.mg-chat-typing span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--violet);
    animation: mg-typing 1.4s infinite;
}
.mg-chat-typing span:nth-child(2) { animation-delay: 0.2s; }
.mg-chat-typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes mg-typing {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
    30% { transform: translateY(-6px); opacity: 1; }
}

/* Input area */
.mg-chat-input-area {
    display: flex;
    gap: 8px;
    padding: 12px 16px;
    border-top: 1px solid var(--dark-border);
    background: var(--dark-bg);
}
.mg-chat-input-area input {
    flex: 1;
    background: var(--dark-card);
    border: 1px solid var(--dark-border);
    border-radius: 8px;
    padding: 10px 14px;
    color: var(--text-light);
    font-size: 13px;
    outline: none;
    transition: border-color 0.2s;
}
.mg-chat-input-area input:focus {
    border-color: var(--violet);
}
.mg-chat-input-area input::placeholder {
    color: var(--text-muted);
}
.mg-chat-input-area button {
    background: var(--violet);
    border: none;
    border-radius: 8px;
    width: 40px;
    height: 40px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: #fff;
    transition: background 0.2s;
    flex-shrink: 0;
}
.mg-chat-input-area button:hover { background: var(--violet-hover); }
.mg-chat-input-area button:disabled { opacity: 0.5; cursor: not-allowed; }

/* Footer counter */
.mg-chat-footer {
    padding: 6px 16px 10px;
    text-align: center;
    font-size: 11px;
    color: var(--text-muted);
    background: var(--dark-bg);
}

/* Mobile responsive */
@media (max-width: 480px) {
    .mg-chat-panel {
        right: 0;
        left: 0;
        bottom: 0;
        width: 100%;
        max-height: 100vh;
        border-radius: 16px 16px 0 0;
    }
    .mg-chat-trigger {
        bottom: 16px;
        right: 16px;
        width: 52px;
        height: 52px;
    }
    .mg-chat-trigger .mg-chat-icon-open,
    .mg-chat-trigger .mg-chat-icon-close { font-size: 22px; }
}
