.sponsor-list {
  display: flex;
  flex-wrap: wrap;
}

.sponsor-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  width: 100%;
  padding: 4px;
  box-shadow: 0 8px 16px rgba(0,0,0,0.1);
}

.sponsor-card:has(img) {
  position: relative;
}

.sponsor-card:has(img) .sponsor-name {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
}

.sponsor-link {
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: #333;
  width: 100%;
  height: 100%;
}

.sponsor-img {
  max-width: 100%;
  object-fit: contain;
  object-position: center;
}

@media screen and (max-width: 1023px) {
  .sponsor-list {
    gap: 8px;
  }

  .sponsor-item {
    width: calc((100% - 16px) / 2); /* gap8px × 2 = 16px */
  }

  .sponsor-card {
    height: 150px;
    max-height: 150px;
  }

  .sponsor-link {
    max-height: 150px;
  }

  .sponsor-img {
    max-height: 100px;
  }
}

@media screen and (min-width: 1024px) {
  .sponsor-list {
    gap: 25px;
  }

  .sponsor-item {
    width: calc((100% - 50px) / 3); /* gap25px × 2 = 50px */
  }

  .sponsor-card {
    height: 250px;
    max-height: 250px;
  }

  .sponsor-link {
    max-height: 250px;
  }

  .sponsor-img {
    max-height: 200px;
  }
}