/* CMS Field: unified landing team (injected + kids-home anchor) */
.landing-team{
  padding:56px 0 64px;
  background:
    radial-gradient(ellipse 55% 45% at 92% 8%, rgba(216,245,237,.55) 0%, transparent 58%),
    radial-gradient(ellipse 50% 40% at 6% 92%, rgba(255,228,222,.45) 0%, transparent 60%),
    var(--cream, #f6f1ea);
}
.landing-team .container{
  max-width:1180px;
  margin:0 auto;
  padding:0 20px;
}
.landing-team__head{
  text-align:center;
  max-width:720px;
  margin:0 auto 28px;
}
.landing-team__label{
  display:inline-block;
  font-size:12px;
  font-weight:700;
  letter-spacing:1.2px;
  text-transform:uppercase;
  color:#3ecfb2;
  margin-bottom:10px;
}
.landing-team__title{
  font-family:var(--font-head, "Unbounded", system-ui, sans-serif);
  font-size:clamp(26px,3.6vw,40px);
  line-height:1.12;
  letter-spacing:-.02em;
  margin:0 0 12px;
  color:var(--ink, #0b2545);
}
.landing-team__sub{
  margin:0;
  font-size:16px;
  line-height:1.55;
  color:var(--ink-soft, #5a6e8a);
}

/* Карусель: единый белый фон (секция + скролл-порт), без серого «пола» у overflow в Chromium */
.landing-team.landing-team--carousel{
  background-color:var(--white, #fff);
  background-image:none;
}
.landing-team--carousel .landing-team__wrap,
.landing-team--carousel .landing-team__stage,
.landing-team--carousel .landing-team__viewport,
.landing-team--carousel .landing-team__track{
  background-color:var(--white, #fff);
}

.landing-team__card{
  background:var(--white, #fff);
  border-radius:20px;
  overflow:hidden;
  box-shadow:0 10px 32px rgba(11,37,69,.08);
  border:1px solid rgba(11,37,69,.06);
  display:flex;
  flex-direction:column;
  height:100%;
}
/* Карточка: одна крупная ссылка (фото + ФИО), отдельно «Подробнее» */
.landing-team__hit{
  display:flex;
  flex-direction:column;
  flex:1 1 auto;
  min-height:0;
  text-decoration:none;
  color:inherit;
  border-radius:20px;
}
.landing-team__hit:hover .landing-team__name,
.landing-team__hit:focus-visible .landing-team__name{
  color:var(--mint-deep,#209b84);
}
.landing-team__hit:focus-visible{
  outline:2px solid var(--mint-deep,#3ecfb2);
  outline-offset:2px;
}
.landing-team__card > .landing-team__link{
  margin-top:auto;
}
.landing-team__photo{
  aspect-ratio:4/5;
  background:linear-gradient(145deg, #e8f4ef, #f0e8ff);
  overflow:hidden;
}
html[data-theme="dark"] .landing-team__card{
  border-color:rgba(232,240,255,.12);
  box-shadow:0 14px 40px rgba(0,0,0,.35);
}
html[data-theme="dark"] .landing-team__photo{
  background:linear-gradient(145deg, rgba(62,207,178,.12), rgba(138,111,224,.14));
}
.landing-team__photo img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}
.landing-team__body{
  padding:16px 16px 18px;
  display:flex;
  flex-direction:column;
  gap:6px;
  flex:1;
}
.landing-team__role{
  font-size:12px;
  font-weight:600;
  text-transform:uppercase;
  letter-spacing:.06em;
  color:#3ecfb2;
}
.landing-team__name{
  margin:0;
  font-family:var(--font-head, "Unbounded", system-ui, sans-serif);
  font-size:17px;
  line-height:1.25;
  color:var(--ink, #0b2545);
}
.landing-team__meta{
  margin:0;
  font-size:13px;
  font-weight:700;
  color:var(--ink, #0b2545);
}
.landing-team__about{
  margin:0;
  font-size:13px;
  line-height:1.5;
  color:var(--ink-soft, #5a6e8a);
}
.landing-team__tags{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
}
.landing-team__tag{
  display:inline-flex;
  align-items:center;
  padding:4px 8px;
  border-radius:999px;
  background:#eef7f4;
  color:#0b5a3a;
  font-size:11px;
  font-weight:700;
  line-height:1.2;
}
.landing-team__link{
  margin-top:auto;
  font-size:14px;
  font-weight:600;
  color:#0b5a3a;
  text-decoration:none;
}
.landing-team__link:hover,
.landing-team__link:focus{
  text-decoration:underline;
  text-underline-offset:3px;
}

/* Grid (посадочные): ряды по центру — неполный последний ряд (1–3 карточки) не «липнет» к левому краю */
.landing-team--grid .landing-team__grid{
  display:flex;
  flex-wrap:wrap;
  justify-content:center;
  align-items:stretch;
  gap:18px;
}
.landing-team--grid .landing-team__card{
  flex:0 1 260px;
  width:min(100%, 260px);
  max-width:100%;
  /* Не height:100% — в многострочном flex иначе ломается кросс-ось и «Подробнее» оказывается вне белой карточки */
  height:auto;
  align-self:stretch;
}
.landing-team--grid .landing-team__hit{
  flex:1 1 auto;
  min-height:0;
  height:100%;
}
.landing-team--grid .landing-team__body{
  display:flex;
  flex-direction:column;
  flex:1 1 auto;
  min-height:0;
}
.landing-team--grid .landing-team__cta{
  display:block;
  margin-top:auto;
  flex-shrink:0;
  padding-top:12px;
  font-size:14px;
  font-weight:600;
  color:#0b5a3a;
  text-decoration:none;
}
.landing-team--grid .landing-team__hit:hover .landing-team__cta,
.landing-team--grid .landing-team__hit:focus-visible .landing-team__cta{
  color:var(--mint-deep,#209b84);
  text-decoration:underline;
  text-underline-offset:3px;
}
/* Подробные карточки (/doctors): не даём .body сжиматься по cross-axis ряда — иначе «Подробнее» визуально наезжает на фото */
.landing-team--details.landing-team--grid .landing-team__body{
  gap:8px;
  flex:1 0 auto;
  min-height:min-content;
  padding-bottom:22px;
}
.landing-team--grid .landing-team__photo{
  flex-shrink:0;
}

/* Мобилка: сетка врачей всегда в 2 колонки (260px flex-basis даёт 1 колонку на узком экране) */
@media (max-width: 980px) {
  .landing-team--grid .landing-team__grid {
    gap: 12px;
    justify-content: stretch;
  }
  .landing-team--grid .landing-team__card {
    flex: 0 1 calc((100% - 12px) / 2);
    width: auto;
    max-width: calc((100% - 12px) / 2);
  }
}

@media (max-width: 640px) {
  .landing-team--grid .landing-team__body {
    padding: 12px 10px 14px;
  }
  .landing-team--grid .landing-team__role {
    font-size: 10px;
    letter-spacing: 0.04em;
  }
  .landing-team--grid .landing-team__name {
    font-size: 14px;
    line-height: 1.22;
  }
  .landing-team--grid .landing-team__cta {
    font-size: 12px;
    padding-top: 8px;
  }
}

/* Карусель (главная) */
.landing-team--carousel .landing-team__wrap{
  display:flex;
  align-items:stretch;
  gap:10px;
  max-width:100%;
  position:relative;
}
.landing-team__btn{
  position:absolute;
  top:var(--team-photo-center, 168px);
  transform:translateY(-50%);
  z-index:3;
  width:44px;
  height:44px;
  border-radius:50%;
  border:2px solid rgba(11,37,69,.12);
  background:var(--white, #fff);
  cursor:pointer;
  font-size:20px;
  line-height:1;
  color:var(--ink, #0b2545);
  transition:background .2s, border-color .2s;
}
.landing-team__btn--prev{left:0}
.landing-team__btn--next{right:0}
.landing-team__btn:hover,
.landing-team__btn:focus{
  background:#e8f4ef;
  border-color:#3ecfb2;
}
.landing-team__stage{
  flex:1;
  min-width:0;
  display:flex;
  flex-direction:column;
  gap:0;
  margin:0 54px;
  position:relative;
}
.landing-team__viewport{
  flex:1;
  min-width:0;
  overflow-x:auto;
  overflow-y:hidden;
  cursor:grab;
  /* На mobile разрешаем горизонтальный нативный свайп карусели. */
  touch-action:pan-x pan-y;
  container-type:inline-size;
  container-name:landing-team-vp;
  scroll-snap-type:x mandatory;
  scroll-behavior:smooth;
  -webkit-overflow-scrolling:touch;
  /* Нативный скроллбар скрыт — навигация стрелками/тач/клавиатурой; прогресс — .landing-team__rail */
  scrollbar-width:none;
  -ms-overflow-style:none;
  scroll-padding-inline:0;
  background-color:var(--white, #fff);
}
.landing-team__viewport.is-dragging{
  cursor:grabbing;
  scroll-behavior:auto;
}
.landing-team__viewport::-webkit-scrollbar{
  display:none;
  width:0;
  height:0;
}
.landing-team__rail{
  display:none;
}
.landing-team__rail-thumb{
  position:absolute;
  left:0;
  top:0;
  height:100%;
  min-width:28px;
  width:32%;
  border-radius:999px;
  background:linear-gradient(90deg, var(--mint, #3ecfb2), var(--sky-deep, #7bcfec));
  will-change:left, width;
  transition:left .12s ease-out, width .12s ease-out;
}
.landing-team__track{
  display:flex;
  gap:16px;
  padding:4px 0 4px;
  width:max-content;
}
.landing-team--carousel .landing-team__card{
  box-sizing:border-box;
  flex:0 0 auto;
  scroll-snap-align:start;
  max-width:100%;
  /* без подложки: белый фон + тень воспринимались как серый градиент к низу блока */
  background:transparent;
  box-shadow:none;
  border:none;
  overflow:visible;
  /* ширина задаётся через @container ниже — в ряд столько карт, сколько помещается без обрезки */
}
.landing-team--carousel .landing-team__photo{
  border-radius:20px;
  overflow:hidden;
  /* без градиента-плейсхолдера из базового .landing-team__photo */
  background:var(--white, #fff);
}
.landing-team--carousel .landing-team__photo img{
  -webkit-user-drag:none;
  user-select:none;
}
.landing-team--carousel .landing-team__body{
  background:transparent;
  padding-left:0;
  padding-right:0;
}
.landing-team--carousel .landing-team__hit{
  border-radius:20px;
}
.landing-team--carousel .landing-team__hit .landing-team__photo{
  border-radius:20px 20px 0 0;
}
.landing-team--carousel .landing-team__card > .landing-team__link{
  padding-left:0;
  padding-right:0;
}

html[data-theme="dark"] .landing-team__tag{
  background:var(--mint-mist, #0f3530);
  color:var(--mint-deep, #36bea2);
}
html[data-theme="dark"] .landing-team__link{
  color:var(--mint-deep, #36bea2);
}

.landing-team__photo--placeholder{
  background:linear-gradient(165deg,#e8f0fc 0%,#d4e4f8 100%);
  min-height:220px;
}
.landing-team__photo--placeholder img{
  display:block;
  width:100%;
  height:100%;
  min-height:220px;
  object-fit:contain;
  object-position:center;
}
.landing-team--presale .landing-team__name{
  font-size:15px;
  font-weight:600;
  color:var(--text-muted,#5a6e8a);
}
html[data-theme="dark"] .landing-team--grid .landing-team__cta{
  color:var(--mint-deep, #36bea2);
}

@container landing-team-vp (max-width: 519px){
  .landing-team--carousel .landing-team__card{
    width:min(100cqw - 0px, 300px);
    flex-basis:min(100cqw - 0px, 300px);
  }
}

@container landing-team-vp (min-width: 520px) and (max-width: 799px){
  .landing-team--carousel .landing-team__card{
    width:calc((100cqw - 1 * 16px) / 2);
    flex-basis:calc((100cqw - 1 * 16px) / 2);
  }
}
@container landing-team-vp (min-width: 800px) and (max-width: 1099px){
  .landing-team--carousel .landing-team__card{
    width:calc((100cqw - 2 * 16px) / 3);
    flex-basis:calc((100cqw - 2 * 16px) / 3);
  }
}
@container landing-team-vp (min-width: 1100px){
  .landing-team--carousel .landing-team__card{
    width:calc((100cqw - 3 * 16px) / 4);
    flex-basis:calc((100cqw - 3 * 16px) / 4);
  }
}

/* Старые браузеры без container: ширина ~доли экрана, без фикс 4×260px (из-за неё резало справа) */
@supports not (container-type: inline-size){
  .landing-team--carousel .landing-team__viewport{
    max-width:100%;
  }
  .landing-team--carousel .landing-team__card{
    width:min(200px, calc(23.5vw - 10px));
    flex-basis:min(200px, calc(23.5vw - 10px));
  }
  @media (min-width:1100px){
    .landing-team--carousel .landing-team__card{
      width:min(200px, calc(22.5vw - 12px));
      flex-basis:min(200px, calc(22.5vw - 12px));
    }
  }
}
