/* === Tech Stack Section === */
#tech-stack {
  position: relative;
  padding: 0; /* Eliminamos el padding lateral para que el contenedor ocupe el 100% */
  margin: 10px auto;
  max-width: 1280px; /* Ajusta este valor si es necesario */
  width: 100%; /* Asegura que el contenedor tome el ancho disponible */
  box-sizing: border-box;
}

.tech-stack-title {
  font-family: 'Orbitron', sans-serif;
  color: #ffffff;
  font-size: 45px;
  text-align: center;
  text-shadow: 0 0 15px rgba(92, 232, 88, 0.9);
  
  /* Distancias solicitadas */
  margin-top: 80px;    /* "> Our Tech Stack" a 88px de arriba */
  margin-bottom: 30px; /* 58px arriba de la caja */
}

.tech-stack-content-box {
  background: rgba(13, 17, 23, 0.7);
  border: 1px solid rgba(0, 255, 65, 0.4);
  border-radius: 12px;
  padding: 0px 20px 30px 20px; /* 38px de padding superior interno */
  box-shadow: 0 0 10px rgba(0, 255, 65, 0.1);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  width: 100%; /* Fuerza el 100% del espacio */
  box-sizing: border-box;
  transition: all 0.3s ease; /* Añadido para una transición suave */
}

/* Efecto de brillo y cambio de borde al pasar el ratón */
.tech-stack-content-box:hover {
  border-color: #00BFFF; /* Borde cian */
  box-shadow: 0 5px 25px rgba(0, 255, 65, 0.3), 0 0 15px rgba(0, 204, 255, 0.3); /* Doble resplandor (verde y cian) */
}

.tech-stack-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* Fuerza 3 columnas iguales */
  gap: 20px;
  width: 100%;
}

.tech-category {
  position: relative;
  padding: 0px;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.tech-category-title {
  /* ... tus otros estilos ... */
  
  /* Ajusta estos valores */
  margin-bottom: 10px; /* Redúcelo de 25px a 10px para acercar las tarjetas */
  margin-top: 5px;       /* Asegúrate explícitamente de que no tenga margen superior */
  
  /* Mantén el resto */
  min-height: 3em; 
  display: flex;
  align-items: flex-end; 
  font-family: 'Orbitron', sans-serif;
  color: #00BFFF;
  font-size: 20px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  text-shadow: 0 0 8px rgba(0, 191, 255, 0.4);
  border-bottom: 1px solid rgba(0, 191, 255, 0.2);
  padding-bottom: 10px;
}

/* ... Mantén el resto de tus estilos para .tech-card y .tech-cards-container igual ... */

/* Simple circuit lines connecting categories */
.tech-category:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 50%;
  right: -10px; /* Ajustado al gap */
  transform: translateY(-50%);
  width: 1px;
  height: 60%;
  background: linear-gradient(to top, transparent, rgba(0, 191, 255, 0.3), transparent);
  transition: all 0.3s ease;
}

.tech-category-title {
  /* Altura fija para alinear todos los bordes inferiores */
  min-height: 3em; 
  display: flex;
  align-items: flex-end; 
  
  font-family: 'Orbitron', sans-serif;
  color: #00BFFF;
  font-size: 22px;
  margin-bottom: 25px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  text-shadow: 0 0 8px rgba(0, 191, 255, 0.4);
  border-bottom: 1px solid rgba(0, 191, 255, 0.2);
  padding-bottom: 10px;
}

.tech-cards-container {
    /* Cambiamos a flex para tener control total */
    display: flex;
    flex-wrap: wrap; /* Permite que salten a la siguiente línea si es necesario */
    gap: 15px;
    flex-grow: 1;
}

.tech-card {
    /* Definimos un tamaño fijo para que NUNCA cambien de tamaño */
    flex: 0 0 100px; /* No crece, no se encoge, ancho de 100px */
    width: 100px;
    height: 100px; /* O el alto que prefieras para que sean cuadrados uniformes */
    
    position: relative;
    background-color: rgba(10, 15, 25, 0.8);
    background-image: linear-gradient(45deg, rgba(255,255,255,0.02) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.02) 50%, rgba(255,255,255,0.02) 75%, transparent 75%, transparent);
    background-size: 8px 8px;
    border: 2px solid transparent; 
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    box-sizing: border-box;
}

.tech-card:hover {
  transform: none; /* Quitamos el translateY para que no se salga de su contenedor */
  border-color: #ffc800; /* Borde amarillo interno */
  box-shadow: inset 0 0 10px rgba(255, 200, 0, 0.3); /* Sombra hacia adentro */
}

/* Connecting line hover effect */
.tech-category:has(.tech-card:hover)::after {
  background: linear-gradient(to top, transparent, #ffc800, transparent);
  box-shadow: 0 0 10px #ffc800;
}

.tech-card-logo {
  width: 50px;
  height: 50px;
  margin: 0 auto 10px;
  object-fit: contain;
  transition: transform 0.3s ease, filter 0.3s ease;
  filter: grayscale(50%) brightness(0.8);
}

.tech-card:hover .tech-card-logo {
  transform: scale(1.1);
  filter: grayscale(0%) brightness(1.1) drop-shadow(0 0 8px rgba(255, 200, 0, 0.7));
}

.tech-card-name {
  font-family: 'JetBrains Mono', 'Andale Mono', monospace;
  color: #e0e0e0;
  font-size: 14px;
  margin: 0;
}

.tech-card-version {
  display: block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: #00BFFF;
  margin-top: 5px;
  opacity: 0.8;
}

/* ================================================================
   MOBILE RESPONSIVE — Tech Stack Section
   ================================================================ */
@media (max-width: 1024px) {
  .tech-stack-grid {
    grid-template-columns: repeat(2, 1fr); /* 2 columnas en tablet */
  }

  .tech-stack-title {
    font-size: 35px;
    margin-top: 50px;
    margin-bottom: 20px;
  }
}

@media (max-width: 768px) {
  .tech-stack-grid {
    grid-template-columns: 1fr; /* 1 columna en móvil */
  }

  .tech-stack-title {
    font-size: 26px;
    margin-top: 40px;
    margin-bottom: 16px;
  }

  .tech-stack-content-box {
    padding: 0 12px 20px 12px;
  }

  .tech-category-title {
    font-size: 18px;
  }

  .tech-card {
    flex: 0 0 80px;
    width: 80px;
    height: 80px;
    padding: 10px;
  }

  .tech-card-logo {
    width: 40px;
    height: 40px;
  }

  .tech-card-name {
    font-size: 11px;
  }
}

@media (max-width: 600px) {
  .tech-stack-title {
    font-size: 22px;
  }

  /* Tarjetas un poco más pequeñas en pantallas muy estrechas */
  .tech-card {
    flex: 0 0 70px;
    width: 70px;
    height: 70px;
    padding: 8px;
  }

  .tech-card-logo {
    width: 34px;
    height: 34px;
    margin-bottom: 6px;
  }

  .tech-card-name {
    font-size: 10px;
  }
}

/* * {
    outline: 1px solid red !important;
} */