/* Section and link labels need room to wrap on narrow screens. */
@media (max-width: 767px) {
  #root > div > main {
    padding-top: 7.5rem;
  }

  html {
    scroll-padding-top: 7.5rem;
  }

  main :is(section, #saharanpur-service-area, #uttar-pradesh) {
    scroll-margin-top: 0;
  }

  #root main .grid > *,
  #root footer .grid > *,
  #root main nav[aria-label="Breadcrumb"] > [aria-current] {
    min-inline-size: 0;
  }

  #root main nav[aria-label="Breadcrumb"] > [aria-current],
  #root footer :is(a, span).truncate {
    white-space: normal;
    overflow-wrap: anywhere;
    text-overflow: clip;
  }

  #root main [aria-label="Clinic consultation information"] .grid {
    scroll-snap-type: x mandatory;
  }

  #root main [aria-label="Clinic consultation information"] article {
    flex-basis: 100%;
    min-width: 0;
  }

  #root footer .grid[class*="grid-cols-2"] {
    column-gap: 0.75rem;
  }

  #root main section[data-city-hero] {
    padding-block: 0.9rem 1.5rem;
  }

  [data-city-hero] nav[aria-label="Breadcrumb"] {
    margin-block: 0 0.75rem;
  }

  [data-city-hero] nav[aria-label="Breadcrumb"] svg {
    flex-shrink: 0;
  }

  [data-city-hero] .city-hero-content {
    margin-bottom: 1rem;
    padding: 1.15rem 0.95rem;
  }

  #root main [data-city-hero] h1 {
    margin-bottom: 0.75rem;
    font-size: clamp(1.625rem, 6.5vw, 2.125rem);
    line-height: 1.17;
  }

  #root main [data-city-hero] h1 + p {
    font-size: 1rem;
    line-height: 1.55;
  }

  [data-city-hero] .city-hero-actions {
    gap: 0.625rem;
  }

  [data-city-hero] .city-hero-actions a {
    min-height: 2.75rem;
    padding: 0.65rem 1rem;
    text-align: center;
  }

  [data-city-hero] .city-hero-byline {
    margin: 1rem 0 0;
    padding: 0.65rem;
    row-gap: 0.35rem;
  }
}

#root > div > main > section[data-city-hero] {
  --panel-bg: var(--glass-dark);
  border-color: var(--glass-border-dark);
}

.district-guide-grid > a {
  min-height: 2.75rem;
  min-width: 0;
  padding: 0.5rem 0.75rem;
  overflow-wrap: break-word;
}

@media (max-width: 767px) {
  [data-city-hero] .city-hero-breadcrumb {
    margin-bottom: 0;
  }

  [data-city-hero] .city-hero-actions svg {
    flex-shrink: 0;
  }
}

@media (min-width: 768px) {
  #root > div > main > section[data-city-hero] {
    padding-block: 2rem 3rem;
  }
}

@media (max-width: 767px) {
  [data-city-hero] .social-share-widget {
    position: static;
    align-items: center;
    margin-top: 0.75rem;
  }
}

.city-doctor-photo {
  display: block;
  width: min(224px, 100%);
  margin: 1rem auto 0;
}

.city-doctor-photo img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1200 / 630;
  border-radius: 0.75rem;
}

#root main .city-page-heading,
#root main .city-page-heading + p {
  opacity: 1 !important;
  transform: none !important;
}

@media (max-width: 767px) {
  #root main section:has(.city-page-heading) {
    padding-block: 1rem 1.5rem;
  }

  #root main .city-page-heading {
    font-size: clamp(1.625rem, 6.5vw, 2.125rem);
    line-height: 1.17;
    overflow-wrap: break-word;
  }

  .city-doctor-photo {
    width: min(176px, 100%);
  }

  #root main section:has(.city-page-heading) nav[aria-label="Breadcrumb"] {
    margin-block: 0.5rem;
  }

  #root main section:has(.city-page-heading) .city-page-heading + p {
    font-size: 1rem;
    line-height: 1.55;
  }
}
