/* Homepage mobile density pass */
@media (max-width: 900px) {
  .hero-media {
    height: 220px;
    margin-top: 34px;
  }

  .appointment {
    padding: 56px 0;
  }

  .appointment-grid {
    gap: 36px;
  }

  .appointment-form span {
    color: rgba(255, 255, 255, .82);
  }

  .appointment-form input::placeholder {
    color: rgba(255, 255, 255, .7);
  }
}

@media (max-width: 620px) {
  .path-grid {
    gap: 14px;
  }

  .path-card {
    min-height: 250px;
  }

  .path-card img {
    height: 128px;
  }

  .path-icon {
    top: 106px;
    width: 44px;
    height: 44px;
    flex-basis: 44px;
  }

  .path-card h3 {
    margin: 48px 16px 7px;
    font-size: 19px;
  }

  .path-card p {
    margin: 0 16px;
    font-size: 13px;
    line-height: 1.5;
  }

  .path-arrow {
    margin: auto 16px 14px auto;
  }

  .infusion-feature-legal {
    color: #647680;
    font-size: 12px;
    line-height: 1.5;
  }

  .footer-contact-bar {
    grid-template-columns: 1fr;
    gap: 22px;
    padding: 26px 0 28px;
  }

  .footer-logo {
    grid-column: auto;
  }

  .footer-logo img {
    width: 176px;
  }

  .footer-contact-primary {
    justify-items: start;
  }

  .footer-phone {
    font-size: 20px;
  }

  .footer-cta {
    width: 100%;
    justify-content: space-between;
    justify-self: stretch;
    padding: 0 22px;
  }

  .footer-nav-grid {
    gap: 30px 18px;
    padding: 32px 0 34px;
  }

  .footer-column {
    gap: 10px;
  }

  .footer-column b {
    min-height: 38px;
    margin-bottom: 3px;
    font-size: 13px;
  }

  .footer-column a {
    font-size: 14px;
  }

  .footer-branches p {
    display: none;
  }

  .footer-meta {
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 22px 0 26px;
  }

  .footer-meta-contact {
    grid-column: auto;
  }

  .footer-disclaimer {
    min-height: 70px;
    padding: 15px 18px;
    font-size: 12px;
    letter-spacing: .01em;
  }
}

/* Doctor profile: keep mobile text independent from the portrait contrast */
@media (max-width: 620px) {

  .doctor-profile-photo-wrap {
    width: 100%;
    min-height: 0;
    aspect-ratio: 4 / 5;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .doctor-profile-photo-wrap.is-placeholder {
    aspect-ratio: auto;
    min-height: 160px;
    padding: 24px;
  }
}

/* Homepage doctors */
.home-doctors {
  padding: 72px 0 76px;
  border-top: 1px solid var(--line);
  background: #f3f7f6;
}

.home-doctors-head {
  display: flex;
  justify-content: space-between;
  gap: 32px;
  align-items: end;
  margin-bottom: 28px;
}

.home-doctors-head h2 {
  max-width: 700px;
  margin: 0;
  font-size: clamp(32px, 4vw, 52px);
  line-height: 1.03;
  letter-spacing: -.045em;
}

.home-doctors-head-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.home-doctors-head-actions a {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid #cfdde1;
  border-radius: 999px;
  background: rgba(255, 255, 255, .8);
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
}

.home-doctors-head-actions a:hover,
.home-doctors-head-actions a:focus-visible {
  border-color: var(--green);
  color: var(--green-deep);
  outline: none;
}

.home-doctors-head-actions .home-doctors-all {
  border-color: var(--green);
  background: var(--green);
  color: #fff;
}

.home-doctors-head-actions .home-doctors-all:hover,
.home-doctors-head-actions .home-doctors-all:focus-visible {
  background: var(--green-deep);
  color: #fff;
}

.home-doctors-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.home-doctor-card {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(7, 84, 93, .14);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  box-shadow: 0 14px 34px rgba(21, 35, 49, .08);
  transition: transform 220ms var(--ease-out), box-shadow 220ms var(--ease-out), border-color 220ms var(--ease-out);
}

.home-doctor-card:hover,
.home-doctor-card:focus-visible {
  border-color: rgba(10, 143, 74, .58);
  box-shadow: 0 20px 42px rgba(21, 35, 49, .13);
  outline: none;
  transform: translateY(-4px);
}

.home-doctor-media {
  position: relative;
  display: block;
  overflow: hidden;
}

.home-doctor-media > img {
  width: 100%;
  height: 250px;
  display: block;
  object-fit: cover;
  object-position: center 18%;
  background: #e8efef;
  transition: transform 440ms var(--ease-out);
}

.home-doctor-card:hover .home-doctor-media > img,
.home-doctor-card:focus-visible .home-doctor-media > img {
  transform: scale(1.025);
}

.home-doctor-branch {
  position: absolute;
  bottom: 14px;
  left: 14px;
  max-width: calc(100% - 28px);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, .7);
  border-radius: 999px;
  background: rgba(255, 255, 255, .92);
  color: var(--green-deep);
  font-size: 11px;
  font-weight: 900;
  line-height: 1.35;
  box-shadow: 0 6px 18px rgba(21, 35, 49, .12);
}

.home-doctor-branch i {
  flex-shrink: 0;
}

.home-doctor-media-myasnikov > img {
  object-position: center top;
}

.home-doctor-info {
  min-height: 176px;
  display: flex;
  flex-direction: column;
  padding: 18px 18px 16px;
}

.home-doctor-info small {
  min-height: 34px;
  color: var(--green-deep);
  font-size: 12px;
  font-weight: 900;
  line-height: 1.35;
  text-transform: uppercase;
}

.home-doctor-info b {
  margin-top: 9px;
  font-size: 20px;
  line-height: 1.12;
}

.home-doctor-info em {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-top: auto;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--text);
  font-size: 13px;
  font-style: normal;
  font-weight: 800;
}

@media (max-width: 900px) {
  .home-doctors-head {
    display: block;
  }

  .home-doctors-head-actions {
    justify-content: flex-start;
    margin-top: 20px;
  }

  .home-doctors-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .home-doctors {
    padding: 52px 0 56px;
    overflow: hidden;
  }

  .home-doctors-head {
    margin-bottom: 22px;
  }

  .home-doctors-head h2 {
    font-size: 32px;
  }

  .home-doctors-head-actions a:not(.home-doctors-all) {
    display: none;
  }

  .home-doctors-grid {
    width: calc(100% + 16px);
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 0 16px 6px 0;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
  }

  .home-doctors-grid::-webkit-scrollbar {
    display: none;
  }

  .home-doctor-card {
    flex: 0 0 248px;
    scroll-snap-align: start;
  }

  .home-doctor-media > img {
    height: 238px;
  }

  .home-doctor-info {
    min-height: 168px;
  }
}

