body {
  scroll-behavior: smooth;
}

.text-gradient {
  background: linear-gradient(135deg, #7a18f4 0%, #00d2ff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.tech-grid {
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 40px 40px;
}

.tech-grid-animated {
  animation: grid-drift 24s linear infinite;
  opacity: 0.9;
}

@keyframes grid-drift {
  0% { background-position: 0 0, 0 0; }
  100% { background-position: 40px 40px, 40px 40px; }
}

.hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
  opacity: 0.85;
}

.hero-scanline {
  z-index: 2;
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(0, 210, 255, 0.04) 48%,
    rgba(122, 24, 244, 0.06) 52%,
    transparent 100%
  );
  background-size: 100% 220%;
  animation: scanline-move 6s ease-in-out infinite;
  pointer-events: none;
}

@keyframes scanline-move {
  0%, 100% { background-position: 0 -80%; }
  50% { background-position: 0 180%; }
}

@keyframes float-slow {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-28px) scale(1.08); }
}

@keyframes float-alt {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(12px, -18px) scale(1.06); }
  66% { transform: translate(-10px, 14px) scale(0.98); }
}

@keyframes glow-pulse {
  0%, 100% { opacity: 0.45; transform: scale(1); }
  50% { opacity: 0.85; transform: scale(1.12); }
}

.animate-glow-1 {
  animation: float-slow 6s ease-in-out infinite;
}

.animate-glow-2 {
  animation: float-alt 9s ease-in-out infinite 1s;
}

.animate-glow-3 {
  animation: float-slow 11s ease-in-out infinite 3s;
}

.animate-glow-pulse {
  animation: glow-pulse 4s ease-in-out infinite;
}

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

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

.animate-spin-slow {
  animation: spin-slow 28s linear infinite;
}

.animate-spin-mid {
  animation: spin-reverse 18s linear infinite;
}

.animate-spin-reverse {
  animation: spin-slow 12s linear infinite;
}

@keyframes pulse-ring {
  0%, 100% { transform: scale(1); opacity: 0.35; }
  50% { transform: scale(1.04); opacity: 0.75; }
}

.animate-pulse-ring {
  animation: pulse-ring 3s ease-in-out infinite;
}

.hero-orb::before {
  content: "";
  position: absolute;
  inset: -8%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 210, 255, 0.12) 0%, transparent 65%);
  animation: glow-pulse 5s ease-in-out infinite;
  pointer-events: none;
}

.hero-dot {
  position: absolute;
  border-radius: 50%;
  animation: dot-float 4s ease-in-out infinite;
}

.hero-dot-1 {
  top: 1rem;
  inset-inline-start: 3rem;
  width: 0.75rem;
  height: 0.75rem;
  background: #00d2ff;
  box-shadow: 0 0 12px #00d2ff;
  animation-duration: 3s;
}

.hero-dot-2 {
  bottom: 2rem;
  inset-inline-end: 2.5rem;
  width: 0.625rem;
  height: 0.625rem;
  background: #7a18f4;
  box-shadow: 0 0 10px #7a18f4;
  animation-duration: 4.5s;
  animation-delay: 0.5s;
}

.hero-dot-3 {
  top: 50%;
  inset-inline-end: 0.5rem;
  width: 0.5rem;
  height: 0.5rem;
  background: #fff;
  opacity: 0.7;
  animation-duration: 5s;
  animation-delay: 1s;
}

.hero-dot-4 {
  bottom: 1rem;
  inset-inline-start: 1.5rem;
  width: 0.375rem;
  height: 0.375rem;
  background: #00d2ff;
  animation: dot-ping 2s ease-in-out infinite;
}

@keyframes dot-float {
  0%, 100% { transform: translateY(0); opacity: 1; }
  50% { transform: translateY(-8px); opacity: 0.65; }
}

@keyframes dot-ping {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.8); opacity: 0.35; }
}

.hero-section > .relative.max-w-7xl {
  position: relative;
  z-index: 10;
}

/* أيقونة الهيرو — أبيض مع توهج (مثل الشعار السابق) */
.hero-icon {
  filter: brightness(0) invert(1) drop-shadow(0 0 15px rgba(0, 212, 255, 0.35));
}

/* شعار أكبر بصرياً دون توسيع ارتفاع الهيدر */
.logo-nav {
  height: 3.25rem;
  width: auto;
  object-fit: contain;
  transform: scale(1.55);
  transform-origin: inline-start center;
  transition: transform 0.3s ease;
}

.logo-nav:hover {
  transform: scale(1.62);
}

html[dir="rtl"] .logo-nav {
  transform-origin: inline-end center;
}

/* شعار الفوتر — تكبير بصري دون توسيع ارتفاع القسم */
.logo-footer {
  height: 2.5rem;
  width: auto;
  object-fit: contain;
  transform: scale(1.55);
  transform-origin: center center;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.logo-footer:hover {
  transform: scale(1.62);
  opacity: 0.9;
}

#navbar {
  overflow: visible;
}

#navbar.navbar-scrolled {
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 1px 12px rgba(0, 0, 0, 0.06);
}

.mobile-menu {
  display: none;
}

.mobile-menu.is-open {
  display: block;
}

@media (min-width: 768px) {
  .mobile-menu {
    display: none !important;
  }
}

.mobile-nav-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 20rem;
  padding: 0.85rem 1rem;
  font-weight: 600;
  font-size: 0.95rem;
  text-align: center;
  color: #ffffff;
  border-radius: 0.75rem;
  min-height: 44px;
  transition: background 0.2s ease, color 0.2s ease;
}

.mobile-nav-link:hover,
.mobile-nav-link:focus-visible {
  background: rgba(255, 255, 255, 0.08);
  color: #00d2ff;
}

#navToggle.is-active .nav-bar:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

#navToggle.is-active .nav-bar:nth-child(2) {
  opacity: 0;
}

#navToggle.is-active .nav-bar:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

.nav-bar {
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.service-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: #fff;
  padding: 2rem;
  border-radius: 1rem;
  border: 1px solid #f3f4f6;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.service-card:hover {
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
}

.icon-box {
  width: 3rem;
  height: 3rem;
  background: #f9fafb;
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  color: #090d26;
  transition: background 0.3s ease, color 0.3s ease;
}

.icon-box-purple {
  color: #7a18f4;
}

.icon-box-cyan {
  color: #00d2ff;
}

.card-footer {
  padding-top: 1.5rem;
  margin-top: 1.5rem;
  border-top: 1px solid #f9fafb;
}

.card-link {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  color: #7a18f4;
  font-weight: 700;
  font-size: 0.75rem;
  transition: gap 0.25s ease;
}

.card-link:hover {
  gap: 0.625rem;
}

html[dir="ltr"] .card-arrow {
  transform: scaleX(-1);
}

.fab-cta {
  position: fixed;
  z-index: 100;
  bottom: calc(1.25rem + env(safe-area-inset-bottom, 0px));
  inset-inline-end: 1.25rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.25rem;
  min-height: 52px;
  background: linear-gradient(135deg, #7a18f4, #00d2ff);
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
  border-radius: 999px;
  box-shadow: 0 6px 28px rgba(123, 47, 247, 0.45);
  transition: transform 0.25s ease;
}

.fab-cta svg {
  width: 20px;
  height: 20px;
}

.fab-cta:hover {
  transform: scale(1.03);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .hero-canvas {
    display: none;
  }

  .tech-grid-animated,
  .hero-scanline,
  .animate-glow-1,
  .animate-glow-2,
  .animate-glow-3,
  .animate-glow-pulse,
  .animate-spin-slow,
  .animate-spin-mid,
  .animate-spin-reverse,
  .animate-pulse-ring,
  .animate-ping,
  .animate-pulse,
  .hero-dot,
  .hero-orb::before {
    animation: none !important;
  }
}

@media (max-width: 380px) {
  .fab-cta span {
    display: none;
  }

  .fab-cta {
    width: 52px;
    height: 52px;
    padding: 0;
    justify-content: center;
    border-radius: 50%;
  }
}
