/* ==========================================================================
   ADMISSION WIZARD - Estilos para el formulario de admisiones
   Unidad Educativa Jacinto Jijón y Caamaño
   ========================================================================== */

:root {
  --wizard-primary: #1e40af;
  --wizard-primary-light: #3b82f6;
  --wizard-primary-bg: #dbeafe;
  --wizard-success: #059669;
  --wizard-success-light: #10b981;
  --wizard-success-bg: #d1fae5;
  --wizard-warning: #d97706;
  --wizard-danger: #dc2626;
  --wizard-dark: #1e293b;
  --wizard-text: #334155;
  --wizard-muted: #64748b;
  --wizard-light: #f8fafc;
  --wizard-border: #e2e8f0;
  --wizard-white: #ffffff;
  --wizard-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --wizard-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --wizard-shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --wizard-radius: 12px;
  --wizard-radius-lg: 16px;
  --wizard-radius-xl: 24px;
}

/* Base */
* {
  box-sizing: border-box;
}

body.admission-page {
  margin: 0;
  padding: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  color: var(--wizard-text);
  line-height: 1.6;
}

/* Container principal */
.admission-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header institucional */
.admission-header {
  background: linear-gradient(135deg, #1e3a5f 0%, #2d5a87 100%);
  padding: 20px 24px;
  box-shadow: var(--wizard-shadow-lg);
  position: relative;
  min-height: 120px;
}

.admission-header-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.institution-logo {
  display: flex;
  align-items: center;
  gap: 16px;
}

.institution-logo img {
  height: 160px;
  width: auto;
}

.institution-info h1 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--wizard-white);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.institution-info p {
  margin: 6px 0 0;
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.85);
  font-weight: 500;
}

.header-contact {
  text-align: right;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.9);
}

.header-contact p {
  margin: 4px 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.header-contact i {
  color: rgba(255, 255, 255, 0.7);
}

.header-contact a {
  color: var(--wizard-white);
  text-decoration: none;
  font-weight: 500;
}

.header-contact a:hover {
  text-decoration: underline;
}

/* Contenedor del formulario */
.admission-container {
  flex: 1;
  padding: 40px 24px;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  background: #FCFABA;
}

.admission-content {
  width: 100%;
  max-width: 900px;
}

/* Progress Steps */
.wizard-progress {
  background: var(--wizard-white);
  border-radius: var(--wizard-radius-xl);
  padding: 24px 32px;
  margin-bottom: 24px;
  box-shadow: var(--wizard-shadow-lg);
}

.wizard-steps {
  display: flex;
  justify-content: space-between;
  position: relative;
}

.wizard-steps::before {
  content: '';
  position: absolute;
  top: 24px;
  left: 40px;
  right: 40px;
  height: 4px;
  background: var(--wizard-border);
  border-radius: 2px;
}

.wizard-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 1;
  flex: 1;
}

.step-indicator {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--wizard-white);
  border: 3px solid var(--wizard-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--wizard-muted);
  transition: all 0.3s ease;
  margin-bottom: 12px;
}

.step-indicator i {
  font-size: 1.2rem;
}

.wizard-step.active .step-indicator {
  background: var(--wizard-primary);
  border-color: var(--wizard-primary);
  color: var(--wizard-white);
  box-shadow: 0 0 0 4px var(--wizard-primary-bg);
}

.wizard-step.completed .step-indicator {
  background: var(--wizard-success);
  border-color: var(--wizard-success);
  color: var(--wizard-white);
}

.step-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--wizard-muted);
  text-align: center;
  max-width: 100px;
  transition: color 0.3s ease;
}

.wizard-step.active .step-label {
  color: var(--wizard-primary);
}

.wizard-step.completed .step-label {
  color: var(--wizard-success);
}

/* Main Card */
.wizard-card {
  background: var(--wizard-white);
  border-radius: var(--wizard-radius-xl);
  box-shadow: var(--wizard-shadow-xl);
  overflow: hidden;
}

.wizard-card-header {
  background: linear-gradient(135deg, var(--wizard-primary) 0%, var(--wizard-primary-light) 100%);
  padding: 32px;
  color: var(--wizard-white);
  text-align: center;
}

.wizard-card-header.privacy {
  background: linear-gradient(135deg, #7c3aed 0%, #a855f7 100%);
}

.wizard-card-header.student {
  background: linear-gradient(135deg, #0891b2 0%, #06b6d4 100%);
}

.wizard-card-header.parents {
  background: linear-gradient(135deg, #059669 0%, #10b981 100%);
}

.wizard-card-header.medical {
  background: linear-gradient(135deg, #dc2626 0%, #f87171 100%);
}

.wizard-card-header.academic {
  background: linear-gradient(135deg, #d97706 0%, #fbbf24 100%);
}

.wizard-card-header.confirmation {
  background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
}

.wizard-card-header-icon {
  width: 80px;
  height: 80px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}

.wizard-card-header-icon i {
  font-size: 2.5rem;
}

.wizard-card-header h2 {
  margin: 0;
  font-size: 1.75rem;
  font-weight: 700;
}

.wizard-card-header p {
  margin: 8px 0 0;
  opacity: 0.9;
  font-size: 1rem;
}

.wizard-card-body {
  padding: 40px;
}

/* Sección del paso */
.wizard-section {
  margin-bottom: 32px;
}

.wizard-section:last-child {
  margin-bottom: 0;
}

.wizard-section-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--wizard-dark);
  margin: 0 0 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--wizard-border);
  display: flex;
  align-items: center;
  gap: 10px;
}

.wizard-section-title i {
  color: var(--wizard-primary);
}

/* Form Elements */
.form-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-bottom: 20px;
}

.form-row.three-cols {
  grid-template-columns: repeat(3, 1fr);
}

.form-row.single {
  grid-template-columns: 1fr;
}

.form-group {
  margin-bottom: 0;
}

.form-group.full-width {
  grid-column: 1 / -1;
}

.form-label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--wizard-dark);
  margin-bottom: 8px;
}

.form-label .required {
  color: var(--wizard-danger);
  margin-left: 2px;
}

.form-label .optional {
  color: var(--wizard-muted);
  font-weight: 400;
  font-size: 0.85rem;
}

.form-control {
  width: 100%;
  padding: 14px 16px;
  font-size: 1rem;
  font-family: inherit;
  border: 2px solid var(--wizard-border);
  border-radius: var(--wizard-radius);
  background: var(--wizard-white);
  color: var(--wizard-dark);
  transition: all 0.2s ease;
}

.form-control:focus {
  outline: none;
  border-color: var(--wizard-primary);
  box-shadow: 0 0 0 4px var(--wizard-primary-bg);
}

.form-control::placeholder {
  color: #9ca3af;
}

.form-control.is-invalid {
  border-color: var(--wizard-danger);
}

.form-control.is-valid {
  border-color: var(--wizard-success);
}

select.form-control {
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
  background-position: right 14px center;
  background-repeat: no-repeat;
  background-size: 20px;
  padding-right: 48px;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

textarea.form-control {
  min-height: 120px;
  resize: vertical;
}

.form-hint {
  font-size: 0.85rem;
  color: var(--wizard-muted);
  margin-top: 6px;
}

.form-error {
  font-size: 0.85rem;
  color: var(--wizard-danger);
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Photo Upload */
.photo-upload-container {
  display: flex;
  align-items: flex-start;
  gap: 24px;
  padding: 24px;
  background: var(--wizard-light);
  border-radius: var(--wizard-radius);
  border: 2px dashed var(--wizard-border);
}

.photo-preview {
  width: 150px;
  height: 180px;
  background: var(--wizard-white);
  border-radius: var(--wizard-radius);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--wizard-border);
  flex-shrink: 0;
}

.photo-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-preview-placeholder {
  text-align: center;
  color: var(--wizard-muted);
}

.photo-preview-placeholder i {
  font-size: 3rem;
  margin-bottom: 8px;
  display: block;
}

.photo-upload-info {
  flex: 1;
}

.photo-upload-info h4 {
  margin: 0 0 8px;
  font-size: 1rem;
  color: var(--wizard-dark);
}

.photo-upload-info p {
  margin: 0 0 16px;
  font-size: 0.9rem;
  color: var(--wizard-muted);
}

.photo-upload-info ul {
  margin: 0 0 16px;
  padding-left: 20px;
  font-size: 0.85rem;
  color: var(--wizard-muted);
}

.photo-upload-info ul li {
  margin-bottom: 4px;
}

.btn-upload {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: var(--wizard-primary);
  color: var(--wizard-white);
  border: none;
  border-radius: var(--wizard-radius);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-upload:hover {
  background: var(--wizard-primary-light);
  transform: translateY(-2px);
}

input[type="file"] {
  display: none;
}

/* Checkboxes y Radio buttons */
.form-check {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  background: var(--wizard-light);
  border-radius: var(--wizard-radius);
  cursor: pointer;
  transition: all 0.2s ease;
  border: 2px solid transparent;
}

.form-check:hover {
  background: var(--wizard-primary-bg);
}

.form-check.selected {
  background: var(--wizard-primary-bg);
  border-color: var(--wizard-primary);
}

.form-check input[type="checkbox"],
.form-check input[type="radio"] {
  width: 22px;
  height: 22px;
  margin: 0;
  cursor: pointer;
  accent-color: var(--wizard-primary);
  flex-shrink: 0;
}

.form-check-content {
  flex: 1;
}

.form-check-label {
  font-weight: 600;
  color: var(--wizard-dark);
  display: block;
  margin-bottom: 4px;
  cursor: pointer;
}

.form-check-description {
  font-size: 0.85rem;
  color: var(--wizard-muted);
  margin: 0;
}

/* Grade Selection */
.grade-options {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}

.grade-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: var(--wizard-light);
  border-radius: var(--wizard-radius);
  cursor: pointer;
  transition: all 0.2s ease;
  border: 2px solid transparent;
}

.grade-option:hover {
  border-color: var(--wizard-primary-light);
  background: var(--wizard-primary-bg);
}

.grade-option.selected {
  border-color: var(--wizard-primary);
  background: var(--wizard-primary-bg);
}

.grade-option input {
  width: 20px;
  height: 20px;
  accent-color: var(--wizard-primary);
}

.grade-option span {
  font-weight: 500;
  color: var(--wizard-dark);
}

/* Privacy Policy Box */
.privacy-policy-box {
  background: var(--wizard-light);
  border-radius: var(--wizard-radius);
  padding: 24px;
  max-height: 400px;
  overflow-y: auto;
  margin-bottom: 24px;
  border: 1px solid var(--wizard-border);
}

.privacy-policy-box h3 {
  margin: 0 0 16px;
  font-size: 1.1rem;
  color: var(--wizard-dark);
}

.privacy-policy-box p,
.privacy-policy-box ul {
  margin-bottom: 16px;
  font-size: 0.95rem;
  color: var(--wizard-text);
}

.privacy-policy-box ul {
  padding-left: 24px;
}

.privacy-policy-box li {
  margin-bottom: 8px;
}

.privacy-accept-box {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  border-radius: var(--wizard-radius);
  padding: 20px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  border: 2px solid #f59e0b;
}

.privacy-accept-box i {
  font-size: 1.5rem;
  color: #d97706;
  flex-shrink: 0;
}

.privacy-accept-box .form-check {
  background: transparent;
  padding: 0;
  flex: 1;
}

.privacy-accept-box .form-check:hover {
  background: transparent;
}

/* Buttons */
.wizard-buttons {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 32px;
  border-top: 2px solid var(--wizard-border);
  margin-top: 32px;
  gap: 16px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 32px;
  font-size: 1rem;
  font-weight: 600;
  font-family: inherit;
  border: none;
  border-radius: var(--wizard-radius);
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.btn-primary {
  background: var(--wizard-primary);
  color: var(--wizard-white);
}

.btn-primary:hover:not(:disabled) {
  background: var(--wizard-primary-light);
  box-shadow: 0 4px 12px rgba(30, 64, 175, 0.4);
}

.btn-success {
  background: var(--wizard-success);
  color: var(--wizard-white);
}

.btn-success:hover:not(:disabled) {
  background: var(--wizard-success-light);
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.4);
}

.btn-outline {
  background: transparent;
  color: var(--wizard-muted);
  border: 2px solid var(--wizard-border);
}

.btn-outline:hover:not(:disabled) {
  background: var(--wizard-light);
  border-color: var(--wizard-muted);
  color: var(--wizard-dark);
}

.btn-lg {
  padding: 18px 40px;
  font-size: 1.1rem;
}

/* Alerts */
.wizard-alert {
  padding: 16px 20px;
  border-radius: var(--wizard-radius);
  margin-bottom: 24px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.wizard-alert i {
  font-size: 1.25rem;
  flex-shrink: 0;
}

.wizard-alert.info {
  background: var(--wizard-primary-bg);
  color: #1e40af;
  border: 1px solid #93c5fd;
}

.wizard-alert.success {
  background: var(--wizard-success-bg);
  color: #065f46;
  border: 1px solid #6ee7b7;
}

.wizard-alert.warning {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fcd34d;
}

.wizard-alert.danger {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fca5a5;
}

/* Level Cards */
.level-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 32px;
}

.level-card {
  background: var(--wizard-white);
  border: 3px solid var(--wizard-border);
  border-radius: var(--wizard-radius-lg);
  padding: 24px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.level-card:hover {
  border-color: var(--wizard-primary-light);
  transform: translateY(-4px);
  box-shadow: var(--wizard-shadow-lg);
}

.level-card.selected {
  border-color: var(--wizard-primary);
  background: var(--wizard-primary-bg);
}

.level-card-icon {
  width: 70px;
  height: 70px;
  margin: 0 auto 16px;
  background: linear-gradient(135deg, var(--wizard-primary) 0%, var(--wizard-primary-light) 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.level-card-icon i {
  font-size: 2rem;
  color: var(--wizard-white);
}

.level-card-icon img {
  width: 40px;
  height: 40px;
}

.level-card h3 {
  margin: 0 0 8px;
  font-size: 1.1rem;
  color: var(--wizard-dark);
}

.level-card p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--wizard-muted);
}

.level-card input[type="radio"] {
  display: none;
}

/* Confirmation Summary */
.confirmation-summary {
  background: var(--wizard-light);
  border-radius: var(--wizard-radius);
  overflow: hidden;
}

.summary-section {
  padding: 24px;
  border-bottom: 1px solid var(--wizard-border);
}

.summary-section:last-child {
  border-bottom: none;
}

.summary-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.summary-section-header h4 {
  margin: 0;
  font-size: 1rem;
  color: var(--wizard-dark);
  display: flex;
  align-items: center;
  gap: 10px;
}

.summary-section-header h4 i {
  color: var(--wizard-primary);
}

.summary-section-header a {
  font-size: 0.85rem;
  color: var(--wizard-primary);
  text-decoration: none;
}

.summary-section-header a:hover {
  text-decoration: underline;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.summary-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.summary-item.full-width {
  grid-column: 1 / -1;
}

.summary-item label {
  font-size: 0.8rem;
  color: var(--wizard-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.summary-item span {
  font-weight: 500;
  color: var(--wizard-dark);
}

/* Success Page */
.success-container {
  text-align: center;
  padding: 60px 40px;
}

.success-icon {
  width: 120px;
  height: 120px;
  background: linear-gradient(135deg, var(--wizard-success) 0%, var(--wizard-success-light) 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 32px;
  animation: success-bounce 0.6s ease;
}

@keyframes success-bounce {
  0% { transform: scale(0); }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

.success-icon i {
  font-size: 4rem;
  color: var(--wizard-white);
}

.success-container h2 {
  margin: 0 0 16px;
  font-size: 2rem;
  color: var(--wizard-dark);
}

.success-container p {
  margin: 0 0 32px;
  font-size: 1.1rem;
  color: var(--wizard-muted);
}

.tracking-code-box {
  background: var(--wizard-light);
  border: 2px dashed var(--wizard-primary);
  border-radius: var(--wizard-radius);
  padding: 24px;
  margin: 32px 0;
}

.tracking-code-box label {
  display: block;
  font-size: 0.9rem;
  color: var(--wizard-muted);
  margin-bottom: 8px;
}

.tracking-code-box .code {
  font-size: 2rem;
  font-weight: 700;
  color: var(--wizard-primary);
  letter-spacing: 4px;
  font-family: monospace;
}

/* Footer */
.admission-footer {
  background: rgba(0, 0, 0, 0.2);
  padding: 20px;
  text-align: center;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.9rem;
}

.admission-footer a {
  color: var(--wizard-white);
}

/* Responsive */
@media (max-width: 992px) {
  .level-cards {
    grid-template-columns: 1fr;
  }

  .wizard-steps {
    gap: 8px;
  }

  .step-label {
    font-size: 0.7rem;
    max-width: 70px;
  }

  .institution-logo img {
    height: 120px;
  }
}

@media (max-width: 768px) {
  .admission-header-content {
    flex-direction: column;
    text-align: center;
  }

  .institution-logo {
    flex-direction: column;
  }

  .institution-logo img {
    height: 100px;
  }

  .institution-info {
    text-align: center;
  }

  .header-contact {
    text-align: center;
  }

  .header-contact p {
    justify-content: center;
  }

  .admission-container {
    padding: 20px 12px;
  }

  .wizard-progress {
    padding: 16px;
  }

  .wizard-steps::before {
    display: none;
  }

  .step-indicator {
    width: 36px;
    height: 36px;
    font-size: 0.9rem;
  }

  .step-label {
    display: none;
  }

  .wizard-card-body {
    padding: 24px;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .form-row.three-cols {
    grid-template-columns: 1fr;
  }

  .photo-upload-container {
    flex-direction: column;
    align-items: center;
  }

  .wizard-buttons {
    flex-direction: column;
  }

  .wizard-buttons .btn {
    width: 100%;
  }

  .summary-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .admission-container {
    padding: 20px 12px;
  }

  .wizard-card-header {
    padding: 24px 16px;
  }

  .wizard-card-header h2 {
    font-size: 1.4rem;
  }

  .wizard-card-body {
    padding: 20px 16px;
  }
}

/* Animations */
.fade-in {
  animation: fadeIn 0.4s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.slide-in-left {
  animation: slideInLeft 0.4s ease-out;
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Print styles */
@media print {
  .admission-header,
  .wizard-progress,
  .wizard-buttons,
  .admission-footer {
    display: none;
  }

  .admission-wrapper {
    background: white;
  }

  .wizard-card {
    box-shadow: none;
  }
}
