/* ============================================
   Our Team page: team members photo slider (Oct 2026)
   Content comes from Admin → Team Members.
   ============================================ */

.team-slider-section {
  padding: 10px 0 70px;
}

.team-slider {
  position: relative;
}

.team-track {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  padding: 8px 0 16px;
  outline: none;
  position: relative;
}

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

.team-card {
  flex: 0 0 calc((100% - 3 * 24px) / 4);
  scroll-snap-align: center;
  background: var(--white);
  border: 1px solid rgba(0, 32, 91, 0.08);
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(0, 32, 91, 0.08);
  padding: 12px 12px 18px;
  cursor: default;
  transition: box-shadow 0.3s ease;
}

.team-slider.is-single .team-track {
  justify-content: center;
}

.team-card[data-has-bio] {
  cursor: pointer;
}

.team-card:hover,
.team-card:focus-visible {
  box-shadow: 0 14px 32px rgba(0, 32, 91, 0.16);
}

.team-card:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

.team-photo {
  position: relative;
  aspect-ratio: 1 / 1.05;
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg-soft);
}

.team-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
  transition: transform 0.5s ease;
}

.team-card:hover .team-photo img {
  transform: scale(1.04);
}

/* Hover text */
.team-hover {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  padding: 20px;
  background: rgba(0, 32, 91, 0.9);
  color: var(--white);
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.35s ease, transform 0.35s ease;
  overflow-y: auto;
}

.team-hover p {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.6;
}

.team-card:hover .team-hover,
.team-card:focus-visible .team-hover,
.team-card.is-open .team-hover {
  opacity: 1;
  transform: none;
}

.team-name {
  margin: 16px 4px 4px;
  font-family: "Montserrat", sans-serif;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--navy);
  line-height: 1.3;
}

.team-qual {
  margin: 0 4px;
  font-size: 0.9rem;
  font-style: italic;
  color: #d98a0b;
}

/* Arrows */
.team-slider-arrow {
  position: absolute;
  top: calc(50% - 30px);
  z-index: 2;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 0;
  background: var(--navy);
  color: var(--white);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 16px rgba(0, 32, 91, 0.25);
  cursor: pointer;
  transition: background 0.25s ease, transform 0.25s ease;
}

.team-slider-arrow:hover {
  background: var(--gold);
  color: var(--navy);
}

.team-slider-arrow:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

.team-slider-prev {
  left: 6px;
}

.team-slider-next {
  right: 6px;
}

/* wide screens have room beside the cards */
@media (min-width: 1680px) {
  .team-slider-prev {
    left: -24px;
  }

  .team-slider-next {
    right: -24px;
  }
}

.team-slider.is-static .team-slider-arrow {
  display: none;
}

/* Responsive: cards per view */
@media (max-width: 1199.98px) {
  .team-card {
    flex-basis: calc((100% - 2 * 24px) / 3);
  }
}

@media (max-width: 991.98px) {
  .team-track {
    gap: 18px;
  }

  .team-card {
    flex-basis: calc((100% - 18px) / 2);
  }
}

@media (max-width: 575.98px) {
  .team-slider-section {
    padding-bottom: 50px;
  }

  .team-track {
    gap: 14px;
  }

  /* one card plus a peek of the next, so it is clear you can swipe */
  .team-card {
    flex-basis: 82%;
  }

  .team-slider-arrow {
    width: 40px;
    height: 40px;
  }

  .team-name {
    font-size: 1.12rem;
  }
}
