/* CSS للمراحل الكاملة والمحدثة */

.complete-phase {
  background: white;
  border-radius: 16px;
  margin-bottom: 40px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  overflow: hidden;
  border: 1px solid #e0e0e0;
}

.phase-header {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  padding: 30px;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border-bottom: 1px solid #e0e0e0;
}

.phase-number {
  font-size: 48px;
  font-weight: 900;
  color: #6c757d;
  line-height: 1;
  min-width: 80px;
}

.phase-info {
  flex: 1;
}

.phase-title {
  font-size: 24px;
  font-weight: bold;
  color: #2c3e50;
  margin-bottom: 8px;
  line-height: 1.3;
}

.phase-duration {
  font-size: 14px;
  color: #7f8c8d;
  line-height: 1.5;
}

.phase-progress {
  display: flex;
  align-items: center;
}

.progress-circle {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #e9ecef;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 3px solid #3498db;
}

.progress-text {
  font-size: 14px;
  font-weight: bold;
  color: #3498db;
}

.phase-content {
  padding: 30px;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.card {
  background: #f8f9fa;
  border-radius: 12px;
  padding: 20px;
  border: 1px solid #e9ecef;
  transition: all 0.3s ease;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.1);
  border-color: #3498db;
}

.card-icon {
  font-size: 32px;
  margin-bottom: 15px;
  display: block;
}

.card-title {
  font-size: 16px;
  font-weight: bold;
  color: #2c3e50;
  margin-bottom: 12px;
}

.card-body ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.card-body li {
  padding: 6px 0;
  padding-right: 20px;
  position: relative;
  font-size: 14px;
  color: #495057;
  line-height: 1.5;
}

.card-body li::before {
  content: '▶';
  position: absolute;
  right: 0;
  color: #3498db;
  font-size: 10px;
  top: 8px;
}

.resources-section, .exercises-section {
  margin-top: 40px;
  padding-top: 30px;
  border-top: 2px solid #e9ecef;
}

.resources-section h4, .exercises-section h4 {
  font-size: 18px;
  font-weight: bold;
  color: #2c3e50;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.resource-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.resource-item {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  padding: 15px;
  background: #fff;
  border-radius: 8px;
  border: 1px solid #e9ecef;
}

.resource-type {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: bold;
  text-transform: uppercase;
  padding: 4px 8px;
  border-radius: 4px;
  letter-spacing: 0.5px;
}

.resource-type.book {
  background: #fff3cd;
  color: #856404;
  border: 1px solid #ffeaa7;
}

.resource-type.channel {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.resource-type.course {
  background: #cce5ff;
  color: #004085;
  border: 1px solid #99d6ff;
}

.resource-text {
  flex: 1;
  font-size: 14px;
  color: #495057;
  line-height: 1.6;
}

.resource-text strong {
  color: #2c3e50;
  font-weight: 600;
}

.exercises-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

.exercise-card {
  background: #fff;
  border: 1px solid #e9ecef;
  border-radius: 12px;
  padding: 20px;
  transition: all 0.3s ease;
}

.exercise-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.1);
  border-color: #28a745;
}

.exercise-header {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 12px;
}

.exercise-number {
  width: 32px;
  height: 32px;
  background: #28a745;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: bold;
  flex-shrink: 0;
}

.exercise-title {
  font-size: 16px;
  font-weight: bold;
  color: #2c3e50;
  margin: 0;
}

.exercise-description {
  font-size: 14px;
  color: #495057;
  line-height: 1.6;
  margin: 0;
}

/* تحسينات للهواتف */
@media (max-width: 768px) {
  .phase-header {
    flex-direction: column;
    gap: 15px;
    text-align: center;
  }
  
  .phase-number {
    font-size: 36px;
  }
  
  .cards-grid {
    grid-template-columns: 1fr;
  }
  
  .exercises-list {
    grid-template-columns: 1fr;
  }
  
  .resource-item {
    flex-direction: column;
    gap: 10px;
  }
  
  .phase-content {
    padding: 20px;
  }
}

/* تأثيرات إضافية */
.complete-phase {
  position: relative;
  overflow: hidden;
}

.complete-phase::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(to bottom, #3498db, #2ecc71, #f39c12, #e74c3c);
  z-index: 1;
}

.complete-phase[data-phase="1"]::before {
  background: #3498db;
}

.complete-phase[data-phase="2"]::before {
  background: #2ecc71;
}

.complete-phase[data-phase="3"]::before {
  background: #f39c12;
}

.complete-phase[data-phase="4"]::before {
  background: #e74c3c;
}

/* تحسين الخط والقراءة */
.complete-phase {
  font-family: 'Cairo', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.phase-title {
  font-family: 'Cairo', serif;
}

/* تحسين التباعد */
.phase-content > *:last-child {
  margin-bottom: 0;
}

.card-body li:last-child {
  padding-bottom: 0;
}