/* ===== Nexgen for Marketing Solutions - Custom Styles ===== */

/* ---------- CSS Variables: Light Mode (Default) ---------- */
:root {
  /* Brand Palette */
  --navy: #171B41;
  --charcoal: #212121;
  --orange: #EA5B35;
  --orange-dark: #D14A28;
  --orange-light: #F06E4C;
  --amber: #F8B334;
  --crimson: #BF2126;
  --lavender: #A3A8C4;
  --offwhite: #F0F0F0;

  /* Semantic Colors — Light Mode */
  --bg-primary: #FFFFFF;
  --bg-secondary: #F5F6FA;
  --bg-tertiary: #ECEDF3;
  --bg-dark: var(--navy);
  --bg-dark-2: #1E2250;
  --bg-card: #FFFFFF;
  --bg-card-hover: #FAFBFF;

  --text-primary: var(--charcoal);
  --text-secondary: #5A5E7A;
  --text-tertiary: #8A8EA8;
  --text-on-dark: var(--offwhite);
  --text-on-dark-secondary: var(--lavender);

  --border-color: rgba(23, 27, 65, 0.08);
  --border-light: rgba(23, 27, 65, 0.05);

  /* Accent */
  --primary: var(--orange);
  --primary-dark: var(--orange-dark);
  --primary-light: var(--orange-light);
  --secondary: var(--amber);
  --accent: var(--crimson);

  /* Gradients */
  --gradient-brand: linear-gradient(135deg, #171B41 0%, #3B1C1C 100%);
  --gradient-primary: linear-gradient(135deg, #EA5B35 0%, #F8B334 100%);
  --gradient-glow: linear-gradient(135deg, rgba(234, 91, 53, 0.1) 0%, rgba(248, 179, 52, 0.1) 100%);
  --gradient-hero: linear-gradient(135deg, #171B41 0%, #2A1530 50%, #3B1C1C 100%);

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(23, 27, 65, 0.06);
  --shadow: 0 4px 12px rgba(23, 27, 65, 0.08);
  --shadow-md: 0 10px 30px rgba(23, 27, 65, 0.1);
  --shadow-lg: 0 25px 50px rgba(23, 27, 65, 0.12);
  --shadow-glow: 0 0 40px rgba(234, 91, 53, 0.25);

  /* Layout */
  --radius: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);

  /* Navbar */
  --navbar-bg: rgba(255, 255, 255, 0.95);
  --navbar-text: var(--charcoal);
}

/* ---------- Dark Mode ---------- */
[data-theme="dark"] {
  --bg-primary: #0E1130;
  --bg-secondary: #141738;
  --bg-tertiary: #1A1E45;
  --bg-dark: #0A0C22;
  --bg-dark-2: #0E1130;
  --bg-card: #181C44;
  --bg-card-hover: #1E2250;

  --text-primary: var(--offwhite);
  --text-secondary: var(--lavender);
  --text-tertiary: #7A7FA0;
  --text-on-dark: var(--offwhite);
  --text-on-dark-secondary: var(--lavender);

  --border-color: rgba(163, 168, 196, 0.1);
  --border-light: rgba(163, 168, 196, 0.06);

  --gradient-glow: linear-gradient(135deg, rgba(234, 91, 53, 0.15) 0%, rgba(248, 179, 52, 0.1) 100%);

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 25px 50px rgba(0, 0, 0, 0.4);

  --navbar-bg: rgba(14, 17, 48, 0.95);
  --navbar-text: var(--offwhite);
}

/* ---------- Base Reset & Typography ---------- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
  font-size: 16px;
}

body {
  font-family: 'Inter', sans-serif;
  color: var(--text-primary);
  background: var(--bg-primary);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 0.4s ease, color 0.4s ease;
}

/* RTL Support */
[dir="rtl"] body {
  direction: rtl;
  text-align: right;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  line-height: 1.2;
  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: clamp(1.25rem, 2vw, 1.5rem); }

p {
  color: var(--text-secondary);
  font-size: 1.05rem;
  line-height: 1.8;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

ul { list-style: none; }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ---------- Utility Classes ---------- */
.section {
  padding: 6rem 0;
  background: var(--bg-primary);
}

.section-dark {
  background: var(--bg-dark);
  color: var(--text-on-dark);
}

.section-dark h2, .section-dark h3, .section-dark h4 {
  color: var(--text-on-dark);
}

.section-dark p {
  color: var(--text-on-dark-secondary);
}

.section-light {
  background: var(--bg-secondary);
}

.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 4rem;
}

.section-header .badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1.25rem;
  background: var(--gradient-glow);
  border: 1px solid rgba(234, 91, 53, 0.2);
  border-radius: 50px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 1.25rem;
}

.section-dark .section-header .badge {
  background: rgba(234, 91, 53, 0.15);
  border-color: rgba(234, 91, 53, 0.25);
  color: var(--amber);
}

.section-header h2 { margin-bottom: 1rem; }
.section-header p { font-size: 1.125rem; }

.gradient-text {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 2rem;
  border-radius: 50px;
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  border: none;
  transition: var(--transition);
  white-space: nowrap;
}

.btn-primary {
  background: var(--gradient-primary);
  color: #FFFFFF;
  box-shadow: 0 4px 20px rgba(234, 91, 53, 0.35);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(234, 91, 53, 0.45);
}

.btn-secondary {
  background: transparent;
  color: #FFFFFF;
  border: 2px solid rgba(255, 255, 255, 0.3);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.6);
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}

.btn-outline:hover {
  background: var(--primary);
  color: #FFFFFF;
  transform: translateY(-2px);
}

.btn-whatsapp {
  background: #25D366;
  color: #FFFFFF;
  box-shadow: 0 4px 20px rgba(37, 211, 102, 0.35);
}

.btn-whatsapp:hover {
  background: #20BD5A;
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(37, 211, 102, 0.45);
}

.btn-sm { padding: 0.625rem 1.5rem; font-size: 0.875rem; }
.btn-lg { padding: 1rem 2.5rem; font-size: 1.125rem; }

/* ---------- Navbar ---------- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 1rem 0;
  transition: var(--transition);
}

.navbar.scrolled {
  background: var(--navbar-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: var(--shadow);
  padding: 0.625rem 0;
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  z-index: 1001;
}

.nav-logo img {
  height: 42px;
  width: auto;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-links a {
  font-weight: 500;
  font-size: 0.95rem;
  position: relative;
  padding: 0.25rem 0;
}

.navbar:not(.scrolled) .nav-links a {
  color: rgba(240, 240, 240, 0.85);
}

.navbar.scrolled .nav-links a {
  color: var(--navbar-text);
}

.nav-links a:hover, .nav-links a.active {
  color: var(--primary);
}

.navbar:not(.scrolled) .nav-links a:hover,
.navbar:not(.scrolled) .nav-links a.active {
  color: var(--amber);
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient-primary);
  border-radius: 2px;
  transition: var(--transition);
}

[dir="rtl"] .nav-links a::after {
  left: auto;
  right: 0;
}

.nav-links a:hover::after, .nav-links a.active::after {
  width: 100%;
}

.nav-cta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.nav-cta .btn { padding: 0 1.25rem; font-size: 0.8rem; height: 34px; border-radius: 50px; display: inline-flex; align-items: center; }

/* Theme Toggle */
.theme-toggle {
  width: 34px;
  height: 34px;
  border-radius: 50px;
  background: rgba(234, 91, 53, 0.1);
  border: 1px solid rgba(234, 91, 53, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--primary);
  font-size: 0.85rem;
  transition: var(--transition);
}

.navbar:not(.scrolled) .theme-toggle {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
  color: var(--offwhite);
}

.theme-toggle:hover {
  background: var(--primary);
  color: #FFFFFF;
  border-color: var(--primary);
}

/* Language Toggle */
.lang-toggle {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0 0.75rem;
  height: 34px;
  background: rgba(234, 91, 53, 0.1);
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid rgba(234, 91, 53, 0.2);
  color: var(--primary);
  transition: var(--transition);
}

.navbar:not(.scrolled) .lang-toggle {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
  color: var(--offwhite);
}

.lang-toggle:hover {
  background: var(--primary);
  color: #FFFFFF;
  border-color: var(--primary);
}

/* Mobile Menu Toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  z-index: 1001;
  padding: 4px;
}

.nav-toggle span {
  width: 26px;
  height: 2.5px;
  border-radius: 3px;
  background: var(--navbar-text);
  transition: var(--transition);
}

.navbar:not(.scrolled) .nav-toggle span {
  background: var(--offwhite);
}

.nav-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ---------- Hero Section ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: var(--gradient-hero);
  overflow: hidden;
  padding-top: 80px;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background:
    radial-gradient(circle at 15% 50%, rgba(234, 91, 53, 0.14) 0%, transparent 50%),
    radial-gradient(circle at 85% 30%, rgba(248, 179, 52, 0.1) 0%, transparent 45%),
    radial-gradient(circle at 50% 90%, rgba(191, 33, 38, 0.08) 0%, transparent 40%);
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background-image:
    radial-gradient(rgba(163, 168, 196, 0.06) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 50%, black 30%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 50%, black 30%, transparent 100%);
}

.hero .container {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.hero-content { animation: fadeInUp 0.8s ease-out; }

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.875rem;
  background: rgba(234, 91, 53, 0.12);
  border: 1px solid rgba(234, 91, 53, 0.2);
  border-radius: 50px;
  color: var(--amber);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 1.25rem;
}

.hero-badge i { color: var(--orange); font-size: 0.7rem; }

.hero h1 {
  color: var(--offwhite);
  font-size: clamp(1.85rem, 3.5vw, 2.75rem);
  margin-bottom: 1rem;
  letter-spacing: -0.025em;
  line-height: 1.15;
}

.hero h1 .highlight {
  position: relative;
  display: inline-block;
}

.hero h1 .highlight::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 0;
  width: 100%;
  height: 8px;
  background: linear-gradient(90deg, rgba(234, 91, 53, 0.4), rgba(248, 179, 52, 0.4));
  border-radius: 4px;
  z-index: -1;
}

.hero p {
  color: var(--lavender);
  font-size: 1rem;
  margin-bottom: 1.75rem;
  max-width: 480px;
  line-height: 1.7;
}

.hero-btns {
  display: flex;
  gap: 0.875rem;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
}

.hero-btns .btn-lg {
  padding: 0.75rem 1.75rem;
  font-size: 0.9rem;
}

.hero-stats {
  display: flex;
  gap: 2rem;
}

.hero-stat {
  text-align: center;
  position: relative;
  padding-left: 1.25rem;
}
.hero-stat:first-child { padding-left: 0; }
.hero-stat:not(:first-child)::before {
  content: '';
  position: absolute;
  left: 0;
  top: 15%;
  height: 70%;
  width: 1px;
  background: rgba(163, 168, 196, 0.2);
}
[dir="rtl"] .hero-stat { padding-left: 0; padding-right: 1.25rem; }
[dir="rtl"] .hero-stat:first-child { padding-right: 0; }
[dir="rtl"] .hero-stat:not(:first-child)::before { left: auto; right: 0; }

.hero-stat .number {
  display: block;
  font-family: 'Poppins', sans-serif;
  font-size: 1.65rem;
  font-weight: 800;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-stat .label {
  font-size: 0.75rem;
  color: var(--lavender);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Hero Particles */
.hero-particles {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 1;
  pointer-events: none;
}
.particle {
  position: absolute;
  border-radius: 50%;
  opacity: 0;
  animation: particleDrift linear infinite;
}
.particle-1 { width: 4px; height: 4px; background: var(--orange); top: 20%; left: 10%; animation-duration: 12s; animation-delay: 0s; }
.particle-2 { width: 3px; height: 3px; background: var(--amber); top: 60%; left: 75%; animation-duration: 15s; animation-delay: -3s; }
.particle-3 { width: 5px; height: 5px; background: var(--lavender); top: 80%; left: 25%; animation-duration: 18s; animation-delay: -6s; }
.particle-4 { width: 3px; height: 3px; background: var(--orange); top: 35%; left: 85%; animation-duration: 14s; animation-delay: -2s; }
.particle-5 { width: 4px; height: 4px; background: var(--amber); top: 70%; left: 50%; animation-duration: 16s; animation-delay: -8s; }
.particle-6 { width: 2px; height: 2px; background: var(--offwhite); top: 15%; left: 60%; animation-duration: 20s; animation-delay: -4s; }

@keyframes particleDrift {
  0%   { opacity: 0; transform: translateY(0) translateX(0) scale(0); }
  10%  { opacity: 0.7; transform: scale(1); }
  90%  { opacity: 0.5; }
  100% { opacity: 0; transform: translateY(-120px) translateX(40px) scale(0.5); }
}

/* Hero Visual */
.hero-visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeInRight 1s ease-out;
}

.hero-graphic {
  position: relative;
  width: 100%;
  max-width: 500px;
  aspect-ratio: 1;
}

.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(40px);
  animation: orbFloat 6s ease-in-out infinite;
}

.hero-orb-1 {
  width: 300px; height: 300px;
  background: rgba(234, 91, 53, 0.25);
  top: 10%; left: 10%;
}

.hero-orb-2 {
  width: 200px; height: 200px;
  background: rgba(248, 179, 52, 0.2);
  bottom: 15%; right: 10%;
  animation-delay: -3s;
}

.hero-orb-3 {
  width: 150px; height: 150px;
  background: rgba(191, 33, 38, 0.15);
  top: 40%; right: 25%;
  animation-delay: -1.5s;
}

.hero-card {
  position: absolute;
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  animation: cardFloat 5s ease-in-out infinite;
}

.hero-card-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.hero-card h4 { color: var(--offwhite); font-size: 0.95rem; margin-bottom: 0.15rem; }
.hero-card p { color: var(--lavender); font-size: 0.8rem; margin: 0; }

.hero-card-1 { top: 8%; right: 5%; animation-delay: 0s; }
.hero-card-1 .hero-card-icon { background: rgba(234, 91, 53, 0.25); color: var(--amber); }

.hero-card-2 { bottom: 20%; left: 0; animation-delay: -2.5s; }
.hero-card-2 .hero-card-icon { background: rgba(248, 179, 52, 0.25); color: var(--amber); }

.hero-card-3 { bottom: 5%; right: 15%; animation-delay: -1.2s; }
.hero-card-3 .hero-card-icon { background: rgba(191, 33, 38, 0.25); color: var(--orange-light); }

/* ---------- Trusted / Logo Marquee ---------- */
.trusted-section {
  padding: 3rem 0;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
}

.trusted-section p {
  text-align: center;
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--text-tertiary);
  margin-bottom: 2rem;
}

.logo-marquee {
  display: flex;
  gap: 4rem;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  opacity: 0.5;
}

.logo-marquee span {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--text-tertiary);
}

/* ---------- Service Cards ---------- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 2rem;
}

.service-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 4px;
  background: var(--gradient-primary);
  transform: scaleX(0);
  transform-origin: left;
  transition: var(--transition);
}

[dir="rtl"] .service-card::before { transform-origin: right; }

.service-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}

.service-card:hover::before { transform: scaleX(1); }

.service-card-icon {
  width: 64px; height: 64px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  background: var(--gradient-glow);
  color: var(--primary);
}

.service-card h3 { font-size: 1.25rem; margin-bottom: 0.75rem; }
.service-card p { font-size: 0.95rem; margin-bottom: 1.25rem; }

.service-card .card-link {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--primary);
}

.service-card .card-link:hover { gap: 0.625rem; }

/* ---------- Why Section ---------- */
.why-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.why-visual { position: relative; }

.why-image-wrapper {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: var(--gradient-glow);
  padding: 3rem;
  min-height: 450px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.why-image-wrapper .stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  width: 100%;
}

.mini-stat-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
  box-shadow: var(--shadow-md);
}

.mini-stat-card i {
  font-size: 1.5rem;
  color: var(--primary);
  margin-bottom: 0.75rem;
  display: block;
}

.mini-stat-card .stat-number {
  display: block;
  font-family: 'Poppins', sans-serif;
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.mini-stat-card .stat-label { font-size: 0.8rem; color: var(--text-secondary); }

.why-content .why-list { margin-top: 2rem; }

.why-item {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.why-item-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  background: var(--gradient-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-size: 1.125rem;
  flex-shrink: 0;
}

.why-item h4 { font-size: 1.05rem; margin-bottom: 0.25rem; }
.why-item p { font-size: 0.9rem; }

/* ---------- Testimonials / Initiative Cards ---------- */
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
}

.testimonial-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  transition: var(--transition);
}

.testimonial-card:hover {
  background: rgba(255, 255, 255, 0.07);
  transform: translateY(-4px);
}

.testimonial-stars {
  display: flex;
  gap: 0.25rem;
  margin-bottom: 1.25rem;
  color: var(--amber);
  font-size: 1rem;
}

.testimonial-card blockquote {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--lavender);
  margin-bottom: 1.5rem;
  font-style: italic;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.testimonial-avatar {
  width: 50px; height: 50px;
  border-radius: 50%;
  background: var(--gradient-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  font-weight: 700;
  font-size: 1.1rem;
}

.testimonial-author h4 { font-size: 1rem; color: var(--offwhite); margin-bottom: 0.15rem; }
.testimonial-author p { font-size: 0.85rem; color: var(--lavender); margin: 0; }

/* ---------- CTA Section ---------- */
.cta-section {
  position: relative;
  padding: 6rem 0;
  background: var(--gradient-primary);
  overflow: hidden;
}

.cta-section::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.06'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.cta-content {
  position: relative;
  text-align: center;
  z-index: 2;
}

.cta-content h2 { color: #FFFFFF; margin-bottom: 1rem; }
.cta-content p {
  color: rgba(255, 255, 255, 0.88);
  font-size: 1.2rem;
  max-width: 600px;
  margin: 0 auto 2.5rem;
}

.cta-btns {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ---------- Footer ---------- */
.footer {
  background: var(--navy);
  padding: 5rem 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid rgba(163, 168, 196, 0.08);
}

.footer-brand .nav-logo { margin-bottom: 0.25rem; }

.footer-brand p {
  color: var(--lavender);
  margin: 1rem 0 1.5rem;
  font-size: 0.95rem;
  max-width: 320px;
}

.footer-social {
  display: flex;
  gap: 0.75rem;
}

.footer-social a {
  width: 42px; height: 42px;
  border-radius: 10px;
  background: rgba(240, 240, 240, 0.06);
  border: 1px solid rgba(240, 240, 240, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--lavender);
  font-size: 1.1rem;
  transition: var(--transition);
}

.footer-social a:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #FFFFFF;
  transform: translateY(-3px);
}

.footer-col h4 {
  color: var(--offwhite);
  font-size: 1rem;
  margin-bottom: 1.25rem;
  font-weight: 600;
}

.footer-col ul li { margin-bottom: 0.75rem; }

.footer-col ul li a {
  color: var(--lavender);
  font-size: 0.9rem;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.footer-col ul li a:hover {
  color: var(--offwhite);
  padding-inline-start: 4px;
}

.footer-col ul li a i { font-size: 0.8rem; color: var(--orange-light); }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 0;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-bottom p { color: var(--lavender); font-size: 0.85rem; }

.footer-bottom-links { display: flex; gap: 1.5rem; }
.footer-bottom-links a { color: var(--lavender); font-size: 0.85rem; }
.footer-bottom-links a:hover { color: var(--offwhite); }

/* ---------- Page Hero (Inner Pages) ---------- */
.page-hero {
  position: relative;
  padding: 10rem 0 5rem;
  background: var(--gradient-hero);
  overflow: hidden;
  text-align: center;
}

.page-hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -25%;
  width: 70%;
  height: 150%;
  background: radial-gradient(ellipse, rgba(234, 91, 53, 0.1) 0%, transparent 70%);
  pointer-events: none;
}

.page-hero .container { position: relative; z-index: 2; }
.page-hero h1 { color: var(--offwhite); margin-bottom: 1rem; }
.page-hero p { color: var(--lavender); font-size: 1.2rem; max-width: 600px; margin: 0 auto; }

.breadcrumb {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
}

.breadcrumb a { color: var(--lavender); }
.breadcrumb a:hover { color: var(--offwhite); }
.breadcrumb span { color: var(--text-tertiary); }
.breadcrumb .current { color: var(--amber); }

/* ---------- Features Grid ---------- */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  text-align: center;
  transition: var(--transition);
}

.feature-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(234, 91, 53, 0.2);
}

.feature-card-icon {
  width: 80px; height: 80px;
  border-radius: 20px;
  background: var(--gradient-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: var(--primary);
  margin: 0 auto 1.5rem;
}

.feature-card h3 { font-size: 1.2rem; margin-bottom: 0.75rem; }
.feature-card p { font-size: 0.95rem; }

.feature-card-lg {
  grid-column: span 2;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  text-align: left;
  align-items: center;
}

.feature-card-lg .feature-card-icon { margin: 0 0 1.5rem; }

/* ---------- About Page ---------- */
.about-story {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.about-image {
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: var(--gradient-glow);
  padding: 2rem;
  min-height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.about-image .placeholder-graphic {
  width: 100%;
  height: 350px;
  background: var(--gradient-primary);
  border-radius: var(--radius);
  opacity: 0.15;
}

.values-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.value-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  text-align: center;
  transition: var(--transition);
}

.value-card:hover {
  background: rgba(255, 255, 255, 0.07);
  transform: translateY(-4px);
}

.value-card i {
  font-size: 2.5rem;
  margin-bottom: 1.25rem;
  display: block;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.value-card h3 { font-size: 1.2rem; color: var(--offwhite); margin-bottom: 0.75rem; }
.value-card p { font-size: 0.9rem; }

/* Team */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.team-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
}

.team-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }

.team-card-img {
  height: 280px;
  background: var(--gradient-glow);
  display: flex;
  align-items: center;
  justify-content: center;
}

.team-card-img .avatar-placeholder {
  width: 120px; height: 120px;
  border-radius: 50%;
  background: var(--gradient-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  font-size: 2.5rem;
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
}

.team-card-info { padding: 1.5rem; text-align: center; }
.team-card-info h3 { font-size: 1.15rem; margin-bottom: 0.25rem; }
.team-card-info .role { color: var(--primary); font-weight: 600; font-size: 0.9rem; margin-bottom: 1rem; display: block; }

.team-card-social { display: flex; justify-content: center; gap: 0.5rem; }

.team-card-social a {
  width: 36px; height: 36px;
  border-radius: 8px;
  background: var(--bg-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-tertiary);
  font-size: 0.9rem;
  transition: var(--transition);
}

.team-card-social a:hover { background: var(--primary); color: #FFFFFF; }

/* ---------- Blog ---------- */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
}

.blog-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
}

.blog-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }

.blog-card-img {
  height: 220px;
  background: var(--gradient-glow);
  position: relative;
  overflow: hidden;
}

.blog-card-img .blog-placeholder {
  width: 100%; height: 100%;
  background: var(--gradient-primary);
  opacity: 0.1;
}

.blog-card-category {
  position: absolute;
  top: 1rem; left: 1rem;
  padding: 0.375rem 1rem;
  background: var(--primary);
  color: #FFFFFF;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

[dir="rtl"] .blog-card-category { left: auto; right: 1rem; }

.blog-card-body { padding: 1.75rem; }

.blog-card-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  font-size: 0.85rem;
  color: var(--text-tertiary);
}

.blog-card-meta span { display: flex; align-items: center; gap: 0.375rem; }

.blog-card-body h3 { font-size: 1.2rem; margin-bottom: 0.75rem; line-height: 1.4; }
.blog-card-body h3 a:hover { color: var(--primary); }
.blog-card-body p {
  font-size: 0.9rem;
  margin-bottom: 1.25rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-card-footer { display: flex; align-items: center; justify-content: space-between; }

.blog-card-author { display: flex; align-items: center; gap: 0.5rem; }

.blog-card-author .author-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--gradient-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  font-size: 0.75rem;
  font-weight: 700;
}

.blog-card-author span { font-size: 0.85rem; font-weight: 600; color: var(--text-primary); }

.read-more-link {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.read-more-link:hover { gap: 0.5rem; }

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 3rem;
}

.contact-info-card {
  background: var(--navy);
  border-radius: var(--radius-xl);
  padding: 3rem;
  color: var(--offwhite);
  position: relative;
  overflow: hidden;
}

.contact-info-card::before {
  content: '';
  position: absolute;
  top: -50%; right: -50%;
  width: 100%; height: 100%;
  background: radial-gradient(circle, rgba(234, 91, 53, 0.15) 0%, transparent 70%);
}

.contact-info-card h3 { color: var(--offwhite); margin-bottom: 0.5rem; position: relative; }
.contact-info-card > p { color: var(--lavender); margin-bottom: 2rem; position: relative; }

.contact-info-list { position: relative; }

.contact-info-item { display: flex; gap: 1rem; margin-bottom: 1.75rem; }

.contact-info-item .icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  background: rgba(234, 91, 53, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--amber);
  font-size: 1.1rem;
  flex-shrink: 0;
}

.contact-info-item h4 { color: var(--offwhite); font-size: 0.95rem; margin-bottom: 0.25rem; }
.contact-info-item p, .contact-info-item a { color: var(--lavender); font-size: 0.9rem; }
.contact-info-item a:hover { color: var(--offwhite); }

.contact-social { display: flex; gap: 0.75rem; margin-top: 2rem; position: relative; }

.contact-social a {
  width: 42px; height: 42px;
  border-radius: 10px;
  background: rgba(240, 240, 240, 0.06);
  border: 1px solid rgba(240, 240, 240, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--lavender);
  font-size: 1.1rem;
  transition: var(--transition);
}

.contact-social a:hover { background: var(--primary); border-color: var(--primary); color: #FFFFFF; }

.contact-form-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 3rem;
  box-shadow: var(--shadow-md);
}

.contact-form-card h3 { margin-bottom: 0.5rem; }
.contact-form-card > p { margin-bottom: 2rem; }

.form-group { margin-bottom: 1.25rem; }

.form-group label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.875rem 1.25rem;
  border: 2px solid var(--border-color);
  border-radius: var(--radius);
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  color: var(--text-primary);
  background: var(--bg-secondary);
  transition: var(--transition);
  outline: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--primary);
  background: var(--bg-card);
  box-shadow: 0 0 0 4px rgba(234, 91, 53, 0.1);
}

.form-group textarea { resize: vertical; min-height: 130px; }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

/* ---------- Legal Pages ---------- */
.legal-content { max-width: 800px; margin: 0 auto; }
.legal-content h2 { font-size: 1.5rem; margin: 2.5rem 0 1rem; }
.legal-content h3 { font-size: 1.2rem; margin: 2rem 0 0.75rem; }
.legal-content p { margin-bottom: 1rem; }
.legal-content ul { margin-bottom: 1rem; padding-inline-start: 1.5rem; }
.legal-content ul li { list-style: disc; margin-bottom: 0.5rem; color: var(--text-secondary); font-size: 1rem; line-height: 1.7; }

.legal-updated {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: var(--bg-secondary);
  border-radius: 50px;
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
}

/* ---------- Service Detail (Services Page) ---------- */
.service-detail-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  padding: 4rem 0;
  border-bottom: 1px solid var(--border-color);
}

.service-detail-card:last-child { border-bottom: none; }
.service-detail-card:nth-child(even) { direction: rtl; }
.service-detail-card:nth-child(even) > * { direction: ltr; }

[dir="rtl"] .service-detail-card:nth-child(even) { direction: ltr; }
[dir="rtl"] .service-detail-card:nth-child(even) > * { direction: rtl; }

.service-detail-visual {
  background: var(--gradient-glow);
  border-radius: var(--radius-xl);
  padding: 3rem;
  min-height: 350px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.service-detail-visual i {
  font-size: 5rem;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.service-detail-content h3 { margin-bottom: 1rem; }
.service-detail-content p { margin-bottom: 1.5rem; }

.service-detail-list { margin-bottom: 1.5rem; }

.service-detail-list li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.service-detail-list li i { color: var(--primary); font-size: 0.9rem; }

/* ---------- Process ---------- */
.process-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  position: relative;
}

.process-grid::before {
  content: '';
  position: absolute;
  top: 60px;
  left: 10%; right: 10%;
  height: 2px;
  background: rgba(240, 240, 240, 0.08);
}

.process-step { text-align: center; position: relative; }

.process-step-number {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--gradient-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Poppins', sans-serif;
  font-weight: 800;
  font-size: 1.25rem;
  color: #FFFFFF;
  margin: 0 auto 1.5rem;
  position: relative;
  z-index: 2;
}

.process-step h4 { color: var(--offwhite); font-size: 1.1rem; margin-bottom: 0.5rem; }
.process-step p { font-size: 0.9rem; }

/* ---------- Animations ---------- */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInRight {
  from { opacity: 0; transform: translateX(30px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes orbFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(15px, -20px) scale(1.05); }
  66% { transform: translate(-10px, 10px) scale(0.95); }
}

@keyframes cardFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- AI Chat Widget ---------- */
#nexgen-chat { position: fixed; bottom: 0; right: 0; z-index: 9999; }
[dir="rtl"] #nexgen-chat { right: auto; left: 0; }

.chat-fab {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 62px; height: 62px;
  border-radius: 50%;
  background: var(--gradient-primary);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.5rem;
  z-index: 10001;
  box-shadow: 0 6px 24px rgba(234, 91, 53, 0.45);
  transition: var(--transition);
}
[dir="rtl"] .chat-fab { right: auto; left: 2rem; }
.chat-fab:hover { transform: scale(1.08); box-shadow: 0 8px 32px rgba(234, 91, 53, 0.55); }
.chat-fab .fab-icon { position: absolute; transition: opacity .25s, transform .25s; }
.chat-fab .fab-icon-close { opacity: 0; transform: rotate(-90deg) scale(.6); }
.chat-fab.active .fab-icon-chat { opacity: 0; transform: rotate(90deg) scale(.6); }
.chat-fab.active .fab-icon-close { opacity: 1; transform: rotate(0) scale(1); }

.fab-pulse {
  position: absolute;
  width: 100%; height: 100%;
  border-radius: 50%;
  background: var(--gradient-primary);
  animation: chatPulse 2.5s ease-in-out infinite;
  z-index: -1;
}
.chat-fab.active .fab-pulse { animation: none; opacity: 0; }
@keyframes chatPulse {
  0%,100% { transform: scale(1); opacity: .4; }
  50%     { transform: scale(1.35); opacity: 0; }
}

/* Panel */
.chat-panel {
  position: fixed;
  bottom: 6.5rem;
  right: 2rem;
  width: 400px;
  max-height: calc(100dvh - 9rem);
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: 0 25px 60px rgba(0,0,0,.18), 0 0 0 1px var(--border-color);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 10000;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px) scale(.96);
  transform-origin: bottom right;
  transition: opacity .3s, visibility .3s, transform .3s cubic-bezier(.4,0,.2,1);
}
[dir="rtl"] .chat-panel { right: auto; left: 2rem; transform-origin: bottom left; }
.chat-panel.open { opacity: 1; visibility: visible; transform: translateY(0) scale(1); }

/* Header */
.chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .875rem 1.25rem;
  background: var(--gradient-hero);
  color: #fff;
  flex-shrink: 0;
}
.chat-header-info { display: flex; align-items: center; gap: .75rem; }
.chat-header-info h4 { font-size: .95rem; font-weight: 700; color: #fff; margin: 0; }
.chat-header-info .chat-status-text { font-size: .7rem; opacity: .75; }

.chat-avatar {
  width: 40px; height: 40px;
  border-radius: 12px;
  background: rgba(255,255,255,.15);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: visible;
  flex-shrink: 0;
}
.chat-avatar img { width: 28px; height: 28px; object-fit: contain; }
.chat-avatar-fallback {
  font-weight: 800; font-size: 1rem; color: var(--amber);
  display: flex; align-items: center; justify-content: center;
  width: 100%; height: 100%;
}
.chat-status-dot {
  position: absolute;
  bottom: -2px; right: -2px;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: #22c55e;
  border: 2px solid var(--navy);
}

.chat-header-actions { display: flex; gap: .375rem; }
.chat-header-btn {
  width: 32px; height: 32px;
  border-radius: 8px;
  border: none;
  background: rgba(255,255,255,.12);
  color: rgba(255,255,255,.85);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .8rem;
  transition: var(--transition);
}
.chat-header-btn:hover { background: rgba(255,255,255,.22); color: #fff; }

/* Messages */
.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: .75rem;
  min-height: 300px;
  max-height: 400px;
  scroll-behavior: smooth;
  background: var(--bg-secondary);
}
.chat-messages::-webkit-scrollbar { width: 5px; }
.chat-messages::-webkit-scrollbar-track { background: transparent; }
.chat-messages::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 10px; }

/* Welcome */
.chat-welcome {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 2rem .5rem;
  gap: .75rem;
}
.chat-welcome-icon {
  width: 56px; height: 56px;
  border-radius: 16px;
  background: var(--gradient-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--primary);
}
.chat-welcome h3 { font-size: 1.1rem; color: var(--text-primary); margin: 0; }
.chat-welcome p { font-size: .85rem; color: var(--text-secondary); margin: 0; }
.chat-suggestions { display: flex; flex-direction: column; gap: .5rem; width: 100%; margin-top: .5rem; }
.chat-suggestion {
  padding: .625rem 1rem;
  border-radius: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  font-size: .8rem;
  color: var(--text-primary);
  cursor: pointer;
  text-align: left;
  transition: var(--transition);
  font-family: 'Inter', sans-serif;
}
.chat-suggestion:hover {
  border-color: var(--primary);
  background: var(--gradient-glow);
  color: var(--primary);
}
[dir="rtl"] .chat-suggestion { text-align: right; }

/* Message Bubbles */
.chat-msg { display: flex; gap: .5rem; max-width: 88%; }
.chat-msg-user { align-self: flex-end; flex-direction: row-reverse; }
.chat-msg-bot { align-self: flex-start; }

.chat-msg-avatar {
  width: 28px; height: 28px; flex-shrink: 0;
  border-radius: 8px;
  background: var(--gradient-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 4px;
}
.chat-msg-avatar img { width: 18px; height: 18px; object-fit: contain; }
.chat-msg-avatar span { font-size: .65rem; font-weight: 800; color: var(--primary); }

.chat-msg-bubble {
  padding: .75rem 1rem;
  border-radius: 16px;
  font-size: .875rem;
  line-height: 1.55;
  position: relative;
}
.chat-msg-user .chat-msg-bubble {
  background: var(--gradient-primary);
  color: #fff;
  border-bottom-right-radius: 4px;
}
[dir="rtl"] .chat-msg-user .chat-msg-bubble { border-bottom-right-radius: 16px; border-bottom-left-radius: 4px; }
.chat-msg-bot .chat-msg-bubble {
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  border-bottom-left-radius: 4px;
}
[dir="rtl"] .chat-msg-bot .chat-msg-bubble { border-bottom-left-radius: 16px; border-bottom-right-radius: 4px; }

.chat-msg-text { word-break: break-word; }
.chat-msg-text code {
  background: rgba(234, 91, 53, .08);
  padding: .1em .35em;
  border-radius: 4px;
  font-size: .8em;
  font-family: 'Courier New', monospace;
  color: var(--primary);
}
.chat-msg-text pre {
  background: var(--bg-tertiary);
  padding: .75rem;
  border-radius: 8px;
  overflow-x: auto;
  margin: .5rem 0;
  font-size: .78rem;
}
.chat-msg-text pre code {
  background: none;
  padding: 0;
  color: var(--text-primary);
}
.chat-msg-text strong { font-weight: 600; }

.chat-msg-time {
  display: block;
  font-size: .65rem;
  opacity: .5;
  margin-top: .375rem;
}
.chat-msg-user .chat-msg-time { text-align: right; }
[dir="rtl"] .chat-msg-user .chat-msg-time { text-align: left; }

.chat-msg-file {
  font-size: .75rem;
  opacity: .8;
  margin-bottom: .25rem;
}
.chat-msg-file i { margin-right: .25rem; }
[dir="rtl"] .chat-msg-file i { margin-right: 0; margin-left: .25rem; }

.chat-error { color: var(--crimson) !important; }

/* Typing Indicator */
.chat-typing {
  display: flex;
  gap: 4px;
  padding: .25rem 0;
}
.chat-typing span {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--primary);
  opacity: .4;
  animation: typingDot 1.4s ease-in-out infinite;
}
.chat-typing span:nth-child(2) { animation-delay: .2s; }
.chat-typing span:nth-child(3) { animation-delay: .4s; }
@keyframes typingDot {
  0%,60%,100% { opacity: .4; transform: translateY(0); }
  30%          { opacity: 1; transform: translateY(-4px); }
}

/* Input Area */
.chat-input-area {
  padding: .75rem 1rem;
  border-top: 1px solid var(--border-color);
  background: var(--bg-card);
  flex-shrink: 0;
}
.chat-input-row {
  display: flex;
  align-items: flex-end;
  gap: .5rem;
  background: var(--bg-secondary);
  border-radius: 14px;
  border: 1px solid var(--border-color);
  padding: .375rem .5rem;
  transition: var(--transition);
}
.chat-input-row:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(234, 91, 53, .1);
}

.chat-input-row textarea {
  flex: 1;
  border: none;
  background: transparent;
  resize: none;
  font-family: 'Inter', sans-serif;
  font-size: .875rem;
  color: var(--text-primary);
  padding: .375rem .25rem;
  line-height: 1.45;
  outline: none;
  max-height: 120px;
}
.chat-input-row textarea::placeholder { color: var(--text-tertiary); }

.chat-attach-btn {
  width: 34px; height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  cursor: pointer;
  color: var(--text-tertiary);
  transition: var(--transition);
  flex-shrink: 0;
}
.chat-attach-btn:hover { color: var(--primary); background: var(--gradient-glow); }

.chat-send-btn {
  width: 34px; height: 34px;
  border-radius: 10px;
  background: var(--gradient-primary);
  border: none;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: .85rem;
  transition: var(--transition);
  flex-shrink: 0;
}
.chat-send-btn:disabled { opacity: .35; cursor: not-allowed; }
.chat-send-btn:not(:disabled):hover { transform: scale(1.05); box-shadow: 0 4px 12px rgba(234, 91, 53, .35); }

.chat-file-preview {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .375rem .75rem;
  margin-bottom: .5rem;
  background: var(--gradient-glow);
  border-radius: 10px;
  font-size: .78rem;
  color: var(--primary);
}
.chat-file-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-file-remove {
  width: 22px; height: 22px;
  border: none;
  background: rgba(234, 91, 53, .15);
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .65rem;
  color: var(--primary);
  transition: var(--transition);
}
.chat-file-remove:hover { background: var(--primary); color: #fff; }

.chat-powered {
  text-align: center;
  font-size: .65rem;
  color: var(--text-tertiary);
  margin-top: .5rem;
}

/* Toast */
.chat-toast {
  position: fixed;
  bottom: 7rem;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background: var(--bg-dark);
  color: var(--offwhite);
  padding: .625rem 1.25rem;
  border-radius: 10px;
  font-size: .8rem;
  z-index: 10002;
  opacity: 0;
  visibility: hidden;
  transition: all .3s;
}
.chat-toast.visible { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }

/* Responsive */
@media (max-width: 480px) {
  .chat-panel {
    width: calc(100vw - 1rem);
    right: .5rem;
    bottom: 5.5rem;
    max-height: calc(100dvh - 7rem);
    border-radius: var(--radius);
  }
  [dir="rtl"] .chat-panel { right: auto; left: .5rem; }
  .chat-fab { bottom: 1.25rem; right: 1.25rem; width: 54px; height: 54px; }
  [dir="rtl"] .chat-fab { right: auto; left: 1.25rem; }
  .chat-messages { min-height: 250px; max-height: 50vh; }
}

/* ---------- Back to Top ---------- */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  left: 2rem;
  width: 46px; height: 46px;
  background: var(--navy);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--offwhite);
  font-size: 1.1rem;
  z-index: 998;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  box-shadow: var(--shadow);
}

[dir="rtl"] .back-to-top { left: auto; right: 2rem; }

.back-to-top.visible { opacity: 1; visibility: visible; }
.back-to-top:hover { background: var(--primary); transform: translateY(-3px); }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 1024px) {
  .hero .container { grid-template-columns: 1fr; text-align: center; }
  .hero p { margin-left: auto; margin-right: auto; }
  .hero-btns { justify-content: center; }
  .hero-stats { justify-content: center; }
  .hero-visual { display: none; }
  .why-grid, .about-story, .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .service-detail-card { grid-template-columns: 1fr; }
  .service-detail-card:nth-child(even) { direction: ltr; }
  [dir="rtl"] .service-detail-card:nth-child(even) { direction: rtl; }
  .feature-card-lg { grid-column: span 1; grid-template-columns: 1fr; }
  .process-grid { grid-template-columns: 1fr 1fr; }
  .process-grid::before { display: none; }
}

@media (max-width: 768px) {
  .section { padding: 4rem 0; }
  .nav-links, .nav-cta .btn { display: none; }
  .nav-toggle { display: flex; }

  .nav-links.active {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100vh;
    background: var(--bg-primary);
    justify-content: center;
    align-items: center;
    gap: 2rem;
    z-index: 1000;
  }

  .nav-links.active a {
    color: var(--text-primary) !important;
    font-size: 1.25rem;
  }

  .services-grid, .features-grid, .testimonials-grid, .blog-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
  .hero-stats { flex-wrap: wrap; gap: 1.5rem; }
  .form-row { grid-template-columns: 1fr; }
  .page-hero { padding: 8rem 0 3rem; }
  .cta-btns { flex-direction: column; align-items: center; }
  .process-grid { grid-template-columns: 1fr; }
  .values-grid, .team-grid { grid-template-columns: 1fr; }
  .contact-info-card, .contact-form-card { padding: 2rem; }
}

@media (max-width: 480px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.75rem; }
  .hero { padding-top: 60px; }
  .btn { padding: 0.75rem 1.5rem; font-size: 0.9rem; }
  .service-card, .feature-card, .blog-card-body { padding: 1.75rem; }
  .back-to-top { left: 1.25rem; bottom: 1.25rem; }
  [dir="rtl"] .back-to-top { left: auto; right: 1.25rem; }
}
