/* ============================================================
   AKAKOS — Main Stylesheet
   Modern Dark Tech Theme with Glass Morphism
   ============================================================ */

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

/* ---------- CSS Variables ---------- */
:root {
  --bg-primary: #06091A;
  --bg-secondary: #0C1229;
  --bg-card: rgba(255, 255, 255, 0.04);
  --bg-card-hover: rgba(255, 255, 255, 0.07);
  --color-primary: #4F6EF7;
  --color-secondary: #8B5CF6;
  --color-accent: #06D6A0;
  --color-danger: #EF4444;
  --color-success: #10B981;
  --gradient-primary: linear-gradient(135deg, #4F6EF7 0%, #8B5CF6 100%);
  --gradient-accent: linear-gradient(135deg, #4F6EF7 0%, #06D6A0 100%);
  --gradient-hero: radial-gradient(ellipse at 50% 0%, rgba(79, 110, 247, 0.25) 0%, transparent 70%),
                   radial-gradient(ellipse at 80% 80%, rgba(139, 92, 246, 0.15) 0%, transparent 60%),
                   linear-gradient(180deg, #06091A 0%, #0C1229 100%);
  --text-primary: #F1F5F9;
  --text-secondary: #94A3B8;
  --text-muted: #64748B;
  --border-color: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(79, 110, 247, 0.4);
  --shadow-card: 0 4px 30px rgba(0, 0, 0, 0.3);
  --shadow-glow: 0 0 40px rgba(79, 110, 247, 0.2);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 32px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --font-latin: 'Inter', sans-serif;
  --font-arabic: 'Cairo', sans-serif;
  --nav-height: 72px;
}

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

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

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

/* Lock page scroll when mobile menu is open */
body.menu-open {
  overflow: hidden;
}

/* Arabic font */
[lang="ar"] body,
body.lang-ar {
  font-family: var(--font-arabic);
  direction: rtl;
}

body.lang-ar * {
  font-family: var(--font-arabic);
}

/* Fix: Font Awesome icons must keep their own font-family */
body.lang-ar i,
body.lang-ar .fa-solid,
body.lang-ar .fa-regular,
body.lang-ar .fa-brands,
body.lang-ar .fas,
body.lang-ar .far,
body.lang-ar .fab,
body.lang-ar [class*="fa-"] {
  font-family: "Font Awesome 6 Free" !important;
}
body.lang-ar .fa-brands,
body.lang-ar .fab {
  font-family: "Font Awesome 6 Brands" !important;
}
body.lang-ar .fa-regular,
body.lang-ar .far {
  font-family: "Font Awesome 6 Free" !important;
  font-weight: 400;
}
body.lang-ar .fa-solid,
body.lang-ar .fas {
  font-family: "Font Awesome 6 Free" !important;
  font-weight: 900;
}

img { max-width: 100%; height: auto; display: block; }
a  { text-decoration: none; color: inherit; }
ul { list-style: none; }

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--color-primary); border-radius: 3px; }

/* ---------- Selection ---------- */
::selection { background: rgba(79, 110, 247, 0.3); color: #fff; }

/* ============================================================
   TYPOGRAPHY
   ============================================================ */
.section-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: 16px;
}

.section-label::before,
.section-label::after {
  content: '';
  display: block;
  width: 24px;
  height: 1px;
  background: var(--color-primary);
  opacity: 0.6;
}

.section-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
}

.section-subtitle {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 580px;
  line-height: 1.75;
}

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

/* ============================================================
   LAYOUT UTILITIES
   ============================================================ */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 100px 0;
}

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

.section-header .section-subtitle {
  margin: 0 auto;
}

.text-center { text-align: center; }
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.grid { display: grid; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  position: relative;
  overflow: hidden;
  white-space: nowrap;
}

.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.3s;
  background: rgba(255, 255, 255, 0.1);
}

.btn:hover::after { opacity: 1; }

.btn-primary {
  background: var(--gradient-primary);
  color: #fff;
  box-shadow: 0 4px 20px rgba(79, 110, 247, 0.4);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(79, 110, 247, 0.5);
}

.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  backdrop-filter: blur(10px);
}

.btn-secondary:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
  background: var(--bg-card);
}

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

.btn-outline:hover {
  background: rgba(79, 110, 247, 0.1);
  transform: translateY(-2px);
}

.btn-sm { padding: 10px 20px; font-size: 0.875rem; }
.btn-lg { padding: 18px 36px; font-size: 1.05rem; }

.btn i { font-size: 1em; }

/* ============================================================
   NAVIGATION
   ============================================================ */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  transition: var(--transition);
}

.navbar.scrolled {
  background: rgba(6, 9, 26, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-color);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

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

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

.logo-icon {
  width: 42px;
  height: 42px;
  background: var(--gradient-primary);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: #fff;
  font-weight: 800;
  letter-spacing: -1px;
  box-shadow: 0 4px 15px rgba(79, 110, 247, 0.4);
  flex-shrink: 0;
}

.logo-text {
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  white-space: nowrap;
}

/* Nav Links */
.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-link {
  position: relative;
  padding: 8px 16px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  transition: var(--transition);
  cursor: pointer;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background: var(--gradient-primary);
  border-radius: 2px;
  transition: width 0.3s ease;
}

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

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

/* Nav Actions */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Language Switcher */
.lang-switcher {
  display: flex;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 40px;
  padding: 4px;
  gap: 2px;
}

.lang-btn {
  padding: 5px 12px;
  border-radius: 30px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--text-muted);
  transition: var(--transition);
  border: none;
  background: none;
  letter-spacing: 0.04em;
}

.lang-btn.active {
  background: var(--gradient-primary);
  color: #fff;
  box-shadow: 0 2px 8px rgba(79, 110, 247, 0.4);
}

.lang-btn:hover:not(.active) {
  color: var(--text-primary);
}

/* Mobile Menu Button */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  transition: var(--transition);
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: var(--transition);
}

.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile Nav */
.nav-mobile {
  display: none;
  position: fixed;
  top: var(--nav-height);
  left: 0;
  right: 0;
  background: rgba(6, 9, 26, 0.97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-color);
  padding: 20px 24px 32px;
  z-index: 999;
  transform: translateY(calc(-100% - 18px));
  will-change: transform;
  transition: transform 0.28s cubic-bezier(0.22, 0.61, 0.36, 1), opacity 0.22s ease;
  max-height: calc(100vh - var(--nav-height));
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.nav-mobile.open {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.nav-mobile-links {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 24px;
}

.nav-mobile-link {
  padding: 12px 16px;
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
}

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

/* ============================================================
   HERO SECTION
   ============================================================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--gradient-hero);
}

/* Animated Background */
.hero-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

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

.hero-orb-1 {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(79, 110, 247, 0.18) 0%, transparent 70%);
  top: -200px;
  left: -100px;
  animation-delay: 0s;
}

.hero-orb-2 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.15) 0%, transparent 70%);
  bottom: -100px;
  right: -100px;
  animation-delay: -3s;
}

.hero-orb-3 {
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(6, 214, 160, 0.1) 0%, transparent 70%);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation-delay: -6s;
}

/* Grid lines */
.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(79, 110, 247, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(79, 110, 247, 0.04) 1px, transparent 1px);
  background-size: 60px 60px;
}

/* Floating particles */
.hero-particles {
  position: absolute;
  inset: 0;
}

.particle {
  position: absolute;
  width: 2px;
  height: 2px;
  background: rgba(79, 110, 247, 0.5);
  border-radius: 50%;
  animation: particleFloat linear infinite;
}

/* Hero Content */
.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 860px;
  padding: 0 24px;
  padding-top: var(--nav-height);
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  background: rgba(79, 110, 247, 0.12);
  border: 1px solid rgba(79, 110, 247, 0.25);
  border-radius: 40px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--color-primary);
  letter-spacing: 0.05em;
  margin-bottom: 28px;
  animation: fadeInDown 0.8s ease both;
}

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

.hero-title {
  font-size: clamp(3rem, 7vw, 5.5rem);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 24px;
  animation: fadeInUp 0.8s ease 0.2s both;
}

.hero-title .line1 {
  display: block;
  color: var(--text-primary);
}

.hero-title .line2 {
  display: block;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-description {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto 40px;
  line-height: 1.8;
  animation: fadeInUp 0.8s ease 0.4s both;
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  animation: fadeInUp 0.8s ease 0.6s both;
}

.hero-scroll {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  animation: fadeInUp 0.8s ease 1s both;
}

.scroll-indicator {
  width: 24px;
  height: 40px;
  border: 1.5px solid var(--text-muted);
  border-radius: 12px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 6px;
}

.scroll-dot {
  width: 4px;
  height: 8px;
  background: var(--color-primary);
  border-radius: 2px;
  animation: scrollBounce 2s ease infinite;
}

/* Tech stack strip */
.hero-tech {
  margin-top: 64px;
  animation: fadeInUp 0.8s ease 0.8s both;
}

.hero-tech-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.hero-tech-icons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
}

.tech-icon-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  color: var(--text-secondary);
  transition: var(--transition);
}

.tech-icon-item:hover {
  border-color: var(--border-hover);
  color: var(--text-primary);
  transform: translateY(-2px);
}

.tech-icon-item i {
  font-size: 1rem;
  color: var(--color-primary);
}

/* ============================================================
   ABOUT SECTION
   ============================================================ */
.about {
  background: var(--bg-primary);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.about-content .section-subtitle {
  margin-bottom: 32px;
}

.about-description {
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 16px;
  font-size: 1rem;
}

.about-features {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 28px;
}

.about-feature-item {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.about-feature-item i {
  color: var(--color-accent);
  font-size: 1rem;
  flex-shrink: 0;
}

/* Stats */
.about-visual {
  position: relative;
}

.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  text-align: center;
  position: relative;
  overflow: hidden;
  transition: var(--transition);
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-primary);
  opacity: 0;
  transition: opacity 0.3s;
}

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

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

.stat-number {
  font-size: 2.5rem;
  font-weight: 900;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  margin-bottom: 8px;
}

.stat-label {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 500;
  letter-spacing: 0.03em;
}

/* Visual decoration */
.about-decoration {
  position: absolute;
  top: -30px;
  right: -30px;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(79, 110, 247, 0.1) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

/* ============================================================
   SERVICES SECTION
   ============================================================ */
.services {
  background: var(--bg-secondary);
  position: relative;
  overflow: hidden;
}

.services::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(79, 110, 247, 0.3), transparent);
}

.services::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(79, 110, 247, 0.3), transparent);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.service-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 36px 28px;
  position: relative;
  overflow: hidden;
  transition: var(--transition);
  cursor: default;
}

.service-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gradient-primary);
  opacity: 0;
  transition: opacity 0.4s;
  z-index: 0;
}

.service-card:hover {
  border-color: transparent;
  transform: translateY(-6px);
  box-shadow: 0 20px 60px rgba(79, 110, 247, 0.2);
}

.service-card:hover::before { opacity: 0.05; }

.service-card > * { position: relative; z-index: 1; }

.service-icon-wrap {
  width: 60px;
  height: 60px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 24px;
  position: relative;
}

.service-icon-wrap.web {
  background: linear-gradient(135deg, rgba(79, 110, 247, 0.2), rgba(79, 110, 247, 0.05));
  color: var(--color-primary);
}

.service-icon-wrap.android {
  background: linear-gradient(135deg, rgba(6, 214, 160, 0.2), rgba(6, 214, 160, 0.05));
  color: var(--color-accent);
}

.service-icon-wrap.ios {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.2), rgba(139, 92, 246, 0.05));
  color: var(--color-secondary);
}

.service-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}

.service-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.75;
  margin-bottom: 24px;
}

.service-features {
  display: flex;
  flex-direction: column;
  gap: 10px;
  border-top: 1px solid var(--border-color);
  padding-top: 20px;
}

.service-feature {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.84rem;
  color: var(--text-secondary);
}

.service-feature i {
  font-size: 0.75rem;
  color: var(--color-accent);
  flex-shrink: 0;
}

/* ============================================================
   WHY US SECTION
   ============================================================ */
.why-us {
  background: var(--bg-primary);
}

.why-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.why-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.why-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-primary);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.why-card:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
  transform: translateY(-4px);
}

.why-card:hover::after { transform: scaleX(1); }

.why-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  background: rgba(79, 110, 247, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: var(--color-primary);
  margin-bottom: 16px;
}

.why-title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}

.why-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ============================================================
   PRODUCTS PREVIEW (Homepage)
   ============================================================ */
.products-preview {
  background: var(--bg-secondary);
  position: relative;
  overflow: hidden;
}

.products-grid-preview {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 48px;
}

.product-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
  cursor: default;
}

.product-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-6px);
  box-shadow: var(--shadow-card), 0 0 40px rgba(79, 110, 247, 0.1);
}

/* Mock App Screenshot */
.product-screenshot {
  height: 200px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-screenshot-bg {
  position: absolute;
  inset: 0;
}

.product-screenshot-icon {
  position: relative;
  z-index: 1;
  width: 70px;
  height: 70px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.product-info {
  padding: 20px 22px 22px;
}

.product-tags {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.product-tag {
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.tag-web    { background: rgba(79, 110, 247, 0.15); color: var(--color-primary); }
.tag-android { background: rgba(6, 214, 160, 0.15); color: var(--color-accent); }
.tag-ios    { background: rgba(139, 92, 246, 0.15); color: var(--color-secondary); }

.product-name {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}

.product-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 16px;
}

.product-links {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.product-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 600;
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  transition: var(--transition);
  background: var(--bg-primary);
}

.product-link:hover {
  border-color: var(--border-hover);
  color: var(--text-primary);
  background: rgba(79, 110, 247, 0.08);
}

.product-link i { font-size: 0.9rem; }

.products-cta {
  text-align: center;
}

/* ============================================================
   CONTACT SECTION
   ============================================================ */
.contact {
  background: var(--bg-primary);
  position: relative;
  overflow: hidden;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 60px;
  align-items: start;
}

/* Contact Info */
.contact-info-title {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}

.contact-info-desc {
  color: var(--text-secondary);
  line-height: 1.75;
  margin-bottom: 36px;
  font-size: 0.95rem;
}

.contact-items {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 36px;
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 16px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  transition: var(--transition);
}

.contact-item:hover {
  border-color: var(--border-hover);
  transform: translateX(4px);
}

.contact-item-icon {
  width: 40px;
  height: 40px;
  background: rgba(79, 110, 247, 0.1);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-primary);
  font-size: 1rem;
  flex-shrink: 0;
}

.contact-item-content {}

.contact-item-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.contact-item-value {
  font-size: 0.9rem;
  color: var(--text-primary);
  font-weight: 500;
}

/* Social Links */
.contact-social-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

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

.social-link {
  width: 40px;
  height: 40px;
  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: 1rem;
  color: var(--text-secondary);
  transition: var(--transition);
}

.social-link:hover {
  background: rgba(79, 110, 247, 0.15);
  border-color: var(--border-hover);
  color: var(--color-primary);
  transform: translateY(-3px);
}

/* Contact Form */
.contact-form-wrap {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 40px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
  letter-spacing: 0.02em;
}

.form-input,
.form-textarea,
.form-select {
  width: 100%;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.9rem;
  font-family: inherit;
  transition: var(--transition);
  outline: none;
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--text-muted);
}

.form-input:focus,
.form-textarea:focus {
  border-color: var(--color-primary);
  background: rgba(79, 110, 247, 0.05);
  box-shadow: 0 0 0 3px rgba(79, 110, 247, 0.1);
}

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

/* Form Success/Error */
.form-message {
  display: none;
  padding: 16px 20px;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 500;
  margin-top: 16px;
  align-items: center;
  gap: 10px;
}

.form-message.success {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #10B981;
}

.form-message.error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #EF4444;
}

.form-message.show { display: flex; }

.form-submit {
  width: 100%;
  margin-top: 8px;
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding-top: 64px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid var(--border-color);
}

.footer-brand .logo-text {
  font-size: 1.3rem;
}

.footer-tagline {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin: 12px 0 24px;
  max-width: 260px;
}

.footer-col-title {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-link {
  font-size: 0.88rem;
  color: var(--text-muted);
  transition: var(--transition);
  cursor: pointer;
}

.footer-link:hover {
  color: var(--color-primary);
  transform: translateX(3px);
  display: inline-block;
}

.footer-bottom {
  padding: 24px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-copyright {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.footer-copyright span {
  color: var(--color-primary);
  font-weight: 600;
}

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

.footer-legal-link {
  font-size: 0.82rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.2s;
}

.footer-legal-link:hover { color: var(--color-primary); }

/* ============================================================
   PRODUCTS PAGE
   ============================================================ */
.products-page-hero {
  padding: 140px 0 80px;
  text-align: center;
  background: var(--gradient-hero);
  position: relative;
  overflow: hidden;
}

.products-full-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.product-card-full {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
}

.product-card-full:hover {
  border-color: var(--border-hover);
  transform: translateY(-6px);
  box-shadow: var(--shadow-card), var(--shadow-glow);
}

.product-screenshot-full {
  height: 220px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ============================================================
   SCROLL ANIMATIONS
   ============================================================ */
[data-animate] {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

[data-animate="fade-up"] {
  opacity: 0;
  transform: translateY(30px);
}

[data-animate="fade-left"] {
  opacity: 0;
  transform: translateX(-30px);
}

[data-animate="fade-right"] {
  opacity: 0;
  transform: translateX(30px);
}

[data-animate="fade-in"] {
  opacity: 0;
  transform: scale(0.95);
}

[data-animate].is-visible {
  opacity: 1;
  transform: translate(0) scale(1);
}

[data-delay="100"] { transition-delay: 0.1s; }
[data-delay="200"] { transition-delay: 0.2s; }
[data-delay="300"] { transition-delay: 0.3s; }
[data-delay="400"] { transition-delay: 0.4s; }
[data-delay="500"] { transition-delay: 0.5s; }
[data-delay="600"] { transition-delay: 0.6s; }

/* ============================================================
   KEYFRAME ANIMATIONS
   ============================================================ */
@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-20px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

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

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

@keyframes scrollBounce {
  0%, 100% { transform: translateY(0); opacity: 1; }
  50%       { transform: translateY(8px); opacity: 0.4; }
}

@keyframes particleFloat {
  0%   { transform: translateY(100vh) scale(0); opacity: 0; }
  10%  { opacity: 1; }
  90%  { opacity: 1; }
  100% { transform: translateY(-100px) scale(1); opacity: 0; }
}

@keyframes gradientShift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes glowPulse {
  0%, 100% { box-shadow: 0 0 20px rgba(79, 110, 247, 0.3); }
  50%       { box-shadow: 0 0 40px rgba(79, 110, 247, 0.6); }
}

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

/* ============================================================
   RTL SUPPORT (Arabic)
   ============================================================ */
body.lang-ar {
  direction: rtl;
  text-align: right;
}

body.lang-ar .section-label::before,
body.lang-ar .section-label::after {
  /* Keep decorative lines */
}

body.lang-ar .about-feature-item {
  flex-direction: row-reverse;
  text-align: right;
}

body.lang-ar .contact-item {
  flex-direction: row-reverse;
}

body.lang-ar .contact-item:hover {
  transform: translateX(-4px);
}

body.lang-ar .footer-link:hover {
  transform: translateX(-3px);
}

body.lang-ar .nav-links {
  flex-direction: row-reverse;
}

body.lang-ar .nav-actions {
  flex-direction: row-reverse;
}

body.lang-ar .hero-actions {
  flex-direction: row-reverse;
}

body.lang-ar .service-feature {
  flex-direction: row-reverse;
}

body.lang-ar .product-links {
  flex-direction: row-reverse;
}

body.lang-ar .social-links {
  flex-direction: row-reverse;
}

body.lang-ar .hero-tech-icons {
  flex-direction: row-reverse;
}

/* RTL specific transitions */
/* مهم: طبّق إزاحة RTL فقط قبل أن يصبح العنصر مرئيًا */
body.lang-ar [data-animate="fade-left"]:not(.is-visible) {
  transform: translateX(30px);
}

body.lang-ar [data-animate="fade-right"]:not(.is-visible) {
  transform: translateX(-30px);
}

/* RTL layout/content split for Services + Contact (all breakpoints) */
body.lang-ar .services-grid,
body.lang-ar .contact-grid {
  direction: ltr;
}

body.lang-ar .services-grid > .service-card,
body.lang-ar .contact-grid > .contact-info,
body.lang-ar .contact-grid > .contact-form-wrap {
  justify-self: center;
  margin-inline: auto;
}

body.lang-ar .service-card,
body.lang-ar .contact-info,
body.lang-ar .contact-form-wrap,
body.lang-ar .contact-item-content,
body.lang-ar .form-group,
body.lang-ar .form-label,
body.lang-ar .form-input,
body.lang-ar .form-textarea {
  text-align: right;
}

/* ============================================================
   RESPONSIVE — TABLET (max 1024px)
   ============================================================ */
@media (max-width: 1024px) {
  .services-grid,
  .why-grid,
  .products-grid-preview,
  .products-full-grid {
    grid-template-columns: 1fr 1fr;
  }

  /* Avoid navbar crowding on medium screens */
  .nav-inner { padding: 0 16px; }
  .logo-text { font-size: 1.22rem; }
  .nav-link { padding: 8px 12px; }
  .lang-btn { padding: 5px 10px; }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .about-visual { order: -1; }

  .contact-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 36px;
  }

  .form-row { grid-template-columns: 1fr; }
}

/* Early mobile-nav switch to prevent overlap before 768px */
@media (max-width: 900px) {
  .nav-links,
  .nav-actions { display: none; }

  .nav-toggle { display: flex; }

  .nav-mobile { display: block; }
}

/* ============================================================
   RESPONSIVE — MOBILE (max 768px)
   ============================================================ */
@media (max-width: 768px) {
  :root { --nav-height: 64px; }

  .section { padding: 72px 0; }

  .nav-links,
  .nav-actions { display: none; }

  .nav-toggle { display: flex; }

  .nav-mobile { display: block; }

  .hero-title {
    font-size: clamp(2.5rem, 10vw, 3.5rem);
  }

  .services-grid,
  .why-grid,
  .products-grid-preview,
  .products-full-grid {
    grid-template-columns: 1fr;
  }

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

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

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

  .footer-legal { justify-content: center; }

  .contact-form-wrap { padding: 24px; }

  .hero-tech-icons { gap: 10px; }

  .tech-icon-item { padding: 6px 12px; font-size: 0.78rem; }
}

@media (max-width: 480px) {
  .container { padding: 0 16px; }

  .hero-actions { flex-direction: column; align-items: stretch; }

  .btn { justify-content: center; }

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

/* ============================================================
   MISC HELPERS
   ============================================================ */
.hidden { display: none !important; }
.no-select { user-select: none; }

/* Loading spinner */
.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

/* Gradient border helper */
.gradient-border {
  position: relative;
}

.gradient-border::before {
  content: '';
  position: absolute;
  inset: -1px;
  background: var(--gradient-primary);
  border-radius: inherit;
  z-index: -1;
}


/* ============================================================
   UI/UX POLISH — Mobile-first Refinements
   ============================================================ */

.nav-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(3, 6, 20, 0.58);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  z-index: 998;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s ease;
}

.nav-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.nav-mobile {
  border-bottom-left-radius: 20px;
  border-bottom-right-radius: 20px;
  box-shadow: 0 22px 46px rgba(0, 0, 0, 0.45);
}

.nav-mobile .lang-switcher {
  width: fit-content;
  margin-inline: auto;
}

.nav-mobile-link {
  display: flex;
  align-items: center;
  min-height: 44px;
  font-weight: 600;
}

.hero-tech-icons {
  gap: 12px;
}

.tech-icon-item {
  min-height: 38px;
  border-radius: 10px;
}

.stat-card {
  padding: 22px 18px;
}

.stat-number {
  margin-bottom: 6px;
}

.contact-form-wrap {
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.24);
}

.form-group {
  margin-bottom: 18px;
}

.form-label {
  margin-bottom: 7px;
  font-size: 0.8rem;
}

.form-input,
.form-textarea {
  min-height: 46px;
}

.form-submit {
  width: 100%;
  justify-content: center;
}

.back-to-top {
  position: fixed;
  bottom: 20px;
  inset-inline-end: 16px;
  z-index: 500;
  width: 44px;
  height: 44px;
  background: var(--gradient-primary);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 0.95rem;
  cursor: pointer;
  transition: transform 0.25s ease, opacity 0.25s ease, box-shadow 0.25s ease;
  opacity: 0;
  pointer-events: none;
  transform: translateY(18px) scale(0.9);
  box-shadow: 0 8px 26px rgba(79, 110, 247, 0.35);
}

.back-to-top.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.back-to-top:hover {
  box-shadow: 0 12px 30px rgba(79, 110, 247, 0.45);
  transform: translateY(-2px) scale(1.02);
}

body.lang-ar .form-label,
body.lang-ar .form-input,
body.lang-ar .form-textarea,
body.lang-ar .contact-info,
body.lang-ar .contact-form-wrap,
body.lang-ar .hero-content,
body.lang-ar .about-content {
  text-align: right;
}

body.lang-ar .form-input,
body.lang-ar .form-textarea {
  direction: rtl;
}

@media (max-width: 900px) {
  :root {
    --nav-height: 62px;
  }

  .navbar {
    height: 62px;
  }

  .nav-inner {
    padding: 0 14px;
    gap: 8px;
  }

  .logo-icon {
    width: 36px;
    height: 36px;
    font-size: 0.98rem;
    flex-shrink: 0;
  }

  .logo-text {
    font-size: 1.15rem;
  }

  .nav-toggle {
    padding: 9px;
    min-width: 42px;
    min-height: 42px;
    flex-shrink: 0;
  }

  .nav-mobile {
    top: 62px;
    padding: 14px 16px 20px;
    max-height: calc(100vh - 62px);
  }

  .nav-mobile-links {
    margin-bottom: 16px;
    gap: 6px;
  }

  .hero {
    min-height: auto;
    padding-top: 86px;
    padding-bottom: 34px;
    align-items: flex-start;
  }

  .hero-content {
    padding-top: 4px;
  }

  .hero-badge {
    margin-bottom: 16px;
  }

  .hero-title {
    font-size: clamp(2rem, 10vw, 3rem);
    margin-bottom: 14px;
  }

  .hero-description {
    margin-bottom: 24px;
    font-size: 0.98rem;
    line-height: 1.72;
  }

  .hero-actions {
    gap: 10px;
    width: 100%;
    margin-bottom: 4px;
  }

  .hero-actions .btn {
    width: 100%;
    justify-content: center;
    padding: 14px 18px;
  }

  .hero-tech {
    margin-top: 28px;
  }

  .hero-tech-icons {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .tech-icon-item {
    justify-content: center;
    font-size: 0.8rem;
    padding: 7px 10px;
  }

  .hero-scroll {
    display: none;
  }

  .section {
    padding: 62px 0;
  }

  .section-header {
    margin-bottom: 38px;
  }

  .section-title {
    margin-bottom: 14px;
  }

  .section-subtitle {
    font-size: 0.98rem;
    line-height: 1.7;
  }

  .about-grid,
  .contact-grid {
    gap: 30px;
  }

  .stats-grid {
    gap: 12px;
  }

  .stat-card {
    padding: 18px 14px;
    border-radius: 14px;
  }

  .stat-number {
    font-size: 2rem;
  }

  .stat-label {
    font-size: 0.78rem;
  }

  .contact-item {
    padding: 13px 14px;
    gap: 12px;
  }

  .contact-item-icon {
    width: 36px;
    height: 36px;
  }

  .contact-items {
    margin-bottom: 26px;
  }

  .contact-form-wrap {
    padding: 20px;
    border-radius: 18px;
  }
}

@media (max-width: 520px) {
  .container {
    padding: 0 14px;
  }

  .logo-text {
    font-size: 1.05rem;
  }

  .hero-badge {
    font-size: 0.74rem;
    padding: 7px 12px;
  }

  .hero-tech-label {
    margin-bottom: 10px;
  }

  .section {
    padding: 54px 0;
  }

  .form-row {
    gap: 12px;
    grid-template-columns: 1fr;
  }

  .form-input,
  .form-textarea {
    font-size: 0.92rem;
  }

  .contact-grid {
    gap: 24px;
  }

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

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

  .products-grid-preview {
    grid-template-columns: 1fr;
  }

  .product-screenshot {
    height: 160px;
  }
}

/* ============================================================
   RESPONSIVE ALIGNMENT FIXES — Mobile Professional Layout
   ============================================================ */
@media (max-width: 900px) {
  .services-grid,
  .why-grid,
  .products-grid-preview {
    justify-items: center;
  }

  .service-card,
  .why-card,
  .product-card {
    width: min(100%, 560px);
    margin-inline: auto;
  }

  .contact-grid {
    justify-items: center;
  }

  .contact-info,
  .contact-form-wrap {
    width: min(100%, 760px);
    margin-inline: auto;
  }
}

@media (max-width: 520px) {
  .service-card,
  .why-card,
  .product-card,
  .contact-info,
  .contact-form-wrap {
    width: 100%;
  }
}

/* ============================================================
   RTL ARABIC FIXES — Services & Contact Alignment (Root-Cause Fix)
   ============================================================ */
@media (max-width: 1024px) {
  /* 1) Stabilize layout flow (cards/form positioning), independent from RTL text flow */
  body.lang-ar .services-grid,
  body.lang-ar .contact-grid {
    justify-items: center;
  }

  body.lang-ar .why-grid,
  body.lang-ar .products-grid-preview,
  body.lang-ar .products-full-grid {
    justify-items: center;
  }

  /* 2) Keep content itself RTL */
  body.lang-ar .service-card,
  body.lang-ar .contact-info,
  body.lang-ar .contact-form-wrap,
  body.lang-ar .contact-item-content,
  body.lang-ar .form-group,
  body.lang-ar .form-label,
  body.lang-ar .form-input,
  body.lang-ar .form-textarea {
    text-align: right;
  }

  /* 3) Force centered sizing for affected blocks */
  body.lang-ar .service-card,
  body.lang-ar .why-card,
  body.lang-ar .product-card,
  body.lang-ar .product-card-full {
    width: min(100%, 560px);
    margin-inline: auto;
  }

  body.lang-ar .contact-info,
  body.lang-ar .contact-form-wrap {
    width: min(100%, 760px);
    margin-inline: auto;
    justify-self: center;
  }

  body.lang-ar .contact-items,
  body.lang-ar .contact-item,
  body.lang-ar #contact-form {
    width: 100%;
    margin-inline: auto;
  }
}

@media (max-width: 520px) {
  body.lang-ar .service-card,
  body.lang-ar .why-card,
  body.lang-ar .product-card,
  body.lang-ar .product-card-full,
  body.lang-ar .contact-info,
  body.lang-ar .contact-form-wrap {
    width: 100%;
  }
}

/* ============================================================
   SAFE RESPONSIVE — Prevent horizontal overflow
   ============================================================ */
.section,
.navbar,
.hero,
.footer {
  overflow-x: hidden;
}

.products-grid-preview,
.products-full-grid,
.services-grid,
.why-grid,
.stats-grid {
  width: 100%;
  min-width: 0;
}

.product-card,
.service-card,
.why-card,
.stat-card {
  min-width: 0;
  overflow: hidden;
}



body.lang-ar #input-email,
body.lang-ar #input-phone {
  direction: ltr;
  text-align: left;
}


/* ============================================================
   FINAL QA POLISH — Accessibility & Micro-interactions
   ============================================================ */

:where(.btn, .nav-link, .nav-mobile-link, .lang-btn, .nav-toggle, .social-link, .product-link, .product-link-btn, .filter-btn, .footer-link, .back-to-top) {
  -webkit-tap-highlight-color: transparent;
}

:where(.btn, .nav-link, .nav-mobile-link, .lang-btn, .nav-toggle, .social-link, .product-link, .product-link-btn, .filter-btn, .back-to-top):focus-visible,
:where(.form-input, .form-textarea):focus-visible {
  outline: 2px solid rgba(79, 110, 247, 0.9);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(79, 110, 247, 0.16);
}

:where(.btn, .lang-btn, .nav-toggle, .filter-btn, .product-link, .product-link-btn, .social-link, .back-to-top):active {
  transform: translateY(0) scale(0.98);
}

.nav-mobile-link.active {
  color: var(--text-primary);
  background: rgba(79, 110, 247, 0.12);
  border: 1px solid rgba(79, 110, 247, 0.25);
}

.form-input:user-invalid,
.form-textarea:user-invalid {
  border-color: rgba(239, 68, 68, 0.5);
}

html {
  scroll-padding-top: calc(var(--nav-height) + 14px);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }

  .hero-scroll,
  .hero-orb,
  .particle {
    animation: none !important;
  }
}
