/* Visit preview and host controls. The panorama viewer is loaded on demand. */
#sobre,
#visita-virtual {
  scroll-margin-top: 6rem;
}
.hero-buttons {
  padding-inline: 1rem;
}
.hero-buttons .btn {
  text-align: center;
}
.tour-section {
  padding-top: clamp(3rem, 6vw, 5rem);
}
.tour-heading {
  text-align: center;
  margin: 0 auto 1.5rem;
  max-width: 42rem;
}
.tour-heading h2 {
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  margin: 0.6rem 0 1rem;
}
.tour-heading p:last-child {
  line-height: 1.7;
}
.tour-stage {
  position: relative;
  width: 100%;
  min-width: 0;
  max-width: 68rem;
  margin-inline: auto;
  scroll-margin-top: 6rem;
  border-radius: 1.5rem;
  overflow: hidden;
  border: 2px solid var(--border);
  background: #303c25;
  box-shadow: var(--shadow-soft);
  /* La geometria vive aqui y solo aqui: el cartel y el visor la heredan,
     asi la ventana no cambia de tamano al cargar el tour. */
  display: grid;
  aspect-ratio: 16 / 9;
  min-height: 21rem;
  max-height: calc(100dvh - 8rem);
}
.tour-poster {
  position: relative;
  min-width: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: white;
  text-decoration: none;
}
.tour-poster > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.tour-poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, #14200dc4, #14200d0a 80%);
}
.tour-poster-copy {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 1rem;
  padding: 2rem;
  text-align: center;
  text-shadow: 0 1px 8px #14200d;
}
.tour-start-label {
  padding: 0.8rem 1rem;
  text-shadow: none;
}
.tour-poster:hover .tour-start-label,
.tour-poster:focus-visible .tour-start-label {
  background-color: var(--primary);
  color: var(--background);
  opacity: 1;
}

.tour-poster-note {
  font-size: 0.95rem;
  font-weight: 500;
}
.tour-section a:focus-visible,
.tour-section button:focus-visible,
.tour-dialog button:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: -5px;
}
.tour-shell {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #303c25;
  color: white;
}
body.tour-active .whatsapp-float {
  visibility: hidden;
}
.tour-section [hidden],
.tour-dialog [hidden] {
  display: none !important;
}
.tour-actions {
  display: flex;
  gap: 0.5rem;
  margin-left: auto;
}
.tour-frame-slot {
  position: relative;
  flex: 1;
  min-height: 0;
}
.tour-frame-slot iframe {
  position: absolute;
  width: 100%;
  height: 100%;
  inset: 0;
  border: 0;
}
.tour-dialog {
  /* Encajado en .tour-stage, que es quien fija la geometria */
  position: absolute;
  inset: 0;
  width: 100%;
  /* El UA da height:fit-content al <dialog>: sin esto el visor colapsa a 0 */
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: #303c25;
  color: white;
}
.tour-dialog:modal {
  position: fixed;
  inset: 0;
  height: 100%;
  height: 100dvh;
}
.tour-dialog::backdrop {
  background: #182314e6;
}
.tour-dialog:modal .tour-shell {
  height: 100%;
  aspect-ratio: auto;
  min-height: 0;
}
@media (max-width: 639px) {
  .tour-section.container {
    padding-inline: 1rem;
  }
  .tour-stage {
    aspect-ratio: 4 / 3;
    min-height: 0;
    max-height: none;
  }
  .tour-poster-copy {
    padding: 1.25rem;
  }
  .tour-poster-note {
    max-width: 15rem;
  }
  .hero-buttons .btn {
    max-width: 100%;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
