@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&display=swap");

body {
  font-family: "Inter", sans-serif;
  background-color: #f4f9fa;
  color: #333;
  margin: 0;
  padding: 0;
}

/* === Contenedor del Formulario === */
.formulario-container {
  max-width: 850px;
  margin: 3rem auto;
  background-color: #fff;
  padding: 2.5rem;
  border-radius: 14px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
}

/* === Título === */
h1 {
  font-size: 2rem;
  color: #003366;
  text-align: center;
  margin-bottom: 2rem;
}

/* === Barra de progreso === */
.progress-steps {
  display: flex;
  justify-content: space-between;
  list-style: none;
  padding: 0;
  margin-bottom: 2.5rem;
  position: relative;
}

.progress-steps li {
  position: relative;
  text-align: center;
  flex: 1;
  font-weight: 500;
  color: #999;
}

.progress-steps li::before {
  content: counter(step);
  counter-increment: step;
  background-color: #ccc;
  color: white;
  width: 32px;
  height: 32px;
  display: inline-block;
  border-radius: 50%;
  line-height: 32px;
  margin-bottom: 0.5rem;
  font-weight: bold;
}

.progress-steps li.active::before {
  background-color: #003366;
}

.progress-steps li.completed::before {
  background-color: #80c542;
}

.progress-steps li::after {
  content: "";
  position: absolute;
  width: 100%;
  height: 3px;
  background-color: #ccc;
  top: 15px;
  left: -50%;
  z-index: -1;
}

.progress-steps li:first-child::after {
  content: none;
}

.progress-steps li.completed::after {
  background-color: #80c542;
}

/* === Secciones del Formulario === */
.step {
  display: none;
}

.step.active {
  display: block;
  animation: fadeIn 0.4s ease-in-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(15px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* === Grupos de Formulario === */
.form-group {
  margin-bottom: 1.6rem;
}

label {
  font-weight: 500;
  display: block;
  margin-bottom: 0.4rem;
}

input,
select,
textarea {
  width: 100%;
  padding: 0.75rem 0.9rem;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 1rem;
  background-color: #fafafa;
  transition: border 0.3s, box-shadow 0.3s;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: #003366;
  box-shadow: 0 0 0 3px rgba(0, 51, 102, 0.1);
}

input[type="file"] {
  background: transparent;
  border: none;
  margin-top: 0.5rem;
}

input[type="url"]::placeholder,
input::placeholder,
textarea::placeholder {
  color: #aaa;
  font-style: italic;
}

.error-message {
  color: #d00;
  font-size: 0.85rem;
  margin-top: 0.25rem;
  display: block;
}

input.error,
textarea.error,
select.error {
  border-color: #d00;
}

/* === Checkbox Group === */
.checkbox-group {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.75rem 1rem;
  margin-top: 0.5rem;
  margin-bottom: 1.5rem;
}

.checkbox-group label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 0.8rem;
  background-color: #f5f5f5;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.checkbox-group input[type="checkbox"] {
  accent-color: #003366;
}

.checkbox-group label:hover {
  background-color: #e6f0ff;
}

/* === Botones === */
.form-navigation {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  margin-top: 2rem;
  gap: 1rem;
}

.btn-next,
.btn-prev,
button[type="submit"] {
  background-color: #003366;
  color: white;
  padding: 0.75rem 2rem;
  border: none;
  border-radius: 8px;
  font-weight: 500;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.btn-next:hover,
.btn-prev:hover {
  background-color: #005b8c;
}

button[type="submit"] {
  background-color: #80c542;
}

button[type="submit"]:hover {
  background-color: #5d9f2e;
}

/* === Responsive === */
@media (max-width: 600px) {
  .form-navigation {
    flex-direction: column;
  }

  .progress-steps {
    flex-direction: column;
    gap: 0.8rem;
  }

  .progress-steps li::after {
    display: none;
  }
}
