/* ── Wizard container ──────────────────────────────────────────── */
.seccion-empleo {
  background-image: url("../img/formulario-fondo.png");
  background-size: cover;
  background-position: center;
  padding: 6rem 0 4rem;
}

.wizard-titulo {
  font-family: "Coolvetica-hv";
  color: white;
  font-size: 2.2rem;
  text-align: center;
}

.wizard-card {
  background-color: #ededed;
  border-radius: 1rem;
  box-shadow: 0px 0px 20px rgba(0, 0, 0, 0.35);
  display: flex;
  overflow: hidden;
  min-height: 480px;
}

/* ── Sidebar ────────────────────────────────────────────────────── */
.wizard-sidebar {
  background-color: #ffffff;
  width: 220px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  padding: 2.5rem 0;
  border-right: 1px solid #ddd;
  position: relative;
}

.wizard-steps-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
}

/* Vertical connecting line */
.wizard-steps-list::before {
  content: "";
  position: absolute;
  left: 2.15rem;
  top: 2.2rem;
  bottom: 2.2rem;
  width: 2px;
  background-color: #d0d0d0;
  z-index: 0;
}

.wizard-step-item {
  display: flex;
  align-items: flex-start;
  padding: 0.9rem 1.2rem;
  cursor: pointer;
  position: relative;
  z-index: 1;
  transition: background-color 0.2s ease;
  border-radius: 0;
}

.wizard-step-item:hover:not(.active) {
  background-color: #f0f0f0;
}

.wizard-step-number {
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 50%;
  background-color: #d0d0d0;
  color: #555;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Coolvetica-hv";
  font-size: 0.95rem;
  flex-shrink: 0;
  transition: all 0.25s ease;
  position: relative;
  z-index: 2;
}

.wizard-step-label {
  font-family: "Coolvetica-bk";
  font-size: 0.85rem;
  color: #555;
  margin-left: 0.7rem;
  margin-top: 0.3rem;
  line-height: 1.2;
  transition: color 0.2s ease;
}

/* Active step */
.wizard-step-item.active .wizard-step-number {
  background-color: #132263;
  color: white;
  box-shadow: 0 3px 10px rgba(19, 34, 99, 0.4);
}

.wizard-step-item.active .wizard-step-label {
  color: #132263;
  font-family: "Coolvetica-hv";
}

/* Completed step */
.wizard-step-item.completed .wizard-step-number {
  background-color: #1f8c4e;
  color: white;
}

.wizard-step-item.completed .wizard-step-number::after {
  content: "✓";
  font-size: 0.95rem;
}

.wizard-step-item.completed .wizard-step-number span {
  display: none;
}

.wizard-step-item.completed .wizard-step-label {
  color: #1f8c4e;
}

/* ── Form panels ─────────────────────────────────────────────────── */
.wizard-content {
  flex: 1;
  padding: 2.5rem 2.2rem 1.8rem;
  display: flex;
  flex-direction: column;
}

.wizard-panel {
  display: none;
  flex-direction: column;
  flex: 1;
  animation: fadeSlideIn 0.28s ease;
}

.wizard-panel.active {
  display: flex;
}

@keyframes fadeSlideIn {
  from {
    opacity: 0;
    transform: translateX(12px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.panel-titulo {
  font-family: "Coolvetica-hv";
  color: #132263;
  font-size: 1.5rem;
  margin-bottom: 1.4rem;
  border-bottom: 2px solid #132263;
  padding-bottom: 0.4rem;
}

.wizard-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.4rem 1.4rem;
  flex: 1;
}

.wizard-fields.single-col {
  grid-template-columns: 1fr;
}

.campo-grupo {
  display: flex;
  flex-direction: column;
}

.campo-grupo.full-width {
  grid-column: 1 / -1;
}

.campo-grupo label {
  font-family: "Coolvetica-hv";
  font-size: 0.85rem;
  color: #333;
  margin-bottom: 0.2rem;
}

.campo-grupo input,
.campo-grupo select,
.campo-grupo textarea {
  padding: 0.5rem 0.9rem;
  border-radius: 50px;
  background-color: #bebebe;
  border: 2px solid transparent;
  outline: none;
  font-family: "Georema-rg";
  font-size: 0.9rem;
  color: #222;
  transition:
    border-color 0.2s ease,
    background-color 0.2s ease;
}

.campo-grupo textarea {
  border-radius: 0.8rem;
  resize: vertical;
  min-height: 80px;
}

.campo-grupo select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23555' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 10px;
  cursor: pointer;
}

.campo-grupo input:focus,
.campo-grupo select:focus,
.campo-grupo textarea:focus {
  border-color: #132263;
  background-color: #d0d6eb;
}

.campo-grupo input.campo-error,
.campo-grupo select.campo-error,
.campo-grupo textarea.campo-error {
  border-color: #be2124;
  background-color: #f5d0d1;
}

.campo-error-msg {
  font-family: "Georema-rg";
  font-size: 0.75rem;
  color: #be2124;
  margin-top: 0.15rem;
  margin-left: 0.5rem;
  display: none;
}

.campo-error-msg.visible {
  display: block;
}

/* ── File upload area ────────────────────────────────────────────── */
.upload-area {
  border: 2px dashed #bebebe;
  border-radius: 0.8rem;
  padding: 2.5rem 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.25s ease;
  background-color: #f7f7f7;
  grid-column: 1 / -1;
}

.upload-area:hover,
.upload-area.dragover {
  border-color: #132263;
  background-color: #d0d6eb;
}

.upload-area.has-file {
  border-color: #1f8c4e;
  background-color: #d8f0e3;
}

.upload-icon {
  font-size: 2.5rem;
  color: #888;
  margin-bottom: 0.6rem;
  display: block;
}

.upload-area.has-file .upload-icon {
  color: #1f8c4e;
}

.upload-texto-principal {
  font-family: "Coolvetica-hv";
  color: #132263;
  font-size: 1rem;
  display: block;
}

.upload-texto-sub {
  font-family: "Georema-rg";
  color: #666;
  font-size: 0.8rem;
  display: block;
  margin-top: 0.3rem;
}

.upload-nombre-archivo {
  font-family: "Coolvetica-bk";
  color: #1f8c4e;
  font-size: 0.9rem;
  margin-top: 0.5rem;
  display: none;
}

.upload-nombre-archivo.visible {
  display: block;
}

.upload-error {
  font-family: "Georema-rg";
  font-size: 0.8rem;
  color: #be2124;
  margin-top: 0.4rem;
  display: none;
}

.upload-error.visible {
  display: block;
}

/* ── Navigation buttons ──────────────────────────────────────────── */
.wizard-nav {
  display: flex;
  justify-content: flex-end;
  gap: 0.8rem;
  margin-top: 1.4rem;
  padding-top: 1rem;
  border-top: 1px solid #d0d0d0;
}

.btn-wizard {
  padding: 0.55rem 1.8rem;
  border-radius: 50px;
  font-family: "Coolvetica-hv";
  font-size: 1rem;
  border: none;
  cursor: pointer;
  transition: all 0.25s ease;
}

.btn-anterior {
  background: transparent;
  border: 2px solid #132263;
  color: #132263;
}

.btn-anterior:hover {
  background: #132263;
  color: white;
}

.btn-siguiente {
  background: #132263;
  color: white;
}

.btn-siguiente:hover {
  background: #0f1b50;
}

.btn-enviar {
  background: #be2124;
  color: white;
}

.btn-enviar:hover {
  background: #991a1d;
}

/* Loading spinner inline */
.btn-wizard .spinner-wizard {
  display: inline-block;
  width: 0.9rem;
  height: 0.9rem;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin-left: 0.5rem;
  vertical-align: middle;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ── Success message ────────────────────────────────────────────── */
.wizard-exito {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 3rem 2rem;
  flex: 1;
}

.wizard-exito.visible {
  display: flex;
}

.exito-icono {
  font-size: 4rem;
  color: #1f8c4e;
  margin-bottom: 1rem;
}

.exito-titulo {
  font-family: "Coolvetica-hv";
  color: white;
  font-size: 1.8rem;
  margin-bottom: 0.6rem;
}

.exito-subtitulo {
  font-family: "Georema-rg";
  color: white;
  font-size: 1rem;
}

/* ── Responsive ─────────────────────────────────────────────────── */
@media screen and (max-width: 768px) {
  .wizard-card {
    flex-direction: column;
  }

  .wizard-sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid #ddd;
    padding: 1rem 0.5rem;
    flex-direction: row;
    align-items: center;
    overflow-x: auto;
  }

  /* Hide vertical line on mobile */
  .wizard-steps-list::before {
    display: none;
  }

  .wizard-steps-list {
    flex-direction: row;
    gap: 0;
    width: 100%;
    justify-content: space-around;
  }

  /* Horizontal connecting line on mobile */
  .wizard-steps-list::after {
    content: "";
    position: absolute;
    top: 32%;
    left: 2.2rem;
    right: 2.2rem;
    height: 2px;
    background-color: #d0d0d0;
    z-index: 0;
    transform: translateY(-50%);
  }

  .wizard-step-item {
    flex-direction: column;
    align-items: center;
    padding: 0.5rem 0.6rem;
    flex: 1;
    min-width: 0;
  }

  .wizard-step-label {
    margin-left: 0;
    margin-top: 0.3rem;
    font-size: 0.72rem;
    text-align: center;
  }

  .wizard-fields {
    grid-template-columns: 1fr;
  }

  .wizard-content {
    padding: 1.4rem 1.2rem;
  }
}

@media screen and (max-width: 400px) {
  .wizard-step-label {
    font-size: 0.65rem;
  }

  .wizard-step-number {
    width: 1.7rem;
    height: 1.7rem;
    font-size: 0.8rem;
  }
}
