/* ==========================================================================
   3D-тур по выставке (/vystavka-tur)
   Просмотрщик — Pannellum 2.5.6 (MIT), лежит в assets/vendor/pannellum.
   ========================================================================== */

.tour-head {
  padding: 40px 0 32px;
}

.tour-head__lead {
  max-width: 680px;
  margin-top: 20px;
  font-size: 16px;
  font-weight: 500;
  line-height: 22px;
  color: var(--gold-text);
}

.tour {
  max-width: 1440px;
  margin-inline: auto;
  padding-inline: 45px;
}

.tour__stage {
  position: relative;
  height: min(78vh, 860px);
  min-height: 420px;
  overflow: hidden;
  background: var(--dark);
  isolation: isolate;
}

.tour__pano {
  position: absolute;
  inset: 0;
}

/* --- верхняя и нижняя панели поверх панорамы --- */
.tour__bar {
  position: absolute;
  z-index: 3;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 20px;
  pointer-events: none;
}

.tour__bar > * {
  pointer-events: auto;
}

.tour__bar--top {
  top: 0;
  justify-content: flex-start;
  background: linear-gradient(rgba(0, 0, 0, 0.42), rgba(0, 0, 0, 0));
}

.tour__bar--bottom {
  bottom: 0;
  justify-content: center;
  background: linear-gradient(rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.42));
}

.tour__where {
  display: flex;
  align-items: baseline;
  gap: 10px;
  color: #fff;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.5);
}

.tour__num {
  font-family: var(--display);
  font-size: 40px;
  line-height: 1;
  color: var(--gold);
}

.tour__of {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 1.4px;
  text-transform: uppercase;
}

.tour__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 48px;
  height: 48px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: rgba(37, 37, 37, 0.78);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}

.tour__btn--wide {
  padding: 0 22px;
}

.tour__btn:hover,
.tour__btn[aria-expanded='true'] {
  background: var(--gold);
  color: #fff;
}

.tour__btn:disabled {
  opacity: 0.4;
  cursor: default;
  background: rgba(37, 37, 37, 0.78);
}

/* --- лента всех точек --- */
.tour__strip {
  position: absolute;
  z-index: 4;
  left: 0;
  right: 0;
  bottom: 84px;
  padding: 0 20px;
}

.tour__strip[hidden] {
  display: none;
}

.tour__thumbs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 10px;
  background: rgba(20, 20, 20, 0.82);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
  scrollbar-color: var(--gold) transparent;
}

.tour__thumbs li {
  flex: 0 0 auto;
  scroll-snap-align: center;
}

.tour__thumb {
  position: relative;
  display: block;
  width: 144px;
  height: 72px;
  padding: 0;
  border: 2px solid transparent;
  background: #111 center / cover no-repeat;
  cursor: pointer;
}

.tour__thumb span {
  position: absolute;
  left: 4px;
  top: 3px;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 0 4px #000;
}

.tour__thumb:hover {
  border-color: rgba(207, 180, 93, 0.6);
}

.tour__thumb[aria-current='true'] {
  border-color: var(--gold);
}

.tour__noscript {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #fff;
}

/* --- стрелка перехода (hotspot) --- */
.tour-hs {
  width: 0;
  height: 0;
}

.tour-hs__ring {
  position: absolute;
  left: -27px;
  top: -27px;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: rgba(37, 37, 37, 0.55);
  border: 3px solid var(--gold);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
  display: grid;
  place-items: center;
  color: var(--gold);
  cursor: pointer;
  transition: transform 0.2s var(--ease), background 0.2s var(--ease), color 0.2s var(--ease);
}

.tour-hs__ring svg {
  display: block;
  transform: rotate(var(--dir, 0deg));
}

.tour-hs--far .tour-hs__ring {
  transform: scale(0.78);
}

.tour-hs:hover .tour-hs__ring,
.tour-hs:focus-within .tour-hs__ring {
  background: var(--gold);
  color: #fff;
  transform: scale(1.12);
}

.tour-hs__label {
  position: absolute;
  left: 50%;
  top: 34px;
  transform: translateX(-50%);
  padding: 3px 8px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.2s;
  pointer-events: none;
}

.tour-hs:hover .tour-hs__label {
  opacity: 1;
}

/* --- Pannellum: подгоняем под сайт --- */
.tour .pnlm-container {
  background: var(--dark);
  font-family: var(--sans);
}

/* штатные кнопки зума Pannellum скрыты: зум — колесом, щипком и клавишами +/− */
.tour .pnlm-controls-container {
  display: none;
}

.tour .pnlm-load-box {
  background: rgba(37, 37, 37, 0.85);
  border-radius: 8px;
}

.tour .pnlm-lbar-fill {
  background: var(--gold);
}

.tour .pnlm-lbar {
  border-color: var(--gold);
}

.tour .pnlm-about-msg {
  display: none !important;
}

/* в полноэкранном режиме панели остаются на месте */
.tour__stage:fullscreen {
  height: 100%;
}

/* --- подсказки под туром --- */
.tour-help {
  padding-top: 40px;
  padding-bottom: 96px;
}

.tour-help__list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
}

.tour-help__list li {
  padding: 24px;
  background: var(--cream);
  font-size: 14px;
  line-height: 21px;
}

.tour-help__list b {
  display: block;
  margin-bottom: 6px;
  font-size: 16px;
}

.tour-help kbd {
  display: inline-block;
  min-width: 22px;
  padding: 0 5px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
  font-family: inherit;
  font-size: 13px;
  text-align: center;
}

.tour-help__back {
  margin-top: 32px;
  font-size: 16px;
}

.tour-help__back a {
  color: var(--red);
}

@media (max-width: 1024px) {
  .tour {
    padding-inline: 0;
  }

  .tour__stage {
    height: min(72vh, 720px);
  }

  .tour-help__list {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

@media (max-width: 640px) {
  .tour-head {
    padding: 20px 0 20px;
  }

  .tour__stage {
    height: 70svh;
    min-height: 380px;
  }

  .tour__num {
    font-size: 30px;
  }

  .tour__bar {
    padding: 12px;
  }

  .tour__strip {
    bottom: 72px;
    padding: 0 8px;
  }

  .tour__thumb {
    width: 112px;
    height: 56px;
  }

  .tour__btn--wide span {
    font-size: 14px;
  }
}

.tour__btn--fs {
  margin-left: auto;
}
