.virtual-expo-container {
  /* padding: 300px 0px 100px 0px; */
  background-color: #00adef;
}

.virtual-expo-container {
  background-color: #00adef;

  /* Centramos contenido */
  display: flex;
  align-items: center; /* centra vertical */
  justify-content: center; /* centra horizontal */
  min-height: 100vh; /* ocupa toda la altura de la pantalla */
  flex-direction: column; /* para que el título quede arriba del mapa */
  width: 100%;

  overflow: auto; /* scroll si no entra */
  touch-action: pan-x pan-y; /* permite arrastrar con los dedos */
}

.virtual-expo {
  width: fit-content;
  margin: 0 auto;
}

.title-container {
  padding: 15rem 0rem 30rem 30rem;
  color: white;
  align-self: start;
}
.title-container h1 {
  font-size: 4.5rem;
  font-weight: 600;
  margin-bottom: 2rem;
  letter-spacing: 2px;
}
.title-container p {
  color: white;
  font-size: 2.5rem;
}

.virtual-expo {
  position: relative;
  display: inline-block;
  width: 100%; /* responsivo */
  max-width: 1600px; /* opcional */
  width: 1600px; /* opcional */
  z-index: 1; /* opcional */
}

.virtual-expo img.expo-base {
  width: 100%;
  height: auto;
  display: block;
}

.virtual-expo .edificio {
  position: absolute;
  top: var(--top, 0); /* toma el valor de la variable */
  left: var(--left, 0);
  transform: translate(-50%, -1000%); /* empieza arriba */
  color: white;
  padding: 5px;
  border-radius: 8px;
  cursor: pointer;
}

.edificio > img {
  width: 240px;
  height: auto;
  transition: all 0.3s ease;
}

.edificio:hover .edificio-img {
  filter: drop-shadow(0 0 15px rgba(255, 255, 255, 0.8));
  transform: scale(1.1);
}

/* Animación caída */
.edificio {
  opacity: 1;
  animation: caer 1.5s ease forwards;
}

.edificio:hover {
  z-index: 9999;
}

@keyframes caer {
  from {
    transform: translate(-50%, -1000%); /* empieza arriba */
  }
  to {
    transform: translate(-50%, -50%); /* posición final */
  }
}

/* Definimos top y left y delays para cada edificio */
.edificio-adr1 {
  /* 1 */
  --top: 43%;
  --left: 18%;
  animation-delay: 2.1s;
}

.edificio-adr2 {
  /* 2 */
  --top: 30%;
  --left: 31%;
  animation-delay: 2.3s;
}

.edificio-adr2b {
  /* 3 */
  --top: 20%;
  --left: 44%;
  animation-delay: 2.5s;
}

.edificio-ali2 {
  /* 4 */
  --top: 9%;
  --left: 56%;
  animation-delay: 2.7s;
}

.edificio-cdr2 {
  /* 5 */
  --top: 51.5%;
  --left: 34%;
  animation-delay: 2.9s;
}

.edificio-cdr1 {
  /* 6 */
  --top: 41%;
  --left: 46.5%;
  animation-delay: 3.1s;
}

.edificio-cil2 {
  /* 7 */
  --top: 31.5%;
  --left: 58.5%;
  animation-delay: 3.3s;
}

.edificio-cil1 {
  /* 8 */
  --top: 20%;
  --left: 71%;
  animation-delay: 3.5s;
}

.edificio-ali1 {
  /* 9 */
  --top: 70.5%;
  --left: 40%;
  animation-delay: 3.7s;
}

.edificio-adr1b {
  /* 10 */
  --top: 59%;
  --left: 54.5%;
  animation-delay: 3.9s;
}

.edificio-ail2b {
  /* 11 */
  --top: 46%;
  --left: 69%;
  animation-delay: 4.1s;
}

.edificio-ail1b {
  /* 12 */
  --top: 32%;
  --left: 78%;
  animation-delay: 4.3s;
}

/* Tooltip base */
.edificio .tooltip {
  position: absolute;
  bottom: 62%; /* en lugar de top, lo ponemos arriba del edificio */
  left: 42%;
  transform: translateX(-50%) translateY(-1000%); /* empieza un poco arriba */
  background: #333; /* gris oscuro */
  color: #fff;
  padding: 12px;
  border-radius: 6px;
  font-size: 14px;
  text-align: center;
  /* white-space: nowrap; */
  z-index: 10;
  opacity: 1;
  max-height: fit-content; /* altura inicial solo título */
  transition: max-height 0.3s ease;
  transform-origin: bottom center; /* hace que crezca hacia arriba */
  width: 170px;
  cursor: default;
}

/* Título del tooltip */
.tooltip p {
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0;
  color: white;
}

/* Punta del tooltip (abajo) */
.edificio .tooltip::after {
  content: "";
  position: absolute;
  top: 100%; /* justo debajo del tooltip */
  left: 50%;
  transform: translateX(-50%);
  border-width: 6px;
  border-style: solid;
  border-color: #333 transparent transparent transparent;
}

/* Iconos ocultos por defecto */
.edificio .tooltip .icons {
  display: flex;
  gap: 6px;
  margin-top: 5px;
  opacity: 0;
  max-height: 0; /* altura inicial 0 */
  transform: translateY(-5px);
  transition: all 0.3s ease;
  cursor: pointer;
}

.edificio .tooltip .icons img {
  transition: transform 0.2s ease;
}

.edificio .tooltip .icons img:hover {
  transform: scale(1.1);
}

/* Hover o estado abierto */
.edificio:hover .tooltip .icons,
.edificio.open .tooltip .icons {
  opacity: 1;
  max-height: 100px; /* suficiente para contener todos los iconos */
  transform: translateY(0);
}

.edificio .tooltip .icons img {
  animation: none !important;
  box-shadow: none !important;
  background: transparent !important;
  width: 50px;
}

.edificio:hover .tooltip .icons {
  opacity: 1;
  transform: translateY(0);
}

/* Modal básico */
.redirect-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}
.redirect-modal.active {
  display: flex;
}
.redirect-box {
  background: white;
  padding: 20px 30px;
  border-radius: 10px;
  text-align: center;
  font-family: sans-serif;
  max-width: 350px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.4);
}
.redirect-box h3 {
  margin-bottom: 10px;
  margin-top: 2rem;
  font-size: 18px;
}
.redirect-box p {
  font-size: 14px;
  margin-bottom: 10px;
}

/* estilos ejemplo */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.modal-overlay.active {
  display: flex;
}

.modal-content {
  background: white;
  padding: 20px;
  border-radius: 10px;
  position: relative;
}

.redirect-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.redirect-modal.active {
  display: flex;
}

.redirect-box {
  position: relative;
  background: #fff;
  padding: 20px 30px;
  border-radius: 10px;
  max-width: 400px;
  text-align: center;
}

/* Cruz de cierre */
.close-btn {
  position: absolute;
  top: 8px;
  right: 13px;
  font-size: 24px;
  font-weight: bold;
  color: #333;
  cursor: pointer;
  user-select: none;
  transition: color 0.2s;
  margin-bottom: 2rem;
}

.close-btn:hover {
  color: red;
}

@keyframes tooltipCaer {
  from {
    opacity: 1;
    transform: translateX(-50%) translateY(-1000%); /* empieza arriba */
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0); /* posición final */
  }
}

.edificio .tooltip {
  opacity: 1; /* siempre visible */
  animation: tooltipCaer 1.5s ease forwards; /* animación de caída */
}

.edificio-adr1 .tooltip {
  animation-delay: 3.2s; /* 2.6 + 0.6 */
}

.edificio-adr2 .tooltip {
  animation-delay: 3.4s; /* 2.8 + 0.6 */
}

.edificio-ali1 .tooltip {
  animation-delay: 3.6s; /* 3 + 0.6 */
}

.edificio-ali2 .tooltip {
  animation-delay: 3.8s; /* 3.2 + 0.6 */
}

.edificio-cil2 .tooltip {
  animation-delay: 4s; /* 3.4 + 0.6 */
}

.edificio-cil1 .tooltip {
  animation-delay: 4.2s; /* 3.6 + 0.6 */
}

.edificio-cdr2 .tooltip {
  animation-delay: 4.4s; /* 3.8 + 0.6 */
}

.edificio-cdr1 .tooltip {
  animation-delay: 4.6s; /* 4 + 0.6 */
}

.edificio-ail2b .tooltip {
  animation-delay: 4.8s; /* 4.2 + 0.6 */
}

.edificio-ail1b .tooltip {
  animation-delay: 5s; /* 4.4 + 0.6 */
}

.edificio-adr1b .tooltip {
  animation-delay: 5.2s; /* 4.6 + 0.6 */
}

.edificio-adr2b .tooltip {
  animation-delay: 5.4s; /* 4.8 + 0.6 */
}

.virtual-expo {
  position: relative;
  width: 1200px;
  height: 800px; /* ajustar según tu mapa */
}
.cloud {
  position: absolute;
  width: 150px;
  height: auto;
  z-index: 0;
}

/* Animación diagonal hacia arriba (izquierda → derecha) */
@keyframes moveDiagonal {
  0% {
    transform: translate3d(0px, 0px, 0);
  }
  100% {
    transform: translate3d(300px, -300px, 0); /* derecha y arriba */
  }
}

/* Animación diagonal hacia arriba (derecha → izquierda) */
@keyframes moveDiagonalLeft {
  0% {
    transform: translate3d(0px, 0px, 0);
  }
  100% {
    transform: translate3d(-300px, -300px, 0); /* izquierda y arriba */
  }
}

/* === Primer grupo: izquierda → derecha === */
.cloud1 {
  top: 50px;
  left: 0;
  animation: moveDiagonal 30s linear infinite alternate;
}

.cloud2 {
  top: 120px;
  left: 0;
  animation: moveDiagonal 40s linear infinite alternate-reverse;
}

.cloud3 {
  top: 250px;
  left: 0;
  animation: moveDiagonal 25s linear infinite alternate;
}

/* === Segundo grupo: derecha → izquierda === */
.cloud4 {
  top: -20px;
  right: 0;
  animation: moveDiagonalLeft 35s linear infinite alternate;
}

.cloud5 {
  top: 90px;
  right: 0;
  animation: moveDiagonalLeft 28s linear infinite alternate-reverse;
}

.cloud6 {
  top: 150px;
  right: 0;
  animation: moveDiagonalLeft 32s linear infinite alternate;
}
