/* Keep the three faces at a comparable scale without altering the source portrait. */
.portrait-khutov img {
  position: absolute;
  top: 0;
  left: 50%;
  width: 118%;
  max-width: none;
  height: auto;
  transform: translate(-53%, -15%);
}

.site-header > .quick-contacts { display: none; }
.site-header nav { padding-inline: 6px; }
.site-header nav > .quick-contacts {
  display: flex;
  align-self: stretch;
  align-items: stretch;
  margin-left: 12px;
  border-left: 1px solid #ffffff48;
}
.quick-contacts :is(a, button) {
  display: grid;
  place-items: center;
  width: 44px;
  min-height: 44px;
}
.quick-contacts a:hover { background: #ffffff20; }
.quick-contacts svg,
.floating-contacts svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.nav-shell.stuck nav { color: #1e2f53; }
.nav-shell.stuck nav > .quick-contacts { margin-left: 6px; }
.nav-shell.stuck .quick-contacts a:hover { color: #1e2f53; }
.hero-controls { bottom: -37px; }

.floating-contacts {
  position: fixed;
  z-index: 9;
  right: max(16px, env(safe-area-inset-right));
  bottom: max(24px, calc(16px + env(safe-area-inset-bottom)));
  display: grid;
  gap: 8px;
  padding: 6px;
  border: 1px solid #d8e1ee;
  border-radius: 32px;
  background: #fffffff2;
  box-shadow: 0 4px 16px #23314b24;
}
.floating-contacts :is(a, button) {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: 50%;
  color: white;
  transition: background-color .2s;
}
.floating-contacts a:hover { background: var(--navy); color: white; }
.messengers :is(a, button) {
  border: 1px solid var(--signature);
  border-radius: 5px;
  padding: 8px 16px;
  color: var(--royal);
  font-size: 14px;
}
.messengers a:hover { border-color: var(--royal); background: var(--ice); }

.compact-footer {
  padding: 25px 0 19px;
  background: var(--navy);
  color: #e7edf7;
}
.footer-main {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 22px 34px;
}
.footer-brand {
  font-size: 25px;
  line-height: 1.12;
}
.footer-brand small {
  display: block;
  margin-top: 4px;
  font-size: 12px;
}
.compact-footer .footer-nav {
  justify-content: center;
  align-items: center;
  gap: 9px 18px;
  margin: 0;
  padding: 0;
  border: 0;
  font-size: 13px;
}
.footer-contact { display: grid; font-size: 13px; }
.footer-contact a:first-child { font-size: 15px; white-space: nowrap; }
.footer-documents {
  margin-top: 18px;
  border-top: 1px solid #ffffff30;
  border-bottom: 1px solid #ffffff30;
}
.footer-documents summary {
  display: flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  min-height: 44px;
  cursor: pointer;
  list-style: none;
  font-size: 14px;
}
.footer-documents summary::after {
  content: '';
  width: 7px;
  height: 7px;
  border: solid currentColor;
  border-width: 0 1px 1px 0;
  transform: rotate(45deg);
  margin-bottom: 4px;
}
.footer-documents[open] summary::after { transform: rotate(225deg); margin-bottom: 0; }
.compact-footer .legal-columns { padding: 4px 0 12px; }
.compact-footer .legal-columns h2 { margin: 0 0 7px; font-size: 15px; }
.compact-footer .legal-columns a,
.compact-footer .legal-columns button { margin: 5px 0; }
.compact-footer .legal-requisites {
  display: flex;
  flex-wrap: wrap;
  gap: 3px 17px;
  margin: 10px 0 0;
  padding: 0;
  border: 0;
  color: #d0dbef;
  font-size: 12px;
}
.compact-footer .legal-requisites p { margin: 0; }
.compact-footer .legal-requisites .medical { font-size: inherit; }
.compact-footer :focus-visible { outline-color: #f0c577; }

@media (max-width: 920px) {
  .quick-contacts :is(a, button) { width: 35px; }
  .site-header nav > .quick-contacts { margin-left: 4px; }
  .nav-shell.stuck nav > .nav-brand { min-width: 77px; }
  .footer-main { grid-template-columns: 1fr auto; gap: 12px 22px; }
  .compact-footer .footer-nav { grid-row: 2; grid-column: 1 / -1; justify-content: flex-start; }
}
@media (max-width: 720px) and (min-width: 621px) {
  .nav-shell.stuck nav > .quick-contacts { display: none; }
}
@media (max-width: 620px) {
  .site-header nav > .quick-contacts { display: none; }
  .site-header nav > a:not(.emergency-link),
  .nav-shell.stuck nav > a:not(.emergency-link) { color: #1e2f53; }
  .floating-contacts { right: 9px; bottom: max(14px, env(safe-area-inset-bottom)); gap: 5px; padding: 4px; }
  .floating-contacts :is(a, button) { width: 40px; height: 40px; }
  .floating-contacts svg { width: 20px; height: 20px; }
  .compact-footer > .wrap { padding-right: 49px; }
  .footer-main { gap: 12px 14px; }
  .compact-footer .footer-nav { gap: 8px 14px; }
  .footer-contact { min-width: 0; overflow-wrap: anywhere; font-size: 12px; }
  .footer-contact a:first-child { font-size: 13px; }
  .compact-footer .legal-requisites { gap: 5px; }
}

.quick-contacts button,
.floating-contacts button { padding: 0; border: 0; }
.quick-contacts button { background: transparent; color: inherit; }
.floating-contacts button { color: white; opacity: 1; }
.messengers button { background: transparent; }
@media (max-width: 820px) {
  .site-header nav > .quick-contacts { display: none; }
}

/* Use the official artwork. The floating buttons follow the reference's circular layout. */
.messenger-logo {
  display: block;
  width: 22px;
  height: 22px;
  flex: none;
  object-fit: contain;
}
.quick-contacts .messenger-logo { width: 24px; height: 24px; }
.floating-contacts button {
  width: 52px;
  height: 52px;
  overflow: hidden;
  background: transparent;
}
.floating-contacts .messenger-logo {
  width: 100%;
  height: 100%;
  border-radius: 50%;
}
.messengers button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
@media (max-width: 620px) {
  .floating-contacts button { width: 44px; height: 44px; }
}

.header-actions { display: flex; gap: 8px; flex-shrink: 0; }
.header-actions .button { display: inline-flex; align-items: center; gap: 8px; min-height: 46px; padding: 9px 13px; border-radius: 8px; background: #22355344; white-space: nowrap; font-size: 12px; }
.header-actions .button:hover { background: white; color: var(--royal); text-decoration: none; }
.header-actions img { flex: none; }
.site-header nav { border-radius: 9px; }
.site-header nav > a { padding-inline: clamp(6px, .85vw, 14px); }
@media (max-width: 1100px) { .header-actions .button { padding: 8px 10px; font-size: 11px; } }
@media (min-width: 621px) and (max-width: 820px) {
  .site-header nav > a { font-size: 10px; }
  .nav-shell.stuck nav > .nav-brand { display: none; }
}
@media (max-width: 620px) {
  .header-actions { display: none; }
  .site-header nav > a { padding-inline: 12px; }
}

.nav-section { position: relative; }
.nav-section summary {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 15px 12px;
  cursor: pointer;
  list-style: none;
  text-transform: uppercase;
  font-size: 12px;
  font-weight: 500;
}
.nav-section summary::-webkit-details-marker { display: none; }
.nav-section summary::after {
  content: "";
  width: 6px;
  height: 6px;
  border: solid currentColor;
  border-width: 0 1px 1px 0;
  transform: rotate(45deg) translateY(-2px);
}
.nav-section[open] summary::after { transform: rotate(225deg) translate(-1px, -1px); }
.nav-section ul {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 2;
  min-width: 224px;
  margin: 0;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  box-shadow: 0 8px 20px #23314b25;
  list-style: none;
}
.nav-section a { display: block; padding: 7px 11px; border-radius: 4px; }
.site-header .nav-section a:hover, .nav-section a:focus-visible { color: var(--navy); background: var(--ice); text-decoration: none; }
@media (min-width: 621px) and (max-width: 1100px) {
  .nav-section summary { padding-inline: 7px; font-size: 11px; }
}
@media (max-width: 620px) {
  .site-header nav.open { max-height: calc(100dvh - 100px); overflow: auto; }
  .nav-section summary { padding: 12px; font-size: 14px; text-transform: none; }
  .nav-section ul { position: static; margin: 0 10px 6px; box-shadow: none; }
}

.subpage-header {
  position: relative;
  padding-bottom: 18px;
  background: #283d64;
}
.site-header .nav-section summary { white-space: nowrap; }
.site-header .nav-section ul {
  width: max-content;
  max-width: 280px;
  max-height: min(60dvh, 440px);
  overflow: auto;
}
.site-header .nav-section:nth-last-of-type(-n+2) ul { right: 0; left: auto; }
.site-header .nav-search {
  display: grid;
  align-self: stretch;
  place-items: center;
  width: 40px;
  padding: 0;
}
.nav-search svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.6; }
[id^="doctor-"], [id^="service-"], #reviews, #offer-hygiene { scroll-margin-top: 100px; }
@media (min-width: 821px) and (max-width: 1250px) {
  .site-header .nav-section summary, .site-header nav > a { padding-inline: 7px; font-size: 10px; }
}
@media (min-width: 621px) and (max-width: 820px) {
  .site-header .nav-section summary, .site-header nav > a { padding-inline: 5px; font-size: 9.5px; }
  .site-header nav .emergency-link { padding-inline: 6px; font-size: 9.5px; }
}
@media (max-width: 620px) {
  .subpage-header { padding-bottom: 0; }
  .site-header .nav-section ul { width: auto; max-width: none; max-height: none; }
  .site-header .nav-search { width: 44px; min-height: 42px; }
}

.booking-dialog { position: fixed; width: min(430px, calc(100% - 30px)); border-radius: 16px; }
.booking-options { display: grid; gap: 8px; }
.booking-options a {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 50px;
  padding: 10px 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--navy);
}
.booking-options a:hover { background: var(--ice); }
.booking-options img { width: 26px; height: 26px; object-fit: contain; }
.booking-options span { margin-left: auto; font-size: 13px; white-space: nowrap; }

.prices-page .subpage-header {
  position: sticky;
  top: calc(-1 * var(--price-header-top, 0px));
}
.prices-page :is(.price-category, #price-search) {
  scroll-margin-top: max(110px, var(--price-sticky-height, 0px) + 12px);
}
@media (max-width: 620px) {
  .prices-page .subpage-header { top: 0; }
}

#doctor-khudoynazarov .portrait img,
#doctor-imagozheva .portrait img {
  object-position: center top;
}

.brand-mark img {
  display: block;
  width: 56px;
  height: auto;
  aspect-ratio: 1;
  border-radius: 8px;
}
@media (max-width: 620px) {
  .site-header .brand-mark img { width: 38px; border-radius: 5px; }
}

#doctors .heading-row { justify-content: flex-start; }
#doctors h2 { text-align: left; }

.comparison-collage { aspect-ratio: 2; }
.comparison-hygiene-1 { aspect-ratio: 750 / 330; }
.collage-frame { position: absolute; inset: 0; overflow: hidden; }
.comparison-collage .collage-frame img { height: auto; }
.comparison-collage .collage-after img { top: auto; bottom: 0; }
.comparison-hygiene-1 .collage-after img { bottom: -2%; }
.hygiene-guide { margin-top: 16px; scroll-margin-top: 105px; }
.hygiene-guide summary { cursor: pointer; width: fit-content; text-decoration: underline; text-underline-offset: .2em; }
.hygiene-guide img { display: block; max-width: 100%; height: auto; margin-top: 12px; }

.yandex-rating { display: grid; gap: 8px; }
.site-header nav .nav-booking { display: none; }
@media (max-width: 620px) {
  .site-header nav .nav-booking {
    display: block;
    align-self: flex-start;
    margin: 7px 12px;
    color: var(--navy);
    border-color: var(--navy);
  }
}
