/* --- DESIGN TOKENS --- */
:root {
  --bg-color: #000105;
  --surface-color: #010612;
  --accent-glow: #00a2ff;
  --accent-dim: #00244d;
  --text-primary: #ffffff;
  --text-dim: #4d50ff;
  --glow-standard: 0 0 15px rgba(0, 26, 255, 0.4);
  --glow-intense: 0 0 30px rgba(0, 17, 255, 0.7);
  --transition-main: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

/* منع تحديد النصوص أو نسخها في الموقع بالكامل */
body {
  -webkit-user-select: none;  /* Safari */
  -moz-user-select: none;     /* Firefox */
  -ms-user-select: none;      /* IE10+ */
  user-select: none;          /* Standard */
}

/* منع سحب الصور أو حفظها بسهولة */
img {
  pointer-events: none;
  -webkit-user-drag: none;
}

/* --- BASE --- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-color);
  color: var(--text-primary);
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow-x: hidden;
}

body::-webkit-scrollbar {
  width: 6px;
}
body::-webkit-scrollbar-track {
  background: var(--bg-color);
}
body::-webkit-scrollbar-thumb {
  background: var(--accent-dim);
  border-radius: 3px;
}
body::-webkit-scrollbar-thumb:hover {
  background: var(--accent-glow);
}

/* --- PARTICLES CANVAS --- */
#particles-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* كل الأقسام فوق الجزيئات */
header,
.overlay,
.Home,
.About,
.Skills,
.Services,
.Projects,
.Map,
.Contact,
footer {
  position: relative;
  z-index: 1;
}

/* --- TOAST NOTIFICATION --- */
.toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--surface-color);
  border: 1px solid var(--accent-glow);
  color: var(--text-primary);
  padding: 14px 28px;
  border-radius: 14px;
  font-size: 0.95rem;
  z-index: 9999;
  opacity: 0;
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 0 25px rgba(0, 162, 255, 0.5);
  pointer-events: none;
  text-align: center;
  max-width: 90%;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.toast.error {
  border-color: #ff4444;
  box-shadow: 0 0 25px rgba(255, 68, 68, 0.5);
}

/* --- HEADER --- */
header {
  width: 95%;

  height: 70px;
  border: 1px solid var(--accent-dim);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 1rem;
  position: fixed;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  background: rgba(0, 0, 0, 0.7);
  box-shadow: 0 10px 70px rgba(7, 16, 143, 0.6);
  animation: fadeInDown 1.5s ease;
  -webkit-backdrop-filter: blur(15px);
  backdrop-filter: blur(15px);
  border-radius: 20px;
}

.lang-btn {
  width: 45px;
  height: 45px;
  background: var(--surface-color);
  border: 1px solid var(--accent-dim);
  color: var(--text-dim);
  border-radius: 15px;
  cursor: pointer;
  font-family: "MyFont2", monospace;
  font-size: 0.8rem;
  transition: var(--transition-main);
  box-shadow: inset 0 0 5px rgba(0, 47, 150, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
}

.lang-btn:hover {
  border-color: var(--accent-glow);
  color: white;
  box-shadow: var(--glow-standard);
}

.logo {
  font-family: "MyFont2";
  -webkit-text-stroke: 1px var(--accent-glow);
  font-size: 1.4rem;
  font-weight: 900;
  text-decoration: none;
  letter-spacing: 5px;
  color: transparent;
  transition: 2s;
  text-shadow: 0 0 15px rgba(47, 48, 80, 0.8), 0 0 40px rgba(0, 47, 255, 0.4);
}
.logo:hover {
  text-shadow: 0 0 30px rgb(0, 26, 255), 0 0 40px rgb(0, 17, 255);
  transition: 2s;
  letter-spacing: 5px;
}

@keyframes stroke-offset {
  100% {
    stroke-dashoffset: -35%;
  }
}

/* --- HAMBURGER --- */
.menu-trigger {
  width: 45px;
  height: 45px;
  display: flex;
  background: var(--surface-color);
  border: 1px solid var(--accent-dim);
  border-radius: 15px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  gap: 6px;
  box-shadow: inset 0 0 5px rgba(0, 47, 150, 0.5);
  transition: var(--transition-main);
}
.menu-trigger:hover {
  border-color: var(--accent-glow);
  box-shadow: var(--glow-standard);
}
.bar {
  width: 24px;
  height: 2px;
  background-color: var(--text-dim);
  transition: var(--transition-main);
  box-shadow: 0 0 8px rgba(0, 102, 255, 0.8);
}

.menu-trigger.active .bar:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
  background-color: var(--accent-glow);
}
.menu-trigger.active .bar:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.menu-trigger.active .bar:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
  background-color: var(--accent-glow);
}

/* --- MENU OVERLAY --- */
.overlay {
  position: fixed;
  width: 90%;
  height: 70%;
  max-height: 100%;
  overflow-y: auto;
  top: -100%;

  background: rgba(0, 0, 0, 0.6);
  z-index: 900;
  display: flex;
  justify-content: center;
  align-items: center;
  visibility: visible;
  opacity: 1;
  border: 0.2rem solid rgb(0, 89, 255);
  border-radius: 20px;
  transition: 1s;
  margin-top: 90px;
  -webkit-backdrop-filter: blur(15px);
  backdrop-filter: blur(7px);
}
.overlay::-webkit-scrollbar {
  display: none;
}
nav {
  padding: 10px;
  max-width: 90%;
  margin: auto;
}

.overlay.active {
  visibility: visible;
  opacity: 1;
  transform: scale(1);
  transform: translateY(150%);
  transition: 1s;
  margin-bottom: 100px;
}

.overlay a {
  color: rgb(255, 255, 255);
  border: 0.1rem solid rgba(0, 0, 255, 0);
  border-radius: 5px;
  width: 200px;
  text-decoration: none;
  font-size: 1rem;
  text-align: center;
  letter-spacing: 5px;
  margin: 1.5rem;
  display: block;
  transition: 0.3s;
  text-shadow: 0 0 5px var(--accent-dim);
}

.overlay a:hover {
  border: 0.1rem solid blue;
  color: var(--accent-glow);
  text-shadow: var(--glow-intense);
}
/* --- SECTION TITLE --- */
.section-title {
  text-align: center;
  font-family: "MyFont1", monospace;
  font-size: 1.3rem;
  font-weight: 300;
  color: var(--text-dim);
  text-shadow: 0 0 15px rgba(77, 124, 255, 0.3);
  margin-top: 1rem;
  margin-bottom: 1.5rem;
  padding-top: 100px;
}

/* --- HOME SECTION --- */
.Home {
  position: relative; /* ضروري لتحديد أبعاد الفيديو والـ overlay */
  min-height: 100vh; /* ليغطي الشاشة بالكامل */
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  padding-top: 70px;
  overflow: hidden; /* لمنع ظهور شريط التمرير بسبب أبعاد الفيديو */
}

/* تنسيق فيديو الخلفية */
.hero-video {
  position: absolute;
  top: 50%;
  left: 50%;
  min-width: 100%;
  min-height: 100%;
  width: auto;
  height: auto;
  transform: translate(-50%, -50%);
  object-fit: cover;
  z-index: 1; /* في الخلفية تماماً */
}

/* طبقة التعتيم النيونية المظلمة */
.video-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(
    0,
    0,
    0,
    0.75
  ); /* أسود بنسبة تعتيم 75% لتبرز ألوان النيون الخاصة بك */
  z-index: 2; /* فوق الفيديو وتحت المحتوى */
}

.profile-card {
  position: relative;
  z-index: 3; /* فوق طبقة التعتيم ليكون مقروءاً ومفعلاً للتفاعل */
  width: 90%;
  max-width: 600px;
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: profileEntrance 1.2s ease-out;
}

.hero-text h1 {
  -webkit-text-stroke: 1px var(--accent-glow);
  font-family: "MyFont1", monospace;
  font-size: 1.6rem;
  font-weight: 300;
  color: transparent;
  text-align: center;
  width: 100%;
  text-shadow: 0 0 15px rgba(77, 124, 255, 0.15);
  line-height: 1.6;
}

/* تعديل إضافي للـ h2 ليكون متناسقاً */
.hero-text h2 {
  color: var(--text-secondary);
  text-align: center;
  margin-top: 1rem;
  line-height: 1.5;
  font-weight: 300;
}

/* --- BUTTONS --- */
.actions {
  display: flex;
  gap: 1.5rem;
  margin-top: 2rem;
  flex-wrap: wrap;
  justify-content: center;
  font-size: 1.2rem;
}

.action-btn {
  width: 170px;
  height: 42px;
  border-radius: 12px;
  background: var(--surface-color);
  border: 1px solid var(--accent-dim);
  color: var(--text-primary);
  font-family: "MyFont1", monospace;

  letter-spacing: 1px;
  cursor: pointer;
  transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  transform-style: preserve-3d;
  transform: perspective(1000px) rotateX(0deg) rotateY(0deg);
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
  text-decoration: none;
}

/* تعديل تجاري مخصص للزر الرئيسي ليعطي انطباعاً أنه الهدف الأول للضغط */
.action-btn.primary-btn {
  background: var(--accent-glow);
  color: #000000; /* أو أي لون غامق يتناسب مع توهج النيون لديك */

  font-size: 0.9rem;
  border: none;
  width: 200px;
}

.action-btn:hover {
  border-color: var(--accent-glow);
  box-shadow: var(--glow-intense);
  transform: scale(1.08) perspective(1000px) rotateX(5deg) rotateY(15deg)
    translateZ(20px) translateY(-5px);
  filter: brightness(1.2);
  color: var(--accent-glow);
}

/* لمنع النص الأسود في الزر الرئيسي من التحول للأزرق عند الهوفر وتخريب التصميم */
.action-btn.primary-btn:hover {
  color: #ffffff;
  border: 2px solid white;
  background: #00244d;
}

.action-btn:active {
  transform: scale(0.95);
}

.action-btn.left-tilt:hover {
  transform: scale(1.08) perspective(1000px) rotateX(5deg) rotateY(-15deg)
    translateZ(20px) translateY(-5px);
}

.action-btn.glow-submit {
  width: 100%;
  max-width: 250px;
  margin: 0 auto;
}
/* --- ABOUT SECTION --- */
.About {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  width: 100%;
  padding: 4rem 1rem; /* أضفت مساحة علوية وسفلية مريحة للعين */
}

.abo-card {
  background: linear-gradient(
    135deg,
    rgba(0, 20, 60, 0.3),
    rgba(0, 5, 20, 0.5)
  );
  border: 1px solid var(--accent-dim);
  padding: 2.5rem 2rem;
  border-radius: 25px;
  width: 95%;
  max-width: 1200px; /* تحديد حد أقصى للكرت لكي لا يتمدد النص بشكل مزعج في الشاشات الكبيرة */
  transition: var(--transition-main);
}

.abo-card:hover {
  border-color: var(
    --accent-glow
  ); /* جعلته يضيء بلون النيون المتوهج عند الهوفر */
  box-shadow: 0 0 40px rgba(0, 100, 255, 0.15);
}

.abo-card img {
  width: 80px;
  height: 80px;
  object-fit: contain;
  border-radius: 15px;
  margin-bottom: 1.5rem;
  filter: drop-shadow(0 0 10px var(--accent-glow));
}

.abo-card p {
  color: rgba(
    255,
    255,
    255,
    0.8
  ); /* زيادة السطوع قليلاً لسهولة القراءة تجارياً */
  line-height: 1.8;
  font-size: 1rem;
  text-align: center; /* توحيد المحاذاة لتكون متناسقة */
  padding: 0 0.5rem;
  font-family: sans-serif; /* أو الخط المريح الذي تعتمده للنصوص العادية */
}

/* --- SKILLS SECTION --- */
/* الحاوية الخارجية الكبرى لتوفير مسار سكرول تصفحي */
.Skills {
  position: relative;
  width: 100%;
  height: 300vh; /* يعطي عمقاً للسكرول حتى تمتلئ المهارات قبل الانتقال للقسم التالي */
}

/* حاوية التثبيت */
.skills-sticky-wrapper {
  position: sticky;
  top: 0;
  height: 110vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  padding: 0 1rem;
}

/* صندوق العمل الرئيسي المتمركز في الوسط */
.skills-container-box {
  position: relative;
  width: 95%;
  max-width: 600px;
  height: 450px; /* مساحة مناسبة للبطاقات */
  display: flex;
  justify-content: center;
  align-items: center;
}

/* بطاقة البروفايل المركزية الثابتة في المنتصف كدرع تخرج المهارات من ورائه */
.profile-center-card {
  position: relative;
  width: 130px;
  height: 130px;
  background: linear-gradient(135deg, rgba(0, 10, 40, 0.9), rgba(0, 5, 20, 1));
  border: 2px solid var(--accent-glow);
  border-radius: 24px;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10; /* فوق شبكة المهارات دائماً لتبدو المهارات وكأنها تخرج من خلفها */
  box-shadow: 0 0 35px var(--accent-dim);
}

.profile-center-card .dev-icon {
  width: 75%;
  height: 75%;
  color: var(--accent-glow);
  filter: drop-shadow(0 0 10px var(--accent-glow));
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1),
              filter 0.5s ease,
              color 0.5s ease;
}

.profile-center-card:hover .dev-icon {
  color: #7AB8E8;
  transform: scale(1.08) rotate(-5deg);
  filter: drop-shadow(0 0 20px var(--accent-glow))
          drop-shadow(0 0 35px rgba(0, 162, 255, 0.5));
}

/* إضافة نبض خفيف دائم */
@keyframes devPulse {
  0%, 100% {
    filter: drop-shadow(0 0 10px var(--accent-glow));
  }
  50% {
    filter: drop-shadow(0 0 18px var(--accent-glow))
            drop-shadow(0 0 30px rgba(0, 162, 255, 0.35));
  }
}

.profile-center-card .dev-icon {
  animation: devPulse 3s ease-in-out infinite;
}

.profile-center-card:hover .dev-icon {
  animation: none;
}

/* شبكة المهارات المتمركزة خلف البطاقة بالكامل في البداية */
.skills-grid {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
  z-index: 1; /* خلف بطاقة البروفايل */
}

/* التصميم الأساسي لبطاقة المهارة قبل الظهور */
.ski-card {
  background: linear-gradient(
    135deg,
    rgba(0, 20, 60, 0.4),
    rgba(0, 5, 20, 0.6)
  );
  border: 1px solid var(--accent-dim);
  border-radius: 14px;
  padding: 0.8rem 1.2rem;
  width: 100%;
  position: absolute; /* مكدسة كلها فوق بعضها خلف كرت البروفايل في السنتر */
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.5); /* حجم صغير ومختفية خلف الكرت */
  opacity: 0;
  pointer-events: none; /* لا تتفاعل مع الماوس وهي مختفية */
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1),
    opacity 0.4s ease-out, box-shadow 0.3s;
}

/* عندما تأخذ المهارة خاصية النشر (Active) تخرج لمكانها الطبيعي في الـ Grid */
.ski-card.active-scroll {
  opacity: 1;
  pointer-events: auto;
  position: relative; /* تعود لمكانها الانسيابي لتترتب واحدة تلو الأخرى */
  top: auto;
  left: auto;
  transform: translate(0, 0) scale(1);
}

.ski-card:hover {
  border-color: var(--accent-glow);
  box-shadow: 0 0 25px rgba(0, 162, 255, 0.2);
}

.ski-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.ski-name {
  color: var(--text-primary);
  font-family: "MyFont1", monospace;
  font-size: 0.95rem;
}

.ski-number {
  color: var(--accent-glow);
  font-family: "MyFont1", monospace;
  font-size: 0.9rem;
}

.ski-prc {
  background: rgba(255, 255, 255, 0.06);
  height: 6px;
  border-radius: 4px;
  position: relative;
  overflow: hidden;
}

.ski-prc::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--accent-dim), var(--accent-glow));
  border-radius: 4px;
  transition: width 1.5s cubic-bezier(0.16, 1, 0.3, 1);
}

/* حركة ملء شريط النسبة عند تفعيل البطاقة */
.ski-card.active-scroll .ski-prc::after {
  width: var(--progress-width);
}

/* --- SERVICES SECTION --- */
.Services {
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 0 1rem;
}

.serv-container {
  display: flex;
  justify-content: center;
  gap: 25px;
  flex-wrap: wrap;
  padding: 0 1rem 2rem;
  max-width: 2000px;
}

.serv-card {
  background: linear-gradient(
    145deg,
    rgba(0, 20, 60, 0.2),
    rgba(0, 5, 20, 0.4)
  );
  border: 1px solid var(--accent-dim);
  border-radius: 20px;
  padding: 2rem 1.5rem;
  width: 370px;
  text-align: center;
  transition: all 0.5s ease;
  position: relative;
  overflow: hidden;
}

.serv-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(0, 162, 255, 0.05),
    transparent
  );
  transition: left 0.6s ease;
}

.serv-card:hover::before {
  left: 100%;
}

.serv-card:hover {
  border-color: var(--accent-glow);
  transform: translateY(-10px);
  box-shadow: 0 15px 40px rgba(0, 100, 255, 0.15);
}

.serv-icon-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 80px;
  margin-bottom: 1.5rem;
  border-radius: 20px;
  background: linear-gradient(145deg, rgba(0, 162, 255, 0.08), rgba(0, 162, 255, 0.02));
  border: 1px solid rgba(0, 162, 255, 0.15);
  color: var(--accent-glow);
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.serv-icon-wrap::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(0, 162, 255, 0.15), transparent 70%);
  opacity: 0;
  transition: opacity 0.5s ease;
}

.serv-icon {
  width: 40px;
  height: 40px;
  position: relative;
  z-index: 1;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1),
              filter 0.5s ease;
}

.serv-card:hover .serv-icon-wrap {
  border-color: var(--accent-glow);
  box-shadow: 0 0 30px rgba(0, 162, 255, 0.25),
              inset 0 0 20px rgba(0, 162, 255, 0.08);
  transform: translateY(-4px);
}

.serv-card:hover .serv-icon-wrap::before {
  opacity: 1;
}

.serv-card:hover .serv-icon {
  transform: scale(1.12);
  filter: drop-shadow(0 0 12px var(--accent-glow));
}
.serv-name {
  color: white;
  font-family: "MyFont1", monospace;
  font-size: 1rem;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.serv-desc {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.85rem;
  line-height: 1.7;
}

/* --- PROJECTS SECTION --- */
.Projects {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  width: 100%;
  padding: 4rem 1rem;
}

/* تنسيق العنوان الفرعي المضاف */
.project-subtitle {
  color: rgba(255, 255, 255, 0.6);
  font-size: 1rem;
  margin-bottom: 2.5rem;
  text-align: center;
  max-width: 600px;
  line-height: 1.5;
}

.projects-container {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  justify-content: center;
  max-width: 1200px;
  width: 100%;
}

.project-card-3d {
  background: linear-gradient(
    145deg,
    rgba(0, 20, 60, 0.2),
    rgba(0, 5, 20, 0.4)
  );
  border: 1px solid var(--accent-dim);
  border-radius: 20px;
  overflow: hidden;
  width: clamp(260px, 30%, 360px);
  transition: border-color 0.3s, box-shadow 0.3s, transform 0.3s,
    opacity 0.65s ease;
}

.project-card-3d:hover {
  border-color: var(--accent-glow);
  box-shadow: 0 0 30px rgba(0, 162, 255, 0.15);
  transform: translateY(-6px) !important;
}

.project-content {
  display: flex;
  flex-direction: column;
}
.project-img img {
  width: 100%;
  height: auto;
  object-fit: cover;
  display: block;
}
.project-info {
  padding: 1.2rem 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

/* جعل خط العناوين متناسق ومضيء خفيف */
.project-info h3 {
  font-family: "MyFont2", sans-serif;
  font-size: 1.1rem;
  color: white;
}

.project-info p {
  font-size: 0.85rem;
  color: rgba(232, 244, 255, 0.6);
  line-height: 1.5;
  min-height: 60px; /* يعطي توازن للبطاقات لكي تكون الأزرار على نفس الخط دائماً */
}

/* --- TESTIMONIALS BASE --- */
.Testimonials {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 100%;
  padding: 5rem 1rem;
}

.testi-subtitle {
  color: rgba(255, 255, 255, 0.5);
  font-size: 1rem;
  margin-bottom: 3rem;
  text-align: center;
}

.testi-container {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: center;
  max-width: 1200px;
  width: 100%;
  margin-bottom: 3rem;
}

.testi-card {
  background: linear-gradient(
    145deg,
    rgba(0, 20, 60, 0.25),
    rgba(0, 5, 20, 0.45)
  );
  border: 1px solid var(--accent-dim);
  border-radius: 20px;
  padding: 2.5rem 2rem;
  width: clamp(280px, 30%, 360px);
  position: relative;
  transition: all 0.4s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.testi-card:hover {
  border-color: var(--accent-glow);
  box-shadow: 0 0 35px rgba(0, 162, 255, 0.15);
  transform: translateY(-5px);
}

.quote-icon {
  position: absolute;
  top: 12px;
  left: 16px;
  color: var(--accent-glow);
  opacity: 0.15;
  pointer-events: none;
}
.quote-icon svg {
  width: 42px;
  height: 42px;
}
.testi-text {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.92rem;
  line-height: 1.7;
  font-style: italic;
  margin-bottom: 1.5rem;
  z-index: 2;
}

.client-info {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 1rem;
}

.client-name {
  color: white;
  font-size: 1rem;
  margin-bottom: 0.2rem;
}

.client-role {
  color: var(--accent-glow);
  font-size: 0.78rem;
  font-family: "MyFont1", monospace;
}

/* --- THE MODAL (النافذة المنبثقة) --- */
.review-modal {
  display: none; /* مخفية بالتبعية */
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  z-index: 2000;
  justify-content: center;
  align-items: center;
}

.modal-content {
  background: linear-gradient(135deg, #000b28, #00030f);
  border: 1px solid var(--accent-dim);
  box-shadow: 0 0 50px rgba(0, 162, 255, 0.2);
  padding: 3rem 2rem;
  border-radius: 24px;
  width: 90%;
  max-width: 500px;
  position: relative;
  animation: modalEnter 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalEnter {
  from {
    transform: translateY(50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.close-modal {
  position: absolute;
  top: 12px;
  right: 16px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: all 0.3s ease;
  padding: 0;
}
.close-modal:hover {
  color: var(--accent-glow);
  background: rgba(0, 162, 255, 0.08);
}
.close-modal svg {
  width: 22px;
  height: 22px;
}

.modal-content h3 {
  color: white;
  font-family: "MyFont1", monospace;
  margin-bottom: 2rem;
  text-align: center;
  letter-spacing: 1px;
}

/* حقول إدخال ذكية وتأثير توهج النيون */
.input-group {
  position: relative;
  margin-bottom: 1.8rem;
}

.input-group input,
.input-group textarea {
  width: 100%;
  padding: 0.8rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  color: white;
  font-size: 0.95rem;
  outline: none;
  transition: all 0.3s;
}

.input-group input:focus,
.input-group textarea:focus {
  border-color: var(--accent-glow);
  box-shadow: 0 0 15px rgba(0, 162, 255, 0.2);
  background: rgba(0, 162, 255, 0.02);
}

.input-group label {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255, 255, 255, 0.4);
  transition: all 0.3s;
  pointer-events: none;
  font-size: 0.9rem;
}

.input-group textarea ~ label {
  top: 20px;
  transform: none;
}

/* تأثير صعود الليبل عند الكتابة أو الفوكس */
.input-group input:focus ~ label,
.input-group input:not(:placeholder-shown) ~ label,
.input-group textarea:focus ~ label,
.input-group textarea:not(:placeholder-shown) ~ label {
  top: -10px;
  left: 10px;
  font-size: 0.75rem;
  color: var(--accent-glow);
  background: #000514;
  padding: 0 5px;
}

/* --- تنسيق نجوم تقييم الآراء --- */
.stars-input {
  display: flex;
  flex-direction: row-reverse; /* لعكس الترتيب عند تلوين النجوم السابقة بالماوس */
  justify-content: flex-end;
  gap: 8px;
  margin-bottom: 1.5rem;
}

.stars-input .star {
  font-size: 1.8rem;
  color: rgba(255, 255, 255, 0.2);
  cursor: pointer;
  transition: all 0.2s ease;
}

/* تلوين النجم عند الوقوف عليه وتلوين النجوم التي قبله */
.stars-input .star:hover,
.stars-input .star:hover ~ .star {
  color: #ffb800;
  text-shadow: 0 0 10px rgba(255, 184, 0, 0.5);
}

/* تلوين النجوم المحددة بنجاح */
.stars-input .star.active,
.stars-input .star.active ~ .star {
  color: #ffca28;
  text-shadow: 0 0 15px rgba(255, 202, 40, 0.6);
}

/* عرض النجوم داخل كرت التعليق بعد جلبها */
.testi-stars {
  color: #ffca28;
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  letter-spacing: 2px;
}

/* تنسيق تاريخ التعليق أسفل الكرت */
.testi-date {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.35);
  margin-top: 0.8rem;
  font-family: monospace;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.testi-date svg {
  flex-shrink: 0;
  opacity: 0.7;
}



/* --- PROCESS SECTION --- */
.Process {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 100%;
  padding: 5rem 1rem;
}
.process-subtitle {
  color: rgba(255, 255, 255, 0.5);
  font-size: 1rem;
  margin-bottom: 3.5rem;
  text-align: center;
  max-width: 600px;
}
.process-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  width: 95%;
  max-width: 1200px;
}
.process-card {
  background: linear-gradient(
    145deg,
    rgba(0, 15, 50, 0.2),
    rgba(0, 5, 15, 0.4)
  );
  border: 1px solid rgba(0, 162, 255, 0.08);
  border-radius: 20px;
  padding: 2.5rem 1.5rem;
  position: relative;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.process-card:hover {
  border-color: var(--accent-glow);
  box-shadow: 0 10px 30px rgba(0, 162, 255, 0.1);
  transform: translateY(-5px);
} /* شارة الرقم المتوهجة بالنيون */
.step-number-badge {
  position: absolute;
  top: -20px;
  left: 20px;
  background: #000514;
  border: 1px solid var(--accent-dim);
  color: var(--accent-glow);
  font-family: "MyFont1", monospace;
  font-size: 1.1rem;
  width: 45px;
  height: 45px;
  border-radius: 12px;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 0 15px rgba(0, 162, 255, 0.2);
  transition: all 0.4s;
}
.process-card:hover .step-number-badge {
  border-color: var(--accent-glow);
  color: white;
  background: var(--accent-glow);
  box-shadow: 0 0 20px var(--accent-glow);
}
.step-title {
  color: white;
  font-family: "MyFont2", sans-serif;
  font-size: 1.1rem;
  margin-bottom: 1rem;
  margin-top: 0.5rem;
}
.step-desc {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.88rem;
  line-height: 1.6;
}

/* --- MAP SECTION --- */
.Map {
  width: 100%;
  padding: 0 1rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.map-card {
  width: 95%;

  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--accent-dim);
  margin-bottom: 2rem;
  transition: var(--transition-main);
}

.map-card:hover {
  border-color: rgba(0, 162, 255, 0.3);
  box-shadow: 0 0 30px rgba(0, 100, 255, 0.1);
}

.Map iframe {
  width: 100%;
  height: 350px;
  display: block;
  border: none;
}

/* --- CONTACT SECTION --- */
.Contact {
  display: flex;
  width: 100%;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 0 1rem;
}

.contact-container {
  display: flex;
  width: 100%;
  justify-content: center;
  padding-bottom: 3rem;
}

.contact-form {
  background: linear-gradient(
    135deg,
    rgba(0, 20, 60, 0.25),
    rgba(0, 5, 20, 0.45)
  );
  border: 1px solid var(--accent-dim);
  padding: 2.5rem 2rem;
  border-radius: 25px;
  width: 95%;

  display: flex;
  flex-direction: column;
  gap: 1.8rem;
  transition: var(--transition-main);
}

.contact-form:hover {
  border-color: rgba(0, 162, 255, 0.3);
  box-shadow: 0 0 40px rgba(0, 100, 255, 0.1);
}

.input-group {
  position: relative;
}

.input-group input,
.input-group textarea {
  width: 100%;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  color: white;
  font-family: inherit;
  font-size: 0.95rem;
  outline: none;
  transition: all 0.3s ease;
}

.input-group textarea {
  min-height: 120px;
  resize: none;
  overflow: hidden;
}

.input-group label {
  position: absolute;
  left: 16px;
  top: 14px;
  color: rgba(255, 255, 255, 0.35);
  font-size: 0.9rem;
  pointer-events: none;
  transition: all 0.3s ease;
  background: transparent;
  padding: 0 4px;
}

.input-group input:focus ~ label,
.input-group input:not(:placeholder-shown) ~ label,
.input-group textarea:focus ~ label,
.input-group textarea:not(:placeholder-shown) ~ label {
  top: -10px;
  left: 12px;
  font-size: 0.75rem;
  color: var(--accent-glow);
  background: var(--surface-color);
}

.input-group input:focus,
.input-group textarea:focus {
  border-color: var(--accent-glow);
  box-shadow: 0 0 15px rgba(0, 162, 255, 0.15);
  background: rgba(0, 162, 255, 0.03);
}
/* الحاوية الكبيرة لزر الرفع */
.file-group {
  display: flex;
  flex-direction: column;
  position: relative;     /* مهم جداً لتفعيل الـ z-index */
  z-index: 10;            /* نرفع الحاوية فوق أي حقول متداخلة */
  margin-top: 20px;       /* إعطاء مسافة أمان كافية أسفل حقل الرسالة */
  margin-bottom: 20px;
  width: 100%;
}

/* زر الرفع نفسه */
.file-upload-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.08) !important; /* زيادة الإضاءة الخلفية */
  border: 1px dashed rgba(255, 255, 255, 0.3) !important; /* جعل الحدود واضحة */
  border-radius: 12px;
  color: #ffffff !important; /* جعل النص أبيض ناصع لإزالة البهتان */
  font-size: 0.95rem;
  cursor: pointer !important; /* تحويل المؤشر ليد عند الوقوف فوقه */
  pointer-events: auto !important; /* إجبار المتصفح على استقبال النقرات */
  position: relative;
  z-index: 20;            /* رفع الزر إلى أعلى طبقة ممكنة */
  transition: all 0.3s ease;
}
.file-upload-btn svg.upload-icon {
  flex-shrink: 0;
  opacity: 0.9;
}

/* شكل الزر عند تمرير الماوس فوقه للتأكد من أنه يتفاعل */
.file-upload-btn:hover {
  background: rgba(255, 255, 255, 0.15) !important;
  border-color: rgba(255, 255, 255, 0.6) !important;
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.2);
}

/* التأكد من أن حقل الإدخال المخفي لا يحجب الزر */
#user_file {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}
/* --- FOOTER --- */
footer {
  width: 95%;

  background: linear-gradient(to bottom, var(--bg-color) 40%, transparent);
  border: 1px solid var(--accent-dim);
  border-radius: 25px;
  margin: 1rem auto 2rem;
  padding: 2rem 1rem;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 10px 50px rgba(7, 21, 143, 0.4);
  animation: fadeInUp 1.5s ease;
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.footer-content p {
  color: var(--text-dim);
  margin-bottom: 1.2rem;
  text-align: center;
  letter-spacing: 1px;
  font-size: 0.9rem;
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 1.2rem;
}

.social-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: all 0.4s ease;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.02);
}
.social-icon svg {
  width: 22px;
  height: 22px;
  transition: transform 0.4s ease;
}
.social-icon:hover svg {
  transform: scale(1.1);
}

.fb:hover {
  color: #1877f2;
  border-color: #1877f2;
  box-shadow: 0 0 20px rgba(24, 119, 242, 0.4);
  transform: translateY(-5px);
  background: rgba(24, 119, 242, 0.08);
}

.ig:hover {
  color: #e1306c;
  border-color: #e1306c;
  box-shadow: 0 0 20px rgba(225, 48, 108, 0.4);
  transform: translateY(-5px);
  background: rgba(225, 48, 108, 0.08);
}

.tk:hover {
  color: #ff0050;
  border-color: #ff0050;
  box-shadow: 0 0 20px rgba(255, 0, 80, 0.4);
  transform: translateY(-5px);
  background: rgba(255, 0, 80, 0.08);
}

.wa:hover {
  color: #25d366;
  border-color: #25d366;
  box-shadow: 0 0 20px rgba(37, 211, 102, 0.4);
  transform: translateY(-5px);
  background: rgba(37, 211, 102, 0.08);
}

.copyright {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.25);
  letter-spacing: 1px;
}

/* --- ANIMATIONS --- */
@keyframes profileEntrance {
  from {
    opacity: 0;
    transform: scale(0.8) translateY(40px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --- CUSTOM FONTS --- */
@font-face {
  font-family: "MyFont1";
  src: url("CANAVAR.ttf");
  font-weight: normal;
  font-style: normal;
}
@font-face {
  font-family: "MyFont2";
  src: url("CANAVAR.ttf");
  font-weight: normal;
  font-style: normal;
}
@font-face {
  font-family: "MyFont3";
  src: url("OriginTech personal use.otf");
  font-weight: normal;
  font-style: normal;
}
@font-face {
  font-family: "MyFont4";
  src: url("Cyborg Punk.ttf");
  font-weight: normal;
  font-style: normal;
}
@font-face {
  font-family: "MyFont5";
  src: url("Daisyogre-Regular.ttf");
  font-weight: normal;
  font-style: normal;
}

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
  header {
    width: 96%;
    height: 60px;
    padding: 0 0.8rem;
  }

  .logo-svg {
    width: 120px;
    height: 40px;
  }

  .text-copy {
    font-size: 45px;
    stroke-width: 2.5px;
  }

  .section-title {
    font-size: 1.1rem;
    padding-top: 80px;
  }

  .avatar-container {
    width: 120px;
    height: 120px;
    margin-top: 40px;
  }

  .hero-text h1 {
    font-size: 1.2rem;
  }

  .action-btn {
    width: 150px;
    height: 38px;
    font-size: 0.8rem;
  }

  .actions {
    gap: 1rem;
  }

  .abo-card {
    padding: 1.5rem;
  }

  .abo-card p {
    font-size: 0.85rem;
    text-align: left;
  }

  .serv-card {
    width: 100%;
    max-width: 320px;
    padding: 1.5rem 1.2rem;
  }

  .project-card-3d {
    width: 100%;
    max-width: 320px;
  }

  .project-card-3d:nth-child(1):hover,
  .project-card-3d:nth-child(2):hover,
  .project-card-3d:nth-child(3):hover {
    transform: scale(1.02);
  }

  .contact-form {
    padding: 1.5rem 1.2rem;
  }

  .overlay {
    width: 94%;
  }

  .overlay a {
    font-size: 0.8rem;
    letter-spacing: 3px;
    padding: 10px 16px;
  }

  .Map iframe {
    height: 250px;
  }

  [dir="rtl"] .abo-card p {
    text-align: right;
  }
}

@media (max-width: 400px) {
  .logo-svg {
    width: 90px;
    height: 35px;
  }
  .text-copy {
    font-size: 35px;
  }
  .hero-text h1 {
    font-size: 1rem;
  }
  .action-btn {
    width: 135px;
    height: 36px;
    font-size: 0.75rem;
  }
}

/* RTL Support */
[dir="rtl"] .abo-card p {
  text-align: right;
}
[dir="rtl"] .ski-info {
  flex-direction: row-reverse;
}
[dir="rtl"] .ski-number {
  text-align: left;
}
[dir="rtl"] .input-group input,
[dir="rtl"] .input-group textarea {
  text-align: right;
}
[dir="rtl"] .input-group label {
  left: auto;
  right: 16px;
}
[dir="rtl"] .input-group input:focus ~ label,
[dir="rtl"] .input-group input:not(:placeholder-shown) ~ label,
[dir="rtl"] .input-group textarea:focus ~ label,
[dir="rtl"] .input-group textarea:not(:placeholder-shown) ~ label {
  left: auto;
  right: 12px;
}
