/* ==========================================================================
   CONCURSA - FORMACION GUIADA
   --------------------------------------------------------------------------
   El truco del oscurecido: el foco es un rectangulo transparente con una
   sombra enorme alrededor. Asi el resto de la pantalla queda oscuro y el
   elemento iluminado, sin tener que dibujar cuatro velos.
   ========================================================================== */
.tour {
  position: fixed;
  inset: 0;
  z-index: 9000;
  pointer-events: none;
}

.tour__foco {
  position: fixed;
  border-radius: 10px;
  box-shadow: 0 0 0 9999px rgba(10, 15, 25, .78);
  border: 2px solid rgba(255, 255, 255, .9);
  transition: left .2s ease, top .2s ease, width .2s ease, height .2s ease;
  pointer-events: none;
}

.tour__tarjeta {
  position: fixed;
  z-index: 9001;
  width: 400px;
  /* Columna con el texto desplazable y los botones SIEMPRE visibles: si el
     paso explica mucho, lo que se corta es el texto, nunca el boton de
     Siguiente. */
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 14px;
  padding: 1.4rem 1.5rem 1.1rem;
  box-shadow: 0 26px 60px -18px rgba(0, 0, 0, .55);
  pointer-events: auto;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: #101828;
}

.tour__paso {
  flex-shrink: 0;
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #4f2d7f;
  margin-bottom: .35rem;
}

.tour__titulo {
  flex-shrink: 0;
  font-size: 1.12rem;
  margin: 0 0 .55rem;
  letter-spacing: -.015em;
  line-height: 1.3;
}

.tour__texto {
  font-size: .9rem;
  line-height: 1.6;
  color: #475467;
  overflow-y: auto;
  min-height: 0;
}

.tour__texto p { margin: 0 0 .6rem; }
.tour__texto p:last-child { margin-bottom: 0; }
.tour__texto strong { color: #101828; }

.tour__barra {
  flex-shrink: 0;
  height: 4px;
  border-radius: 99px;
  background: #eef0f4;
  margin: 1rem 0 .9rem;
  overflow: hidden;
}
.tour__barra span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #4f2d7f, #7c4dbe);
  transition: width .25s ease;
}

.tour__acciones {
  display: flex;
  gap: .5rem;
  align-items: center;
  flex-shrink: 0;
  padding-top: .2rem;
}

.tour__acciones button {
  font: inherit;
  font-size: .84rem;
  font-weight: 700;
  padding: .55rem 1rem;
  border-radius: 999px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background .15s, border-color .15s;
}

.tour__siguiente {
  margin-left: auto;
  background: linear-gradient(135deg, #4f2d7f, #7c4dbe);
  color: #fff;
}
.tour__siguiente:hover { filter: brightness(1.1); }

.tour__atras {
  background: #fff;
  border-color: #e4e7ec !important;
  color: #344054;
}
.tour__atras:hover { border-color: #7c4dbe !important; }

.tour__salir {
  background: none;
  color: #667085;
  padding-left: 0 !important;
}
.tour__salir:hover { color: #b91c1c; }

.tour__acciones button:focus-visible {
  outline: 3px solid #7c4dbe;
  outline-offset: 2px;
}

/* Mientras hay recorrido, se bloquea el desplazamiento accidental del fondo */
html.tour-activo { overflow: hidden; }

@media (max-width: 520px) {
  .tour__tarjeta {
    width: calc(100vw - 24px) !important;
    left: 12px !important;
    max-width: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tour__foco, .tour__barra span { transition: none; }
}
