/* projects.css - أنماط صفحة المشاريع */

/* الصفحة الرئيسية */
.projects-page {
  background: #f8f9fa;
  min-height: 100vh;
  padding: 30px 0;
}

.page-title {
  color: #2c3e50;
  text-align: center;
  margin-bottom: 40px;
  font-size: 2.5rem;
  font-weight: 700;
  position: relative;
}

.page-title::after {
  content: "";
  position: absolute;
  bottom: -10px;
  right: 50%;
  transform: translateX(50%);
  width: 80px;
  height: 4px;
  background: var(--primary-color);
  border-radius: 2px;
}

/* رسالة السلة */
.cart-message {
  background: #d4edda;
  color: #155724;
  padding: 15px 20px;
  border-radius: 8px;
  margin-bottom: 30px;
  border: 1px solid #c3e6cb;
  text-align: center;
  font-weight: 500;
}

/* شبكة المشاريع */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 10px;
  margin-bottom: 20px;
  justify-content: center;
}

/* بطاقة المشروع */
.project-card {
  background: white;
  border-radius: 15px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  transition: all 0.3s ease;
  border: 1px solid #e9ecef;
}

.project-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.project-image {
  width: 100%;
  height: 200px;
  object-fit: fill;
  border-bottom: 3px solid var(--primary-color);
}

.project-content {
  padding: 25px;
}

.project-title {
  color: #2c3e50;
  font-size: 1.4rem;
  margin-bottom: 15px;
  font-weight: 600;
  line-height: 1.4;
}

.project-description {
  color: #6c757d;
  line-height: 1.6;
  margin-bottom: 20px;
  font-size: 0.95rem;
}

/* شريط التقدم */
.progress-container {
  margin-bottom: 20px;
}

.progress-bar {
  background: #e9ecef;
  border-radius: 10px;
  height: 12px;
  overflow: hidden;
  margin-bottom: 8px;
  position: relative;
}

.progress {
  background: linear-gradient(90deg, var(--primary-color), #4caf50);
  height: 100%;
  border-radius: 10px;
  transition: width 0.5s ease;
  position: relative;
}

.progress::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent
  );
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

.progress-text {
  text-align: left;
  font-size: 0.9rem;
  color: var(--primary-color);
  font-weight: 600;
}

/* تفاصيل المشروع */
.project-details {
  background: #f8f9fa;
  padding: 15px;
  border-radius: 8px;
  margin-bottom: 20px;
  border: 1px solid #e9ecef;
}

.detail-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid #e9ecef;
}

.detail-item:last-child {
  border-bottom: none;
}

.detail-label {
  color: #6c757d;
  font-weight: 500;
  font-size: 0.9rem;
}

.detail-value {
  color: #2c3e50;
  font-weight: 600;
  font-size: 0.95rem;
}

/* أزرار المشروع */
.project-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  text-align: center;
  justify-content: center;
  flex: 1;
  min-width: 140px;
}

.btn-add-cart {
  background: var(--primary-color);
  color: white;
}

.btn-add-cart:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(var(--primary-rgb), 0.3);
}

.btn-donate-now {
  background: #28a745;
  color: white;
}

.btn-donate-now:hover {
  background: #218838;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

/* قسم سلة التبرعات */
.cart-section {
  text-align: center;
  padding: 30px 0;
  border-top: 2px solid #e9ecef;
  margin-top: 20px;
}

.btn-view-cart {
  background: #ffc107;
  color: #212529;
  padding: 15px 30px;
  font-size: 1rem;
  min-width: 200px;
}

.btn-view-cart:hover {
  background: #e0a800;
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(255, 193, 7, 0.3);
}

/* تصميم متجاوب */
@media (max-width: 768px) {
  .projects-grid {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 5px;
  }

  .page-title {
    font-size: 2rem;
  }

  .project-actions {
    flex-direction: column;
  }

  .btn {
    min-width: 100%;
  }

  .project-content {
    padding: 20px;
  }

  .project-details {
    padding: 12px;
  }

  .detail-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
  }
}

@media (max-width: 480px) {
  .projects-page {
    padding: 20px 10px;
  }

  .page-title {
    font-size: 1.6rem;
    margin-bottom: 30px;
  }

  .projects-grid {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 5px;
  }

  .project-title {
    font-size: 1.2rem;
  }

  .btn {
    padding: 10px 15px;
    font-size: 0.85rem;
  }
}

/* تأثيرات إضافية */
.project-card {
  position: relative;
}

.project-card::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-color), #4caf50);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.project-card:hover::before {
  transform: scaleX(1);
}

/* أيقونات */
.btn i {
  font-size: 1rem;
}

/* حالة عدم وجود مشاريع */
.no-projects {
  text-align: center;
  padding: 60px 20px;
  color: #6c757d;
}

.no-projects i {
  font-size: 4rem;
  margin-bottom: 20px;
  color: #dee2e6;
}

.no-projects h3 {
  color: #6c757d;
  margin-bottom: 10px;
}

/* تحميل */
.loading {
  text-align: center;
  padding: 40px;
  color: #6c757d;
}

.loading i {
  font-size: 2rem;
  margin-bottom: 15px;
  color: var(--primary-color);
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}
