/* =========================================
   RESET
========================================= */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", sans-serif;
  background-color: #f4f5f7;
  color: #111;
  overflow: hidden;
}


/* =========================================
   VIEWER FULLSCREEN
========================================= */

#viewer-container {
  position: relative;
  width: 100%;
  height: 100%;
}

model-viewer {
  width: 100%;
  height: 100%;
  background-color: #eef0f2;
}

.studio3d-brand{
  display: none;
}

/* =========================================
   MENU OVERLAY (BASE MOBILE)
========================================= */

#menuOverlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(16px);
    padding: 1rem;
    padding-bottom: 5rem;
    display: flex;
    flex-direction: column;
    z-index: 20;
    justify-content: center;
    transition: transform 0.4s ease, opacity 0.3s ease;
    overflow: hidden; 
}

/* Estado cerrado */
#menuOverlay.hidden {
  transform: translateY(100%);
  pointer-events: none;
}

.hotspot {
  position: relative; 
  width: 1rem;
  height: 1rem;
  border-radius: 50%;
  border: 2px solid #fff;
  background: #000;
  cursor: pointer;
}

.hotspot::after {
  content: attr(data-label);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  padding: 4px 8px;
  border-radius: 4px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.hotspot:hover::after {
  opacity: 1;
}

/* =========================================
   LISTA MOBILE (vertical)
========================================= */

#poi-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  overflow-y: auto;  
  min-height: 0;
}

#poi-list li {
    position: relative;
    padding: 1rem;
    border: 1px solid #e6e8eb;
    font-size: 14px;
    cursor: pointer;
    font-weight: 600;
    color: #fff;
    transition: all 0.25s ease;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

#poi-list li .overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.35); /* opacidad overlay, ajustable */
  border-radius: inherit; /* mantiene el borde circular en desktop */
  z-index: 1;
}

#poi-list li span {
  position: relative;
  z-index: 2; /* texto encima del overlay */
  padding: 4px;
}


/* =========================================
   BOTÓN TOGGLE
========================================= */
.btn{
  padding: 12px 18px;
  border: none;
  background: #111;
  color: #fff;
  font-size: 14px;
  border-radius: 95px;
  cursor: pointer;
  z-index: 100;
  transition: opacity 0.2s ease;
}

#menuToggle, #homeButton, #callout {
  position: absolute;
  bottom: 1rem;
}

#menuToggle {
  right: 1rem;
}

#homeButton {
  left: 1rem;
}

#menuToggle:hover, #homeButton:hover{
  opacity: 0.85;
}



@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-6px); }
}

#callout {
  background: #ffffa3f7;
  color: #000000;
  padding: 10px 14px;
  bottom: 4.5rem;
  right: 1rem;

  animation: bob 1.5s ease-in-out infinite;
  pointer-events: none;
  user-select: none;
  transition: visibility 0s, opacity 0.2s ease;
}

#callout.hidden {
  opacity: 0;
  visibility: hidden;
}

#callout::after {
  content: "";
  position: absolute;
  bottom: -8px;   /* sale por abajo */
  right: 16px;    /* pegada a la derecha */
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-top: 8px solid #ffffa3f7; /* mismo color que el globo */
}
#infoBanner {
  position: fixed;
  top: 1rem;
  right: 1rem;
  max-width: 210px;
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(8px);
  color: #000;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-align: center;
  padding: 14px 24px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

#infoBanner.hidden {
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
}

#logo-pos {
  position: fixed;
  top: 1rem;
  left: 1rem;
  font-size: 9px;
  text-align: center;
}
.logo{
  max-width: 120px;
}

#menuOverlay .title{
  font-size: 1.5rem;
  text-align: center;
  margin: 1rem;
  color: #fff;
  text-transform: uppercase;

}


/*BARRA OVERFLOW*/

/* Estilizar el scrollbar de la lista de POIs */
#poi-list::-webkit-scrollbar {
  width: 6px; /* Barra fina para que sea elegante */
}

#poi-list::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05); /* Casi invisible */
  border-radius: 10px;
}

#poi-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2); /* Color sutil que combine con el texto */
  border-radius: 10px;
  border: 1px solid transparent; /* Pequeño respiro */
}

#poi-list::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.4); /* Se aclara al pasar el mouse */
}

/* Soporte para Firefox */
#poi-list {
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}


/* =========================================
   DESKTOP (>= 900px)
========================================= */


@media (min-width: 900px) { 
    #menuOverlay {
        inset: auto;
        top: 0;
        right: 0;
        bottom: 0;
        width: 19rem;
    }
    /* Grid 4x3 */
    #poi-list {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        justify-items: center;
    }
    
    /* Ítems circulares SOLO desktop */
    #poi-list li {
        width: 120px;
        height: 120px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        text-align: center;
        padding: 0;
        border: 2px solid #fff;
        transition: transform 0.25s ease,
        box-shadow 0.25s ease,
        border-color 0.25s ease;
    }
    
    #poi-list li:hover {
        transform: translateY(-4px);
        border-color: #ffffff;
        box-shadow: 0 5px 1.5rem rgba(0,0,0,0.5);  
    } 

    #poi-list li:hover .overlay{
        background: rgba(255, 255, 255, 0.2);
    }   
    #infoBanner {
      font-size: 24px;
      max-width: none;
    }

    #logo-pos {
      font-size: 1rem;
    }
    .logo {
      max-width: none;
      height: 4rem;
    }

    #infoBanner {
      right: 20rem;
      transition: right 0.4s ease;
    }
    
    body:has(#menuOverlay.hidden) #infoBanner {
      right: 1rem;
    }
}
