/* Registro (WP-migrated - simplified) */

body.als-page-registro {
  background: #f8fafc;
  overflow-x: hidden;
  --registro-fab-left: 16px;
  --registro-fab-bottom: 16px;
  --registro-fab-z: 9999;
}

body.als-page-registro .als-main {
  padding: 0;
}

/* `als-fade-up` usa transform en main.css; eso rompe los elementos fixed dentro. */
body.als-page-registro .als-fade-up {
  animation: none !important;
  transform: none !important;
}

.app-container {
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
}

[data-registro-wp] .home-fab {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #000;
  color: #F2C11C;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.26);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

[data-registro-wp] .home-fab-wrap {
  position: fixed !important;
  left: max(var(--registro-fab-left, 16px), env(safe-area-inset-left));
  bottom: max(var(--registro-fab-bottom, 16px), env(safe-area-inset-bottom));
  z-index: var(--registro-fab-z, 9999);
}

[data-registro-wp] .home-fab-icon {
  width: 25px;
  height: 25px;
}

[data-registro-wp] .home-fab:hover {
  transform: translateY(-2px) scale(1.06);
  background: #1c1c1c;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.34);
}

[data-registro-wp] .home-fab:focus-visible {
  outline: 3px solid #F2C11C;
  outline-offset: 3px;
}

.progress-header {
  background: transparent;
  padding: 28px 0 8px;
  text-align: center;
}

.progress-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 20px;
}

.progress-title {
  font-size: 30px;
  font-weight: 900;
  color: #0f172a;
  margin: 0 0 14px;
}

.progress-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 14px 16px;
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.06);
}

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

.progress-step:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 16px;
  left: 60%;
  right: -40%;
  height: 3px;
  background: #e2e8f0;
  border-radius: 2px;
}

.progress-step.active:not(:last-child)::after,
.progress-step.completed:not(:last-child)::after {
  background: linear-gradient(90deg, #F2C11C, #FFD700);
  box-shadow: 0 2px 8px rgba(242, 193, 28, 0.3);
}

.step-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #ffffff;
  color: #94a3b8;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 14px;
  margin-bottom: 8px;
  border: 2px solid #e2e8f0;
  z-index: 2;
}

.progress-step.active .step-circle {
  background: linear-gradient(94deg, #fff6da 0%, #f2c11c 100%);
  color: #854d0e;
  border-color: #f2c11c;
  transform: scale(1.03);
  box-shadow: 0 4px 10px rgba(242, 193, 28, 0.22);
}

.progress-step.completed .step-circle {
  background: #fff9e6;
  color: #a16207;
  border-color: #f2c11c;
}

.step-label {
  font-size: 12px;
  color: #64748b;
  text-align: center;
  font-weight: 700;
}

.progress-step.active .step-label,
.progress-step.completed .step-label {
  color: #1f2937;
}

.steps-container {
  position: relative;
  min-height: 640px;
}

.step {
  display: none;
  width: 100%;
  opacity: 0;
  transform: translateX(50px);
  transition: opacity 0.35s ease, transform 0.35s ease;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
}

.step.active {
  display: block;
  opacity: 1;
  transform: translateX(0);
  position: relative;
}

.step-content {
  background: transparent;
  padding: 38px 0 56px;
}

.form-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 20px;
}

.form-header {
  text-align: left;
  margin-bottom: 34px;
}

.form-header h1 {
  font-size: 32px;
  font-weight: 900;
  color: #1e293b;
  margin: 0 0 12px;
}

.form-header p {
  font-size: 16px;
  color: #64748b;
  line-height: 1.6;
  margin: 0;
}

.form-card {
  background: #ffffff;
  border-radius: 20px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 14px 38px rgba(15, 23, 42, 0.06);
  padding: 34px;
}

.form-section-title {
  font-size: 18px;
  font-weight: 900;
  color: #1f2937;
  margin: 0 0 18px;
  padding-bottom: 10px;
  border-bottom: 1px solid #e2e8f0;
}

.form-group {
  margin-bottom: 22px;
}

.form-label {
  font-size: 14px;
  font-weight: 800;
  color: #334155;
  margin-bottom: 8px;
  display: block;
}

.form-field {
  width: 100%;
  padding: 15px 18px;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  font-size: 16px;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
  background: #ffffff;
  font-family: inherit;
}

.form-field.is-invalid,
.form-select.is-invalid,
input[type="file"].is-invalid {
  border-color: #dc2626;
  background: #fff5f5;
}

.form-field.is-valid,
.form-select.is-valid,
input[type="file"].is-valid {
  border-color: #16a34a;
  background: #f0fdf4;
}

.field-error {
  margin-top: 7px;
  font-size: 12px;
  font-weight: 700;
  color: #b91c1c;
  line-height: 1.35;
  min-height: 16px;
}

.form-notice {
  font-size: 14px;
  margin: 0 0 18px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 8px;
}

.form-notice.valid { color: #14532d; background: #dcfce7; border: 1px solid #86efac; }
.form-notice.invalid { color: #7f1d1d; background: #fee2e2; border: 1px solid #fca5a5; }
.form-notice.validating { color: #854d0e; background: #fef3c7; border: 1px solid #fcd34d; }

.form-field:focus,
.form-select:focus,
.btn-next:focus,
.btn-back:focus {
  outline: 3px solid #F2C11C;
  outline-offset: 2px;
}

.form-field:focus:not(:focus-visible),
.form-select:focus:not(:focus-visible),
.btn-next:focus:not(:focus-visible),
.btn-back:focus:not(:focus-visible) {
  outline: none;
}

.form-select {
  width: 100%;
  padding: 15px 18px;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  font-size: 16px;
  background: #ffffff;
  cursor: pointer;
  font-family: inherit;
}

textarea.form-field {
  resize: vertical;
}

.birth-date-selects {
  display: grid;
  grid-template-columns: 1fr 2fr 1.4fr;
  gap: 8px;
}

.birth-select {
  width: 100%;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.form-buttons {
  display: flex;
  justify-content: space-between;
  margin-top: 32px;
  gap: 16px;
}

.btn-back {
  background: #ffffff;
  color: #475569;
  border: 1px solid #cbd5e1;
  padding: 15px 22px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
}

.btn-back:hover {
  background: #f8fafc;
  border-color: #94a3b8;
  transform: translateY(-1px);
}

.btn-next {
  background: linear-gradient(94deg, #fff6da 0%, #f2c11c 100%);
  color: #78350f;
  border: none;
  padding: 15px 22px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 900;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
  box-shadow: 0 10px 22px rgba(242, 193, 28, 0.35);
}

.btn-next:hover {
  opacity: 0.92;
  transform: translateY(-2px);
}

.btn-next:disabled {
  background: #cccccc;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.terms-group {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 12px;
}

.terms-group input {
  transform: scale(1.2);
  margin-top: 2px;
}

.terms-group label {
  font-size: 14px;
  color: #666;
  line-height: 1.4;
}

.hint-box {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 10px;
  padding: 18px;
  margin-bottom: 22px;
}

.hint-box h3 {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 900;
}

.hint-box p {
  margin: 0;
  color: #64748b;
  line-height: 1.5;
  font-size: 14px;
}

.hint-ok {
  margin-top: 10px;
  color: #28a745;
  font-weight: 900;
}

.cv-title {
  font-size: 20px;
  font-weight: 900;
  text-align: center;
  margin: 28px 0 14px;
  background: linear-gradient(120deg, #80570b, #be8e07, #cc952f);
  background-size: 300%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: metallic 7s ease-in-out infinite;
}

@keyframes metallic {
  0% { background-position: 0%; }
  50% { background-position: 100%; }
  100% { background-position: 0%; }
}

.upload-area {
  border: 2px dashed #cbd5e1;
  border-radius: 14px;
  padding: 40px 20px;
  text-align: center;
  background: #f8fafc;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.upload-emoji {
  font-size: 48px;
  color: #666;
  margin-bottom: 12px;
}

.upload-title {
  font-size: 16px;
  color: #334155;
  margin-bottom: 10px;
  font-weight: 800;
}

.upload-sub {
  font-size: 14px;
  color: #94a3b8;
}

.uploaded {
  margin-top: 12px;
}

.field-help {
  font-size: 12px;
  color: #666;
  margin-top: 6px;
}

.validation-message {
  font-size: 13px;
  margin-top: 8px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 6px;
}

.validation-message.valid { color: #155724; background: #d4edda; border: 1px solid #c3e6cb; }
.validation-message.invalid { color: #721c24; background: #f8d7da; border: 1px solid #f5c6cb; }
.validation-message.validating { color: #856404; background: #fff3cd; border: 1px solid #ffeaa7; }

.upload-feedback {
  margin-top: 10px;
}

.summary-card {
  background: #fff6da;
  border: 1px solid #F2C11C;
  border-radius: 14px;
  padding: 22px;
}

.summary-title {
  margin: 0 0 14px;
  font-size: 22px;
  font-weight: 900;
  color: #111;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 16px;
  color: #1f2937;
  font-weight: 700;
  line-height: 1.45;
}

.summary-actions {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.summary-edit-btn {
  border: 1px solid #111;
  background: #fff;
  color: #111;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.summary-edit-btn:hover {
  background: #f3f4f6;
}

.summary-muted {
  color: #92400e;
}

.loading {
  display: none;
  text-align: center;
  padding: 20px;
}

.spinner {
  border: 3px solid #f3f3f3;
  border-top: 3px solid #F2C11C;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  animation: spin 1s linear infinite;
  margin: 0 auto 10px;
}

.reg-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 1000;
  backdrop-filter: blur(5px);
}

.reg-modal[aria-hidden="false"] { display: block; }

.reg-modal__panel {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #ffffff;
  border-radius: 20px;
  padding: 40px;
  max-width: 520px;
  width: 92%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.reg-modal__header {
  text-align: center;
  margin-bottom: 20px;
}

.reg-modal__header h3 {
  margin: 0;
  font-size: 24px;
  font-weight: 900;
}

.reg-modal__icon {
  font-size: 48px;
  text-align: center;
  margin-bottom: 12px;
}

.reg-modal__text {
  text-align: center;
  color: #666;
  line-height: 1.6;
  margin: 0 0 18px;
}

.password-field { position: relative; }
.password-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: none;
  cursor: pointer;
  font-size: 18px;
}

@media (max-width: 768px) {
  body.als-page-registro {
    --registro-fab-left: 12px;
    --registro-fab-bottom: 12px;
  }

  [data-registro-wp] .home-fab {
    width: 53px;
    height: 53px;
  }

  [data-registro-wp] .home-fab-wrap {
    left: max(var(--registro-fab-left, 12px), env(safe-area-inset-left));
    bottom: max(var(--registro-fab-bottom, 12px), env(safe-area-inset-bottom));
  }
  [data-registro-wp] .home-fab-icon {
    width: 21px;
    height: 21px;
  }
  .progress-title { font-size: 24px; }
  .form-header h1 { font-size: 28px; }
  .form-card { padding: 30px 20px; }
  .form-row { grid-template-columns: 1fr; }
  .form-buttons { flex-direction: column; }
  .step-label { font-size: 10px; }
  .summary-grid { grid-template-columns: 1fr; }
}

