/* Team section — horizontal scroll carousel */

.team-carousel {
  position: relative;
  margin-top: 3rem;
}

.team-carousel__nav {
  position: absolute;
  top: 40%;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid #e2e8f0;
  border-radius: 9999px;
  background: #fff;
  color: #1e2952;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.12);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, opacity 0.15s ease;
}

.team-carousel__nav:hover:not(:disabled) {
  background: #00d1ff;
  color: #1e2952;
}

.team-carousel__nav:disabled {
  opacity: 0.35;
  cursor: default;
}

.team-carousel__nav--prev {
  left: 0.25rem;
}

.team-carousel__nav--next {
  right: 0.25rem;
}

.team-carousel__track {
  display: flex;
  flex-wrap: nowrap;
  align-items: flex-start;
  gap: 1.5rem;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 0.25rem 0 0.5rem;
}

.team-carousel__track::-webkit-scrollbar {
  display: none;
}

.team-carousel__track > li {
  flex: 0 0 min(100%, 22rem);
  scroll-snap-align: start;
  min-width: 0;
}

.team-carousel__track > li:last-child {
  scroll-snap-align: end;
}

.team-carousel__card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 0.75rem;
  background: #f1f5f9;
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.team-carousel__card:hover {
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.12);
  transform: translateY(-2px);
}

.team-carousel__card:focus-visible {
  outline: 2px solid #00d1ff;
  outline-offset: 3px;
}

.team-carousel__card img {
  display: block;
  width: 100%;
  /* height comes from Tailwind: h-72 sm:h-80 */
}

@media (min-width: 640px) {
  .team-carousel__track > li {
    flex-basis: calc(50% - 0.75rem);
  }
}

@media (min-width: 1024px) {
  .team-carousel__track > li {
    flex-basis: calc((100% - 3rem) / 3);
  }
}

@media (max-width: 639px) {
  .team-carousel__nav {
    display: none;
  }
}
