/* ======================== MODELO 3D ======================== */
#model-container {
  width: 900px;
  height: 60vh;
  margin: 0 auto;
  position: relative;                                       /* Necesario para el botón cerrar */
  background: transparent;
  cursor: pointer;
  border: 3px solid rgba(200, 224, 135, 0.6);
  overflow: hidden;                                         /* evita que el canvas sobresalga */

  border-radius: 10px;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.3);
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

#model-container:hover {
  transform: scale(1.02);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.4);

}

#model-container.expanded {
  touch-action: none;                                       /* le dice al navegador que no haga gestos de pan/scroll/zoom nativos aquí */
  pointer-events: auto;                                     /* aseguramos que el contenedor siga recibiendo eventos */
  z-index: 20;
}

#close-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(0, 0, 0, 0.6);
  color: white;
  font-size: 1.5rem;
  font-weight: bold;
  border-radius: 50%;
  padding: 0.3rem 0.6rem;
  cursor: pointer;
  user-select: none;                                        /* No seleccionable */
  transition: background 0.2s;
  z-index: 10;
}

#close-btn:hover {
  background: rgba(255, 0, 0, 0.8);
}

.panel-2 {
  flex-direction: column;                                   /* Elementos uno encima del otro */
  padding: 1rem;
  overflow: hidden;                                         /* Nada sobresale */
}

.panel-2 h1 {
  will-change: transform, opacity;

  font-weight: 700;
  color: #fff;                                            /* por si el navegador no puede mostrar un degradado */
  background: linear-gradient(90deg, #fff, #c8e087);
  -webkit-background-clip: text;                            /* Recorta el fondo del elemento para que sólo se vea dentro de las letras */
  -webkit-text-fill-color: transparent;                     /* Hace el texto transparente, pero no invisible, porque ahora el color real es el background */
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.btn-sec2 {
  margin-top: 1rem;                                         /* lo separa del modelo */
  display: inline-block;
  position: relative;                                       /* asegura que no quede bajo el canvas */
  font-weight: 600;
  transition: background 0.3s, transform 0.2s;
}

.btn-sec2:hover {
  background: rgba(255, 255, 255, 0.25);
}


/* "Toca para interactuar" */
#model-hint {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 500;
  font-family: "Poppins", sans-serif;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(6px);                               /* Efecto vidrio */
  padding: 6px 12px;
  border-radius: 20px;
  animation: pulse 3s infinite;                             /* Animación de latido */
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
  pointer-events: none;
  opacity: 0;
  z-index: 10;
}

@keyframes pulse {
  0% { transform: translate(-50%, -50%) scale(1); opacity: 0.8; }
  50% { transform: translate(-50%, -50%) scale(1.1); opacity: 1; }
  100% { transform: translate(-50%, -50%) scale(1); opacity: 0.8; }
}

@media (min-width: 769px) and (max-width: 1024px) {
  #model-container {
    width: 80vw;
    height: 60vh;
    max-width: 900px;
  }
  #sec2 .btn-sec2 {
    font-size: clamp(1rem, 3vw, 2.5rem);
    padding: 0.8rem 1.2rem;
    margin-top: 25px;
  }
  #model-hint {
    font-size: clamp(0.5rem, 2.5vw, 2rem);
  }
}

@media (max-width: 768px) {
  #model-container {
    width: 94vw;
    height: 65vh;
    min-height: 240px;
  }
  .panel-2 h1 {
    font-size: 3rem;
  }
  #sec2 .btn-sec2 {
    font-size: clamp(1rem, 3vw, 2.5rem);
    padding: 0.8rem 1.2rem;
    margin-top: 20px;
  }
  #model-hint {
    font-size: clamp(0.5rem, 2.5vw, 2rem);
  }
}

@media (max-width: 430px) {
  #model-container {
    width: 94vw;
    height: 65vh;
    min-height: 240px;
  }
  .panel-2 h1 {
    font-size: 3rem;
  }
  #sec2 .btn-sec2 {
    font-size: clamp(1rem, 3vw, 2.5rem);
    padding: 0.8rem 1.2rem;
    margin-top: 20px;
  }
  #model-hint {
    font-size: clamp(0.9rem, 2.9vw, 2.4rem);
  }

}
