/* الهيدر */
.courses-header {
  background: var(--gradient-primary);
  color: white;
  padding: 8rem 0;
  text-align: center;
}

.section-title {
  color: var(--brand-primary);
  border-bottom: 3px solid var(--brand-accent);
  display: inline-block;
  padding-bottom: 8px;
  margin-bottom: 2rem;
  font-weight: 700;
  position: relative;
}

.section-title::after {
  content: "";
  position: absolute;
  bottom: -3px;
  right: 0;
  width: 50%;
  height: 2px;
  background: var(--brand-accent);
}

/* فلتر الدورات */
.courses-filter {
  background: white;
  padding: 2rem;
  border-radius: 15px;
  box-shadow: var(--shadow-light);
  margin: -50px auto 3rem;
  position: relative;
  max-width: 1200px;
}

.filter-group {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: center;
}

.filter-btn {
  background: white;
  border: 2px solid #e9ecef;
  padding: 0.7rem 1.8rem;
  border-radius: 25px;
  font-weight: 500;
  transition: all 0.3s ease;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.filter-btn.active,
.filter-btn:hover {
  background: var(--brand-primary);
  color: white;
  border-color: var(--brand-primary);
}

/* بطاقات الدورات */
.courses-section {
  padding: 2rem 0 5rem;
}

.course-card {
  background: white;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: var(--shadow-light);
  transition: all 0.4s ease;
  margin-bottom: 2rem;
  border: 1px solid #f0f0f0;
}

.course-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-medium);
}

.course-header {
  position: relative;
  height: 200px;
  overflow: hidden;
}

.course-image {
  width: 100%;
  height: 100%;
  background: var(--gradient-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 3.5rem;
}

.course-category {
  position: absolute;
  top: 15px;
  left: 15px;
  background: var(--brand-accent);
  color: white;
  padding: 0.4rem 1rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
}

.course-level {
  position: absolute;
  top: 15px;
  right: 15px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--text-dark);
  padding: 0.3rem 0.8rem;
  border-radius: 15px;
  font-size: 0.75rem;
  font-weight: 600;
}

.course-content {
  padding: 1.5rem;
}

.course-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 0.8rem;
  line-height: 1.4;
}

.course-description {
  color: var(--text-light);
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.course-features {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0;
}

.course-features li {
  padding: 0.5rem 0;
  color: var(--text-light);
  position: relative;
  padding-right: 1.5rem;
}

.course-features li::before {
  content: "✓";
  position: absolute;
  right: 0;
  color: var(--brand-primary);
  font-weight: bold;
}

.course-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 1.5rem 0;
  padding-top: 1rem;
  border-top: 1px solid #f0f0f0;
}

.course-duration,
.course-students {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-light);
  font-size: 0.9rem;
}

.course-price {
  text-align: left;
}

.price-old {
  color: var(--text-light);
  text-decoration: line-through;
  font-size: 0.9rem;
}

.price-new {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--brand-primary);
}

.course-actions {
  display: flex;
  gap: 0.8rem;
}

.btn-outline-danger {
  border: 2px solid var(--brand-primary);
  color: var(--brand-primary);
  background: transparent;
  padding: 0.6rem 1.2rem;
  border-radius: 8px;
  font-weight: 600;
  transition: all 0.3s ease;
  flex: 1;
}

.btn-outline-danger:hover {
  background: var(--brand-primary);
  color: white;
  transform: translateY(-2px);
}

.btn-accent {
  background: var(--brand-accent);
  border: none;
  color: white;
  padding: 0.6rem 1.2rem;
  border-radius: 8px;
  font-weight: 600;
  transition: all 0.3s ease;
  flex: 1;
}

.btn-accent:hover {
  background: #a88a67;
  transform: translateY(-2px);
}

/* قسم الإحصائيات */
.courses-stats {
  background: var(--gradient-secondary);
  color: white;
  padding: 3rem 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
}

.stat-card {
  text-align: center;
  padding: 1.5rem;
}

.stat-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  opacity: 0.9;
}

.stat-number {
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.stat-label {
  font-size: 1rem;
  opacity: 0.9;
}

/* تأثيرات */
.course-card {
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 0.6s ease forwards;
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.course-card:nth-child(1) {
  animation-delay: 0.1s;
}
.course-card:nth-child(2) {
  animation-delay: 0.2s;
}
.course-card:nth-child(3) {
  animation-delay: 0.3s;
}
.course-card:nth-child(4) {
  animation-delay: 0.4s;
}
.course-card:nth-child(5) {
  animation-delay: 0.5s;
}
.course-card:nth-child(6) {
  animation-delay: 0.6s;
}
.course-card:nth-child(7) {
  animation-delay: 0.7s;
}
.course-card:nth-child(8) {
  animation-delay: 0.8s;
}

/* مودال الاشتراك */
.enrollment-modal .modal-content {
  border-radius: 15px;
  border: none;
}

.modal-header {
  background: var(--gradient-primary);
  color: white;
  border-radius: 15px 15px 0 0;
  border: none;
  padding: 1.5rem 2rem;
}

.modal-title {
  font-weight: 700;
  font-size: 1.3rem;
}

.enrollment-form {
  padding: 2rem;
}

.form-section {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid #f0f0f0;
}

.form-section-title {
  color: var(--brand-primary);
  font-weight: 700;
  margin-bottom: 1.5rem;
  font-size: 1.2rem;
}

.form-label {
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 0.5rem;
}

.form-control,
.form-select {
  border: 2px solid #e9ecef;
  border-radius: 8px;
  padding: 0.8rem 1rem;
  font-size: 1rem;
  transition: all 0.3s ease;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 0.2rem rgba(196, 43, 41, 0.1);
}

.course-summary {
  background: #f8f9fa;
  padding: 1.5rem;
  border-radius: 10px;
  margin-bottom: 2rem;
}

.summary-item {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0;
  border-bottom: 1px solid #e9ecef;
}

.summary-item:last-child {
  border-bottom: none;
}

.summary-total {
  font-weight: 700;
  color: var(--brand-primary);
  font-size: 1.2rem;
}

.payment-methods {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}

.payment-method {
  border: 2px solid #e9ecef;
  border-radius: 8px;
  padding: 1rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.payment-method:hover,
.payment-method.active {
  border-color: var(--brand-primary);
  background: #f8f9fa;
}

.payment-icon {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  color: var(--text-light);
}

.payment-method.active .payment-icon {
  color: var(--brand-primary);
}



@media (max-width: 768px) {
  .courses-filter {
    margin: -30px 15px 2rem;
    padding: 1.5rem;
  }

  .filter-group {
    gap: 0.5rem;
  }

  .filter-btn {
    padding: 0.5rem 1.2rem;
    font-size: 0.9rem;
  }

  .course-actions {
    flex-direction: column;
  }

  .enrollment-form {
    padding: 1.5rem;
  }

  .payment-methods {
    grid-template-columns: 1fr;
  }
}
.form-check-input:checked {
  background-color: var(--brand-primary);
  border-color: var(--brand-primary);
}
