/* ============================================================
   DAWAY WEBSITE — Main Stylesheet
   Dark/Light theme + RTL support + Accent #00C896
   ============================================================ */

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

/* --- CSS Variables --- */
:root {
  /* Accent */
  --accent:       #00C896;
  --accent-dark:  #00a67e;
  --accent-light: #33d9aa;
  --accent-glow:  rgba(0, 200, 150, 0.15);
  --accent-glow2: rgba(0, 200, 150, 0.08);

  /* Dark theme (default) */
  --bg:           #0f0f0f;
  --bg-card:      #171717;
  --bg-card2:     #1e1e1e;
  --bg-input:     #242424;
  --border:       rgba(255,255,255,0.08);
  --text:         #ffffff;
  --text-muted:   #888888;
  --text-subtle:  #555555;
  --shadow:       0 8px 32px rgba(0,0,0,0.4);
  --shadow-sm:    0 2px 12px rgba(0,0,0,0.3);
  --nav-bg:       rgba(15,15,15,0.85);

  /* Spacing */
  --radius:       12px;
  --radius-lg:    20px;
  --radius-xl:    32px;

  /* Transitions */
  --transition:   0.3s ease;
}

[data-theme="light"] {
  --bg:           #f5f5f5;
  --bg-card:      #ffffff;
  --bg-card2:     #f0f0f0;
  --bg-input:     #e8e8e8;
  --border:       rgba(0,0,0,0.08);
  --text:         #0f0f0f;
  --text-muted:   #666666;
  --text-subtle:  #aaaaaa;
  --shadow:       0 8px 32px rgba(0,0,0,0.1);
  --shadow-sm:    0 2px 12px rgba(0,0,0,0.06);
  --nav-bg:       rgba(245,245,245,0.85);
}

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

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

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

[lang="ar"] body,
body.rtl {
  font-family: 'Noto Sans Arabic', 'Inter', sans-serif;
  direction: rtl;
}

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

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

.section {
  padding: 100px 0;
}

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

.section-header {
  text-align: center;
  margin-bottom: 64px;
}

.section-header h2 {
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 16px;
}

.section-header p {
  font-size: 18px;
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 auto;
}

.accent { color: var(--accent); }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  background: var(--accent-glow);
  border: 1px solid rgba(0,200,150,0.3);
  border-radius: 100px;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 20px;
}

.badge::before {
  content: '';
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
  animation: pulse-dot 2s infinite;
}

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

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 600;
  transition: all var(--transition);
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent);
  color: #000;
}

.btn-primary:hover {
  background: var(--accent-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,200,150,0.35);
}

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

.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  padding: 10px 16px;
}

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

/* ============================================================
   NAVBAR
   ============================================================ */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  padding: 0 24px;
  height: 68px;
  display: flex;
  align-items: center;
  background: var(--nav-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}

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

.navbar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.navbar-logo img {
  height: 36px;
  width: auto;
}

.navbar-logo span {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--accent);
}

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

.nav-link {
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  transition: all var(--transition);
  white-space: nowrap;
}

.nav-link:hover {
  color: var(--text);
  background: var(--bg-card);
}

/* Dropdown */
.nav-dropdown {
  position: relative;
}

.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px;
  min-width: 200px;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) translateY(-8px);
  transition: all var(--transition);
}

.nav-dropdown:hover .nav-dropdown-menu {
  opacity: 1;
  pointer-events: all;
  transform: translateX(-50%) translateY(0);
}

.nav-dropdown-menu a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 14px;
  color: var(--text-muted);
  transition: all var(--transition);
}

.nav-dropdown-menu a:hover {
  color: var(--text);
  background: var(--bg-card2);
}

.nav-dropdown-menu a .icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-glow);
  color: var(--accent);
  font-size: 16px;
  flex-shrink: 0;
}

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

/* Theme toggle */
.theme-toggle {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 18px;
  transition: all var(--transition);
}

.theme-toggle:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* Language switcher */
.lang-switcher {
  position: relative;
}

.lang-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  transition: all var(--transition);
}

.lang-btn:hover {
  color: var(--text);
  border-color: var(--accent);
}

.lang-flag { font-size: 16px; }

.lang-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px;
  min-width: 160px;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px);
  transition: all var(--transition);
  z-index: 100;
}

.lang-switcher.open .lang-menu {
  opacity: 1;
  pointer-events: all;
  transform: translateY(0);
}

.lang-menu button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  transition: all var(--transition);
}

.lang-menu button:hover,
.lang-menu button.active {
  color: var(--text);
  background: var(--bg-card2);
}

.lang-menu button.active {
  color: var(--accent);
}

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 20px;
}

/* ============================================================
   HERO SECTION
   ============================================================ */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 68px;
  position: relative;
  overflow: hidden;
}

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

.hero-bg-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.12;
}

.hero-bg-blob-1 {
  width: 600px;
  height: 600px;
  background: var(--accent);
  top: -100px;
  right: -100px;
}

.hero-bg-blob-2 {
  width: 400px;
  height: 400px;
  background: var(--accent-dark);
  bottom: -50px;
  left: -50px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero-content { }

.hero-title {
  font-size: clamp(36px, 5vw, 64px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -1px;
  margin-bottom: 24px;
}

.hero-title .accent-block {
  display: block;
  color: var(--accent);
  position: relative;
}

.hero-subtitle {
  font-size: 18px;
  color: var(--text-muted);
  line-height: 1.7;
  max-width: 480px;
  margin-bottom: 40px;
}

.hero-ctas {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 48px;
}

.btn-store {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  background: var(--bg-card2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all var(--transition);
  min-width: 160px;
}

.btn-store:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.btn-store .store-icon {
  font-size: 28px;
  line-height: 1;
}

.btn-store .store-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.btn-store .store-text span:first-child {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.btn-store .store-text span:last-child {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}

.hero-social-proof {
  display: flex;
  align-items: center;
  gap: 16px;
}

.hero-avatars {
  display: flex;
}

.hero-avatars span {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent-glow);
  border: 2px solid var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  margin-right: -10px;
}

.hero-social-proof p {
  font-size: 14px;
  color: var(--text-muted);
}

.hero-social-proof strong {
  color: var(--text);
}

.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.hero-phone-mockup {
  position: relative;
  width: 280px;
}

.hero-phone-mockup img {
  width: 100%;
  border-radius: 32px;
  box-shadow: 0 32px 80px rgba(0,0,0,0.4), 0 0 0 1px rgba(255,255,255,0.05);
}

.hero-floating-card {
  position: absolute;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 18px;
  box-shadow: var(--shadow);
  white-space: nowrap;
  animation: float 3s ease-in-out infinite;
}

.hero-floating-card.card-1 {
  left: -80px;
  top: 20%;
  animation-delay: 0s;
}

.hero-floating-card.card-2 {
  right: -80px;
  bottom: 25%;
  animation-delay: 1.5s;
}

.hero-floating-card .card-icon {
  font-size: 20px;
  margin-bottom: 4px;
}

.hero-floating-card .card-label {
  font-size: 11px;
  color: var(--text-muted);
}

.hero-floating-card .card-value {
  font-size: 15px;
  font-weight: 700;
  color: var(--accent);
}

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

/* ============================================================
   STATS BAND
   ============================================================ */
.stats-band {
  padding: 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.stat-item {
  padding: 40px 32px;
  background: var(--bg-card);
  text-align: center;
  transition: background var(--transition);
}

.stat-item:hover {
  background: var(--bg-card2);
}

.stat-value {
  font-size: 48px;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: -1px;
  line-height: 1;
  margin-bottom: 8px;
}

.stat-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}

.stat-desc {
  font-size: 13px;
  color: var(--text-muted);
}

/* ============================================================
   SPACES SECTION
   ============================================================ */
.spaces-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.space-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.space-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-light));
  opacity: 0;
  transition: opacity var(--transition);
}

.space-card:hover {
  border-color: rgba(0,200,150,0.2);
  transform: translateY(-4px);
  box-shadow: 0 20px 48px rgba(0,200,150,0.08);
}

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

.space-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: var(--accent-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
}

.space-card h3 {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.3px;
}

.space-card p {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.7;
  flex: 1;
}

.space-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--accent);
  font-size: 14px;
  font-weight: 600;
  transition: gap var(--transition);
}

.space-link:hover { gap: 10px; }

/* ============================================================
   HOW IT WORKS
   ============================================================ */
.how-section {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  padding: 80px 60px;
  margin: 0 24px;
}

.how-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 48px;
  position: relative;
}

.how-steps::before {
  content: '';
  position: absolute;
  top: 28px;
  left: calc(16.66% + 28px);
  right: calc(16.66% + 28px);
  height: 2px;
  background: linear-gradient(90deg, var(--accent), transparent);
}

.how-step {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.step-number {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--accent);
  color: #000;
  font-size: 20px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.how-step:not(:first-child) .step-number {
  background: var(--bg-card2);
  color: var(--text-muted);
  border: 2px solid var(--border);
}

.how-step h3 {
  font-size: 18px;
  font-weight: 700;
}

.how-step p {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.7;
}

/* ============================================================
   FEATURES GRID
   ============================================================ */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.feature-item {
  padding: 36px 28px;
  background: var(--bg-card);
  transition: background var(--transition);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.feature-item:hover {
  background: var(--bg-card2);
}

.feature-icon {
  font-size: 28px;
  line-height: 1;
}

.feature-item h3 {
  font-size: 17px;
  font-weight: 700;
}

.feature-item p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ============================================================
   DEMO CTA SECTION
   ============================================================ */
.demo-cta {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
  border-radius: var(--radius-xl);
  padding: 64px 60px;
  margin: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.demo-cta-content h2 {
  font-size: 36px;
  font-weight: 800;
  color: #000;
  margin-bottom: 8px;
}

.demo-cta-content p {
  font-size: 18px;
  color: rgba(0,0,0,0.6);
}

.btn-demo {
  padding: 16px 32px;
  background: #000;
  color: #fff;
  border-radius: var(--radius);
  font-size: 16px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  transition: all var(--transition);
  flex-shrink: 0;
}

.btn-demo:hover {
  background: #1a1a1a;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}

/* ============================================================
   SCREENSHOTS
   ============================================================ */
.screenshots-slider {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 16px;
  scroll-snap-type: x mandatory;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.screenshots-slider::-webkit-scrollbar { display: none; }

.screenshot-item {
  flex: 0 0 220px;
  scroll-snap-align: start;
}

.screenshot-item img {
  width: 100%;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

/* ============================================================
   NEWSLETTER
   ============================================================ */
.newsletter-section {
  text-align: center;
}

.newsletter-form {
  display: flex;
  gap: 12px;
  max-width: 480px;
  margin: 32px auto 0;
}

.newsletter-input {
  flex: 1;
  padding: 14px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 15px;
  font-family: inherit;
  transition: border-color var(--transition);
  outline: none;
}

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

.newsletter-input:focus {
  border-color: var(--accent);
}

.newsletter-success {
  display: none;
  color: var(--accent);
  font-weight: 600;
  margin-top: 12px;
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  padding: 60px 0 32px;
  margin-top: 100px;
}

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

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

.footer-brand .footer-logo span {
  font-size: 22px;
  font-weight: 800;
  color: var(--accent);
}

.footer-brand p {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 280px;
  margin-bottom: 24px;
}

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

.social-link {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--bg-card2);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: var(--text-muted);
  transition: all var(--transition);
}

.social-link:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

.footer-col h4 {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-subtle);
  margin-bottom: 16px;
}

.footer-col ul li {
  margin-bottom: 10px;
}

.footer-col ul li a {
  font-size: 14px;
  color: var(--text-muted);
  transition: color var(--transition);
}

.footer-col ul li a:hover {
  color: var(--accent);
}

.footer-contact-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 12px;
}

.footer-contact-item .contact-icon {
  font-size: 16px;
  flex-shrink: 0;
  margin-top: 2px;
  color: var(--accent);
}

.footer-contact-item span {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.5;
}

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

.footer-bottom p {
  font-size: 13px;
  color: var(--text-subtle);
}

.footer-legal {
  display: flex;
  gap: 24px;
}

.footer-legal a {
  font-size: 13px;
  color: var(--text-subtle);
  transition: color var(--transition);
}

.footer-legal a:hover {
  color: var(--text-muted);
}

/* ============================================================
   CHATBOT WIDGET
   ============================================================ */
.chatbot-btn {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 999;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--accent);
  color: #000;
  font-size: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(0,200,150,0.4);
  transition: all var(--transition);
  border: none;
  cursor: pointer;
}

.chatbot-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 12px 32px rgba(0,200,150,0.5);
}

.chatbot-btn.open {
  background: var(--bg-card2);
  color: var(--text);
  box-shadow: var(--shadow);
}

.chatbot-panel {
  position: fixed;
  bottom: 104px;
  right: 28px;
  z-index: 998;
  width: 360px;
  height: 520px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: 0 24px 64px rgba(0,0,0,0.3);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transform: translateY(20px) scale(0.95);
  transform-origin: bottom right;
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.chatbot-panel.open {
  opacity: 1;
  pointer-events: all;
  transform: translateY(0) scale(1);
}

.chatbot-header {
  padding: 20px;
  background: var(--accent);
  display: flex;
  align-items: center;
  gap: 14px;
}

.chatbot-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(0,0,0,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}

.chatbot-header-info h4 {
  font-size: 15px;
  font-weight: 700;
  color: #000;
}

.chatbot-header-info p {
  font-size: 12px;
  color: rgba(0,0,0,0.55);
}

.chatbot-online {
  display: flex;
  align-items: center;
  gap: 5px;
}

.chatbot-online::before {
  content: '';
  width: 7px;
  height: 7px;
  background: #000;
  border-radius: 50%;
  opacity: 0.6;
}

.chatbot-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.chatbot-messages::-webkit-scrollbar { width: 4px; }
.chatbot-messages::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}

.msg {
  max-width: 85%;
  padding: 12px 16px;
  border-radius: 18px;
  font-size: 14px;
  line-height: 1.5;
  animation: msg-in 0.2s ease;
}

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

.msg-bot {
  background: var(--bg-card2);
  color: var(--text);
  border-bottom-left-radius: 6px;
  align-self: flex-start;
}

.msg-user {
  background: var(--accent);
  color: #000;
  border-bottom-right-radius: 6px;
  align-self: flex-end;
  font-weight: 500;
}

.msg-typing {
  background: var(--bg-card2);
  align-self: flex-start;
  border-bottom-left-radius: 6px;
  padding: 14px 18px;
}

.typing-dots {
  display: flex;
  gap: 4px;
  align-items: center;
}

.typing-dots span {
  width: 6px;
  height: 6px;
  background: var(--text-muted);
  border-radius: 50%;
  animation: bounce-dot 1.2s infinite;
}

.typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.typing-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes bounce-dot {
  0%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(-6px); }
}

.chatbot-footer {
  padding: 16px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 10px;
  align-items: flex-end;
}

.chatbot-input {
  flex: 1;
  padding: 12px 16px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  resize: none;
  outline: none;
  max-height: 100px;
  transition: border-color var(--transition);
}

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

.chatbot-input:focus {
  border-color: var(--accent);
}

.chatbot-send {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: var(--accent);
  color: #000;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all var(--transition);
}

.chatbot-send:hover {
  background: var(--accent-dark);
}

.chatbot-send:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* RTL chatbot */
[dir="rtl"] .chatbot-btn,
[dir="rtl"] .chatbot-panel {
  right: auto;
  left: 28px;
}

[dir="rtl"] .chatbot-panel {
  transform-origin: bottom left;
}

[dir="rtl"] .msg-user {
  align-self: flex-start;
  border-bottom-right-radius: 18px;
  border-bottom-left-radius: 6px;
}

[dir="rtl"] .msg-bot {
  align-self: flex-end;
  border-bottom-left-radius: 18px;
  border-bottom-right-radius: 6px;
}

/* ============================================================
   DEMO PAGE
   ============================================================ */
.demo-page {
  padding-top: 120px;
  min-height: 100vh;
}

.demo-videos-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 48px;
}

.demo-video-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition);
}

.demo-video-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 48px rgba(0,200,150,0.08);
  border-color: rgba(0,200,150,0.2);
}

.demo-video-thumb {
  width: 100%;
  aspect-ratio: 16/9;
  background: var(--bg-card2);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.demo-video-thumb iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.demo-video-thumb .play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.4);
  font-size: 48px;
  color: var(--accent);
  cursor: pointer;
  transition: all var(--transition);
}

.demo-video-thumb .play-overlay:hover {
  background: rgba(0,0,0,0.2);
  font-size: 56px;
}

.demo-video-info {
  padding: 20px 24px;
}

.demo-video-info h3 {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 6px;
}

.demo-video-info p {
  font-size: 14px;
  color: var(--text-muted);
}

/* ============================================================
   ESPACES PAGES
   ============================================================ */
.espace-page {
  padding-top: 120px;
}

.espace-hero {
  padding: 60px 0 80px;
}

.espace-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  background: var(--accent-glow);
  border: 1px solid rgba(0,200,150,0.3);
  border-radius: 100px;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 20px;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .hero-grid       { grid-template-columns: 1fr; gap: 48px; text-align: center; }
  .hero-subtitle   { margin: 0 auto 40px; }
  .hero-ctas       { justify-content: center; }
  .hero-social-proof { justify-content: center; }
  .hero-visual     { display: none; }
  .footer-grid     { grid-template-columns: 1fr 1fr; }
  .how-section     { padding: 60px 32px; }
  .demo-cta        { flex-direction: column; text-align: center; }
}

@media (max-width: 768px) {
  .section         { padding: 64px 0; }
  .navbar-nav      { display: none; }
  .menu-toggle     { display: flex; }
  .spaces-grid     { grid-template-columns: 1fr; }
  .stats-grid      { grid-template-columns: 1fr; }
  .how-steps       { grid-template-columns: 1fr; }
  .how-steps::before { display: none; }
  .features-grid   { grid-template-columns: 1fr 1fr; }
  .footer-grid     { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom   { flex-direction: column; text-align: center; }
  .demo-cta        { padding: 40px 28px; margin: 0 16px; }
  .how-section     { margin: 0 16px; padding: 48px 24px; }
  .chatbot-panel   { width: calc(100vw - 32px); right: 16px; }
  .demo-videos-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .features-grid   { grid-template-columns: 1fr; }
  .hero-ctas       { flex-direction: column; align-items: center; }
  .newsletter-form { flex-direction: column; }
}

/* ============================================================
   MOBILE NAV (slide menu)
   ============================================================ */
.mobile-nav {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: none;
  flex-direction: column;
}

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

.mobile-nav-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
}

.mobile-nav-inner {
  position: relative;
  z-index: 1;
  width: 280px;
  height: 100%;
  background: var(--bg-card);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
  margin-left: auto;
  animation: slide-in 0.25s ease;
}

[dir="rtl"] .mobile-nav-inner {
  margin-left: 0;
  margin-right: auto;
  animation: slide-in-rtl 0.25s ease;
}

@keyframes slide-in {
  from { transform: translateX(100%); }
  to   { transform: translateX(0); }
}

@keyframes slide-in-rtl {
  from { transform: translateX(-100%); }
  to   { transform: translateX(0); }
}

.mobile-nav-close {
  align-self: flex-end;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--bg-card2);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.mobile-nav-link {
  padding: 14px 16px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-muted);
  transition: all var(--transition);
  display: block;
}

.mobile-nav-link:hover {
  color: var(--text);
  background: var(--bg-card2);
}

/* ============================================================
   PAGE TRANSITIONS
   ============================================================ */
.page-enter {
  animation: page-in 0.3s ease;
}

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

/* ============================================================
   LOGO DARK/LIGHT SWITCH
   ============================================================ */
.logo-dark  { display: block; height: 36px; width: auto; }
.logo-light { display: none;  height: 36px; width: auto; }

[data-theme="light"] .logo-dark  { display: none; }
[data-theme="light"] .logo-light { display: block; }

/* ============================================================
   HERO BACKGROUND SVG
   ============================================================ */
.hero-bg-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.06;
  pointer-events: none;
}

/* ============================================================
   SCROLLBAR
   ============================================================ */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 6px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--text-subtle);
}
