/*
 * GVI Carrusel de Recorridos — estilos frontend
 * Diseno aprobado sin cambios. Las adiciones son de aislamiento,
 * accesibilidad y correccion del full-bleed con barra de scroll.
 */

/* --------------------------------------------------------------------- *
 * Contenedor full-bleed
 * --------------------------------------------------------------------- *
 * 100vw incluye el ancho de la barra de scroll, lo que provoca scroll
 * horizontal en la mayoria de themes. --gvi-sbw lo inyecta el PHP/JS con
 * el ancho real de la barra; si no llega, el fallback es 0px y el
 * comportamiento es identico al build anterior.
 */
.gvi-recorrido-aq2 {
  --gvi-aq2-bg: #000;
  --gvi-aq2-progress: 0%;
  --gvi-sbw: 0px;
  position: relative;
  left: 50%;
  width: calc(100vw - var(--gvi-sbw)) !important;
  max-width: none !important;
  height: 100vh;
  height: 100svh;
  margin: 0 0 0 calc((100vw - var(--gvi-sbw)) / -2) !important;
  padding: 0 !important;
  background: var(--gvi-aq2-bg);
  isolation: isolate;
  color: #fff;
  overflow: hidden;
  contain: layout paint;
}

/* Reset local: evita que reglas globales del theme sobre h2/p/a/button/
   video/canvas alteren la composicion aprobada. No sale del componente. */
.gvi-recorrido-aq2 * { box-sizing: border-box; }
.gvi-recorrido-aq2 :is(h2, p) {
  margin: 0;
  padding: 0;
  text-transform: none;
  font-family: inherit;
}
.gvi-recorrido-aq2 :is(button, a) {
  font-family: inherit;
  box-shadow: none;
  text-shadow: none;
}
.gvi-recorrido-aq2 button {
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  background: none;
  font: inherit;
  color: inherit;
}
.gvi-recorrido-aq2 :is(video, canvas, img) {
  max-width: none;
  border-radius: 0;
  box-shadow: none;
}

.gvi-recorrido-aq2 .gvi-aq2__sticky,
.gvi-recorrido-aq2 .gvi-aq2__viewport {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--gvi-aq2-bg);
}
.gvi-recorrido-aq2 .gvi-aq2__media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #000;
  overscroll-behavior: auto;
}
.gvi-recorrido-aq2 .gvi-aq2__media::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(90deg, rgba(0,0,0,.48) 0%, rgba(0,0,0,.2) 23%, rgba(0,0,0,.035) 48%, rgba(0,0,0,0) 70%);
}
.gvi-recorrido-aq2 .gvi-aq2__frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #000;
}
.gvi-recorrido-aq2 .gvi-aq2__canvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: #000;
  opacity: 0;
  transform: translateZ(0);
  transition: opacity .16s ease;
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
}
.gvi-recorrido-aq2.is-ready .gvi-aq2__canvas { opacity: 1; }
.gvi-recorrido-aq2.is-switching .gvi-aq2__canvas { opacity: .55; }

/* Los decodificadores nunca se ven: el canvas es la unica superficie
   visible. Se mantienen en el flujo con tamano 1px para que iOS no los
   descarte, pero fuera de pantalla y sin pintar. */
.gvi-recorrido-aq2 .gvi-aq2__deck {
  position: absolute;
  left: -9999px;
  top: -9999px;
  width: 2px;
  height: 2px;
  overflow: hidden;
  pointer-events: none;
}
.gvi-recorrido-aq2 .gvi-aq2__decoder {
  width: 2px;
  height: 2px;
  opacity: .001;
  pointer-events: none;
}

.gvi-recorrido-aq2 .gvi-aq2__content {
  position: absolute;
  z-index: 4;
  left: clamp(24px, 4vw, 68px);
  bottom: clamp(42px, 7vh, 82px);
  width: min(370px, 31vw);
  pointer-events: none;
}
.gvi-recorrido-aq2 .gvi-aq2__content-inner {
  opacity: 1;
  transform: translate3d(0, var(--gvi-aq2-text-shift, 0px), 0);
  transition: opacity .22s ease, transform .34s cubic-bezier(.22,.8,.24,1);
  will-change: opacity, transform;
}
.gvi-recorrido-aq2.is-content-out .gvi-aq2__content-inner {
  opacity: 0;
  transform: translate3d(0, 9px, 0);
}
.gvi-recorrido-aq2 .gvi-aq2__title {
  margin: 0 0 7px;
  color: #fff;
  font-size: clamp(18px, 1.55vw, 28px);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -.022em;
  text-wrap: balance;
}
.gvi-recorrido-aq2 .gvi-aq2__paragraph {
  max-width: 43ch;
  margin: 0 0 13px;
  color: rgba(255,255,255,.8);
  font-size: clamp(11px, .72vw, 13px);
  font-weight: 400;
  line-height: 1.44;
  white-space: pre-line;
}
.gvi-recorrido-aq2 .gvi-aq2__button {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 35px;
  padding: 0 14px;
  border: 1px solid rgba(255,255,255,.4);
  border-radius: 999px;
  color: #fff;
  text-decoration: none;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: .075em;
  text-transform: uppercase;
  background: rgba(0,0,0,.2);
  backdrop-filter: blur(9px);
  -webkit-backdrop-filter: blur(9px);
  transition: background .2s ease, border-color .2s ease, transform .2s ease;
}
.gvi-recorrido-aq2 .gvi-aq2__button:hover {
  color: #fff;
  background: rgba(255,255,255,.13);
  border-color: rgba(255,255,255,.72);
  transform: translateY(-1px);
}
.gvi-recorrido-aq2 .gvi-aq2__button.is-hidden { display: none; }
.gvi-recorrido-aq2 .gvi-aq2__button svg {
  width: 14px; height: 14px;
  fill: none; stroke: currentColor;
  stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round;
}

.gvi-recorrido-aq2 .gvi-aq2__arrow {
  position: absolute;
  z-index: 7;
  top: 50%;
  width: 40px;
  height: 40px;
  margin: 0;
  padding: 0;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,.24);
  border-radius: 999px;
  background: rgba(0,0,0,.28);
  color: #fff;
  transform: translateY(-50%);
  cursor: pointer;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: background .18s ease, border-color .18s ease, opacity .18s ease, transform .18s ease;
}
.gvi-recorrido-aq2 .gvi-aq2__arrow:hover { background: rgba(0,0,0,.56); border-color: rgba(255,255,255,.62); }
.gvi-recorrido-aq2 .gvi-aq2__arrow:active { transform: translateY(-50%) scale(.94); }
.gvi-recorrido-aq2 .gvi-aq2__arrow:disabled { opacity: .16; cursor: default; }
.gvi-recorrido-aq2 .gvi-aq2__arrow svg {
  width: 18px; height: 18px;
  fill: none; stroke: currentColor;
  stroke-width: 1.55; stroke-linecap: round; stroke-linejoin: round;
}
.gvi-recorrido-aq2 .gvi-aq2__arrow--prev { left: clamp(12px, 1.6vw, 26px); }
.gvi-recorrido-aq2 .gvi-aq2__arrow--next { right: clamp(84px, 7vw, 114px); }

.gvi-recorrido-aq2 .gvi-aq2__dots {
  position: absolute;
  z-index: 7;
  left: 50%;
  bottom: clamp(13px, 1.8vh, 22px);
  display: flex;
  gap: 6px;
  transform: translateX(-50%);
  pointer-events: none;
  opacity: .64;
}
.gvi-recorrido-aq2 .gvi-aq2__dot {
  width: 4px; height: 4px;
  border-radius: 50%;
  background: rgba(255,255,255,.34);
  transition: width .2s ease, background .2s ease, border-radius .2s ease;
}
.gvi-recorrido-aq2 .gvi-aq2__dot.is-active {
  width: 15px;
  border-radius: 999px;
  background: rgba(255,255,255,.92);
}

.gvi-recorrido-aq2 .gvi-aq2__loader {
  position: absolute;
  inset: 0;
  z-index: 8;
  display: grid;
  place-items: center;
  pointer-events: none;
  opacity: 1;
  transition: opacity .18s ease;
}
.gvi-recorrido-aq2 .gvi-aq2__loader::before {
  content: "";
  width: 24px;
  aspect-ratio: 1;
  border: 1px solid rgba(255,255,255,.2);
  border-top-color: rgba(255,255,255,.88);
  border-radius: 50%;
  animation: gvi-aq2-spin .8s linear infinite;
}
.gvi-recorrido-aq2.is-ready:not(.is-switching) .gvi-aq2__loader { opacity: 0; }

/* Lector de pantalla: anuncia el proyecto activo sin ruido visual. */
.gvi-recorrido-aq2 .gvi-aq2__status {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* Barra lateral: guia, progreso y salida */
.gvi-recorrido-aq2 .gvi-aq2__rail {
  position: absolute;
  z-index: 10;
  right: clamp(14px, 1.55vw, 26px);
  top: 50%;
  width: 58px;
  height: clamp(248px, 39vh, 340px);
  padding: 12px 8px;
  display: grid;
  grid-template-rows: 58px minmax(120px, 1fr);
  align-items: center;
  border: 1px solid rgba(255,255,255,.24);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(18,18,18,.46), rgba(18,18,18,.28));
  box-shadow: 0 16px 48px rgba(0,0,0,.18), inset 0 1px 0 rgba(255,255,255,.08);
  transform: translateY(-50%);
  backdrop-filter: blur(14px) saturate(120%);
  -webkit-backdrop-filter: blur(14px) saturate(120%);
}
.gvi-recorrido-aq2 .gvi-aq2__rail-hint {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 5px;
  color: rgba(255,255,255,.82);
  opacity: 1;
  transform: translateY(0);
  transition: opacity .38s ease, transform .38s ease;
}
.gvi-recorrido-aq2.has-interacted .gvi-aq2__rail-hint,
.gvi-recorrido-aq2.is-autoplaying .gvi-aq2__rail-hint,
.gvi-recorrido-aq2.is-hint-dismissed .gvi-aq2__rail-hint {
  opacity: 0;
  transform: translateY(-5px);
  pointer-events: none;
}
.gvi-recorrido-aq2 .gvi-aq2__scroll-icon {
  position: relative;
  width: 14px; height: 22px;
  border: 1px solid rgba(255,255,255,.58);
  border-radius: 9px;
  display: block;
}
.gvi-recorrido-aq2 .gvi-aq2__scroll-icon i {
  position: absolute;
  left: 50%; top: 4px;
  width: 2px; height: 4px;
  margin-left: -1px;
  border-radius: 3px;
  background: #fff;
  animation: gvi-aq2-scroll 1.45s ease-in-out infinite;
}
.gvi-recorrido-aq2 .gvi-aq2__rail-hint-text {
  font-size: 7px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: .11em;
  text-transform: uppercase;
  white-space: nowrap;
  text-align: center;
}
.gvi-recorrido-aq2 .gvi-aq2__scroll-mobile { display: none; }

.gvi-recorrido-aq2 .gvi-aq2__rail-progress {
  position: relative;
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  cursor: ns-resize;
  touch-action: none;
  pointer-events: auto;
}
.gvi-recorrido-aq2 .gvi-aq2__rail-track {
  position: absolute;
  top: 10px; bottom: 10px; left: 50%;
  width: 2px;
  border-radius: 999px;
  background: rgba(255,255,255,.18);
  transform: translateX(-50%);
  overflow: hidden;
}
.gvi-recorrido-aq2 .gvi-aq2__rail-track i {
  position: absolute;
  left: 0; top: 0;
  width: 100%;
  height: var(--gvi-aq2-progress);
  border-radius: 999px;
  background: rgba(255,255,255,.92);
  box-shadow: 0 0 12px rgba(255,255,255,.34);
  transition: height .16s linear;
}
.gvi-recorrido-aq2 .gvi-aq2__rail-markers {
  position: absolute;
  inset: 10px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
}
.gvi-recorrido-aq2 .gvi-aq2__rail-marker {
  position: relative;
  width: 12px; height: 12px;
  margin: 0; padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
}
.gvi-recorrido-aq2 .gvi-aq2__rail-marker::before {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  background: rgba(255,255,255,.38);
  box-shadow: 0 0 0 3px rgba(0,0,0,.13);
  transition: inset .18s ease, background .18s ease, box-shadow .18s ease;
}
.gvi-recorrido-aq2 .gvi-aq2__rail-marker:hover::before { background: #fff; }
.gvi-recorrido-aq2 .gvi-aq2__rail-marker.is-active::before {
  inset: 2px;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(255,255,255,.13), 0 0 12px rgba(255,255,255,.25);
}
.gvi-recorrido-aq2 .gvi-aq2__rail-marker.is-disabled { opacity: .3; cursor: default; }

.gvi-recorrido-aq2 .gvi-aq2__skip {
  position: absolute;
  z-index: 9;
  left: 50%;
  bottom: clamp(16px, 2.4vh, 28px);
  transform: translateX(-50%);
  min-width: 114px;
  height: 40px;
  padding: 0 16px;
  border: 1px solid rgba(255,255,255,.26);
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: rgba(14,14,14,.34);
  color: rgba(255,255,255,.9);
  cursor: pointer;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: background .2s ease, color .2s ease, transform .2s ease, border-color .2s ease;
}
.gvi-recorrido-aq2 .gvi-aq2__skip:hover {
  background: rgba(255,255,255,.14);
  border-color: rgba(255,255,255,.44);
  color: #fff;
  transform: translateX(-50%) translateY(-1px);
}
.gvi-recorrido-aq2 .gvi-aq2__skip span {
  font-size: 9px;
  font-weight: 650;
  line-height: 1;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.gvi-recorrido-aq2 .gvi-aq2__skip svg {
  width: 15px; height: 15px;
  fill: none; stroke: currentColor;
  stroke-width: 1.55; stroke-linecap: round; stroke-linejoin: round;
}
.gvi-recorrido-aq2.is-at-end .gvi-aq2__skip {
  background: rgba(255,255,255,.18);
  border-color: rgba(255,255,255,.52);
  color: #fff;
}

/* Foco visible discreto, coherente con la direccion visual. */
.gvi-recorrido-aq2 :is(button, a, [tabindex]):focus-visible {
  outline: 1px solid rgba(255,255,255,.9);
  outline-offset: 3px;
  border-radius: 999px;
}
.gvi-recorrido-aq2:focus { outline: none; }

@keyframes gvi-aq2-spin { to { transform: rotate(1turn); } }
@keyframes gvi-aq2-scroll {
  0%   { opacity: 0; transform: translateY(-1px); }
  35%  { opacity: 1; }
  100% { opacity: 0; transform: translateY(7px); }
}

@media (max-width: 767px) {
  .gvi-recorrido-aq2 {
    left: 50%;
    width: calc(100vw - var(--gvi-sbw)) !important;
    max-width: none !important;
    height: 100vh;
    height: 100svh;
    margin-left: calc((100vw - var(--gvi-sbw)) / -2) !important;
  }
  .gvi-recorrido-aq2 .gvi-aq2__viewport { display: flex; flex-direction: column; min-height: 100svh; }
  .gvi-recorrido-aq2 .gvi-aq2__content {
    position: relative;
    order: 1;
    left: auto; bottom: auto;
    width: 100%;
    flex: 0 0 auto;
    min-height: clamp(124px, 25svh, 210px);
    max-height: 38svh;
    padding: calc(env(safe-area-inset-top, 0px) + 12px) 18px 12px;
    display: flex;
    align-items: flex-end;
    background: #000;
    pointer-events: auto;
    touch-action: pan-y;
    overflow: auto;
  }
  .gvi-recorrido-aq2 .gvi-aq2__content-inner { width: 100%; max-width: 520px; padding-right: 50px; }
  .gvi-recorrido-aq2 .gvi-aq2__title { margin-bottom: 5px; font-size: clamp(17px, 5.1vw, 23px); line-height: 1.06; }
  .gvi-recorrido-aq2 .gvi-aq2__paragraph { margin-bottom: 9px; font-size: 11px; line-height: 1.38; }
  .gvi-recorrido-aq2 .gvi-aq2__button { min-height: 32px; padding: 0 12px; font-size: 8px; }
  .gvi-recorrido-aq2 .gvi-aq2__media {
    position: relative;
    order: 2;
    inset: auto;
    flex: 1 1 auto;
    min-height: 0;
    width: 100%;
    display: grid;
    place-items: center;
    background: #000;
    touch-action: pan-y;
  }
  .gvi-recorrido-aq2 .gvi-aq2__media::after { display: none; }
  .gvi-recorrido-aq2 .gvi-aq2__frame {
    position: absolute;
    inset: 0;
    width: 100%; height: 100%;
    max-width: none;
    aspect-ratio: auto;
    overflow: hidden;
    background: #000;
  }
  .gvi-recorrido-aq2 .gvi-aq2__canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
  .gvi-recorrido-aq2 .gvi-aq2__arrow { width: 34px; height: 34px; }
  .gvi-recorrido-aq2 .gvi-aq2__arrow svg { width: 15px; height: 15px; }
  .gvi-recorrido-aq2 .gvi-aq2__arrow--prev { left: 9px; }
  .gvi-recorrido-aq2 .gvi-aq2__arrow--next { right: 62px; }
  .gvi-recorrido-aq2 .gvi-aq2__dots { bottom: 9px; }
  .gvi-recorrido-aq2 .gvi-aq2__rail {
    right: 7px;
    width: 46px;
    height: min(70%, 238px);
    padding: 8px 5px;
    grid-template-rows: 46px minmax(86px, 1fr);
  }
  .gvi-recorrido-aq2 .gvi-aq2__scroll-desktop { display: none; }
  .gvi-recorrido-aq2 .gvi-aq2__scroll-mobile { display: block; }
  .gvi-recorrido-aq2 .gvi-aq2__skip {
    min-width: 108px;
    height: 36px;
    padding: 0 14px;
    bottom: max(10px, env(safe-area-inset-bottom, 0px) + 10px);
  }
  .gvi-recorrido-aq2 .gvi-aq2__rail-hint-text { font-size: 6.5px; }
  .gvi-recorrido-aq2 .gvi-aq2__skip span { font-size: 8px; }
  /* Objetivo tactil real de 24px sin cambiar el punto dibujado de 12px. */
  .gvi-recorrido-aq2 .gvi-aq2__rail-marker { width: 24px; height: 20px; }
  .gvi-recorrido-aq2 .gvi-aq2__rail-marker::before { inset: 8px 10px; }
  .gvi-recorrido-aq2 .gvi-aq2__rail-marker.is-active::before { inset: 6px 8px; }
}

@media (max-width: 390px) and (max-height: 700px) {
  .gvi-recorrido-aq2 .gvi-aq2__content { min-height: 118px; max-height: 34svh; padding-top: 10px; padding-bottom: 8px; }
  .gvi-recorrido-aq2 .gvi-aq2__title { font-size: 17px; }
  .gvi-recorrido-aq2 .gvi-aq2__paragraph {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .gvi-recorrido-aq2 .gvi-aq2__rail { height: min(72%, 208px); }
}

/* Reduced motion desactiva animaciones decorativas y la interpolacion,
   nunca la funcionalidad: el scrub y la navegacion siguen operativos. */
@media (prefers-reduced-motion: reduce) {
  .gvi-recorrido-aq2 .gvi-aq2__loader::before,
  .gvi-recorrido-aq2 .gvi-aq2__scroll-icon i { animation: none; }
  .gvi-recorrido-aq2 .gvi-aq2__content-inner,
  .gvi-recorrido-aq2 .gvi-aq2__rail-hint,
  .gvi-recorrido-aq2 .gvi-aq2__canvas { transition: none; }
}
