/* Integrations hover effects */
/* Make sure parent containers allow overflow */
.tech-stack-card {
  overflow: visible;
}

.tech-stack {
  overflow: visible;
}

.tech-stack li {
  position: relative;
  overflow: visible;
}

.tech-stack li a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  text-decoration: none;
}

.tech-stack li .popup-text {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(-5px);
  background: var(--surface-alt);
  color: var(--text);
  padding: 1rem;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  width: 300px;
  font-size: 0.9rem;
  line-height: 1.5;
  text-align: left;
  z-index: 100;
  border: 1px solid var(--card-border);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
  pointer-events: none;
}

.tech-stack li .popup-text::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border-width: 8px;
  border-style: solid;
  border-color: var(--surface-alt) transparent transparent transparent;
}

.tech-stack li:hover .popup-text {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(-15px);
}

/* Ensure popups don't get cut off at the edges */
.tech-stack li:first-child .popup-text,
.tech-stack li:nth-child(2) .popup-text {
  left: 0;
  transform: translateX(0) translateY(-5px);
}

.tech-stack li:first-child:hover .popup-text,
.tech-stack li:nth-child(2):hover .popup-text {
  transform: translateX(0) translateY(-15px);
}

.tech-stack li:first-child .popup-text::after,
.tech-stack li:nth-child(2) .popup-text::after {
  left: 20%;
}

.tech-stack li:last-child .popup-text,
.tech-stack li:nth-last-child(2) .popup-text {
  left: auto;
  right: 0;
  transform: translateX(0) translateY(-5px);
}

.tech-stack li:last-child:hover .popup-text,
.tech-stack li:nth-last-child(2):hover .popup-text {
  transform: translateX(0) translateY(-15px);
}

.tech-stack li:last-child .popup-text::after,
.tech-stack li:nth-last-child(2) .popup-text::after {
  left: 80%;
}

/* Mobile adjustments */
@media (max-width: 600px) {
  .tech-stack li .popup-text {
    width: 200px;
    font-size: 0.8rem;
    padding: 0.8rem;
  }
}
