/* Reset básico */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Fondo general */
body {
  font-family: 'Poppins', sans-serif;
  background: linear-gradient(135deg, #0f0f0f, #1a1a1a);
  color: #ffffff;
  min-height: 100vh;
  display: flex;
  flex-direction: row; /* Mantener row para escritorio por defecto */
}

/* Barra lateral */
.sidebar {
  width: 250px;
  background: #181818;
  padding: 30px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  border-right: 2px solid #f4c542;
  height: 100vh; /* Asegurar que ocupe toda la altura en desktop */
  position: sticky; /* Mantenerla visible al hacer scroll */
  top: 0;
}

.sidebar h2 {
  color: #f4c542;
  font-size: 24px;
  margin-bottom: 20px;
}

.sidebar a {
  text-decoration: none;
  color: #fff;
  font-size: 18px;
  padding: 10px;
  width: 100%;
  background: #252525;
  border-radius: 10px;
  text-align: center;
  transition: background 0.3s;
}

.sidebar a:hover {
  background: #f4c542;
  color: #181818;
}

/* Contenido dinámico */
.content {
  flex: 1;
  padding: 40px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start; /* Cambio a flex-start para mejor alineación */
  align-items: center;
  text-align: center;
  overflow-y: auto; /* Permitir scroll en el contenido */
  max-height: 100vh; /* Limitar altura para permitir scroll */
}

/* Títulos adaptables */
.content h1 {
  font-size: 2.2rem;
  margin-bottom: 20px;
}

.content p {
  font-size: 1.1rem;
  max-width: 600px;
  margin-bottom: 25px;
}

/* Formularios */
form {
  display: flex;
  flex-direction: column;
  gap: 15px;
  width: 100%;
  max-width: 500px;
}

input, textarea, button {
  padding: 12px 15px;
  border: none;
  border-radius: 10px;
  font-size: 16px;
}

input, textarea {
  background: #252525;
  color: #fff;
}

textarea {
  min-height: 120px; /* Altura mínima para mejor usabilidad en móviles */
}

button {
  background: #f4c542;
  color: #181818;
  cursor: pointer;
  font-weight: bold;
  transition: background 0.3s;
}

button:hover {
  background: #ffd700;
}

/* Botón especial */
.button {
  display: inline-block;
  padding: 15px 25px;
  background: #f4c542;
  color: #181818;
  border-radius: 12px;
  font-weight: bold;
  font-size: 18px;
  margin-top: 20px;
  text-decoration: none;
  transition: background 0.3s;
}

.button:hover {
  background: #ffd700;
}

/* Estilos para la sección ¿Quiénes somos? */
#quienes {
  padding: 50px 20px;
  background-color: #121212;
  color: #fff;
  text-align: center;
}

#quienes h2 {
  font-size: 2.5rem;
  color: #f4c542;
  margin-bottom: 20px;
}

#quienes p {
  font-size: 1.1rem;
  color: #ccc;
  max-width: 800px;
  margin: 0 auto 40px;
}

.team-member {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 40px;
  background-color: #1c1c1c;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  overflow: hidden;
  padding: 20px;
  transition: transform 0.3s ease-in-out;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.team-member:hover {
  transform: scale(1.05);
}

.team-member-img {
  flex: 0 0 150px;
  height: 150px;
  border-radius: 50%;
  overflow: hidden;
  border: 4px solid #f4c542;
}

.team-member-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.team-member-info {
  flex: 1;
  margin-left: 20px;
  text-align: left;
}

.team-member-info h3 {
  font-size: 1.8rem;
  color: #fff;
  margin-bottom: 5px;
}

.team-member-info p:first-of-type {
  font-size: 1.2rem;
  color: #f4c542;
  margin-bottom: 10px;
}

.team-member-info p:last-of-type {
  font-size: 1rem;
  color: #bbb;
  line-height: 1.5;
}

.team-member.reverse {
  flex-direction: row-reverse;
}

.team-member.reverse .team-member-info {
  margin-left: 0;
  margin-right: 20px;
  text-align: right;
}

/* Imagen Pixi flotante y tooltip */
.pixi-container {
  position: fixed;
  bottom: 10px;
  right: 10px;
  width: 300px; /* Ligeramente más pequeño para no obstaculizar */
  height: auto;
  z-index: 1000;
  cursor: pointer;
  animation: float 3s ease-in-out infinite;
  /* Evitar que interfiera con el contenido */
  pointer-events: none; /* Desactivar interacción hasta que se necesite */
}

.pixi-container:hover {
  pointer-events: auto; /* Activar interacción al pasar el mouse */
}

.pixi-container img {
  pointer-events: auto; /* Asegurar que la imagen sea clickeable */
}

.pixi-container img {
  width: 100%;
  height: auto;
  display: block;
}

@keyframes float {
  0% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
  100% {
    transform: translateY(0);
  }
}

.pixi-container .tooltip {
  visibility: hidden;
  background-color: #f4c542;
  color: #121212;
  text-align: center;
  border-radius: 8px;
  padding: 8px 12px;
  position: absolute;
  bottom: 100%;
  right: 20px;
  margin-bottom: 10px;
  font-size: 1rem;
  white-space: nowrap;
  box-shadow: 0px 2px 10px rgba(0,0,0,0.5);
  opacity: 0;
  transition: opacity 0.3s;
  font-weight: bold;
}

.pixi-container:hover .tooltip {
  visibility: visible;
  opacity: 1;
}

/* ADAPTACIONES PARA MÓVILES */
@media (max-width: 992px) {
  .team-member-img {
    flex: 0 0 120px;
    height: 120px;
  }
  
  .team-member-info h3 {
    font-size: 1.5rem;
  }

  .pixi-container {
    width: 250px; /* Reducir tamaño en tabletas */
  }
  
  /* Mantener el sidebar y estructura en tabletas */
  body {
    flex-direction: row;
  }
}

@media (max-width: 768px) {
  body {
    flex-direction: column;
  }
  
  .sidebar {
    width: 100%;
    padding: 20px;
    border-right: none;
    border-bottom: 2px solid #f4c542;
    height: auto; /* Altura automática en móviles */
    position: static; /* Eliminar posición sticky en móviles */
  }
  
  .content {
    padding: 30px 20px;
    max-height: none; /* Eliminar restricción de altura en móviles */
  }
  
  .content h1 {
    font-size: 1.8rem;
  }
  
  .content p {
    font-size: 1rem;
  }
  
  .button {
    padding: 12px 20px;
    font-size: 16px;
  }
  
  .team-member, .team-member.reverse {
    flex-direction: column;
    text-align: center;
    padding: 15px;
  }
  
  .team-member-info, .team-member.reverse .team-member-info {
    margin: 15px 0 0 0;
    text-align: center;
  }
  
  .team-member-img {
    flex: 0 0 100px;
    height: 100px;
  }
  
  .team-member-info h3 {
    font-size: 1.4rem;
  }
  
  .team-member-info p:first-of-type {
    font-size: 1.1rem;
  }
  
  .team-member-info p:last-of-type {
    font-size: 0.9rem;
  }
  
  #quienes h2 {
    font-size: 2rem;
  }
  
  /* Ocultar o reducir Pixi en móviles */
  .pixi-container {
    width: 180px;
    bottom: 5px;
    right: 5px;
  }
  
  .pixi-container .tooltip {
    white-space: normal;
    max-width: 200px;
    font-size: 0.9rem;
    padding: 6px 10px;
  }
}

@media (max-width: 480px) {
  .sidebar h2 {
    font-size: 20px;
    margin-bottom: 15px;
  }
  
  .sidebar a {
    font-size: 16px;
    padding: 8px;
  }
  
  .content {
    padding: 20px 15px;
  }
  
  .content h1 {
    font-size: 1.6rem;
  }
  
  input, textarea, button {
    padding: 10px 12px;
    font-size: 14px;
  }
  
  .button {
    padding: 10px 15px;
    font-size: 14px;
  }
  
  /* Pixi más pequeño para móviles pequeños */
  .pixi-container {
    width: 100px;
  }
  
  /* Ajustar dimensiones de miembros del equipo */
  .team-member-img {
    flex: 0 0 80px;
    height: 80px;
    border-width: 3px;
  }
  
  .team-member-info h3 {
    font-size: 1.2rem;
  }

  /* Ajustes para iframe de pixelview.html */
  .iframe-container {
    height: calc(100vh - 50px);
  }
  
  .header {
    padding: 10px 15px;
  }
  
  .header h1 {
    font-size: 20px;
  }
  
  .back-button {
    padding: 6px 12px;
    font-size: 14px;
  }
}
