/* CSS Variables */
:root {
  --teal-400: #2dd4bf;
  --teal-500: #14b8a6;
  --teal-600: #0d9488;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  --white: #ffffff;
  --black: #000000;
}
/* لتسريع عرض الخطوط */
@font-face {
  font-family: 'Noto Sans Arabic';
  font-display: swap;
}

/* استخدام will-change لتسريع التحولات */
.btn-hover {
  transition: transform 0.2s ease, background 0.3s ease;
  will-change: transform;
}

/* تصغير الظلال */
.shadow-lg {
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}


/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Noto Sans Arabic', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #0f172a, #1e293b, #312e81);
  color: white;
  overflow-x: hidden;
  line-height: 1.6;
}

/* Layout Utilities */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.mx-auto {
  margin-left: auto;
  margin-right: auto;
}

/* Width Utilities */
.max-w-4xl { max-width: 56rem; }
.max-w-5xl { max-width: 64rem; }
.max-w-6xl { max-width: 72rem; }
.max-w-7xl { max-width: 80rem; }

/* Grid System */
.grid { display: grid; }
.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* Gap Utilities */
.gap-2 { gap: 0.5rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }
.gap-8 { gap: 2rem; }

/* Margin Utilities */
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.mb-12 { margin-bottom: 3rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }

/* Padding Utilities */
.p-2 { padding: 0.5rem; }
.p-3 { padding: 0.75rem; }
.p-4 { padding: 1rem; }
.p-6 { padding: 1.5rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.py-8 { padding-top: 2rem; padding-bottom: 2rem; }
.py-12 { padding-top: 3rem; padding-bottom: 3rem; }
.py-16 { padding-top: 4rem; padding-bottom: 4rem; }
.py-20 { padding-top: 5rem; padding-bottom: 5rem; }
.py-24 { padding-top: 6rem; padding-bottom: 6rem; }
.pt-24 { padding-top: 6rem; }
.pt-28 { padding-top: 7rem; }
.pt-32 { padding-top: 8rem; }
.pb-16 { padding-bottom: 4rem; }
.pb-24 { padding-bottom: 6rem; }

/* Text Utilities */
.text-xs { font-size: 0.75rem; }
.text-sm { font-size: 0.875rem; }
.text-base { font-size: 1rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; }
.text-3xl { font-size: 1.875rem; }
.text-4xl { font-size: 2.25rem; }
.text-5xl { font-size: 3rem; }
.text-6xl { font-size: 3.75rem; }

.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.font-medium { font-weight: 500; }

.text-center { text-align: center; }
.text-white { color: var(--white); }
.text-gray-200 { color: var(--gray-200); }
.text-gray-300 { color: var(--gray-300); }
.text-gray-400 { color: var(--gray-400); }
.text-gray-500 { color: var(--gray-500); }
.text-gray-600 { color: var(--gray-600); }
.text-gray-700 { color: var(--gray-700); }
.text-gray-800 { color: var(--gray-800); }
.text-gray-900 { color: var(--gray-900); }
.text-teal-400 { color: var(--teal-400); }
.text-blue-500 { color: #3b82f6; }
.text-pink-500 { color: #ec4899; }
.text-blue-400 { color: #60a5fa; }

.leading-relaxed { line-height: 1.625; }
.leading-loose { line-height: 2; }

/* Flexbox Utilities */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-end { justify-content: flex-end; }

/* Background Utilities */
.bg-white { background-color: var(--white); }
.bg-gray-50 { background-color: #f9fafb; }
.bg-gray-900 { background-color: var(--gray-900); }
.bg-black { background-color: var(--black); }
.bg-teal-500 { background-color: var(--teal-500); }
.bg-green-500 { background-color: #10b981; }
.bg-blue-600 { background-color: #2563eb; }
.bg-red-50 { background-color: #fef2f2; }
.bg-green-50 { background-color: #f0fdf4; }
.bg-yellow-50 { background-color: #fefce8; }
.bg-blue-50 { background-color: #eff6ff; }
.bg-orange-50 { background-color: #fff7ed; }
.bg-cyan-50 { background-color: #ecfeff; }
.bg-pink-50 { background-color: #fdf2f8; }
.bg-indigo-50 { background-color: #eef2ff; }
.bg-purple-50 { background-color: #faf5ff; }

.bg-white\\/10 { background-color: rgba(255, 255, 255, 0.1); }
.bg-black\\/50 { background-color: rgba(0, 0, 0, 0.5); }

.bg-gradient-to-br { background-image: linear-gradient(to bottom right, var(--tw-gradient-from), var(--tw-gradient-to)); }
.from-gray-50 { --tw-gradient-from: #f9fafb; }
.to-teal-50 { --tw-gradient-to: #f0fdfa; }
.to-indigo-50 { --tw-gradient-to: #eef2ff; }
.to-purple-50 { --tw-gradient-to: #faf5ff; }
.to-orange-50 { --tw-gradient-to: #fff7ed; }
.to-cyan-50 { --tw-gradient-to: #ecfeff; }
.to-pink-50 { --tw-gradient-to: #fdf2f8; }

.bg-gradient-to-t { background-image: linear-gradient(to top, var(--tw-gradient-from), var(--tw-gradient-to)); }
.from-black\\/50 { --tw-gradient-from: rgba(0, 0, 0, 0.5); }

/* Shadow Utilities */
.shadow-lg { 
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05); 
}
.shadow-md { 
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06); 
}
.shadow-sm {
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

/* Border Utilities */
.border { border-width: 1px; }
.border-teal-100 { border-color: #ccfbf1; }
.border-indigo-100 { border-color: #e0e7ff; }
.border-purple-100 { border-color: #f3e8ff; }
.border-orange-100 { border-color: #ffedd5; }
.border-cyan-100 { border-color: #cffafe; }
.border-pink-100 { border-color: #fce7f3; }

.rounded { border-radius: 0.25rem; }
.rounded-lg { border-radius: 0.5rem; }
.rounded-xl { border-radius: 0.75rem; }
.rounded-2xl { border-radius: 1rem; }
.rounded-full { border-radius: 9999px; }

/* Transform and Transition */
.transform { transform: translateX(0) translateY(0) rotate(0) skewX(0) skewY(0) scaleX(1) scaleY(1); }
.transition-all { 
  transition-property: all; 
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); 
  transition-duration: 300ms; 
}
.transition-transform { 
  transition-property: transform; 
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); 
  transition-duration: 300ms; 
}
.transition { 
  transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 300ms;
}
.duration-300 { transition-duration: 300ms; }

/* Hover States */
.hover\\:scale-105:hover { transform: scale(1.05); }
.hover\\:scale-110:hover { transform: scale(1.1); }
.hover\\:scale-125:hover { transform: scale(1.25); }
.hover\\:-translate-y-2:hover { transform: translateY(-0.5rem); }

.hover\\:bg-teal-600:hover { background-color: var(--teal-600); }
.hover\\:bg-green-600:hover { background-color: #059669; }
.hover\\:bg-blue-700:hover { background-color: #1d4ed8; }

/* Navigation and Glass Effect */
nav { 
  backdrop-filter: blur(10px); 
  z-index: 1000;
}

.glass {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(12px);
}

.backdrop-blur-sm {
  backdrop-filter: blur(4px);
}

/* Section Titles */
.section-title {
  font-weight: 700;
  text-align: center;
  margin-bottom: 3rem;
}

/* Language Buttons */
.lang-btn { 
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: all 0.3s ease;
}

.lang-btn.active { 
  background-color: var(--teal-500); 
  color: white;
  border-color: var(--teal-500);
}

.lang-btn:hover {
  background-color: rgba(255, 255, 255, 0.2);
}

/* Cards */
.service-card {
  transition: all 0.3s ease;
  height: 100%;
}

.service-card:hover {
  transform: translateY(-0.5rem);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.tech-card {
  transition: all 0.3s ease;
}

.tech-card:hover {
  transform: translateY(-0.25rem);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.project-card {
  transition: all 0.3s ease;
}

.project-card:hover {
  transform: translateY(-0.5rem);
}

/* Icons and Images */
.icon-container {
  transition: all 0.3s ease;
}

.service-card:hover .icon-container {
  transform: scale(1.1);
}

.tech-icon {
  transition: all 0.3s ease;
}

.tech-card:hover .tech-icon {
  transform: scale(1.1);
}

.social-icon {
  transition: transform 0.3s ease;
}

.social-icon:hover {
  transform: scale(1.25);
}

.btn-hover {
  transition: all 0.3s ease;
}

.btn-hover:hover {
  transform: scale(1.05);
}

.logo-icon {
  transition: all 0.3s ease;
}

.logo-icon:hover {
  transform: rotate(15deg);
}

/* RTL Support */
[dir="rtl"] .space-x-4 > :not([hidden]) ~ :not([hidden]) {
  --tw-space-x-reverse: 1;
}

[dir="rtl"] .rtl\\:space-x-reverse > :not([hidden]) ~ :not([hidden]) {
  --tw-space-x-reverse: 1;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #1e293b;
}

::-webkit-scrollbar-thumb {
  background: var(--teal-500);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--teal-600);
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Responsive Design */
@media (max-width: 640px) {
  .section-title {
    font-size: 1.5rem;
    margin-bottom: 2rem;
  }
  
  .service-card, .project-card {
    margin-bottom: 1rem;
  }
  
  .text-3xl { font-size: 1.875rem; }
  .text-4xl { font-size: 2.25rem; }
  .text-5xl { font-size: 2.5rem; }
  .text-6xl { font-size: 3rem; }
}

@media (min-width: 640px) {
  .sm\\:text-4xl { font-size: 2.25rem; }
  .sm\\:flex-row { flex-direction: row; }
  .sm\\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 768px) {
  .md\\:text-2xl { font-size: 1.5rem; }
  .md\\:text-3xl { font-size: 1.875rem; }
  .md\\:text-4xl { font-size: 2.25rem; }
  .md\\:text-5xl { font-size: 3rem; }
  .md\\:text-lg { font-size: 1.125rem; }
  .md\\:py-12 { padding-top: 3rem; padding-bottom: 3rem; }
  .md\\:py-20 { padding-top: 5rem; padding-bottom: 5rem; }
  .md\\:py-24 { padding-top: 6rem; padding-bottom: 6rem; }
  .md\\:py-32 { padding-top: 8rem; padding-bottom: 8rem; }
  .md\\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .md\\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .md\\:gap-6 { gap: 1.5rem; }
  .md\\:gap-8 { gap: 2rem; }
}

@media (min-width: 1024px) {
  .lg\\:text-3xl { font-size: 1.875rem; }
  .lg\\:text-4xl { font-size: 2.25rem; }
  .lg\\:text-6xl { font-size: 3.75rem; }
  .lg\\:text-xl { font-size: 1.25rem; }
  .lg\\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .lg\\:grid-cols-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}

@media (min-width: 1280px) {
  .xl\\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}