/* ===== MODAL DE INSTRUCCIONES MEJORADO ===== */

.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  z-index: 1;
}

/* Contenedor principal del modal */
.instruction-modal {
  border-radius: 20px;
  overflow: hidden;
  background: white;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  width: 100%;
  max-width: 650px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 2;
  animation: modalSlideIn 0.4s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-30px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ===== HEADER ===== */
.education-header {
  background: linear-gradient(135deg, #3b82f6 0%, #1e40af 100%);
  color: white;
  padding: 32px 24px 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.education-header::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -30%;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
  border-radius: 50%;
}

.header-icon-wrapper {
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.header-icon {
  width: 40px;
  height: 40px;
  color: white;
}

.modal-title {
  font-size: 24px;
  font-weight: 700;
  margin: 0 0 8px 0;
  color: white;
}

.modal-subtitle {
  font-size: 14px;
  font-weight: 400;
  margin: 0;
  color: rgba(255, 255, 255, 0.9);
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 18px;
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: rotate(90deg);
}

/* ===== BODY ===== */
.modal-body {
  padding: 32px 28px;
  overflow-y: auto;
  flex: 1;
  background: #f8fafc;
}

.instruction-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.instruction-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 20px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  border: 2px solid transparent;
  transition: all 0.3s ease;
}

.instruction-item:hover {
  transform: translateX(4px);
  border-color: #3b82f6;
  box-shadow: 0 4px 16px rgba(59, 130, 246, 0.15);
}

.instruction-icon {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: white;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 20px;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.instruction-content {
  flex: 1;
}

.instruction-title {
  font-size: 16px;
  font-weight: 700;
  color: #1e293b;
  margin: 0 0 6px 0;
}

.instruction-text {
  font-size: 14px;
  line-height: 1.6;
  color: #64748b;
  margin: 0;
}

.instruction-text strong {
  color: #1e40af;
  font-weight: 600;
}

/* ===== FOOTER ===== */
.modal-footer {
  padding: 24px 28px;
  background: white;
  border-top: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: center;
}

.footer-message {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fef3c7;
  padding: 12px 20px;
  border-radius: 8px;
  border-left: 4px solid #f59e0b;
}

.footer-message i {
  color: #f59e0b;
  font-size: 18px;
}

.instruction-note {
  font-size: 14px;
  color: #92400e;
  margin: 0;
  font-weight: 500;
}

.begin-button {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: white;
  border: none;
  border-radius: 12px;
  padding: 14px 32px;
  font-size: 16px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
  cursor: pointer;
  width: 100%;
  justify-content: center;
}

.begin-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(59, 130, 246, 0.5);
}

.begin-button:active {
  transform: translateY(0);
}

.begin-button i {
  font-size: 18px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .instruction-modal {
    max-width: 95vw;
    max-height: 95vh;
    border-radius: 16px;
  }
  
  .education-header {
    padding: 24px 20px 20px;
  }
  
  .header-icon-wrapper {
    width: 64px;
    height: 64px;
  }
  
  .header-icon {
    width: 32px;
    height: 32px;
  }
  
  .modal-title {
    font-size: 20px;
  }
  
  .modal-subtitle {
    font-size: 13px;
  }
  
  .modal-body {
    padding: 24px 20px;
  }
  
  .instruction-item {
    padding: 16px;
    gap: 12px;
  }
  
  .instruction-icon {
    width: 40px;
    height: 40px;
    font-size: 16px;
  }
  
  .instruction-title {
    font-size: 14px;
  }
  
  .instruction-text {
    font-size: 13px;
  }
  
  .begin-button {
    padding: 12px 24px;
    font-size: 14px;
  }
}

/* ===== BANNER MOTIVACIONAL ===== */
.motivation-banner {
  background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
  border: 2px solid #22c55e;
  border-radius: 12px;
  padding: 20px;
  display: flex;
  gap: 16px;
  align-items: center;
  margin-bottom: 24px;
  box-shadow: 0 4px 12px rgba(34, 197, 94, 0.2);
}

.motivation-icon {
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
  color: white;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(34, 197, 94, 0.4);
}

.motivation-content {
  flex: 1;
}

.motivation-title {
  font-size: 15px;
  font-weight: 700;
  color: #166534;
  margin: 0 0 6px 0;
}

.motivation-text {
  font-size: 14px;
  color: #15803d;
  margin: 0;
  line-height: 1.5;
}

.highlight-amount {
  background: white;
  color: #166534;
  padding: 2px 8px;
  border-radius: 6px;
  font-weight: 800;
  font-size: 15px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* ===== INSTRUCCIONES COMPACTAS ===== */
.instruction-item.compact {
  padding: 14px 16px;
  gap: 12px;
}

.instruction-icon.small {
  width: 36px;
  height: 36px;
  font-size: 16px;
  border-radius: 8px;
}

.instruction-item.compact .instruction-text {
  font-size: 13px;
  line-height: 1.5;
}

/* Responsive motivacional */
@media (max-width: 768px) {
  .motivation-banner {
    flex-direction: column;
    text-align: center;
    padding: 16px;
  }
  
  .motivation-icon {
    width: 48px;
    height: 48px;
    font-size: 20px;
  }
  
  .motivation-title {
    font-size: 14px;
  }
  
  .motivation-text {
    font-size: 13px;
  }
  
  .highlight-amount {
    font-size: 14px;
  }
}
