/* V30: the supplied photographs, framed consistently without modifying faces.
   Scoped to photo elements only. Existing content, cards, themes and controls stay intact. */
html body.photo-update-v30 .doctor-photo-frame {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 0;
  max-height: none;
  aspect-ratio: 4 / 5;
  background: var(--soft-surface);
}

/* The original male portrait has a wider camera framing. These offsets match
   the female portrait's head size, headroom and eye line in every frame size. */
html body.photo-update-v30 .doctor-photo-frame--ranjith {
  --portrait-width: 138%;
  --portrait-left: -19%;
  --portrait-top: -8.5%;
}
html body.photo-update-v30 .doctor-photo-frame--pratheepa {
  --portrait-width: 100%;
  --portrait-left: 0%;
  --portrait-top: 0%;
}

html body.client-update-v27.photo-update-v30[data-page="home"] #qualifications .credential-profile.doctor-photo-frame {
  width: 100%;
  height: auto;
  min-height: 0;
  max-height: none;
  aspect-ratio: 4 / 5;
}

html body.client-update-v27.photo-update-v30[data-page="about"] .doctor-grid .doctor-portrait {
  height: auto;
  min-height: 0;
  aspect-ratio: auto;
  padding: 16px 12px 0;
}
html body.client-update-v27.photo-update-v30[data-page="about"] .doctor-grid .doctor-portrait .doctor-photo-frame {
  order: 0;
  flex: 0 0 auto;
  width: min(100%, 400px);
  height: auto;
  margin-inline: auto;
  border-radius: 14px;
}

/* An overlay border keeps the existing photo crop and aspect ratio intact. */
html body.client-update-v27.photo-update-v30[data-page="about"] .doctor-grid .doctor-portrait .doctor-photo-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  border: 2px solid var(--blue);
  border-radius: inherit;
  pointer-events: none;
}

html body.client-update-v27.photo-update-v30[data-page="home"] #qualifications .credential-profile.doctor-photo-frame > img,
html body.client-update-v27.photo-update-v30[data-page="about"] .doctor-grid .doctor-portrait .doctor-photo-frame > img {
  position: absolute;
  display: block;
  inset: auto;
  top: var(--portrait-top);
  left: var(--portrait-left);
  width: var(--portrait-width);
  height: auto;
  min-width: 0;
  min-height: 0;
  max-width: none;
  max-height: none;
  aspect-ratio: auto;
  object-fit: fill;
  object-position: center;
  border-radius: 0;
  transform: none;
  transition: none;
}

html body.client-update-v27.photo-update-v30[data-page="home"] .hero-visual {
  width: 100%;
  max-width: 520px;
  margin-inline: auto;
}
html body.client-update-v27.photo-update-v30[data-page="home"] .hero-photo-frame {
  position: relative;
  inset: auto;
  width: 100%;
  height: auto;
  min-height: 0;
  max-height: none;
  aspect-ratio: 4 / 5;
  overflow: hidden;
}
html body.client-update-v27.photo-update-v30[data-page="home"] .hero-photo-frame > img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  transform: none;
  transition: none;
}

@media (max-width: 820px) {
  html body.client-update-v27.photo-update-v30[data-page="home"] .hero-visual {
    max-width: 420px;
  }
  html body.client-update-v27.photo-update-v30[data-page="about"] .doctor-grid .doctor-portrait {
    padding: 12px 8px 0;
  }
}
