
/* Patch-12: feedback form notes + prevent notes breaking layout */
.feedback .form-note{
  margin-top: 6px;
  font-size: 12px;
  line-height: 1.3;
  opacity: .75;
  max-width: 100%;
}

/* Theme overrides / glue for WP */
.header__menu-sub-list[hidden],
.sidebar__menu-sub-list[hidden] {
  display: none !important;
}

/* Make accordion sections work even if editor outputs plain h2 + content */
.content__text .accordion-content {
  overflow: hidden;
  transition: max-height .3s ease;
}
.content__text h2 {
  cursor: pointer;
}

/* Ensure content container has some padding if old css isn't loaded */
.content__container {
  padding-left: 15px;
  padding-right: 15px;
}


/* Wiki archive helpers */
.sub-top{margin-top:0;}
.sub-top__container{max-width:1200px;margin:0 auto;padding:18px 16px;}


/* Admin bar: prevent overlap with fixed header */
body.admin-bar .header {
  top: 32px;
}
@media (max-width: 782px) {
  body.admin-bar .header {
    top: 46px;
  }
}

/* Reviews: make the whole card feel clickable (desktop uses card click because
   the "Показать полностью" link is hidden in the static design). */
.reviews__item[role="button"] {
  cursor: pointer;
}
.reviews__item[role="button"]:focus {
  outline: 2px solid var(--secondary);
  outline-offset: 4px;
}


/* ===== GALLERY LIGHTBOX (no external libraries) ===== */
.gallery-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
}

.gallery-lightbox.is-open {
  display: block;
}

.gallery-lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.65);
}

/* Fullscreen "stage" with centered image (no white panel). */
.gallery-lightbox__dialog {
  position: absolute;
  inset: 0;
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
}

/* Image is strictly limited by viewport and keeps its natural ratio. */
.gallery-lightbox__img {
  width: auto;
  height: auto;
  max-width: calc(100vw - 48px);
  max-height: calc(100vh - 48px);
  object-fit: contain;
  background: #111;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0,0,0,.35);
}

/* Controls */
.gallery-lightbox__close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  border: 0;
  background: rgba(255,255,255,.92);
  cursor: pointer;
  font-size: 28px;
  line-height: 42px;
  text-align: center;
}

.gallery-lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 0;
  background: rgba(255,255,255,.92);
  cursor: pointer;
  font-size: 28px;
  line-height: 44px;
  text-align: center;
  user-select: none;
}

.gallery-lightbox__prev { left: 18px; }
.gallery-lightbox__next { right: 18px; }

.gallery-lightbox__counter {
  position: absolute;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(0,0,0,.55);
  color: #fff;
  font-size: 14px;
  line-height: 1;
}

@media (max-width: 640px) {
  .gallery-lightbox__dialog { padding: 12px; }
  .gallery-lightbox__img {
    max-width: calc(100vw - 24px);
    max-height: calc(100vh - 24px);
    border-radius: 12px;
  }
  .gallery-lightbox__close { top: 12px; right: 12px; }
  .gallery-lightbox__prev { left: 10px; }
  .gallery-lightbox__next { right: 10px; }
  .gallery-lightbox__counter { bottom: 12px; }
}

html.is-locked, html.is-locked body {
  overflow: hidden !important;
}

/* ===== FAQ spollers hard-hide fix =====
   Some browsers/styles can leave an "empty" space after collapsing spollers.
   Enforce display rules based on spoller state to prevent layout artifacts.
*/
.faq .faq__answer[hidden] {
  display: none !important;
}
.faq .spollers__title:not(._spoller-active) + .faq__answer {
  display: none;
}
.faq .spollers__title._spoller-active + .faq__answer {
  display: block;
}

/* ===== CF7 in service FAQ form =====
   CF7 outputs wrapper spans around inputs.
   In this block we want the legacy layout to stay intact.
*/
.faq__form form.wpcf7-form{margin:0;}
.faq__form .wpcf7{margin:0;}
.faq__form .wpcf7-form-control-wrap{display:contents;}
.faq__form .wpcf7-not-valid-tip{margin-top:6px;font-size:12px;line-height:1.3;opacity:.8;}
.faq__form .wpcf7-response-output{margin:12px 0 0;font-size:13px;line-height:1.35;}

/* ===== LIVE SEARCH (WP glue) ===== */
/* In original layout this counter is visible; in the bundled CSS it is hidden. */
.search__total-count{display:block;}
/* Preserve line breaks in descriptions (the REST returns newline-separated bullet lines). */
.search__result-description{white-space:pre-line;}

.page-articles__container {
        padding-bottom: 12rem;
        overflow: hidden;
    }
	
	@media (max-width: 782px) {
    body.admin-bar .header {
        top: 46px;
        overflow: hidden;
    }
}

    .reviews, .doctors {
  
        overflow: hidden;
    }
	
	.page-articles__container, .reviews {
    padding-bottom: 0rem;
    overflow: hidden;
}

.reviews {
    position: relative;
    margin-bottom: 7rem;
}

section {
    margin-bottom: 11rem;
}

.box {
    background-color: var(--bg-primary);
    box-shadow: none !important;
}

.reviews__user {
    display: flex;
    margin-top: -3rem;
    margin-left: 1rem;
    margin-right: 1rem;
    border-radius: 0 0 3rem 3rem;
    border: 1px solid #fff;
    background-color: var(--bg-secondary);
    box-shadow: none !important;
    padding: 5rem 3rem 2rem;
    gap: 3rem;
    align-items: center;
}

/* Theme overrides / glue for WP */
.header__menu-sub-list[hidden],
.sidebar__menu-sub-list[hidden] {
  display: none !important;
}

/* Make accordion sections work even if editor outputs plain h2 + content */
.content__text .accordion-content {
  overflow: hidden;
  transition: max-height .3s ease;
}
.content__text h2 {
  cursor: pointer;
}

/* Ensure content container has some padding if old css isn't loaded */
.content__container {
  padding-left: 15px;
  padding-right: 15px;
}


/* Wiki archive helpers */
.sub-top{margin-top:0;}
.sub-top__container{max-width:1200px;margin:0 auto;padding:18px 16px;}


/* Admin bar: prevent overlap with fixed header */
body.admin-bar .header {
  top: 32px;
}
@media (max-width: 782px) {
  body.admin-bar .header {
    top: 46px;
  }
}

/* Reviews: make the whole card feel clickable (desktop uses card click because
   the "Показать полностью" link is hidden in the static design). */
.reviews__item[role="button"] {
  cursor: pointer;
}
.reviews__item[role="button"]:focus {
  outline: 2px solid var(--secondary);
  outline-offset: 4px;
}


/* ===== GALLERY LIGHTBOX (no external libraries) ===== */
.gallery-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
}

.gallery-lightbox.is-open {
  display: block;
}

.gallery-lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.65);
}

/* Fullscreen "stage" with centered image (no white panel). */
.gallery-lightbox__dialog {
  position: absolute;
  inset: 0;
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
}

/* Image is strictly limited by viewport and keeps its natural ratio. */
.gallery-lightbox__img {
  width: auto;
  height: auto;
  max-width: calc(100vw - 48px);
  max-height: calc(100vh - 48px);
  object-fit: contain;
  background: #111;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0,0,0,.35);
}

/* Controls */
.gallery-lightbox__close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  border: 0;
  background: rgba(255,255,255,.92);
  cursor: pointer;
  font-size: 28px;
  line-height: 42px;
  text-align: center;
}

.gallery-lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 0;
  background: rgba(255,255,255,.92);
  cursor: pointer;
  font-size: 28px;
  line-height: 44px;
  text-align: center;
  user-select: none;
}

.gallery-lightbox__prev { left: 18px; }
.gallery-lightbox__next { right: 18px; }

.gallery-lightbox__counter {
  position: absolute;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(0,0,0,.55);
  color: #fff;
  font-size: 14px;
  line-height: 1;
}

@media (max-width: 640px) {
  .gallery-lightbox__dialog { padding: 12px; }
  .gallery-lightbox__img {
    max-width: calc(100vw - 24px);
    max-height: calc(100vh - 24px);
    border-radius: 12px;
  }
  .gallery-lightbox__close { top: 12px; right: 12px; }
  .gallery-lightbox__prev { left: 10px; }
  .gallery-lightbox__next { right: 10px; }
  .gallery-lightbox__counter { bottom: 12px; }
}

html.is-locked, html.is-locked body {
  overflow: hidden !important;
}

/* ===== FAQ spollers hard-hide fix =====
   Some browsers/styles can leave an "empty" space after collapsing spollers.
   Enforce display rules based on spoller state to prevent layout artifacts.
*/
.faq .faq__answer[hidden] {
  display: none !important;
}
.faq .spollers__title:not(._spoller-active) + .faq__answer {
  display: none;
}
.faq .spollers__title._spoller-active + .faq__answer {
  display: block;
}

/* ===== LIVE SEARCH (WP glue) ===== */
/* In original layout this counter is visible; in the bundled CSS it is hidden. */
.search__total-count{display:block;}
/* Preserve line breaks in descriptions (the REST returns newline-separated bullet lines). */
.search__result-description{white-space:pre-line;}

.page-articles__container {
        padding-bottom: 12rem;
        overflow: hidden;
    }
	
	@media (max-width: 782px) {
    body.admin-bar .header {
        top: 46px;
        overflow: hidden;
    }
}

    .reviews {
  
        overflow: hidden;
    }

/* ================================
   Online-help dialog (CF7) fixes + notices
   - Keep phone + submit inside the modal
   - Make CF7 response messages render neatly inside dialog content
   ================================ */

#online-help .wpcf7 { width: 100%; }

#online-help .wpcf7 form.wpcf7-form {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;

  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  align-items: flex-start;
}

#online-help .wpcf7 form.wpcf7-form > fieldset.hidden-fields-container,
#online-help .wpcf7 form.wpcf7-form > .hidden-fields-container {
  flex: 0 0 0;
  width: 0;
  min-width: 0;
  padding: 0;
  margin: 0;
  border: 0;
}

#online-help .wpcf7 form.wpcf7-form > .form__item {
  flex: 1 1 32rem;
  min-width: 0;
}

#online-help .wpcf7 form.wpcf7-form > .button-block {
  flex: 0 0 26rem;
  min-width: 0;
  margin-top: 0;
  justify-content: center;
}

#online-help .wpcf7 form.wpcf7-form .form__item,
#online-help .wpcf7 form.wpcf7-form .form__item > .form__item,
#online-help .wpcf7 form.wpcf7-form .wpcf7-form-control-wrap {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

#online-help .wpcf7 form.wpcf7-form .form__input,
#online-help .wpcf7 form.wpcf7-form input[type="tel"],
#online-help .wpcf7 form.wpcf7-form input[type="text"],
#online-help .wpcf7 form.wpcf7-form input[type="email"] {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

#online-help .wpcf7 form.wpcf7-form .wpcf7-submit {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

#online-help .wpcf7 form.wpcf7-form .wpcf7-spinner {
  margin-left: 10px;
}

/* CF7 messages: keep inside, full width, readable */
#online-help .wpcf7 form.wpcf7-form .wpcf7-response-output {
  flex: 1 1 100%;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;

  margin: 0;
  margin-top: 1.2rem;
  padding: 1.2rem 1.4rem;
  border-radius: 1.4rem;

  word-break: break-word;
  overflow-wrap: anywhere;
}

#online-help .wpcf7 form.wpcf7-form .wpcf7-response-output:empty {
  display: none;
}

/* Hide duplicated screen-reader output inside the dialog */
#online-help .wpcf7 .screen-reader-response {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

@media (max-width: 768px) {
  #online-help .wpcf7 form.wpcf7-form > .button-block {
    flex: 1 1 100%;
  }
}

.main-info--service  {
    min-height: initial;
    height: auto;
    max-width: 100%;
    overflow: hidden;
}

.services__container {
    margin-bottom: 16rem;
}

.feedback .form-note {
    font-size: 1.6rem;
}

.header .logo img {
    position: absolute;
    bottom: 0;
    margin-bottom: 2rem;
    transition: all .3s;
    width: 25rem;
}

.doctor__specialization h3, .doctor__specialization h4 {
    margin-top: 1rem  !important;
    margin-bottom: 1rem  !important;
}

@media (hover: none), (pointer: coarse), (max-width: 768px) {
  #online-help .wpcf7 form.wpcf7-form > .form__item {
    flex: auto;
    min-width: 0;
  }
}

/* Message modal: keep actions centered (OK button) */
dialog#modal-message .modal-message__actions {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

/* Квиз: временно скрываем прогресс (шаги 1-4 + линия) */
.feedback__form-content--quiz .quiz__progress{
  display: none !important;
}

/* Квиз: убираем возможный верхний отступ, если он был под прогресс */
.feedback__form-content--quiz .quiz__content{
  padding-top: 0 !important;
  margin-top: 0 !important;
}

/* ------------------------------------------------------------
   Wiki archive cards: mobile-safe meta row + stable desktop grid
------------------------------------------------------------ */

.blog__container.gr-3-1,
.blog__box,
.page-articles__container,
.page-articles__items,
.page-articles__article {
  min-width: 0;
}

@media (min-width: 768px) {
  .blog__container.gr-3-1 {
    grid-template-columns: minmax(0, calc(.75 * (100% - 9rem) + 6rem)) minmax(0, calc((100% - 9rem) / 4));
    align-items: start;
  }

  .page-articles__items.gr-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.page-articles__article .page-articles__image{
  margin-bottom: 1.2rem;
}

.page-articles__article .page-articles__info.page-articles__info--meta{
  justify-content: space-between;
  align-items: flex-start;
  gap: .8rem;
  flex-wrap: nowrap;
}

.page-articles__article .page-articles__info--meta .page-articles__info-left{
  display: flex;
  align-items: center;
  flex: 0 1 auto;
  min-width: 0;
}

.page-articles__article .page-articles__info--meta .page-articles__info-right{
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: flex-start;
  gap: .4rem;
  text-align: right;
  flex: 1 1 auto;
  min-width: 0;
  max-width: 68%;
}

.page-articles__article .page-articles__info--meta .page-articles__info-item--author{
  display: flex;
  align-items: baseline;
  justify-content: flex-end;
  gap: .6rem;
  width: 100%;
  min-width: 0;
  font-weight: 400;
  color: var(--text-secondary);
}

.page-articles__article .page-articles__info--meta .page-articles__author-label{
  opacity: .8;
  flex: 0 0 auto;
}

.page-articles__article .page-articles__info--meta .page-articles__info-item--data{
  white-space: nowrap;
}

.page-articles__article .page-articles__info--meta .page-articles__author-name{
  display: block;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.page-articles__article .page-articles__excerpt{
  padding: 0 1rem;
  margin: 0 0 1.6rem 0;
  font-size: 1.6rem;
  line-height: 1.35;
  color: var(--text-secondary);

  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}

@media (max-width: 767.98px) {
  .page-articles__article,
  .page-articles__article > a {
    min-width: 0;
  }

  .page-articles__article .page-articles__title {
    min-height: auto;
  }

  .page-articles__article .page-articles__image{
    margin-bottom: 1.6rem;
  }

  .page-articles__article .page-articles__info.page-articles__info--meta{
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "badge date"
      "author author";
    align-items: start;
    row-gap: .5rem;
    column-gap: 1.2rem;
  }

  .page-articles__article .page-articles__info--meta .page-articles__info-left{
    grid-area: badge;
    min-width: 0;
    align-self: start;
  }

  .page-articles__article .page-articles__info--meta .page-articles__info-right{
    display: contents;
  }

  .page-articles__article .page-articles__info--meta .page-articles__info-item--data{
    grid-area: date;
    justify-self: end;
    text-align: right;
    white-space: nowrap;
  }

  .page-articles__article .page-articles__info--meta .page-articles__info-item--author{
    grid-area: author;
    display: flex;
    align-items: baseline;
    justify-content: flex-start;
    gap: .4rem;
    width: auto;
    min-width: 0;
    flex-wrap: wrap;
  }

  .page-articles__article .page-articles__info--meta .page-articles__author-label{
    flex: 0 0 auto;
  }

  .page-articles__article .page-articles__info--meta .page-articles__author-name{
    min-width: 0;
    flex: 1 1 14rem;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    overflow-wrap: anywhere;
  }

  .page-articles__article .page-articles__excerpt{
    font-size: 1.8rem;
    margin-bottom: 2rem;
    -webkit-line-clamp: 4;
  }
}

/* =========================
   Service: share buttons
   ========================= */

.share{
  margin-top: 24px;
}

.share__wrap{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px;
  border-radius: 24px;
}

.share__left{
  min-width: 280px;
}

.share__title{
  font-size: 18px;
  font-weight: 700;
  line-height: 1.2;
}

.share__subtitle{
  margin-top: 6px;
  font-size: 14px;
  line-height: 1.3;
  color: rgba(100, 115, 131, 1);
}

.share__buttons{
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.share__btn{
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  border: 1px solid rgba(239, 242, 246, 1);
  background: #fff;
  color: rgba(100, 115, 131, 1);

  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;

  cursor: pointer;
  user-select: none;

  transition: transform .15s ease, box-shadow .15s ease, color .15s ease, background-color .15s ease, border-color .15s ease;
}

.share__btn:hover{
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(16, 24, 40, 0.08);
  color: rgba(34, 43, 55, 1);
}

.share__glyph{
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .4px;
}

.share__btn.is-copied{
  background: rgba(234, 246, 240, 1);
  border-color: rgba(209, 239, 223, 1);
  color: rgba(39, 121, 80, 1);
}

.share__btn[data-flash]::after{
  content: attr(data-flash);
  position: absolute;
  top: -34px;
  left: 50%;
  transform: translateX(-50%);

  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;

  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(34, 43, 55, 1);
  color: #fff;

  opacity: 0;
  pointer-events: none;
  transition: opacity .12s ease;
}

.share__btn.is-copied[data-flash]::after{
  opacity: 1;
}

@media (max-width: 768px){
  .share__wrap{
    flex-direction: column;
    align-items: flex-start;
  }
  .share__left{
    min-width: 0;
  }
  .share__buttons{
    justify-content: flex-start;
  }
}

/* =============================
   Sticky footer (layout fix)
   ============================= */

/*
  Делаем общий layout через flex, чтобы футер всегда прижимался к низу,
  даже на страницах с коротким контентом (404/403 и т.п.).
*/
body{
  display: flex;
  flex-direction: column;
}

/* Основной контентный <main> растягиваем по высоте */
body > main{
  flex: 1 0 auto;
}

/* На всякий случай, если где-то футер теряет авто-прижатие */
footer.footer{
  margin-top: auto;
}

.single-page {
    margin-top: 10rem !important;
	padding-top: 10rem !important;
} 

.samed-error {
    flex: 1 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    margin-top: 10rem;
	margin-bottom: 10rem;
}

span.share__glyph img {
    max-width: 90%;
}

.share__glyph {
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.reviews, .doctors {
    overflow: hidden;
	display: contents;
    padding-bottom: 10rem !important;
}
/* =========================
   Locations: header + slider (when филиалов > 6)
   ========================= */

.locations__cards-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  margin: 0 0 24px;
}

/* Header above cards: "title-box" layout + slider arrows */
.locations__head.title-box{
  margin-bottom: 24px;
}

.locations__cards-title{
  font-size: 18px;
  font-weight: 700;
}

.locations__cards-nav{
  display:flex;
  align-items:center;
  gap:10px;
}

.locations__nav-btn{
  width: 48px;
  height: 48px;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: #fff;
  display:grid;
  place-items:center;
  cursor:pointer;
}

.locations__nav-btn:hover{
  border-color: rgba(0, 0, 0, 0.18);
}

.locations__nav-btn:disabled{
  opacity: .4;
  cursor: default;
}

/* Slider wrapper injected by JS */
.locations__viewport{
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.locations__viewport::-webkit-scrollbar{ display:none; }

.locations__track{
  display:flex;
  gap: 0;
}

.locations__slide{
  flex: 0 0 100%;
  scroll-snap-align: start;
  display:grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

@media (max-width: 768px){
  .locations__slide{ grid-template-columns: 1fr; }
}

/* Active card highlight */
.locations__item.is-active{
  border-color: rgba(42, 125, 225, 0.45);
  box-shadow: 0 0 0 2px rgba(42, 125, 225, 0.12);
}

/* Yandex widget iframe fit */
#locations-map iframe,
.locations__map iframe{
  width:100%;
  height:100%;
  border:0;
  display:block;
}

/* "Сайт не указан" */
.locations__link.locations__link--disabled{
  pointer-events:none;
  opacity: .55;
}

.locations__map-empty{
  display:flex;
  align-items:center;
  justify-content:center;
  height:100%;
  padding: 24px;
  color: rgba(0,0,0,.45);
  text-align:center;
}

.locations__list[data-slider-ready="1"]{ display:block; }



/* FIX8: locations slider + header admin bar */
/* Header: don't shift whole site when admin bar exists; also avoid clipping decorative parts */
body.admin-bar .header{
  top: 32px !important;
  overflow: visible !important;
}
@media (max-width: 782px){
  body.admin-bar .header{ top: 46px !important; }
}
body:not(.admin-bar) .header{
  top: 0 !important;
  overflow: visible !important;
}

/* Locations slider: the viewport must be horizontally scrollable for arrows to work */
.locations__viewport{
  overflow-x: auto !important;
  overflow-y: hidden !important;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
}
.locations__viewport::-webkit-scrollbar{ display: none; }

.reviews__container, .doctors__container {
    position: relative;
    margin-bottom: 7rem;
}

.contacts {
    margin-bottom: 0;
    max-width: 100%;
    overflow: clip;
}

body > main {
    flex: 1 0 auto;
    overflow: hidden;
    max-width: 100%;
}

/* CF7: согласие (acceptance) — не даём span "ломать" строку */
.wpcf7 .wpcf7-acceptance .wpcf7-list-item > label{
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

/* Сам чекбокс не растягиваем */
.wpcf7 .wpcf7-acceptance input[type="checkbox"]{
  margin: 0;
  flex: 0 0 auto;
}

/* Главный виновник: label-текст у CF7 иногда становится block и уезжает на новую строку */
.wpcf7 .wpcf7-acceptance .wpcf7-list-item-label{
  display: inline !important;
  white-space: nowrap; /* если хочешь вообще без переносов */
}
.faq__form-consent .button {
    display: flex;
    position: relative;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    height: 6.4rem;
    width: -moz-max-content;
    width: max-content;
    padding: 0 3rem;
    background-color: var(--secondary);
    background: linear-gradient(to top, var(--secondary), var(--secondary-40));
    color: var(--bg-primary);
    border-radius: 1.2rem;
    font-weight: 400;
    min-width: 200px;
    z-index: 30;
    letter-spacing: .06rem;
}

.form__consent-label {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.form__consent-label input[type="checkbox" i] {
    width: auto;
}

.feedback__form-items .button-block {
    align-items: center;
	margin-bottom: 4.3rem;
}

.main-info {
    max-width: 100%;
    overflow: clip !important;
}

    .main-info--picture {

        overflow: hidden;
    }
/* =============================
   Doctor selector dialog
   ============================= */
.doctor-selector-dialog__search {
  margin: 0 0 2rem;
}

.doctor-selector-dialog__search .form__input {
  width: 100%;
}

.doctor-selector-dialog .doctor-card {
  width: 100%;
  text-align: left;
  font: inherit;
}

.doctor-selector-dialog .doctor-card:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.doctor-selector-dialog__empty {
  margin-top: 1.6rem;
  opacity: .8;
}

/* =============================
   Appointment date dialog
   ============================= */
.appointment-date-dialog__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.2rem;
  margin: 0 0 1.2rem;
}

.appointment-date-dialog__month {
  font-weight: 600;
  text-align: center;
  flex: 1 1 auto;
}

.appointment-date-dialog__nav {
  width: 4rem;
  height: 4rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 1.2rem;
  border: 1px solid var(--primary-20, rgba(0,0,0,.15));
  background: var(--bg-primary, #fff);
  color: var(--primary);
  cursor: pointer;
}

.appointment-date-dialog__nav:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.appointment-date-dialog__grid {
  margin-bottom: 1.6rem;
}

.appointment-date-dialog__weekdays,
.appointment-date-dialog__days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: .6rem;
}

.appointment-date-dialog__weekdays span {
  text-align: center;
  font-size: 1.2rem;
  opacity: .65;
}

.appointment-date-dialog__day {
  height: 3.8rem;
  border-radius: 1.2rem;
  border: 1px solid transparent;
  background: var(--bg-primary, #fff);
  color: inherit;
  cursor: pointer;
  font: inherit;
}

.appointment-date-dialog__day--empty {
  height: 3.8rem;
}

.appointment-date-dialog__day.is-disabled {
  opacity: .35;
  cursor: not-allowed;
}

.appointment-date-dialog__day.is-today {
  border-color: var(--primary-20, rgba(0,0,0,.15));
}

.appointment-date-dialog__day.is-selected {
  background: var(--primary);
  color: var(--bg-primary, #fff);
}

.appointment-date-dialog__day:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.appointment-date-dialog__actions {
  display: flex;
  gap: 1.2rem;
  justify-content: flex-end;
  flex-wrap: wrap;
}


.form_fix {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 2rem;
}

.form_fix_fix {
    display: flex;
    flex-direction: row;
    gap: 20px;
}

.form_fix input[type="checkbox" i] {
    max-width: 15px !important;
}

/* =============================
   Wiki term hub
   ============================= */
.wiki-term-intro {
  display: grid;
  gap: 2.4rem;
  margin-bottom: 3rem;
  padding: 3rem;
}

.wiki-term-intro__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 2rem;
}

.wiki-term-intro__eyebrow {
  margin-bottom: .8rem;
  color: var(--primary);
  font-size: 1.4rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.wiki-term-intro__title {
  margin: 0;
}

.wiki-term-intro__count {
  flex: 0 0 auto;
  min-width: 12rem;
  padding: 1rem 1.4rem;
  border-radius: 999px;
  background: var(--bg-secondary);
  text-align: center;
  font-weight: 700;
  white-space: nowrap;
}

.wiki-term-intro__text {
  color: var(--text-secondary);
}

.wiki-term-intro__text > *:first-child {
  margin-top: 0;
}

.wiki-term-intro__text > *:last-child {
  margin-bottom: 0;
}

.wiki-term-intro__terms {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.wiki-term-intro__term {
  display: inline-flex;
  align-items: center;
  gap: .8rem;
  padding: 1rem 1.4rem;
  border: 1px solid rgba(0, 0, 0, .08);
  border-radius: 999px;
  background: #fff;
  color: inherit;
  text-decoration: none;
  transition: border-color .2s ease, color .2s ease, transform .2s ease;
}

.wiki-term-intro__term:hover,
.wiki-term-intro__term:focus-visible {
  color: var(--primary);
  border-color: var(--primary);
  transform: translateY(-1px);
}

.wiki-term-intro__term.is-active {
  border-color: var(--primary);
  background: rgba(0, 177, 79, .08);
  color: var(--primary);
}

.wiki-term-intro__term-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.6rem;
  height: 2.6rem;
  padding: 0 .7rem;
  border-radius: 999px;
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-size: 1.2rem;
  line-height: 1;
}

@media (max-width: 767.98px) {
  .wiki-term-intro {
    padding: 2.4rem;
  }

  .wiki-term-intro__head {
    flex-direction: column;
  }

  .wiki-term-intro__count {
    min-width: 0;
  }
}


/* ===== DOCTOR DIPLOMAS ===== */
.doctor__diplomas{
  margin:32px 0 0;
}

.doctor__diplomas-button,
.doctor__diplomas .button--services{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:100%;
  min-width:0;
  margin:0;
  gap:1.2rem;
  text-align:center;
}

.doctor__diplomas-button svg,
.doctor__diplomas .button--services svg{
  width:1.8rem;
  height:1.8rem;
  flex:0 0 auto;
}

.doctor__diplomas-button span,
.doctor__diplomas .button--services span{
  flex:0 1 auto;
}

.doctor__diplomas-items[hidden]{
  display:none !important;
}

.gallery-lightbox__caption{
  position:absolute;
  left:50%;
  bottom:24px;
  transform:translateX(-50%);
  max-width:min(calc(100vw - 64px), 820px);
  padding:10px 14px;
  border-radius:14px;
  background:rgba(0,0,0,.58);
  color:#fff;
  font-size:14px;
  line-height:1.35;
  text-align:center;
  box-shadow:0 10px 30px rgba(0,0,0,.2);
}

@media (max-width: 47.99875em) {
  .doctor__diplomas{
    margin-top:24px;
  }

  .doctor__diplomas-button,
  .doctor__diplomas .button--services{
    min-width:0;
    padding:0 2.4rem;
  }

  .doctor__diplomas-button svg,
  .doctor__diplomas .button--services svg{
    width:2.4rem;
    height:2.4rem;
  }
}

@media (max-width: 640px) {
  .gallery-lightbox__caption{
    bottom:16px;
    width:calc(100vw - 32px);
    max-width:none;
    font-size:13px;
    padding:9px 12px;
  }
}


/* =============================
   Mobile menu: nested header/services accordions
   ============================= */
.services-menu__mobile {
  display: none;
}

@media (max-width: 47.99875em) {
  .header__menu-item.menu-item-has-children {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
  }

  .header__menu-item.menu-item-has-children > .menu__link,
  .services-menu__mobile-link {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: .8rem;
    max-width: 100%;
  }

  .header__menu-item.menu-item-has-children > .menu__link {
    width: auto;
  }

  .header__menu-item.menu-item-has-children > .menu__link .menu__arrow,
  .services-menu__mobile-link .menu__arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 4.4rem;
    width: 4.4rem;
    height: 4.4rem;
    margin-left: .2rem;
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 1.4rem;
    background: rgba(255,255,255,.04);
  }

  .header__menu-item.menu-item-has-children > .menu__link .menu__arrow svg,
  .services-menu__mobile-link .menu__arrow svg {
    width: 1.6rem;
    height: 1.6rem;
    color: var(--bg-primary);
    stroke: currentColor;
    transition: transform .2s ease;
  }

  .header__menu-item.menu-item-has-children > .menu__link .menu__arrow[aria-expanded="true"] svg,
  .services-menu__mobile-link .menu__arrow[aria-expanded="true"] svg {
    transform: rotate(180deg);
  }

  .header__menu-sub-list,
  .services-menu__mobile-sub-list {
    width: 100%;
    margin: 0 0 1.2rem;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    max-height: 0;
    transition: max-height .3s ease;
  }

  .header__menu-sub-list[hidden],
  .services-menu__mobile-sub-list[hidden] {
    display: none !important;
  }

  .header__menu-sub-item,
  .services-menu__mobile-sub-item {
    display: block;
  }

  .header__menu-sub-item a,
  .services-menu__mobile-sublink {
    display: block;
    padding: 1.4rem 0 1.4rem 2.8rem;
    color: var(--bg-primary);
    font-size: 2.2rem;
    line-height: 1.2;
    opacity: .9;
  }

  .services-menu__box {
    display: none;
  }

  .services-menu__mobile {
    display: block;
  }

  .services-menu__mobile-list,
  .services-menu__mobile-sub-list {
    list-style: none;
  }

  .services-menu__mobile-list {
    margin: 0;
    padding: 0;
  }

  .services-menu__mobile-item + .services-menu__mobile-item {
    margin-top: .8rem;
  }

  .services-menu__mobile-link {
    color: var(--bg-primary);
    min-height: 6.4rem;
  }

  .services-menu__mobile-link > span:first-child {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 2.8rem;
    line-height: 1.15;
    font-weight: 500;
  }

  .services-menu__mobile-sublink {
    padding-left: 3.4rem;
  }
}

/* =============================
   Main info hero: mobile card fix
   "Мы открыты для всех"
   ============================= */
@media (max-width: 47.99875em) {
  .main-info__cards {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0;
    min-width: 0;
    width: auto;
    max-width: calc(100% - 1.2rem);
    height: auto;
    padding: 1.4rem 1.8rem 1.4rem 2.2rem;
    border-radius: 3.2rem 0 0 0;
    box-sizing: border-box;
  }

  .main-info__cards::after {
    content: none;
    display: none;
  }

  .main-info__card {
    width: auto;
    min-width: 0;
  }

  .main-info__card-title {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.35rem;
    margin-bottom: 0;
    font-size: clamp(2.2rem, 5.4vw, 2.8rem);
    line-height: 1.15;
    word-break: normal;
    overflow-wrap: normal;
  }

  .main-info__card-title span {
    display: inline;
    font-size: inherit;
    line-height: inherit;
    white-space: nowrap;
  }

  .main-info--service .main-info__cards {
    min-width: 0;
    width: auto;
    max-width: calc(100% - 1.2rem);
    padding: 1.4rem 2.2rem 1.4rem 1.8rem;
    height: auto;
  }
}

/* =============================
   Main info hero: refined mobile corner
   ============================= */
@media (max-width: 47.99875em) {
  .main-info--picture .main-info__cards,
  .main-info--service .main-info__cards {
    overflow: visible;
    isolation: isolate;
  }

  .main-info--picture .main-info__cards {
    max-width: calc(100% - 1rem);
    padding: 1.4rem 1.8rem 1.4rem 1.9rem;
    border-radius: 3.2rem 0 0 0;
  }

  .main-info--picture .main-info__cards::after {
    content: "";
    display: block;
    position: absolute;
    left: -2.2rem;
    bottom: 0;
    width: 3.8rem;
    height: 100%;
    background: var(--bg-secondary);
    transform: skewX(-30deg);
    transform-origin: bottom right;
    border-radius: 0 0 0 1.2rem;
    z-index: 0;
    pointer-events: none;
  }

  .main-info--service .main-info__cards {
    max-width: calc(100% - 1rem);
    padding: 1.4rem 1.9rem 1.4rem 1.8rem;
    border-radius: 0 3.2rem 0 0;
  }

  .main-info--service .main-info__cards::after {
    content: "";
    display: block;
    position: absolute;
    left: auto;
    right: -2.2rem;
    bottom: 0;
    width: 3.8rem;
    height: 100%;
    background: var(--bg-secondary);
    transform: skewX(30deg);
    transform-origin: bottom left;
    border-radius: 0 0 1.2rem 0;
    z-index: 0;
    pointer-events: none;
  }

  .main-info--picture .main-info__card,
  .main-info--service .main-info__card {
    position: relative;
    z-index: 1;
  }

  .main-info--picture .main-info__card-title,
  .main-info--service .main-info__card-title {
    gap: 0.25rem 0.45rem;
  }
}


/* =============================
   Homepage services: mobile accordion fallback
   ============================= */
.services__mobile {
  display: none;
}

@media (max-width: 47.99875em) {
  .services__tabs {
    display: none;
  }

  .services__mobile {
    display: block;
  }

  .services__mobile-groups,
  .services__mobile-panel {
    margin: 0;
    padding: 0;
    list-style: none;
  }

  .services__mobile-group + .services__mobile-group {
    margin-top: 1.2rem;
  }

  .services__mobile-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.2rem;
    width: 100%;
    padding: 2rem 2.2rem;
    border: 1px solid var(--primary-8);
    border-radius: 2.4rem;
    background: #fff;
    color: var(--primary);
    text-align: left;
  }

  .services__mobile-title {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 2.6rem;
    line-height: 1.15;
    font-weight: 700;
  }

  .services__mobile-trigger .menu__arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 5.2rem;
    width: 5.2rem;
    height: 5.2rem;
    border: 1px solid var(--primary-8);
    border-radius: 1.6rem;
    background: var(--bg-secondary);
  }

  .services__mobile-trigger .menu__arrow svg {
    width: 1.6rem;
    height: 1.6rem;
    transition: transform .2s ease;
  }

  .services__mobile-trigger .menu__arrow[aria-expanded="true"] svg {
    transform: rotate(180deg);
  }

  .services__mobile-panel {
    overflow: hidden;
    max-height: 0;
    transition: max-height .3s ease;
  }

  .services__mobile-panel[hidden] {
    display: none !important;
  }

  .services__mobile-panel-item {
    display: block;
    padding-top: 1rem;
  }

  .services__mobile .services__list {
    grid-template-columns: 1fr;
    gap: 1.2rem;
  }

  .services__mobile .services__item {
    padding: 2.4rem;
  }
}

/* =============================
   Patch-2026-04-13: mobile fixes
   - doctor tabs overflow
   - price action button overflow
   - single wiki title hidden under author card
   ============================= */

@media (max-width: 47.99875em) {
  /* Doctor tabs: turn into a vertical accordion-like stack on mobile. */
  .doctor__tabs.tabs__navigation {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
  }

  .doctor__tabs-title {
    width: 100%;
    min-width: 0;
    padding: 2.2rem 4.8rem 2.2rem 0;
    line-height: 1.1;
    white-space: normal;
    word-break: normal;
    overflow-wrap: anywhere;
  }

  .doctor__tabs-content {
    overflow: hidden;
  }

  /* Price cards: keep the + / close button inside the card bounds. */
  .price__item {
    position: relative;
    overflow: hidden;
    margin-right: 0;
    padding-right: 8.8rem;
  }

  .price__item-icon {
    top: 1.6rem;
    right: 1.6rem;
    width: 5.6rem;
    height: 5.6rem;
  }

  .price__item-title {
    padding-right: 0;
  }
}

@media (max-width: 47.99875em) {
  /* Single article hero: do not let the expert card overlap the article title. */
  body.single-wiki .main-info__container {
    gap: 2rem;
    padding-top: 0;
  }

  body.single-wiki .main-info__info {
    margin-bottom: 0;
  }

  body.single-wiki .main-info__title {
    margin-bottom: 2.4rem;
  }

  body.single-wiki .main-info__cards {
    position: relative;
    right: auto;
    left: auto;
    bottom: auto;
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 1.6rem;
    border-radius: 3.2rem;
  }

  body.single-wiki .main-info__card {
    width: 100%;
  }

  body.single-wiki .author-block {
    margin: 0;
  }
}

/* FIX9: contacts locations adaptive layout
   Keep филиалы section from staying in the desktop 2-column grid on narrow/tablet viewports. */
@media (max-width: 1024px) {
  .locations[data-locations] .locations__content {
    grid-template-columns: 1fr !important;
    gap: 3rem;
  }

  .locations[data-locations] .locations__left,
  .locations[data-locations] .locations__right,
  .locations[data-locations] .locations__list,
  .locations[data-locations] .locations__viewport,
  .locations[data-locations] .locations__track,
  .locations[data-locations] .locations__slide,
  .locations[data-locations] .locations__item-wrapper,
  .locations[data-locations] .locations__item {
    min-width: 0;
    max-width: 100%;
  }

  .locations[data-locations] .locations__left,
  .locations[data-locations] .locations__right {
    width: 100%;
  }

  .locations[data-locations] .locations__right {
    position: relative !important;
    top: auto !important;
  }

  .locations[data-locations] .locations__viewport {
    width: 100%;
  }

  .locations[data-locations] .locations__track {
    width: 100%;
  }

  .locations[data-locations] .locations__slide {
    width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .locations[data-locations] .locations__container {
    max-width: calc(100% - 2rem);
  }

  .locations[data-locations] .locations__content {
    padding: 2.4rem 1.2rem;
    border-radius: 2.4rem;
    gap: 2.4rem;
  }

  .locations[data-locations] .locations__head.title-box {
    align-items: center;
    gap: 1.2rem;
    margin-bottom: 1.6rem;
  }

  .locations[data-locations] .locations__cards-nav {
    flex: 0 0 auto;
    gap: .8rem;
  }

  .locations[data-locations] .locations__nav-btn {
    width: 4rem;
    height: 4rem;
  }

  .locations[data-locations] .locations__slide {
    grid-template-columns: 1fr !important;
    gap: 1.2rem;
  }

  .locations[data-locations] .locations__item {
    width: 100%;
  }

  .locations[data-locations] .locations__map {
    height: 42rem;
    min-height: 32rem;
  }
}

@media (max-width: 420px) {
  .locations[data-locations] .locations__content {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .locations[data-locations] .locations__head.title-box h2 {
    font-size: 2.6rem;
    line-height: 1.15;
  }

  .locations[data-locations] .locations__nav-btn {
    width: 3.6rem;
    height: 3.6rem;
  }
}
.content__text img{    max-width: 100% !important;
    height: auto !important;}


@media (max-width: 768px) {
  table {
    display: block !important;
    width: 100% !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }

  table tbody {
    display: table !important;
    width: 100% !important;
    min-width: 720px !important;
  }
}

	
	
/* =============================
   v65: global scroll-to-top + mobile contacts divider order
   ============================= */
.samed-scroll-top {
  position: fixed;
  right: clamp(1.6rem, 2vw, 3.2rem);
  bottom: clamp(1.6rem, 2vw, 3.2rem);
  z-index: 1200;
  width: 5.4rem;
  height: 5.4rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, .78);
  border-radius: 1.8rem;
  color: #fff;
  background: linear-gradient(135deg, #2287e7 0%, #146fd1 100%);
  box-shadow: 0 1.6rem 3.4rem rgba(20, 83, 154, .22);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(1.2rem) scale(.96);
  transition: opacity .22s ease, visibility .22s ease, transform .22s ease, box-shadow .22s ease, background .22s ease;
  -webkit-tap-highlight-color: transparent;
}


.samed-scroll-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.samed-scroll-top:hover,
.samed-scroll-top:focus-visible {
  background: linear-gradient(135deg, #2b98fb 0%, #1678df 100%);
  box-shadow: 0 2rem 4rem rgba(20, 83, 154, .28);
  outline: none;
}

.samed-scroll-top:active {
  transform: translateY(.1rem) scale(.98);
}

.samed-scroll-top svg {
  width: 2.6rem;
  height: 2.6rem;
  fill: currentColor;
}

body.has-mobile-toolbar .samed-scroll-top {
  bottom: calc(var(--toolbar-h, 64px) + env(safe-area-inset-bottom) + 1.6rem);
}

@media (max-width: 47.99875em) {
  .samed-scroll-top {
    right: 1.4rem;
    width: 4.8rem;
    height: 4.8rem;
    border-radius: 1.5rem;
  }

  .samed-scroll-top svg {
    width: 2.3rem;
    height: 2.3rem;
  }

  .header__top > .header__items-title:not(li) {
    order: 3;
    margin-top: 4.2rem;
    margin-bottom: 2.4rem;
  }

  .header__top > .header__items--top {
    order: 4;
  }

  .header__top > .header__items--bottom,
  .header__top > .header__bottom {
    order: 2;
  }
}
