/* ── Reset ─────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --lime: #93d51a;
  --teal: #21CCCB;
  --white: #ffffff;
  --olive: #688b17;
  --gris:  #333333;
}

body {
  background: var(--gris) url('Media/form.jpg') center / cover no-repeat fixed;
  color: var(--white);
  font-family: 'Inter', sans-serif;
  min-height: 100vh;
  position: relative;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.15;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.72' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 180px 180px;
}

/* ── Header ────────────────────────────────────────── */
.q-header {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px 5.5vw;
}

.q-logo img { display: block; height: 40px; width: auto; }

.q-exit {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  font-weight: 400;
  font-size: 0.6vw;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  transition: color 0.2s;
}
.q-exit:hover { color: var(--lime); }

@media screen {
  .q-exit {
    font-size: 10px;
    font-weight: 400;
  }
  
}

/* ── Layout general ───────────────────────────────── */
.q-main {
  position: relative;
  z-index: 1;
  max-width: 900px;
  margin: 0 auto;
  padding: 40px 20px 100px;
}

.q-intro {
  text-align: center;
  margin-bottom: 56px;
}

.q-intro-text {
  font-size: clamp(11px, 1vw, 15px);
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.92);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.q-intro-text em { color: var(--teal); font-style: normal; }

/* ── Stepper (línea de tiempo horizontal) ────────────── */
.q-stepper {
  position: relative;
  width: 100%;
  margin: 0 auto 16px;
  padding: 0px 0;
}

.q-stepper-track {
  position: relative;
  display: flex;
  justify-content: space-between;
}

.q-track,
.q-fill {
  position: absolute;
  top: 28px;
  left: 8px;
  height: 2px;
}
.q-track { right: 8px; background: rgba(255, 255, 255, 0.25); }
.q-fill {
  width: 0%;
  background: linear-gradient(90deg, var(--teal), var(--lime));
  transition: width 0.5s ease;
}

.q-node {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  opacity: 1;
  transform: scale(1);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.q-node.upcoming {
  opacity: 0;
  transform: scale(0.8);
  pointer-events: none;
}

.q-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.18);
  transition: background 0.4s ease, box-shadow 0.4s ease, transform 0.4s ease;
  flex-shrink: 0;
}
.q-icon svg {
  width: 22px;
  height: 22px;
  stroke: rgba(255, 255, 255, 0.55);
  transition: stroke 0.4s ease;
}

.q-node.done .q-icon,
.q-node.active .q-icon {
  background: linear-gradient(135deg, var(--teal), var(--lime));
  box-shadow: 0 0 18px rgba(33, 204, 203, 0.4);
  transform: scale(1.05);
}
.q-node.done .q-icon svg,
.q-node.active .q-icon svg { stroke: #060e0b; }

.q-node-label {
  font-size: 12.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgba(255, 255, 255, 0.5);
  text-align: center;
  transition: color 0.4s ease;
  white-space: nowrap;
}
.q-node.active .q-node-label { color: var(--lime); }
.q-node.done .q-node-label { color: rgba(255, 255, 255, 0.9); }

/* ── Formulario ───────────────────────────────────────── */
.q-form {
  padding-top: 44px;
}

.q-step { display: none; animation: qFadeIn 0.4s ease; }
.q-step.active { display: block; }

@keyframes qFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.q-step-title {
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  margin-bottom: 36px;
}

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

.q-field {
  margin-bottom: 36px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.q-field label {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.95);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.q-req { color: var(--teal); }

.q-tag {
  display: inline-block;
  background: rgba(33, 204, 203, 0.18);
  color: var(--teal);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 3px 9px;
  border-radius: 100px;
}

.q-field input,
.q-field select,
.q-field textarea {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1.5px solid rgba(255, 255, 255, 0.4);
  border-radius: 0;
  padding: 6px 2px 10px;
  color: var(--white);
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  transition: border-color 0.2s;
}

.q-field select {
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239ACA41' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 2px center;
  background-size: 16px;
  padding-right: 24px;
}
.q-field select option { background: var(--olive); color: var(--white); }

/* ── Dropdown personalizado (reemplaza el <select> nativo) ─── */
.q-select { position: relative; }

.q-select select.q-native-hidden {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  pointer-events: none;
  background: none;
  border: none;
}

.q-select-display {
  position: relative;
  display: block;
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1.5px solid rgba(255, 255, 255, 0.4);
  border-radius: 0;
  padding: 6px 24px 10px 2px;
  color: var(--white);
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 14px;
  text-align: left;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: border-color 0.2s;
}
.q-select-display.q-placeholder { color: rgba(154, 202, 65, 0.55); }

.q-select-display::after {
  content: '';
  position: absolute;
  right: 2px;
  top: 46%;
  width: 14px;
  height: 14px;
  transform: translateY(-50%);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239ACA41' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: contain;
  transition: transform 0.25s ease;
}
.q-select.open .q-select-display::after { transform: translateY(-50%) rotate(180deg); }
.q-select-display:focus { outline: none; border-color: var(--teal); }
.q-field.invalid .q-select-display { border-color: #e0574c; }

.q-select-list {
  position: absolute;
  z-index: 30;
  left: 0;
  right: 0;
  top: calc(100% + 10px);
  background: #2e3815;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  padding: 6px;
  max-height: 260px;
  overflow-y: auto;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.4);
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.q-select.open .q-select-list {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.q-select-option {
  padding: 11px 14px;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.8);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.q-select-option:hover { background: rgba(255, 255, 255, 0.1); color: var(--white); }
.q-select-option.selected {
  background: linear-gradient(90deg, var(--teal), var(--lime));
  color: #0c1a08;
}

.q-field textarea {
  resize: vertical;
  min-height: 90px;
  border: 1.5px solid rgba(255, 255, 255, 0.4);
  border-radius: 10px;
  padding: 12px 14px;
  text-transform: none;
}

.q-field input::placeholder,
.q-field textarea::placeholder { color: rgba(154, 202, 65, 0.55); }

.q-field input:focus,
.q-field select:focus,
.q-field textarea:focus {
  outline: none;
  border-color: var(--teal);
}

.q-field input:-webkit-autofill,
.q-field input:-webkit-autofill:hover,
.q-field input:-webkit-autofill:focus,
.q-field input:-webkit-autofill:active {
  -webkit-text-fill-color: var(--white);
  -webkit-box-shadow: 0 0 0px 1000px var(--olive) inset;
  box-shadow: 0 0 0px 1000px var(--olive) inset;
  transition: background-color 9999s ease-in-out 0s;
  caret-color: var(--white);
}

.q-field.invalid input,
.q-field.invalid select,
.q-field.invalid textarea {
  border-color: #e0574c;
}

.q-error {
  display: none;
  font-size: 12px;
  text-transform: none;
  color: #f0a099;
}
.q-field.invalid .q-error { display: block; }

/* ── Navegación ───────────────────────────────────────── */
.q-nav {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 1px;
  margin-top: 12px;
}

.q-progress-text {
  margin-right: auto;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.7);
}

.q-progress-mobile { display: none; }

.q-btn {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  display: inline-block;
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  text-decoration: none;
  border: none;
  border-radius: 10px;
  padding: 15px 30px;
  cursor: pointer;
  white-space: nowrap;
  transition: opacity 0.2s;
}
.q-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--teal);
  opacity: 0;
  transition: opacity 0.35s ease;
  z-index: -1;
}
.q-btn:hover::before { opacity: 1; }

.q-btn-back {
  background: transparent;
  border: 1.5px solid rgba(255, 255, 255, 0.35);
  color: rgba(255, 255, 255, 0.85);
}
.q-btn-back::before { background: rgba(255, 255, 255, 0.12); }

.q-btn-next,
.q-btn-submit {
  background: var(--lime);
  color: #0c1a08;
}

.q-btn-submit { display: none; }
.q-btn:disabled { opacity: 0.6; cursor: default; }

.q-step[data-step="0"].active ~ .q-nav .q-btn-back { visibility: hidden; }

/* ── Estado de éxito ──────────────────────────────────── */
.q-success {
  display: none;
  text-align: center;
  padding: clamp(40px, 6vw, 72px) 0;
}
.q-success.active { display: block; }

.q-success-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  margin: 0 auto 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--teal), var(--lime));
  box-shadow: 0 0 30px rgba(33, 204, 203, 0.4);
}
.q-success-icon svg { width: 32px; height: 32px; stroke: #060e0b; }

.q-success h2 {
  font-size: clamp(22px, 2.6vw, 30px);
  text-transform: uppercase;
  margin-bottom: 14px;
}
.q-success p {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.75);
  max-width: 440px;
  margin: 0 auto 32px;
  line-height: 1.6;
}

/* ── Responsive ───────────────────────────────────────── */
@media (max-width: 700px) {
  .q-row { grid-template-columns: 1fr; gap: 0; }
  .q-node-label { font-size: 10px; }

  /* Stepper mobile: un solo círculo visible, deslizando al centro,
     pero conservando la línea de tiempo (track + fill) de fondo */
  .q-stepper { overflow: hidden; }
  .q-stepper-track {
    justify-content: flex-start;
    transition: transform 0.4s ease;
  }
  .q-node {
    flex: 0 0 100%;
    width: 100%;
  }
  .q-node.upcoming {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
  }

  .q-progress-mobile {
    display: block;
    text-align: left;
    margin: 0 0 20px;
  }
  .q-nav .q-progress-text { display: none; }
}

@media (max-width: 480px) {
  .q-header { padding: 20px 5vw; }
  .q-icon { width: 42px; height: 42px; }
  .q-icon svg { width: 18px; height: 18px; }
  .q-track, .q-fill { top: 21px; }
  .q-nav { flex-wrap: wrap; }
  .q-btn-back { order: 2; }
  .q-btn-next, .q-btn-submit { width: 100%; text-align: center; order: 3; }
  .q-btn-back { width: 100%; text-align: center; }
}
