/* ════════════════════════════════════════════════════════════
   SITW — Tour guiado del sitio completo (motor de spotlight).
   Overlay + recorte luminoso + tarjeta narrativa + cortina de
   transición entre páginas + botón flotante para (re)lanzarlo.
   ════════════════════════════════════════════════════════════ */

.sitw-stour[hidden]{display:none !important;}
/* Por encima del asesor (z 100020); .is-top salta por encima del builder (z 2000000) */
.sitw-stour{position:fixed;inset:0;z-index:100030;}
.sitw-stour.is-top{z-index:2000010;}

/* ── Modo página completa (view): sin velo, la página es la protagonista ──
   El usuario puede scrollear e interactuar; la tarjeta acompaña y un marco
   sutil recuerda que el paseo sigue activo. */
.sitw-stour.is-view{pointer-events:none;background:none;}
.sitw-stour.is-view .sitw-stour-card{pointer-events:auto;box-shadow:0 30px 90px rgba(0,0,0,.75),0 0 0 1px rgba(155,48,255,.35);}
.sitw-stour.is-view::before{
  content:"";position:fixed;inset:0;pointer-events:none;border-radius:0;
  box-shadow:inset 0 0 0 2px rgba(155,48,255,.45), inset 0 0 60px rgba(123,47,255,.18);
  animation:sitwStourFrame 3s ease-in-out infinite;
}
@keyframes sitwStourFrame{
  0%,100%{box-shadow:inset 0 0 0 2px rgba(155,48,255,.4), inset 0 0 50px rgba(123,47,255,.14);}
  50%{box-shadow:inset 0 0 0 2px rgba(199,155,255,.65), inset 0 0 80px rgba(123,47,255,.28);}
}

/* Recorte luminoso */
.sitw-stour-hole{
  position:fixed;border-radius:18px;pointer-events:none;
  box-shadow:0 0 0 200vmax rgba(3,1,10,.84);
  border:1.5px solid rgba(199,155,255,.9);
  transition:top .5s cubic-bezier(.22,1,.36,1),left .5s cubic-bezier(.22,1,.36,1),
             width .5s cubic-bezier(.22,1,.36,1),height .5s cubic-bezier(.22,1,.36,1);
}
.sitw-stour-hole:after{
  content:"";position:absolute;inset:-7px;border-radius:inherit;
  border:2px solid rgba(155,48,255,.6);animation:sitwStourPing 1.8s ease-out infinite;
}
@keyframes sitwStourPing{0%{opacity:1;transform:scale(1)}70%,100%{opacity:0;transform:scale(1.05)}}
/* Tarjeta centrada (sin hole): fondo pleno */
/* Velo pleno SOLO para tarjetas centradas (nunca en view ni en lift) */
.sitw-stour:not(.is-view):not(.is-dim) .sitw-stour-hole[style*="display: none"] ~ .sitw-stour-card{box-shadow:0 0 0 200vmax rgba(3,1,10,.84),0 30px 90px rgba(0,0,0,.8);}

/* ── Modo lift: el PNG clonado brilla con su forma real sobre el velo ── */
.sitw-stour.is-dim{background:rgba(3,1,10,.86);}
.sitw-stour.is-dim .sitw-stour-card{box-shadow:0 30px 90px rgba(0,0,0,.8);}
.sitw-stour-lift{
  position:fixed;pointer-events:none;object-fit:contain;
  filter:drop-shadow(0 0 18px rgba(199,155,255,.9)) drop-shadow(0 0 55px rgba(155,48,255,.55));
  animation:sitwStourLiftIn .5s ease, sitwStourGlowPng 2.2s ease-in-out .5s infinite;
}
@keyframes sitwStourLiftIn{from{opacity:0;transform:scale(.985)}to{opacity:1;transform:none}}
@keyframes sitwStourGlowPng{
  0%,100%{filter:drop-shadow(0 0 18px rgba(199,155,255,.9)) drop-shadow(0 0 55px rgba(155,48,255,.55));}
  50%{filter:drop-shadow(0 0 26px rgba(199,155,255,1)) drop-shadow(0 0 90px rgba(155,48,255,.85));}
}

/* Tarjeta narrativa */
.sitw-stour-card{
  position:fixed;width:min(520px,calc(100vw - 32px));
  background:linear-gradient(165deg,#171226,#0b0814);
  border:1px solid rgba(155,48,255,.55);border-radius:20px;
  padding:20px 20px 16px;box-shadow:0 30px 90px rgba(0,0,0,.78);
  transition:top .5s cubic-bezier(.22,1,.36,1),left .5s cubic-bezier(.22,1,.36,1);
  animation:sitwStourIn .4s ease;color:#f8f4ff;
  font-family:Inter,ui-sans-serif,system-ui,-apple-system,"Segoe UI",sans-serif;
}
@keyframes sitwStourIn{from{opacity:0;transform:translateY(10px) scale(.97)}to{opacity:1;transform:none}}

/* ── Guía vivo: misma anatomía del asesor IA dentro del tour ── */
.sitw-stour-guide{
  display:grid;grid-template-columns:126px minmax(0,1fr);gap:18px;align-items:start;
  margin:0 0 14px;padding:12px 14px 14px 12px;border-radius:20px;
  background:linear-gradient(145deg,rgba(155,48,255,.12),rgba(255,255,255,.035));
  border:1px solid rgba(155,48,255,.28);overflow:hidden;
}
.sitw-stour-guide-face.sitw-asesor-face{
  flex:none;width:126px;height:194px;border-radius:18px;border:1px solid rgba(199,155,255,.28);
  border-right:1px solid rgba(199,155,255,.28);background:#0a0714;
  box-shadow:inset 0 0 28px rgba(155,48,255,.13),0 12px 30px rgba(0,0,0,.36);
}
.sitw-stour-guide-face .sitw-asesor-entity{
  position:relative;z-index:1;height:100%;max-width:100%;aspect-ratio:428/661;
  animation:sitw-asesor-breathe 5.6s ease-in-out infinite;will-change:transform,filter;
}
.sitw-stour-guide-face .sitw-asesor-stage{position:absolute;inset:0;z-index:1;background-size:100% 100%;background-position:center;background-repeat:no-repeat;}
.sitw-stour-guide-face .sitw-asesor-eye-glow{
  position:absolute;z-index:2;width:12.5%;aspect-ratio:1;border-radius:50%;pointer-events:none;
  background:radial-gradient(circle, rgba(215,142,255,.78) 0%, rgba(172,72,255,.42) 40%, rgba(155,48,255,.12) 66%, transparent 72%);
  box-shadow:0 0 18px rgba(181,82,255,.82),0 0 34px rgba(155,48,255,.38);
  mix-blend-mode:screen;animation:sitw-asesor-eye-pulse 3.6s ease-in-out infinite;
}
.sitw-stour-guide-face .sitw-asesor-eye-glow-left{left:33.2%;top:39.2%;}
.sitw-stour-guide-face .sitw-asesor-eye-glow-right{left:59.6%;top:39.3%;}
.sitw-stour-guide-face .sitw-asesor-eyelid{
  position:absolute;z-index:4;width:13.4%;height:8.4%;border-radius:48%;pointer-events:none;
  background:linear-gradient(180deg,#05020d 0%,#10051d 56%,#05020d 100%);
  box-shadow:0 0 12px rgba(0,0,0,.9), inset 0 -1px 0 rgba(155,48,255,.18);
  opacity:0;transform:scaleY(.18);transform-origin:center;transition:opacity .04s,transform .08s;
}
.sitw-stour-guide-face .sitw-asesor-eyelid-left{left:32.7%;top:38.9%;}
.sitw-stour-guide-face .sitw-asesor-eyelid-right{left:59.1%;top:39%;}
.sitw-stour-guide-face .sitw-asesor-mouth{
  position:absolute;left:48.2%;top:59.4%;z-index:4;width:7.4%;height:1%;pointer-events:none;
  border-radius:0 0 999px 999px;background:rgba(176,82,255,.9);
  box-shadow:0 0 10px rgba(183,84,255,.9),0 0 22px rgba(155,48,255,.42);
  opacity:0;transform-origin:center;transition:opacity .18s ease;
}
.sitw-stour-guide-face .sitw-asesor-mouth::before,.sitw-stour-guide-face .sitw-asesor-mouth::after{
  content:"";position:absolute;top:-56%;width:22%;height:72%;background:inherit;box-shadow:inherit;
}
.sitw-stour-guide-face .sitw-asesor-mouth::before{left:-16%;}
.sitw-stour-guide-face .sitw-asesor-mouth::after{right:-16%;}
.sitw-stour-guide-face .sitw-asesor-scan{
  position:absolute;inset:0;z-index:5;pointer-events:none;opacity:.65;
  background:repeating-linear-gradient(0deg, rgba(0,0,0,0) 0 3px, rgba(0,0,0,.18) 3px 4px), linear-gradient(180deg, transparent, rgba(155,48,255,.25), transparent);
  mix-blend-mode:screen;
}
.sitw-stour-guide-face .sitw-asesor-vignette{position:absolute;inset:0;z-index:6;pointer-events:none;background:radial-gradient(75% 65% at 50% 42%, transparent 55%, rgba(6,4,12,.55) 100%);}
.sitw-stour.is-speaking .sitw-asesor-entity{animation:sitw-asesor-talk .9s ease-in-out infinite;}
.sitw-stour.is-speaking .sitw-asesor-eye-glow{animation-duration:1.1s;}
.sitw-stour.is-speaking .sitw-asesor-mouth{opacity:.95;animation:sitw-asesor-mouth-talk .38s steps(3,end) infinite;}
.sitw-stour.is-blinking .sitw-asesor-eyelid{opacity:1;transform:scaleY(1);}
.sitw-stour.is-blinking .sitw-asesor-eye-glow{opacity:0;animation:none;}
.sitw-stour.is-blinking .sitw-asesor-entity{animation:none;filter:brightness(.72) saturate(.78);transition:filter .05s;}
.sitw-stour-copy{min-width:0;padding:3px 0 0;}

@keyframes sitw-asesor-breathe{0%,100%{transform:scale(1.02) translateY(0);filter:brightness(1) saturate(1);}50%{transform:scale(1.035) translateY(-0.6%);filter:brightness(1.06) saturate(1.08);}}
@keyframes sitw-asesor-talk{0%,100%{transform:scale(1.03);filter:brightness(1.08) saturate(1.15) contrast(1.04);}25%{transform:scale(1.04) translateX(0.4%);filter:brightness(1.28) saturate(1.35) contrast(1.1) hue-rotate(6deg);}55%{transform:scale(1.035) translateX(-0.3%);filter:brightness(1.12) saturate(1.2);}80%{transform:scale(1.045);filter:brightness(1.32) saturate(1.4);}}
@keyframes sitw-asesor-eye-pulse{0%,100%{opacity:.62;transform:scale(1);}50%{opacity:1;transform:scale(1.18);}}
@keyframes sitw-asesor-mouth-talk{0%{transform:scaleY(.35) scaleX(1);}30%{transform:scaleY(2.8) scaleX(.86);}60%{transform:scaleY(.8) scaleX(1.08);}100%{transform:scaleY(1.85) scaleX(.96);}}
@keyframes sitw-asesor-caret{50%{opacity:0}}
.sitw-stour-head{display:flex;align-items:center;gap:10px;margin-bottom:12px;}
.sitw-stour-badge{
  flex:none;width:30px;height:30px;border-radius:10px;display:grid;place-items:center;
  background:linear-gradient(135deg,#7b2fff,#c04bff);color:#fff;font-weight:900;font-size:13px;
  box-shadow:0 8px 22px rgba(155,48,255,.5);
}
.sitw-stour-ch{font-size:10.5px;font-weight:900;letter-spacing:.18em;text-transform:uppercase;color:rgba(248,244,255,.55);}
.sitw-stour-skip{margin-left:auto;border:0;background:transparent;color:rgba(248,244,255,.55);font-size:12px;font-weight:800;cursor:pointer;font-family:inherit;white-space:nowrap;}
.sitw-stour-skip:hover,.sitw-stour-skip:focus,.sitw-stour-skip:focus-visible,.sitw-stour-skip:active{color:#fff !important;outline:none !important;}
.sitw-stour-card h4{margin:0 0 7px;font-size:19px;font-weight:800;color:#fff;letter-spacing:-.01em;line-height:1.2;}
.sitw-stour-copy>p{margin:0;font-size:13.5px;line-height:1.6;color:rgba(248,244,255,.78);}
.sitw-stour.is-speaking .sitw-stour-copy>p::after{content:"▋";margin-left:2px;color:#c79bff;animation:sitw-asesor-caret 1s steps(2) infinite;}
.sitw-stour-links{display:flex;gap:9px;flex-wrap:wrap;margin:0 0 14px;}
.sitw-stour-links[hidden]{display:none;}
.sitw-stour-links a{
  flex:1;min-width:140px;text-align:center;text-decoration:none;color:#fff;font-weight:900;font-size:13px;
  border:1px solid rgba(155,48,255,.55);background:rgba(155,48,255,.14);border-radius:12px;padding:11px 14px;
  transition:.2s;
}
.sitw-stour-links a:hover{background:linear-gradient(135deg,#7b2fff,#c04bff);border-color:transparent;transform:translateY(-2px);}
.sitw-stour-bar{height:3px;border-radius:99px;background:rgba(255,255,255,.1);margin-bottom:12px;overflow:hidden;}
.sitw-stour-bar i{display:block;height:100%;border-radius:99px;background:linear-gradient(90deg,#7b2fff,#c79bff);transition:width .4s ease;}
.sitw-stour-foot{display:flex;align-items:center;gap:8px;}
.sitw-stour-count{margin-right:auto;font-size:11px;font-weight:800;color:rgba(248,244,255,.45);letter-spacing:.08em;}
.sitw-stour-prev{
  display:inline-flex;align-items:center;justify-content:center;line-height:1;text-align:center;
  border:1px solid rgba(255,255,255,.16);background:rgba(255,255,255,.05);color:#d9c8ff !important;
  border-radius:999px;width:34px;height:34px;font-size:15px;font-weight:900;cursor:pointer;font-family:inherit;
  padding:0;
}
.sitw-stour-prev:hover{color:#fff !important;}
.sitw-stour-prev:focus,.sitw-stour-prev:focus-visible,.sitw-stour-prev:active{outline:none !important;}
.sitw-stour-prev[disabled]{opacity:.3;cursor:default;}
.sitw-stour-next{
  display:inline-flex;align-items:center;justify-content:center;gap:4px;line-height:1;
  border:0;border-radius:999px;padding:10px 18px;font-weight:900;cursor:pointer;color:#fff !important;font-size:12.5px;
  background:linear-gradient(135deg,#7b2fff,#9b30ff 56%,#c79bff);
  box-shadow:0 10px 28px rgba(155,48,255,.45);font-family:inherit;
}
.sitw-stour-next:hover,.sitw-stour-next:focus,.sitw-stour-next:focus-visible,.sitw-stour-next:active{filter:brightness(1.1);color:#fff !important;outline:none !important;}

/* ══ Blindaje anti-turquesa DEFINITIVO ══
   El tema (Astra) pinta el FONDO de todo <button> en :hover/:focus/:active con su
   acento cyan. No alcanza con forzar el color del texto: hay que forzar background,
   borde y sombra de cada control del tour, en todos los estados. */
.sitw-stour button,.sitw-stour a,.sitw-stour-fab,
.sitw-stour button:hover,.sitw-stour button:focus,.sitw-stour button:focus-visible,.sitw-stour button:active,
.sitw-stour a:hover,.sitw-stour a:focus,.sitw-stour a:focus-visible,.sitw-stour a:active,
.sitw-stour-fab:hover,.sitw-stour-fab:focus,.sitw-stour-fab:focus-visible,.sitw-stour-fab:active{
  outline:none !important;-webkit-tap-highlight-color:transparent;
}
/* Saltar tour: siempre transparente */
.sitw-stour-skip,.sitw-stour-skip:hover,.sitw-stour-skip:focus,.sitw-stour-skip:focus-visible,.sitw-stour-skip:active{
  background:transparent !important;border:0 !important;box-shadow:none !important;
}
/* Flecha atrás: fondo translúcido violeta, nunca cyan */
.sitw-stour-prev,.sitw-stour-prev:focus,.sitw-stour-prev:focus-visible,.sitw-stour-prev:active{
  background:rgba(255,255,255,.05) !important;border:1px solid rgba(255,255,255,.16) !important;
  color:#d9c8ff !important;box-shadow:none !important;
}
.sitw-stour-prev:hover{background:rgba(155,48,255,.28) !important;border-color:rgba(155,48,255,.6) !important;color:#fff !important;}
/* Siguiente: gradiente violeta fijo */
.sitw-stour-next,.sitw-stour-next:hover,.sitw-stour-next:focus,.sitw-stour-next:focus-visible,.sitw-stour-next:active{
  background:linear-gradient(135deg,#7b2fff,#9b30ff 56%,#c79bff) !important;
  border:0 !important;color:#fff !important;box-shadow:0 10px 28px rgba(155,48,255,.45) !important;
}
/* Links de salida (última ventana): fondo violeta translúcido */
.sitw-stour-links a,.sitw-stour-links a:focus,.sitw-stour-links a:focus-visible,.sitw-stour-links a:active{
  background:rgba(155,48,255,.14) !important;border:1px solid rgba(155,48,255,.55) !important;color:#fff !important;box-shadow:none !important;
}
.sitw-stour-links a:hover{background:linear-gradient(135deg,#7b2fff,#c04bff) !important;border-color:transparent !important;color:#fff !important;}
/* FAB flotante: fondo oscuro fijo */
.sitw-stour-fab,.sitw-stour-fab:hover,.sitw-stour-fab:focus,.sitw-stour-fab:focus-visible,.sitw-stour-fab:active{
  background:rgba(13,10,22,.92) !important;border:1px solid rgba(155,48,255,.55) !important;
}

/* Última ventana: sólo el botón de salida (volver a la home) */
.sitw-stour.is-bare .sitw-stour-foot,
.sitw-stour.is-bare .sitw-stour-skip,
.sitw-stour.is-bare .sitw-stour-bar{display:none !important;}
.sitw-stour.is-bare .sitw-stour-links{margin-bottom:2px;}

/* ── Destello de "presionado" sobre el ítem del menú al entrar ── */
.sitw-stour-press{
  transform:scale(.96) !important;
  filter:brightness(1.5);
  border-radius:12px;
  box-shadow:0 0 0 3px rgba(199,155,255,.85), 0 0 34px rgba(155,48,255,.9) !important;
  transition:transform .16s ease, filter .16s ease, box-shadow .16s ease !important;
}

/* ── El asesor como guía: su cara en la tarjeta ── */
.sitw-stour-badge.is-face{
  background-size:contain;background-position:center;background-repeat:no-repeat;
  background-color:#1b1330;border-radius:50%;
  box-shadow:0 0 0 2px rgba(199,155,255,.55), 0 8px 22px rgba(155,48,255,.5);
}

/* ── Cortina de transición entre páginas ── */
.sitw-stour-curtain{
  position:fixed;inset:0;z-index:2000020;display:grid;place-items:center;
  background:radial-gradient(900px 600px at 50% 40%,rgba(123,47,255,.35),transparent 65%),linear-gradient(160deg,#070510,#0d0a17);
  opacity:0;pointer-events:none;transition:opacity .4s ease;
}
.sitw-stour-curtain.is-on{opacity:1;pointer-events:auto;}
.sitw-stour-curtain>div{text-align:center;color:#fff;font-family:Inter,ui-sans-serif,system-ui,sans-serif;animation:sitwStourIn .4s ease;}
.sitw-stour-curtain span{
  display:inline-grid;place-items:center;width:54px;height:54px;border-radius:16px;margin-bottom:14px;
  background:linear-gradient(135deg,#7b2fff,#c04bff);font-size:24px;
  box-shadow:0 16px 50px rgba(155,48,255,.6);animation:sitwStourFloat 1.4s ease-in-out infinite;
}
@keyframes sitwStourFloat{0%,100%{transform:translateY(0)}50%{transform:translateY(-6px)}}
.sitw-stour-curtain small{display:block;font-size:10.5px;font-weight:900;letter-spacing:.24em;text-transform:uppercase;color:rgba(248,244,255,.55);margin-bottom:4px;}
.sitw-stour-curtain b{font-size:24px;font-weight:800;letter-spacing:-.01em;}

/* ── Botón flotante (abajo a la izquierda; el asesor vive a la derecha) ── */
.sitw-stour-fab[hidden]{display:none !important;}
.sitw-stour-fab{
  position:fixed;left:18px;bottom:18px;z-index:99990;
  display:inline-flex;align-items:center;gap:0;
  border:1px solid rgba(155,48,255,.55);border-radius:999px;
  background:rgba(13,10,22,.92);backdrop-filter:blur(8px);color:#fff;cursor:pointer;
  padding:0;height:48px;overflow:hidden;
  box-shadow:0 14px 40px rgba(10,4,24,.6);transition:.25s;
  font-family:Inter,ui-sans-serif,system-ui,sans-serif;
}
.sitw-stour-fab span{
  flex:none;width:46px;height:46px;display:grid;place-items:center;font-size:19px;color:#c79bff;
  transition:.25s;
}
.sitw-stour-fab em{
  font-style:normal;font-weight:900;font-size:12.5px;white-space:nowrap;
  max-width:0;opacity:0;padding-right:0;transition:max-width .3s ease,opacity .25s ease,padding .3s ease;
}
.sitw-stour-fab:hover{border-color:#c79bff;box-shadow:0 16px 50px rgba(155,48,255,.5);}
.sitw-stour-fab:hover em{max-width:180px;opacity:1;padding-right:18px;}
.sitw-stour-fab.is-resume{border-color:#c79bff;animation:sitwStourGlow 2s ease-in-out infinite;}
.sitw-stour-fab.is-resume em{max-width:180px;opacity:1;padding-right:18px;}
@keyframes sitwStourGlow{0%,100%{box-shadow:0 14px 40px rgba(155,48,255,.35)}50%{box-shadow:0 14px 56px rgba(155,48,255,.75)}}

@media(max-width:640px){
  .sitw-stour-card{padding:14px 14px 13px;}
  .sitw-stour-guide{grid-template-columns:104px minmax(0,1fr);gap:12px;padding:10px 10px 12px;margin-bottom:12px;}
  .sitw-stour-guide-face.sitw-asesor-face{width:104px;height:160px;border-radius:16px;}
  .sitw-stour-copy{padding-top:2px;}
  .sitw-stour-card h4{font-size:17px;}
  .sitw-stour-copy>p{font-size:12.8px;line-height:1.52;}
  .sitw-stour-head{gap:8px;}
  .sitw-stour-ch{letter-spacing:.13em;}
  .sitw-stour-skip{font-size:11px;}
  .sitw-stour-fab{bottom:14px;left:14px;height:44px;}
  .sitw-stour-fab span{width:42px;height:42px;}
}
@media print{.sitw-stour,.sitw-stour-fab,.sitw-stour-curtain{display:none !important;}}
