.orphan-program-section {
  margin: 50px 0;
}
.orphan-program-section .container {
  max-width: 900px;
  margin: 0 auto;
  background: white;
  border-radius: 15px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  padding: 0;
}
.orphan-program-section .header {
  background: linear-gradient(135deg, #4caf50, #45a049);
  color: white;
  padding: 30px;
  text-align: center;
  height: auto;
  display: block;
  z-index: 0;
}

.orphan-program-section .header h1 {
  font-size: 2.2em;
  margin-bottom: 10px;
}

.orphan-program-section .header p {
  font-size: 1.1em;
  opacity: 0.9;
}

/* شريط التقدم */
.orphan-program-section .progress-container {
  background: #f8f9fa;
  padding: 20px;
  border-bottom: 1px solid #e0e0e0;
}

.orphan-program-section .progress-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.orphan-program-section .progress-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  position: relative;
}

.orphan-program-section .progress-step:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 15px;
  right: 50%;
  width: 100%;
  height: 2px;
  background: #ddd;
  z-index: 1;
}

.orphan-program-section .progress-step.completed:not(:last-child)::after {
  background: #4caf50;
}

.orphan-program-section .step-circle {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #ddd;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 0.9em;
  position: relative;
  z-index: 2;
  transition: all 0.3s ease;
}
.orphan-program-section .progress-step.active {
  border-bottom: none !important;
}
.orphan-program-section .progress-step.active .step-circle {
  background: #4caf50;
  transform: scale(1.1);
}

.orphan-program-section .progress-step.completed .step-circle {
  background: #4caf50;
}

.orphan-program-section .step-label {
  margin-top: 8px;
  font-size: 0.8em;
  text-align: center;
  color: #666;
  font-weight: 500;
}

.orphan-program-section .progress-step.active .step-label {
  color: #4caf50;
  font-weight: 600;
}

.orphan-program-section .progress-info {
  text-align: center;
  color: #666;
  font-size: 0.9em;
}

/* محتوى النموذج */
.orphan-program-section .form-container {
  padding: 40px;
}

.orphan-program-section .step-content {
  display: none;
}

.orphan-program-section .step-content.active {
  display: block;
  animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.orphan-program-section .step-title {
  color: #333;
  font-size: 1.8em;
  margin-bottom: 10px;
  text-align: center;
}

.orphan-program-section .step-description {
  color: #666;
  text-align: center;
  margin-bottom: 30px;
  font-size: 1.1em;
}

.orphan-program-section .form-group {
  margin-bottom: 25px;
}
.orphan-program-section .form-group input {
  width: auto;
  height: auto;
  padding: 0;
  border: none;
  border-radius: 0;
  font-size: 0.9rem !important;
}
.form-group select {
  font-size: 0.8rem !important;
}

.orphan-program-section .form-row {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.orphan-program-section .form-row .form-group {
  flex: 1;
  min-width: 250px;
}

.orphan-program-section label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #333;
  font-size: 1em;
}

.orphan-program-section .required {
  color: #e74c3c;
}

.orphan-program-section input[type="text"],
.orphan-program-section input[type="email"],
.orphan-program-section input[type="tel"],
.orphan-program-section input[type="date"],
.orphan-program-section input[type="number"],
.orphan-program-section select,
.orphan-program-section textarea {
  width: 100%;
  padding: 12px 15px;
  border: 2px solid #ddd;
  border-radius: 8px;
  font-size: 1em;
  transition: all 0.3s ease;
  background: white;
}

.orphan-program-section input:focus,
.orphan-program-section select:focus,
.orphan-program-section textarea:focus {
  outline: none;
  border-color: #4caf50;
  box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

.orphan-program-section .radio-group {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.orphan-program-section .radio-item {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding: 12px 18px;
  border: 2px solid #ddd;
  border-radius: 8px;
  transition: all 0.3s ease;
  background: white;
  min-width: 120px;
}

.orphan-program-section .radio-item:hover {
  border-color: #4caf50;
  background: #f8f9fa;
}

.orphan-program-section .radio-item input[type="radio"] {
  margin: 0;
}

.orphan-program-section .radio-item input[type="radio"]:checked + span {
  color: #4caf50;
  font-weight: 600;
}

.orphan-program-section .radio-item:has(input[type="radio"]:checked) {
  border-color: #4caf50;
  background: #f8f9fa;
}

/* تحسين رفع الملفات */
.orphan-program-section .file-upload-container {
  position: relative;
  width: 100%;
}

.orphan-program-section .file-upload {
  position: relative;
  display: inline-block;
  width: 100%;
}

.orphan-program-section .file-upload input[type="file"] {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
}

.orphan-program-section .file-upload-label {
  display: block;
  padding: 20px;
  border: 2px dashed #ddd;
  border-radius: 8px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  background: white;
}

.orphan-program-section .file-upload-label:hover {
  border-color: #4caf50;
  background: #f8f9fa;
}

.orphan-program-section .file-upload-label::before {
  content: "📁";
  display: block;
  font-size: 2.5em;
  margin-bottom: 10px;
}

/* معاينة الملف المرفوع */
.orphan-program-section .file-preview {
  display: none;
  margin-top: 15px;
  padding: 15px;
  border: 2px solid #4caf50;
  border-radius: 8px;
  background: #f8f9fa;
  position: relative;
}

.orphan-program-section .file-preview.active {
  display: block;
  animation: slideDown 0.3s ease-in-out;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.orphan-program-section .file-preview-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.orphan-program-section .file-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.orphan-program-section .file-icon {
  font-size: 1.5em;
}

.orphan-program-section .file-details {
  display: flex;
  flex-direction: column;
}

.orphan-program-section .file-name {
  font-weight: 600;
  color: #333;
  font-size: 0.9em;
}

.orphan-program-section .file-size {
  color: #666;
  font-size: 0.8em;
}

.orphan-program-section .remove-file-btn {
  background: #e74c3c;
  color: white;
  border: none;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2em;
  transition: all 0.3s ease;
}

.orphan-program-section .remove-file-btn:hover {
  background: #c0392b;
  transform: scale(1.1);
}

.orphan-program-section .image-preview {
  margin-top: 10px;
  text-align: center;
}

.orphan-program-section .image-preview img {
  max-width: 200px;
  max-height: 150px;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.orphan-program-section .pdf-preview {
  margin-top: 10px;
  text-align: center;
  padding: 20px;
  background: #fff;
  border-radius: 8px;
  border: 1px solid #ddd;
}

.orphan-program-section .pdf-icon {
  font-size: 3em;
  color: #e74c3c;
  margin-bottom: 10px;
}

/* أقسام بيانات الوالدين */
.orphan-program-section .parent-section {
  border: 2px solid #e0e0e0;
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 20px;
  background: #fafafa;
  display: none;
}

.orphan-program-section .parent-section.active {
  display: block;
  animation: slideIn 0.3s ease-in-out;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.orphan-program-section .parent-section-title {
  color: #4caf50;
  font-size: 1.3em;
  font-weight: 600;
  margin-bottom: 15px;
  text-align: center;
  border-bottom: 2px solid #4caf50;
  padding-bottom: 8px;
}

/* أزرار التنقل */
.orphan-program-section .navigation-buttons {
  display: flex;
  justify-content: space-between;
  margin-top: 40px;
  gap: 20px;
}

.orphan-program-section .btn {
  padding: 12px 30px;
  border: none;
  border-radius: 8px;
  font-size: 1.1em;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  min-width: 120px;
}

.orphan-program-section .btn-primary {
  background: linear-gradient(135deg, #4caf50, #45a049);
  color: white;
}

.orphan-program-section .btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 15px rgba(76, 175, 80, 0.3);
}

.orphan-program-section .btn-secondary {
  background: #6c757d;
  color: white;
}

.orphan-program-section .btn-secondary:hover {
  background: #5a6268;
  transform: translateY(-2px);
}

.orphan-program-section .btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
}

.orphan-program-section .error {
  color: #e74c3c;
  font-size: 0.9em;
  margin-top: 5px;
  display: none;
}

.orphan-program-section .success-message {
  background: #d4edda;
  color: #155724;
  padding: 20px;
  border-radius: 8px;
  margin-bottom: 20px;
  display: none;
  text-align: center;
  font-size: 1.1em;
}

/* ملخص البيانات */
.orphan-program-section .summary-section {
  background: #f8f9fa;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 20px;
}

.orphan-program-section .summary-title {
  color: #4caf50;
  font-size: 1.2em;
  font-weight: 600;
  margin-bottom: 15px;
  border-bottom: 2px solid #4caf50;
  padding-bottom: 5px;
}

.orphan-program-section .summary-item {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid #e0e0e0;
}

.orphan-program-section .summary-item:last-child {
  border-bottom: none;
}

.orphan-program-section .summary-label {
  font-weight: 600;
  color: #333;
}

.orphan-program-section .summary-value {
  color: #666;
  text-align: left;
}
/* /////////////////////////////// */

.spinner {
  border: 3px solid #f3f3f3;
  border-top: 3px solid #3498db;
  border-radius: 50%;
  width: 22px;
  height: 22px;
  animation: spin 1s linear infinite;
  margin-top: 10px;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.error {
  color: red;
  margin-top: 5px;
  font-size: 14px;
}

/* /////////////////////////////// */

@media (max-width: 768px) {
  .orphan-program-section .form-container {
    padding: 20px;
  }

  .orphan-program-section .form-row {
    flex-direction: column;
  }

  .orphan-program-section .form-row .form-group {
    min-width: auto;
  }

  .orphan-program-section .progress-bar {
    flex-wrap: wrap;
    gap: 10px;
  }

  .orphan-program-section .progress-step {
    min-width: 80px;
  }

  .orphan-program-section .step-label {
    font-size: 0.7em;
  }

  .orphan-program-section .navigation-buttons {
    flex-direction: column;
  }

  .orphan-program-section .file-preview-header {
    flex-direction: column;
    gap: 10px;
    align-items: flex-start;
  }

  .orphan-program-section .image-preview img {
    max-width: 150px;
    max-height: 100px;
  }
}
