/* =============================================
   FUTUROS COLOMBIA – ENCUESTA CSS
   Paleta oficial: #3BC1B9 (verde) · #7E48D9 (morado)
   Fondo: #FDFDFD · Fuente: Quicksand
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=Quicksand:wght@400;500;600;700&display=swap');

:root {
  --fc-verde:      #3BC1B9;
  --fc-morado:     #7E48D9;
  --fc-grad:       linear-gradient(180deg, #3BC1B9 0%, #7E48D9 100%);
  --fc-grad-h:     linear-gradient(90deg,  #3BC1B9 0%, #7E48D9 100%);
  --fc-bg:         #FDFDFD;
  --fc-bg2:        #F4F3FA;
  --fc-border:     #E0DAF5;
  --fc-text:       #1E1A2E;
  --fc-muted:      #7A6F96;
  --fc-opt-bg:     #F8F6FF;
  --fc-opt-hover:  #EDE8FB;
  --fc-opt-active-bg:  #7E48D9;
  --fc-opt-active-txt: #ffffff;
  --fc-radius:     10px;
  --fc-font:       'Quicksand', system-ui, sans-serif;
}

/* ── Contenedor principal ── */
.fc-enc-wrap {
  font-family: var(--fc-font);
  background: var(--fc-bg);
  color: var(--fc-text);
  max-width: 760px;
  margin: 0 auto;
  padding: 0 0 40px;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 32px rgba(126,72,217,.10);
  border: 1px solid var(--fc-border);
}

/* ── Barra de progreso ── */
.fc-enc-progress-bar {
  height: 5px;
  background: var(--fc-border);
  position: relative;
}
.fc-enc-progress-fill {
  height: 100%;
  background: var(--fc-grad-h);
  width: 20%;
  transition: width 0.5s cubic-bezier(.4,0,.2,1);
}
.fc-enc-progress-label {
  text-align: right;
  font-size: 12px;
  font-weight: 600;
  color: var(--fc-muted);
  padding: 8px 28px 0;
  margin: 0;
}

/* ── Secciones ── */
.fc-section {
  display: none;
  padding: 32px 36px 28px;
  animation: fc-fadein .4s ease;
}
.fc-section.active { display: block; }

@keyframes fc-fadein {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Cabecera de sección ── */
.fc-section-header {
  margin-bottom: 28px;
}
.fc-section-icon {
  font-size: 28px;
  display: block;
  margin-bottom: 8px;
}
.fc-section-header h2 {
  font-family: var(--fc-font);
  font-size: clamp(20px, 4vw, 26px);
  font-weight: 700;
  background: var(--fc-grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: 0 0 6px;
  line-height: 1.25;
}
.fc-subtitle {
  color: var(--fc-muted);
  font-size: 14px;
  margin: 4px 0 0;
}

/* ── Campo ── */
.fc-field {
  margin-bottom: 28px;
}
.fc-field > label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--fc-muted);
  margin-bottom: 12px;
  line-height: 1.4;
}
.fc-ronda-label {
  font-size: 11px !important;
  text-transform: uppercase;
  letter-spacing: .08em;
  background: var(--fc-grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 700 !important;
  margin-bottom: 10px !important;
}
.fc-field em { font-style: normal; color: var(--fc-morado); }

/* ── Inputs de texto ── */
.fc-enc-wrap input[type="text"],
.fc-enc-wrap input[type="number"] {
  width: 100%;
  background: var(--fc-bg);
  border: 1.5px solid var(--fc-border);
  border-radius: var(--fc-radius);
  color: var(--fc-text);
  font-family: var(--fc-font);
  font-size: 15px;
  font-weight: 500;
  padding: 12px 16px;
  transition: border-color .2s, box-shadow .2s;
  box-sizing: border-box;
}
.fc-enc-wrap input[type="text"]:focus,
.fc-enc-wrap input[type="number"]:focus {
  outline: none;
  border-color: var(--fc-morado);
  box-shadow: 0 0 0 3px rgba(126,72,217,.12);
}
.fc-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* ── Opciones ── */
.fc-options-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.fc-options-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.fc-wrap { flex-wrap: wrap; }

.fc-opt {
  background: var(--fc-opt-bg);
  border: 1.5px solid var(--fc-border);
  border-radius: var(--fc-radius);
  color: var(--fc-text);
  font-family: var(--fc-font);
  font-size: 14px;
  font-weight: 500;
  padding: 11px 18px;
  cursor: pointer;
  text-align: left;
  transition: background .15s, border-color .15s, box-shadow .15s;
  line-height: 1.4;
}
.fc-opt:hover {
  background: var(--fc-opt-hover);
  border-color: var(--fc-morado);
  box-shadow: 0 0 0 3px rgba(126,72,217,.08);
}
.fc-opt.selected {
  background: var(--fc-grad);
  border-color: transparent;
  color: #fff;
  font-weight: 700;
}
.fc-opt-frase {
  padding: 14px 20px;
  font-size: 15px;
  line-height: 1.5;
}

/* ── Escala de felicidad ── */
.fc-scale-wrap { }
.fc-scale {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.fc-scale-btn {
  width: 44px;
  height: 44px;
  background: var(--fc-opt-bg);
  border: 1.5px solid var(--fc-border);
  border-radius: 8px;
  color: var(--fc-text);
  font-family: var(--fc-font);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s, border-color .15s;
}
.fc-scale-btn:hover { background: var(--fc-opt-hover); border-color: var(--fc-morado); }
.fc-scale-btn.selected { background: var(--fc-grad); border-color: transparent; color: #fff; }
.fc-scale-labels {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 600;
  color: var(--fc-muted);
  margin-top: 6px;
}

/* ── Ranking drag & drop ── */
.fc-ranking {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 6px;
}
.fc-ranking-item {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--fc-opt-bg);
  border: 1.5px solid var(--fc-border);
  border-radius: var(--fc-radius);
  padding: 12px 16px;
  cursor: grab;
  user-select: none;
  transition: background .15s, border-color .15s, box-shadow .15s;
}
.fc-ranking-item:active { cursor: grabbing; }
.fc-ranking-item.drag-over {
  border-color: var(--fc-morado);
  background: var(--fc-opt-hover);
  box-shadow: 0 0 0 3px rgba(126,72,217,.1);
}
.fc-rank-num {
  width: 26px;
  height: 26px;
  background: var(--fc-grad);
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.fc-rank-label { flex: 1; font-size: 14px; font-weight: 500; color: var(--fc-text); }
.fc-rank-handle { color: var(--fc-muted); font-size: 18px; }

/* ── Dato curioso ── */
.fc-dato-curioso {
  background: linear-gradient(135deg, #EDE8FB, #E5F9F8);
  border-left: 3px solid var(--fc-verde);
  border-radius: var(--fc-radius);
  padding: 16px 20px;
  margin-bottom: 16px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.fc-dato-icon { font-size: 22px; flex-shrink: 0; margin-top: 2px; }
.fc-dato-curioso p {
  margin: 0;
  font-size: 13px;
  font-weight: 500;
  color: var(--fc-morado);
  line-height: 1.6;
  font-style: italic;
}

/* ── Navegación ── */
.fc-nav {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--fc-border);
}
.fc-nav-final { justify-content: space-between; }

.fc-btn-next, .fc-btn-enviar {
  background: var(--fc-grad);
  border: none;
  border-radius: var(--fc-radius);
  color: #fff;
  font-family: var(--fc-font);
  font-size: 15px;
  font-weight: 700;
  padding: 13px 28px;
  cursor: pointer;
  transition: opacity .2s, transform .15s, box-shadow .2s;
  box-shadow: 0 4px 14px rgba(126,72,217,.25);
}
.fc-btn-next:hover, .fc-btn-enviar:hover {
  opacity: .92;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(126,72,217,.32);
}
.fc-btn-enviar {
  font-size: 16px;
  padding: 14px 32px;
}

.fc-btn-prev {
  background: transparent;
  border: 1.5px solid var(--fc-border);
  border-radius: var(--fc-radius);
  color: var(--fc-muted);
  font-family: var(--fc-font);
  font-size: 14px;
  font-weight: 600;
  padding: 12px 20px;
  cursor: pointer;
  transition: border-color .2s, color .2s;
}
.fc-btn-prev:hover { border-color: var(--fc-morado); color: var(--fc-morado); }

/* ── Resumen ── */
.fc-resumen {
  background: var(--fc-bg2);
  border: 1px solid var(--fc-border);
  border-radius: var(--fc-radius);
  padding: 20px 24px;
  max-height: 360px;
  overflow-y: auto;
}
.fc-resumen-item {
  display: flex;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--fc-border);
  font-size: 13px;
  line-height: 1.5;
}
.fc-resumen-item:last-child { border-bottom: none; }
.fc-resumen-key { color: var(--fc-muted); font-weight: 600; flex-shrink: 0; width: 180px; }
.fc-resumen-val { color: var(--fc-text); font-weight: 700; }

/* ── Pantalla final ── */
.fc-gracias, .fc-ya-respondio {
  text-align: center;
  padding: 60px 36px;
}
.fc-gracias-icon { font-size: 52px; display: block; margin-bottom: 16px; }
.fc-gracias h2, .fc-ya-respondio h2 {
  font-family: var(--fc-font);
  font-size: 28px;
  font-weight: 700;
  background: var(--fc-grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: 0 0 10px;
}
.fc-gracias p, .fc-ya-respondio p {
  color: var(--fc-muted);
  font-size: 16px;
  font-weight: 500;
  max-width: 440px;
  margin: 0 auto;
  line-height: 1.6;
}

/* ── Responsive ── */

/* Contenedor: sin bordes redondeados en pantallas muy pequeñas */
@media (max-width: 480px) {
  .fc-enc-wrap {
    border-radius: 0;
    border-left: none;
    border-right: none;
    box-shadow: none;
  }
}

@media (max-width: 600px) {
  /* Secciones */
  .fc-section {
    padding: 20px 16px 16px;
  }

  /* Títulos */
  .fc-section-header h2 {
    font-size: 18px;
    line-height: 1.3;
    word-break: break-word;
  }

  /* Labels de campo */
  .fc-field > label {
    font-size: 13px;
    word-break: break-word;
  }

  /* Dos columnas colapsan a una */
  .fc-two-col {
    grid-template-columns: 1fr;
  }

  /* Botones de opciones: ancho completo en móvil */
  .fc-opt {
    width: 100%;
    font-size: 13px;
    padding: 10px 14px;
    word-break: break-word;
    white-space: normal;
    box-sizing: border-box;
  }

  .fc-opt-frase {
    font-size: 13px;
    padding: 12px 14px;
    line-height: 1.5;
  }

  /* Filas de opciones: columna en móvil */
  .fc-options-row {
    flex-direction: column;
  }

  /* Frases largas en columna siempre */
  .fc-options-col {
    flex-direction: column;
  }

  /* Escala de felicidad */
  .fc-scale {
    gap: 4px;
  }
  .fc-scale-btn {
    width: 32px;
    height: 32px;
    font-size: 12px;
    border-radius: 6px;
  }

  /* Ranking */
  .fc-ranking-item {
    padding: 10px 12px;
    gap: 10px;
  }
  .fc-rank-label {
    font-size: 13px;
    word-break: break-word;
  }

  /* Dato curioso */
  .fc-dato-curioso {
    flex-direction: column;
    gap: 8px;
    padding: 14px 14px;
  }
  .fc-dato-curioso p {
    font-size: 12px;
  }

  /* Navegación: botones apilados */
  .fc-nav {
    flex-direction: column-reverse;
    gap: 8px;
    margin-top: 24px;
    padding-top: 20px;
  }
  .fc-nav-final {
    flex-direction: column-reverse;
  }
  .fc-btn-next,
  .fc-btn-enviar,
  .fc-btn-prev {
    width: 100%;
    text-align: center;
    padding: 13px 16px;
    font-size: 14px;
    box-sizing: border-box;
  }

  /* Resumen */
  .fc-resumen {
    padding: 14px 16px;
  }
  .fc-resumen-item {
    flex-direction: column;
    gap: 2px;
  }
  .fc-resumen-key {
    width: auto;
    font-size: 11px;
  }
  .fc-resumen-val {
    font-size: 13px;
  }

  /* Pantalla final */
  .fc-gracias,
  .fc-ya-respondio {
    padding: 40px 20px;
  }
  .fc-gracias h2,
  .fc-ya-respondio h2 {
    font-size: 22px;
  }
  .fc-gracias p,
  .fc-ya-respondio p {
    font-size: 14px;
  }

  /* Progress label */
  .fc-enc-progress-label {
    padding: 6px 16px 0;
    font-size: 11px;
  }
}
