/* =========== CSS Variables =========== */
:root {
  /* الألوان الأساسية */
  --primary-color: #2563eb;
  --secondary-color: #1e40af;
  --accent-color: #60a5fa;
  --success-color: #10b981;
  --warning-color: #f59e0b;
  --error-color: #ef4444;
  --info-color: #3b82f6;
  
  /* ألوان النص */
  --text-color: #1f2937;
  --text-light: #6b7280;
  --text-lighter: #9ca3af;
  
  /* ألوان الخلفية */
  --light-bg: #f3f4f6;
  --dark-bg: #111827;
  --white: #ffffff;
  --gray: #9ca3af;
  
  /* تباعدات وحدود */
  --border-radius-sm: 4px;
  --border-radius-md: 8px;
  --border-radius-lg: 16px;
  --border-radius-xl: 24px;
  --border-radius-full: 9999px;
  
  /* مدة التحولات */
  --transition-fast: 0.2s;
  --transition-normal: 0.3s;
  --transition-slow: 0.5s;
  
  /* ظلال */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  
  /* قيم النمط الداكن - سيتم تحديثها عند تفعيل الوضع الداكن */
}

/* النمط الداكن */
body.dark-mode {
  --primary-color: #3b82f6;
  --secondary-color: #1d4ed8;
  --accent-color: #93c5fd;
  --text-color: #f3f4f6;
  --text-light: #e5e7eb;
  --text-lighter: #d1d5db;
  --light-bg: #1f2937;
  --dark-bg: #030712;
  --white: #111827;
  --gray: #6b7280;
  
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.2);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.2);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.3), 0 10px 10px -5px rgba(0, 0, 0, 0.2);
}

/* =========== أنماط عامة =========== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  color: var(--text-color);
  line-height: 1.6;
  overflow-x: hidden;
  background-color: var(--white);
  transition: background-color var(--transition-normal), color var(--transition-normal);
}

body.ltr {
  direction: ltr;
}

body.page-loading {
  overflow: hidden;
}

/* الوصول */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

.hidden {
  display: none;
}

/* =========== شاشة التحميل =========== */
.loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--white);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

body:not(.page-loading) .loading-screen {
  opacity: 0;
  visibility: hidden;
}

.loader {
  width: 60px;
  height: 60px;
  border: 5px solid var(--light-bg);
  border-top: 5px solid var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 20px;
}

.loader-logo {
  width: 100px;
  animation: pulsate 2s ease-in-out infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes pulsate {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.1); opacity: 0.8; }
  100% { transform: scale(1); opacity: 1; }
}

/* =========== زر تبديل الوضع الداكن =========== */
.theme-toggle {
  position: fixed;
  bottom: 30px;
  left: 30px;
  width: 50px;
  height: 50px;
  border-radius: var(--border-radius-full);
  background-color: var(--primary-color);
  color: var(--white);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  cursor: pointer;
  z-index: 900;
  box-shadow: var(--shadow-md);
  transition: background-color var(--transition-normal), transform var(--transition-normal);
}

.theme-toggle:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.theme-toggle .fa-sun {
  display: none;
}

.dark-mode .theme-toggle .fa-moon {
  display: none;
}

.dark-mode .theme-toggle .fa-sun {
  display: inline-block;
}

/* =========== زر العودة للأعلى =========== */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  border-radius: var(--border-radius-full);
  background-color: var(--primary-color);
  color: var(--white);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  cursor: pointer;
  z-index: 900;
  box-shadow: var(--shadow-md);
  opacity: 0;
  transition: background-color var(--transition-normal), transform var(--transition-normal), opacity var(--transition-normal);
}

.back-to-top:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.back-to-top.visible {
  opacity: 1;
}

/* =========== الهيدر =========== */
header {
  background-color: var(--white);
  padding: 1rem 2rem;
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow-md);
  transition: background-color var(--transition-normal), box-shadow var(--transition-normal), transform var(--transition-normal);
}

header.scrolled {
  background-color: var(--white);
  box-shadow: var(--shadow-lg);
}

header.hidden {
  transform: translateY(-100%);
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
}

.logo {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--text-color);
  text-decoration: none;
  display: flex;
  align-items: center;
  transition: color var(--transition-normal);
}

.logo:hover {
  color: var(--primary-color);
}

.logo-img {
  height: 40px;
  margin-left: 10px;
  transition: transform var(--transition-normal);
}

.logo:hover .logo-img {
  transform: rotate(10deg);
}

.logo-text {
  font-weight: 700;
}

.accent-text {
  color: var(--primary-color);
}

.nav-links {
  display: flex;
  list-style: none;
}

.nav-links li {
  margin-left: 1.5rem;
}

.nav-links a {
  color: var(--text-color);
  text-decoration: none;
  font-weight: 500;
  position: relative;
  transition: color var(--transition-normal);
}

.nav-links a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -5px;
  left: 0;
  background-color: var(--primary-color);
  transition: width var(--transition-normal);
}

.nav-links a:hover {
  color: var(--primary-color);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.header-controls {
  display: flex;
  align-items: center;
}

.language-selector {
  display: flex;
  align-items: center;
  color: var(--text-color);
  margin-left: 20px;
}

.language-selector select {
  background-color: transparent;
  color: var(--text-color);
  border: 1px solid var(--gray);
  padding: 0.3rem 0.8rem;
  border-radius: var(--border-radius-sm);
  margin-right: 0.5rem;
  cursor: pointer;
  font-size: 0.9rem;
  transition: border-color var(--transition-normal), box-shadow var(--transition-normal);
}

.language-selector select:hover,
.language-selector select:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.1);
  outline: none;
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  width: 30px;
  height: 20px;
  position: relative;
  margin-left: 15px;
}

.mobile-menu-btn span {
  display: block;
  position: absolute;
  height: 3px;
  width: 100%;
  background-color: var(--text-color);
  border-radius: 3px;
  transition: all var(--transition-normal);
}

.mobile-menu-btn span:nth-child(1) {
  top: 0;
}

.mobile-menu-btn span:nth-child(2) {
  top: 8px;
}

.mobile-menu-btn span:nth-child(3) {
  top: 16px;
}

.mobile-menu-btn.active span:nth-child(1) {
  transform: rotate(45deg);
  top: 8px;
}

.mobile-menu-btn.active span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-btn.active span:nth-child(3) {
  transform: rotate(-45deg);
  top: 8px;
}

/* =========== قسم الترحيب الرئيسي =========== */
.hero {
  position: relative;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: var(--white);
  padding: 10rem 2rem 8rem;
  text-align: center;
  overflow: hidden;
}

.animated-gradient {
  background-size: 400% 400%;
  animation: gradientBG 15s ease infinite;
}

@keyframes gradientBG {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.hero-particles {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.hero-content {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
  z-index: 2;
}

.hero h1 {
  font-size: 2.8rem;
  margin-bottom: 1.5rem;
  line-height: 1.2;
}

.hero p {
  font-size: 1.2rem;
  margin-bottom: 2.5rem;
  opacity: 0.9;
  line-height: 1.6;
}

.hero-buttons {
  margin-bottom: 3rem;
}

.cta-button {
  display: inline-block;
  background-color: var(--white);
  color: var(--primary-color);
  padding: 0.9rem 2.5rem;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.5px;
  margin: 0 0.8rem;
  border: 2px solid transparent;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: transform var(--transition-normal), box-shadow var(--transition-normal), color var(--transition-normal), background-color var(--transition-normal), border-color var(--transition-normal);
  outline: none;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.cta-button:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.cta-button:active {
  transform: translateY(2px);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.cta-button::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 5px;
  height: 5px;
  background: rgba(255, 255, 255, 0.5);
  opacity: 0;
  border-radius: 100%;
  transform: scale(1, 1) translate(-50%, -50%);
  transform-origin: 50% 50%;
}

.cta-button:active::after {
  opacity: 1;
  width: 100%;
  height: 100%;
  transition: all 0.6s ease-out;
}

.secondary-cta {
  background-color: transparent;
  border: 2px solid var(--white);
  color: var(--white);
}

.secondary-cta:hover {
  background-color: var(--white);
  color: var(--primary-color);
  border-color: var(--white);
}

.pulse-effect:hover {
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

.scroll-indicator {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  animation: bounce 2s infinite;
  color: var(--white);
  font-size: 0.9rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.scroll-indicator i {
  margin-top: 8px;
  font-size: 1.2rem;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateY(0) translateX(-50%); }
  40% { transform: translateY(-10px) translateX(-50%); }
  60% { transform: translateY(-5px) translateX(-50%); }
}

/* تأثيرات الظهور للنص في الهيرو */
.reveal-text {
  opacity: 0;
  animation: fadeInUp 1s var(--transition-normal) forwards;
}

.reveal-text-delay {
  opacity: 0;
  animation: fadeInUp 1s var(--transition-normal) 0.3s forwards;
}

.reveal-text-delay-2 {
  opacity: 0;
  animation: fadeInUp 1s var(--transition-normal) 0.6s forwards;
}

@keyframes fadeInUp {
  from {
      opacity: 0;
      transform: translateY(20px);
  }
  to {
      opacity: 1;
      transform: translateY(0);
  }
}

/* =========== أقسام عامة =========== */
.section {
  padding: 6rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
}

.section-decoration {
  position: absolute;
  top: 0;
  right: 0;
  width: 150px;
  height: 150px;
  overflow: hidden;
  opacity: 0.1;
  z-index: -1;
}

.section-decoration div {
  position: absolute;
  top: -75px;
  right: -75px;
  width: 150px;
  height: 150px;
  border-radius: var(--border-radius-full);
  background-color: var(--primary-color);
}

.section-title {
  text-align: center;
  margin-bottom: 1.5rem;
  font-size: 2.2rem;
  color: var(--primary-color);
  position: relative;
  padding-bottom: 15px;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background-color: var(--primary-color);
  border-radius: var(--border-radius-full);
}

.section-subtitle {
  text-align: center;
  margin-bottom: 3rem;
  font-size: 1.1rem;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  color: var(--text-light);
}

/* تأثيرات الظهور عند التمرير */
.fade-in-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
  will-change: transform, opacity;
}

.fade-in-up.animate {
  opacity: 1;
  transform: translateY(0);
}

.fade-in-left {
  opacity: 0;
  transform: translateX(-30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
  will-change: transform, opacity;
}

.fade-in-left.animate {
  opacity: 1;
  transform: translateX(0);
}

.fade-in-right {
  opacity: 0;
  transform: translateX(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
  will-change: transform, opacity;
}

.fade-in-right.animate {
  opacity: 1;
  transform: translateX(0);
}

/* تأخير مختلف للعناصر */
.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }
.delay-4 { transition-delay: 0.4s; }
.delay-5 { transition-delay: 0.5s; }
.delay-6 { transition-delay: 0.6s; }

/* =========== قسم النبذة عن الشركة =========== */
.about-stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
  margin-top: 4rem;
}

.stat-item {
  text-align: center;
  flex: 1;
  min-width: 200px;
  padding: 2rem;
  background-color: var(--white);
  border-radius: var(--border-radius-md);
  box-shadow: var(--shadow-md);
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.stat-item:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-lg);
}

.stat-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: var(--primary-color);
}

.stat-number {
  font-size: 2.5rem;
  font-weight: bold;
  margin-bottom: 0.5rem;
  color: var(--primary-color);
}

.stat-label {
  color: var(--text-light);
  font-size: 1.1rem;
}

/* =========== قسم الخدمات =========== */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.service-card {
  background-color: var(--white);
  border-radius: var(--border-radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
  display: flex;
  flex-direction: column;
}

.service-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-lg);
}

.service-icon {
  background-color: var(--light-bg);
  padding: 2rem;
  text-align: center;
  font-size: 3rem;
  color: var(--primary-color);
  transition: transform var(--transition-slow);
}

.service-card:hover .service-icon {
  transform: scale(1.1);
}

.service-content {
  padding: 2rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.service-content h3 {
  margin-bottom: 1rem;
  color: var(--primary-color);
  font-size: 1.4rem;
}

.service-content p {
  margin-bottom: 1.5rem;
  color: var(--text-light);
  flex-grow: 1;
}

.service-link {
  display: inline-block;
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 600;
  transition: color var(--transition-normal), transform var(--transition-normal);
  align-self: flex-start;
}

.service-link i {
  margin-right: 0.5rem;
  transition: transform var(--transition-normal);
}

.service-link:hover {
  color: var(--secondary-color);
  transform: translateX(-5px);
}

.service-link:hover i {
  transform: translateX(-5px);
}

.ltr .service-link i {
  margin-right: 0;
  margin-left: 0.5rem;
  transform: rotate(180deg);
}

.ltr .service-link:hover {
  transform: translateX(5px);
}

.ltr .service-link:hover i {
  transform: translateX(5px) rotate(180deg);
}

/* =========== قسم المشاريع =========== */
.projects {
  background-color: var(--light-bg);
}

.projects-filter {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 3rem;
}

.filter-btn {
  background-color: transparent;
  border: 2px solid var(--primary-color);
  color: var(--primary-color);
  padding: 0.7rem 1.5rem;
  border-radius: 50px;
  cursor: pointer;
  font-weight: 600;
  transition: background-color var(--transition-normal), color var(--transition-normal), transform var(--transition-normal);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  margin: 0 0.3rem 0.6rem;
}

.filter-btn:hover,
.filter-btn.active {
  background-color: var(--primary-color);
  color: var(--white);
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.filter-btn.active {
  font-weight: 700;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.project-card {
  background-color: var(--white);
  border-radius: var(--border-radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.project-card:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: var(--shadow-lg);
}

.project-card[data-category] {
  display: none;
}

.project-card[data-category].show {
  display: block;
  animation: fadeIn 0.5s ease-out forwards;
}

.project-image {
  height: 200px;
  background-size: cover;
  background-position: center;
  position: relative;
  overflow: hidden;
}

.project-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--transition-normal);
}

.project-card:hover .project-overlay {
  opacity: 1;
}

.project-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  background-color: var(--white);
  color: var(--primary-color);
  border-radius: var(--border-radius-full);
  text-decoration: none;
  font-size: 1.2rem;
  transform: translateY(20px);
  opacity: 0;
  transition: all var(--transition-normal);
}

.project-card:hover .project-link {
  opacity: 1;
  transform: translateY(0);
}

.project-link:hover {
  background-color: var(--primary-color);
  color: var(--white);
}

.project-content {
  padding: 2rem;
}

.project-content h3 {
  margin-bottom: 1rem;
  color: var(--primary-color);
  font-size: 1.3rem;
}

.project-content p {
  color: var(--text-light);
  margin-bottom: 1.5rem;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.project-tag {
  background-color: var(--light-bg);
  padding: 0.3rem 0.8rem;
  border-radius: var(--border-radius-full);
  font-size: 0.8rem;
  color: var(--text-color);
}

.view-more-container {
  text-align: center;
  margin-top: 3rem;
}

.view-more-btn {
  display: inline-block;
  background-color: transparent;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
  padding: 0.8rem 2rem;
  border-radius: var(--border-radius-md);
  text-decoration: none;
  font-weight: 600;
  transition: background-color var(--transition-normal), color var(--transition-normal), transform var(--transition-normal);
}

.view-more-btn:hover {
  background-color: var(--primary-color);
  color: var(--white);
  transform: translateY(-3px);
}

/* نوافذ تفاصيل المشاريع */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1100;
    overflow-y: auto;
    padding: 40px 20px;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease-out;
}

.modal-content {
    background-color: var(--white);
    border-radius: 16px;
    max-width: 90%;
    max-height: 90vh;
    width: 100%;
    max-width: 800px;
    position: relative;
    padding: 2rem;
    box-shadow: var(--shadow-xl);
    animation: modalZoomIn 0.3s ease-out;
    overflow-y: auto;
}

@keyframes modalZoomIn {
    from { transform: scale(0.95); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--primary-color);
    color: var(--white);
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background-color: var(--secondary-color);
    transform: rotate(90deg);
}

.modal h2 {
    color: var(--primary-color);
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

.modal-images {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.modal-image {
    border-radius: var(--border-radius-sm);
    height: 150px;
    background-size: cover;
    background-position: center;
}

.modal-description {
    margin-bottom: 2rem;
}

.modal-description p {
    margin-bottom: 1.5rem;
    color: var(--text-light);
    line-height: 1.6;
}

.modal-features h3,
.modal-technologies h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.modal-features ul {
    list-style-type: none;
    margin-bottom: 1.5rem;
}

.modal-features li {
    margin-bottom: 0.5rem;
    padding-right: 1.5rem;
    position: relative;
    color: var(--text-light);
}

.modal-features li::before {
    content: '\f00c';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    position: absolute;
    right: 0;
    color: var(--primary-color);
}

.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tech-tag {
    background-color: var(--light-bg);
    color: var(--text-color);
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius-full);
    font-size: 0.9rem;
}

/* =========== قسم التقنيات =========== */
.technologies {
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.tech-category {
    text-align: center;
}

.tech-category h3 {
    color: var(--primary-color);
    margin-bottom: 2rem;
    font-size: 1.4rem;
    position: relative;
    display: inline-block;
}

.tech-category h3::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: var(--primary-color);
    border-radius: var(--border-radius-full);
}

.tech-items {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
}

.tech-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 120px;
    transition: transform var(--transition-normal);
}

.tech-item:hover {
    transform: translateY(-10px);
}

.tech-icon {
    width: 70px;
    height: 70px;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--light-bg);
    border-radius: var(--border-radius-full);
    color: var(--primary-color);
    font-size: 2rem;
    transition: transform var(--transition-normal), background-color var(--transition-normal);
}

.tech-item:hover .tech-icon {
    transform: rotate(10deg);
    background-color: var(--primary-color);
    color: var(--white);
}

.tech-item p {
    color: var(--text-color);
    font-weight: 600;
    font-size: 0.9rem;
}

.glow-on-hover {
    transition: filter var(--transition-normal);
}

.glow-on-hover:hover {
    filter: drop-shadow(0 0 5px var(--accent-color));
}

/* =========== قسم الرؤية المستقبلية =========== */
.vision {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
    padding: 6rem 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.vision-content {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.vision h2 {
    margin-bottom: 2rem;
    font-size: 2.2rem;
}

.vision p {
    margin-bottom: 3rem;
    opacity: 0.9;
    line-height: 1.6;
}

.vision-goals {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
    margin-top: 3rem;
}

.vision-goal {
    flex: 1;
    min-width: 200px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius-md);
    padding: 2rem;
    text-align: center;
    backdrop-filter: blur(5px);
    transition: transform var(--transition-normal), background-color var(--transition-normal);
}

.vision-goal:hover {
    transform: translateY(-10px);
    background-color: rgba(255, 255, 255, 0.2);
}

.vision-goal-icon {
    width: 60px;
    height: 60px;
    border-radius: var(--border-radius-full);
    background-color: var(--white);
    color: var(--primary-color);
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.vision-goal h3 {
    color: var(--white);
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.vision-goal p {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 0;
    font-size: 0.95rem;
}

/* =========== قسم الشهادات والتوصيات =========== */
.testimonials-slider {
    max-width: 900px;
    margin: 0 auto;
    position: relative;
}

.testimonials-container {
    overflow: hidden;
}

.testimonial-item {
    display: flex;
    align-items: center;
    gap: 2rem;
    padding: 2rem;
    background-color: var(--white);
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-md);
    margin: 0 1rem;
    transition: transform var(--transition-normal);
}

.testimonial-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.testimonial-avatar {
    width: 80px;
    height: 80px;
    border-radius: var(--border-radius-full);
    background-color: var(--light-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--primary-color);
    flex-shrink: 0;
}

.testimonial-content {
    flex-grow: 1;
}

.testimonial-stars {
    color: #f59e0b;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.testimonial-content p {
    margin-bottom: 1.5rem;
    color: var(--text-light);
    font-style: italic;
    position: relative;
}

.testimonial-content p::before {
    content: '\201C';
    font-size: 3rem;
    position: absolute;
    right: -1rem;
    top: -1rem;
    color: var(--primary-color);
    opacity: 0.2;
}

.testimonial-author h4 {
    color: var(--primary-color);
    margin-bottom: 0.3rem;
    font-size: 1.1rem;
}

.testimonial-author p {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 0;
}

.testimonials-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 2rem;
}

.testimonial-prev,
.testimonial-next {
    background-color: var(--white);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: var(--border-radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--primary-color);
    box-shadow: var(--shadow-sm);
    transition: background-color var(--transition-normal), transform var(--transition-normal);
}

.testimonial-prev:hover,
.testimonial-next:hover {
    background-color: var(--primary-color);
    color: var(--white);
    transform: translateY(-2px);
}

.testimonials-dots {
    display: flex;
    gap: 0.5rem;
    margin: 0 1rem;
}

.testimonial-dot {
    width: 10px;
    height: 10px;
    border-radius: var(--border-radius-full);
    background-color: var(--gray);
    cursor: pointer;
    transition: background-color var(--transition-normal), transform var(--transition-normal);
}

.testimonial-dot.active,
.testimonial-dot:hover {
    background-color: var(--primary-color);
    transform: scale(1.2);
}

/* =========== قسم الاتصال =========== */
.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.5rem;
    background-color: var(--white);
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-md);
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.contact-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.contact-icon {
    width: 50px;
    height: 50px;
    border-radius: var(--border-radius-full);
    background-color: var(--primary-color);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.contact-text h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.contact-text p {
    color: var(--text-light);
}

.social-media {
    margin-top: 1rem;
}

.social-media h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.social-icons {
    display: flex;
    gap: 1rem;
}

.social-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--border-radius-full);
    background-color: var(--primary-color);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: transform var(--transition-normal), background-color var(--transition-normal);
}

.social-icon:hover {
    transform: translateY(-5px);
    background-color: var(--secondary-color);
}

#contact-form {
    background-color: var(--white);
    padding: 2rem;
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-md);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

#contact-form input,
#contact-form textarea {
    width: 100%;
    padding: 1.2rem;
    border-radius: 12px;
    border: 2px solid var(--light-bg);
    background-color: var(--white);
    color: var(--text-color);
    font-family: inherit;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: border-color var(--transition-normal), box-shadow var(--transition-normal);
}

#contact-form input:focus,
#contact-form textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
    outline: none;
}

#contact-form textarea {
    min-height: 150px;
    resize: vertical;
}

#contact-form button {
    width: 100%;
    padding: 1.2rem;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 1rem;
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

#contact-form button:hover {
    background-color: var(--secondary-color);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

#contact-form button:active {
    transform: translateY(1px);
}

#contact-form button::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.7s;
}

#contact-form button:hover::before {
    left: 100%;
}

/* =========== الفوتر =========== */
footer {
    background-color: var(--dark-bg);
    color: var(--white);
    padding: 4rem 2rem 2rem;
    text-align: center;
    position: relative;
}

.footer-wave {
    position: absolute;
    top: -50px;
    left: 0;
    width: 100%;
    overflow: hidden;
    line-height: 0;
}

.footer-wave svg {
    display: block;
    width: calc(100% + 1.3px);
    height: 50px;
}

.footer-wave .shape-fill {
    fill: var(--dark-bg);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-logo {
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2rem;
}

.footer-logo img {
    height: 50px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    text-align: right;
    margin-bottom: 3rem;
}

.footer-col h3 {
    color: var(--white);
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
    position: relative;
    display: inline-block;
}

.footer-col h3::after {
    content: '';
    position: absolute;
    bottom: -10px;
    right: 0;
    width: 50px;
    height: 3px;
    background-color: var(--primary-color);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.8rem;
}

.footer-links a {
    color: var(--gray);
    text-decoration: none;
    transition: color var(--transition-normal), transform var(--transition-normal);
    display: inline-block;
}

.footer-links a:hover {
    color: var(--white);
    transform: translateX(-5px);
}

.footer-newsletter p {
    color: var(--gray);
    margin-bottom: 1rem;
}

.newsletter-form {
    display: flex;
}

.newsletter-input {
    flex-grow: 1;
    padding: 0.8rem;
    border: none;
    border-radius: var(--border-radius-sm) 0 0 var(--border-radius-sm);
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--white);
}

.newsletter-input:focus {
    outline: none;
    background-color: rgba(255, 255, 255, 0.2);
}

.newsletter-btn {
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 0 1rem;
    cursor: pointer;
    border-radius: 0 var(--border-radius-sm) var(--border-radius-sm) 0;
    transition: background-color var(--transition-normal);
}

.newsletter-btn:hover {
    background-color: var(--secondary-color);
}

.footer-social {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.footer-social a {
    color: var(--white);
    background-color: rgba(255, 255, 255, 0.1);
    width: 40px;
    height: 40px;
    border-radius: var(--border-radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: background-color var(--transition-normal), transform var(--transition-normal);
}

.footer-social a:hover {
    background-color: var(--primary-color);
    transform: translateY(-5px);
}

.footer-bottom {
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.copyright {
    color: var(--gray);
    font-size: 0.9rem;
}

/* =========== التصميم المتجاوب =========== */
@media (max-width: 991px) {
    .hero h1 {
        font-size: 2.3rem;
    }
    
    .contact-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    /* الهيدر */
    .mobile-menu-btn {
        display: block;
    }

    .nav-links {
        position: fixed;
        right: -100%;
        top: 70px;
        flex-direction: column;
        background-color: var(--white);
        width: 100%;
        text-align: center;
        transition: var(--transition-normal);
        box-shadow: var(--shadow-lg);
        padding: 1rem 0;
    }

    .nav-links.active {
        right: 0;
    }

    .nav-links li {
        margin: 1rem 0;
    }
    
    /* قسم الهيرو */
    .hero {
        padding: 8rem 1.5rem 6rem;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    /* قسم الإحصائيات */
    .stat-item {
        min-width: 150px;
        padding: 1.5rem;
    }
    
    /* قسم المشاريع */
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    /* التوصيات */
    .testimonial-item {
        flex-direction: column;
        gap: 1rem;
        padding: 1.5rem;
    }
    
    .testimonial-content {
        text-align: center;
    }
    
    /* قسم الاتصال */
    .form-row {
        grid-template-columns: 1fr;
    }
    
    /* الفوتر */
    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .footer-col h3::after {
        right: 50%;
        transform: translateX(50%);
    }
    
    .newsletter-form {
        flex-direction: column;
        gap: 1rem;
    }
    
    .newsletter-input,
    .newsletter-btn {
        border-radius: var(--border-radius-sm);
        width: 100%;
        padding: 0.8rem;
    }
}

@media (max-width: 576px) {
    .section {
        padding: 4rem 1.5rem;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .hero-buttons {
        display: flex;
        flex-direction: column;
        gap: 1rem;
    }
    
    .cta-button {
        width: 100%;
        margin: 0;
    }
    
    .project-image {
        height: 180px;
    }
    
    .modal-images {
        grid-template-columns: 1fr;
    }
    
    .modal-image {
        height: 180px;
    }
    
    .theme-toggle,
    .back-to-top {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 1.8rem;
    }
    
    .section-title {
        font-size: 1.6rem;
    }
    
    .service-card, 
    .project-card,
    .contact-item {
        padding: 1rem;
    }
    
    .stat-item {
        min-width: 100%;
        margin-bottom: 1rem;
    }
    
    .cta-button {
        padding: 0.8rem 1.5rem;
        font-size: 0.9rem;
        width: 100%;
        margin: 0.5rem 0;
    }
}

/* تحسينات تجاوب للأجهزة المتوسطة */
@media (min-width: 481px) and (max-width: 768px) {
    .service-card, 
    .project-card {
        min-width: 100%;
    }
    
    .about-stats {
        flex-wrap: wrap;
    }
    
    .stat-item {
        width: 45%;
        margin-bottom: 1rem;
    }
    
    .hero-buttons {
        flex-direction: row;
        justify-content: center;
    }
    
    .cta-button {
        min-width: 150px;
    }
}

/* تحسينات تجاوب اللوحية */
@media (min-width: 769px) and (max-width: 1024px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* تحسينات تجاوب الشاشات الكبيرة */
@media (min-width: 1025px) {
    .container {
        max-width: 1200px;
        margin: 0 auto;
    }
    
    .hero-content {
        max-width: 1000px;
    }
    
    .services-grid,
    .projects-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* تحسينات للمس على الأجهزة اللمسية */
@media (hover: none) {
    .cta-button:hover,
    .service-card:hover,
    .project-card:hover,
    .tech-item:hover {
        transform: none;
        box-shadow: var(--shadow-md);
    }
    
    .project-overlay {
        opacity: 1;
        background-color: rgba(0, 0, 0, 0.3);
    }
    
    .project-link {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =========== تغييرات اتجاه LTR =========== */
.ltr .nav-links li {
    margin-left: 0;
    margin-right: 1.5rem;
}

.ltr .language-selector select {
    margin-left: 0;
    margin-right: 0.5rem;
}

.ltr .project-tags {
    justify-content: flex-start;
}

.ltr .modal-features li {
    padding-right: 0;
    padding-left: 1.5rem;
}

.ltr .modal-features li::before {
    right: auto;
    left: 0;
}

.ltr .footer-col h3::after {
    right: auto;
    left: 0;
}

.ltr .footer-grid {
    text-align: left;
}

.ltr .footer-links a:hover {
    transform: translateX(5px);
}

/* =========== تحسينات للأداء =========== */
img, svg {
    max-width: 100%;
    height: auto;
}

button, input, select, textarea {
    font-family: inherit;
}

.fade-in, .fade-in-up, .fade-in-left, .fade-in-right {
    will-change: transform, opacity;
}

/* تحسينات لأداء الرسوم المتحركة على الأجهزة منخفضة الأداء */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    .fade-in, .fade-in-up, .fade-in-left, .fade-in-right {
        opacity: 1;
        transform: none;
    }
}