:root {
  --primary: #293d93;
  --secondary: #4fb1e0;
  --accent: #06b6d4;
  --dark: #0f172a;
  --light: #f8fafc;
}

* {
  transition: all 0.3s ease;
}
/* الخط العربي */
@font-face {
  font-family: "DG Agnadeen";
  src: url("./assets/DG_agnadeen/DGAgnadeen-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
}

body {
  font-family: sans-serif; /* الخط الافتراضي للإنجليزي */
  overflow-x: hidden;
}

.gradient-bg {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
}

.gradient-text {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.card-gradient {
  background: linear-gradient(
    135deg,
    rgba(41, 61, 147, 0.05) 0%,
    rgba(79, 177, 224, 0.05) 100%
  );
}

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

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

.language-ar {
  direction: rtl;
  font-family: "DG Agnadeen", sans-serif; /* الخط العربي */
}

.slide-in-left {
  transform: translateX(-50px);
  opacity: 0;
  transition: transform 0.8s ease, opacity 0.8s ease;
}

.slide-in-right {
  transform: translateX(50px);
  opacity: 0;
  transition: transform 0.8s ease, opacity 0.8s ease;
}

.slide-in-left.visible,
.slide-in-right.visible {
  transform: translateX(0);
  opacity: 1;
}

.scale-in {
  transform: scale(0.9);
  opacity: 0;
  transition: transform 0.6s ease, opacity 0.6s ease;
}

.scale-in.visible {
  transform: scale(1);
  opacity: 1;
}

.hexagon {
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
}

.glow {
  box-shadow: 0 0 20px rgba(79, 177, 224, 0.3);
}

.glow:hover {
  box-shadow: 0 0 30px rgba(79, 177, 224, 0.5);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(41, 61, 147, 0.2);
}

.nav-link {
  position: relative;
}

.nav-link:after {
  content: "";
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -5px;
  left: 0;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  transition: width 0.3s ease;
}

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

.language-ar .nav-link:after {
  left: auto;
  right: 0;
}

/* Updated Mobile Menu Styles */
.mobile-menu {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: white;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  z-index: 9999;
  overflow: hidden;
}

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

.mobile-menu-content {
  padding: 5rem 1.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  height: 100%;
  overflow-y: auto;
}

.mobile-nav-link {
  display: block;
  padding: 0.75rem 1rem;
  color: #374151;
  font-weight: 500;
  border-radius: 8px;
  transition: all 0.2s ease;
  text-align: center;
}

.mobile-nav-link:hover {
  background-color: rgba(41, 61, 147, 0.05);
  color: var(--primary);
}

.mobile-language-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 1rem;
  margin-top: auto;
  border-top: 1px solid #e5e7eb;
}

.mobile-close-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: #374151;
  cursor: pointer;
  z-index: 10000;
}

.language-ar .mobile-menu {
  right: 0;
  left: auto;
}

.partner-logo {
  filter: grayscale(100%);
  opacity: 0.7;
}

.partner-logo:hover {
  filter: grayscale(0%);
  opacity: 1;
  transform: scale(1.05);
}

.service-card {
  transform: translateY(0);
}

.service-card:hover {
  transform: translateY(-10px);
}

.project-card {
  overflow: hidden;
}

.project-overlay {
  background: linear-gradient(
    to top,
    rgba(41, 61, 147, 0.9) 0%,
    rgba(79, 177, 224, 0.7) 100%
  );
  opacity: 0;
  transform: translateY(100%);
  transition: all 0.4s ease;
}

.project-card:hover .project-overlay {
  opacity: 1;
  transform: translateY(0);
}

.value-icon {
  background: linear-gradient(
    135deg,
    rgba(41, 61, 147, 0.1) 0%,
    rgba(79, 177, 224, 0.1) 100%
  );
}

.client-slider {
  animation: scroll 30s linear infinite;
  display: flex;
  width: max-content;
}

@keyframes scroll {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(-50%);
  }
}

.paused {
  animation-play-state: paused;
}

.whatsapp-btn {
  background: #25d366;
}

.whatsapp-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 10px 20px rgba(37, 211, 102, 0.3);
}

@media (max-width: 768px) {
  .client-slider {
    animation: scroll 20s linear infinite;
  }

  .morphing-shape {
    display: none;
  }

  .particles {
    opacity: 0.5;
  }
}

@media (max-width: 1024px) {
  .language-ar .mobile-menu {
    right: 0;
    left: auto;
  }
}

@media (max-width: 640px) {
  .creative-text {
    font-size: 2rem;
  }

  .gradient-text {
    font-size: 1.5rem;
  }
}

/* Creative Particle System */
.particles {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.particle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: radial-gradient(circle, var(--secondary) 0%, transparent 70%);
  border-radius: 50%;
  animation: float 6s ease-in-out infinite;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0px) rotate(0deg);
    opacity: 0.7;
  }

  50% {
    transform: translateY(-20px) rotate(180deg);
    opacity: 1;
  }
}

.morphing-shape {
  position: absolute;
  width: 200px;
  height: 200px;
  background: linear-gradient(
    135deg,
    var(--primary) 0%,
    var(--secondary) 50%,
    var(--accent) 100%
  );
  animation: morphHex 20s cubic-bezier(0.4, 0, 0.2, 1) infinite;
  filter: blur(3px) drop-shadow(0 8px 32px rgba(0, 0, 0, 0.3));
  opacity: 0.75;
  will-change: transform, clip-path, filter;
  backdrop-filter: blur(10px);
  box-shadow: inset 0 0 60px rgba(255, 255, 255, 0.1),
    0 0 80px rgba(var(--primary-rgb), 0.3),
    0 0 120px rgba(var(--accent-rgb), 0.2);
}

/* 4. الأنيميشن الناعم جداً (كما طلبته) */
@keyframes morphHex {
  0% {
    clip-path: circle(50% at 50% 50%);
    transform: rotate(0deg) scale(1) translateZ(0);
    filter: blur(3px) drop-shadow(0 8px 32px rgba(0, 0, 0, 0.3)) brightness(1);
    box-shadow: inset 0 0 60px rgba(255, 255, 255, 0.1),
      0 0 80px rgba(var(--primary-rgb), 0.3),
      0 0 120px rgba(var(--accent-rgb), 0.2);
  }

  5% {
    clip-path: circle(51% at 50% 50%);
    transform: rotate(9deg) scale(1.01) translateZ(0);
  }

  10% {
    clip-path: ellipse(52% 49% at 50% 50%);
    transform: rotate(18deg) scale(1.02) translateZ(0);
    filter: blur(2.9px) drop-shadow(0 9px 34px rgba(0, 0, 0, 0.32))
      brightness(1.02);
  }

  15% {
    clip-path: ellipse(54% 48% at 50% 50%);
    transform: rotate(27deg) scale(1.03) translateZ(0);
  }

  20% {
    clip-path: ellipse(55% 47% at 50% 50%);
    transform: rotate(36deg) scale(1.05) translateZ(0);
    filter: blur(2.7px) drop-shadow(0 10px 36px rgba(0, 0, 0, 0.35))
      brightness(1.05);
    box-shadow: inset 0 0 65px rgba(255, 255, 255, 0.12),
      0 0 90px rgba(var(--secondary-rgb), 0.35),
      0 0 130px rgba(var(--primary-rgb), 0.22);
  }

  25% {
    clip-path: polygon(35% 10%, 65% 10%, 90% 50%, 65% 90%, 35% 90%, 10% 50%);
    transform: rotate(54deg) scale(1.07) translateZ(0);
  }

  30% {
    clip-path: polygon(32% 9%, 68% 9%, 93% 50%, 68% 91%, 32% 91%, 7% 50%);
    transform: rotate(72deg) scale(1.09) translateZ(0);
    filter: blur(2.4px) drop-shadow(0 12px 40px rgba(0, 0, 0, 0.4))
      brightness(1.08);
  }

  35% {
    clip-path: polygon(30% 8%, 70% 8%, 95% 50%, 70% 92%, 30% 92%, 5% 50%);
    transform: rotate(90deg) scale(1.12) translateZ(0);
    filter: blur(2.2px) drop-shadow(0 14px 44px rgba(0, 0, 0, 0.45))
      brightness(1.12);
    box-shadow: inset 0 0 75px rgba(255, 255, 255, 0.17),
      0 0 110px rgba(var(--accent-rgb), 0.45),
      0 0 150px rgba(var(--secondary-rgb), 0.28);
  }

  40% {
    clip-path: polygon(27% 7%, 73% 7%, 97% 50%, 73% 93%, 27% 93%, 3% 50%);
    transform: rotate(108deg) scale(1.16) translateZ(0);
  }

  45% {
    clip-path: polygon(
      26% 6.5%,
      74% 6.5%,
      99% 50%,
      74% 93.5%,
      26% 93.5%,
      1% 50%
    );
    transform: rotate(144deg) scale(1.2) translateZ(0);
    filter: blur(1.8px) drop-shadow(0 16px 50px rgba(0, 0, 0, 0.5))
      brightness(1.16);
  }

  50% {
    clip-path: polygon(25% 6%, 75% 6%, 100% 50%, 75% 94%, 25% 94%, 0% 50%);
    transform: rotate(180deg) scale(1.25) translateZ(0);
    filter: blur(1.5px) drop-shadow(0 20px 60px rgba(0, 0, 0, 0.6))
      brightness(1.2);
    box-shadow: inset 0 0 100px rgba(255, 255, 255, 0.25),
      0 0 150px rgba(var(--primary-rgb), 0.6),
      0 0 200px rgba(var(--accent-rgb), 0.4);
  }

  55% {
    clip-path: polygon(
      26% 6.5%,
      74% 6.5%,
      99% 50%,
      74% 93.5%,
      26% 93.5%,
      1% 50%
    );
    transform: rotate(216deg) scale(1.2) translateZ(0);
    filter: blur(1.8px) drop-shadow(0 16px 50px rgba(0, 0, 0, 0.5))
      brightness(1.16);
  }

  60% {
    clip-path: polygon(27% 7%, 73% 7%, 97% 50%, 73% 93%, 27% 93%, 3% 50%);
    transform: rotate(252deg) scale(1.16) translateZ(0);
  }

  65% {
    clip-path: polygon(30% 8%, 70% 8%, 95% 50%, 70% 92%, 30% 92%, 5% 50%);
    transform: rotate(270deg) scale(1.12) translateZ(0);
    filter: blur(2.2px) drop-shadow(0 14px 44px rgba(0, 0, 0, 0.45))
      brightness(1.12);
    box-shadow: inset 0 0 75px rgba(255, 255, 255, 0.17),
      0 0 110px rgba(var(--secondary-rgb), 0.45),
      0 0 150px rgba(var(--primary-rgb), 0.28);
  }

  70% {
    clip-path: polygon(32% 9%, 68% 9%, 93% 50%, 68% 91%, 32% 91%, 7% 50%);
    transform: rotate(288deg) scale(1.09) translateZ(0);
    filter: blur(2.4px) drop-shadow(0 12px 40px rgba(0, 0, 0, 0.4))
      brightness(1.08);
  }

  75% {
    clip-path: polygon(35% 10%, 65% 10%, 90% 50%, 65% 90%, 35% 90%, 10% 50%);
    transform: rotate(306deg) scale(1.07) translateZ(0);
  }

  80% {
    clip-path: ellipse(55% 47% at 50% 50%);
    transform: rotate(324deg) scale(1.05) translateZ(0);
    filter: blur(2.7px) drop-shadow(0 10px 36px rgba(0, 0, 0, 0.35))
      brightness(1.05);
    box-shadow: inset 0 0 65px rgba(255, 255, 255, 0.12),
      0 0 90px rgba(var(--accent-rgb), 0.35),
      0 0 130px rgba(var(--secondary-rgb), 0.22);
  }

  85% {
    clip-path: ellipse(54% 48% at 50% 50%);
    transform: rotate(333deg) scale(1.03) translateZ(0);
  }

  90% {
    clip-path: ellipse(52% 49% at 50% 50%);
    transform: rotate(342deg) scale(1.02) translateZ(0);
    filter: blur(2.9px) drop-shadow(0 9px 34px rgba(0, 0, 0, 0.32))
      brightness(1.02);
  }

  95% {
    clip-path: circle(51% at 50% 50%);
    transform: rotate(351deg) scale(1.01) translateZ(0);
  }

  100% {
    clip-path: circle(50% at 50% 50%);
    transform: rotate(360deg) scale(1) translateZ(0);
    filter: blur(3px) drop-shadow(0 8px 32px rgba(0, 0, 0, 0.3)) brightness(1);
    box-shadow: inset 0 0 60px rgba(255, 255, 255, 0.1),
      0 0 80px rgba(var(--primary-rgb), 0.3),
      0 0 120px rgba(var(--accent-rgb), 0.2);
  }
}

/* Creative Gradient Backgrounds */
.gradient-bg::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    45deg,
    transparent 30%,
    rgba(255, 255, 255, 0.1) 50%,
    transparent 70%
  );
  animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
  0% {
    transform: translateX(-100%);
  }

  100% {
    transform: translateX(100%);
  }
}

/* Creative Text Effects */
.creative-text {
  position: relative;
  display: inline-block;
}

.creative-text::before {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 150%;
  background: linear-gradient(
    45deg,
    var(--primary),
    var(--secondary),
    var(--accent)
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: textGlow 2s ease-in-out infinite alternate;
}

@keyframes textGlow {
  0% {
    filter: blur(0px) brightness(1);
  }

  100% {
    filter: blur(1px) brightness(1.2);
  }
}

/* Creative Cards */
.creative-card {
  position: relative;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  overflow: hidden;
}

.creative-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: left 0.6s;
}

.creative-card:hover::before {
  left: 100%;
}

.creative-card:hover {
  transform: translateY(-10px) rotateX(5deg);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

/* Creative Buttons */
.creative-btn {
  position: relative;
  background: linear-gradient(45deg, var(--primary), var(--secondary));
  border: none;
  border-radius: 50px;
  overflow: hidden;
  transition: all 0.3s ease;
}

.creative-btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent
  );
  transition: left 0.6s;
}

.creative-btn:hover::before {
  left: 100%;
}

.creative-btn:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* Creative Rain Effects */
.rain-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}

.rain-drop {
  position: absolute;
  width: 2px;
  height: 20px;
  background: linear-gradient(
    to bottom,
    transparent,
    var(--secondary),
    var(--accent)
  );
  border-radius: 50px;
  animation: rainFall linear infinite;
  box-shadow: 0 0 6px var(--secondary);
}

.rain-drop:nth-child(odd) {
  background: linear-gradient(
    to bottom,
    transparent,
    var(--primary),
    var(--secondary)
  );
  box-shadow: 0 0 4px var(--primary);
}

@keyframes rainFall {
  0% {
    transform: translateY(-100vh) rotate(15deg);
    opacity: 0;
  }

  10% {
    opacity: 1;
  }

  90% {
    opacity: 1;
  }

  100% {
    transform: translateY(100vh) rotate(15deg);
    opacity: 0;
  }
}

/* Creative Animations */
.bounce-in {
  animation: bounceIn 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes bounceIn {
  0% {
    transform: scale(0.3) rotate(-10deg);
    opacity: 0;
  }

  50% {
    transform: scale(1.1) rotate(5deg);
  }

  100% {
    transform: scale(1) rotate(0deg);
    opacity: 1;
  }
}

/* Creative Hover Effects */
.hover-lift {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.hover-lift:hover {
  transform: translateY(-10px) scale(1.05) rotateX(5deg);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.2);
}

/* Creative Glass Effect */
.glass {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

/* Creative Grid Pattern */
.grid-pattern {
  background-image: linear-gradient(
      rgba(255, 255, 255, 0.1) 1px,
      transparent 1px
    ),
    linear-gradient(90deg, rgba(255, 255, 255, 0.1) 1px, transparent 1px);
  background-size: 50px 50px;
  animation: gridMove 20s linear infinite;
}

@keyframes gridMove {
  0% {
    background-position: 0 0;
  }

  100% {
    background-position: 50px 50px;
  }
}

/* Enhanced Gradient Text */
.gradient-text {
  background: linear-gradient(
    135deg,
    var(--primary) 0%,
    var(--secondary) 50%,
    var(--accent) 100%
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  background-size: 200% 200%;
  animation: gradientShift 3s ease-in-out infinite;
}

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

  50% {
    background-position: 100% 50%;
  }
}

/* Improved responsive design */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

@media (min-width: 640px) {
  .container {
    padding: 0 1.5rem;
  }
}

@media (min-width: 1024px) {
  .container {
    padding: 0 2rem;
  }
}

/* Fix for mobile menu scroll */
body.menu-open {
  overflow: hidden;
}
