/* ==========================================================================
   JAWWIB AI - Enterprise Design System & Modern Stylesheet
   Based on DESIGN.md: Midnight Navy (#0A0E1A), Electric Cyan (#00D4FF),
   Royal-to-Purple Gradients, Glassmorphism, and Tactile AI Luminescence
   ========================================================================== */

:root {
  /* Surface Color Palette */
  --bg-midnight: #0a0e1a;
  --surface: #0e1321;
  --surface-dim: #0e1321;
  --surface-bright: #343949;
  --surface-container-lowest: #090e1c;
  --surface-container-low: #161b2a;
  --surface-container: #1a1f2e;
  --surface-container-high: #252a39;
  --surface-container-highest: #2f3444;
  
  /* Text & On-Surface Colors */
  --on-surface: #dee2f7;
  --on-surface-variant: #bbc9cf;
  --text-muted: #859398;
  --text-pure-white: #ffffff;
  
  /* Accent & Primary Colors */
  --primary: #a8e8ff;
  --primary-container: #00d4ff;
  --primary-fixed: #b4ebff;
  --primary-glow: rgba(0, 212, 255, 0.4);
  
  /* Secondary & Tertiary */
  --secondary: #b2c5ff;
  --secondary-container: #0568fa;
  --tertiary: #e1daff;
  --tertiary-container: #c5baff;
  --error: #ffb4ab;
  --success: #3cd7ff;

  /* Gradients */
  --btn-gradient: linear-gradient(135deg, #176dff 0%, #7b61ff 100%);
  --btn-gradient-hover: linear-gradient(135deg, #1f78ff 0%, #8c73ff 100%);
  --cyan-purple-gradient: linear-gradient(90deg, #00d4ff 0%, #7b61ff 100%);
  --card-glow-gradient: radial-gradient(circle at 50% 0%, rgba(0, 212, 255, 0.12) 0%, transparent 70%);

  /* Borders & Shadows */
  --border-subtle: 1px solid rgba(255, 255, 255, 0.07);
  --border-highlight: 1px solid rgba(0, 212, 255, 0.35);
  --border-active: 1px solid #00d4ff;
  --glass-bg: rgba(26, 31, 46, 0.75);
  --glass-bg-elevated: rgba(37, 42, 57, 0.85);
  
  /* Typography */
  --font-arabic: 'IBM Plex Sans Arabic', system-ui, -apple-system, sans-serif;
  --font-english: 'Inter', system-ui, -apple-system, sans-serif;
  
  /* Transitions */
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
  color-scheme: dark;
}

body {
  font-family: var(--font-arabic);
  background-color: var(--bg-midnight);
  color: var(--on-surface);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
  position: relative;
  background-image: 
    radial-gradient(at 10% 15%, rgba(0, 212, 255, 0.06) 0px, transparent 40%),
    radial-gradient(at 90% 45%, rgba(123, 97, 255, 0.06) 0px, transparent 40%),
    radial-gradient(at 50% 85%, rgba(23, 109, 255, 0.05) 0px, transparent 50%),
    linear-gradient(to right, rgba(255, 255, 255, 0.015) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
  background-size: auto, auto, auto, 40px 40px, 40px 40px;
}

/* LTR Typography when English is active */
html[dir="ltr"] body {
  font-family: var(--font-english);
}

html[dir="ltr"] .font-arabic-only {
  font-family: var(--font-arabic);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--surface-container-lowest);
}
::-webkit-scrollbar-thumb {
  background: var(--surface-container-high);
  border-radius: 4px;
  border: 2px solid var(--surface-container-lowest);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--primary-container);
}

/* Text & Accent Utilities */
.gradient-text {
  background: linear-gradient(135deg, #00d4ff 0%, #b2c5ff 60%, #e1daff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.gradient-text-alt {
  background: var(--btn-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

/* Buttons */
.btn-primary {
  background: var(--btn-gradient);
  color: #ffffff;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  padding: 12px 24px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 15px;
  transition: all var(--transition-fast);
  box-shadow: 0 4px 15px rgba(23, 109, 255, 0.25);
  position: relative;
  overflow: hidden;
  text-decoration: none;
}

.btn-primary:hover {
  background: var(--btn-gradient-hover);
  box-shadow: 0 0 25px rgba(0, 212, 255, 0.45);
  transform: translateY(-2px);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background: rgba(0, 212, 255, 0.05);
  color: var(--primary-container);
  border: 1px solid rgba(0, 212, 255, 0.3);
  font-weight: 600;
  border-radius: 8px;
  padding: 12px 24px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 15px;
  transition: all var(--transition-fast);
  text-decoration: none;
  backdrop-filter: blur(8px);
}

.btn-secondary:hover {
  background: rgba(0, 212, 255, 0.12);
  border-color: var(--primary-container);
  box-shadow: 0 0 15px rgba(0, 212, 255, 0.2);
  transform: translateY(-2px);
}

.btn-ghost {
  background: transparent;
  color: var(--on-surface-variant);
  border: 1px solid transparent;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  transition: all var(--transition-fast);
  font-weight: 500;
}

.btn-ghost:hover {
  color: var(--primary-container);
  background: rgba(255, 255, 255, 0.04);
}

/* Glassmorphism Cards */
.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: var(--border-subtle);
  border-radius: 16px;
  transition: all var(--transition-smooth);
  position: relative;
  overflow: hidden;
}

.glass-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
  pointer-events: none;
}

.glass-card:hover {
  border-color: rgba(0, 212, 255, 0.25);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4), 0 0 20px rgba(0, 212, 255, 0.08);
  transform: translateY(-3px);
}

.glass-card-interactive {
  cursor: pointer;
}

/* Dedicated Pricing Cards */
.pricing-card {
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  position: relative;
  transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
  overflow: visible !important;
}

.pricing-card:hover {
  border-color: rgba(0, 212, 255, 0.3);
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5), 0 0 25px rgba(0, 212, 255, 0.1);
}

.pricing-card-featured {
  background: linear-gradient(180deg, rgba(23, 109, 255, 0.08) 0%, rgba(123, 97, 255, 0.04) 100%), var(--glass-bg);
  border: 1.5px solid rgba(0, 212, 255, 0.45);
  box-shadow: 0 0 35px rgba(0, 212, 255, 0.15), 0 20px 40px rgba(0, 0, 0, 0.5);
  overflow: visible !important;
}

.pricing-card-featured:hover {
  border-color: rgba(0, 212, 255, 0.7);
  box-shadow: 0 0 45px rgba(0, 212, 255, 0.25), 0 24px 50px rgba(0, 0, 0, 0.6);
  transform: translateY(-6px);
}

.pricing-badge {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #176DFF, #7B61FF);
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 16px;
  border-radius: 9999px;
  box-shadow: 0 4px 15px rgba(123, 97, 255, 0.5);
  white-space: nowrap;
  z-index: 25;
}

/* Ambient Glow Elements */
.ambient-glow-cyan {
  position: absolute;
  width: 380px;
  height: 380px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 212, 255, 0.15) 0%, transparent 70%);
  filter: blur(60px);
  pointer-events: none;
  z-index: 0;
}

.ambient-glow-purple {
  position: absolute;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(123, 97, 255, 0.12) 0%, transparent 70%);
  filter: blur(60px);
  pointer-events: none;
  z-index: 0;
}

/* Header & Nav */
.header-glass {
  background: rgba(14, 19, 33, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  transition: all var(--transition-fast);
}

.header-container {
  max-width: 1280px;
  width: 100%;
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

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

.nav-brand img {
  height: 34px;
  width: auto;
  object-fit: contain;
  display: block;
}

.brand-icon-pulse {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--btn-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 0 15px rgba(0, 212, 255, 0.5);
  position: relative;
}

.brand-icon-pulse::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 13px;
  border: 1px solid rgba(0, 212, 255, 0.4);
  animation: pulse-ring 2.5s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
}

@keyframes pulse-ring {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.15); opacity: 0; }
  100% { transform: scale(0.95); opacity: 0; }
}

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

.nav-link {
  color: var(--on-surface-variant);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  transition: all var(--transition-fast);
  position: relative;
  padding: 4px 0;
}

.nav-link:hover, .nav-link.active {
  color: var(--primary-container);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary-container);
  transition: width var(--transition-fast);
  border-radius: 2px;
}

.nav-link:hover::after, .nav-link.active::after {
  width: 100%;
}

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

.header-cta-btn {
  white-space: nowrap !important;
  flex-shrink: 0;
  padding: 8px 18px;
  font-size: 13.5px;
  border-radius: 8px;
}

.lang-switch-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--on-surface);
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all var(--transition-fast);
}

.lang-switch-btn:hover {
  background: rgba(0, 212, 255, 0.1);
  border-color: var(--primary-container);
  color: var(--primary-container);
}

#openMobileMenuBtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #ffffff;
  padding: 6px 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s ease;
}

#openMobileMenuBtn:hover {
  background: rgba(255, 255, 255, 0.12);
}

/* Badge Styles */
.badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 212, 255, 0.08);
  border: 1px solid rgba(0, 212, 255, 0.25);
  padding: 6px 16px;
  border-radius: 30px;
  font-size: 13px;
  font-weight: 600;
  color: var(--primary-container);
  box-shadow: 0 0 15px rgba(0, 212, 255, 0.1);
}

.badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary-container);
  box-shadow: 0 0 8px var(--primary-container);
  animation: live-blink 1.8s infinite;
}

@keyframes live-blink {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.8); }
}

/* Flowing SVG & Lines */
.animated-flow-line {
  stroke-dasharray: 8 8;
  animation: flow-dash 1.2s linear infinite;
}

@keyframes flow-dash {
  to { stroke-dashoffset: -32; }
}

.glow-node {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  box-shadow: 0 0 15px rgba(0, 212, 255, 0.9);
  animation: pulse-node 2s infinite ease-in-out;
}

@keyframes pulse-node {
  0%, 100% { transform: scale(1); opacity: 0.8; }
  50% { transform: scale(1.4); opacity: 1; box-shadow: 0 0 25px rgba(0, 212, 255, 1); }
}

/* WhatsApp Live Simulator Container */
.wa-phone-frame {
  width: 100%;
  max-width: 380px;
  height: 590px;
  background: #0f172a;
  border-radius: 36px;
  border: 7px solid #1e293b;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.7), 0 0 35px rgba(0, 212, 255, 0.15);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

.wa-phone-notch {
  width: 120px;
  height: 18px;
  background: #1e293b;
  border-bottom-left-radius: 12px;
  border-bottom-right-radius: 12px;
  margin: 0 auto;
  position: relative;
  z-index: 10;
}

.wa-header {
  background: #161f33;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.wa-chat-body {
  flex: 1;
  background: #0b1120;
  background-image: radial-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 0);
  background-size: 16px 16px;
  padding: 16px 12px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.wa-bubble {
  max-width: 82%;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 13.5px;
  line-height: 1.45;
  position: relative;
  word-break: break-word;
  animation: slide-up 0.25s ease-out;
}

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

.wa-bubble-ai {
  background: #1a2238;
  color: #e2e8f0;
  align-self: flex-start;
  border-bottom-right-radius: 4px;
  border: 1px solid rgba(0, 212, 255, 0.15);
}

html[dir="rtl"] .wa-bubble-ai {
  border-bottom-right-radius: 14px;
  border-bottom-left-radius: 4px;
}

.wa-bubble-user {
  background: #005c4b;
  color: #ffffff;
  align-self: flex-end;
  border-bottom-left-radius: 4px;
}

html[dir="rtl"] .wa-bubble-user {
  border-bottom-left-radius: 14px;
  border-bottom-right-radius: 4px;
}

.wa-time {
  font-size: 10px;
  opacity: 0.65;
  margin-top: 4px;
  text-align: right;
  display: block;
}

.wa-prompt-chip {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--on-surface);
  padding: 6px 12px;
  border-radius: 18px;
  font-size: 12px;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-align: inherit;
  white-space: nowrap;
}

.wa-prompt-chip:hover {
  background: rgba(0, 212, 255, 0.15);
  border-color: var(--primary-container);
  color: var(--primary-container);
}

.typing-indicator {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
}

.typing-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--primary-container);
  animation: typing-anim 1.2s infinite;
}
.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes typing-anim {
  0%, 100% { opacity: 0.2; transform: translateY(0); }
  50% { opacity: 1; transform: translateY(-3px); }
}

/* Sliders for ROI Calculator */
.range-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 4px;
  background: #252a39;
  outline: none;
  cursor: pointer;
}

.range-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--primary-container);
  box-shadow: 0 0 10px rgba(0, 212, 255, 0.8);
  cursor: pointer;
  transition: transform 0.15s;
}

.range-slider::-webkit-slider-thumb:hover {
  transform: scale(1.25);
}

/* Modal Overlay */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(9, 14, 28, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  padding: 20px;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  background: var(--surface-container);
  border: 1px solid rgba(0, 212, 255, 0.25);
  border-radius: 20px;
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.7), 0 0 35px rgba(0, 212, 255, 0.15);
  transform: scale(0.95) translateY(10px);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  padding: 32px;
  position: relative;
}

.modal-overlay.active .modal-card {
  transform: scale(1) translateY(0);
}

/* Mobile Drawer Backdrop */
.mobile-drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(10, 14, 26, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 190;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.mobile-drawer-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

/* Mobile Drawer */
.mobile-drawer {
  position: fixed;
  top: 0;
  bottom: 0;
  right: 0;
  width: min(85vw, 340px);
  background: rgba(14, 19, 33, 0.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-left: 1px solid rgba(255, 255, 255, 0.1);
  z-index: 200;
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: -15px 0 35px rgba(0, 0, 0, 0.8);
}

html[dir="ltr"] .mobile-drawer {
  right: auto;
  left: 0;
  border-left: none;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  transform: translateX(-100%);
  box-shadow: 15px 0 35px rgba(0, 0, 0, 0.8);
}

.mobile-drawer.open,
html[dir="ltr"] .mobile-drawer.open,
html[dir="rtl"] .mobile-drawer.open {
  transform: translateX(0) !important;
}

.mobile-drawer-link {
  transition: all 0.2s ease;
}

.mobile-drawer-link:hover {
  transform: translateX(-4px);
}

html[dir="ltr"] .mobile-drawer-link:hover {
  transform: translateX(4px);
}

/* 3D Angled Hero Showcase */
.hero-3d-container {
  perspective: 1400px;
  position: relative;
  width: 100%;
  max-width: 580px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-dashboard-angled {
  width: 100%;
  aspect-ratio: 1.62;
  border-radius: 18px;
  border: 1px solid rgba(0, 212, 255, 0.25);
  background: var(--surface-container);
  box-shadow: -20px 30px 60px rgba(0, 0, 0, 0.75), 0 0 40px rgba(0, 212, 255, 0.12);
  transform: rotateY(-10deg) rotateX(5deg) rotateZ(-1.5deg);
  transform-style: preserve-3d;
  transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.5s ease;
  overflow: hidden;
  position: relative;
}

html[dir="ltr"] .hero-dashboard-angled {
  transform: rotateY(-8deg) rotateX(4deg) rotateZ(-1.5deg);
  box-shadow: -15px 25px 60px rgba(0, 0, 0, 0.75), 0 0 40px rgba(0, 212, 255, 0.12);
}

.hero-dashboard-angled:hover {
  transform: rotateY(-4deg) rotateX(2deg) rotateZ(-0.5deg) scale(1.02);
  box-shadow: -15px 25px 70px rgba(0, 0, 0, 0.85), 0 0 50px rgba(0, 212, 255, 0.25);
}

html[dir="ltr"] .hero-dashboard-angled:hover {
  transform: rotateY(-3deg) rotateX(2deg) rotateZ(-0.5deg) scale(1.02);
}

.hero-mobile-angled {
  position: absolute;
  bottom: -22px;
  right: -15px;
  width: 210px;
  max-width: 44%;
  height: 370px;
  border-radius: 26px;
  border: 5px solid #1e293b;
  background: #0f172a;
  box-shadow: 15px 25px 55px rgba(0, 0, 0, 0.85), 0 0 35px rgba(123, 97, 255, 0.35);
  transform: rotateY(7deg) rotateX(3deg) rotateZ(2.5deg);
  transform-style: preserve-3d;
  transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.5s ease;
  overflow: hidden;
  z-index: 30;
}

html[dir="ltr"] .hero-mobile-angled {
  right: -15px;
  left: auto;
  bottom: -22px;
  transform: rotateY(8deg) rotateX(3deg) rotateZ(2.5deg);
}

.hero-mobile-angled:hover {
  transform: rotateY(1deg) rotateX(1deg) rotateZ(0.5deg) scale(1.03);
  box-shadow: 20px 30px 65px rgba(0, 0, 0, 0.9), 0 0 45px rgba(0, 212, 255, 0.45);
}

.text-error {
  color: var(--error);
}

/* ==========================================================================
   Comprehensive Mobile Responsiveness & Overflow Prevention
   ========================================================================== */

/* Ensure absolutely no horizontal overflow across any device */
html, body {
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden !important;
  position: relative;
}

main, section, header, footer, .header-container {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  box-sizing: border-box;
}

/* Base Ambient Glow Boundary Containment */
.ambient-glow-cyan, .ambient-glow-purple {
  position: absolute;
  pointer-events: none;
  filter: blur(80px);
  border-radius: 50%;
  max-width: 80vw;
  max-height: 80vw;
  overflow: hidden;
  z-index: 0;
}

.ambient-glow-cyan {
  width: 340px;
  height: 340px;
  background: radial-gradient(circle, rgba(0, 212, 255, 0.18) 0%, transparent 70%);
}

.ambient-glow-purple {
  width: 340px;
  height: 340px;
  background: radial-gradient(circle, rgba(123, 97, 255, 0.18) 0%, transparent 70%);
}

/* LTR specific layout tweaks */
html[dir="ltr"] .modal-card #closeModalBtn {
  left: auto;
  right: 1rem;
}

/* Utility Animations */
.animate-float {
  animation: float-slow 4s ease-in-out infinite;
}

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

/* Desktop navigation (lg / 1024px+) */
@media (min-width: 1024px) {
  .nav-links {
    display: flex !important;
  }

  #openMobileMenuBtn {
    display: none !important;
  }
}

/* Tablet & Laptop Screens (<= 1023px) */
@media (max-width: 1023px) {
  .header-container {
    padding: 10px 18px;
  }
  .hero-3d-container {
    max-width: 100%;
    margin-top: 1rem;
  }
}

/* Standard Mobile Screens (<= 768px) */
@media (max-width: 768px) {
  /* Prevent horizontal scrollbars and background overflow */
  body {
    background-size: auto, auto, auto, 24px 24px, 24px 24px;
  }

  .ambient-glow-cyan, .ambient-glow-purple {
    width: 180px;
    height: 180px;
    filter: blur(45px);
    opacity: 0.12;
  }

  /* Header & Navigation */
  .header-glass {
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
  }
  
  .header-container {
    padding: 10px 14px;
  }

  .nav-brand img {
    height: 28px !important;
  }

  main {
    padding-top: 5rem !important;
  }

  /* Hero Section */
  .hero-3d-container {
    perspective: none !important;
    width: 100%;
    max-width: 100%;
    padding: 0 4px 2.5rem;
    margin: 0 auto;
    overflow: hidden;
  }

  .hero-dashboard-angled {
    transform: none !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), 0 0 20px rgba(0, 212, 255, 0.1) !important;
    border-radius: 14px;
    width: 100%;
    aspect-ratio: 1.62;
  }

  html[dir="ltr"] .hero-dashboard-angled {
    transform: none !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), 0 0 20px rgba(0, 212, 255, 0.1) !important;
  }

  .hero-mobile-angled {
    transform: none !important;
    width: 130px;
    max-width: 38%;
    height: 230px;
    bottom: -10px;
    right: 4px !important;
    left: auto !important;
    border-radius: 16px;
    border-width: 3px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.8) !important;
  }

  html[dir="ltr"] .hero-mobile-angled {
    transform: none !important;
    right: 4px !important;
    left: auto !important;
    bottom: -10px;
  }

  /* Hide connection lines that project out of canvas */
  .animated-flow-line, .glow-node {
    display: none !important;
  }

  /* Trust Bar Badges */
  .trust-bar-container {
    gap: 8px !important;
  }

  /* WhatsApp Simulator */
  .wa-phone-frame {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    min-height: 480px;
    max-height: 72vh;
    border-radius: 28px !important;
    border-width: 5px !important;
  }

  .wa-header {
    flex-wrap: wrap;
    gap: 8px;
  }

  .wa-header #waResetBtn {
    font-size: 10px !important;
    padding: 4px 8px !important;
  }

  .wa-simulator-box {
    border-radius: 18px !important;
    max-width: 100% !important;
    width: 100% !important;
  }

  .roi-slider-label {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 4px !important;
  }

  .glass-card {
    padding: 1.25rem !important;
  }

  .modal-form-grid {
    grid-template-columns: 1fr !important;
  }

  .badge-pill {
    max-width: 100%;
    text-align: center;
    line-height: 1.4;
    white-space: normal;
  }

  .wa-bubble {
    max-width: 90% !important;
    font-size: 13px !important;
    line-height: 1.5 !important;
  }

  .wa-prompt-chip {
    font-size: 11px !important;
    padding: 6px 10px !important;
    white-space: normal !important;
    text-align: center;
  }

  .wa-input-container {
    padding: 8px 10px !important;
  }

  /* ROI Calculator Results */
  .roi-stat-box {
    padding: 14px 10px !important;
  }

  .roi-stat-number {
    font-size: 1.35rem !important;
  }

  /* Pricing Cards */
  .pricing-card {
    padding: 24px 18px !important;
    border-radius: 16px !important;
  }

  .pricing-badge {
    font-size: 10px !important;
    padding: 3px 12px !important;
    top: -12px !important;
  }

  /* Modal */
  .modal-card {
    padding: 24px 18px !important;
    width: 94% !important;
    max-height: 88vh !important;
    border-radius: 16px !important;
  }
}

/* Small Smart Phones (<= 480px) */
@media (max-width: 480px) {
  /* Typography scale */
  h1 {
    font-size: 1.75rem !important;
    line-height: 1.3 !important;
  }

  h2 {
    font-size: 1.4rem !important;
    line-height: 1.35 !important;
  }

  p {
    font-size: 0.875rem !important;
  }

  /* Hero Section */
  .hero-mobile-angled {
    width: 110px;
    height: 195px;
    bottom: -6px;
    right: 2px !important;
    border-radius: 12px;
    border-width: 2.5px;
  }

  /* Action buttons */
  .btn-primary, .btn-secondary {
    font-size: 13px !important;
    padding: 10px 18px !important;
  }

  /* Badge pill */
  .badge-pill {
    font-size: 10.5px !important;
    padding: 5px 12px !important;
  }

  /* Sector tabs */
  [data-sector-tab] {
    font-size: 11px !important;
    padding: 5px 10px !important;
  }

  .roi-stat-box {
    min-width: 0;
  }

  .roi-stat-number {
    font-size: 1.15rem !important;
    word-break: break-word;
  }

  .hero-stats-grid {
    gap: 8px !important;
  }

  .hero-stats-grid .text-2xl {
    font-size: 1.25rem !important;
  }

  .hero-stats-grid .text-xs {
    font-size: 10px !important;
    line-height: 1.35;
  }
}

/* Very narrow screens */
@media (max-width: 360px) {
  .roi-results-grid {
    grid-template-columns: 1fr !important;
  }

  .wa-phone-frame {
    min-height: 420px;
    border-radius: 22px !important;
  }
}


