﻿/* === FIX: body padding-top for mobile, to prevent header overlap === */

/* ── Все контейнеры: 1200px контента + padding снаружи ───────
   box-sizing: content-box гарантирует, что max-width = ширина КОНТЕНТА,
   а padding добавляется снаружи. Контент везде ровно 1200px. */
.header-inner,
.header-nav-inner,
.container,
.services-container,
.about-container,
.doctors-container,
.why-content,
.map-container,
.reviews-container,
.review-platforms-container,
.promos-container,
.footer-inner,
.services-breadcrumbs,
.appointment-glow {
  box-sizing: content-box;
}
/* На мобильных — вернуть border-box чтобы padding не вызывал горизонтальный скролл */
@media (max-width: 1248px) {
  .header-inner,
  .header-nav-inner,
  .container,
  .services-container,
  .about-container,
  .doctors-container,
  .why-content,
  .map-container,
  .reviews-container,
  .review-platforms-container,
  .promos-container,
  .footer-inner,
  .services-breadcrumbs,
  .appointment-glow {
    box-sizing: border-box;
    max-width: 100%;
  }
}

/* === �������� ����������� ��������� Astra (entry-header) �� ��������� ===
   �� ���������� ��������� Astra ������������� ������� H1.entry-title �
   �� ��������� ��������� �� Gutenberg-������ � ������ ������ ������ �����.
   �������� ������ �� ��������� (.page), �� ������� ����� � ������. */

/* === ������� H1 ��� SEO === */

/* -- ������� ������ ������� -------------------------- */
.services-breadcrumbs {
    max-width: 1200px;
    margin: 0 auto;
    padding: 10px 20px 6px;
}
.services-breadcrumbs__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0;
}
.services-breadcrumbs__item {
    display: flex;
    align-items: center;
    font-size: 0.9rem;
    line-height: 1.4;
    color: #888;
}
.services-breadcrumbs__link {
    color: #666;
    text-decoration: none;
    transition: color 0.15s;
}
.services-breadcrumbs__link:hover {
    color: #e31f26;
}
.services-breadcrumbs__current {
    color: #999;
}
.services-breadcrumbs__sep {
    margin: 0 6px;
    color: #bbb;
    font-size: 0.9rem;
}
@media (max-width: 768px) {
    .services-breadcrumbs {
        padding: 8px 16px 4px;
    }
    .services-breadcrumbs__item {
        font-size: 1rem;
    }
}

/* -- ���������� �������� Astra �� 1200px --------------- */
.ast-container {
    max-width: 1200px;
}
.site-content .ast-container {
    max-width: 1200px;
}

/* Gutenberg-блоки внутри контента растягиваются на 1200px */
body.page .entry-content > .wp-block-group,
body.page .entry-content > .wp-block-columns,
body.page .entry-content > .wp-block-cover,
body.page .entry-content > .wp-block-media-text,
body.page .entry-content > .alignwide {
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}
/* Полноширинные секции — разрешаем вылезать за 1200px на всю ширину экрана */
body.page .entry-content > .academ-section-block,
body.page .entry-content > .alignfull {
  max-width: none;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}
/* Форма записи внутри страниц — убираем лишний padding для 1200px ширины */
body.page .entry-content .appointment-block {
  padding-left: 0;
  padding-right: 0;
}

/* === ������ �������� ��� === */

.why-block {
  width: 100%;
  min-height: 420px;
  background-size: cover;
  background-position: center;
  position: relative;
  display: flex;
  align-items: stretch;
  margin: 0;
  padding: var(--section-py) 0;
}
.why-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.25);
  z-index: 1;
}
.why-content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--container-px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.why-title {
  font-size: 2rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: var(--section-header-gap);
  text-align: center;
  text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.why-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  width: 100%;
}
.why-item {
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 16px;
  padding: 24px 20px;
  text-align: center;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  transition: transform 0.2s, box-shadow 0.2s;
  width: calc(25% - 15px);
  min-width: 220px;
  box-sizing: border-box;
}
.why-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 28px rgba(0,0,0,0.12);
}
.why-item-icon {
  font-size: 2rem;
  margin-bottom: 12px;
  display: block;
}
.why-item-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #222;
  margin-bottom: 8px;
}
.why-item-desc {
  font-size: 0.95rem;
  color: #555;
  line-height: 1.5;
}
@media (max-width: 900px) {
  .why-block {
    min-height: auto;
  }
  .why-list {
    gap: 16px;
  }
  .why-item {
    width: calc(50% - 8px);
    min-width: 180px;
  }
  .why-title {
    font-size: 1.5rem;
  }
}
@media (max-width: 600px) {
  .why-list {
    gap: 12px;
  }
  .why-item {
    width: 100%;
    min-width: 0;
  }
  .why-title {
    font-size: 1.25rem;
    margin-bottom: 16px;
  }
  .why-item {
    padding: 20px 16px;
  }
  .why-item:hover {
    transform: none;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  }
}

/* === �������� ������ === */
.services-block {
  margin: 0;
  padding: var(--section-py) 0;
  position: relative;
  z-index: 0;
  overflow: hidden;
}
.services-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--container-px);
}
.services-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: var(--section-header-gap);
  flex-wrap: wrap;
  gap: 20px;
}
.services-header-text {
  flex: 1;
}
.services-title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 8px;
}
.services-subtitle {
  font-size: 1.1rem;
  color: #666;
  margin-bottom: 0;
}
.services-nav {
  display: flex;
  gap: 12px;
  align-items: center;
}
.services-arrow {
  background: #eef3f8;
  color: #2196f3;
  border: none;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  font-size: 22px;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.services-arrow:hover {
  background: #2196f3;
  color: #fff;
}
.services-list {
  display: flex;
  gap: var(--card-gap);
  padding: 10px 0;
  flex-wrap: wrap;
}
/* ����� >6 ��������� � �������������� ������, ��� �������� */
.services-list.scrollable {
  flex-wrap: nowrap;
  max-height: none;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding-bottom: 10px;
  overscroll-behavior-x: contain;
}
.services-list.scrollable::-webkit-scrollbar {
  display: none;
}
.service-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
  overflow: hidden;
  text-decoration: none;
  transition: box-shadow 0.25s ease, border 0.2s, transform 0.25s ease;
  border: 1px solid #eee;
  position: relative;
  flex: 0 0 calc(33.333% - 16px);
  min-width: 280px;
  max-width: 380px;
  scroll-snap-align: start;
  transform-origin: center;
}
.service-card:hover {
  box-shadow: 0 14px 36px rgba(0,0,0,0.18);
  transform: translateY(-4px);
  z-index: 2;
}
@media (hover: none) {
  .service-card:hover {
    box-shadow: 0 2px 12px rgba(0,0,0,0.04);
    border: 1px solid #eee;
    transform: none;
    z-index: auto;
  }
  .service-card:hover .service-card-arrow {
    color: #bbb;
  }
}
.service-card-img {
  width: 100%;
  aspect-ratio: 4/3;
  background: #f7f7f7;
  display: flex;
  align-items: center;
  justify-content: center;
}
.service-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 16px 16px 0 0;
}
.service-card-content {
  padding: 16px 20px 12px 20px;
  flex: 1;
}
.service-card-title {
  font-size: 1.1rem;
  font-weight: 500;
  margin-bottom: 8px;
  color: #111;
}
.service-card-price {
  color: #e53935;
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 4px;
}
.service-card-arrow {
  position: absolute;
  bottom: 16px;
  right: 20px;
  font-size: 1.5rem;
  color: #bbb;
  transition: color 0.2s;
}
.service-card:hover .service-card-arrow {
  color: #2196f3;
}
@media (max-width: 900px) {
  .services-list {
    flex-wrap: nowrap;
    max-height: none;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }
  .services-list::-webkit-scrollbar {
    display: none;
  }
  .service-card {
    flex: 0 0 260px;
    min-width: 260px;
  }
}
@media (max-width: 768px) {
  .services-list,
  .services-list.scrollable {
    flex-wrap: wrap;
    overflow-x: visible;
    overflow: visible;
    scroll-snap-type: none;
    gap: 16px;
  }
  .services-arrow-prev,
  .services-arrow-next {
    display: none;
  }
  .service-card {
    flex: 1 1 100%;
    min-width: 0;
    max-width: 100%;
  }
  .service-card-content {
    padding: 12px 12px 8px 12px;
  }
}

@media (max-width: 600px) {
  .header-top {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    padding: 8px 0;
    flex-wrap: nowrap;
    position: relative;
  }
  /* �������� � ����� */
  .header-contacts {
    order: 0;
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    align-self: center;
    text-align: left;
    gap: 2px;
    min-width: 0;
  }
  .header-contacts .phone {
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    line-height: 1.2;
  }
  .header-contacts .call-btn {
    margin-top: 0;
    padding: 5px 10px;
    font-size: 12px;
  }
  /* ������� � �� ������ (���������) */
  .header-logo {
    order: 1;
    flex: 0 0 auto;
    position: absolute;
    left: 50%;
    transform: translateX(-30%);
    z-index: 2;
  }
  .header-logo img {
    max-width: 120px;
    height: 56px;
    display: block;
    object-fit: contain;
  }
  /* ������ � ������ */
  button.burger-btn {
    order: 2;
    margin-left: auto;
    align-self: center;
    width: 44px;
    height: 44px;
    min-width: 44px;
    flex-shrink: 0;
    z-index: 2;
  }
}
@media (max-width: 600px) {
  .about-photo-card img {
    width: 100%;
    height: auto;
    max-width: 100%;
    object-fit: contain;
    border-radius: 16px;
  }
}
/* --- ����� ������� ������ --- */
* {
  box-sizing: border-box;
}

/* ============================================
   HEADER
   ============================================ */
.site-header {
  width: 100%;
  background: #fff;
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  padding: 0 20px;
}
body {
  padding-top: 0;
  overflow-x: hidden;
}
html {
  overflow-x: hidden;
}

/* ============================================
   ���� �����
   ============================================ */
.map-block {
  width: 100%;
  padding: var(--section-py) 0 0;
}
/* Страница с картой: убираем все нижние отступы Astra чтобы карта была вплотную к футеру */
#primary:has(.map-block) {
  margin-bottom: 0;
  padding-bottom: 0;
}
.hentry:has(.map-block),
.ast-article-single:has(.map-block),
.ast-article-post:has(.map-block) {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: 0;
}
.entry-content:has(.map-block) {
  padding-bottom: 0;
  margin-bottom: 0;
}
.map-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--container-px);
  margin-bottom: var(--section-header-gap);
}
.map-title {
  font-size: 2rem;
  font-weight: 700;
  margin: 0;
  color: #222;
}
.map-iframe {
  display: block;
  width: 100%;
}

/* ============================================
   ���� ������ ���������
   ============================================ */
.reviews-block {
  width: 100%;
  padding: var(--section-py) 0;
  overflow: hidden;
}
.reviews-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--container-px);
}
.reviews-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: var(--section-header-gap);
  flex-wrap: wrap;
  gap: 20px;
}
.reviews-header-text {
  flex: 1;
}
.reviews-title {
  font-size: 40px;
  font-weight: 700;
  margin: 0 0 8px 0;
  color: #222;
}
.reviews-subtitle {
  font-size: 16px;
  color: #666;
  margin: 0;
}
.reviews-nav {
  display: none;
}
.reviews-carousel-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
}
.reviews-arrow {
  flex-shrink: 0;
  background: #eef3f8;
  color: #2196f3;
  border: none;
  outline: none;
  -webkit-tap-highlight-color: transparent;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.reviews-arrow:hover,
.reviews-arrow:focus-visible {
  background: #2196f3;
  color: #fff;
}
.reviews-list {
  flex: 1;
  min-width: 0;
  display: flex;
  gap: 24px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding: 10px 4px;
  scrollbar-width: none;
  -ms-overflow-style: none;
  scroll-behavior: smooth;
  overscroll-behavior-x: contain;
}
.reviews-list::-webkit-scrollbar {
  display: none;
}
.review-card {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 2px 16px rgba(0,0,0,0.1);
  border: 1px solid #eee;
  padding: 24px;
  width: 320px;
  min-width: 320px;
  max-width: 320px;
  flex: 0 0 320px;
  display: flex;
  flex-direction: column;
  scroll-snap-align: start;
  min-height: 280px;
}
.review-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
  gap: 12px;
}
.review-author {
  display: flex;
  align-items: center;
  gap: 12px;
}
.review-photo {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #e0e0e0;
  border: 2px solid #e31f26;
  flex-shrink: 0;
}
.review-author-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.review-name {
  font-weight: 600;
  font-size: 16px;
  color: #222;
}
.review-date {
  font-size: 13px;
  color: #888;
}
.review-rating {
  color: #ffc700;
  font-size: 16px;
  letter-spacing: 2px;
  flex-shrink: 0;
}
.review-text {
  font-size: 15px;
  color: #333;
  line-height: 1.5;
  margin: 0 0 16px 0;
  flex-grow: 1;
}
.review-tag {
  display: inline-block;
  background: #f0f4f8;
  color: #555;
  font-size: 13px;
  padding: 6px 14px;
  border-radius: 20px;
  align-self: flex-start;
}
.reviews-more {
  text-align: center;
}
.reviews-more a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #e31f26;
  color: #fff;
  padding: 12px 28px;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  font-size: 18px;
  transition: background 0.2s;
}
.reviews-more a:hover {
  background: #b81a1f;
}

@media (max-width: 900px) {
  .reviews-header {
    flex-direction: column;
    align-items: flex-start;
  }
  .reviews-title {
    font-size: 28px;
  }
  .reviews-nav {
    align-self: flex-end;
  }
  .review-card {
    width: 280px;
    min-width: 280px;
    max-width: 280px;
    flex: 0 0 280px;
    min-height: 260px;
  }
  .reviews-arrow {
    display: none;
  }
}

@media (max-width: 768px) {
  .reviews-block {
    padding: var(--section-py) 0;
  }
  .reviews-container {
    padding: 0 var(--container-px);
  }
  .reviews-title {
    font-size: 24px;
  }
  .reviews-arrow {
    display: none;
  }
  .reviews-carousel-wrapper {
    gap: 8px;
    flex-direction: column;
  }
  .reviews-list {
    flex-wrap: wrap;
    overflow-x: visible;
    overflow: visible;
    scroll-snap-type: none;
    gap: 16px;
    padding: 0;
  }
  .review-card {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    flex: 1 1 100%;
    padding: 20px 16px;
    min-height: auto;
  }
  .review-card:last-child {
    margin-right: 0;
  }
  .review-photo {
    width: 40px;
    height: 40px;
  }
  .review-name {
    font-size: 15px;
  }
  .review-text {
    font-size: 14px;
  }
}

.header-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 20px 0;
  position: relative;
  flex-direction: row;

}

.header-logo img {
  height: 80px;
  width: auto;
}

.header-address-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 64px;

}

.address-line {
  display: flex;
  align-items: center;
  gap: 8px;
}

.address-line img {
  height: 20px;
  width: auto;
}

.header-address-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-address-right {
  font-size: 12px;
  opacity: 0.7;


}

.header-address-left img {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.header-contacts {
  text-align: right;
}

.header-phones {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.header-contacts .phone {
  font-size: 16px;
  font-weight: bold;
  line-height: 1.3;
}

.header-contacts .call-btn {
  display: inline-block;
  margin-top: 8px;
  padding: 8px 20px;
  background: #e31f26;
  color: #fff;
  border-radius: 7px;
  font-weight: bold;
  text-decoration: none;
}

/* --- ���������� ������� ��� �������� ������-���� (������ ���������) --- */
@media (max-width: 1200px) {
  body.burger-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
    height: 100%;
  }
}

/* --- ������-������ (������ �� ��) --- */
button.burger-btn {
  display: none;
  position: relative;
  width: 44px;
  height: 44px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 1100;
  flex-shrink: 0;
  outline: none;
  box-shadow: none;
  -webkit-tap-highlight-color: transparent;
}
button.burger-btn:hover,
button.burger-btn:focus,
button.burger-btn:focus-visible,
button.burger-btn:active {
  background: none;
  outline: none;
  box-shadow: none;
  border: none;
  color: inherit;
}
.burger-btn span {
  display: block;
  width: 28px;
  height: 3px;
  background: #222;
  border-radius: 2px;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  transition: transform 0.3s ease, opacity 0.3s ease, top 0.3s ease;
  will-change: transform, opacity, top;
  backface-visibility: hidden;
}
.burger-btn span:nth-child(1) {
  top: 12px;
}
.burger-btn span:nth-child(2) {
  top: 20px;
}
.burger-btn span:nth-child(3) {
  top: 28px;
}
.burger-btn.active span:nth-child(1) {
  top: 12px;
}
.burger-btn.active span:nth-child(2) {
  top: 20px;
}
.burger-btn.active span:nth-child(3) {
  top: 28px;
}

/* --- ��������� --- */
.header-nav {
  width: 100%;
  background: #fff;
  box-shadow: 0 2px 16px rgba(0,0,0,0.07);
}

@media (min-width: 1201px) {
  .header-nav {
    position: sticky;
    top: 0;
    z-index: 3000;
  }
  /* ����� � ������� � ������ �� ��������� */
  .header-nav-footer {
    display: none;
  }
}

.header-nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
}

.main-menu li.menu-accent a {
  color: #1989f1;
  font-weight: 700;
  background: #fff3f3;
  border-radius: 6px;
  padding: 12px 24px;
}

/* Бейдж количества акций */
.menu-promo-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  margin-left: 4px;
  border-radius: 10px;
  background: #e31f26;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  vertical-align: middle;
}

/* --- ����� ��� �������� ���� (��) --- */
.main-menu {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 48px;
  list-style: none;
  margin: 0;
  padding: 10px 0;
  width: 100%;
}

.main-menu li {
  position: relative;
  list-style: none;
}

.main-menu li.menu-item-has-children > a::after {
  content: '\25BC';
  font-size: 12px;
  margin-left: 4px;
  vertical-align: middle;
  opacity: 0.6;
}

.main-menu li a {
  font-family: var(--font-main);
  font-weight: 400;
  color: #000;
  font-size: 16px;
  text-decoration: none;
  padding: 8px 0;
  transition: color 0.2s;
  background: none;
  border: none;
}

/* Hover ������ �� desktop � ����� (�� �� ���-�����������) */
@media (min-width: 1201px) and (hover: hover) and (pointer: fine) {
  .main-menu li a:hover {
    color: #e31f26;
  }
}

/* ������� ����� ���� � ������� */

/* ������� ����� ���� � ��� ��������/������ � ������� */
.main-menu li.current-menu-item > a,
.main-menu li.current_page_item > a,
.main-menu li.current-menu-parent > a,
.main-menu li.current-menu-ancestor > a,
.main-menu li.current_page_parent > a,
.main-menu li.current_page_ancestor > a {
  color: #e31f26;
  font-weight: 600;
  opacity: 1;
  visibility: visible;
}

/* ��� ������� � �������� ��������� */
.main-menu .sub-menu li.current-menu-item > a,
.main-menu .sub-menu li.current_page_item > a,
.main-menu .sub-menu li.current-menu-parent > a,
.main-menu .sub-menu li.current-menu-ancestor > a,
.main-menu .sub-menu li.current_page_parent > a,
.main-menu .sub-menu li.current_page_ancestor > a {
  color: #e31f26;
  font-weight: 600;
  background: #fff3f3;
  border-radius: 6px;
}

/* --- ����� ��� ���������� ������� (sub-menu) --- */
.main-menu .sub-menu {
  display: none;
  position: absolute;
  left: 0;
  top: 100%;
  min-width: 220px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
  padding: 12px 0;
  z-index: 2000;
  list-style: none;
  margin: 0;
}

.main-menu li:hover > .sub-menu,
.main-menu li:focus-within > .sub-menu {
  display: block;
}

.main-menu .sub-menu li {
  width: 100%;
}

.main-menu .sub-menu li a {
  padding: 8px 24px;
  color: #000;
  font-size: 14px;
  background: none;
  border: none;
  display: block;
}

/* Hover ������� ������ �� desktop � ����� */
@media (min-width: 1201px) and (hover: hover) and (pointer: fine) {
  .main-menu .sub-menu li a:hover {
    color: #e31f26;
    background: #f7f7f7;
  }
}

/* ============================================
   �������: ������ ������ 1200px � ������-����
   ============================================ */
@media (max-width: 1200px) {
  .header-address-row {
    display: none;
  }

  .header-contacts .phone {
    display: none;
  }

  .header-contacts {
    align-self: center;
  }
  .header-contacts .call-btn {
    padding: 6px 12px;
    font-size: 12px;
    margin-top: 0;
  }

  button.burger-btn {
    display: flex;
    z-index: 5100;
  }

  /* �������������: html body.wp-theme-astra .site-header = 0-1-3 > 0-0-1 Astra */
  html body.wp-theme-astra .site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 5000;
    background: #fff;
    box-shadow: 0 2px 12px rgba(0,0,0,0.07);
    min-height: 80px;
    height: auto;
  }

  .header-logo img {
    height: 64px;
    width: auto;
  }

  .header-top {
    padding: 10px 0;
    align-items: center;
    margin-top: 10px;
  }

  body {
    padding-top: 84px;
  }

  /* �������� ���������� ��������� �� ��������� */
  .header-nav {
    display: none;
  }
}

/* ===== ��������� ���������� ���� (sliding panels) ===== */

/* ������� */
.mobile-menu-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 5999;
  opacity: 0;
  transition: opacity 0.35s ease;
}
.mobile-menu-overlay.is-active {
  display: block;
  opacity: 1;
}

/* Глобальный сброс tap-highlight для всего мобильного меню */
.mobile-menu .mm-level *,
.mobile-menu .mm-level *::before,
.mobile-menu .mm-level *::after {
  -webkit-tap-highlight-color: transparent;
}
/* Предотвращаем непреднамеренный зум при навигации по меню */
.mobile-menu,
.mobile-menu .mm-level,
.mobile-menu .mm-item--parent,
.mobile-menu .mm-item--leaf,
.mobile-menu .mm-back,
.mobile-menu .mm-close,
.mobile-menu .mm-section-link,
.burger-btn {
  touch-action: manipulation;
}
/* Предотвращаем исчезновение текста/элементов при нажатии */
.mobile-menu .mm-level .mm-item--leaf,
.mobile-menu .mm-level .mm-item--parent,
.mobile-menu .mm-level .mm-close,
.mobile-menu .mm-level .mm-back,
.mobile-menu .mm-level .mm-section-link {
  -webkit-appearance: none;
  appearance: none;
  -webkit-touch-callout: none;
  user-select: none;
}
.mobile-menu .mm-level .mm-item--leaf:active,
.mobile-menu .mm-level .mm-item--parent:active,
.mobile-menu .mm-level .mm-close:active,
.mobile-menu .mm-level .mm-back:active {
  opacity: 1;
  visibility: visible;
  color: inherit;
}

/* ��������� (����� �� ��) */
.mobile-menu {
  display: none;
}

@media (max-width: 1200px) {
  .mobile-menu {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 6000;
    background: #fff;
    transform: translateX(-100%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
  }
  .mobile-menu.is-open {
    transform: translateX(0);
  }

  /* ������ (������) */
  .mm-level {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    background: #fff;
    will-change: transform;
    z-index: 1;
  }
  .mm-level.is-active {
    transform: translateX(0);
    z-index: 2;
  }
  .mm-level.is-left {
    transform: translateX(0);
    z-index: 1;
  }

  /* ������ ������ ������ */
  .mm-scroll {
    height: 100%;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    display: flex;
    flex-direction: column;
  }

  /* ����� ������ */
  .mm-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #f0f0f0;
    flex-shrink: 0;
    min-height: 60px;
  }
  .mm-header__title {
    font-size: 18px;
    font-weight: 700;
    color: #222;
  }

  /* ������ ����� */
  .mm-back {
    display: flex;
    align-items: center;
    gap: 10px;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    font-size: 15px;
    color: #666;
    font-family: inherit;
    -webkit-tap-highlight-color: transparent;
  }
  .mm-back svg {
    flex-shrink: 0;
  }

  /* ������ ������� (X) */
  .mm-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    background: none;
    border: none;
    cursor: pointer;
    color: #333;
    padding: 0;
    border-radius: 50%;
    transition: none;
    flex-shrink: 0;
    margin-left: auto;
    -webkit-tap-highlight-color: transparent;
    outline: none;
  }
  .mm-close svg {
    width: 28px;
    height: 28px;
  }
  .mm-close:hover,
  .mm-close:focus,
  .mm-close:active,
  .mm-close:focus-visible {
    background: none;
    outline: none;
    box-shadow: none;
    color: #333;
    opacity: 1;
    visibility: visible;
  }

  /* ��������� ������ (������ �� ������) */
  .mm-section-link {
    display: block;
    padding: 14px 20px;
    font-size: 16px;
    font-weight: 700;
    color: #e31f26;
    text-decoration: none;
    border-bottom: 1px solid #f0f0f0;
    flex-shrink: 0;
  }
  .mm-section-title {
    padding: 14px 20px;
    font-size: 16px;
    font-weight: 700;
    color: #222;
    border-bottom: 1px solid #f0f0f0;
    flex-shrink: 0;
  }

  /* ������ ������� */
  .mm-items {
    flex: 1;
  }

  /* �����-������ (��������) */
  .mm-item--leaf {
    display: block;
    padding: 15px 20px;
    font-size: 16px;
    color: #222;
    text-decoration: none;
    border-bottom: 1px solid #f5f5f5;
    transition: none;
    -webkit-tap-highlight-color: transparent;
  }
  .mm-item--leaf:active,
  .mm-item--leaf:hover,
  .mm-item--leaf:focus {
    background: none;
    outline: none;
    color: #222;
    border-bottom-color: #f5f5f5;
  }
  /* Текущая страница в мобильном меню */
  .mm-item--leaf.current-menu-item {
    color: #e31f26;
    font-weight: 600;
  }

  /* ����� � ������������ � ��� ������ ������ */
  .mm-item--parent {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 15px 20px;
    font-size: 16px;
    color: #222;
    text-decoration: none;
    border-bottom: 1px solid #f5f5f5;
    background: none;
    border-top: none;
    border-left: none;
    border-right: none;
    cursor: pointer;
    font-family: inherit;
    text-align: left;
    -webkit-tap-highlight-color: transparent;
    transition: none;
  }
  .mm-item--parent:active,
  .mm-item--parent:hover,
  .mm-item--parent:focus {
    background: none;
    outline: none;
    color: #222;
    border-bottom-color: #f5f5f5;
  }
  .mm-item--parent.current-menu-item .mm-item__text,
  .mm-item--parent.current-menu-ancestor .mm-item__text {
    color: #e31f26;
    font-weight: 600;
  }
  .mm-item__text {
    flex: 1;
    min-width: 0;
  }
  .mm-item__chevron {
    flex-shrink: 0;
    color: #bbb;
    display: flex;
    align-items: center;
    margin-left: 12px;
  }

  /* ����� (�������, �����) */
  .mm-footer {
    margin-top: auto;
    padding: 20px 16px 24px;
    border-top: 1px solid #eee;
    text-align: center;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
  }
  .mm-footer .header-nav-footer-address,
  .mm-footer .header-nav-footer-hours {
    font-size: 13px;
    color: #666;
    line-height: 1.5;
  }
  .mm-footer .header-nav-footer-phone {
    display: inline-block;
    font-size: 16px;
    font-weight: 700;
    color: #e31f26;
    text-decoration: none;
    margin-top: 4px;
  }
}

/* --- ���� ��� --- */
/* Гарантируем видимость первого слайда ДО инициализации Swiper (для LCP) */
.utp-swiper:not(.swiper-initialized) .swiper-slide:first-child {
  display: flex;
  visibility: visible;
  opacity: 1;
}

.utp-swiper {
  width: 100%;
}

.utp-swiper .swiper-wrapper {
  align-items: stretch;
}

.utp-swiper .swiper-pagination {
  position: absolute;
  bottom: 20px;
  left: 0;
  right: 0;
}

.utp-block {
  position: relative;
  width: 100%;
  min-height: 500px;
  height: 500px;
  background: #f5f5f5;
  background-size: cover;
  background-position: center;
  padding: 50px 0;
  overflow: hidden;
  box-sizing: border-box;
  display: flex;
  align-items: stretch;
}

/* ����������� ��������� ��� �� ������ ������ */
.utp-swiper .swiper-slide {
  height: 500px;
}
.utp-swiper .container {
  align-items: stretch;
  height: 100%;
}
.utp-swiper .utp-image-with-pattern {
  align-self: center;
}

.utp-bg-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  z-index: 0;
  opacity: 0.5;
}

/* Ҹ���� �������� ������ ���� � ��� ���������� ������ */
.utp-block::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    rgba(0, 0, 0, 0.55) 0%,
    rgba(0, 0, 0, 0.35) 50%,
    rgba(0, 0, 0, 0.10) 100%
  );
  pointer-events: none;
  z-index: 1;
}
.container {
  position: relative;
  z-index: 2;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
}
.utp-content {
  position: relative;
  z-index: 2;
  max-width: 1100px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  /* ����������� ����� ������ ��� ������, ����� ��� ������ */
  padding-top: 52px;
  padding-bottom: 70px;
  box-sizing: border-box;
}
.utp-label {
  background: #e31f26;
  color: #fff;
  padding: 6px 16px;
  border-radius: 6px;
  font-size: 16px;
  display: inline-block;
  /* ������ ������, �� ������� �� �������� */
  position: absolute;
  top: 0;
  left: 0;
  text-shadow: none;
}
/* ������ ����������� ��� ������ ���� � ��� */
.utp-label-placeholder {
  display: none;
}
.utp-title {
  font-size: clamp(28px, 4.5vw, 64px);
  font-weight: 700;
  margin-top: 0;
  margin-bottom: 12px;
  line-height: 1.1;
  color: #fff;
  text-shadow: 0 2px 12px rgba(0,0,0,0.4);
  /* �������� ��� ����� */
  background: rgba(0, 0, 0, 0.35);
  padding: 6px 14px;
  border-radius: 8px;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}
.utp-price {
  color: #e31f26;
  font-weight: 700;
}
.utp-desc {
  font-size: 16px;
  color: #fff;
  text-shadow: 0 1px 8px rgba(0,0,0,0.3);
  background: rgba(0, 0, 0, 0.35);
  padding: 8px 14px;
  border-radius: 6px;
  line-height: 1.5;
  margin-bottom: 20px;
}
/* ������ ����������� ��� �������� ���� ��� ��� */
.utp-desc-placeholder {
  display: none;
}
.utp-btn {
  display: inline-block;
  background: #e31f26;
  color: #fff;
  padding: 12px 32px;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  font-size: 18px;
  /* ������ �����, �� ������� �� �������� */
  position: absolute;
  bottom: 0;
  left: 0;
  transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
}
.utp-btn:hover {
  background: #b71c1c;
  color: #fff;
  box-shadow: 0 6px 20px rgba(227, 31, 38, 0.35);
}
.utp-btn:active {
  background: #9a1518;
}
.utp-image-with-pattern {
  position: relative;
  z-index: 2;
  display: block;
  width: 320px;
  height: 400px;
  overflow: hidden;
  margin: 0;
  padding: 0;
}

@media (max-width: 900px) {
  .utp-block {
    height: 420px;
    padding: var(--section-py) 0;
  }
  .utp-swiper .swiper-slide {
    height: 420px;
  }
  .utp-content {
    min-height: auto;
    align-items: center;
    text-align: center;
  }
  .utp-label {
    left: 50%;
    transform: translateX(-50%);
  }
  .utp-btn {
    left: 50%;
    transform: translateX(-50%);
  }
  .utp-image-with-pattern {
    width: 220px;
    height: 280px;
  }
  .container {
    flex-direction: column;
    gap: 24px;
    padding: 0 8px;
  }
  .utp-content {
    max-width: 100%;
    text-align: center;
    align-items: center;
  }
  .utp-image img {
    max-width: 180px;
    margin: 0 auto;
  }
}

@media (max-width: 600px) {
  .utp-block {
    height: 380px;
    padding: var(--section-py) 0;
  }
  .utp-swiper .swiper-slide {
    height: 380px;
  }
  .utp-content {
    min-height: auto;
    align-items: center;
    text-align: center;
  }
  .utp-label {
    font-size: 14px;
    padding: 4px 12px;
    left: 50%;
    transform: translateX(-50%);
  }
  .utp-desc {
    font-size: 14px;
  }
  .utp-btn {
    font-size: 16px;
    padding: 10px 24px;
    left: 50%;
    transform: translateX(-50%);
  }
  .utp-image-with-pattern {
    width: 180px;
    height: 220px;
  }
}

/* ============================================
   ���� � �������
   ============================================ */
.about-block {
  width: 100%;
  padding: var(--section-py) 0;
}
.about-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--container-px);
  display: flex;
  gap: 48px;
  align-items: flex-start;
}
.about-content {
  flex: 1 1 50%;
  max-width: 560px;
}
.about-title {
  font-size: 32px;
  font-weight: 700;
  line-height: 1.25;
  margin: 0 0 var(--section-header-gap) 0;
  color: #222;
}
.about-title-accent {
  color: #2196f3;
}
.about-desc {
  font-size: 16px;
  color: #333;
  line-height: 1.6;
  margin-bottom: 32px;
}
.about-desc p {
  margin: 0 0 16px 0;
}
.about-desc p:last-child {
  margin-bottom: 0;
}
.about-buttons {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
.about-btn {
  display: inline-block;
  padding: 12px 28px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  border: 1px solid #d0d7de;
  background: #fff;
  color: #222;
  transition: all 0.2s;
  cursor: pointer;
}
.about-btn-main {
  background: #2196f3;
  color: #fff;
  border-color: #2196f3;
}
.about-btn:hover {
  background: #1976d2;
  color: #fff;
  border-color: #1976d2;
}

/* ������� ���� */
.about-gallery {
  flex: 1 1 45%;
  max-width: 520px;
  position: relative;
}
.about-photos {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: 20px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.10);
}
.about-photo-card {
  display: none;
  width: 100%;
  aspect-ratio: 4/3;
}
.about-photo-card.active {
  display: block;
}
.about-photo-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 20px;
}

/* ������� ��� about (��� � �������) */
.about-nav {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}
.about-arrow {
  flex-shrink: 0;
  background: #eef3f8;
  color: #2196f3;
  border: none;
  outline: none;
  -webkit-tap-highlight-color: transparent;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  font-size: 22px;
  font-weight: bold;
}
.about-arrow:hover,
.about-arrow:focus-visible {
  background: #2196f3;
  color: #fff;
}

@media (max-width: 900px) {
  .about-container {
    flex-direction: column;
    gap: 32px;
  }
  .about-content,
  .about-gallery {
    max-width: 100%;
  }
  .about-title {
    font-size: 24px;
  }
  .about-nav {
    justify-content: center;
  }
}

@media (max-width: 600px) {
  .about-title {
    font-size: 20px;
  }
  
  .about-buttons {
    flex-direction: column;
    gap: 12px;
  }
  
  .about-gallery {
    max-width: 100%;
    width: 100%;
  }
  
  .about-photos {
    min-height: 220px;
    border-radius: 0;
    box-shadow: none;
    overflow: hidden;
  }
  
  .about-photo-card {
    aspect-ratio: 16/10;
    min-height: 220px;
  }
  
  .about-photo-card img {
    min-height: 220px;
    border-radius: 0;
  }
}



/* === �������� � ������ ������ === */
.doctors-block {
  margin: 0;
  padding: var(--section-py) 0;
  overflow: hidden;
}
.doctors-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--container-px);
}
.doctors-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: var(--section-header-gap);
  flex-wrap: wrap;
  gap: 20px;
}
.doctors-title {
  font-size: 2rem;
  font-weight: 700;
  margin: 0;
}
.doctors-nav {
  display: flex;
  gap: 12px;
  align-items: center;
}
.doctors-arrow {
  background: #eef3f8;
  color: #2196f3;
  border: none;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  font-size: 22px;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.doctors-arrow:hover {
  background: #2196f3;
  color: #fff;
}
.doctors-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--card-gap);
  padding: 10px;
  margin: -10px;
}
.doctors-list.scrollable {
  flex-wrap: nowrap;
  max-height: none;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding-bottom: 10px;
  overscroll-behavior-x: contain;
}
.doctors-list.scrollable::-webkit-scrollbar {
  display: none;
}
.doctor-card {
  position: relative;
  display: block;
  border-radius: 16px;
  overflow: hidden;
  text-decoration: none;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  min-height: 420px;
  flex: 0 0 calc(33.333% - 16px);
  min-width: 280px;
  max-width: 380px;
  scroll-snap-align: start;
}
.doctor-card-img {
  height: calc(100% - 148px);
  overflow: hidden;
}
.doctor-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.doctor-card-overlay {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(2px);
  padding: 14px 14px 12px;
  display: flex;
  flex-direction: column;
  min-height: 148px;
}
.doctor-card-name {
  margin: 0 0 4px;
  font-size: 1.1rem;
  line-height: 1.2;
  color: #111;
  font-weight: 600;
  min-height: 2.4em;
}
.doctor-card-position {
  margin: 0 0 10px;
  font-size: 0.95rem;
  line-height: 1.25;
  color: #222;
  font-weight: 500;
  min-height: 2.5em;
}
.doctor-card-btn {
  display: inline-block;
  background: #2196f3;
  color: #fff;
  border-radius: 10px;
  padding: 7px 18px;
  font-size: 1rem;
  line-height: 1.2;
  margin-top: auto;
  align-self: flex-start;
}

@media (max-width: 900px) {
  .doctors-list {
    flex-wrap: nowrap;
    max-height: none;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }
  .doctors-list::-webkit-scrollbar {
    display: none;
  }
  .doctor-card {
    flex: 0 0 280px;
    min-width: 280px;
  }
}

@media (max-width: 768px) {
  .doctors-block {
    padding: var(--section-py) 0;
  }

  .doctors-title {
    margin-bottom: 0;
  }

  .doctors-list,
  .doctors-list.scrollable {
    flex-wrap: wrap;
    overflow-x: visible;
    overflow: visible;
    scroll-snap-type: none;
    max-width: 100%;
    gap: 16px;
    margin: 0;
    padding: 0;
  }

  .doctors-arrow-prev,
  .doctors-arrow-next {
    display: none;
  }

  .doctor-card {
    min-height: 360px;
    flex: 1 1 100%;
    min-width: 0;
    max-width: 100%;
  }

  .doctor-card-overlay {
    min-height: 142px;
  }

  .doctor-card-img {
    height: calc(100% - 142px);
  }

  .doctor-card-name {
    font-size: 1.05rem;
  }

  .doctor-card-position {
    font-size: 0.92rem;
  }
}

/* === ���� ������: hover + modal === */
.doctor-card {
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  transform-origin: center;
}

.doctor-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.18);
}

@media (hover: none) {
  .doctor-card {
    transition: none;
  }
  .doctor-card:hover {
    transform: none;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  }
}

.doctor-card-btn {
  border: none;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.doctor-card-btn:hover {
  background: #167fce;
}

.doctor-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
}

.doctor-modal.is-open {
  display: block;
}

.doctor-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.56);
  animation: doctorModalFadeIn 0.25s ease;
}

.doctor-modal__dialog {
  position: relative;
  width: min(920px, calc(100% - 32px));
  max-height: calc(100vh - 48px);
  margin: 0 auto;
  top: 50%;
  transform: translateY(-50%);
  background: #fff;
  border-radius: 18px;
  overflow: auto;
  display: grid;
  grid-template-columns: 280px 1fr;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.28);
  animation: doctorModalSlideUp 0.3s ease;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.doctor-modal__dialog::-webkit-scrollbar {
  display: none;
}

.doctor-modal__close {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 999px;
  background: #f2f4f8;
  color: #1f2937;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.doctor-modal__media {
  background: #edf1f4;
  position: sticky;
  top: 0;
  align-self: start;
}

.doctor-modal__media img {
  width: 100%;
  height: auto;
  object-fit: cover;
  display: block;
}

.doctor-modal__info {
  padding: 16px 18px 12px;
  background: #fff;
}

.doctor-modal__content {
  padding: 16px 28px 24px;
  overflow-y: auto;
}

.doctor-modal__title {
  margin: 0 0 6px;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.25;
  color: #111;
}

.doctor-modal__position {
  margin: 0 0 14px;
  color: #e31f26;
  font-size: 0.95rem;
  font-weight: 600;
}

.doctor-modal__text {
  margin: 0 0 14px;
  color: #333;
  font-size: 0.9rem;
  line-height: 1.55;
}

/* WYSIWYG-������� ������ �������� ����� */
.doctor-modal__text h2,
.doctor-modal__text h3,
.doctor-modal__text h4 {
  margin: 16px 0 8px;
  font-weight: 700;
  line-height: 1.3;
  color: #111;
}
.doctor-modal__text h2 { font-size: 1.15rem; }
.doctor-modal__text h3 { font-size: 1rem; }
.doctor-modal__text h4 { font-size: 0.95rem; }

.doctor-modal__text p {
  margin: 0 0 10px;
}

.doctor-modal__text ul,
.doctor-modal__text ol {
  margin: 0 0 12px 18px;
  padding: 0;
}
.doctor-modal__text li {
  margin-bottom: 4px;
}

.doctor-modal__text strong,
.doctor-modal__text b {
  font-weight: 700;
  color: #111;
}

.doctor-modal__meta {
  margin: 0 0 8px;
  color: #555;
  font-size: 0.85rem;
  line-height: 1.45;
}

.doctor-modal__cta {
  margin-top: 14px;
  display: inline-block;
  background: #e31f26;
  color: #fff;
  text-decoration: none;
  border-radius: 8px;
  padding: 10px 20px;
  font-size: 0.9rem;
  font-weight: 600;
  transition: background 0.15s;
}
.doctor-modal__cta:hover {
  background: #c41920;
}

body.modal-open {
  overflow: hidden;
  position: fixed;
  width: 100%;
}

@keyframes doctorModalFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes doctorModalSlideUp {
  from {
    opacity: 0;
    transform: translateY(calc(-50% + 20px)) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(-50%) scale(1);
  }
}

@media (max-width: 800px) {
  .doctor-modal__dialog {
    display: flex;
    flex-direction: column;
    margin: 0;
    top: 0;
    left: 0;
    transform: none;
    width: 100%;
    max-height: none;
    height: auto;
    min-height: 100vh;
    border-radius: 0;
    box-shadow: none;
    animation: none;
  }

  .doctor-modal__backdrop {
    display: none;
  }

  .doctor-modal.is-open {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .doctor-modal__close {
    position: fixed;
    top: 10px;
    right: 10px;
    z-index: 10;
    background: rgba(255,255,255,0.85);
    backdrop-filter: blur(4px);
  }

  .doctor-modal__media {
    width: 100%;
    position: static;
    flex-shrink: 0;
    background: #f5f5f5;
    min-height: 0;
  }
  .doctor-modal__media img {
    width: 100%;
    height: auto;
    max-height: none;
    object-fit: contain;
    display: block;
  }

  .doctor-modal__info {
    padding: 14px 16px 8px;
  }

  .doctor-modal__content {
    flex: 1 1 auto;
    padding: 18px 16px 24px;
    background: #fff;
    border-radius: 0;
    min-height: 0;
  }

  .doctor-modal__title {
    font-size: 1.15rem;
    padding-right: 38px;
  }

  .doctor-modal__position {
    font-size: 0.9rem;
  }

  .doctor-modal__text {
    font-size: 0.85rem;
  }

  .doctor-modal__text h2 { font-size: 1rem; }
  .doctor-modal__text h3 { font-size: 0.95rem; }
}

/* === Модальное окно лицензий === */
.license-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
}

.license-modal.is-open {
  display: block;
}

.license-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.56);
  animation: doctorModalFadeIn 0.25s ease;
}

.license-modal__dialog {
  position: relative;
  width: min(960px, calc(100% - 32px));
  max-height: calc(100vh - 48px);
  margin: 0 auto;
  top: 50%;
  transform: translateY(-50%);
  background: #fff;
  border-radius: 18px;
  overflow: auto;
  padding: 32px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.28);
  animation: doctorModalSlideUp 0.3s ease;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.license-modal__dialog::-webkit-scrollbar {
  display: none;
}

.license-modal__close {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 999px;
  background: #f2f4f8;
  color: #1f2937;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.license-modal__title {
  margin: 0 0 24px;
  font-size: 1.5rem;
  font-weight: 700;
  color: #111;
}

.license-modal__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
}

.license-modal__item {
  text-align: center;
}

.license-modal__item img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.license-modal__item img:hover {
  transform: scale(1.03);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.license-modal__label {
  margin: 8px 0 0;
  font-size: 0.85rem;
  color: #555;
  line-height: 1.3;
}

.license-modal__empty {
  grid-column: 1 / -1;
  text-align: center;
  color: #999;
  font-size: 0.95rem;
  padding: 40px 0;
}

@media (max-width: 800px) {
  .license-modal__dialog {
    display: flex;
    flex-direction: column;
    margin: 0;
    top: 0;
    left: 0;
    transform: none;
    width: 100%;
    max-height: none;
    height: auto;
    min-height: 100vh;
    border-radius: 0;
    box-shadow: none;
    animation: none;
    padding: 20px;
  }

  .license-modal__backdrop {
    display: none;
  }

  .license-modal.is-open {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .license-modal__close {
    position: fixed;
    top: 10px;
    right: 10px;
    z-index: 10;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(4px);
  }

  .license-modal__grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

/* === ���� "������ � �����" === */
.appointment-block {
  margin: 60px 0;
  display: flex;
  justify-content: center;
  padding: 0 16px;
}

/* ����������� ��������: ����� > ������� */
.appointment-glow {
  position: relative;
  width: 100%;
  max-width: 1200px;
  border-radius: 22px;
  padding: 3px;
  background: linear-gradient(135deg, rgba(30, 136, 229, 0.15) 0%, rgba(220, 57, 62, 0.15) 100%);
  box-shadow:
    -1px -1px 5px 0 rgba(30, 136, 229, 0.15),
    2px 2px 5px 0 rgba(220, 57, 62, 0.15);
}

.appointment-card {
  background: #fff;
  border-radius: 20px;
  display: flex;
  align-items: stretch;
  overflow: hidden;
  min-height: 400px;
  box-sizing: border-box;
}

.appointment-left {
  flex: 1 1 55%;
  padding: 48px 40px 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.appointment-right {
  flex: 1 1 45%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  overflow: hidden;
}

.appointment-img {
  max-width: 100%;
  max-height: 420px;
  object-fit: contain;
  display: block;
}

.appointment-title {
  font-size: 2rem;
  font-weight: 700;
  color: #222;
  margin: 0 0 28px;
}

.appointment-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.appointment-field {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1.5px solid #e0e0e0;
  border-radius: 32px;
  padding: 12px 20px;
  max-width: 380px;
  box-sizing: border-box;
  outline: none;
  transition: border-color 0.2s;
}

.appointment-field:focus-within {
  border-color: #2196f3;
  outline: none;
}

.appointment-icon {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.appointment-field input {
  border: none;
  outline: 0;
  outline-style: none;
  box-shadow: none;
  font-size: 1rem;
  color: #222;
  background: transparent;
  width: 100%;
  font-family: inherit;
  box-sizing: border-box;
  -webkit-appearance: none;
  appearance: none;
  padding: 0;
  margin: 0;
}

.appointment-field input:focus,
.appointment-field input:focus-visible,
.appointment-field input:active {
  outline: 0;
  outline-style: none;
  box-shadow: none;
  border: none;
}

.appointment-field input::placeholder {
  color: #b0b0b0;
}

.appointment-consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.82rem;
  color: #555;
  line-height: 1.45;
  max-width: 520px;
  cursor: pointer;
  margin-top: 4px;
}

.appointment-consent input[type="checkbox"] {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  margin-top: 2px;
  accent-color: #2196f3;
  cursor: pointer;
}

.appointment-consent a {
  color: #2196f3;
  text-decoration: none;
}

.appointment-consent a:hover {
  text-decoration: underline;
}

.appointment-btn {
  display: inline-block;
  background: #2196f3;
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 16px 40px;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s;
  max-width: 280px;
  text-align: center;
  margin-top: 8px;
}

.appointment-btn:hover:not(:disabled) {
  background: #1976d2;
  box-shadow: 0 4px 16px rgba(33, 150, 243, 0.35);
}

.appointment-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  background: #9e9e9e;
}

/* ������������ */
@media (max-width: 900px) {
  .appointment-card {
    flex-direction: column;
    min-height: auto;
  }
  .appointment-right {
    display: none;
  }
  .appointment-left {
    padding: 28px 20px 32px;
  }
  .appointment-field {
    max-width: 100%;
  }
  .appointment-btn {
    max-width: 100%;
    width: 100%;
  }
}

@media (max-width: 600px) {
  .appointment-block {
    margin: 36px 0;
  }
  .appointment-title {
    font-size: 1.5rem;
    margin-bottom: 20px;
  }
  .appointment-left {
    padding: 20px 16px 24px;
  }
}

/* === Ограничение ширины контентных страниц до стандарта === */
/* Блоки в .entry-content ограничиваются до шир блока ast-container (1200px),
   это касается только тех блоков. Используется только на .page, не касается
   front-page, акций и остальных шаблов. */

/* ─── Поиск на сайте ──────────────────────────────────── */
.header-search-toggle {
  flex-shrink: 0;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  margin-left: 8px;
  color: #333;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: color 0.2s, background 0.2s;
}

.header-search-toggle:hover {
  color: #e31f26;
  background: rgba(227, 31, 38, 0.06);
}

.site-search-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 4000;
  background: rgba(0,0,0,0.45);
  display: none;
  align-items: flex-start;
  justify-content: center;
  min-height: 100vh;
  padding-top: 60px;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.site-search-overlay.is-open {
  display: flex;
  opacity: 1;
}

.site-search-inner {
  width: 100%;
  max-width: 640px;
  padding: 0 20px;
}

.site-search-form {
  display: flex;
  align-items: center;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.18);
  overflow: hidden;
  padding: 6px 6px 6px 20px;
}

.site-search-input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 18px;
  font-family: var(--font-main, sans-serif);
  padding: 14px 0;
  background: transparent;
  color: #222;
  min-width: 0;
}

.site-search-input::placeholder {
  color: #999;
}

.site-search-submit {
  flex-shrink: 0;
  background: #e31f26;
  border: none;
  border-radius: 8px;
  padding: 12px 16px;
  cursor: pointer;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.site-search-submit:hover {
  background: #b81a1f;
}

.site-search-close {
  flex-shrink: 0;
  background: none;
  border: none;
  cursor: pointer;
  padding: 12px;
  color: #666;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s;
}

.site-search-close:hover {
  color: #222;
}

@media (max-width: 600px) {
  .site-search-overlay {
    padding-top: 20px;
  }
  .site-search-input {
    font-size: 16px;
    padding: 12px 0;
  }
}

/* ─── Страница результатов поиска ──────────────────────── */
.search-results-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px 60px;
}

.search-results-title {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 32px;
  color: #222;
}

.search-results-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.search-result-item {
  padding: 24px;
  background: #f9f9f9;
  border-radius: 12px;
  border: 1px solid #eee;
}

.search-result-item__title {
  font-size: 20px;
  margin: 0 0 8px;
}

.search-result-item__title a {
  color: #222;
  text-decoration: none;
}

.search-result-item__title a:hover {
  color: #e31f26;
}

.search-result-item__excerpt {
  color: #555;
  font-size: 15px;
  line-height: 1.6;
  margin-bottom: 12px;
}

.search-result-item__link {
  color: #e31f26;
  font-weight: 600;
  text-decoration: none;
  font-size: 15px;
}

.search-result-item__link:hover {
  text-decoration: underline;
}

.search-no-results {
  text-align: center;
  padding: 60px 20px;
}

.search-no-results p {
  font-size: 18px;
  color: #555;
  margin-bottom: 24px;
}

.site-search-form--inline {
  max-width: 480px;
  margin: 0 auto;
}

@media (max-width: 600px) {
  .search-results-page {
    padding: 24px 16px 40px;
  }
  .search-results-title {
    font-size: 22px;
    margin-bottom: 20px;
  }
  .search-result-item {
    padding: 16px;
  }
  .search-result-item__title {
    font-size: 17px;
  }
}

/* Убрано max-width: 1200px — ломало секции с negative margins (карта, акции)
   Ширина контролируется отдельно для каждой секции через .container внутри */

/* === ������� ������ ����� ������� � Gutenberg-��������� === */
body.page .entry-header {
  display: none;
  margin: 0;
  padding: 0;
}
body.page .ast-article-single {
  padding-top: 50px;
}
/* На мобильном уменьшаем отступ если нет хлебных крошек */
@media (max-width: 1200px) {
  body.page:not(.has-breadcrumbs) .ast-article-single {
    padding-top: 24px;
  }
}
body.page #primary .entry-content {
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding-top: 0;
  margin-top: 0;
  word-break: normal;
  overflow-wrap: break-word;
}
body.page #primary .entry-content > *:first-child {
  margin-top: 0;
}

/* === ������� ����� ������� ��������� === */
/* ���������� � ����� ����� ����� ��������� ��������� ��������� */
:root {
  --gap-before-heading: 48px;  /* ����� h2/h3/h4 */
  --gap-paragraph:      16px;  /* ����� �������� */
  --gap-list:           12px;  /* ����� ������� � ������ ���� */
}

/* ������� ����� � ������� margin-top � ���� ������ */
body.page #primary .entry-content > * {
  margin-top: 0;
  margin-bottom: 0;
}

/* ����� �������� ������� (����� > �����, ����� > ������ � �.�.) */
body.page #primary .entry-content > * + * {
  margin-top: var(--gap-paragraph);
}

/* ����� ����������� � ������� ������ */
body.page #primary .entry-content > h2,
body.page #primary .entry-content > h3,
body.page #primary .entry-content > h4,
body.page #primary .entry-content > .wp-block-heading {
  margin-top: var(--gap-before-heading);
}

/* ������ ������� � ��� ������� ������ */
body.page #primary .entry-content > *:first-child {
  margin-top: 0;
}

/* ����� �������� � ���� ������ ��� ����� */
body.page #primary .entry-content > ul,
body.page #primary .entry-content > ol,
body.page #primary .entry-content > .wp-block-list {
  margin-top: var(--gap-list);
}

/* ������ ������ ����� �������� */
body.page #primary .entry-content li + li {
  margin-top: var(--gap-list);
}

.entry-title {
    text-align: center;
}

/* ============================================
   Декоративная линия в section-spacing
   (высота задаётся в section-spacing.css)
   ============================================ */
.section-spacing {
  position: relative;
}
.section-spacing::before {
  content: "";
  display: block;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80%;
  height: 2px;
  background: linear-gradient(to right,
    transparent 0%, #FFFFFF 10%, #3A96E8 40%, #E31F26 60%, transparent 100%   );
  pointer-events: none;
  border-radius: 2px;
  opacity: 0.1;
}
.swiper-button-prev,
.swiper-button-next {
  opacity: 0;
  transition: opacity 0.2s;
  pointer-events: none;
  --swiper-navigation-size: 32px;
}
.swiper:hover .swiper-button-prev,
.swiper:hover .swiper-button-next {
  opacity: 1;
  pointer-events: auto;
}

/* ============================================
   ���� ����� �����Ȼ � ����������� ������
   ============================================ */
.academ-inline-price {
  display: block;
  font-size: 1.1rem;
  font-weight: 700;
  color: #e31f26;
  margin-bottom: 0.4em;
  word-break: normal;
  overflow-wrap: break-word;
}
.academ-inline-price--na {
  color: #888;
  font-weight: 400;
}

/* ============================================
   Gutenberg-������ � �������/���������
   ������� ������ � .wp-block-list (Gutenberg),
   ����� �� ����������� ���� ����� � ��.
   ============================================ */
.entry-content ul.wp-block-list {
  margin-bottom: 1.5em;
  padding-left: 1.8em;
  list-style: disc;
}
.entry-content ol.wp-block-list {
  margin-bottom: 1.5em;
  padding-left: 1.8em;
  list-style: decimal;
}
.entry-content .wp-block-list li {
  display: list-item;
  list-style-position: outside;
  margin-bottom: 0.4em;
}
.entry-content .wp-block-list ul {
  list-style: circle;
  padding-left: 1.5em;
}
.entry-content .wp-block-list ul ul {
  list-style: square;
}

/* ============================================
   ����� � ����� � ����������� � ��������� �����������
   ============================================ */
.wp-block-media-text__content h1,
.wp-block-media-text__content h2,
.wp-block-media-text__content h3,
.wp-block-media-text__content h4 {
  word-break: normal;
  overflow-wrap: break-word;
  hyphens: auto;
}

@media (max-width: 600px) {
  .wp-block-media-text.is-stacked-on-mobile > .wp-block-media-text__content {
    grid-row: 1;
  }
  .wp-block-media-text.is-stacked-on-mobile > .wp-block-media-text__media {
    grid-row: 2;
  }
}

/* ============================================
   Gutenberg-таблицы — без рамок и отступов
   Высокая специфичность для перебития WP core block CSS
   ============================================ */
html body.page #primary .entry-content .wp-block-table,
html body.page #primary .entry-content .wp-block-table table {
  border: none;
  border-collapse: collapse;
  width: 100%;
  max-width: 1200px;
}

html body.page #primary .entry-content .wp-block-table thead,
html body.page #primary .entry-content .wp-block-table tfoot {
  border: none;
}

html body.page #primary .entry-content .wp-block-table td,
html body.page #primary .entry-content .wp-block-table th,
html body.page #primary .entry-content .wp-block-table table td,
html body.page #primary .entry-content .wp-block-table table th {
  border: none;
  padding: 0;
}


