.team-carousel-showcase {
  position: relative;
  background:
    radial-gradient(circle at top left, rgba(25, 119, 204, 0.1), transparent 32%),
    radial-gradient(circle at top right, rgba(15, 121, 26, 0.1), transparent 28%),
    linear-gradient(180deg, #f7fbff 0%, #eef6f2 100%);
}

.team-carousel-showcase::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(255, 255, 255, 0.45) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.45) 1px, transparent 1px);
  background-size: 34px 34px;
  opacity: 0.18;
  pointer-events: none;
}

.team-carousel-showcase > .container {
  position: relative;
  z-index: 1;
}

.team-carousel-showcase__intro {
  max-width: 760px;
  margin: 0 auto 42px;
  text-align: center;
}

.team-carousel-showcase__eyebrow {
  display: inline-block;
  margin-bottom: 12px;
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(25, 119, 204, 0.1);
  color: #1977cc;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.team-carousel-showcase__intro h2 {
  margin-bottom: 14px;
  font-size: clamp(2rem, 3.4vw, 3rem);
  color: #164973;
}

.team-carousel-showcase__intro p {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.75;
  color: #4e6576;
}

.team-carousel-department {
  position: relative;
  margin-bottom: 44px;
  padding: 28px;
  border: 1px solid rgba(25, 119, 204, 0.08);
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 24px 60px rgba(28, 61, 96, 0.12);
  backdrop-filter: blur(8px);
}

.team-carousel-department:last-child {
  margin-bottom: 0;
}

.team-carousel-department__header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

.team-carousel-department__header h3 {
  margin: 8px 0 10px;
  font-size: clamp(1.5rem, 2.4vw, 2.1rem);
  color: #164973;
}

.team-carousel-department__header p {
  margin: 0;
  max-width: 720px;
  color: #5e7382;
  line-height: 1.7;
}

.team-carousel-department__kicker {
  display: inline-block;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #0f791a;
}

.team-carousel-department__controls {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.team-carousel-department__control {
  width: 50px;
  height: 50px;
  border: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, #1977cc, #0f791a);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  box-shadow: 0 12px 24px rgba(25, 119, 204, 0.2);
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.team-carousel-department__control:hover,
.team-carousel-department__control:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 16px 28px rgba(25, 119, 204, 0.25);
}

.team-carousel-department__control:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.team-carousel-department__viewport {
  position: relative;
  min-height: 490px;
  perspective: 1800px;
  touch-action: pan-y;
}

.team-carousel-track {
  position: relative;
  min-height: 490px;
  transform-style: preserve-3d;
}

.team-carousel-card {
  --card-offset: 0;
  --card-abs: 0;
  position: absolute;
  top: 8px;
  left: 50%;
  width: min(100%, 360px);
  height: 450px;
  opacity: 0;
  pointer-events: none;
  transform-style: preserve-3d;
  transform:
    translateX(calc(-50% + (var(--card-offset) * 176px)))
    translateY(calc(var(--card-abs) * 18px))
    rotateY(calc(var(--card-offset) * -17deg))
    scale(calc(1 - (var(--card-abs) * 0.11)));
  filter: blur(calc(var(--card-abs) * 0.6px));
  transition: transform 0.65s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.35s ease, filter 0.35s ease;
}

.team-carousel-card.is-visible {
  opacity: 1;
}

.team-carousel-card.is-hidden {
  opacity: 0;
}

.team-carousel-card.is-active {
  pointer-events: auto;
  filter: none;
}

.team-carousel-card.is-near {
  pointer-events: auto;
  cursor: pointer;
}

.team-carousel-card__inner {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 28px;
  transform-style: preserve-3d;
  transition: transform 0.75s cubic-bezier(0.2, 0.75, 0.2, 1);
}

.team-carousel-card.is-flipped .team-carousel-card__inner {
  transform: rotateY(180deg);
}

.team-carousel-card__face {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 30px 28px;
  border-radius: 28px;
  backface-visibility: hidden;
  overflow: hidden;
}

.team-carousel-card__face--front {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 0;
  position: relative;
  width: 100%;
  min-height: 100%;
  padding: 38px 28px 48px;
  background:
    radial-gradient(circle at top, rgba(25, 119, 204, 0.14), transparent 36%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(243, 249, 255, 0.98) 100%);
  border: 1px solid rgba(25, 119, 204, 0.1);
  box-shadow: 0 26px 36px rgba(34, 64, 94, 0.12);
  text-align: center;
}

.team-carousel-card__face--back {
  transform: rotateY(180deg);
  align-items: flex-start;
  justify-content: space-between;
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.4), transparent 38%),
    linear-gradient(145deg, #ecf8ee 0%, #d9f1df 46%, #c6e9cf 100%);
  color: #1d4f2d;
  box-shadow: 0 28px 40px rgba(38, 106, 65, 0.2);
}

.team-carousel-card__photo {
  width: 146px;
  height: 146px;
  min-width: 146px;
  min-height: 146px;
  margin-bottom: 2px;
  border-radius: 50%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  object-position: center;
  border: 4px solid rgba(25, 119, 204, 0.25);
  box-shadow: 0 16px 30px rgba(25, 119, 204, 0.18);
}

.team-carousel-card__role-pill,
.team-carousel-card__back-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.team-carousel-card__role-pill {
  margin-bottom: 0;
  background: rgba(15, 121, 26, 0.1);
  color: #0f791a;
}

.team-carousel-card__back-label {
  background: rgba(15, 121, 26, 0.12);
  color: #1e5a34;
}

.team-carousel-card h4 {
  margin: 0;
  font-size: 1.5rem;
  line-height: 1.2;
  width: 100%;
  color: #164973;
}

.team-carousel-card__face--front p {
  margin: 0;
  width: 100%;
  font-size: 1.06rem;
  color: #587182;
  line-height: 1.65;
}

.team-carousel-card__hint {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 14px;
  margin: 0;
  min-height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 0.68rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  text-transform: none;
  color: rgba(59, 121, 157, 0.5);
  pointer-events: none;
}

.team-carousel-card__face--back h4 {
  margin: 18px 0 12px;
  color: #1c552f;
}

.team-carousel-card__face--back p {
  margin: 0;
  color: #2d6240;
  line-height: 1.72;
}

.team-carousel-card__toggle {
  margin-top: 0;
  border: 0;
  border-radius: 999px;
  padding: 11px 18px;
  background: linear-gradient(135deg, #1977cc, #0f791a);
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.02em;
  box-shadow: 0 10px 20px rgba(25, 119, 204, 0.2);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.team-carousel-card__toggle:hover,
.team-carousel-card__toggle:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 14px 22px rgba(25, 119, 204, 0.22);
}

.team-carousel-card__toggle--back {
  background: rgba(15, 121, 26, 0.14);
  color: #1e5a34;
  box-shadow: none;
}

.team-carousel-card__toggle--back:hover,
.team-carousel-card__toggle--back:focus-visible {
  box-shadow: none;
  background: rgba(15, 121, 26, 0.2);
}

@media (max-width: 1199px) {
  .team-carousel-card {
    width: min(100%, 330px);
    height: 430px;
    transform:
      translateX(calc(-50% + (var(--card-offset) * 162px)))
      translateY(calc(var(--card-abs) * 18px))
      rotateY(calc(var(--card-offset) * -14deg))
      scale(calc(1 - (var(--card-abs) * 0.1)));
  }

  .team-carousel-department__viewport,
  .team-carousel-track {
    min-height: 470px;
  }
}

@media (max-width: 991px) {
  .team-carousel-department {
    padding: 24px 20px;
  }

  .team-carousel-department__header {
    flex-direction: column;
    align-items: flex-start;
  }

  .team-carousel-card {
    width: min(100%, 300px);
    height: 410px;
    transform:
      translateX(calc(-50% + (var(--card-offset) * 132px)))
      translateY(calc(var(--card-abs) * 16px))
      rotateY(calc(var(--card-offset) * -12deg))
      scale(calc(1 - (var(--card-abs) * 0.08)));
  }

  .team-carousel-department__viewport,
  .team-carousel-track {
    min-height: 445px;
  }
}

@media (max-width: 767px) {
  .team-carousel-showcase__intro {
    margin-bottom: 30px;
  }

  .team-carousel-department {
    padding: 20px 16px;
    border-radius: 24px;
  }

  .team-carousel-department__controls {
    width: 100%;
    justify-content: flex-start;
  }

  .team-carousel-department__viewport,
  .team-carousel-track {
    min-height: 385px;
  }

  .team-carousel-department.is-compact .team-carousel-card {
    width: min(100%, 330px);
    height: 365px;
    transform: translateX(-50%) scale(0.98);
    filter: none;
    pointer-events: none;
  }

  .team-carousel-department.is-compact .team-carousel-card.is-active {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(-50%) scale(1);
  }

  .team-carousel-department.is-compact .team-carousel-card:not(.is-active) {
    opacity: 0;
  }

  .team-carousel-card__face {
    padding: 24px 20px;
  }

  .team-carousel-card__photo {
    width: 108px;
    height: 108px;
    min-width: 108px;
    min-height: 108px;
  }

  .team-carousel-card h4 {
    font-size: 1.28rem;
  }

  .team-carousel-card__face--front {
    gap: 0;
    padding: 28px 20px 42px;
  }

  .team-carousel-card__hint {
    left: 14px;
    right: 14px;
    bottom: 12px;
    min-height: 24px;
    font-size: 0.8rem;
  }

  .team-carousel-card__face--front p,
  .team-carousel-card__face--back p {
    font-size: 0.96rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .team-carousel-card,
  .team-carousel-card__inner,
  .team-carousel-department__control,
  .team-carousel-card__toggle {
    transition: none;
  }
}