/* ====================== Projects Section ====================== */
.projects-section {
  padding: 140px 20px 100px 20px;
  background: linear-gradient(135deg, #f5f7ff, #e0e4ff);
  text-align: center;
}

.projects-section h2 {
  font-size: 3rem;
  color: #1305d4;
  margin-bottom: 60px;
  font-weight: bold;
  position: relative;
}

.projects-section h2::after {
  content: "";
  display: block;
  width: 80px;
  height: 4px;
  background: #f9d342;
  margin: 10px auto 0;
  border-radius: 2px;
}

.projects-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 30px;
}

/* ====== البطاقات ====== */
.project-card {
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.08);
  overflow: hidden;
  flex: 0 1 calc(33.33% - 20px); /* ثلاث بطاقات في الصف */
  transition: transform 0.4s ease, box-shadow 0.4s ease;
  cursor: pointer;
}

.project-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.project-card:hover img {
  transform: scale(1.1);
}

.project-card:hover {
  transform: translateY(-15px);
  box-shadow: 0 20px 50px rgba(0,0,0,0.2);
}

.project-content {
  padding: 20px;
  text-align: center;
  transition: all 0.3s ease;
}

.project-content h3 {
  font-size: 1.5rem;
  color: #1305d4;
  margin-bottom: 10px;
  transition: color 0.3s ease;
}

.project-content h3:hover {
  color: #f9d342;
}

.project-content p {
  font-size: 1rem;
  color: #555;
  line-height: 1.6;
}

/* ====== استجابة الشاشات ====== */
@media (max-width: 1024px) {
  .project-card {
    flex: 0 1 calc(45% - 20px); /* صفين في الصف للشاشات المتوسطة */
  }
}

@media (max-width: 768px) {
  .projects-container {
    flex-direction: column;
    align-items: center;
  }

  .project-card {
    flex: 0 1 90%; /* عرض كامل للهواتف */
  }
}
