:root {
  --team-teal: #3e8b91;
  --team-gold: #ffac00;
  --team-ink: #232323;
  --team-muted: #686868;
}

.team-carousel {
  width: min(100%, 1210px);
  margin: 0 auto;
  color: var(--team-ink);
}

.team-carousel__viewport {
  overflow: hidden;
  border-radius: 8px;
  outline: none;
}

.team-carousel__viewport:focus-visible {
  outline: 3px solid rgb(62 139 145 / 35%);
  outline-offset: 5px;
}

.team-carousel__track {
  position: relative;
  display: flex;
  width: 100%;
  gap: 18px;
  transition: transform 420ms cubic-bezier(0.2, 0.7, 0.2, 1);
  will-change: transform;
}

.team-carousel__slide {
  min-width: 0;
  flex: 0 0 calc((100% - 36px) / 3);
}

.team-card {
  height: 100%;
  overflow: hidden;
  border: 1px solid #e8eceb;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 28px rgb(35 35 35 / 6%);
}

/* Wraps the photo + content when the member has a profile page
   (permalink). Keeps the card fully clickable without changing
   its visual appearance. */
.team-card__link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.team-card__photo {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  object-position: center top;
  background: #e7f0ef;
}

.team-card__content {
  min-height: 118px;
  padding: 18px 22px 20px;
}

.team-card__category {
  margin: 0 0 8px;
  color: var(--team-teal);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.4;
  text-transform: uppercase;
}

.team-card__name {
  margin: 0;
  color: var(--team-ink);
  font-size: 19px;
  font-weight: 700;
  line-height: 1.35;
}

.team-card__accent {
  display: block;
  width: 39px;
  height: 3px;
  margin-top: 16px;
  border-radius: 2px;
  background: var(--team-gold);
}

.team-carousel__controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 18px;
}

.team-carousel__button {
  display: grid;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  place-items: center;
  padding: 0;
  border: 1px solid #dce4e3;
  border-radius: 50%;
  background: #fff;
  color: var(--team-teal);
  font: inherit;
  font-size: 23px;
  line-height: 1;
  cursor: pointer;
  transition: background 180ms ease, color 180ms ease, border-color 180ms ease;
}

.team-carousel__button:hover:not(:disabled),
.team-carousel__button:focus-visible {
  border-color: var(--team-teal);
  background: var(--team-teal);
  color: #fff;
}

.team-carousel__button:focus-visible {
  outline: 3px solid rgb(62 139 145 / 25%);
  outline-offset: 3px;
}

.team-carousel__button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.team-carousel__empty {
  padding: 32px;
  color: var(--team-muted);
  text-align: center;
}

@media (max-width: 900px) {
  .team-carousel__slide {
    flex-basis: calc((100% - 18px) / 2);
  }
}

@media (max-width: 560px) {
  .team-carousel__slide {
    flex-basis: 100%;
  }

  .team-card__photo {
    aspect-ratio: 1.08 / 1;
  }

  .team-card__content {
    min-height: 0;
    padding: 16px 18px 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .team-carousel__track {
    transition-duration: 0.01ms !important;
  }
}