.page-hospital-detail .hospital-static-hero {
  min-height: clamp(360px, 44vw, 520px);
  overflow: hidden;
  background: #e8f1ed;
}

.page-hospital-detail .hospital-static-hero img {
  width: 100%;
  height: 100%;
  min-height: inherit;
  object-fit: cover;
}

/* v15: match the six new profiles to the established hospital Hero scale. */
.page-ruijin .hero-grid,
.page-zhongshan .hero-grid,
.page-huashan .hero-grid,
.page-shanghai-sixth-peoples .hero-grid,
.page-shanghai-ninth-peoples .hero-grid,
.page-redhouse .hero-grid {
  grid-template-columns: .88fr 1.12fr;
}

/* Existing two-image galleries form one full row; new three-image galleries do the same. */
.page-fudan .hospital-gallery-hd,
.page-renji .hospital-gallery-hd,
.page-xinhua .hospital-gallery-hd,
.page-huashan .hospital-gallery-hd {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.page-ruijin .hospital-gallery-hd,
.page-zhongshan .hospital-gallery-hd,
.page-shanghai-sixth-peoples .hospital-gallery-hd,
.page-shanghai-ninth-peoples .hospital-gallery-hd,
.page-redhouse .hospital-gallery-hd {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.page-hospital-detail .hospital-gallery-hd img,
.page-hospital-detail .hospital-gallery-hd img:first-child {
  grid-column: auto;
  width: 100%;
  height: clamp(240px, 21vw, 300px);
}

.hospital-experts-section {
  background: #eaf4f0;
  border-top: 1px solid rgba(36, 104, 92, .12);
}

.hospital-experts-section .section-head {
  display: block;
  max-width: none;
}

.hospital-expert-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.hospital-expert-card {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  min-height: 188px;
  padding: 18px;
  border: 1px solid rgba(36, 104, 92, .15);
  border-radius: 14px;
  background: #fff;
}

.hospital-expert-card img {
  width: 104px;
  height: auto;
  max-height: 150px;
  border-radius: 10px;
  object-fit: contain;
  object-position: center;
  background: #dceae4;
}

.hospital-expert-card .expert-specialty {
  margin: 1px 0 6px;
  color: #1f6f62;
  font-size: 13px;
  line-height: 1.35;
  font-weight: 700;
}

.hospital-expert-card h3 {
  margin: 0;
  color: var(--ink);
  font-size: 21px;
  line-height: 1.15;
  text-wrap: balance;
}

.hospital-expert-card p:last-child {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.52;
  text-wrap: pretty;
}

.page-hospitals .hospital-profile-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.page-hospitals .hospital-profile-grid .hospital-logo-tile {
  display: grid;
  min-height: 250px;
  padding: 34px;
  place-items: center;
  overflow: hidden;
  background: #fff;
}

.page-hospitals .hospital-profile-grid .hospital-logo-tile img {
  width: min(100%, 300px);
  max-width: 100%;
  max-height: 142px;
  object-fit: contain;
}

/* Keep the rank line and strength copy on the same baseline within each card row. */
.page-hospitals .hospital-profile-grid .visual-card > div:last-child {
  display: flex;
  flex-direction: column;
}

.page-hospitals .hospital-profile-grid .visual-card h3 {
  min-height: 46px;
}

.page-hospitals .hospital-profile-grid .visual-card .key-specialties {
  min-height: 21px;
}

.page-hospitals .hospital-profile-grid .visual-card .key-specialties:first-of-type {
  min-height: 42px;
}

@media (max-width: 980px) {
  .page-hospitals .hospital-profile-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .page-hospital-detail .hospital-gallery-hd {
    grid-template-columns: 1fr;
  }

  .page-hospital-detail .hospital-gallery-hd img,
  .page-hospital-detail .hospital-gallery-hd img:first-child {
    height: 280px;
  }
}

@media (max-width: 680px) {
  .page-hospitals .hospital-profile-grid {
    grid-template-columns: 1fr;
  }

  .hospital-expert-grid {
    grid-template-columns: 1fr;
  }

  .hospital-expert-card {
    grid-template-columns: 88px minmax(0, 1fr);
    min-height: 0;
    padding: 15px;
  }

  .hospital-expert-card img {
    width: 88px;
    max-height: 128px;
  }

  .page-hospital-detail .hospital-static-hero {
    min-height: 300px;
  }
}
