/* ============================================================
   Палитра: «молочный» зелёный вместо тёмного #2e6b2a
   ============================================================ */
:root {
  --green-primary: #5A9A2E;   /* кнопки, ссылки, акценты */
  --green-dark: #8DA98A;      /* "молочный" зелёный — топбар, футер, хиро (вместо #2e6b2a) */
  --green-darker: #71906E;    /* чуть темнее молочного — для текста/hover на светлом */
  --green-light: #CFE3C6;     /* светлый акцент, бейджи */
  --bg-mint: #F5F8F2;         /* фон секций */
  --text-dark: #33352F;
  --text-gray: #6E7268;
  --border-color: #E1E7DC;
  --white: #FFFFFF;
  --radius: 12px;
  --shadow: 0 4px 18px rgba(60, 80, 50, 0.08);
  --container-w: 1200px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Segoe UI', Roboto, Arial, sans-serif;
  color: var(--text-dark);
  background: var(--white);
  line-height: 1.5;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { margin: 0 0 .5em; font-weight: 700; }
p { margin: 0 0 1em; }

.container {
  max-width: var(--container-w);
  margin: 0 auto;
  padding: 0 20px;
}

.btn {
  display: inline-block;
  padding: 12px 24px;
  border-radius: 30px;
  font-weight: 600;
  font-size: 14px;
  border: none;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn--primary { background: var(--green-primary); color: #fff; }
.btn--primary:hover { background: #4d8226; transform: translateY(-1px); }
.btn--light { background: #fff; color: var(--green-darker); border: 1.5px solid var(--green-darker); }
.btn--light:hover { background: var(--bg-mint); }

/* ---------------- Topbar ---------------- */
.topbar {
  background: var(--green-dark);
  color: #fff;
  font-size: 13px;
}
.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 20px;
  flex-wrap: wrap;
}
.topbar__contacts a { margin-right: 16px; font-weight: 600; color: #fff; }
.topbar__address, .topbar__hours { opacity: .95; }

/* ---------------- Header ---------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #fff;
  box-shadow: 0 2px 10px rgba(0,0,0,.05);
}
.site-header__inner {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 14px 20px;
}
.logo { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.logo img { height: 40px; width: auto; display: block; }

.header-search {
  position: relative;
  flex: 0 1 230px;
  min-width: 160px;
}
.header-search input {
  width: 100%;
  padding: 10px 40px 10px 14px;
  border-radius: 24px;
  border: 1.5px solid var(--border-color);
  font-size: 13.5px;
  outline: none;
}
.header-search input:focus { border-color: var(--green-primary); }
.header-search button {
  position: absolute;
  right: 4px; top: 4px; bottom: 4px;
  width: 32px;
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 15px;
}
.header-search__results {
  position: absolute;
  top: calc(100% + 8px);
  left: 0; right: 0;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  max-height: 320px;
  overflow-y: auto;
  display: none;
  z-index: 50;
}
.header-search__results.is-open { display: block; }
.header-search__results a {
  display: block;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-color);
  font-size: 14px;
}
.header-search__results a:last-child { border-bottom: none; }
.header-search__results small { display: block; color: var(--text-gray); font-size: 12px; }
.header-search__empty { padding: 14px; color: var(--text-gray); font-size: 14px; }

.main-nav { display: flex; gap: 2px; margin-left: auto; flex-shrink: 0; }
.main-nav > .nav-item { position: relative; }
.main-nav > .nav-item > a {
  display: block;
  padding: 9px 11px;
  font-weight: 600;
  font-size: 13.5px;
  border-radius: 8px;
  white-space: nowrap;
}
.main-nav > .nav-item:hover > a,
.main-nav > .nav-item > a.is-active { background: var(--bg-mint); color: var(--green-darker); }
.nav-dropdown {
  position: absolute;
  top: 100%; left: 0;
  min-width: 260px;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 8px;
  display: none;
  z-index: 60;
}
.nav-item:hover .nav-dropdown { display: block; }
.nav-dropdown a {
  display: block;
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 14px;
}
.nav-dropdown a:hover { background: var(--bg-mint); }

.header-cta { flex-shrink: 0; padding: 14px 28px; font-size: 15px; }
.burger { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 8px; margin-left: auto; }
.burger span { width: 24px; height: 2.5px; background: var(--text-dark); border-radius: 2px; }

.mobile-nav__close {
  flex-shrink: 0;
  width: 44px; height: 44px; border: none; border-radius: 50%;
  background: var(--bg-mint); font-size: 16px; cursor: pointer;
}
.mobile-nav {
  display: none;
  position: fixed;
  inset: 0;
  top: 0;
  background: #fff;
  z-index: 200;
  padding: 20px;
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform .25s ease;
}
.mobile-nav.is-open { transform: translateX(0); }
.mobile-nav__top { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.mobile-nav__search { flex: 1; min-width: 0; }
.mobile-nav__search input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 24px;
  border: 1.5px solid var(--border-color);
  font-size: 15px;
}
.mobile-nav__cta { display: block; text-align: center; margin-top: 20px; }
.mnav-item > .mnav-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 4px;
  font-weight: 700;
  font-size: 16px;
  border-bottom: 1px solid var(--border-color);
  cursor: pointer;
}
.mnav-children { display: none; padding-left: 14px; }
.mnav-children.is-open { display: block; }
.mnav-children a { display: block; padding: 10px 4px; font-size: 14.5px; color: var(--text-gray); }

/* ---------------- Быстрые кнопки записи (в блоке «О центре») ---------------- */
.quickcta-box { display: flex; gap: 10px; max-width: 420px; margin-top: 20px; }
.quickcta-box__btn { flex: 1; text-align: center; padding: 9px 16px; font-size: 13.5px; }
.card__badge {
  display: inline-block; background: var(--green-light); color: var(--green-darker);
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em;
  padding: 3px 10px; border-radius: 20px; margin-bottom: 8px;
}


/* ---------------- Carousel ---------------- */
.carousel {
  position: relative;
  width: 100%;
  aspect-ratio: 21 / 8;
  min-height: 220px;
  overflow: hidden;
  background: var(--bg-mint);
}
.carousel__track {
  display: flex;
  height: 100%;
  transition: transform .5s ease;
}
.carousel__slide {
  min-width: 100%;
  height: 100%;
  position: relative;
  background-image: var(--bg-desktop);
  background-position: var(--bg-desktop-pos, center center);
  background-size: cover;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}
/* Затемнение только в центре под текстом — края фото остаются яркими */
.carousel__slide.has-text::after {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 60% 70% at 50% 50%,
    rgba(15, 25, 10, .58) 0%,
    rgba(15, 25, 10, .34) 55%,
    rgba(15, 25, 10, .06) 100%);
}
.carousel__content {
  position: relative;
  z-index: 2;
  color: #fff;
  max-width: 640px;
  padding: 0 24px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.carousel__content h3 {
  font-size: 36px;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 12px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .55), 0 3px 14px rgba(0, 0, 0, .45);
}
.carousel__content p {
  font-size: 17px;
  font-weight: 500;
  line-height: 1.45;
  margin-bottom: 20px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .6), 0 2px 10px rgba(0, 0, 0, .45);
}
.carousel__content .btn { box-shadow: 0 4px 14px rgba(0, 0, 0, .25); }
.carousel__arrow {
  position: absolute;
  top: 50%; transform: translateY(-50%);
  width: 42px; height: 42px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,.85);
  font-size: 22px;
  cursor: pointer;
  z-index: 5;
  color: var(--green-darker);
}
.carousel__arrow--prev { left: 16px; }
.carousel__arrow--next { right: 16px; }
.carousel__dots {
  position: absolute;
  bottom: 14px; left: 0; right: 0;
  display: flex; justify-content: center; gap: 8px;
  z-index: 5;
}
.carousel__dots button {
  width: 9px; height: 9px; border-radius: 50%;
  border: none; background: rgba(255,255,255,.6); cursor: pointer;
}
.carousel__dots button.is-active { background: #fff; width: 22px; border-radius: 5px; }

/* ---------------- Sections ---------------- */
.section { padding: 56px 0; }
.section--about { background: var(--bg-mint); }
.section__lead { max-width: 760px; color: var(--text-gray); font-size: 15.5px; }
.section__head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 24px; }
.section__head-link { color: inherit; text-decoration: none; }
.section__head-link:hover h2 { color: var(--green-primary); }
.section__head-link h2 { margin: 0; }

.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.card {
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow .15s ease, transform .15s ease;
}
.card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.card__img { width: 100%; aspect-ratio: 4 / 5; object-fit: contain; background: var(--bg-mint); }
.card__body { padding: 16px 18px; }
.card__date { font-size: 12.5px; color: var(--text-gray); margin-bottom: 6px; }
.card__title { font-size: 16px; font-weight: 700; margin-bottom: 8px; }
.card__text { font-size: 13.5px; color: var(--text-gray); display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.card__price { display: flex; gap: 10px; align-items: baseline; margin-top: 10px; }
.card__price .old { text-decoration: line-through; color: var(--text-gray); font-size: 13px; }
.card__price .new { color: var(--green-primary); font-weight: 700; font-size: 17px; }
.card__period { font-size: 12px; color: var(--text-gray); margin-top: 4px; }

.section--promo { background: var(--white); }

.doctors-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.doctor-card { text-align: center; }
.doctor-card__photo {
  width: 120px; height: 120px; border-radius: 50%;
  object-fit: cover; margin: 0 auto 12px; background: var(--bg-mint);
  border: 3px solid var(--green-light);
}
.doctor-card__name { font-weight: 700; font-size: 15px; }
.doctor-card__spec { font-size: 13px; color: var(--text-gray); margin-top: 4px; }

.section--cta { background: var(--green-dark); color: #fff; }
.section--cta h2, .section--cta p { color: #fff; }
.cta-box { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }

.section--map { padding-bottom: 0; }
.map-embed { width: 100%; line-height: 0; }
.map-embed iframe { width: 100%; display: block; border: none; }

/* ---------------- Footer ---------------- */
.site-footer { background: var(--green-darker); color: #EFF3EC; }
.footer-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  padding: 48px 20px 32px;
}
.footer-grid > .footer-col { flex: 1 1 200px; }
.footer-col--about { flex: 1.4 1 240px; }
.footer-grid > .footer-col--widgets { flex: 1 1 100%; border-top: 1px solid rgba(255,255,255,.12); padding-top: 22px; }
.footer-col-group { display: contents; }
.footer-col h4 { color: #fff; font-size: 15px; margin-bottom: 14px; }
.footer-col p, .footer-col a { color: #D9E3D4; font-size: 13.5px; }
.footer-col > a { display: block; padding: 4px 0; }
.footer-col > a:hover { color: #fff; }
.footer-col--about p { max-width: 280px; }
.logo--footer { margin-bottom: 14px; }
.logo--footer img { height: 34px; }
.footer-social { display: flex; gap: 10px; margin-top: 14px; }
.footer-social a {
  width: 38px; height: 38px; border-radius: 50%;
  background: rgba(255,255,255,.12);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 13px;
}
.footer-social a:hover { background: var(--green-primary); }
.footer-menu-group { margin-bottom: 18px; }
.footer-menu-group__title { color: #fff; font-weight: 700; font-size: 14px; margin-bottom: 8px; }
.footer-menu-group a { display: block; padding: 3px 0; }
.footer-menu-group a:hover { color: #fff; }
/* ^ старые классы больше не используются в разметке, оставлены для совместимости с кастомными правками */
.footer-widgets { display: flex; flex-direction: row; flex-wrap: wrap; gap: 12px; align-items: stretch; justify-content: flex-start; }
.footer-widgets .widget-box {
  background: rgba(255,255,255,.08);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 13px;
  flex: 0 1 auto;
  min-width: 150px;
  min-height: 80px;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: visible;
}
.footer-widgets .widget-box iframe { max-width: 100%; border: none; display: block; }
.footer-widgets .widget-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  color: inherit;
  text-decoration: none;
}
.footer-widgets .widget-link img { max-height: 32px; width: auto; max-width: 100%; display: block; }
.footer-widgets .widget-caption {
  display: block;
  width: 100%;
  font-size: 11px;
  line-height: 1.35;
  text-align: center;
  word-break: break-word;
  color: #D9E3D4;
}
.footer-bottom { background: rgba(0,0,0,.15); }
.footer-bottom__inner {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px;
  padding: 14px 20px; font-size: 12.5px; color: #C3D0BD;
}

/* ---------------- Внутренние страницы (роутинг) ---------------- */
.container--narrow { max-width: 820px; }
.embed-frame { display: block; width: 100%; border: 0; margin: 8px 0 28px; transition: height .2s ease; }

.breadcrumb { font-size: 13px; color: var(--text-gray); margin-bottom: 18px; }
.breadcrumb a { color: var(--green-darker); }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb__sep { margin: 0 6px; }

.page-title { font-size: 30px; margin-bottom: 14px; }

.section__more { font-size: 14px; font-weight: 600; color: var(--green-primary); flex-shrink: 0; }
.section__more:hover { text-decoration: underline; }

.article__date { color: var(--text-gray); font-size: 13.5px; margin-bottom: 16px; }
.article__image { width: 100%; height: auto; display: block; border-radius: var(--radius); margin-bottom: 22px; }
.article__body { font-size: 15.5px; color: var(--text-dark); line-height: 1.75; margin-bottom: 24px; }
.article__body h3 { font-size: 18px; margin: 26px 0 10px; color: var(--green-darker); }
.article__body h3:first-child { margin-top: 0; }
.article__body p { margin: 0 0 14px; }
.article__body ol, .article__body ul { margin: 0 0 16px; padding-left: 22px; }
.article__body li { margin-bottom: 8px; }
.article__body em { color: var(--text-gray); }

.lab-partners { display: flex; flex-wrap: wrap; gap: 20px; margin: 18px 0 30px; }
.lab-partner {
  flex: 1 1 220px;
  background: var(--bg-mint);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
}
.lab-partner img { max-height: 46px; width: auto; margin: 0 auto 14px; }
.lab-partner p { margin: 0; font-size: 13.5px; color: var(--text-gray); line-height: 1.5; }
.lab-partner strong { color: var(--text-dark); font-size: 14.5px; }
.back-link { display: inline-block; font-weight: 600; color: var(--green-darker); margin-top: 8px; }
.back-link:hover { text-decoration: underline; }

.doctor-detail { display: flex; gap: 32px; margin-bottom: 32px; flex-wrap: wrap; }
.doctor-detail__photo {
  width: 200px; height: 200px; border-radius: 50%; object-fit: cover;
  background: var(--bg-mint); border: 4px solid var(--green-light); flex-shrink: 0;
}
.doctor-detail__info { flex: 1; min-width: 240px; }
.doctor-detail__spec { color: var(--green-darker); font-weight: 600; font-size: 15px; margin-bottom: 14px; }
.doctor-detail__awards-title { font-size: 16px; margin-bottom: 10px; }
.doctor-detail__awards { margin: 0 0 10px; padding-left: 20px; color: var(--text-gray); font-size: 14.5px; line-height: 1.7; }
.doctor-detail__cta {
  display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap;
  background: var(--bg-mint); border-radius: var(--radius); padding: 22px 26px; margin-bottom: 20px;
}
.doctor-detail__cta h2 { font-size: 19px; margin-bottom: 4px; }
.doctor-detail__cta p { margin: 0; color: var(--text-gray); font-size: 14px; }

.services-list__group { margin: 26px 0 10px; font-size: 17px; color: var(--green-darker); }
.services-list { border: 1px solid var(--border-color); border-radius: var(--radius); overflow: hidden; }
.services-list__item {
  display: flex; justify-content: space-between; gap: 16px;
  padding: 12px 16px; font-size: 14.5px; border-bottom: 1px solid var(--border-color);
}
.services-list__item:last-child { border-bottom: none; }
.services-list__item:target { background: var(--bg-mint); }
.services-list__price { font-weight: 700; color: var(--green-primary); white-space: nowrap; }

.legal-docs { list-style: none; padding: 0; margin: 0; border: 1px solid var(--border-color); border-radius: var(--radius); overflow: hidden; }
.legal-docs li { border-bottom: 1px solid var(--border-color); }
.legal-docs li:last-child { border-bottom: none; }
.legal-docs a { display: block; padding: 13px 16px; font-size: 14.5px; color: var(--green-darker); }
.legal-docs a:hover { background: var(--bg-mint); text-decoration: underline; }
.legal-docs a::before { content: "📄 "; }

/* ---------------- Страница «Контакты» ---------------- */
.contact-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 30px;
}
.contact-card {
  background: var(--bg-mint);
  border-radius: var(--radius);
  padding: 18px 20px;
}
.contact-card__label { font-size: 12.5px; font-weight: 700; color: var(--text-gray); text-transform: uppercase; letter-spacing: .02em; margin-bottom: 6px; }
.contact-card__value { font-size: 15px; color: var(--text-dark); font-weight: 600; line-height: 1.5; }
.contact-card__value a { color: var(--green-darker); }

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin-bottom: 34px;
}
.contact-block { background: #fff; border: 1px solid var(--border-color); border-radius: var(--radius); padding: 20px 22px; }
.contact-block h3 { font-size: 17px; margin-bottom: 12px; color: var(--green-darker); }
.contact-block p { margin: 0 0 6px; font-size: 14.5px; }

.contacts__map-title, .contacts__section-title { font-size: 20px; margin: 28px 0 16px; }
.map-embed--rounded { border-radius: var(--radius); overflow: hidden; margin-bottom: 34px; border: 1px solid var(--border-color); }
.map-embed--rounded iframe { display: block; }

.requisites-box {
  background: var(--bg-mint);
  border-radius: var(--radius);
  padding: 22px 24px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-dark);
  margin-bottom: 34px;
}

.authorities-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}
.authority-card {
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 18px 20px;
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--text-dark);
}

@media (max-width: 640px) {
  .contact-cards, .contact-grid, .authorities-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .quickcta-box { flex-direction: column; }
}

@media (max-width: 640px) {
  .doctor-detail { flex-direction: column; align-items: center; text-align: center; }
  .doctor-detail__awards { text-align: left; }
  .doctor-detail__cta { flex-direction: column; align-items: flex-start; }
}

/* ---------------- Responsive ---------------- */
@media (max-width: 1150px) {
  .header-search { flex-basis: 170px; min-width: 130px; }
  .main-nav > .nav-item > a { padding: 8px 8px; font-size: 12.8px; }
  .header-cta { padding: 12px 20px; font-size: 14px; }
  .site-header__inner { gap: 10px; }
}

@media (max-width: 1024px) {
  .cards-grid { grid-template-columns: repeat(2, 1fr); }
  .doctors-grid { grid-template-columns: repeat(3, 1fr); }
  .footer-grid { row-gap: 26px; }
  .header-search { max-width: 220px; }
}

@media (max-width: 860px) {
  .main-nav, .header-cta, .header-search { display: none; }
  .burger { display: flex; }
  .mobile-nav { display: block; }
  .carousel__content { padding: 0 30px; max-width: 100%; }
  .carousel__content h3 { font-size: 26px; }
  .carousel__content p { font-size: 15.5px; }
  /* На узком экране текст занимает почти всю ширину — затемняем шире */
  .carousel__slide.has-text::after {
    background: radial-gradient(ellipse 90% 60% at 50% 50%,
      rgba(15, 25, 10, .6) 0%,
      rgba(15, 25, 10, .36) 60%,
      rgba(15, 25, 10, .1) 100%);
  }
}

@media (max-width: 640px) {
  .topbar__inner { flex-direction: column; align-items: flex-start; gap: 4px; }
  .cards-grid { grid-template-columns: 1fr; }
  .doctors-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { padding: 32px 20px 20px; }
  .footer-grid > .footer-col { flex-basis: 100%; }
  .cta-box { flex-direction: column; align-items: flex-start; }
  .carousel { aspect-ratio: 3 / 4; min-height: 360px; }
  .carousel__slide { background-image: var(--bg-mobile); background-position: var(--bg-mobile-pos, center center); }
}

/* ---------------- График работы врачей ---------------- */
.sch-head { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; }
.sch-date { display: inline-block; background: var(--green-light, #E8F0E4); color: var(--green-darker); border-radius: 20px; padding: 7px 14px; font-size: 13.5px; font-weight: 600; }
.sch-search { flex: 0 1 320px; min-width: 200px; padding: 10px 14px; border: 1px solid var(--border-color); border-radius: 10px; font: inherit; font-size: 14px; }
.sch-table-wrap { border: 1px solid var(--border-color); border-radius: var(--radius); overflow-x: auto; background: #fff; }
.sch-table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 860px; }
.sch-table th, .sch-table td { padding: 11px 10px; border-bottom: 1px solid var(--border-color); text-align: center; vertical-align: middle; }
.sch-table thead th { background: var(--green-darker); color: #fff; font-size: 13px; font-weight: 600; position: sticky; top: 0; }
.sch-table thead th:nth-child(-n+2), .sch-table .sch-name, .sch-table .sch-spec { text-align: left; }
.sch-table tbody tr:nth-child(even) { background: #F7FAF5; }
.sch-table tbody tr:hover { background: #EEF4EA; }
.sch-table tbody tr:last-child > * { border-bottom: none; }
.sch-name { font-weight: 600; white-space: nowrap; color: var(--green-darker); }
.sch-spec { color: #55604f; min-width: 170px; }
.sch-time { display: inline-block; font-weight: 600; white-space: nowrap; font-size: 13.5px; }
.sch-off { color: #bcc5b6; }
.sch-table thead th.is-today { background: var(--green-primary, #5E8C4A); }
.sch-table td.is-today { background: rgba(125,170,100,.14); }
.sch-note-cell { text-align: center; }
.sch-note { display: inline-block; background: #FFF3DC; color: #8A5A00; border-radius: 20px; padding: 5px 14px; font-size: 13px; font-weight: 600; }
.sch-cards { display: none; }
.sch-card { border: 1px solid var(--border-color); border-radius: var(--radius); padding: 14px 16px; background: #fff; }
.sch-card h3 { font-size: 16px; margin: 0 0 2px; color: var(--green-darker); }
.sch-card__spec { font-size: 13.5px; color: #55604f; margin: 0 0 10px; }
.sch-card__days { list-style: none; margin: 0; padding: 0; }
.sch-card__days li { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; border-top: 1px dashed var(--border-color); font-size: 14px; }
.sch-card__days li.is-today { background: rgba(125,170,100,.14); margin: 0 -8px; padding: 6px 8px; border-radius: 6px; }
.sch-card__days b { text-align: right; }
.sch-card__none { color: #77826f; }
.sch-empty { text-align: center; color: #77826f; padding: 20px 0; }
.sch-foot { font-size: 13.5px; color: #55604f; margin-top: 16px; }
[hidden].sch-card, .sch-table tr[hidden] { display: none !important; }
@media (max-width: 860px) {
  .sch-table-wrap { display: none; }
  .sch-cards { display: grid; grid-template-columns: 1fr; gap: 12px; }
  .sch-search { flex-basis: 100%; }
}
@media (min-width: 600px) and (max-width: 860px) { .sch-cards { grid-template-columns: 1fr 1fr; } }
.article__body img { max-width: 100%; height: auto; }


/* ============================================================
   Круглая кнопка онлайн-записи Medflex
   ============================================================ */
.booking-widget {
  position: fixed;
  left: 24px;
  bottom: 24px;
  z-index: 150; /* выше шапки, ниже мобильного меню (200) */
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}
.booking-widget__button {
  width: 96px; height: 96px;
  border-radius: 50%;
  border: none;
  background: var(--green-primary);
  color: #fff;
  box-shadow: 0 6px 20px rgba(60, 80, 50, .3);
  cursor: pointer;
  position: relative;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  font: inherit; font-size: 15px; font-weight: 700;
  transition: transform .15s ease, background .15s ease;
}
.booking-widget__button:hover { background: var(--green-darker); transform: scale(1.05); }
.booking-widget__button:focus-visible { outline: 3px solid var(--green-light); outline-offset: 3px; }
.booking-widget:not(.is-open) .booking-widget__button::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid var(--green-primary);
  animation: booking-pulse 2.4s ease-out infinite;
  pointer-events: none;
}
@keyframes booking-pulse {
  0% { transform: scale(1); opacity: .7; }
  100% { transform: scale(1.45); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .booking-widget__button::before { animation: none !important; display: none; }
}
.booking-widget__panel {
  width: 400px;
  height: min(640px, calc(100vh - 160px));
  background: #fff;
  border-radius: var(--radius);
  box-shadow: 0 10px 40px rgba(30, 40, 25, .25);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.booking-widget__panel[hidden] { display: none; }
.booking-widget__head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 12px 10px 18px;
  background: var(--green-dark);
  color: #fff;
  font-weight: 700;
}
.booking-widget__close {
  width: 36px; height: 36px;
  border: none; border-radius: 50%;
  background: rgba(255, 255, 255, .2);
  color: #fff; font-size: 15px; cursor: pointer;
}
.booking-widget__close:hover { background: rgba(255, 255, 255, .35); }
.booking-widget__body { flex: 1; min-height: 0; }
.booking-widget__iframe { width: 100%; height: 100%; border: 0; display: block; }

@media (max-width: 640px) {
  .booking-widget { left: 14px; bottom: 14px; }
  .booking-widget__button { width: 80px; height: 80px; }
  .booking-widget__button { font-size: 13px; }
  /* На телефоне окно записи на весь экран */
  .booking-widget__panel {
    position: fixed; inset: 0;
    width: auto; height: auto;
    border-radius: 0;
  }
  .booking-widget.is-open .booking-widget__button { display: none; }
  html.booking-open, html.booking-open body { overflow: hidden; }
}
@media print { .booking-widget { display: none !important; } }


/* ---------------- Виджеты футера на телефоне: по одному в строку, на всю ширину ---------------- */
@media (max-width: 640px) {
  .footer-widgets { flex-direction: column; flex-wrap: nowrap; gap: 10px; }
  .footer-widgets .widget-box {
    flex: 0 0 auto;
    width: 100%;
    min-width: 0;
    min-height: 72px;
    padding: 14px 16px;
  }
  .footer-widgets .widget-link img { max-height: 40px; }
  .footer-widgets .widget-caption { font-size: 12.5px; }
  /* Чтобы круглая кнопка «Запись» не закрывала нижнюю строку футера */
}


/* ---------------- Просмотр документа внутри сайта ---------------- */
.doc-ext { font-size: 11.5px; color: var(--text-gray); font-weight: 600; margin-left: 4px; }
.doc-viewer__title { font-size: clamp(20px, 3vw, 28px); line-height: 1.3; }
.doc-viewer__toolbar { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 16px; }
.doc-viewer__toolbar .btn { font-size: 14px; padding: 9px 16px; }
.doc-viewer__frame {
  display: block;
  width: 100%;
  height: max(520px, calc(100vh - 230px));
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  background: #f3f3f3;
}
.doc-viewer__img { text-align: center; }
.doc-viewer__img img { max-width: 100%; height: auto; border: 1px solid var(--border-color); border-radius: var(--radius); }
.doc-viewer__card {
  max-width: 520px;
  margin: 10px auto 0;
  padding: 28px 22px;
  text-align: center;
  background: var(--bg-mint);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
}
.doc-viewer__icon { font-size: 42px; margin-bottom: 8px; }
.doc-viewer__card p { color: var(--text-gray); margin-bottom: 18px; }


/* ---------------- Cookie: баннер согласия и заглушки сторонних сервисов ---------------- */
.cookie-banner {
  position: fixed;
  right: 20px; bottom: 20px;
  z-index: 160;
  width: min(560px, calc(100vw - 40px));
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  box-shadow: 0 10px 36px rgba(30, 40, 25, .22);
  padding: 18px 20px;
  font-size: 14px;
  line-height: 1.5;
}
.cookie-banner__text { margin: 0 0 12px; }
.cookie-banner__text a { color: var(--green-darker); text-decoration: underline; }
.cookie-banner__settings { display: grid; gap: 10px; margin-bottom: 14px; }
.cookie-banner__settings[hidden] { display: none; }
.cookie-banner__opt { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; cursor: pointer; }
.cookie-banner__opt input { margin-top: 3px; width: 18px; height: 18px; flex: 0 0 auto; accent-color: var(--green-primary); }
.cookie-banner__actions { display: flex; flex-wrap: wrap; gap: 8px; }
.cookie-banner__actions .btn { font-size: 14px; padding: 10px 16px; }
.cookie-banner__actions [hidden] { display: none; }

.tp-placeholder {
  padding: 20px;
  text-align: center;
  background: var(--bg-mint);
  border: 1px dashed var(--border-color);
  border-radius: var(--radius);
  font-size: 14px;
  color: var(--text-gray);
  margin: 10px 0;
}
.tp-placeholder p { margin: 0 0 12px; }
.tp-placeholder .btn { font-size: 14px; padding: 10px 16px; }
.tp-more { display: inline-block; margin-left: 12px; font-size: 13px; color: var(--green-darker); text-decoration: underline; }
iframe[data-tp-gated] { display: none !important; }
.footer-widgets .tp-placeholder { padding: 8px; margin: 0; font-size: 11.5px; background: transparent; border: none; }
.footer-widgets .tp-placeholder p { margin-bottom: 6px; }
.footer-widgets .tp-placeholder .btn { font-size: 12px; padding: 6px 10px; }
.footer-widgets .tp-more { display: none; }
.booking-widget__body .tp-placeholder { margin: 16px; }

.footer-bottom__links { display: inline-flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; }
.footer-bottom__links a, .footer-bottom__linkbtn { color: inherit; text-decoration: underline; font-size: inherit; }
.footer-bottom__linkbtn { background: none; border: none; padding: 0; cursor: pointer; font: inherit; }

@media (max-width: 640px) {
  .cookie-banner { left: 0; right: 0; bottom: 0; width: 100%; border-radius: 14px 14px 0 0; padding: 16px; }
  .cookie-banner__actions .btn { flex: 1 1 100%; }
  html.cookie-banner-open .booking-widget { display: none; }
}
@media print { .cookie-banner { display: none !important; } }

/* Иконка в круглой кнопке записи крупнее вместе с кнопкой */
.booking-widget__icon { width: 30px; height: 30px; }
@media (max-width: 640px) { .booking-widget__icon { width: 26px; height: 26px; } }

/* Подпись разработчика — отдельная белая полоса в самом низу */
.footer-credit { background: #fff; }
.footer-credit__inner {
  padding: 12px 20px;
  text-align: center;
  font-size: 13px;
  color: var(--text-gray);
}
.footer-credit__inner a { color: var(--green-darker); font-weight: 700; text-decoration: none; }
.footer-credit__inner a:hover { text-decoration: underline; }
@media (min-width: 641px) {
  /* чтобы круглая кнопка «Запись» не перекрывала нижнюю строку футера */
  .footer-bottom__inner { padding-left: 130px; }
}
@media (max-width: 640px) {
  /* место под круглую кнопку «Запись», чтобы она не закрывала подпись */
  .footer-credit__inner { padding-bottom: 104px; }
}


/* ---------------- Перечень платных услуг ---------------- */
.svc-group { margin: 26px 0 8px; }
.svc-group__title { font-size: 19px; margin: 0 0 12px; color: var(--green-darker); }
.svc-list { display: grid; gap: 8px; }
.svc {
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow .15s ease, border-color .15s ease;
}
.svc[open], details.svc:hover { border-color: var(--green-primary); box-shadow: 0 4px 14px rgba(60, 80, 50, .08); }
.svc__head {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 16px;
  list-style: none;
  font-weight: 600;
}
details.svc > summary { cursor: pointer; }
details.svc > summary::-webkit-details-marker { display: none; }
details.svc > summary:focus-visible { outline: 3px solid var(--green-light); outline-offset: -3px; }
.svc__icon {
  flex: 0 0 auto;
  width: 44px; height: 44px;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--bg-mint);
  color: var(--green-darker);
}
.svc__icon svg { width: 24px; height: 24px; }
.svc__title { flex: 1 1 auto; line-height: 1.35; }
.svc__chevron {
  flex: 0 0 auto;
  width: 10px; height: 10px;
  border-right: 2px solid var(--green-darker);
  border-bottom: 2px solid var(--green-darker);
  transform: rotate(45deg);
  margin: -4px 6px 0 8px;
  transition: transform .2s ease;
}
details.svc[open] .svc__chevron { transform: rotate(225deg); margin-top: 4px; }
.svc__body { padding: 0 18px 16px 74px; font-size: 15px; }
.svc__body > :first-child { margin-top: 0; }
.svc--plain .svc__head { font-weight: 500; }
@media (max-width: 640px) {
  .svc__head { padding: 10px 12px; gap: 10px; }
  .svc__icon { width: 38px; height: 38px; }
  .svc__body { padding: 0 14px 14px; }
}

/* ---------------- Вакансии ---------------- */
.vacancies__lead { font-weight: 600; margin-bottom: 10px; }
.vacancies { list-style: none; padding: 0; margin: 0 0 24px; display: grid; gap: 8px; }
.vacancy {
  padding: 12px 16px 12px 44px;
  position: relative;
  background: var(--bg-mint);
  border-radius: var(--radius);
}
.vacancy::before {
  content: '';
  position: absolute; left: 16px; top: 17px;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--green-primary);
}
.vacancy__title { font-weight: 600; }
.vacancy__desc { margin-top: 6px; font-size: 14.5px; }

/* ---------------- Баннер подарочного сертификата ---------------- */
.gift-banner {
  position: relative;
  overflow: hidden;
  min-height: 260px;
  margin: 6px 0 28px;
  border-radius: 20px;
  background:
    radial-gradient(circle at 18% 20%, rgba(255,255,255,.55) 0, rgba(255,255,255,0) 42%),
    radial-gradient(circle at 85% 90%, rgba(255,255,255,.25) 0, rgba(255,255,255,0) 40%),
    linear-gradient(135deg, #e9f5e1 0%, #cfe8c0 45%, #9fcf86 100%);
  box-shadow: 0 10px 30px rgba(60, 80, 50, .15);
}
.gift-banner::after {
  content: '';
  position: absolute; inset: 12px;
  border: 2px dashed rgba(255,255,255,.7);
  border-radius: 14px;
  pointer-events: none;
}
.gift-banner__ribbon-v, .gift-banner__ribbon-h {
  position: absolute;
  background: linear-gradient(90deg, #b3192b, #e5394a 50%, #b3192b);
  box-shadow: 0 0 0 1px rgba(143,16,32,.15);
}
.gift-banner__ribbon-v { top: 0; bottom: 0; right: 22%; width: 34px; }
.gift-banner__ribbon-h {
  left: 0; right: 0; top: 80%; height: 30px;
  background: linear-gradient(180deg, #b3192b, #e5394a 50%, #b3192b);
}
.gift-banner__bow {
  position: absolute;
  width: 150px; height: 112px;
  right: calc(22% + 17px - 75px);
  top: calc(80% + 15px - 56px);
  filter: drop-shadow(0 4px 6px rgba(0,0,0,.25));
}
.gift-banner__content {
  position: relative;
  z-index: 1;
  padding: 34px 40px;
  max-width: 60%;
}
.gift-banner__logo {
  display: block;
  width: 210px; max-width: 100%;
  background: rgba(255,255,255,.85);
  border-radius: 12px;
  padding: 8px 12px;
  margin-bottom: 18px;
}
.gift-banner__title {
  font-size: clamp(28px, 4.2vw, 44px);
  line-height: 1.05;
  font-weight: 800;
  color: var(--green-darker);
  letter-spacing: .5px;
  text-transform: uppercase;
}
.gift-banner__sub { margin-top: 12px; font-size: 16px; color: #2f4a24; font-weight: 500; }
@media (max-width: 640px) {
  .gift-banner { min-height: 300px; }
  .gift-banner__content { max-width: 100%; padding: 26px 22px 120px; }
  .gift-banner__ribbon-v { right: 16%; width: 26px; }
  .gift-banner__ribbon-h { top: 74%; height: 24px; }
  .gift-banner__bow { width: 120px; height: 90px; right: calc(16% + 13px - 60px); top: calc(74% + 12px - 45px); }
  .gift-banner__logo { width: 170px; }
}

/* Сведения о квалификации врача */
.doctor-detail__bio h4 { margin: 18px 0 6px; font-size: 16px; color: var(--green-darker); }
.doctor-detail__bio p { margin: 0 0 8px; }

/* Кнопка «Все специалисты» под первыми 8 врачами на главной */
.section__more-wrap { text-align: center; margin-top: 24px; }

/* Фото врачей: круглая рамка, фото внутри можно приблизить (настройка в админке) */
.doctor-card__photo, .doctor-detail__photo { display: block; overflow: hidden; }
.doctor-card__photo img, .doctor-detail__photo img {
  display: block; width: 100%; height: 100%;
  object-fit: cover;
}

/* Вакансии с иконками */
.vacancy { display: grid; grid-template-columns: auto 1fr; column-gap: 14px; align-items: center; padding: 10px 16px; }
.vacancy::before { content: none; }
.vacancy__icon { background: #fff; }
.vacancy__title { align-self: center; }
.vacancy__desc { grid-column: 2; }
