/* ============================================
 SPOTS.CSS - Estilos para la experiencia VR
 ============================================ */

/* ========== 1. RESET BÁSICO ========== */

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  touch-action: none;
  padding: 0;
  margin: 0;
  overflow: hidden;
  font-family: 'Montserrat', sans-serif;
}

video {
  visibility: hidden;
  pointer-events: none;
  opacity: 0;
}

/* ========== 2. CONTENEDORES PRINCIPALES ========== */

/* Intro: pantalla de ENTRAR */
#intro-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1500;
  pointer-events: auto;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Logo en header */
#header-logo {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1600;
  padding: 1em;
  width: auto;
  display: flex;
  justify-content: flex-start;
}

#header-logo img {
  max-width: 400px;
  width: 45%;
  min-width: 200px;
}

/* Botón ENTRAR (SVG) */
.intro-enter-icon {
  position: absolute;
  top: 55vh;
  left: 50vw;
  transform: translate(-50%, -50%);
  width: 22vw;
  max-width: 420px;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.intro-enter-icon:hover {
  transform: translate(-50%, -50%) scale(1.05);
}

/* Caja amarilla – escritorio */
.intro-info-box {
  position: absolute;
  right: 5vw;
  bottom: 8vh;
  width: 28vw;
  max-width: 520px;
  min-width: 360px;
  background: #ffe66d;
  padding: 1.5vw 1.8vw;
  border-radius: 1.2vw;
  font-size: 1vw;
  line-height: 1.4;
  color: #000;
  text-align: left;
  box-shadow: 0 4px 20px rgba(0,0,0,0.25);
}

/* Contenedor 3D */
#container {
  position: fixed;
  inset: 0;
  touch-action: none;
}

#container canvas {
  touch-action: none;
  user-select: none;
  cursor: grab;          /* cursor "agarra" */
}

#container canvas:active {
  cursor: grabbing;      /* cuando arrastras */
}


/* Mensaje de ayuda "Arrastra para explorar" */
.drag-hint {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  padding: 0.8rem 1.4rem;
  background: rgba(0, 0, 0, 0.75);
  color: #f2e81b;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.95rem;
  border-radius: 999px;
  border: 1px solid #f2e81b;
  z-index: 1500;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

/* cuando está visible */
.drag-hint.is-visible {
  opacity: 1;
}

/* Spots (botones flotando) */
#spots-container {
  position: fixed;
  inset: 0;
  display: block;
  opacity: 1;
  pointer-events: none; /* se habilitan por JS */
}

/* ========== 3. BOTONES DE SPOTS ========== */

.spot {
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
  transform: translate(-50%, -50%);
  position: absolute;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 50px;
  height: 50px;
  pointer-events: auto;
}

.spot-icon {
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
}

/* Estados específicos de audio (chofer) */
#audio-btn .spot-icon {
  filter: none;
  transition: filter 0.2s ease;
}

#audio-btn.state-1 .spot-icon { filter: none; }
#audio-btn.state-2 .spot-icon { filter: invert(1); }
#audio-btn.state-3 .spot-icon { filter: none; }
#audio-btn.state-4 .spot-icon { filter: invert(1); }

.spot.is-active .spot-icon {
  filter: hue-rotate(120deg);
}

/* ========== 4. MODAL Y GALERÍA ========== */

.spot-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms ease;
  z-index: 2000; /* por encima del header y del 360 */
  touch-action: pan-y;
}

.spot-modal.is-visible {
  opacity: 1;
  pointer-events: auto;
}

/* Paginación (bolitas) en amarillo */
.swiper-pagination-bullet-active {
  background-color: rgb(242, 232, 27);
}

/* Ocultar flechas default de Swiper */
.swiper-button-next::after,
.swiper-button-prev::after {
  display: none !important;
}

/* Flecha izquierda personalizada */
.swiper-button-prev {
  background-image: url("../iconos/swipe-left.svg");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  width: 55px;
  height: 55px;
  left: 25px;
}

/* Flecha derecha personalizada */
.swiper-button-next {
  background-image: url("../iconos/swipe-right.svg");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  width: 55px;
  height: 55px;
  right: 25px;
}

/* Centrado vertical de flechas */
.swiper-button-next,
.swiper-button-prev {
  top: 50%;
  transform: translateY(-50%);
}

/* Diálogo del modal */
.spot-modal__dialog {
  padding: 1.5rem;
  width: min(90vw, 960px);
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  touch-action: pan-y pinch-zoom;
}

/* Header del modal */
.spot-modal__header {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1rem;
  margin-bottom: 1rem;
}

/* Ocultamos el título de “Detalle” */
.spot-modal__title {
  display: none !important;
}

/* Botón de cerrar (tache) */
#modal-close-btn {
  background: none;
  border: none;
  padding: 0;
  width: 55px;
  height: 55px;
  position: absolute;
  top: 35px;
  right: 35px;
  cursor: pointer;
  z-index: 2100;
}

#modal-close-btn img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

/* ========== 5. SWIPER ========== */

.swiper-container {
  width: 100%;
  height: 100%;
  touch-action: pan-y pinch-zoom;
  position: relative;
  overflow: hidden;
}

.swiper-slide {
  display: flex;
  align-items: center;
  justify-content: center;
}

.swiper-slide img {
  max-width: 100%;
  max-height: 100%;
  object-fit: cover;
  object-position: center;
}

/* Ajuste especial para imágenes dentro del modal */
.spot-modal .swiper-slide img {
  width: 100% !important;
  height: auto !important;
  max-height: 80vh;
  aspect-ratio: 1920/1280;
  object-fit: contain;
  margin: 0 auto;
  display: block;
}

/* ========== 6. RESPONSIVE ========== */

@media (max-width: 1000px) {
  #header-logo img {
    max-width: 320px;
  }

  .intro-enter-icon {
    top: 50vh;
    width: 40vw;
  }

  .intro-info-box {
    right: 50%;
    bottom: 6vh;
    transform: translateX(50%);
    width: 80vw;
    max-width: 80vw;
    min-width: 0;
    padding: 1.6rem;
    border-radius: 14px;
    font-size: 0.95rem;
  }
}

@media (max-width: 600px) {
  .intro-enter-icon {
    top: 48vh;
    width: 50vw;
  }

  .intro-info-box {
    bottom: 4vh;
    padding: 1.3rem 1.4rem;
    font-size: 0.85rem;
  }

  .spot-modal__dialog {
    padding: 1rem;
  }
}

/* ========== 7. HEADER Y FOOTER ========== */

header {
  position: fixed;
  top: 0;
  left: 0;
}

footer {
  position: fixed;
  bottom: 0;
  left: 0;
  z-index: 1100;
}

footer nav {
  display: flex;
  gap: 1em;
  padding: 1em;
  flex-direction: row;
}

footer .spot {
  position: relative;
  transform: none;
}

/* Bocina normal (sonido activo) */
#footer-audio-btn .spot-icon {
  filter: invert(0);
}

/* Bocina invertida cuando está muteado */
#footer-audio-btn.is-active .spot-icon {
  filter: invert(1);
}

/* Día/noche activo (invertido) */
#day-night-link.is-active .spot-icon {
  filter: invert(1);
}

/* ==== BOTÓN DE CERRAR (TACHE) – VERSIÓN FINAL ==== */

/* Aseguramos que el header del modal tenga contexto de posición */
.spot-modal__header {
  position: relative;
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

/* Ocultamos el título si no quieres que diga “Detalle” */
.spot-modal__title {
  display: none;
}

/* Botón de cerrar: SOLO el SVG, sin círculo raro */
.spot-modal__close {
  background: none !important;
  border: none !important;
  padding: 0;
  width: 48px;
  height: 48px;
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  cursor: pointer;
}

/* La imagen del tache ocupa todo el botón */
.spot-modal__close img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* =====================
   Aviso: "Arrastra para explorar"
   ===================== */
.drag-hint {
  position: fixed;
  left: 50%;
  bottom: 32px;
  transform: translate(-50%, 12px); /* un poquito abajo para animar */
  padding: 0.75rem 2.5rem;
  border-radius: 999px;
  border: 1px solid #ffe66d;
  background: rgba(0, 0, 0, 0.9);
  color: #ffe66d;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.95rem;
  text-align: center;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4);
  z-index: 110;              /* por encima de video / spots / footer */
  opacity: 0;                /* OCULTA POR DEFECTO */
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.drag-hint.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, 0);
}



