/* Team page — scoped styles (prefix: team-page__) */

.team-page {
  position: relative;
  overflow: hidden;
  padding-top: 0;
  padding-bottom: 0;
}

.team-page__banner {
  position: relative;
  height: var(--inner-page-banner-height);
  min-height: var(--inner-page-banner-min-height);
  overflow: hidden;
  z-index: 0;
}

.team-page__banner-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 22%;
  filter: saturate(0.98) contrast(1.02) brightness(0.88);
  transform: scale(1.05);
  transform-origin: center top;
}

.team-page__banner-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(
      820px 320px at 15% 20%,
      rgba(51, 78, 94, 0.22),
      transparent 60%
    ),
    radial-gradient(
      900px 420px at 85% 30%,
      rgba(152, 131, 131, 0.2),
      transparent 56%
    ),
    linear-gradient(
      180deg,
      rgba(51, 78, 94, 0.38) 0%,
      rgba(51, 78, 94, 0.2) 48%,
      rgba(255, 255, 255, 0.96) 100%
    );
}

.team-page__banner-content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: calc(126px + clamp(20px, 3.5vh, 56px)) 18px 26px;
  text-align: center;
  color: #fff;
  z-index: 1;
}

.team-page__banner-title {
  margin: 0;
  font-family: var(--font);
  color: rgba(255, 255, 255, 0.96);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.05;
  font-size: clamp(26px, 2.8vw + 14px, 46px);
  text-shadow: 0 14px 40px rgba(0, 0, 0, 0.18);
  max-width: 24ch;
}

.team-page__banner-subtitle {
  margin: 0;
  max-width: 52ch;
  font-family:
    "Inter",
    system-ui,
    -apple-system,
    sans-serif;
  color: rgba(255, 255, 255, 0.86);
  line-height: 1.7;
  text-shadow: 0 10px 34px rgba(0, 0, 0, 0.14);
  font-size: clamp(15px, 0.6vw + 13px, 18px);
}

.team-page__banner-content .team-page__eyebrow {
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: rgba(255, 255, 255, 0.88);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.12);
}

.team-page__plaque {
  position: absolute;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  width: min(calc(100% - 22px), 1040px);
  z-index: 2;
}

.team-page__plaque-shell {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.28);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.22);
  background:
    radial-gradient(
      720px 320px at 18% 10%,
      rgba(120, 224, 238, 0.22) 0%,
      transparent 58%
    ),
    radial-gradient(
      720px 320px at 82% 30%,
      rgba(152, 131, 131, 0.16) 0%,
      transparent 56%
    ),
    linear-gradient(
      165deg,
      rgba(8, 42, 58, 0.88) 0%,
      rgba(11, 74, 95, 0.9) 28%,
      rgba(22, 95, 108, 0.9) 52%,
      rgba(18, 78, 90, 0.9) 78%,
      rgba(10, 38, 48, 0.9) 100%
    );
  color: rgba(255, 255, 255, 0.9);
}

.team-page__plaque-track {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.team-page__plaque-item {
  padding: 16px 16px 18px;
  border-right: 1px solid rgba(255, 255, 255, 0.14);
  min-height: 108px;
}

.team-page__plaque-item:last-child {
  border-right: 0;
}

.team-page__plaque-title {
  margin: 0;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.96);
}

.team-page__plaque-text {
  margin: 10px 0 0;
  font-size: 13px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.78);
}

.team-page__plaque-link {
  margin-top: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 12px;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 800;
  font-size: 13px;
  letter-spacing: -0.01em;
  color: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.1);
  width: fit-content;
}

.team-page__plaque-link:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.32);
}

.team-page__plaque-nav {
  display: none;
}

@media (max-width: 860px) {
  .team-page__plaque {
    bottom: 14px;
  }

  .team-page__plaque-track {
    grid-auto-flow: column;
    grid-auto-columns: minmax(250px, 1fr);
    grid-template-columns: none;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
  }

  .team-page__plaque-item {
    scroll-snap-align: start;
    border-right: 1px solid rgba(255, 255, 255, 0.14);
  }

  .team-page__plaque-nav {
    display: grid;
    place-items: center;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: rgba(10, 38, 48, 0.55);
    color: rgba(255, 255, 255, 0.92);
    cursor: pointer;
    z-index: 3;
  }

  .team-page__plaque-nav--prev {
    left: 10px;
  }

  .team-page__plaque-nav--next {
    right: 10px;
  }
}

@media (max-width: 560px) {
  .team-page__plaque {
    width: calc(100% - 16px);
    bottom: 10px;
  }

  .team-page__plaque-item {
    padding: 14px 14px 16px;
    min-height: 102px;
  }
}

.team-page__body {
  position: relative;
  overflow-x: hidden;
  background:
    radial-gradient(
      ellipse 78% 52% at 100% 8%,
      var(--bg-spot-mint) 0%,
      transparent 58%
    ),
    radial-gradient(
      ellipse 65% 48% at 0% 92%,
      var(--bg-spot-warm) 0%,
      transparent 55%
    ),
    linear-gradient(180deg, #f7fbfc 0%, var(--bg) 55%, #f4f7f9 100%);
  padding: 56px 0 0;
}

.team-page__inner {
  position: relative;
  z-index: 1;
  padding: 56px 0 88px;
  display: flex;
  flex-direction: column;
  gap: 72px;
}

.team-page__intro {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}

.team-page__intro-eyebrow {
  margin: 0;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--shirt-tone);
}

.team-page__intro-title {
  margin: 0;
  font-size: clamp(24px, 1.8vw + 14px, 34px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.12;
}

.team-page__intro-lead {
  margin: 0;
  font-size: 16px;
  line-height: 1.65;
  color: var(--muted);
}

.team-page__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 340px));
  gap: clamp(18px, 2.2vw, 24px);
  justify-content: center;
}

.team-card {
  margin: 0;
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: linear-gradient(
    165deg,
    rgba(255, 255, 255, 0.98) 0%,
    rgba(249, 250, 251, 0.95) 100%
  );
  border: 1px solid rgba(51, 78, 94, 0.08);
  box-shadow:
    0 18px 44px rgba(51, 78, 94, 0.055),
    0 1px 0 rgba(255, 255, 255, 0.9) inset;
  transition:
    box-shadow 0.22s ease,
    transform 0.22s ease,
    border-color 0.22s ease;
}

.team-card--link {
  text-decoration: none;
  color: inherit;
}

.team-card--link:focus-visible {
  outline: 2px solid rgba(17, 166, 184, 0.55);
  outline-offset: 3px;
}

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .team-card:hover {
    border-color: rgba(152, 131, 131, 0.3);
    box-shadow:
      0 24px 52px rgba(51, 78, 94, 0.09),
      0 1px 0 rgba(255, 255, 255, 0.95) inset;
    transform: translateY(-3px);
  }
}

.team-card__media {
  margin: 0;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: rgba(51, 78, 94, 0.06);
}

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

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .team-card:hover .team-card__img {
    transform: scale(1.04);
  }
}

.team-card__body {
  padding: 18px 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.team-card__name {
  margin: 0;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.team-card__role {
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
  color: var(--muted);
}

/* Перехід: сітка лікарів → цінності команди (як на services.html) */
.team-page__section-bridge {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  width: 100%;
  margin: clamp(8px, 2.5vw, 20px) 0 0;
  padding: clamp(28px, 5vw, 44px) 0 clamp(4px, 1vw, 8px);
  text-align: center;
}

.team-page__section-bridge-eyebrow {
  margin: 0;
  position: relative;
  z-index: 1;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--brand-2);
}

.team-page__section-bridge-glow {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -42%);
  width: min(96%, 640px);
  height: clamp(72px, 14vw, 100px);
  background: radial-gradient(
    ellipse 75% 65% at 50% 40%,
    rgba(17, 166, 184, 0.14) 0%,
    rgba(92, 129, 149, 0.06) 42%,
    transparent 70%
  );
  pointer-events: none;
}

.team-page__section-bridge-rail {
  position: relative;
  z-index: 1;
  width: min(100%, 480px);
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(51, 78, 94, 0.12) 12%,
    rgba(17, 166, 184, 0.45) 45%,
    rgba(152, 131, 131, 0.4) 78%,
    transparent 100%
  );
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.65);
}

.team-page__section-bridge-accent {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.95) 0%,
    rgba(236, 248, 250, 0.98) 100%
  );
  border: 2px solid rgba(17, 166, 184, 0.55);
  box-shadow:
    0 0 0 3px rgba(255, 255, 255, 0.9),
    0 8px 22px rgba(51, 78, 94, 0.12);
}

.team-page__values {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(18px, 2.5vw, 26px);
}

.team-page__value {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  margin: 0;
  padding: clamp(22px, 3vw, 30px) clamp(20px, 2.5vw, 26px);
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background:
    radial-gradient(
      125% 90% at 100% 0%,
      rgba(17, 166, 184, 0.11) 0%,
      transparent 52%
    ),
    radial-gradient(
      95% 75% at 0% 100%,
      rgba(152, 131, 131, 0.07) 0%,
      transparent 55%
    ),
    linear-gradient(
      168deg,
      rgba(255, 255, 255, 0.98) 0%,
      rgba(248, 251, 252, 0.96) 45%,
      rgba(241, 246, 249, 0.98) 100%
    );
  border: 1px solid rgba(51, 78, 94, 0.1);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.88) inset,
    0 2px 1px rgba(51, 78, 94, 0.03),
    0 20px 48px -18px rgba(51, 78, 94, 0.12);
  transition:
    transform 0.28s cubic-bezier(0.2, 0.8, 0.2, 1),
    box-shadow 0.28s ease,
    border-color 0.28s ease;
}

.team-page__value::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  border-radius: 14px 14px 0 0;
  z-index: 1;
  pointer-events: none;
}

.team-page__value:nth-child(1)::before {
  background: linear-gradient(
    90deg,
    rgba(17, 166, 184, 0.85) 0%,
    rgba(51, 78, 94, 0.75) 100%
  );
}

.team-page__value:nth-child(2)::before {
  background: linear-gradient(
    90deg,
    var(--brand) 0%,
    var(--brand-2) 55%,
    rgba(152, 131, 131, 0.65) 100%
  );
}

.team-page__value:nth-child(3)::before {
  background: linear-gradient(
    90deg,
    rgba(152, 131, 131, 0.75) 0%,
    rgba(17, 166, 184, 0.55) 100%
  );
}

@media (prefers-reduced-motion: no-preference) {
  .team-page__value:hover {
    transform: translateY(-4px);
    border-color: rgba(152, 131, 131, 0.28);
    box-shadow:
      0 1px 0 rgba(255, 255, 255, 0.92) inset,
      0 12px 28px -8px rgba(51, 78, 94, 0.08),
      0 32px 56px -16px rgba(51, 78, 94, 0.14),
      0 0 36px -10px rgba(152, 131, 131, 0.15);
  }
}

@media (prefers-reduced-motion: reduce) {
  .team-page__value {
    transition: none;
  }
}

.team-page__value-icon {
  width: 50px;
  height: 50px;
  flex-shrink: 0;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: var(--brand);
  background: linear-gradient(
    155deg,
    rgba(255, 255, 255, 0.98) 0%,
    rgba(236, 244, 248, 0.94) 100%
  );
  border: 1px solid rgba(51, 78, 94, 0.12);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.95) inset,
    0 10px 24px rgba(51, 78, 94, 0.08);
}

.team-page__value-icon svg {
  width: 26px;
  height: 26px;
}

.team-page__value:nth-child(1) .team-page__value-icon {
  color: rgb(11, 95, 108);
}

.team-page__value:nth-child(2) .team-page__value-icon {
  color: var(--brand);
}

.team-page__value:nth-child(3) .team-page__value-icon {
  color: rgb(11, 95, 108);
}

.team-page__value-title {
  margin: 0;
  font-size: clamp(15px, 0.5vw + 14px, 17px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.25;
  color: var(--brand-deep);
}

.team-page__value-text {
  margin: 0;
  font-size: 14px;
  line-height: 1.65;
  color: var(--muted);
}

.team-page__cta {
  margin: 0;
  padding: 22px 24px;
  border-radius: var(--radius-lg);
  background:
    radial-gradient(
      560px 220px at 82% 0%,
      rgba(120, 224, 238, 0.2) 0%,
      transparent 62%
    ),
    radial-gradient(
      720px 320px at 18% 8%,
      rgba(17, 166, 184, 0.18) 0%,
      transparent 55%
    ),
    radial-gradient(
      880px 360px at 14% 0%,
      rgba(152, 131, 131, 0.16) 0%,
      transparent 56%
    ),
    linear-gradient(
      165deg,
      rgb(8, 42, 58) 0%,
      rgb(11, 74, 95) 28%,
      rgb(22, 95, 108) 52%,
      rgb(18, 78, 90) 78%,
      rgb(10, 38, 48) 100%
    );
  color: rgba(255, 255, 255, 0.96);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.18);
}

.team-page__cta-text {
  margin: 0;
  font-size: clamp(17px, 1.2vw + 14px, 21px);
  font-weight: 750;
  letter-spacing: -0.02em;
  line-height: 1.35;
  max-width: 38ch;
}

.team-page__cta .button--primary {
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.98);
  border-color: rgba(255, 255, 255, 0.35);
  color: var(--brand);
  box-shadow: none;
}

.team-page__cta .button--primary:hover {
  background: #fff;
  color: var(--brand);
}

@media (max-width: 1024px) {
  .team-page__grid {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  }

  .team-page__values {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .team-page__grid {
    grid-template-columns: 1fr;
  }

  .team-page__inner {
    padding: 40px 0 64px;
    gap: 48px;
  }

  .team-page__cta {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }

  .team-page__cta-text {
    max-width: none;
  }

  .team-page__cta .button--primary {
    width: 100%;
    justify-content: center;
  }
}
