.doctors {
  padding-block: clamp(3rem, calc(80 / var(--design-width) * 100vw), 5rem);
}

@media (min-width: 901px) {
  .doctors {
    scroll-margin-top: clamp(-2.5rem, calc(-56 / var(--design-width) * 100vw), -3.5rem);
  }
}

.doctors__head {
  display: flex;
  flex-direction: column;
  gap: clamp(1rem, calc(24 / var(--design-width) * 100vw), 1.5rem);
}

.doctors__title {
  max-width: clamp(18rem, calc(720 / var(--design-width) * 100vw), 45rem);
  font-size: var(--text-hero-title);
  font-weight: 500;
  line-height: 1.15;
  color: var(--color-text);
}

.doctors__lead {
  max-width: clamp(18rem, calc(780 / var(--design-width) * 100vw), 48.75rem);
  font-size: var(--text-hero-body);
  font-weight: 400;
  line-height: 1.5;
  color: var(--color-text-muted);
}

.doctors__nav {
  display: none;
  align-items: center;
  gap: clamp(0.5rem, calc(12 / var(--design-width) * 100vw), 0.75rem);
}

.doctors__nav-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: clamp(2.75rem, calc(56 / var(--design-width) * 100vw), 3.5rem);
  height: clamp(2.5rem, calc(48 / var(--design-width) * 100vw), 3rem);
  background-color: transparent;
  border: 1px solid var(--color-gold-start);
  border-radius: clamp(0.75rem, calc(16 / var(--design-width) * 100vw), 1rem);
  transition:
    opacity 0.2s ease,
    background-color 0.2s ease;
}

.doctors__nav-btn:hover:not(:disabled) {
  background-color: rgb(201 169 110 / 8%);
}

.doctors__nav-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.doctors__nav-btn-icon {
  display: block;
  width: clamp(0.875rem, calc(23 / var(--design-width) * 100vw), 1.4375rem);
  height: clamp(0.5625rem, calc(15 / var(--design-width) * 100vw), 0.9375rem);
  background-color: var(--color-gold-start);
  mask-image: url("../img/arrow.svg");
  mask-repeat: no-repeat;
  mask-position: center;
  mask-size: contain;
  -webkit-mask-image: url("../img/arrow.svg");
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: center;
  -webkit-mask-size: contain;
}

.doctors__nav-btn--next .doctors__nav-btn-icon {
  transform: scaleX(-1);
}

.doctors__slider {
  display: block;
}

.doctors__viewport {
  overflow: visible;
}

.doctors__strip {
  display: block;
  transition: transform 0.45s ease;
}

.doctors__strip.no-transition {
  transition: none;
}

.doctors__profile {
  container-type: inline-size;
  display: grid;
  grid-template-columns: minmax(0, calc(var(--doctor-photo-col-ratio) * 100%)) minmax(0, 1fr);
  grid-template-areas: "photo body";
  gap: var(--promo-card-gap);
  align-items: stretch;
  margin-top: clamp(2rem, calc(56 / var(--design-width) * 100vw), 3.5rem);
}

.doctor-card__photo {
  grid-area: photo;
  justify-self: start;
  width: 100%;
  max-width: 100%;
  margin: 0;
  aspect-ratio: var(--doctor-photo-aspect-w) / var(--doctor-photo-aspect-h);
  border-radius: clamp(1rem, calc(20 / var(--design-width) * 100vw), 1.25rem);
  overflow: hidden;
}

.doctor-card__photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.doctor-card__body {
  grid-area: body;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 100%;
}

.doctor-card__name {
  font-size: var(--text-hero-title);
  font-weight: 600;
  line-height: 1.15;
  color: var(--color-text);
}

.doctor-card__role,
.doctor-card__credentials {
  margin-top: clamp(0.5rem, calc(12 / var(--design-width) * 100vw), 0.75rem);
  font-size: var(--text-hero-body);
  font-weight: 400;
  line-height: 1.45;
  color: var(--color-text-muted);
}

.doctor-card__divider {
  width: clamp(3rem, calc(var(--doctor-divider-ratio) * 100cqw), 6.25rem);
  height: 0;
  margin: clamp(1rem, calc(24 / var(--design-width) * 100vw), 1.5rem) 0
    clamp(1rem, calc(20 / var(--design-width) * 100vw), 1.25rem);
  border: 0;
  border-top: 1px solid var(--color-gold-start);
}

.doctor-card__bio {
  display: flex;
  flex-direction: column;
  gap: clamp(0.75rem, calc(16 / var(--design-width) * 100vw), 1rem);
  font-size: var(--text-hero-body);
  font-weight: 400;
  line-height: 1.5;
  color: var(--color-text);
}

.doctor-card__footer {
  display: flex;
  justify-content: flex-end;
  margin-top: auto;
  padding-top: clamp(1rem, calc(24 / var(--design-width) * 100vw), 1.5rem);
}

.doctors__team {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--promo-card-gap);
  margin-top: clamp(2rem, calc(48 / var(--design-width) * 100vw), 3rem);
  padding: 0;
  list-style: none;
}

.doctor-tile {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  min-width: 0;
}

.doctor-tile__photo {
  margin: 0;
  width: 100%;
  aspect-ratio: var(--doctor-tile-aspect-w) / var(--doctor-tile-aspect-h);
  border-radius: clamp(1rem, calc(20 / var(--design-width) * 100vw), 1.25rem);
  overflow: hidden;
}

.doctor-tile__photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.doctor-tile__name {
  --doctor-tile-name-lh: 1.25;

  margin-top: clamp(0.75rem, calc(16 / var(--design-width) * 100vw), 1rem);
  min-height: calc(2 * var(--doctor-tile-name-lh) * 1em);
  font-size: clamp(1.0625rem, calc(20 / var(--design-width) * 100vw), 1.25rem);
  font-weight: 600;
  line-height: var(--doctor-tile-name-lh);
  color: var(--color-text);
}

.doctor-tile__role {
  flex: 1;
  margin-top: 0;
  font-size: var(--text-hero-body);
  font-weight: 400;
  line-height: 1.45;
  color: var(--color-text-muted);
}

.doctor-tile__btn {
  align-self: center;
  margin-top: clamp(1rem, calc(24 / var(--design-width) * 100vw), 1.5rem);
  min-height: clamp(2.5rem, calc(48 / var(--design-width) * 100vw), 3rem);
  padding: clamp(0.625rem, calc(10 / var(--design-width) * 100vw), 0.75rem)
    clamp(1.25rem, calc(28 / var(--design-width) * 100vw), 1.75rem);
  font-size: clamp(0.875rem, calc(16 / var(--design-width) * 100vw), 1rem);
  border-radius: var(--radius-btn);
}

@media (max-width: 1100px) {
  .doctors__team {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .doctor-tile__name {
    min-height: calc(3 * var(--doctor-tile-name-lh) * 1em);
  }
}

@media (max-width: 900px) {
  .doctors__profile {
    grid-template-columns: minmax(0, calc(var(--doctor-photo-col-ratio) * 100%)) minmax(0, 1fr);
    grid-template-areas: "photo body";
    align-items: start;
  }

  .doctor-card__body {
    min-height: 0;
  }

  .doctor-card__footer {
    justify-content: flex-start;
    margin-top: clamp(1.25rem, calc(32 / var(--design-width) * 100vw), 2rem);
  }
}

@media (min-width: 701px) {
  .doctors__strip {
    transform: none !important;
  }
}

@media (max-width: 700px) {
  .doctors__title,
  .doctors__lead {
    max-width: none;
    width: 100%;
  }

  .doctors__title {
    font-size: clamp(1.25rem, calc(28 / var(--design-width) * 100vw), 1.625rem);
  }

  .doctors__nav {
    display: flex;
    justify-content: flex-end;
  }

  .doctors__viewport {
    container-type: inline-size;
    overflow: hidden;
    touch-action: pan-y pinch-zoom;
  }

  .doctors__strip {
    display: flex;
    gap: 0;
    margin-top: clamp(1.25rem, calc(28 / var(--design-width) * 100vw), 1.75rem);
  }

  .doctors__profile,
  .doctor-tile {
    flex: 0 0 100cqi;
    min-width: 0;
  }

  .doctors__profile {
    display: flex;
    flex-direction: column;
    grid-template-columns: none;
    grid-template-areas: none;
    margin-top: 0;
  }

  .doctor-card__photo,
  .doctor-tile__photo {
    width: 100%;
    aspect-ratio: var(--doctor-tile-aspect-w) / var(--doctor-tile-aspect-h);
  }

  .doctor-card__body {
    flex: 1;
    min-height: 0;
  }

  .doctor-card__name,
  .doctor-tile__name {
    font-size: clamp(0.9375rem, calc(17 / var(--design-width) * 100vw), 1.0625rem);
  }

  .doctor-card__credentials {
    display: block;
    margin-top: clamp(0.375rem, calc(8 / var(--design-width) * 100vw), 0.5rem);
    font-size: clamp(0.8125rem, calc(15 / var(--design-width) * 100vw), 0.9375rem);
  }

  .doctor-card__divider,
  .doctor-card__bio {
    display: none;
  }

  .doctor-card__footer {
    justify-content: flex-start;
    margin-top: auto;
    padding-top: clamp(0.75rem, calc(16 / var(--design-width) * 100vw), 1rem);
  }

  .doctor-card__footer .hero__btn {
    width: 100%;
  }

  .doctors__team {
    display: contents;
    margin-top: 0;
  }

  .doctor-tile__name {
    min-height: 0;
  }

  .doctor-card__role,
  .doctor-tile__role {
    margin-top: clamp(0.375rem, calc(8 / var(--design-width) * 100vw), 0.5rem);
    font-size: clamp(0.8125rem, calc(15 / var(--design-width) * 100vw), 0.9375rem);
  }

  .doctor-card__footer .hero__btn,
  .doctor-tile__btn {
    align-self: stretch;
    width: 100%;
    margin-top: auto;
  }
}
