/* ========================================
   ORION SOFT SYSTEMS - Global Styles
   SaaS Platform v2.0
   ======================================== */

/* --- CSS Variables --- */
:root {
  --bg-primary: #0d0d1a;
  --bg-secondary: #13131f;
  --bg-card: #13131f;
  --bg-card-hover: #1a1a2e;
  --text-primary: #e8e8f0;
  --text-secondary: #c8c8d8;
  --text-muted: #7a7a9a;
  --accent-blue: #F5A623;
  --accent-purple: #FFB84D;
  --accent-gradient: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
  --border-color: rgba(245, 166, 35, 0.18);
  --shadow-glow: 0 0 40px rgba(245, 166, 35, 0.15);
  --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.3);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --transition-fast: 0.2s ease;
  --transition-base: 0.3s ease;
  --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --container-width: 1200px;
  --success: #4caf50;
  --error: #e53935;
  --whatsapp: #25D366;
  --focus-ring: rgba(245, 166, 35, 0.45);
}

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

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

body {
  font-family: var(--font-primary);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color var(--transition-fast);
}

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

ul {
  list-style: none;
}

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

h1 { font-size: clamp(2.5rem, 5vw, 4rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: clamp(1.5rem, 3vw, 2rem); }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }

p {
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

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

.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.text-success { color: var(--success); }
.text-error { color: var(--error); }

/* --- Container --- */
.container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* --- Section Spacing --- */
.section {
  padding: 6rem 0;
}

.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 4rem;
}

.section-header p {
  font-size: 1.125rem;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 2rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  border: none;
  transition: all var(--transition-base);
  text-align: center;
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent-gradient);
  color: #0d0d1a;
  box-shadow: 0 4px 20px rgba(245, 166, 35, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(245, 166, 35, 0.4);
  background: linear-gradient(135deg, #FFB84D, #F5A623);
}

.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border: 2px solid var(--border-color);
}

.btn-secondary:hover {
  border-color: var(--accent-blue);
  background: rgba(245, 166, 35, 0.1);
}

.btn-whatsapp {
  background: var(--whatsapp);
  color: white;
  box-shadow: 0 4px 20px rgba(37, 211, 102, 0.3);
}

.btn-whatsapp:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(37, 211, 102, 0.4);
}

.btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

/* --- Cards --- */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2rem;
  transition: all var(--transition-base);
}

.card:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent-blue);
  transform: translateY(-4px);
  box-shadow: var(--shadow-glow);
}

/* --- Grid --- */
.grid {
  display: grid;
  gap: 2rem;
}

.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }

/* --- Navigation --- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(13, 13, 26, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  padding: 1rem 0;
  transition: all var(--transition-base);
}

.navbar.scrolled {
  padding: 0.75rem 0;
  box-shadow: var(--shadow-card);
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.navbar-brand {
  font-size: 1.5rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-primary);
}

.navbar-brand .logo-icon {
  width: 36px;
  height: 36px;
  background: var(--accent-gradient);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.navbar-menu {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.navbar-menu a {
  color: var(--text-secondary);
  font-weight: 500;
  position: relative;
  font-size: 0.95rem;
}

.navbar-menu a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent-gradient);
  transition: width var(--transition-base);
}

.navbar-menu a:hover,
.navbar-menu a.active {
  color: var(--text-primary);
}

.navbar-menu a:hover::after,
.navbar-menu a.active::after {
  width: 100%;
}

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

.lang-switcher-btn {
  background: rgba(245, 166, 35, 0.1);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  transition: all var(--transition-fast);
}

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

.lang-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.5rem;
  min-width: 160px;
  display: none;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
  z-index: 100;
  box-shadow: var(--shadow-card);
}

.lang-dropdown.active {
  display: block;
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.lang-option {
  display: block;
  width: 100%;
  padding: 0.5rem 0.75rem;
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  text-align: left;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  transition: all var(--transition-fast);
}

.lang-option:hover,
.lang-option.active {
  background: rgba(245, 166, 35, 0.1);
  color: var(--accent-blue);
}

.mobile-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 0.5rem;
  background: none;
  border: none;
}

.mobile-toggle span {
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  transition: all var(--transition-base);
}

.mobile-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.mobile-toggle.active span:nth-child(2) {
  opacity: 0;
}

.mobile-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* --- Hero Section --- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-top: 80px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, rgba(245, 166, 35, 0.06) 0%, transparent 70%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
  margin: 0 auto;
}

.hero h1 {
  margin-bottom: 1.5rem;
}

.hero p {
  font-size: 1.25rem;
  margin-bottom: 2.5rem;
}

/* --- Trust Strip --- */
.trust-strip {
  padding: 3rem 0;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

.trust-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  text-align: center;
}

.trust-item h3 {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
  color: var(--accent-blue);
}

.trust-item p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* --- Tech Stack --- */
.tech-stack {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 2rem;
}

.tech-icon {
  width: 50px;
  height: 50px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  color: var(--text-secondary);
  transition: all var(--transition-base);
}

.tech-icon:hover {
  border-color: var(--accent-blue);
  color: var(--accent-blue);
  transform: translateY(-2px);
}

/* --- Feature Cards --- */
.feature-icon {
  width: 60px;
  height: 60px;
  background: var(--accent-gradient);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
}

.card h4 {
  margin-bottom: 0.75rem;
}

/* --- Why Choose Us --- */
.why-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.why-item {
  display: flex;
  gap: 1rem;
}

.why-icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  background: rgba(245, 166, 35, 0.1);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-blue);
  font-size: 1.25rem;
}

/* --- Project Cards --- */
.project-card {
  position: relative;
  overflow: hidden;
}

.project-card .project-tag {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background: rgba(245, 166, 35, 0.1);
  color: var(--accent-blue);
  border-radius: 20px;
  font-size: 0.85rem;
  margin-bottom: 1rem;
}

.project-card .result {
  color: var(--success);
  font-weight: 600;
}

/* --- Pricing --- */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  max-width: 1100px;
  margin: 0 auto;
}

.pricing-card {
  text-align: center;
  position: relative;
}

.pricing-card.featured {
  border-color: var(--accent-blue);
  box-shadow: var(--shadow-glow);
  transform: scale(1.02);
}

.pricing-card .badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent-gradient);
  color: #0d0d1a;
  padding: 0.25rem 1rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 700;
}

.pricing-card .price {
  font-size: 3rem;
  font-weight: 800;
  margin: 1rem 0;
  color: var(--text-primary);
}

.pricing-card .price span {
  font-size: 1rem;
  color: var(--text-muted);
  font-weight: 400;
}

.pricing-card ul {
  text-align: left;
  margin: 1.5rem 0;
}

.pricing-card ul li {
  padding: 0.5rem 0;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.pricing-card ul li::before {
  content: '✓';
  color: var(--success);
  font-weight: bold;
}

/* --- Process Steps --- */
.process-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  counter-reset: step;
}

.step {
  text-align: center;
  position: relative;
  counter-increment: step;
}

.step::before {
  content: counter(step);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  background: var(--accent-gradient);
  border-radius: 50%;
  font-size: 1.5rem;
  font-weight: 800;
  color: #0d0d1a;
  margin: 0 auto 1.5rem;
}

/* --- Forms --- */
.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.form-control {
  width: 100%;
  padding: 0.875rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font-primary);
  font-size: 1rem;
  transition: all var(--transition-fast);
}

.form-control::placeholder {
  color: var(--text-muted);
}

.form-control:focus {
  outline: none;
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 3px var(--focus-ring);
}

textarea.form-control {
  min-height: 150px;
  resize: vertical;
}

select.form-control {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%237a7a9a' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}

select.form-control option {
  background: var(--bg-card);
  color: var(--text-primary);
}

/* --- Footer --- */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding: 4rem 0 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-brand p {
  margin-top: 1rem;
  max-width: 300px;
}

.footer-links h5 {
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.footer-links a {
  display: block;
  padding: 0.35rem 0;
  color: var(--text-muted);
}

.footer-links a:hover {
  color: var(--accent-blue);
}

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

.footer-bottom p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin: 0;
}

/* --- WhatsApp Floating Button --- */
.whatsapp-float {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  width: 56px;
  height: 56px;
  background: var(--whatsapp);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
  z-index: 999;
  transition: all var(--transition-base);
}

.whatsapp-float:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 30px rgba(37, 211, 102, 0.5);
}

.whatsapp-float svg {
  width: 28px;
  height: 28px;
  fill: white;
}

/* --- Chat Widget --- */
.chat-widget {
  position: fixed;
  bottom: 5.5rem;
  right: 1.5rem;
  z-index: 997;
}

/* --- Page Header (Inner Pages) --- */
.page-header {
  padding: 10rem 0 4rem;
  text-align: center;
  position: relative;
}

/* --- RTL Support (Arabic) --- */
[dir="rtl"] body {
  direction: rtl;
  text-align: right;
}

[dir="rtl"] .navbar .container {
  flex-direction: row-reverse;
}

[dir="rtl"] .navbar-menu a::after {
  left: auto;
  right: 0;
}

[dir="rtl"] .footer-grid {
  direction: rtl;
}

[dir="rtl"] .lang-dropdown {
  right: auto;
  left: 0;
}

[dir="rtl"] .whatsapp-float {
  right: auto;
  left: 1.5rem;
}

[dir="rtl"] .chat-widget {
  right: auto;
  left: 1.5rem;
}

[dir="rtl"] .chat-window {
  right: auto;
  left: 0;
}

[dir="rtl"] .chat-message.bot {
  border-bottom-left-radius: var(--radius-md);
  border-bottom-right-radius: 4px;
}

[dir="rtl"] .chat-message.user {
  border-bottom-right-radius: var(--radius-md);
  border-bottom-left-radius: 4px;
}

[dir="rtl"] .faq-question::after {
  margin-left: auto;
  margin-right: 0;
}

[dir="rtl"] .form-control {
  text-align: right;
}

[dir="rtl"] .mobile-toggle {
  flex-direction: row-reverse;
}

[dir="rtl"] .trust-grid,
[dir="rtl"] .grid-2,
[dir="rtl"] .grid-3,
[dir="rtl"] .grid-4,
[dir="rtl"] .why-grid,
[dir="rtl"] .pricing-grid,
[dir="rtl"] .process-steps {
  direction: rtl;
}

[dir="rtl"] select.form-control {
  background-position: left 1rem center;
  padding-right: 1rem;
  padding-left: 2.5rem;
}

[dir="rtl"] .navbar-brand .logo-icon {
  margin-left: 0.5rem;
  margin-right: 0;
}

.page-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(245, 166, 35, 0.06) 0%, transparent 70%);
  pointer-events: none;
}

.page-header p {
  font-size: 1.25rem;
  max-width: 600px;
  margin: 0 auto;
}

/* --- Animations --- */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- Loading Animation --- */
.page-loader {
  position: fixed;
  inset: 0;
  background: var(--bg-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

.page-loader.hidden {
  opacity: 0;
  visibility: hidden;
}

.loader-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border-color);
  border-top-color: var(--accent-blue);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* --- Sticky CTA --- */
.sticky-cta {
  position: fixed;
  bottom: 6rem;
  right: 2rem;
  z-index: 998;
  opacity: 0;
  transform: translateY(20px);
  transition: all var(--transition-base);
  pointer-events: none;
}

.sticky-cta.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: all;
}

/* --- CTA Section --- */
.cta-section {
  text-align: center;
  padding: 6rem 0;
  background: linear-gradient(180deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
  position: relative;
}

.cta-section::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(245, 166, 35, 0.06) 0%, transparent 70%);
  pointer-events: none;
}

.cta-section h2 {
  margin-bottom: 1.5rem;
  position: relative;
  z-index: 2;
}

.cta-section .btn-group {
  position: relative;
  z-index: 2;
}

/* --- Use Cases --- */
.use-case {
  padding: 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
}

.use-case h5 {
  color: var(--accent-blue);
  margin-bottom: 0.5rem;
}

/* --- Chat Widget --- */
.chat-widget {
  position: fixed;
  bottom: 6rem;
  right: 2rem;
  z-index: 997;
}

.chat-toggle-btn {
  width: 56px;
  height: 56px;
  background: var(--accent-gradient);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(245, 166, 35, 0.3);
  transition: all var(--transition-base);
}

.chat-toggle-btn:hover {
  transform: scale(1.1);
}

.chat-toggle-btn svg {
  width: 24px;
  height: 24px;
  fill: #0d0d1a;
}

.chat-window {
  position: absolute;
  bottom: 70px;
  right: 0;
  width: 380px;
  max-height: 500px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px) scale(0.95);
  transition: all var(--transition-base);
}

.chat-window.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.chat-header {
  padding: 1rem 1.25rem;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.chat-header h5 {
  margin: 0;
  font-size: 1rem;
}

.chat-header .status {
  font-size: 0.8rem;
  color: var(--success);
}

.chat-messages {
  flex: 1;
  padding: 1rem;
  overflow-y: auto;
  max-height: 340px;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.chat-message {
  max-width: 85%;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  line-height: 1.5;
}

.chat-message.bot {
  background: var(--bg-secondary);
  color: var(--text-secondary);
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}

.chat-message.user {
  background: var(--accent-gradient);
  color: #0d0d1a;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}

.chat-message.typing {
  display: flex;
  gap: 4px;
  padding: 0.75rem 1rem;
}

.typing-dot {
  width: 8px;
  height: 8px;
  background: var(--text-muted);
  border-radius: 50%;
  animation: typingBounce 1s ease infinite;
}

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

@keyframes typingBounce {
  0%, 60%, 100% { transform: translateY(0); }
  30% { transform: translateY(-6px); }
}

.chat-input {
  display: flex;
  border-top: 1px solid var(--border-color);
  padding: 0.75rem;
  gap: 0.5rem;
}

.chat-input input {
  flex: 1;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.75rem;
  color: var(--text-primary);
  font-size: 0.9rem;
  outline: none;
}

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

.chat-input button {
  background: var(--accent-gradient);
  border: none;
  border-radius: var(--radius-sm);
  padding: 0.6rem 1rem;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.85rem;
  color: #0d0d1a;
  transition: all var(--transition-fast);
}

.chat-input button:hover {
  opacity: 0.9;
}

/* --- Chat Voice Button --- */
.chat-voice-btn {
  width: 36px;
  height: 36px;
  min-width: 36px;
  background: none;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.chat-voice-btn:hover {
  border-color: var(--accent-blue);
  color: var(--accent-blue);
}

.chat-voice-btn.recording {
  background: #e53935;
  border-color: #e53935;
  color: white;
  animation: pulse-recording 1s ease infinite;
}

@keyframes pulse-recording {
  0%, 100% { box-shadow: 0 0 0 0 rgba(229, 57, 53, 0.4); }
  50% { box-shadow: 0 0 0 8px rgba(229, 57, 53, 0); }
}

/* --- Speak Button (TTS) --- */
.speak-btn {
  margin-top: 0.5rem;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.25rem;
  opacity: 0.6;
  transition: all var(--transition-fast);
  display: inline-flex;
  align-items: center;
}

.speak-btn:hover {
  opacity: 1;
  color: var(--accent-blue);
}

/* --- Sentiment Indicator --- */
.sentiment-indicator {
  display: inline-block;
  margin-left: 0.5rem;
  font-size: 1rem;
}

[dir="rtl"] .sentiment-indicator {
  margin-left: 0;
  margin-right: 0.5rem;
}

/* --- Chat Input Flex Layout --- */
.chat-input {
  display: flex;
  align-items: center;
  border-top: 1px solid var(--border-color);
  padding: 0.5rem;
  gap: 0.35rem;
}

.chat-input input {
  flex: 1;
  min-width: 0;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.6rem;
  color: var(--text-primary);
  font-size: 0.85rem;
  outline: none;
}

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

.chat-input button#chatSend {
  background: var(--accent-gradient);
  border: none;
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.75rem;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.8rem;
  color: #0d0d1a;
  transition: all var(--transition-fast);
}

.chat-input button#chatSend:hover {
  opacity: 0.9;
}

/* --- FAQ Accordion --- */
.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  margin-bottom: 1rem;
  overflow: hidden;
  transition: all var(--transition-base);
}

.faq-item:hover {
  border-color: rgba(245, 166, 35, 0.3);
}

.faq-question {
  width: 100%;
  padding: 1.25rem;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.faq-question::after {
  content: '+';
  font-size: 1.5rem;
  color: var(--accent-blue);
  transition: transform var(--transition-base);
  flex-shrink: 0;
}

.faq-item.open .faq-question::after {
  transform: rotate(45deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition-base);
}

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

.faq-answer p {
  padding: 0 1.25rem 1.25rem;
  margin: 0;
}

/* --- Stat Highlight --- */
.stat-highlight {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2rem;
  text-align: center;
}

.stat-highlight .number {
  font-size: 3rem;
  font-weight: 800;
  color: var(--accent-blue);
  margin-bottom: 0.5rem;
}

/* --- Badge --- */
.badge {
  display: inline-block;
  padding: 0.35rem 1rem;
  background: rgba(245, 166, 35, 0.1);
  border: 1px solid var(--border-color);
  border-radius: 50px;
  color: var(--accent-blue);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* --- Guarantee Box --- */
.guarantee-box {
  background: rgba(76, 175, 80, 0.08);
  border: 1px solid rgba(76, 175, 80, 0.2);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  text-align: center;
  margin-top: 2rem;
}

.guarantee-box p {
  color: var(--success);
  margin: 0;
  font-weight: 500;
}

/* ========================================
   RESPONSIVE + MOBILE-FIRST OPTIMIZATION
   ======================================== */

/* --- Tablet (992px) --- */
@media (max-width: 992px) {
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .pricing-card.featured {
    transform: none;
  }

  .hero h1 {
    font-size: clamp(2rem, 4vw, 3rem);
  }

  .why-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* --- Mobile Large (768px) --- */
@media (max-width: 768px) {
  .section {
    padding: 3rem 0;
  }

  .section-header {
    margin-bottom: 2.5rem;
  }

  h2 {
    font-size: 1.75rem;
  }

  /* Mobile menu - slide down animation */
  .navbar-menu {
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-secondary);
    flex-direction: column;
    padding: 2rem 1.5rem;
    gap: 0;
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease, visibility 0.3s;
    border-bottom: 1px solid var(--border-color);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    z-index: 998;
  }

  .navbar-menu.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .navbar-menu > a,
  .navbar-menu > span {
    display: block;
    padding: 0.875rem 0;
    border-bottom: 1px solid rgba(245, 166, 35, 0.08);
    font-size: 1.05rem;
  }

  .navbar-menu > a:last-child,
  .navbar-menu > span:last-child {
    border-bottom: none;
  }

  .mobile-toggle {
    display: flex;
    /* 44px minimum touch target */
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
  }

  .mobile-toggle span {
    width: 22px;
    height: 2px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
    gap: 0.5rem;
  }

  .pricing-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .grid-3, .grid-4 {
    grid-template-columns: 1fr;
  }

  .grid-2 {
    grid-template-columns: 1fr;
  }

  .chat-window {
    width: calc(100vw - 1rem);
    right: -0.5rem;
    max-height: 70vh;
  }

  .chat-widget {
    bottom: 5rem;
    right: 1rem;
  }

  .whatsapp-float {
    bottom: 1.25rem;
    right: 1.25rem;
    width: 52px;
    height: 52px;
  }

  .whatsapp-float svg {
    width: 26px;
    height: 26px;
  }

  .lang-switcher {
    width: 100%;
  }

  .lang-switcher-btn {
    width: 100%;
    justify-content: center;
  }

  .lang-dropdown {
    position: static;
    width: 100%;
    opacity: 1;
    visibility: visible;
    transform: none;
    display: none;
    margin-top: 0.5rem;
    box-shadow: none;
    border: 1px solid var(--border-color);
  }

  .lang-dropdown.active {
    display: block;
  }

  /* 44px minimum touch targets for mobile */
  .lang-option {
    min-height: 44px;
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
  }

  .faq-question {
    min-height: 48px;
    padding: 1rem;
  }

  .why-item {
    flex-direction: column;
    text-align: center;
    align-items: center;
  }

  .process-steps {
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
  }

  .trust-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
  }

  .trust-item h3 {
    font-size: 1.75rem;
  }

  .form-control {
    min-height: 44px;
    font-size: 16px; /* Prevents iOS zoom on focus */
  }

  select.form-control {
    min-height: 44px;
  }

  textarea.form-control {
    min-height: 120px;
  }

  .btn {
    min-height: 44px;
    padding: 0.75rem 1.5rem;
  }

  .btn-sm {
    min-height: 36px;
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
  }
}

/* --- Mobile Small (480px) --- */
@media (max-width: 480px) {
  .section {
    padding: 2.5rem 0;
  }

  .container {
    padding: 0 1rem;
  }

  .hero {
    padding-top: 70px;
    min-height: 90vh;
  }

  .hero h1 {
    font-size: 1.75rem;
    line-height: 1.3;
  }

  .hero p {
    font-size: 1rem;
  }

  .btn {
    width: 100%;
    min-height: 48px; /* Larger touch target on small screens */
    font-size: 1rem;
  }

  .btn-group {
    flex-direction: column;
    gap: 0.75rem;
  }

  .btn-group .btn {
    width: 100%;
  }

  h1 { font-size: 1.75rem; }
  h2 { font-size: 1.5rem; }
  h3 { font-size: 1.25rem; }

  .page-header {
    padding: 7rem 0 2.5rem;
  }

  .page-header h1 {
    font-size: 1.5rem;
  }

  .process-steps {
    grid-template-columns: 1fr;
  }

  .trust-grid {
    grid-template-columns: 1fr 1fr;
  }

  .trust-item h3 {
    font-size: 1.5rem;
  }

  .tech-stack {
    gap: 0.75rem;
  }

  .tech-icon {
    width: 44px;
    height: 44px;
    min-width: 44px;
  }

  .sticky-cta {
    bottom: 5rem;
    right: 1rem;
    left: 1rem;
  }

  .sticky-cta .btn {
    width: 100%;
    min-height: 48px;
  }

  .whatsapp-float {
    bottom: 1rem;
    right: 1rem;
    width: 48px;
    height: 48px;
  }

  .whatsapp-float svg {
    width: 24px;
    height: 24px;
  }

  .chat-widget {
    bottom: 4.5rem;
    right: 1rem;
    left: auto;
  }

  .chat-toggle-btn {
    width: 48px;
    height: 48px;
    min-width: 48px;
    min-height: 48px;
  }

  .chat-window {
    width: calc(100vw - 0.5rem);
    right: -0.25rem;
    bottom: 0;
    max-height: 80vh;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  }

  .chat-voice-btn {
    width: 44px;
    height: 44px;
    min-width: 44px;
  }

  .chat-input input {
    min-height: 44px;
  }

  .chat-input button#chatSend {
    min-height: 44px;
    min-width: 44px;
    padding: 0.5rem 1rem;
  }

  .card {
    padding: 1.5rem;
  }

  .stat-card, .dash-card {
    padding: 1.25rem;
  }

  .auth-card {
    padding: 1.5rem;
  }

  .navbar-brand {
    font-size: 1.1rem;
  }

  .navbar-brand .logo-icon {
    width: 32px;
    height: 32px;
  }

  .pricing-card .price {
    font-size: 2.25rem;
  }

  .footer-grid {
    gap: 1.5rem;
  }
}

/* --- Very Small Screens (360px) --- */
@media (max-width: 360px) {
  .container {
    padding: 0 0.75rem;
  }

  .hero h1 {
    font-size: 1.5rem;
  }

  .trust-grid {
    grid-template-columns: 1fr;
  }

  .stat-card .value {
    font-size: 1.5rem;
  }
}

/* ========================================
   SENSELAB-GRADE ANIMATIONS
   ======================================== */

/* --- Page entrance animations --- */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-40px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(40px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes shimmer {
  0% { background-position: -200% center; }
  100% { background-position: 200% center; }
}

@keyframes glowPulse {
  0%, 100% { box-shadow: 0 0 5px rgba(245, 166, 35, 0.2); }
  50% { box-shadow: 0 0 20px rgba(245, 166, 35, 0.4), 0 0 40px rgba(245, 166, 35, 0.1); }
}

/* Staggered card animations */
.grid-2 > *, .grid-3 > *, .grid-4 > * {
  animation: fadeUp 0.6s ease backwards;
}

.grid-2 > *:nth-child(1), .grid-3 > *:nth-child(1), .grid-4 > *:nth-child(1) { animation-delay: 0.1s; }
.grid-2 > *:nth-child(2), .grid-3 > *:nth-child(2), .grid-4 > *:nth-child(2) { animation-delay: 0.2s; }
.grid-3 > *:nth-child(3), .grid-4 > *:nth-child(3) { animation-delay: 0.3s; }
.grid-4 > *:nth-child(4) { animation-delay: 0.4s; }

/* --- Button shimmer on hover --- */
.btn-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  background-size: 200% 100%;
  opacity: 0;
  transition: opacity 0.3s;
  border-radius: inherit;
}

.btn-primary {
  position: relative;
  overflow: hidden;
}

.btn-primary:hover::before {
  opacity: 1;
  animation: shimmer 1.5s infinite;
}

/* --- Card hover polish --- */
.card {
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.25s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.25s ease;
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 40px rgba(245, 166, 35, 0.15);
}

/* --- Nav link smooth hover --- */
.navbar-menu > a {
  position: relative;
  transition: color 0.2s ease;
}

.navbar-menu > a:hover {
  color: var(--text-primary);
}

/* --- Focus ring animation --- */
.form-control {
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

/* --- Logo subtle pulse --- */
.navbar-brand .logo-icon {
  animation: glowPulse 3s ease infinite;
}

/* --- CTA button glow ring --- */
.hero .btn-primary {
  animation: glowPulse 2s ease infinite;
}

/* --- Smooth link colour transition --- */
.footer-links a {
  transition: color 0.15s ease, transform 0.15s ease;
}

.footer-links a:hover {
  transform: translateX(4px);
}

[dir="rtl"] .footer-links a:hover {
  transform: translateX(-4px);
}

/* --- Reduced motion --- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .grid-2 > *, .grid-3 > *, .grid-4 > * {
    animation: none;
  }
  .hero .btn-primary {
    animation: none;
  }
  .navbar-brand .logo-icon {
    animation: none;
  }
}
