/* Estilos para la sección Stack - Principio Single Responsibility */
/* Variables CSS para la sección Stack */
:root {
  --stack-bg: transparent;
  --stack-text: #ffffff;
  --stack-accent: #fbbf24;
  --stack-hover-shadow: rgba(251, 191, 36, 0.3);
  --stack-item-bg: rgba(255, 255, 255, 0.08);
  --stack-item-border: rgba(255, 255, 255, 0.15);
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Contenedor principal de la sección Stack */
.seccion-stack {
  margin: 40px auto;
  padding: 60px 20px;
  text-align: center;
  position: relative;
  max-width: 1200px;
}

/* Título de la sección */
.seccion-stack h1 {
  color: var(--stack-text);
  font-size: 2.5rem;
  margin-bottom: 3rem;
  font-weight: 700;
  letter-spacing: -0.025em;
}

/* Contenedor principal del stack */
.stack-container {
  max-width: 800px;
  margin: 0 auto;
  position: relative;
}

/* Etiqueta destacada removida según solicitud del usuario */

/* Grid de tecnologías */
.tech-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
  gap: 2.8rem;
  justify-items: center;
  align-items: center;
  max-width: 800px;
  margin: 0 auto;
  justify-content: center;
}

/* Elementos individuales de tecnología */
.tech-item {
  width: 80px;
  height: 80px;
  background: var(--stack-item-bg);
  border: 1px solid var(--stack-item-border);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-smooth);
  position: relative;
}

/* Íconos dentro de los elementos */
.tech-item .tech-icon {
  width: 50px;
  height: 50px;
  object-fit: contain;
  object-position: center;
  transition: var(--transition-smooth);
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
  /* Asegurar que todos los iconos tengan el mismo tamaño visual */
  max-width: 50px;
  max-height: 50px;
}

/* Efecto hover para elementos de tecnología */
.tech-item:hover {
  transform: translateY(-4px) scale(1.05);
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 
    0 10px 25px rgba(0, 0, 0, 0.2),
    0 0 20px var(--stack-hover-shadow);
}

.tech-item:hover .tech-icon {
  transform: scale(1.1);
}

/* Elemento destacado removido según solicitud del usuario */

/* Tooltip para mostrar nombre de tecnología */
.tech-item::after {
  content: attr(data-tech);
  position: absolute;
  bottom: -45px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.9);
  color: white;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 500;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition-smooth);
  pointer-events: none;
  z-index: 10;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.tech-item:hover::after {
  opacity: 1;
  visibility: visible;
  bottom: -40px;
}

/* Responsive Design */
@media (max-width: 768px) {
  .seccion-stack {
    margin: 20px 10px;
    padding: 40px 15px;
  }
  
  .seccion-stack h1 {
    font-size: 2rem;
    margin-bottom: 2rem;
  }
  
  .tech-grid {
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 1.5rem;
    max-width: 500px;
  }
  
  .tech-item {
    width: 80px;
    height: 80px;
  }
  
  .tech-item .tech-icon {
    width: 45px;
    height: 45px;
  }
}

@media (max-width: 480px) {
  .seccion-stack {
    margin: 15px 5px;
  }
  
  .tech-grid {
    grid-template-columns: repeat(4, 1fr);
    max-width: 350px;
    gap: 1.2rem;
  }
  
  .tech-item {
    width: 70px;
    height: 70px;
  }
  
  .tech-item .tech-icon {
    width: 38px;
    height: 38px;
  }
}

/* Animación de entrada para los elementos */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.tech-item {
  animation: fadeInUp 0.6s ease-out;
  animation-fill-mode: both;
}

/* Retrasos escalonados para la animación */
.tech-item:nth-child(1) { animation-delay: 0.1s; }
.tech-item:nth-child(2) { animation-delay: 0.2s; }
.tech-item:nth-child(3) { animation-delay: 0.3s; }
.tech-item:nth-child(4) { animation-delay: 0.4s; }
.tech-item:nth-child(5) { animation-delay: 0.5s; }
.tech-item:nth-child(6) { animation-delay: 0.6s; }
.tech-item:nth-child(7) { animation-delay: 0.7s; }
.tech-item:nth-child(8) { animation-delay: 0.8s; }
.tech-item:nth-child(9) { animation-delay: 0.9s; }
.tech-item:nth-child(10) { animation-delay: 1.0s; }
.tech-item:nth-child(11) { animation-delay: 1.1s; }
.tech-item:nth-child(12) { animation-delay: 1.2s; }

/* Contenedor del stack sin efectos de fondo */
.stack-container {
  position: relative;
}
