/**
 * Tech stack – content-only styles (wrapper is .bordered-section).
 */

.tstack-subheading-wrapper {
  font-size: clamp(var(--font-2xl), 2.5vw, var(--font-3xl));
  font-weight: 400;
  line-height: 1.6;
  margin: 0;
  padding-bottom: 15px;
  position: relative;
  z-index: 99;
}

.tstack-subheading-wrapper span {
  color: rgba(117, 117, 117, 1);
}

.tstack-grid-wrapper {
  width: 100%;
}

.tstack-grid-desktop {
  display: block;
}

.tstack-grid-tablet {
  display: none;
}

.tstack-grid-mobile {
  display: none;
}

.tstack-row {
  display: grid;
  width: 100%;
  margin: 0;
}

.tstack-grid-desktop .tstack-row {
  grid-template-columns: repeat(17, 1fr);
}

.tstack-grid-tablet .tstack-row {
  grid-template-columns: repeat(13, 1fr);
}

.tstack-grid-mobile .tstack-row {
  grid-template-columns: repeat(9, 1fr);
}

.tstack-logo-cell,
.tstack-empty-cell {
  grid-column: span 1;
  aspect-ratio: 1 / 1;
}

.tstack-logo-cell {
  padding: 0;
  cursor: pointer;
}

.tstack-logo {
  border-radius: 12px;
  background-color: #ffffff;
  border: 1px solid #f0f0f0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  position: relative;
}

.tstack-logo-inner {
  width: 55%;
  height: 55%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 2;
}

.tstack-logo-name {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 0.35em 0.5em;
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 500;
  text-align: center;
  opacity: 0;
  transform: translateY(4px);
  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
  border-radius: 0 0 12px 12px;
  z-index: 3;
  line-height: 1.2;
}

.tstack-logo-cell:hover .tstack-logo-name {
  opacity: 1;
  transform: translateY(0);
}

.tstack-logo-image {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

/* XL screens (1600px+): larger subheading and grid spacing */
@media (min-width: 1600px) {
  .tstack-subheading-wrapper {
    font-size: clamp(var(--font-2xl), 2.75vw, var(--font-4xl));
    padding-bottom: 18px;
  }

  .tstack-grid-desktop .tstack-row {
    gap: 0.5rem;
  }

  .tstack-logo {
    border-radius: 14px;
  }
}

@media (max-width: 1024px) {
  .tstack-subheading-wrapper {
    font-size: var(--font-2xl);
  }

  .tstack-grid-desktop {
    display: none;
  }

  .tstack-grid-tablet {
    display: block;
  }

  .tstack-logo-cell:hover .tstack-logo-name {
    display: none;
  }
}

@media (max-width: 768px) {
  .tstack-subheading-wrapper {
    font-size: var(--font-lg);
    line-height: 1.4;
  }

  .tstack-grid-desktop {
    display: none;
  }

  .tstack-grid-tablet {
    display: none;
  }

  .tstack-grid-mobile {
    display: block;
  }

  .tstack-logo {
    border-radius: 8px;
  }

  .tstack-logo-name {
    border-radius: 0 0 8px 8px;
  }

  .tstack-logo-inner {
    width: 60%;
    height: 60%;
  }

  .tstack-logo-cell:hover .tstack-logo-name {
    display: none;
  }
}
