/* ==========================================================================
   MARSAL CLOUD - ULTRA PREMIUM SAAS PLATFORM STYLESHEET
   Brand Colors: Emerald Teal (#00E5A4) -> Electric Cyan (#00B4D8) -> Ocean Blue (#0099FF) -> Royal Dark (#070A11)
   ========================================================================== */

:root {
  /* Brand Color Palette derived from Marsal Logo */
  --teal-primary: #00E5A4;
  --teal-glow: rgba(0, 229, 164, 0.35);
  --cyan-accent: #00B4D8;
  --blue-ocean: #0099FF;
  --blue-royal: #004BD6;
  --dark-obsidian: #070A11;
  --dark-surface: #0E1525;
  --dark-card: rgba(16, 24, 42, 0.75);
  --dark-border: rgba(255, 255, 255, 0.08);

  /* Light Mode Colors */
  --light-bg: #F4F8FC;
  --light-surface: #FFFFFF;
  --light-card: #FFFFFF;
  --light-border: rgba(0, 75, 214, 0.1);
  --light-text-main: #0B132B;
  --light-text-sub: #4A5568;

  /* Typography */
  --font-arabic: 'Cairo', 'Tajawal', system-ui, -apple-system, sans-serif;
  --font-latin: 'Plus Jakarta Sans', system-ui, sans-serif;
  --font-code: 'JetBrains Mono', monospace;

  /* Universal Transitions & Radii */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-full: 9999px;
  --ease-spring: cubic-bezier(0.16, 1, 0.3, 1);
}

/* Base Theme Switching setup */
html.dark-theme {
  --bg-main: var(--dark-obsidian);
  --bg-card: var(--dark-card);
  --border-color: var(--dark-border);
  --text-main: #F0F6FC;
  --text-muted: #94A3B8;
  --text-sub: #CBD5E1;
  --nav-bg: rgba(7, 10, 17, 0.82);
  --header-border: rgba(255, 255, 255, 0.06);
  --shadow-color: rgba(0, 0, 0, 0.5);
}

html.light-theme {
  --bg-main: var(--light-bg);
  --bg-card: var(--light-card);
  --border-color: var(--light-border);
  --text-main: var(--light-text-main);
  --text-muted: var(--light-text-sub);
  --text-sub: #2D3748;
  --nav-bg: rgba(255, 255, 255, 0.88);
  --header-border: rgba(0, 0, 0, 0.06);
  --shadow-color: rgba(0, 75, 214, 0.08);
}

/* Global Reset & Typography */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-main);
  color: var(--text-main);
  font-family: var(--font-arabic);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
  transition: background-color 0.4s ease, color 0.4s ease;
}

.wrap {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px;
}

.text-center { text-align: center; }
.font-mono { font-family: var(--font-code); }

/* Ambient Glowing Light Orbs */
/* Contain the absolutely-positioned ambient glow orbs so they can't leak past
   the viewport and cause horizontal overflow on phones. */
html { overflow-x: clip; }
body { position: relative; overflow-x: hidden; max-width: 100%; }
/* On phones/tablets the decorative glow orbs are the only thing that can push past
   the viewport — hide them entirely so the page can never scroll sideways. */
@media (max-width: 900px) { .ambient-glow { display: none !important; } }
.ambient-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(140px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.4;
  transition: opacity 0.5s ease;
}
.glow-teal {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, var(--teal-primary) 0%, rgba(0,229,164,0) 70%);
  top: -100px;
  right: -100px;
}
.glow-blue {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, var(--blue-ocean) 0%, rgba(0,153,255,0) 70%);
  top: 300px;
  left: -150px;
}
.glow-cyan {
  width: 450px;
  height: 450px;
  background: radial-gradient(circle, var(--cyan-accent) 0%, rgba(0,180,216,0) 70%);
  top: 1400px;
  right: 10%;
}

/* Gradient Text Effect */
.gradient-text {
  background: linear-gradient(135deg, var(--teal-primary) 0%, var(--cyan-accent) 50%, var(--blue-ocean) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

/* Top Announcement Bar */
.announcement-bar {
  background: linear-gradient(90deg, #003B95 0%, #0077FE 50%, #00C9A7 100%);
  color: #FFFFFF;
  padding: 8px 16px;
  font-size: 0.88rem;
  font-weight: 600;
  position: relative;
  z-index: 101;
}
.ann-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}
.ann-badge {
  background: rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(4px);
  padding: 2px 10px;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  text-transform: uppercase;
}
.ann-link {
  color: #FFFFFF;
  text-decoration: underline;
  margin-right: 4px;
}

/* Site Header Navbar */
.site-header {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--nav-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--header-border);
  transition: padding 0.3s ease, background 0.3s ease;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}
.logo-full {
  height: 48px;
  width: auto;
  object-fit: contain;
}
.logo-icon-mobile {
  display: none;
  height: 40px;
  width: auto;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 24px;
}
.nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: color 0.2s ease;
}
.nav-link:hover {
  color: var(--teal-primary);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Action Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 0.95rem;
  font-family: inherit;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: transform 0.2s var(--ease-spring), box-shadow 0.2s ease, background 0.3s ease;
}
.btn:hover {
  transform: translateY(-2px);
}
.btn:active {
  transform: translateY(0);
}

.btn-primary {
  background: linear-gradient(135deg, var(--teal-primary) 0%, var(--blue-ocean) 100%);
  color: #040914;
}
.btn-glow {
  box-shadow: 0 0 25px var(--teal-glow);
}
.btn-glow:hover {
  box-shadow: 0 0 35px rgba(0, 229, 164, 0.55);
}

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

.btn-glass {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  backdrop-filter: blur(10px);
}
.btn-glass:hover {
  background: rgba(255, 255, 255, 0.12);
}

.btn-xl {
  padding: 14px 32px;
  font-size: 1.05rem;
  border-radius: var(--radius-md);
}

.icon-btn, .lang-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}
.lang-btn {
  width: auto;
  padding: 0 12px;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--cyan-accent);
}
.icon-btn:hover, .lang-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--teal-primary);
}

.mobile-menu-btn {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: transparent;
  border: none;
  cursor: pointer;
}
.mobile-menu-btn .bar {
  width: 24px;
  height: 2px;
  background: var(--text-main);
  transition: 0.3s ease;
}

/* Hero Section */
.hero-section {
  padding: 80px 0 60px;
  position: relative;
  z-index: 1;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 20px;
  border-radius: var(--radius-full);
  background: rgba(0, 229, 164, 0.08);
  border: 1px solid rgba(0, 229, 164, 0.25);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--teal-primary);
  margin-bottom: 28px;
}

.pulse-emerald {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--teal-primary);
  box-shadow: 0 0 0 rgba(0, 229, 164, 0.7);
  animation: pulse-ring 1.8s infinite;
}
@keyframes pulse-ring {
  0% { box-shadow: 0 0 0 0 rgba(0, 229, 164, 0.7); }
  70% { box-shadow: 0 0 0 10px rgba(0, 229, 164, 0); }
  100% { box-shadow: 0 0 0 0 rgba(0, 229, 164, 0); }
}

.hero-main-title {
  font-size: 3.4rem;
  font-weight: 900;
  line-height: 1.25;
  margin-bottom: 20px;
  max-width: 950px;
  margin-left: auto;
  margin-right: auto;
}
.hero-main-title span {
  display: block;
}

.hero-description {
  font-size: 1.2rem;
  color: var(--text-muted);
  max-width: 780px;
  margin: 0 auto 36px;
  line-height: 1.7;
}

.hero-cta-group {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 60px;
  flex-wrap: wrap;
}

/* Trust Metrics Badges */
.trust-metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  max-width: 1000px;
  margin: 0 auto;
}
.metric-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 20px;
  border-radius: var(--radius-md);
  backdrop-filter: blur(12px);
}
.metric-value {
  font-size: 2.2rem;
  font-weight: 900;
  color: var(--teal-primary);
  font-family: var(--font-latin);
}
.metric-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Sections Global Styling */
section {
  padding: 90px 0;
  position: relative;
  z-index: 1;
}

.section-header {
  margin-bottom: 54px;
}
.section-tag {
  display: inline-block;
  color: var(--cyan-accent);
  font-weight: 800;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
}
.section-title {
  font-size: 2.3rem;
  font-weight: 800;
  margin-bottom: 12px;
  line-height: 1.3;
}
.section-subtitle {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 680px;
  margin: 0 auto;
}

/* Interactive Dashboard Frame */
.dashboard-mockup-frame {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 30px 70px var(--shadow-color);
  backdrop-filter: blur(16px);
}

.mockup-header-bar {
  background: rgba(0, 0, 0, 0.25);
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-color);
}
.mockup-dots {
  display: flex;
  gap: 8px;
}
.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}
.dot-red { background: #FF5F56; }
.dot-yellow { background: #FFBD2E; }
.dot-green { background: #27C93F; }

.mockup-title-tab {
  font-family: var(--font-code);
  font-size: 0.85rem;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.05);
  padding: 4px 16px;
  border-radius: var(--radius-sm);
}
.status-live {
  color: var(--teal-primary);
  font-size: 0.82rem;
  font-weight: 700;
}

.dash-tab-triggers {
  display: flex;
  background: rgba(0, 0, 0, 0.15);
  border-bottom: 1px solid var(--border-color);
  overflow-x: auto;
}
.dash-trigger {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 18px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-weight: 700;
  font-size: 0.9rem;
  font-family: inherit;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  transition: all 0.2s ease;
}
.dash-trigger:hover {
  color: var(--text-main);
}
.dash-trigger.active {
  color: var(--teal-primary);
  border-bottom-color: var(--teal-primary);
  background: rgba(0, 229, 164, 0.05);
}

.dash-content-viewport {
  padding: 24px;
  min-height: 420px;
}
.dash-panel {
  display: none;
}
.dash-panel.active {
  display: block;
}

/* Shared Inbox Panel Styling */
.inbox-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 20px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  overflow: hidden;
}
.inbox-sidebar {
  border-left: 1px solid var(--border-color);
  background: rgba(0, 0, 0, 0.15);
  padding: 14px;
}
.inbox-search input {
  width: 100%;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-size: 0.85rem;
  margin-bottom: 14px;
}

.chat-items-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.chat-item {
  display: flex;
  gap: 12px;
  padding: 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.2s ease;
}
.chat-item:hover, .chat-item.active {
  background: rgba(0, 229, 164, 0.08);
}

.user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.85rem;
  color: #FFF;
  flex-shrink: 0;
}
.avatar-green { background: linear-gradient(135deg, #00E5A4, #0099FF); }
.avatar-blue { background: linear-gradient(135deg, #0099FF, #003B95); }
.avatar-purple { background: linear-gradient(135deg, #A855F7, #6366F1); }

.chat-info { flex: 1; overflow: hidden; }
.chat-top { display: flex; justify-content: space-between; margin-bottom: 2px; }
.user-name { font-weight: 700; font-size: 0.88rem; }
.chat-time { font-size: 0.72rem; color: var(--text-muted); }
.chat-preview { font-size: 0.78rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.chat-tags { display: flex; gap: 4px; margin-top: 6px; }
.tag { font-size: 0.68rem; padding: 2px 6px; border-radius: 4px; font-weight: 700; }
.tag-blue { background: rgba(0, 153, 255, 0.2); color: var(--blue-ocean); }
.tag-teal { background: rgba(0, 229, 164, 0.2); color: var(--teal-primary); }
.tag-emerald { background: rgba(39, 201, 63, 0.2); color: #27C93F; }
.tag-purple { background: rgba(168, 85, 247, 0.2); color: #A855F7; }

.inbox-main-chat {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.chat-header {
  padding: 14px 20px;
  background: rgba(0, 0, 0, 0.1);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.user-details { display: flex; align-items: center; gap: 12px; }
.badge-vip { background: rgba(255, 189, 46, 0.2); color: #FFBD2E; font-size: 0.75rem; padding: 2px 8px; border-radius: 4px; }
.user-sub { font-size: 0.78rem; color: var(--text-muted); }
.agent-pill { font-size: 0.8rem; background: rgba(255,255,255,0.06); padding: 4px 10px; border-radius: var(--radius-sm); }

.chat-messages-container {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.msg-bubble {
  max-width: 75%;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  line-height: 1.5;
}
.msg-incoming {
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.08);
  border-bottom-right-radius: 2px;
}
.msg-bot {
  align-self: center;
  background: rgba(0, 180, 216, 0.12);
  border: 1px solid rgba(0, 180, 216, 0.3);
  width: 90%;
}
.msg-outgoing {
  align-self: flex-end;
  background: linear-gradient(135deg, rgba(0, 229, 164, 0.2), rgba(0, 153, 255, 0.2));
  border: 1px solid rgba(0, 229, 164, 0.3);
  border-bottom-left-radius: 2px;
}
.msg-author { font-size: 0.75rem; font-weight: 700; color: var(--teal-primary); margin-bottom: 4px; }
.msg-time { font-size: 0.7rem; color: var(--text-muted); margin-top: 6px; text-align: left; }
.msg-link { color: var(--cyan-accent); text-decoration: underline; }

.chat-input-bar {
  padding: 14px;
  background: rgba(0, 0, 0, 0.15);
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 10px;
}
.quick-template-btn { font-size: 0.8rem; background: rgba(0, 229, 164, 0.15); color: var(--teal-primary); padding: 8px 12px; border-radius: var(--radius-sm); font-weight: 700; }
.chat-input-bar input { flex: 1; padding: 10px 14px; background: rgba(255, 255, 255, 0.06); border: 1px solid var(--border-color); border-radius: var(--radius-sm); color: var(--text-main); font-size: 0.88rem; }
.send-msg-btn { background: var(--teal-primary); color: #000; font-weight: 800; border: none; padding: 10px 18px; border-radius: var(--radius-sm); cursor: pointer; }

/* Broadcast & Flow Builder Sims */
.broadcast-panel {
  background: rgba(0, 0, 0, 0.2);
  border-radius: var(--radius-md);
  padding: 24px;
  border: 1px solid var(--border-color);
}
.panel-top-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 20px; }
.sub-stat { background: rgba(255, 255, 255, 0.04); padding: 12px 16px; border-radius: var(--radius-sm); }
.sub-label { display: block; font-size: 0.78rem; color: var(--text-muted); }
.sub-val { font-weight: 800; font-size: 1rem; }
.text-green { color: #27C93F; }
.text-teal { color: var(--teal-primary); }
.text-cyan { color: var(--cyan-accent); }
.text-blue { color: var(--blue-ocean); }
.text-purple { color: #A855F7; }

.progress-bar-container { background: rgba(255, 255, 255, 0.08); height: 8px; border-radius: 4px; overflow: hidden; margin-bottom: 24px; }
.progress-bar-fill { background: linear-gradient(90deg, var(--teal-primary), var(--blue-ocean)); height: 100%; border-radius: 4px; }

.template-card-sim {
  max-width: 400px;
  margin: 0 auto;
  background: rgba(14, 21, 37, 0.9);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 18px;
  line-height: 1.6;
}
.tmpl-header { background: rgba(255, 255, 255, 0.06); padding: 10px; text-align: center; border-radius: var(--radius-sm); font-size: 0.85rem; margin-bottom: 12px; }
.tmpl-actions { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.tmpl-btn-act { background: rgba(0, 153, 255, 0.15); color: var(--blue-ocean); text-align: center; padding: 8px; border-radius: var(--radius-sm); font-weight: 700; font-size: 0.85rem; }

.flow-builder-sim {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 40px 10px;
  flex-wrap: wrap;
}
.flow-node {
  background: rgba(14, 21, 37, 0.8);
  border: 1px solid var(--border-color);
  padding: 18px 22px;
  border-radius: var(--radius-md);
  width: 260px;
}
.node-title { font-weight: 800; font-size: 0.95rem; margin-bottom: 8px; }
.node-trigger { border-color: var(--teal-primary); }
.node-ai { border-color: var(--cyan-accent); }
.node-action { border-color: var(--blue-ocean); }
.flow-line { font-size: 1.8rem; color: var(--teal-primary); }

.analytics-sim-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; padding: 20px 0; }
.ana-card { background: rgba(255, 255, 255, 0.04); border: 1px solid var(--border-color); padding: 24px; border-radius: var(--radius-md); text-align: center; }
.ana-title { font-size: 0.9rem; color: var(--text-muted); }
.ana-num { font-size: 2.5rem; font-weight: 900; margin: 10px 0; }
.ana-sub { font-size: 0.8rem; color: var(--text-muted); }

/* Features Grid */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 32px;
  backdrop-filter: blur(12px);
  transition: transform 0.3s var(--ease-spring), border-color 0.3s ease, box-shadow 0.3s ease;
}
.feature-card:hover {
  transform: translateY(-6px);
  border-color: var(--teal-primary);
  box-shadow: 0 20px 40px var(--shadow-color);
}

.feat-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}
.icon-teal { background: rgba(0, 229, 164, 0.15); color: var(--teal-primary); }
.icon-blue { background: rgba(0, 153, 255, 0.15); color: var(--blue-ocean); }
.icon-cyan { background: rgba(0, 180, 216, 0.15); color: var(--cyan-accent); }
.icon-emerald { background: rgba(39, 201, 63, 0.15); color: #27C93F; }
.icon-purple { background: rgba(168, 85, 247, 0.15); color: #A855F7; }
.icon-yellow { background: rgba(255, 189, 46, 0.15); color: #FFBD2E; }

.feat-title { font-size: 1.25rem; font-weight: 800; margin-bottom: 12px; }
.feat-desc { color: var(--text-muted); font-size: 0.95rem; margin-bottom: 20px; line-height: 1.6; }
.feat-list { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.feat-list li { font-size: 0.88rem; color: var(--text-sub); position: relative; padding-right: 18px; }
html[dir="ltr"] .feat-list li { padding-right: 0; padding-left: 18px; }
.feat-list li::before { content: "•"; color: var(--teal-primary); font-size: 1.4rem; position: absolute; right: 0; top: -3px; }
html[dir="ltr"] .feat-list li::before { right: auto; left: 0; }

/* Interactive Demo Sandbox */
.sandbox-box-wrapper {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 44px;
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 40px;
  align-items: center;
}
.sandbox-main-title { font-size: 2rem; font-weight: 800; margin-bottom: 12px; }
.sandbox-desc { color: var(--text-muted); font-size: 1.05rem; margin-bottom: 28px; }

.scenario-selector { margin-bottom: 24px; }
.scenario-selector label { display: block; font-weight: 700; font-size: 0.9rem; margin-bottom: 12px; }
.scenario-buttons { display: flex; gap: 10px; flex-wrap: wrap; }
.scen-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 10px 16px;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 0.88rem;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
}
.scen-btn:hover { background: rgba(255, 255, 255, 0.1); }
.scen-btn.active {
  background: rgba(0, 229, 164, 0.15);
  border-color: var(--teal-primary);
  color: var(--teal-primary);
}

.custom-sim-input { display: flex; gap: 12px; }
.custom-sim-input input {
  flex: 1;
  padding: 12px 18px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.95rem;
}

/* Phone Mockup Frame */
.phone-mockup-wrap { display: flex; justify-content: center; }
.phone-frame {
  width: 320px;
  height: 540px;
  background: #0B0E14;
  border: 12px solid #1E293B;
  border-radius: 40px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6);
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.phone-speaker { width: 60px; height: 5px; background: #334155; border-radius: 4px; position: absolute; top: 8px; left: 50%; transform: translateX(-50%); z-index: 10; }

.wa-header {
  background: #075E54;
  color: #FFF;
  padding: 24px 14px 10px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.wa-header-avatar img { width: 34px; height: 34px; border-radius: 50%; }
.wa-name { font-size: 0.82rem; font-weight: 800; display: flex; align-items: center; gap: 4px; }
.green-tick-badge { color: #25D366; font-size: 0.75rem; }
.wa-status { font-size: 0.65rem; opacity: 0.85; }

.wa-body {
  flex: 1;
  background: #0D1418;
  background-image: radial-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 0);
  background-size: 16px 16px;
  padding: 12px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.wa-date-divider { text-align: center; font-size: 0.65rem; color: rgba(255, 255, 255, 0.5); background: rgba(0,0,0,0.3); width: fit-content; margin: 0 auto 8px; padding: 2px 10px; border-radius: 10px; }

.wa-bubble { max-width: 85%; padding: 8px 12px; border-radius: 8px; font-size: 0.8rem; line-height: 1.4; }
.wa-incoming { background: #005C4B; color: #FFF; align-self: flex-start; border-top-right-radius: 0; }
.wa-outgoing { background: #202C33; color: #E9EDEF; align-self: flex-end; border-top-left-radius: 0; }
.wa-time { font-size: 0.6rem; color: rgba(255,255,255,0.6); text-align: left; margin-top: 4px; }

.wa-footer {
  background: #1F2C34;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.wa-input-sim { flex: 1; font-size: 0.75rem; color: rgba(255,255,255,0.4); background: #2A3942; padding: 8px 12px; border-radius: 20px; }
.wa-send-circle { width: 32px; height: 32px; background: #00A884; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #FFF; }

/* Integrations Section & Code Snippet */
.integ-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 40px;
}
.integ-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 24px;
  border-radius: var(--radius-md);
  text-align: center;
}
.integ-logo { font-size: 1.25rem; font-weight: 800; margin-bottom: 10px; color: var(--teal-primary); }
.integ-desc { font-size: 0.88rem; color: var(--text-muted); margin-bottom: 14px; }
.integ-status { font-size: 0.78rem; font-weight: 700; color: var(--cyan-accent); background: rgba(0, 180, 216, 0.1); padding: 4px 10px; border-radius: var(--radius-full); }

.code-snippet-box {
  background: #090D16;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  max-width: 900px;
  margin: 0 auto;
}
.code-header {
  background: rgba(0, 0, 0, 0.3);
  padding: 10px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-color);
}
.code-tabs { display: flex; gap: 8px; }
.code-tab {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-code);
  font-size: 0.85rem;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.code-tab.active { background: rgba(0, 229, 164, 0.15); color: var(--teal-primary); font-weight: 700; }
.copy-code-btn { background: transparent; border: 1px solid var(--border-color); color: var(--text-main); font-size: 0.8rem; padding: 4px 10px; border-radius: var(--radius-sm); cursor: pointer; }

.code-display { padding: 20px; color: #38BDF8; font-family: var(--font-code); font-size: 0.88rem; overflow-x: auto; margin: 0; }

/* ROI Calculator Section */
.roi-card-container {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 44px;
  backdrop-filter: blur(16px);
}
.calculator-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
  margin-top: 30px;
}
.calc-label { font-weight: 800; font-size: 1.1rem; display: block; margin-bottom: 14px; }
.slider-display-val { font-size: 3rem; font-weight: 900; color: var(--teal-primary); font-family: var(--font-latin); }
.slider-display-val small { font-size: 1rem; color: var(--text-muted); }

.custom-range-slider {
  width: 100%;
  height: 10px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 5px;
  outline: none;
  accent-color: var(--teal-primary);
  margin: 20px 0 10px;
  cursor: pointer;
}
.range-bounds { display: flex; justify-content: space-between; color: var(--text-muted); font-size: 0.85rem; font-family: var(--font-latin); }

.calc-results-side { display: flex; flex-direction: column; gap: 16px; }
.roi-res-box { background: rgba(0, 0, 0, 0.2); border: 1px solid var(--border-color); padding: 20px; border-radius: var(--radius-md); }
.res-label { font-size: 0.9rem; color: var(--text-muted); }
.res-amount { font-size: 1.8rem; font-weight: 900; margin: 4px 0; }
.res-sub { font-size: 0.78rem; color: var(--text-muted); }

/* Comparison Table */
.table-responsive { overflow-x: auto; }
.comparison-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-color);
}
.comparison-table th, .comparison-table td { padding: 18px 24px; text-align: right; border-bottom: 1px solid var(--border-color); }
html[dir="ltr"] .comparison-table th, html[dir="ltr"] .comparison-table td { text-align: left; }
.comparison-table th { background: rgba(0, 0, 0, 0.2); font-weight: 800; font-size: 0.95rem; }
.th-highlight { background: rgba(0, 229, 164, 0.1) !important; border-top: 3px solid var(--teal-primary); }
.brand-th { display: flex; align-items: center; gap: 8px; color: var(--teal-primary); }
.td-feature { font-weight: 700; width: 30%; }
.td-marsal { background: rgba(0, 229, 164, 0.04); font-weight: 700; }
.text-red { color: #FF5F56; }

/* Pricing Section */
.billing-toggle-wrap { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 24px; }
.billing-label { font-weight: 700; font-size: 0.95rem; }
.badge-discount { background: rgba(0, 229, 164, 0.15); color: var(--teal-primary); padding: 2px 8px; border-radius: 4px; font-size: 0.78rem; }

/* Switch Toggle Styling */
.switch { position: relative; display: inline-block; width: 52px; height: 28px; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider.round { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: rgba(255, 255, 255, 0.15); transition: .4s; border-radius: 34px; }
.slider.round:before { position: absolute; content: ""; height: 20px; width: 20px; left: 4px; bottom: 4px; background-color: white; transition: .4s; border-radius: 50%; }
input:checked + .slider { background-color: var(--teal-primary); }
input:checked + .slider:before { transform: translateX(24px); }

.pricing-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 40px; }
.pricing-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 36px;
  position: relative;
  display: flex;
  flex-direction: column;
  backdrop-filter: blur(12px);
}
.plan-featured {
  border-color: var(--teal-primary);
  box-shadow: 0 0 40px var(--teal-glow);
  transform: scale(1.04);
}
.popular-ribbon { position: absolute; top: -14px; right: 30px; background: linear-gradient(90deg, var(--teal-primary), var(--cyan-accent)); color: #040914; font-weight: 800; font-size: 0.78rem; padding: 4px 14px; border-radius: var(--radius-full); }

.plan-title { font-size: 1.5rem; font-weight: 900; margin-bottom: 8px; }
.plan-desc { color: var(--text-muted); font-size: 0.88rem; margin-bottom: 20px; min-height: 42px; }
.plan-price { font-size: 3rem; font-weight: 900; font-family: var(--font-latin); color: var(--text-main); margin-bottom: 24px; }
.plan-price .period { font-size: 0.9rem; color: var(--text-muted); font-family: var(--font-arabic); }

.plan-features { list-style: none; display: flex; flex-direction: column; gap: 12px; margin-bottom: 32px; flex: 1; }
.plan-features li { font-size: 0.9rem; color: var(--text-sub); }
.btn-block { width: 100%; text-align: center; }

/* Testimonials */
.testimonials-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.testi-card { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--radius-md); padding: 28px; }
.testi-stars { color: #FFBD2E; font-size: 1.1rem; margin-bottom: 14px; }
.testi-text { font-size: 0.95rem; color: var(--text-sub); margin-bottom: 20px; line-height: 1.6; }
.testi-author { display: flex; align-items: center; gap: 12px; }
.author-avatar { width: 42px; height: 42px; border-radius: 50%; background: linear-gradient(135deg, var(--teal-primary), var(--blue-ocean)); color: #000; font-weight: 900; display: flex; align-items: center; justify-content: center; }
.author-name { font-weight: 800; font-size: 0.9rem; }
.author-role { font-size: 0.78rem; color: var(--text-muted); }

/* FAQ Section */
.faq-accordion-container { max-width: 840px; margin: 0 auto; display: flex; flex-direction: column; gap: 14px; }
.faq-item { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--radius-md); overflow: hidden; }
.faq-question { width: 100%; padding: 20px 24px; background: transparent; border: none; color: var(--text-main); font-weight: 800; font-size: 1.05rem; font-family: inherit; text-align: right; display: flex; justify-content: space-between; align-items: center; cursor: pointer; }
html[dir="ltr"] .faq-question { text-align: left; }
.faq-icon { font-size: 1.4rem; color: var(--teal-primary); transition: transform 0.3s ease; }
.faq-item.active .faq-icon { transform: rotate(45deg); }
.faq-answer { display: none; padding: 0 24px 20px; color: var(--text-muted); font-size: 0.95rem; line-height: 1.6; border-top: 1px solid transparent; }
.faq-item.active .faq-answer { display: block; }

/* Final CTA Banner */
.cta-banner-box {
  background: linear-gradient(135deg, rgba(0, 229, 164, 0.15) 0%, rgba(0, 153, 255, 0.15) 100%), var(--bg-card);
  border: 1px solid var(--teal-primary);
  border-radius: var(--radius-lg);
  padding: 60px 40px;
  text-align: center;
  box-shadow: 0 0 50px var(--teal-glow);
}
.cta-title { font-size: 2.4rem; font-weight: 900; margin-bottom: 16px; }
.cta-desc { font-size: 1.15rem; color: var(--text-muted); max-width: 650px; margin: 0 auto 32px; }
.cta-actions { display: flex; justify-content: center; gap: 16px; flex-wrap: wrap; }

/* Site Footer */
.site-footer { background: rgba(4, 7, 13, 0.95); border-top: 1px solid var(--border-color); padding: 60px 0 30px; font-size: 0.9rem; }
.footer-top-grid { display: grid; grid-template-columns: 1.8fr 1fr 1fr 1fr; gap: 36px; margin-bottom: 40px; align-items: start; }
.footer-col { display: flex; flex-direction: column; align-items: flex-start; }
.footer-logo-link { display: inline-block; margin-bottom: 12px; text-decoration: none; }
.footer-logo-badge { display: inline-flex; align-items: center; justify-content: center; background: #FFFFFF; padding: 6px 14px; border-radius: 10px; box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25); }
.footer-logo-img { height: 38px; width: auto; max-width: 180px; object-fit: contain; display: block; }
.logo-img { max-height: 48px; width: auto; max-width: 200px; object-fit: contain; }

.footer-brand-desc { color: var(--text-muted); margin: 12px 0 20px; max-width: 320px; font-size: 0.88rem; line-height: 1.6; }
.social-links { display: flex; gap: 12px; }
.social-links a { width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,0.06); display: flex; align-items: center; justify-content: center; color: var(--text-main); text-decoration: none; font-weight: 700; transition: background 0.2s; }
.social-links a:hover { background: var(--teal-primary); color: #000; }

.footer-heading { font-size: 1rem; font-weight: 800; margin-bottom: 18px; color: var(--text-main); }
.footer-links { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-links a { color: var(--text-muted); text-decoration: none; transition: color 0.2s; }
.footer-links a:hover { color: var(--teal-primary); }

.footer-bottom { border-top: 1px solid var(--border-color); padding-top: 24px; display: flex; justify-content: space-between; align-items: center; color: var(--text-muted); font-size: 0.82rem; flex-wrap: wrap; gap: 12px; }
.official-disclaimer { opacity: 0.7; }

/* Responsive Media Queries */
@media (max-width: 1024px) {
  .hero-main-title { font-size: 2.6rem; }
  .features-grid, .integ-grid, .pricing-grid, .testimonials-grid { grid-template-columns: repeat(2, 1fr); }
  .trust-metrics-grid { grid-template-columns: repeat(2, 1fr); }
  .sandbox-box-wrapper { grid-template-columns: 1fr; }
  .phone-mockup-wrap { margin-top: 20px; }
  .calculator-grid { grid-template-columns: 1fr; }
  .plan-featured { transform: none; }
  .footer-top-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .header-inner { height: 70px; }
  .main-nav {
    display: none;
    position: absolute;
    top: 70px;
    left: 0;
    right: 0;
    background: var(--bg-main);
    border-bottom: 1px solid var(--border-color);
    flex-direction: column;
    padding: 20px;
    gap: 16px;
  }
  .main-nav.active { display: flex; }
  .mobile-menu-btn { display: flex; }
  .nav-login-btn { display: none; }
  .logo-full { display: none; }
  .logo-icon-mobile { display: block; }

  .hero-main-title { font-size: 2.1rem; }
  .hero-description { font-size: 1rem; }
  .features-grid, .integ-grid, .pricing-grid, .testimonials-grid { grid-template-columns: 1fr; }
  .inbox-layout { grid-template-columns: 1fr; }
  .inbox-sidebar { display: none; }
  .flow-builder-sim { flex-direction: column; }
  .flow-line { transform: rotate(90deg); }
  .footer-top-grid { grid-template-columns: 1fr; }
}

/* === Marsal header: one-line nav + brand lockup === */
.brand-logo{gap:10px;flex-shrink:0}
.brand-icon{height:42px;width:auto;object-fit:contain;display:block}
.brand-word{font-family:var(--font-latin);font-weight:800;font-size:1.55rem;line-height:1;letter-spacing:-.5px;background:linear-gradient(120deg,#00E5A4,#00B4D8 55%,#0099FF);-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent;color:transparent}
.header-inner{gap:16px}
.main-nav{gap:18px;flex-wrap:nowrap}
.nav-link{white-space:nowrap;font-size:.92rem}
.header-actions{gap:10px;flex-shrink:0}
.header-actions .btn{padding:9px 16px;font-size:.9rem;white-space:nowrap}
@media (max-width:768px){.brand-word{font-size:1.3rem}.brand-icon{height:36px}}

/* nav collapse <=1024 (avoid mid-width crowding) */
@media (max-width:1024px){
 .main-nav{display:none;position:absolute;top:100%;left:0;right:0;background:var(--bg-main);border-bottom:1px solid var(--header-border);flex-direction:column;padding:20px;gap:16px}
 .main-nav.active{display:flex}
 .mobile-menu-btn{display:flex}
 .nav-login-btn{display:none}
}

/* === Phone polish (<=600 / <=480) — keep every section within the screen === */
@media (max-width:600px){
 .comparison-table{display:block;overflow-x:auto;-webkit-overflow-scrolling:touch;white-space:nowrap}
 .trust-metrics-grid{grid-template-columns:repeat(2,1fr)}
}
@media (max-width:480px){
 .wrap{padding-left:16px;padding-right:16px}
 .hero-main-title{font-size:1.75rem;line-height:1.22}
 .hero-description{font-size:.95rem}
 .section-title{font-size:1.5rem}
 .hero-cta-group{flex-direction:column;align-items:stretch}
 .hero-cta-group .btn{width:100%;justify-content:center}
 .footer-top-grid{grid-template-columns:1fr}
}

/* ===== Mobile header: side drawer + hamburger far-left + CTA below header ===== */
.nav-tools{display:inline-flex;gap:8px;align-items:center;margin-inline-start:12px}
.mobile-cta-row{display:none}
.nav-backdrop{display:none}
@media (max-width:768px){
 /* compact announcement bar (was cramped/overlapping) */
 .announcement-bar{padding:6px 0}
 .ann-content{flex-wrap:wrap;justify-content:center;text-align:center;gap:4px 8px}
 .ann-badge{font-size:.64rem;padding:2px 8px}
 .ann-text{font-size:.72rem;line-height:1.3}
 .ann-link{font-size:.72rem}
}
@media (max-width:1024px){
 /* backdrop-filter creates a containing block that traps position:fixed children —
    drop it on mobile (solid bg instead) so the nav drawer anchors to the viewport.
    z-index above the announcement bar (101) + backdrop (1150) so the drawer covers them. */
 .site-header{backdrop-filter:none;-webkit-backdrop-filter:none;background:var(--bg-main);z-index:2000}
 .header-inner{justify-content:space-between}
 .header-actions{gap:8px}
 .header-actions .header-trial,.header-actions .nav-login-btn{display:none}   /* moved below header / into drawer */
 .mobile-menu-btn{display:flex}
 /* nav turns into a SIDE drawer that slides in from the left (where the ☰ is) */
 .main-nav{
   display:flex;position:fixed;top:0;left:0;right:auto;bottom:0;height:100vh;width:82vw;max-width:330px;
   transform:translateX(-100%);transition:transform .25s ease;
   background:#0E1525;border-inline-end:1px solid rgba(255,255,255,.1);
   flex-direction:column;align-items:stretch;gap:2px;padding:76px 20px 24px;
   overflow-y:auto;z-index:1200;box-shadow:0 0 44px rgba(0,0,0,.55)
 }
 .main-nav.active{transform:translateX(0)}
 .main-nav .nav-link{padding:13px 6px;border-bottom:1px solid rgba(255,255,255,.07);white-space:normal;font-size:1rem;color:#eaf1f8}
 .main-nav .nav-link:hover{color:#00E5A4}
 html.light-theme .main-nav{background:#ffffff}
 html.light-theme .main-nav .nav-link{color:#0f172a;border-bottom-color:rgba(0,0,0,.08)}
 .nav-tools{display:flex;gap:12px;margin:16px 0 0;padding-top:14px;border-top:1px solid rgba(255,255,255,.1);justify-content:flex-start}
 .nav-tools .lang-btn,.nav-tools .icon-btn{flex:0 0 auto}
 .nav-backdrop{position:fixed;inset:0;background:rgba(0,0,0,.5);z-index:1150;display:none}
 .nav-backdrop.active{display:block}
 /* free-trial + login row directly under the header */
 .mobile-cta-row{display:flex;gap:10px;padding:10px 16px;background:var(--bg-main);border-bottom:1px solid var(--header-border)}
 .mobile-cta-row .btn{flex:1;justify-content:center;white-space:nowrap}
}
