html {
  overflow-y: scroll; /* Force consistent scrollbar */
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #87ceeb 0%, #ff7f50 100%);
  min-height: 100vh;
  min-height: calc(var(--vh, 1vh) * 100);
  overflow-x: hidden;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Navigation */
.nav-container {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  animation: slideDown 0.8s ease-out;
}

.nav-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(135, 206, 235, 0.2);
  backdrop-filter: blur(10px);
  padding: 8px;
  border-radius: 20px;
  box-shadow: 0 8px 32px rgba(255, 127, 80, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.nav-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  background: rgba(255, 127, 80, 0.3);
  border: none;
  border-radius: 15px;
  color: white;
  cursor: pointer;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(5px);
  opacity: 0.5;
  transform: scale(0.8);
}

.nav-button:hover {
  transform: translateY(-5px) scale(0.9);
  background: rgba(255, 127, 80, 0.5);
  box-shadow: 0 10px 25px rgba(255, 127, 80, 0.3);
  opacity: 0.8;
}

.nav-button.active {
  background: rgba(255, 127, 80, 0.8);
  transform: scale(1.2);
  opacity: 1;
  box-shadow: 0 15px 35px rgba(255, 127, 80, 0.5);
}

/* Page Container */
.page {
  display: none;
  min-height: 100vh;
  min-height: calc(var(--vh, 1vh) * 100);
  padding-top: 100px;
}

.page.active {
  display: block;
  animation: fadeInUp 0.8s ease-out;
}

/* Home Page Styles */
.section {
  margin-bottom: 80px;
  opacity: 0;
  transform: translateY(60px);
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.section.visible {
  opacity: 1;
  transform: translateY(0);
}

.hero-section {
  background: rgba(135, 206, 235, 0.2);
  backdrop-filter: blur(20px);
  border-radius: 30px;
  padding: 60px;
  text-align: center;
  margin-bottom: 80px;
  border: 1px solid rgba(255, 127, 80, 0.3);
  box-shadow: 0 20px 40px rgba(255, 127, 80, 0.2);
}

.profile-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
}

.profile-image {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: linear-gradient(45deg, #ff7f50, #87ceeb);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  color: white;
  animation: float 3s ease-in-out infinite;
  box-shadow: 0 20px 40px rgba(255, 127, 80, 0.3);
}

.profile-text {
  flex: 1;
  max-width: 600px;
  text-align: left;
}

.profile-text h1 {
  color: white;
  font-size: 3.5rem;
  margin-bottom: 20px;
  background: linear-gradient(45deg, #ff7f50, #87ceeb);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.profile-text h2 {
  color: white;
  font-size: 1.8rem;
  margin-bottom: 20px;
  background: linear-gradient(45deg, #ff7f50, #87ceeb);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.profile-text p {
  color: rgba(255, 255, 255, 0.95);
  font-size: 1.3rem;
  line-height: 1.6;
  margin-bottom: 30px;
}

/* Services Section */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.service-card {
  background: rgba(135, 206, 235, 0.2);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  padding: 40px 30px;
  text-align: center;
  border: 1px solid rgba(255, 127, 80, 0.3);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
}

.service-card:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: 0 30px 60px rgba(255, 127, 80, 0.3);
  background: rgba(135, 206, 235, 0.3);
}

.service-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 20px;
  background: linear-gradient(45deg, #ff7f50, #87ceeb);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: white;
}

.service-card h3 {
  color: white;
  font-size: 1.5rem;
  margin-bottom: 15px;
}

.service-card p {
  color: rgba(255, 255, 255, 0.95);
  line-height: 1.6;
  font-size: 1.05rem;
}

/* Contact Section */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.contact-card {
  background: rgba(135, 206, 235, 0.2);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  padding: 30px;
  text-align: center;
  border: 1px solid rgba(255, 127, 80, 0.3);
  transition: all 0.3s ease;
}
.contact-card h3 {
  color: white;
  font-size: 2rem;
  margin-bottom: 5px;
}
.contact-card p {
  color: rgba(255, 255, 255, 0.95);
  font-size: 1.05rem;
  margin-top: 5px;
  font-weight: 500;
}
.contact-card:hover {
  transform: translateY(-5px);
  background: rgba(135, 206, 235, 0.3);
}

.section-title {
  color: white;
  font-size: 2.5rem;
  text-align: center;
  margin-bottom: 50px;
  background: linear-gradient(45deg, #ffffff, #fffb8a);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 2px 10px rgba(255, 255, 255, 0.3);
  font-weight: 700;
}

/* Projects Page */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.project-card {
  background: rgba(135, 206, 235, 0.2);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid rgba(255, 127, 80, 0.3);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 30px 60px rgba(255, 127, 80, 0.3);
}

.project-image {
  height: 200px;
  width: 100%;
  background: linear-gradient(45deg, #87ceeb, #ff7f50);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: white;
  overflow: hidden;
  border-radius: 15px;
  margin-bottom: 15px;
}
.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.project-content {
  padding: 30px;
}

.project-status {
  display: inline-block;
  padding: 5px 15px;
  border-radius: 20px;
  font-size: 0.9rem;
  margin-bottom: 15px;
  font-weight: bold;
}

.status-completed {
  background: rgba(76, 175, 80, 0.3);
  color: #4caf50;
  border: 1px solid #4caf50;
}

.status-progress {
  background: rgba(255, 193, 7, 0.3);
  color: #ffc107;
  border: 1px solid #ffc107;
}

.status-construction {
  background: rgba(244, 67, 54, 0.3);
  color: #f44336;
  border: 1px solid #f44336;
}

/* Certificates Page */
.certificate-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-bottom: 50px;
}

.certificate-card {
  background: rgba(135, 206, 235, 0.2);
  backdrop-filter: blur(15px);
  border-radius: 25px;
  padding: 20px;
  border: 2px solid rgba(255, 127, 80, 0.3);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  text-align: center; /* لتوسيط المحتوى */
}

.certificate-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.1),
    transparent
  );
  transition: left 0.6s;
}

.certificate-card:hover::before {
  left: 100%;
}

.certificate-card:hover {
  transform: translateY(-15px) scale(1.05);
  box-shadow: 0 25px 50px rgba(255, 127, 80, 0.4);
  border-color: rgba(255, 127, 80, 0.8);
}

/* صورة الشهادة */
.certificate-image {
  width: 100%;
  height: 450px;
  overflow: hidden;
  border-radius: 15px;
  margin-bottom: 15px;
  position: relative;
}

.certificate-image {
  position: relative;
}
.certificate-image img {
  position: absolute; /* تراكب */
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 15px;
  opacity: 0;
  transition: opacity 0.8s ease-in-out;
}
.certificate-image img.active {
  opacity: 1;
}
.certificate-image_1 {
  width: 100%;
  height: 200px;
  overflow: hidden;
  border-radius: 15px;
  margin-bottom: 15px;
  position: relative;
}
.certificate-image_1 img {
  position: absolute; /* تراكب */
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 15px;
  opacity: 0;
  transition: opacity 0.8s ease-in-out;
}

.certificate-image_1 img.active {
  opacity: 1;
}
.certificate-image_1 {
  position: relative;
}

.certificate-image img:only-child,
.certificate-image_1 img:only-child {
  opacity: 1;
}

/* التعريف */
.certificate-info h3 {
  color: white;
  font-size: 1.4rem;
  margin-bottom: 5px;
}

.certificate-info p {
  color: rgba(255, 255, 255, 0.95);
  font-size: 0.95rem;
  margin-bottom: 15px;
  font-weight: 500;
}

/* التفاصيل */
.certificate-details {
  color: rgba(255, 255, 255, 0.95);
  line-height: 1.7;
  margin-bottom: 15px;
  font-size: 1rem;
}

/* البادجات */
.certificate-badge {
  display: inline-block;
  background: linear-gradient(45deg, #ff7f50, #87ceeb);
  color: white;
  padding: 5px 15px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: bold;
  margin: 5px;
}

/* Skills Section */
.skills-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-bottom: 50px;
}

.skill-category {
  background: rgba(135, 206, 235, 0.2);
  backdrop-filter: blur(15px);
  border-radius: 20px;
  padding: 30px;
  border: 1px solid rgba(255, 127, 80, 0.3);
  transition: all 0.4s ease;
}

.skill-category:hover {
  transform: scale(1.05);
  background: rgba(135, 206, 235, 0.3);
  box-shadow: 0 20px 40px rgba(255, 127, 80, 0.3);
}

.skill-category h3 {
  color: white;
  text-align: center;
  margin-bottom: 20px;
  font-size: 1.3rem;
}

.skill-bar {
  margin-bottom: 20px;
}

.skill-name {
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
}

.skill-progress {
  height: 8px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  overflow: hidden;
}

.skill-fill {
  height: 100%;
  background: linear-gradient(45deg, #ff7f50, #87ceeb);
  border-radius: 10px;
  transition: width 2s ease-in-out;
  width: 0;
}

.skill-fill.animated {
  width: var(--skill-width);
}
.feature-card {
  background: rgba(135, 206, 235, 0.2);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  padding: 40px;
  margin-bottom: 30px;
  border: 1px solid rgba(255, 127, 80, 0.3);
  transition: all 0.3s ease;
}

.feature-card:hover {
  transform: translateX(20px);
  background: rgba(135, 206, 235, 0.3);
}

/* Animations */
@keyframes slideDown {
  from {
    opacity: 0;
    transform: translate(-50%, -50px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%);
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(60px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  .hero-section {
    padding: 40px 30px;
  }

  .profile-container {
    flex-direction: column;
    text-align: center;
  }

  .profile-text {
    text-align: center;
  }

  .profile-text h1 {
    font-size: 2.5rem;
  }

  .section-title {
    font-size: 2rem;
  }

  .nav-bar {
    padding: 6px;
  }

  .nav-button {
    width: 45px;
    height: 45px;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 15px;
  }

  .hero-section {
    padding: 30px 20px;
  }

  .profile-text h1 {
    font-size: 2rem;
  }

  .profile-text p {
    font-size: 1.1rem;
  }
}

/* Scroll Progress Bar */
.progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 4px;
  background: linear-gradient(45deg, #ff7f50, #87ceeb);
  z-index: 1001;
  transition: width 0.1s ease;
}

/* يجعل اللودر في منتصف الشاشة */
.loading-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #87ceeb 0%, #ff7f50 100%);
  z-index: 9998;
}

/* الحاوية الداخلية للحروف */
.loader {
  display: flex;
  gap: clamp(0.3em, 1vw, 0.8em);
}

/* أيقونات الحروف (Responsive) */
.loader-icon {
  width: clamp(40px, 10vw, 64px);
  height: auto;
}

.inline-block {
  display: inline-block;
}

/* حركة الخط */
.dash {
  animation: dashArray 2s ease-in-out infinite, dashOffset 2s linear infinite;
}
@keyframes dashArray {
  0% {
    stroke-dasharray: 0 1 359 0;
  }
  50% {
    stroke-dasharray: 0 359 1 0;
  }
  100% {
    stroke-dasharray: 359 1 0 0;
  }
}
@keyframes dashOffset {
  0% {
    stroke-dashoffset: 365;
  }
  100% {
    stroke-dashoffset: 5;
  }
}

/* للهواتف - شاشة أصغر من 768px */
@media (max-width: 768px) {
  .loading-overlay {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  #introLogo {
    position: static; /* ما يحتاج fixed على الهاتف */
    transform: none; /* نشيل translate اللي يخرب التمركز */
    width: 60vw; /* حجم مناسب للشاشات الصغيرة */
    max-width: 200px; /* حد أقصى */
    height: auto;
  }
}

/* تكيف أكثر على الشاشات الصغيرة */
@media (max-width: 480px) {
  .loader-icon {
    width: clamp(36px, 12vw, 50px);
  }
}

@keyframes text_713 {
  0% {
    letter-spacing: 1px;
    transform: translateX(0px);
  }
  40% {
    letter-spacing: 2px;
    transform: translateX(26px);
  }
  80% {
    letter-spacing: 1px;
    transform: translateX(32px);
  }
  90% {
    letter-spacing: 2px;
    transform: translateX(0px);
  }
  100% {
    letter-spacing: 1px;
    transform: translateX(0px);
  }
}

@keyframes loading_713 {
  0% {
    width: 16px;
    transform: translateX(0px);
  }
  40% {
    width: 100%;
    transform: translateX(0px);
  }
  80% {
    width: 16px;
    transform: translateX(64px);
  }
  90% {
    width: 100%;
    transform: translateX(0px);
  }
  100% {
    width: 16px;
    transform: translateX(0px);
  }
}

@keyframes loading2_713 {
  0% {
    transform: translateX(0px);
    width: 16px;
  }
  40% {
    transform: translateX(0%);
    width: 80%;
  }
  80% {
    width: 100%;
    transform: translateX(0px);
  }
  90% {
    width: 80%;
    transform: translateX(15px);
  }
  100% {
    transform: translateX(0px);
    width: 16px;
  }
}
footer {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #87ceeb 0%, #ff7f50 100%);
  position: relative;
  color: white;
  padding: 20px;
  text-align: center;
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.footer-content .social-links {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}

.footer-content .social-links a {
  color: white;
  text-decoration: none;
}

/* --- Loading overlay (يغطي الصفحة بالكامل، نفس تدرج الخلفية) --- */
.loading-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(
    135deg,
    #87ceeb 0%,
    #ff7f50 100%
  ); /* نفس خلفية الصفحة */
  z-index: 9998;
  will-change: transform, opacity;
  overflow: hidden;
}

/* loader (استخدمت نفس عناصر الـ loader الموجود) */
.loader {
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 9999;
}

/* إخفاء سلس للـ loader */
.loader.hide {
  opacity: 0;
  transform: translateY(-10px);
  transition: all 320ms ease;
}

/* شعار الانطلاقة (متمركز، مناسب لجميع الشاشات) */
#introLogo {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) scale(1);
  width: clamp(140px, 30vw, 260px); /* responsive */
  max-height: 40vh;
  z-index: 10000; /* أعلى من الـ overlay حتى يظهر فوقها أثناء الحركة */
  pointer-events: none;
  opacity: 0;
  transition: opacity 260ms linear;
  will-change: transform, opacity;
}

/* نسخة الشعار الصغيرة في الـ navbar (الهدف النهائي) */
.nav-logo {
  position: absolute;
  left: -50px; /* على يسار شريط التنقل */
  top: 50%;
  transform: translateY(-50%);
  width: clamp(28px, 6vw, 44px);
  height: auto;
  opacity: 0; /* تظهر بعد الانتهاء */
  transition: opacity 260ms ease, transform 260ms ease;
}

/* responsive tweaks */
@media (max-width: 480px) {
  #introLogo {
    width: clamp(120px, 40vw, 200px);
  }
  .nav-logo {
    width: 28px;
    left: -35px; /* تقليل المسافة على الشاشات الصغيرة */
  }
}

.nav-button.active {
  color: #ffcc00; /* لون الأيقونة */
  background-color: linear-gradient(135deg, #87ceeb 0%, #ff7f50 100%);
  border-radius: 8px;
}

.nav-button.active svg {
  fill: #e5de10; /* لون SVG */
}

.projects-slider-container {
  position: relative;
  margin: auto;
  width: 100%;
  max-width: 1000px;
  height: 600px;
  background: #f5f5f5;
  box-shadow: 0 15px 25px rgba(0, 0, 0, 0.2);
  overflow: hidden;
  border-radius: 15px;
}

.prev,
.next {
  z-index: 20;
}

.projects-slider-container .slide .item {
  width: 200px;
  height: 300px;
  position: absolute;
  top: 50%;
  transform: translate(0, -50%);
  border-radius: 15px;
  background-position: center;
  background-size: cover;
  transition: 0.5s;
  box-shadow: 0 15px 25px rgba(0, 0, 0, 0.3);
  display: flex;
}

.slide .item:nth-child(1),
.slide .item:nth-child(2) {
  top: 0;
  left: 0;
  transform: translate(0, 0);
  border-radius: 0;
  width: 100%;
  height: 100%;
}

.slide .item:nth-child(3) {
  left: 50%;
}
.slide .item:nth-child(4) {
  left: calc(50% + 220px);
}
.slide .item:nth-child(5) {
  left: calc(50% + 440px);
}
.slide .item:nth-child(n + 6) {
  left: calc(50% + 660px);
  opacity: 0;
}

/* 📱 تابلت */
@media (max-width: 768px) {
  .slide .item:nth-child(3),
  .slide .item:nth-child(4),
  .slide .item:nth-child(5) {
    width: 40%;
    height: 55%;
  }
  .slide .item:nth-child(3) {
    left: 60%;
  }
  .slide .item:nth-child(4) {
    left: 80%;
  }
  .slide .item:nth-child(5) {
    left: 100%;
  }
}

@media (max-width: 480px) {
  .slide .item:nth-child(3),
  .slide .item:nth-child(4),
  .slide .item:nth-child(5) {
    width: 45%;
    height: 50%;
  }
  .slide .item:nth-child(3) {
    left: 65%;
  }
  .slide .item:nth-child(4) {
    left: 85%;
  }
  .slide .item:nth-child(5) {
    left: 105%;
  }
}

.slide .item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.item .content {
  position: absolute;
  top: 50%;
  left: 100px;
  width: 300px;
  color: #fff;
  transform: translate(0, -50%);
  font-family: system-ui;
  display: none;
}

.slide .item:nth-child(2) .content {
  display: block;
}

.content .name {
  font-size: 40px;
  font-weight: bold;
  text-transform: uppercase;
  animation: fadeInUp 1s forwards;
}

.content .des {
  margin: 10px 0 20px;
  animation: fadeInUp 1s 0.3s forwards;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.slider-buttons {
  width: 100%;
  text-align: center;
  position: absolute;
  bottom: 20px;
}

.button {
  width: 100%;
  text-align: center;
  position: absolute;
  bottom: 20px;
}

.prev,
.next {
  display: inline-block;
  position: relative;
  width: 60px;
  height: 60px;
  margin: 0 5px;
  overflow: hidden;
  outline: none;
  background-color: transparent;
  cursor: pointer;
  border: none;
}

.prev:before,
.next:before {
  content: "";
  position: absolute;
  border-radius: 50%;
  inset: 7px;
  border: 3px solid rgb(164, 80, 255);
  transition: opacity 0.4s, transform 0.5s;
}

.prev:after,
.next:after {
  content: "";
  position: absolute;
  border-radius: 50%;
  inset: 7px;
  border: 4px solid #21fff0; /* لون التوهج */
  transform: scale(1.3);
  opacity: 0;
  transition: opacity 0.4s, transform 0.5s;
}

.prev:hover:before,
.next:hover:before {
  opacity: 0;
  transform: scale(0.7);
}

.prev:hover:after,
.next:hover:after {
  opacity: 1;
  transform: scale(1);
}

.button-box {
  display: flex;
  position: absolute;
  top: 0;
  left: 0;
}

.button-elem {
  display: block;
  width: 24px;
  height: 24px;
  margin: 18px;
}

.prev:hover .button-box {
  transform: translateX(-60px);
  transition: 0.4s;
}

.next .button-box {
  left: -60px;
}

.next:hover .button-box {
  transform: translateX(60px);
  transition: 0.4s;
}

/* 📱 موبايل */
@media (max-width: 768px) {
  .projects-slider-container {
    height: 400px;
  }
  .item .content {
    left: 20px;
    width: 80%;
  }
  .content .name {
    font-size: 28px;
  }
}

/* 📱 أصغر من 480px */
@media (max-width: 480px) {
  .projects-slider-container {
    height: 300px;
  }
  .content .name {
    font-size: 22px;
  }
  .content .des {
    font-size: 14px;
  }
}

:root {
  --card-width: 300px;
  --card-height: 400px;
}

/* الكرت الأساسي */
.card {
  width: var(--card-width);
  height: var(--card-height);
  position: relative;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  padding: 0 36px;
  perspective: 2500px;
  margin: 0 50px;
  border-radius: 5px;
  opacity: 0; /* للانبثاق */
  transform: translateY(50px); /* للانبثاق */
  transition: all 0.6s ease-out;
  z-index: 10;
}

/* عند الظهور */
.card.show {
  opacity: 1;
  transform: translateY(0);
}

/* صورة الخلفية */
.cover-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 5px;
}

/* الحاوية للصورة */
.wrapper {
  transition: all 0.5s;
  position: absolute;
  width: 100%;
  z-index: -1;
  border-radius: 5px;
}

.card:hover .wrapper {
  transform: perspective(900px) translateY(-5%) rotateX(25deg) translateZ(0);
  box-shadow: 2px 35px 32px -8px rgba(0, 0, 0, 0.75);
}

/* تأثير الإضاءة */
.wrapper::before,
.wrapper::after {
  content: "";
  opacity: 0;
  width: 100%;
  height: 80px;
  transition: all 0.5s;
  position: absolute;
  left: 0;
  border-radius: 5px;
}

.wrapper::before {
  top: 0;
  height: 100%;
  background-image: linear-gradient(
    to top,
    transparent 46%,
    rgba(12, 13, 19, 0.5) 68%,
    rgba(12, 13, 19) 97%
  );
}

.wrapper::after {
  bottom: 0;
  opacity: 1;
  background-image: linear-gradient(
    to bottom,
    transparent 46%,
    rgba(12, 13, 19, 0.5) 68%,
    rgba(12, 13, 19) 97%
  );
}

.card:hover .wrapper::before,
.card:hover .wrapper::after {
  opacity: 1;
}

.card:hover .wrapper::after {
  height: 120px;
}

/* العنوان */
.title {
  width: 100%;
  transition: transform 0.5s;
}

.card:hover .title {
  transform: translate3d(0%, -50px, 100px);
}

/* الشخصية */
.character {
  width: 100%;
  opacity: 0;
  transition: all 0.5s;
  position: absolute;
  z-index: -1;
}

.card:hover .character {
  opacity: 1;
  transform: translate3d(0%, -30%, 100px);
}

/* رفع الكرت فوق البقية عند المرور */
.card:hover {
  z-index: 50;
}

.card {
  margin: 30px 20px; /* فوق وتحت 30px، يمين ويسار 20px */
}

.cards-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 40px; /* مسافة بين الكروت */
  padding: 40px 0; /* مسافة فوق وتحت */
}

/* استجابة الشاشات */
@media (max-width: 992px) {
  :root {
    --card-width: 250px;
    --card-height: 350px;
  }
}

@media (max-width: 768px) {
  :root {
    --card-width: 200px;
    --card-height: 300px;
  }
}

@media (max-width: 480px) {
  :root {
    --card-width: 160px;
    --card-height: 240px;
  }
}

.profile-image {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: linear-gradient(45deg, #ff7f50, #87ceeb);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  color: white;
  animation: float 3s ease-in-out infinite;
  box-shadow: 0 20px 40px rgba(255, 127, 80, 0.3);
  overflow: hidden; /* مهم حتى تقص الصورة */
}

.profile-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}
