/* Team page: desktop grid + mobile coaches carousel */
.team-page {
  --team-card-radius: clamp(1rem, 4vw, 1.3rem);
  min-height: 100vh;
  padding: clamp(2rem, 7vw, 4rem) 0;
  background: var(--gradient-hero), url('/images/Banner_background_main.svg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-blend-mode: overlay;
  background-attachment: fixed;
  color: #fff;
}

.team-page-header {
  margin-bottom: clamp(1.25rem, 5vw, 2.5rem);
}

.team-page .section-header h1 {
  font-family: var(--font-hero);
  color: #fff;
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 1.1;
  margin-bottom: clamp(0.35rem, 1.5vw, 0.65rem);
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.team-page .section-subtitle {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.1rem;
}

.team-card {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: var(--team-card-radius);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: clamp(16rem, 60vw, 20rem);
}

.team-card-media {
  aspect-ratio: 4 / 3;
  width: 100%;
  display: grid;
  place-items: center;
  border-top-left-radius: var(--team-card-radius);
  border-top-right-radius: var(--team-card-radius);
  overflow: hidden;
  background: linear-gradient(135deg, #e9b48a 0%, #f2c9a9 100%);
  color: rgba(103, 75, 56, 0.74);
}

.team-card-media i {
  font-size: clamp(3rem, 14vw, 4.2rem);
}

.team-card-body {
  padding: clamp(0.75rem, 2.8vw, 1rem);
  text-align: center;
  border-bottom-left-radius: var(--team-card-radius);
  border-bottom-right-radius: var(--team-card-radius);
  overflow: hidden;
  /* Glass lower panel, matching Instagram card feel. */
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid rgba(255, 255, 255, 0.24);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.team-card-name {
  margin: 0;
  color: #fff;
  font-family: var(--font-joe);
  font-size: clamp(1.1rem, 4.8vw, 1.55rem);
  line-height: 1.2;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.28);
}

.team-card-role {
  margin: clamp(0.2rem, 1.2vw, 0.3rem) 0 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: clamp(0.75rem, 3vw, 0.9rem);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

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

.team-mobile-layout {
  --team-mobile-side-space: clamp(1.8rem, 8vw, 2.8rem);
  --team-slide-width: 100%;
  display: block;
}

.team-mobile-carousel-wrapper {
  position: relative;
  padding: 0 var(--team-mobile-side-space);
}

.team-mobile-carousel {
  overflow: hidden;
  touch-action: pan-y;
  border-radius: var(--team-card-radius);
  /* Corner clipping handled per-slide via overflow+translateZ(0) — no mask needed. */
}

.team-mobile-track {
  display: flex;
  gap: 0;
  transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  will-change: transform;
}

.team-mobile-slide {
  flex: 0 0 var(--team-slide-width);
  max-width: var(--team-slide-width);
  border-radius: var(--team-card-radius);
  overflow: hidden;
  transform: translateZ(0);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.team-carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: clamp(2.75rem, 11vw, 3.2rem);
  height: clamp(2.75rem, 11vw, 3.2rem);
  min-width: 44px;
  min-height: 44px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: rgba(255, 255, 255, 0.78);
  font-size: clamp(1.25rem, 5vw, 1.6rem);
  cursor: pointer;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.25s ease, color 0.25s ease;
}

.team-carousel-arrow:hover {
  color: #fff;
  transform: translateY(-50%) scale(1.08);
}

.team-carousel-arrow:focus-visible {
  outline: 3px solid #ffc76b;
  outline-offset: 3px;
}

.team-carousel-arrow-prev {
  left: 0;
}

.team-carousel-arrow-next {
  right: 0;
}

.team-carousel-indicators {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: clamp(0.35rem, 1.5vw, 0.5rem);
  margin-top: clamp(1rem, 4vw, 1.25rem);
}

.team-carousel-dot {
  width: clamp(2rem, 10vw, 2.8rem);
  height: clamp(0.2rem, 0.8vw, 0.28rem);
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.35);
  cursor: pointer;
  transition: background-color 0.25s ease, box-shadow 0.25s ease;
}

.team-carousel-dot.active {
  background: #fff;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.4);
}

.team-carousel-dot:focus-visible {
  outline: 2px solid #ffc76b;
  outline-offset: 3px;
}

.team-mobile-admin-card {
  width: calc(100% - (2 * var(--team-mobile-side-space)));
  max-width: none;
  margin: clamp(1.4rem, 6vw, 2rem) auto 0;
}

@media (max-width: 768px) {
  .team-mobile-layout {
    --team-mobile-side-space: 50px;
    --team-slide-width: 100%;
  }

  .team-carousel-arrow {
    width: 44px;
    height: 44px;
  }
}

@media (max-width: 1024px) {
  .team-page {
    background: none;
    background-attachment: scroll;
  }
}

@media (max-width: 480px) {
  .team-mobile-layout {
    --team-mobile-side-space: 40px;
  }

  .team-carousel-arrow {
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }
}

@media (min-width: 769px) {
  .team-mobile-layout {
    display: none;
  }

  .team-desktop-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(1rem, 2.2vw, 1.5rem);
    align-items: start;
  }

  .team-desktop-grid .team-card {
    min-height: clamp(18rem, 30vw, 22rem);
  }

  .team-desktop-grid .team-card:nth-child(4) {
    grid-column: 1;
  }
}

@media (max-width: 375px) {
  .team-mobile-layout {
    --team-mobile-side-space: 34px;
  }
}
