/* Public editorial layout — loaded last. Composition, not token patches. */

.section-title .accent,
.stitle .a {
  color: var(--primary);
}

.header-topbar { display: none; }

.header {
  position: sticky !important;
  top: 0 !important;
  z-index: 400 !important;
  background: rgba(245, 241, 234, 0.94) !important;
  border-bottom: 1px solid rgba(166, 169, 170, 0.35);
  backdrop-filter: blur(16px);
}

/* ===== Nav accordion: Услуги → категория → подуслуги ===== */
.nav-dropdown-panel--categories {
  display: none;
  width: min(360px, calc(100vw - 24px)) !important;
  max-width: min(360px, calc(100vw - 24px)) !important;
  grid-template-columns: 1fr !important;
  gap: 0 !important;
  padding: 8px !important;
}

.nav-dropdown:hover > .nav-dropdown-panel--categories,
.nav-dropdown:focus-within > .nav-dropdown-panel--categories,
.nav-dropdown.is-open > .nav-dropdown-panel--categories {
  display: flex !important;
  flex-direction: column;
}

.nav-dropdown-panel--categories .nav-cat {
  width: 100%;
  min-width: 0;
}

.nav-dropdown-panel--categories .nav-cat-title {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  padding: 10px 12px !important;
  margin: 0 !important;
  white-space: normal !important;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.25;
}

.nav-dropdown-panel--categories .nav-cat-title::after {
  content: "+";
  flex-shrink: 0;
  font-size: 20px;
  line-height: 1;
  font-weight: 500;
  color: var(--teal);
}

.nav-dropdown-panel--categories .nav-cat.is-open .nav-cat-title::after {
  content: "-";
}

.nav-dropdown-panel--categories .nav-cat-items {
  display: none !important;
}

.nav-dropdown-panel--categories .nav-cat.is-open .nav-cat-items {
  display: flex !important;
  flex-direction: column;
  gap: 0;
  padding: 0 8px 8px 12px;
}

.nav-dropdown-panel--categories .nav-cat-items a {
  white-space: normal !important;
}

.header-inner {
  padding: 10px 28px !important;
  max-width: 1520px;
}

.header-end {
  display: flex;
  align-items: center;
  gap: 8px 22px;
  margin-left: auto;
}

.header-actions .header-phone,
.header-actions .h-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  min-width: 230px;
  width: 230px;
  min-height: 48px;
  height: 48px;
  padding: 0 16px;
  gap: 8px;
  border-radius: 12px;
  font-family: 'Manrope', system-ui, sans-serif;
  font-size: 15px !important;
  font-weight: 700 !important;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: 0 3px 10px rgba(169, 202, 214, 0.35);
  transition: transform 0.22s ease, box-shadow 0.22s ease, background-color 0.22s ease, filter 0.22s ease;
}

.header-actions .header-phone:hover,
.header-actions .h-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(169, 202, 214, 0.5);
  filter: brightness(0.97);
}

.header-actions .header-phone:active,
.header-actions .h-cta:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(169, 202, 214, 0.3);
  filter: brightness(0.94);
}

.header-actions .header-phone {
  box-shadow: 0 4px 14px rgba(196, 69, 54, 0.28);
  transition: transform 0.22s ease, background-color 0.22s ease, filter 0.22s ease;
  animation: header-phone-pulse 2.2s ease-in-out infinite;
}

.header-actions .header-phone:hover {
  box-shadow: 0 6px 18px rgba(196, 69, 54, 0.38);
  animation: none;
}

.header-actions .header-phone:active {
  box-shadow: 0 2px 8px rgba(196, 69, 54, 0.24);
  animation: none;
}

@keyframes header-phone-pulse {
  0%, 100% {
    box-shadow:
      0 4px 14px rgba(196, 69, 54, 0.28),
      0 0 0 0 rgba(196, 69, 54, 0.35);
  }
  50% {
    box-shadow:
      0 6px 22px rgba(196, 69, 54, 0.5),
      0 0 0 10px rgba(196, 69, 54, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .header-actions .header-phone {
    animation: none;
  }
}

@media (max-width: 768px) {
  .header .nav.active {
    display: flex !important;
    flex-direction: column;
    position: fixed !important;
    top: 64px;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--surface, #F5F1EA);
    box-shadow: 0 16px 32px rgba(52, 58, 64, 0.12);
    padding: 10px 14px 28px;
    gap: 6px;
    height: calc(100vh - 64px) !important;
    max-height: calc(100vh - 64px) !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    overscroll-behavior: contain;
    touch-action: pan-y;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    z-index: 401;
  }

  .header .nav.active > a,
  .header .nav.active .nav-item > a {
    display: block;
    padding: 14px 10px;
    font-size: 18px;
    line-height: 1.2;
    font-weight: 700;
    color: var(--dark);
    border-bottom: 1px solid rgba(166, 169, 170, 0.22);
  }

  .header .nav.active .nav-dropdown-panel {
    display: none !important;
    padding: 0 !important;
    margin: 0 !important;
    border-left: none !important;
    max-height: none !important;
    overflow: hidden !important;
  }

  .header .nav.active .nav-dropdown.is-open > .nav-dropdown-panel {
    display: block !important;
    padding: 8px 0 10px 14px !important;
    border-left: 2px solid rgba(169, 202, 214, 0.7) !important;
    overflow: visible !important;
  }

  .header .nav.active .nav-dropdown.is-open > .nav-dropdown-panel--categories {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    padding: 4px 0 8px 8px !important;
    overflow: visible !important;
  }

  .header .nav.active .nav-dropdown-panel a,
  .header .nav.active .nav-cat-items a {
    display: block;
    padding: 9px 0;
    font-size: 16px;
    line-height: 1.35;
    color: var(--dark-soft, #676458);
    white-space: normal !important;
  }

  .header .nav.active .nav-dropdown > a {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
  }

  .header .nav.active .nav-dropdown > a::after {
    content: "+";
    flex-shrink: 0;
    font-size: 22px;
    line-height: 1;
    font-weight: 500;
    color: var(--teal);
  }

  .header .nav.active .nav-dropdown.is-open > a::after {
    content: "-";
  }

  .header .nav.active .nav-dropdown {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }

  .header .nav.active .nav-cat-title {
    font-size: 14px !important;
    letter-spacing: 0.04em;
  }

  .header .nav.active .nav-cat-items {
    display: none !important;
  }

  .header .nav.active .nav-cat.is-open .nav-cat-items {
    display: flex !important;
  }

  .header .nav.active .nav-cat {
    width: 100% !important;
    max-width: 100% !important;
  }
}

.hero--bleed .hero-content {
  max-width: 640px;
}

.service-hero h1,
.service-hero .service-subtitle,
.service-hero .service-price-from,
.service-hero .breadcrumbs,
.service-hero .breadcrumbs a,
.service-hero .breadcrumbs-current,
.service-hero .service-back-link,
.service-hero .btn-outline-light {
  text-shadow:
    0 0 6px #fff,
    0 0 14px #fff,
    0 1px 2px rgba(255, 255, 255, 0.95);
}

.service-hero {
  min-height: 460px;
}

.service-hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 18%;
}

.hero--bleed .hero-content h1,
.hero--bleed h1 {
  color: var(--dark) !important;
  text-shadow: none !important;
  filter: none;
  line-height: 1.05;
  margin-bottom: 12px;
  white-space: normal;
}

.hero-h1-lead {
  display: block;
  white-space: nowrap;
  line-height: 1.05;
}

.hero--bleed .hero-content .hero-subtitle {
  font-family: 'Manrope', system-ui, sans-serif;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--dark) !important;
  text-shadow: none !important;
  filter: none;
  opacity: 1;
  line-height: 1.28;
}

.hero--bleed .hero-cta .btn-primary {
  text-shadow: none !important;
  background-color: var(--primary);
  background-image: linear-gradient(180deg, #c5dde6 0%, var(--primary) 48%, #94b8c4 100%);
  color: var(--primary-ink);
  box-shadow: 0 6px 18px rgba(169, 202, 214, 0.45);
}

.hero--bleed .hero-cta .btn-primary:hover {
  background-image: linear-gradient(180deg, #d4e7ee 0%, var(--primary) 40%, var(--primary-hover) 100%);
  color: var(--primary-ink);
}

.hero--bleed .hero-corner {
  position: absolute;
  right: 28px;
  bottom: 28px;
  z-index: 12;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  width: max-content;
  max-width: calc(100% - 56px);
  background: transparent;
}

.hero--bleed .hero-corner .hero-subtitle {
  margin: 0;
  background: transparent;
  font-family: 'Manrope', system-ui, sans-serif;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.35;
  color: #fff !important;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.7), 0 1px 3px rgba(0, 0, 0, 0.5);
  text-align: right;
  opacity: 0.9;
}

.hero--bleed .hero-trustline {
  position: static;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 0;
  background: transparent;
  color: #fff !important;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.7), 0 1px 3px rgba(0, 0, 0, 0.5);
  opacity: 0.9;
  white-space: nowrap;
}

.hero--bleed .hero-trustline .hero-phone-link {
  color: #fff !important;
  text-shadow: inherit;
  font-weight: 700;
  text-decoration: none;
}

@media (max-width: 640px) {
  .hero--bleed .hero-corner {
    right: 16px;
    left: 16px;
    bottom: 16px;
    width: auto;
  }
  .hero--bleed .hero-trustline {
    white-space: normal;
  }
}

/* ===== Mobile hero (separate layout, ≤768px) ===== */
.hero-mobile {
  display: none;
}

@media (max-width: 768px) {
  .hero-inner--desktop {
    display: none !important;
  }

  .hero--bleed {
    min-height: 0 !important;
    aspect-ratio: 3 / 2;
    max-height: min(68vh, 520px) !important;
    padding: 0 !important;
    display: block !important;
    align-items: stretch;
  }

  .hero--bleed::after {
    width: 100% !important;
    border-radius: 0 !important;
    background: linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.96) 0%,
      rgba(255, 255, 255, 0.88) 38%,
      rgba(245, 241, 234, 0.35) 62%,
      rgba(30, 35, 40, 0.62) 100%
    ) !important;
  }

  .hero-mobile {
    position: relative;
    z-index: 12;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 20px;
    min-height: 100%;
    padding: 18px 16px 20px;
    box-sizing: border-box;
  }

  .hero-mobile__top {
    display: flex;
    flex-direction: column;
    gap: 0;
  }

  .hero-mobile .hero-badge,
  .hero-mobile__badge {
    align-self: flex-start;
    max-width: none;
    margin-bottom: 12px;
    color: var(--dark) !important;
    text-shadow: none !important;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(166, 169, 170, 0.35);
  }

  .hero-mobile h1 {
    color: var(--dark) !important;
    text-shadow: none !important;
    font-size: clamp(26px, 7.2vw, 34px);
    line-height: 1.08;
    margin: 0 0 10px;
  }

  .hero-mobile .hero-h1-lead {
    white-space: normal;
  }

  .hero-mobile__subtitle {
    margin: 0 0 16px;
    font-family: 'Manrope', system-ui, sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.4;
    letter-spacing: -0.01em;
    color: var(--dark);
    opacity: 1;
    text-shadow:
      0 0 6px #fff,
      0 0 14px #fff,
      1px 1px 0 rgba(255, 255, 255, 0.9),
      -1px -1px 0 rgba(255, 255, 255, 0.9);
  }

  .hero-mobile__cta {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    margin: 0;
  }

  .hero-mobile__cta .btn {
    width: 100%;
    justify-content: center;
    text-align: center;
  }

  .hero-mobile__cta .btn-primary {
    text-shadow: none !important;
    background-color: var(--primary);
    background-image: linear-gradient(180deg, #c5dde6 0%, var(--primary) 48%, #94b8c4 100%);
    color: var(--primary-ink);
    box-shadow: 0 6px 18px rgba(169, 202, 214, 0.45);
  }

  .hero-mobile__btn-secondary {
    color: var(--dark) !important;
    text-shadow: none !important;
    border: 2px solid rgba(52, 58, 64, 0.35) !important;
    background: rgba(255, 255, 255, 0.72) !important;
  }

  .hero-mobile__trustline {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 0;
    font-family: 'Manrope', system-ui, sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.35;
    color: #fff !important;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.7), 0 1px 3px rgba(0, 0, 0, 0.5);
    opacity: 0.95;
  }

  .hero-mobile__trustline svg {
    flex-shrink: 0;
  }
}

.ed-trust {
  background: var(--surface, #F5F1EA);
  border: none;
  width: 100%;
  padding: 28px 0 8px;
}

.ed-trust__inner {
  max-width: 960px;
  margin: 0 auto;
}

.ed-trust__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  width: 100%;
  box-sizing: border-box;
}

.ed-trust__item {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 4px;
  min-width: 0;
  padding: 16px 18px;
  text-align: left;
  border-radius: 14px;
  border: 1px solid rgba(169, 202, 214, 0.5);
  background:
    radial-gradient(90% 80% at 0% 0%, rgba(197, 221, 230, 0.55) 0%, transparent 58%),
    #fff;
  box-shadow: 0 8px 20px rgba(169, 202, 214, 0.12);
}

.ed-trust__item span {
  margin: 0;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--teal, #676458);
}

.ed-trust__item strong {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--dark, #343A40);
}

/* ===== Photo service cards ===== */
.hero-scenarios-section {
  padding: 72px 0 80px !important;
  background: var(--surface, #F5F1EA) !important;
  background-image: none !important;
  background-color: var(--surface, #F5F1EA) !important;
  background-size: auto !important;
}

/* Services should have a softer, surface-matching fade (not harsh transition) */
#services.hero-scenarios-section::before {
  display: block !important;
  background: linear-gradient(to bottom, rgba(245, 241, 234, 0.85), transparent) !important;
}

/* Quick call is a plain surface section (no dot/gradient background) */
.quick-call {
  background: var(--surface, #F5F1EA) !important;
  background-image: none !important;
  background-color: var(--surface, #F5F1EA) !important;
  background-size: auto !important;
}

.quick-call::before {
  background: linear-gradient(to bottom, rgba(245, 241, 234, 0.85), transparent) !important;
}

.hero-scenarios.hero-scenarios--primary {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 18px !important;
}

.scenario-card.ed-svc {
  padding: 0;
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid rgba(166, 169, 170, 0.35);
  background: #fff;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.scenario-card.ed-svc:hover {
  transform: none;
  border-color: rgba(169, 202, 214, 0.8);
  box-shadow: 0 16px 40px rgba(52, 58, 64, 0.08);
}

.ed-svc__media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #3a3732;
  flex: 0 0 auto;
}

.ed-svc__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 0.5s ease;
}

.ed-svc:hover .ed-svc__media img {
  transform: scale(1.05);
}

.ed-svc__price {
  position: absolute;
  left: 12px;
  bottom: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(245, 241, 234, 0.94);
  color: var(--dark);
  font-size: 12px;
  font-weight: 800;
}

.ed-svc__body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px 18px 18px;
  flex: 1 1 auto;
}

.ed-svc .scenario-icon { display: none; }

.ed-svc .scenario-title {
  font-size: 20px;
  letter-spacing: -0.03em;
  margin: 0;
}

.ed-svc .scenario-desc {
  font-size: 14px;
  margin: 0;
  flex: none;
}

.ed-svc .svc-actions {
  margin-top: auto;
}

.ed-svc .scenario-btn {
  width: 100%;
  justify-content: center;
}

@media (min-width: 981px) {
  .hero-scenarios--primary .ed-svc:first-child {
    grid-column: 1 / span 2;
    grid-row: 1 / span 2;
    display: flex;
    flex-direction: column;
  }
  .hero-scenarios--primary .ed-svc:first-child .ed-svc__media {
    aspect-ratio: auto;
    flex: 1 1 auto;
    min-height: 360px;
  }
  /* Featured card crop: show more of the right side */
  .hero-scenarios--primary .ed-svc:first-child .ed-svc__media img {
    object-position: right center;
  }
  /* Reabilitatsiya card: show more of the left side */
  .hero-scenarios--primary .ed-svc:nth-child(5) .ed-svc__media img {
    object-position: left center;
  }
  .hero-scenarios--primary .ed-svc:first-child .ed-svc__body {
    flex: 0 0 auto;
  }
  .hero-scenarios--primary .ed-svc:first-child .scenario-title {
    font-size: 28px;
  }
}

/* ===== Process + emergency ===== */
.steps-timeline {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
}

.steps-timeline::before { display: none; }

.step-item {
  background: #fff;
  border: 1px solid rgba(166, 169, 170, 0.3);
  border-radius: 16px;
  padding: 20px 18px;
}

.step-head {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  margin-bottom: 14px;
}

.step-marker {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--primary);
  color: var(--primary-ink);
  font-weight: 800;
}

.emergency-card {
  background: #fff;
  border-radius: 20px;
  padding: 32px;
  border: 1px solid rgba(166, 169, 170, 0.3);
}

.emergency-card .emerg-note {
  justify-content: center;
  align-items: center;
  text-align: center;
}

.promo-card .promo-title {
  text-align: right;
}

.section--light .promo-quick-call .quick-call-right {
  flex-shrink: 0;
  flex-wrap: nowrap;
}

.section--light .promo-quick-call .quick-call-phone,
.quick-call-phone {
  white-space: nowrap;
  flex-shrink: 0;
}

.quick-call-phone__num {
  white-space: nowrap;
}

.symptom-card {
  background: var(--surface-alt, #E8E5DF);
  border-radius: 12px;
}

/* ===== Doctors as portraits ===== */
.doctor-photo-circle {
  border-radius: 16px;
  height: 200px;
  overflow: hidden;
}

.doctor-photo-circle img,
.doctor-photo-img {
  object-fit: cover;
  object-position: center top;
  width: 100%;
  height: 100%;
}

/* ===== Service catalog ===== */
.svc-card {
  border-radius: 18px;
  background: #fff;
}

.svc-card__photo {
  position: relative;
  aspect-ratio: 4 / 3;
}

.svc-card__photo::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(28, 26, 22, 0.55) 100%);
}

.svc-card__kicker {
  color: var(--primary-ink);
}

/* ===== Article magazine hero ===== */
.doc-article-hero {
  min-height: min(52vh, 480px);
  display: flex;
  align-items: flex-end;
}

.doc-article-hero h1 {
  font-size: clamp(32px, 4vw, 52px);
  letter-spacing: -0.04em;
  max-width: 16ch;
}

.service-hero.doc-article-hero h1,
.service-hero.doc-article-hero .service-subtitle,
.service-hero.doc-article-hero .ed-kicker,
.service-hero.doc-article-hero .doc-kicker,
.service-hero.doc-article-hero .doc-meta,
.service-hero.doc-article-hero .doc-meta span,
.service-hero.doc-article-hero .doc-meta__author,
.service-hero.doc-article-hero .breadcrumbs,
.service-hero.doc-article-hero .breadcrumbs a,
.service-hero.doc-article-hero .breadcrumbs-current,
.service-hero.doc-article-hero .back-link {
  text-shadow:
    0 1px 2px #000,
    0 2px 10px rgba(0, 0, 0, 0.85),
    0 0 18px rgba(0, 0, 0, 0.55);
}

.doc-article-layout--toc {
  grid-template-columns: 220px minmax(0, 760px);
  justify-content: center;
  align-items: start;
}

/* style.css sets overflow:hidden on generic sections, which kills position:sticky */
.doc-article-page .doc-article-body,
.doc-article-page .doc-article-layout,
.doc-service-page .service-main,
.doc-service-page .doc-article-layout {
  overflow: visible !important;
}

.doc-article-page .doc-rail,
.doc-service-page .doc-rail {
  position: sticky;
  top: calc(80px + env(safe-area-inset-top, 0px));
  z-index: 4;
  align-self: start;
  max-height: calc(100vh - 96px);
  overflow: auto;
  padding: 20px 18px;
  border-radius: 16px;
  border: 1px solid rgba(169, 202, 214, 0.55);
  background:
    radial-gradient(90% 80% at 0% 0%, rgba(197, 221, 230, 0.7) 0%, transparent 58%),
    linear-gradient(165deg, #eef6f8 0%, #e4f0f4 100%);
}

.doc-article-page .doc-rail__label,
.doc-service-page .doc-rail__label {
  color: var(--dark-soft, #676458);
}

.doc-article-page .article-toc a,
.doc-service-page .article-toc a {
  color: var(--dark, #343A40);
}

.doc-article-page .article-content h2,
.doc-article-page .article-content h3,
.doc-service-page .article-content h2,
.doc-service-page .article-content h3 {
  scroll-margin-top: 96px;
}

.author-section .container {
  display: flex;
  justify-content: center;
}

.author-card {
  margin-left: auto;
  margin-right: auto;
  width: 100%;
  max-width: 760px;
  box-sizing: border-box;
}

.article-cta .container {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.article-cta .trust-badges {
  justify-content: center;
}

.doc-article-page .article-links {
  padding: 40px 0 8px;
}

.doc-article-page .article-links-inner {
  max-width: 960px;
  margin: 0 auto;
  text-align: center;
}

.doc-article-page .article-links-eyebrow {
  margin: 0 0 6px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--teal, #676458);
}

.doc-article-page .article-links h3 {
  margin: 0 0 20px;
  font-size: clamp(22px, 2.4vw, 28px);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--dark);
}

.doc-article-page .article-links-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 8px;
}

.doc-article-page .article-link-card {
  display: block;
  text-align: left;
  padding: 16px 18px;
  text-decoration: none;
  border-radius: 14px;
  border: 1px solid rgba(169, 202, 214, 0.5);
  background:
    radial-gradient(90% 80% at 0% 0%, rgba(197, 221, 230, 0.55) 0%, transparent 58%),
    #fff;
  box-shadow: 0 8px 20px rgba(169, 202, 214, 0.12);
}

.doc-article-page .article-link-card:hover {
  border-color: rgba(169, 202, 214, 0.9);
}

.doc-article-page .article-share {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 10px;
  max-width: none;
  margin: 0;
  padding: 22px 0 8px;
  border-top: 1px solid rgba(103, 100, 88, 0.14);
}

.doc-article-page .share-label {
  width: 100%;
  margin: 0 0 2px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-secondary, #8A847A);
}

.doc-article-page .share-btn {
  width: auto;
  min-width: 48px;
  height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid rgba(169, 202, 214, 0.55);
  color: var(--dark, #343A40);
}

@media (max-width: 800px) {
  .doc-article-page .article-links-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .doc-article-page .doc-rail,
  .doc-service-page .doc-rail {
    position: static;
    max-height: none;
    overflow: visible;
  }
}

/* ===== CTA as product card, not a brown wall ===== */
.cta-teal {
  background: var(--surface-alt, #E8E5DF) !important;
  color: var(--dark);
  padding: 72px 0;
}

.cta-teal .section-title,
.cta-teal .cta-white-title,
.cta-teal h2,
.cta-teal .text-lg,
.cta-teal .cta-white-sub,
.cta-teal .consent-checkbox,
.cta-teal .consent-checkbox-cta,
.cta-teal .cta-teal-disclaimer {
  color: var(--dark) !important;
}

/* Consent privacy link sits on the white form card, not on teal.
   style.css forces .cta-teal-form .consent-checkbox a { color: #fff !important }. */
.cta-teal-form .consent-checkbox a,
.cta-teal-form .consent-checkbox-cta a,
.cta-teal .consent-checkbox a,
.cta-teal .consent-checkbox-cta a,
#cta .consent-checkbox a,
#cta .consent-checkbox-cta a {
  color: var(--dark, #343A40) !important;
  text-decoration: underline;
  font-weight: 700;
}

.cta-teal-form .consent-checkbox a:hover,
.cta-teal-form .consent-checkbox a:focus,
.cta-teal-form .consent-checkbox-cta a:hover,
.cta-teal-form .consent-checkbox-cta a:focus,
.cta-teal .consent-checkbox a:hover,
.cta-teal .consent-checkbox a:focus,
.cta-teal .consent-checkbox-cta a:hover,
.cta-teal .consent-checkbox-cta a:focus,
#cta .consent-checkbox a:hover,
#cta .consent-checkbox a:focus,
#cta .consent-checkbox-cta a:hover,
#cta .consent-checkbox-cta a:focus {
  color: var(--teal, #676458) !important;
  opacity: 1;
}

.cta-teal-form,
.cta-teal .cta-form {
  background: #fff;
  border-radius: 20px;
  padding: 28px;
  border: 1px solid rgba(166, 169, 170, 0.3);
  box-shadow: 0 12px 40px rgba(52, 58, 64, 0.06);
}

.cta-teal .cta-input {
  background: var(--surface, #F5F1EA);
  color: var(--dark);
}

.cta-teal .btn-white,
.cta-teal .btn-cta-submit,
.cta-teal .btn-primary {
  background: var(--primary) !important;
  color: var(--primary-ink) !important;
}

@media (max-width: 980px) {
  .ed-trust__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .hero-scenarios.hero-scenarios--primary {
    grid-template-columns: 1fr 1fr !important;
  }
  .hero-scenarios--primary .ed-svc:first-child {
    grid-column: 1 / -1;
    grid-row: auto;
  }
  .steps-timeline {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .hero-scenarios.hero-scenarios--primary {
    grid-template-columns: 1fr !important;
  }
  .ed-trust__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .steps-timeline {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .step-item {
    display: block;
    padding: 20px 18px;
    border-radius: 18px;
  }

  .step-marker {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    margin: 0;
    font-size: 18px;
    box-shadow: none;
    flex-shrink: 0;
  }

  .step-title {
    margin: 0;
    font-size: 28px;
    line-height: 1;
    letter-spacing: -0.02em;
  }

  .step-desc {
    margin: 0;
    max-width: none;
    padding-left: 60px;
    font-size: 20px;
    line-height: 1.42;
    color: var(--dark-soft, #676458);
  }
}

/* ===== Prices catalog ===== */
body.ed-prices {
  background: var(--surface, #F5F1EA);
}
.ed-prices .ed-prices-hero.listing-hero {
  display: grid;
  grid-template-columns: minmax(280px, 0.95fr) minmax(0, 1.05fr);
  align-items: stretch;
  padding: 0;
  background: var(--surface, #F5F1EA);
  border-bottom: 1px solid rgba(166, 169, 170, 0.35);
}

.ed-prices-hero__media {
  margin: 0;
  height: min(52vh, 460px);
  overflow: hidden;
}

.ed-prices-hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ed-prices-hero__panel.listing-hero__inner {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 40px 40px 40px 48px;
  max-width: none;
  margin: 0;
}

.ed-prices .listing-title {
  font-size: clamp(36px, 4.5vw, 56px);
  font-weight: 800;
  letter-spacing: -0.045em;
}

.ed-prices-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.ed-price-packs {
  background: #fff;
  border-bottom: 1px solid rgba(166, 169, 170, 0.28);
}

.ed-price-packs__inner {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 28px 20px;
}

.ed-price-pack {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 16px;
  border: 1px solid rgba(166, 169, 170, 0.35);
  text-decoration: none;
  color: var(--dark);
  background: var(--surface, #F5F1EA);
  min-height: 260px;
}

.ed-price-pack img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  display: block;
}

.ed-price-pack__cat {
  padding: 12px 14px 0;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent, #676458);
}

.ed-price-pack strong {
  padding: 6px 14px 0;
  font-size: 16px;
  line-height: 1.3;
  flex: 1;
}

.ed-price-pack__sum {
  padding: 12px 14px 16px;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.ed-prices .prices-layout {
  padding-top: 40px;
  grid-template-columns: minmax(0, 1fr) 320px;
}

.ed-prices .sidebar {
  position: sticky;
  top: 88px;
  align-self: start;
}

.ed-prices .sidebar-nav-btn {
  background: rgba(245, 241, 234, 0.7);
  border: 1px solid transparent;
  border-radius: 12px;
  box-shadow: none;
  color: var(--dark);
  font-weight: 650;
  transform: none;
  padding: 12px 14px;
  margin: 0 0 6px;
}

.ed-prices .sidebar-nav-btn::after { display: none; }

.ed-prices .sidebar-nav-btn:hover {
  background: #fff;
  border-color: rgba(169, 202, 214, 0.7);
  color: var(--dark);
  transform: none;
  box-shadow: none;
  padding-left: 14px;
}

.ed-prices .sidebar-nav-btn.is-active,
.ed-prices .sidebar-nav-btn.active {
  background: var(--primary, #A9CAD6);
  border-color: var(--primary, #A9CAD6);
  color: var(--primary-ink, #343A40);
  box-shadow: none;
  padding-left: 14px;
}

.ed-prices .accordion-item {
  box-shadow: none;
  border-radius: 14px;
  border: 1px solid rgba(166, 169, 170, 0.32);
}

.ed-prices .accordion-item:hover {
  transform: none;
  box-shadow: none;
}

.ed-prices .accordion-header:hover,
.ed-prices .accordion-header[aria-expanded="true"] {
  background: var(--surface, #F5F1EA);
  box-shadow: none;
}

.ed-prices .accordion-icon {
  background: var(--primary, #A9CAD6);
  color: var(--primary-ink, #343A40);
}

.ed-prices .accordion-icon svg { color: var(--primary-ink, #343A40); }

.ed-prices .accordion-section,
.ed-prices .accordion-section.bg-prices {
  overflow: visible;
  margin-bottom: 48px;
  padding: 28px 24px 32px;
  border-radius: 20px;
  border: 1px solid rgba(169, 202, 214, 0.4);
  background:
    radial-gradient(90% 70% at 8% 0%, rgba(197, 221, 230, 0.9) 0%, transparent 58%),
    linear-gradient(165deg, #F5F1EA 0%, #e4f0f4 46%, #A9CAD6 100%);
  box-shadow: 0 12px 32px rgba(169, 202, 214, 0.22);
}

.ed-prices .accordion-section .accordion-item {
  background: rgba(255, 255, 255, 0.92);
}

.ed-prices .price-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 14px 4px;
}

.ed-prices .price-name {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

.ed-prices .price-name::after {
  content: '';
  flex: 1;
  min-width: 20px;
  border-bottom: 1px dotted rgba(166, 169, 170, 0.9);
  transform: translateY(-0.4em);
}

.ed-prices .price-value {
  color: var(--dark);
  font-variant-numeric: tabular-nums;
  flex: 0 0 auto;
}

.ed-prices .sidebar-panel {
  background:
    linear-gradient(180deg, rgba(169, 202, 214, 0.28) 0%, var(--surface-alt, #E8E5DF) 140px);
  border: 1px solid rgba(169, 202, 214, 0.45);
  border-radius: 20px;
  padding: 22px;
  box-shadow: 0 18px 40px rgba(52, 58, 64, 0.08);
}

.ed-prices .sidebar-phone {
  display: block;
  margin-top: 18px;
  padding: 16px 18px;
  border-radius: 14px;
  background: var(--dark);
  color: #fff;
  text-decoration: none;
}

.ed-prices .sidebar-phone-label {
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.ed-prices .sidebar-phone-number {
  color: #fff;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.ed-prices .sidebar-cta {
  width: 100%;
  margin-top: 12px;
  justify-content: center;
}

.ed-prices .sidebar-facts {
  background: rgba(255, 255, 255, 0.55);
  border-color: rgba(169, 202, 214, 0.35);
}

.ed-prices .sidebar-facts strong { color: var(--dark); }

/* Footer: brand + nav + services + documents + contacts in one row */
.footer .footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.85fr) minmax(0, 1fr) minmax(0, 1.1fr) minmax(0, 1.15fr);
  gap: 28px 20px;
  align-items: start;
}

.footer .footer-links a {
  overflow-wrap: anywhere;
}

.footer .footer-phone {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  margin-bottom: 10px;
  font-family: 'Manrope', system-ui, sans-serif;
  font-size: 15px !important;
  font-weight: 400 !important;
  color: rgba(255, 255, 255, 0.55) !important;
}

.footer .footer-contact .footer-phone,
.footer .footer-phone a {
  font-family: 'Manrope', system-ui, sans-serif;
  font-size: 15px !important;
  font-weight: 400 !important;
  color: rgba(255, 255, 255, 0.55) !important;
  text-decoration: none;
}

.footer .footer-phone a {
  display: inline;
  white-space: nowrap;
}

.footer .footer-phone a:hover {
  color: #fff !important;
}

.footer .footer-phone svg {
  color: rgba(255, 255, 255, 0.55) !important;
  flex-shrink: 0;
}

.footer .footer-legal {
  text-align: right;
  margin-left: auto;
}

/* Address is the liked type (Manrope). Schedule must match it exactly. */
.footer .footer-address,
.footer .footer-schedule,
.footer .footer-contact p {
  overflow-wrap: anywhere;
  font-family: 'Manrope', system-ui, sans-serif;
  font-size: 15px !important;
  font-weight: 400 !important;
  font-style: normal;
  line-height: 1.45;
  letter-spacing: normal;
  color: rgba(255, 255, 255, 0.55) !important;
  margin-bottom: 10px;
}

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

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

.ed-prices .doctors-grid-editorial {
  gap: 20px;
}

.ed-prices .doctor-avatar {
  width: 100%;
  height: 180px;
  border-radius: 14px;
  overflow: hidden;
  border: 0;
  box-shadow: none;
}

.ed-prices .doctor-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.ed-prices .doctor-card-prices {
  text-align: left;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

@media (max-width: 980px) {
  .ed-prices .ed-prices-hero.listing-hero {
    grid-template-columns: minmax(0, 1fr);
  }
  /* Сайдбар прайса: на мобильных одна колонка — иначе фиксированные 320px
     вылезают за экран на узких телефонах (360px). Правило из prices.css
     перебивалось более специфичным .ed-prices .prices-layout. */
  .ed-prices .prices-layout { grid-template-columns: minmax(0, 1fr); }
  .ed-prices-hero__media { height: 220px; }
  .ed-prices-hero__panel.listing-hero__inner { padding: 28px 20px; }
  .ed-price-packs__inner { grid-template-columns: 1fr 1fr; }
  .ed-prices .sidebar { position: static; }
}

@media (max-width: 640px) {
  .ed-price-packs__inner { grid-template-columns: 1fr; }
}

/* ===== Unified header CTA ===== */
.h-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 14px 24px;
  border: 2px solid transparent;
  border-radius: 12px;
  background: var(--primary);
  color: var(--primary-ink);
  font-family: 'Manrope', system-ui, sans-serif;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.2px;
  line-height: 1.25;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  box-sizing: border-box;
  box-shadow: 0 4px 14px rgba(169, 202, 214, 0.45);
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.28s ease, background-color 0.28s ease;
}
.h-cta:hover {
  background: var(--primary-hover);
  color: var(--primary-ink);
  transform: translateY(-3px) scale(1.04);
  box-shadow: 0 12px 28px rgba(169, 202, 214, 0.5);
}
.h-cta:active {
  transform: translateY(0) scale(0.98);
  box-shadow: 0 4px 12px rgba(169, 202, 214, 0.35);
}

/* ===== Alternating solid bands, no same-color gradients ===== */
section:not([class*="bg-"]):not(.hero):not(.emergency):not(.cta-teal):not(.cta-section):not(.service-hero):not(.benefits-strip) {
  background-image: none;
}
.hero-scenarios-section,
section.section--light {
  background: var(--surface, #F5F1EA) !important;
  background-image: none !important;
}
section.section--alt,
section.home-prices-block {
  background: var(--surface-alt, #E8E5DF) !important;
  background-image: none !important;
}

/* ===== Marshak-like contact launcher (teal/cream, not Marshak visual) ===== */
.contact-hub-overlay {
  position: fixed;
  inset: 0;
  z-index: 955;
  appearance: none;
  -webkit-appearance: none;
  background: rgba(52, 58, 64, 0.28);
  border: 0;
  padding: 0;
  margin: 0;
  cursor: pointer;
}
.contact-hub-overlay[hidden] {
  display: none !important;
}
body:has(#chat-window.open) .contact-hub-overlay,
body:has(#chat-window.open) #messengers-widget.contact-hub {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

#messengers-widget.contact-hub {
  display: flex !important;
  flex-direction: column-reverse;
  align-items: flex-end;
  gap: 10px;
  position: fixed;
  right: 20px;
  bottom: 20px;
  left: auto;
  z-index: 960;
  font-family: 'Manrope', system-ui, sans-serif;
}

#messengers-widget .contact-hub__toggle {
  position: relative;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: 56px;
  min-width: 56px;
  height: 56px;
  min-height: 56px;
  padding: 0;
  border: 2px solid #fff;
  border-radius: 50%;
  background: var(--primary, #A9CAD6);
  color: var(--primary-ink, #2c3a42);
  box-shadow: 0 8px 22px rgba(169, 202, 214, 0.55);
  cursor: pointer;
  transition: transform 0.22s ease, background-color 0.22s ease, box-shadow 0.22s ease;
}
#messengers-widget .contact-hub__toggle:hover {
  transform: translateY(-2px);
  filter: none;
  background: #9dc0cd;
}
#messengers-widget.is-open .contact-hub__toggle {
  background: var(--dark, #343A40);
  color: #F5F1EA;
  box-shadow: 0 8px 22px rgba(52, 58, 64, 0.28);
}
#messengers-widget .contact-hub__icon {
  display: flex;
  align-items: center;
  justify-content: center;
}
#messengers-widget .contact-hub__icon--close,
#messengers-widget.is-open .contact-hub__icon--open {
  display: none;
}
#messengers-widget.is-open .contact-hub__icon--close {
  display: flex;
}
#messengers-widget .contact-hub__label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

#messengers-widget .contact-hub__panel,
#messengers-widget .contact-hub__panel[hidden] {
  display: none !important;
}
#messengers-widget.is-open .contact-hub__panel {
  display: flex !important;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  min-width: 0;
  background: transparent;
  padding: 0;
  border: 0;
}

#messengers-widget .chat-btn {
  position: relative;
  display: inline-flex;
  flex-direction: row-reverse;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  width: auto;
  min-width: 0;
  height: auto;
  min-height: 48px;
  padding: 0 8px 0 14px;
  border: 0;
  border-radius: 999px;
  background: #F5F1EA;
  color: var(--dark, #343A40);
  font-family: 'Manrope', system-ui, sans-serif;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  box-shadow: 0 6px 18px rgba(52, 58, 64, 0.16);
  opacity: 0;
  transform: translateY(10px) scale(0.96);
  cursor: pointer;
  transition: opacity 0.22s ease, transform 0.22s ease, background-color 0.2s ease;
}
#messengers-widget.is-open .chat-btn {
  opacity: 1;
  transform: none;
}
#messengers-widget.is-open .chat-btn:nth-last-child(1) { transition-delay: 0.02s; }
#messengers-widget.is-open .chat-btn:nth-last-child(2) { transition-delay: 0.06s; }
#messengers-widget.is-open .chat-btn:nth-last-child(3) { transition-delay: 0.1s; }
#messengers-widget.is-open .chat-btn:nth-last-child(4) { transition-delay: 0.14s; }
#messengers-widget.is-open .chat-btn:nth-last-child(5) { transition-delay: 0.18s; }

#messengers-widget .chat-btn__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  min-width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--primary, #A9CAD6);
  color: var(--primary-ink, #2c3a42);
}
#messengers-widget .chat-btn__text {
  position: static;
  width: auto;
  height: auto;
  padding: 0;
  margin: 0;
  overflow: visible;
  clip: auto;
  white-space: nowrap;
  color: inherit;
  border: 0;
}
#messengers-widget .chat-btn:hover,
#messengers-widget .chat-btn:focus-visible {
  background: #fff;
  color: var(--dark, #343A40);
}
#messengers-widget .chat-btn--telegram .chat-btn__icon,
#messengers-widget .chat-btn--whatsapp .chat-btn__icon,
#messengers-widget .chat-btn--ai .chat-btn__icon,
#messengers-widget .chat-btn--phone .chat-btn__icon,
#messengers-widget .chat-btn--callback .chat-btn__icon {
  background: var(--primary, #A9CAD6);
  color: var(--primary-ink, #2c3a42);
}

body.contact-hub-open #scroll-top-btn {
  opacity: 0 !important;
  visibility: hidden;
  pointer-events: none;
}

#scroll-top-btn {
  bottom: calc(56px + 24px + 16px) !important;
}

@media (min-width: 769px) {
  #messengers-widget.is-open .contact-hub__panel {
    flex-direction: column;
  }
  #messengers-widget .chat-btn {
    width: auto;
    min-width: 0;
    height: auto;
    min-height: 48px;
    padding: 0 8px 0 14px;
    border-radius: 999px;
    justify-content: flex-start;
  }
  #messengers-widget .chat-btn span {
    position: static;
    width: auto;
    height: auto;
    padding: 0;
    margin: 0;
    overflow: visible;
    clip: auto;
    white-space: nowrap;
    border: 0;
  }
}

@media (max-width: 768px) {
  .contact-hub-overlay {
    bottom: calc(64px + env(safe-area-inset-bottom, 0px));
  }
  #messengers-widget.contact-hub {
    display: flex !important;
    left: 12px;
    right: auto;
    bottom: calc(92px + env(safe-area-inset-bottom, 0px));
    align-items: flex-start;
  }
  #messengers-widget .contact-hub__toggle {
    width: 52px;
    min-width: 52px;
    height: 52px;
    min-height: 52px;
    padding: 0;
    border-radius: 50%;
  }
  #messengers-widget.is-open .contact-hub__panel {
    align-items: flex-start;
  }
  #messengers-widget .chat-btn {
    flex-direction: row;
    padding: 0 14px 0 8px;
  }
  #scroll-top-btn {
    right: 12px !important;
    bottom: calc(160px + env(safe-area-inset-bottom, 0px)) !important;
  }
}

/* ===== Licenses carousel ===== */
.ed-licenses {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  margin-top: 32px;
}
.ed-licenses__viewport {
  overflow-x: auto;
  overflow-y: hidden;
  min-width: 0;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.ed-licenses__viewport::-webkit-scrollbar {
  display: none;
}
.ed-licenses__track {
  display: flex;
  gap: 20px;
  width: max-content;
  padding: 8px 2px 16px;
}
.ed-licenses__track .license-card {
  flex: 0 0 clamp(240px, 30vw, 360px);
  scroll-snap-align: start;
  min-width: 0;
  background: #fff;
}
.ed-licenses__track .license-card img {
  background: #fff;
}
.ed-licenses__track .license-card .license-title {
  background: transparent;
  color: var(--dark, #343A40);
}
.ed-licenses__nav {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(166, 169, 170, 0.45);
  background: #fff;
  color: var(--dark);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  position: relative;
  z-index: 3;
  pointer-events: auto;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}
.ed-licenses__nav svg {
  width: 18px;
  height: 18px;
}
.ed-licenses__nav:hover {
  background: var(--primary);
  border-color: var(--primary);
  transform: scale(1.06);
}
#licenses .services-all-link-wrap {
  margin-top: 20px;
  text-align: center;
}

@media (max-width: 980px) {
  .ed-licenses__track .license-card {
    flex-basis: clamp(220px, 46vw, 340px);
  }
}

@media (max-width: 640px) {
  .ed-licenses {
    grid-template-columns: 1fr;
  }
  .ed-licenses__nav {
    display: none;
  }
  .ed-licenses__track .license-card {
    flex-basis: 86%;
  }
}

/* ===== SEO brief gaps: nav accordion trigger, phone-only mobile CTA, 320px ===== */
.header .nav .nav-dropdown-toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 8px 14px;
  border: 0;
  border-radius: var(--radius-sm, 8px);
  background: none;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  color: var(--dark);
  cursor: pointer;
  line-height: 1.2;
}
.header .nav .nav-dropdown-toggle:hover {
  color: var(--teal);
  background: rgba(103, 100, 88, 0.08);
}
.header .nav .nav-dropdown-toggle.active {
  background: var(--primary);
  color: var(--primary-ink);
}

.mobile-cta-bar {
  gap: 0;
}
.mobile-cta-bar__call {
  flex: 1 1 100%;
  width: 100%;
  justify-content: center;
  background: #C44536;
  color: #fff;
  box-shadow: 0 4px 16px rgba(196, 69, 54, 0.35);
  font-weight: 800;
  letter-spacing: 0.02em;
}
.mobile-cta-bar__call:hover,
.mobile-cta-bar__call:focus {
  background: #b03b2e;
  color: #fff;
}
.mobile-cta-bar__msg {
  display: none !important;
}

@media (max-width: 768px) {
  .header .nav.active .nav-item > .nav-dropdown-toggle,
  .header .nav.active .nav-dropdown > .nav-dropdown-toggle {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    padding: 14px 10px;
    font-size: 18px;
    line-height: 1.2;
    font-weight: 700;
    color: var(--dark);
    border-bottom: 1px solid rgba(166, 169, 170, 0.22);
    border-radius: 0;
    background: none;
  }
  .header .nav.active .nav-dropdown > .nav-dropdown-toggle::after {
    content: "+";
    flex-shrink: 0;
    font-size: 22px;
    line-height: 1;
    font-weight: 500;
    color: var(--teal);
  }
  .header .nav.active .nav-dropdown.is-open > .nav-dropdown-toggle::after {
    content: "-";
  }
  .header .nav.active .nav-caret {
    display: none;
  }
}

@media (max-width: 360px) {
  .header,
  .container,
  .article-content,
  .service-content,
  .cta-form,
  .cta-input,
  .cta-teal-form {
    max-width: 100%;
    min-width: 0;
  }
  .cta-white-title,
  .cta-form h2,
  .cta-teal h2,
  .section-title {
    overflow-wrap: anywhere;
    word-break: break-word;
  }
  .cta-input,
  .cta-form input,
  .cta-form select,
  .cta-form textarea,
  .cta-teal-form input,
  .cta-teal-form select,
  .cta-teal-form textarea {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }
  .review-stars {
    flex-wrap: wrap;
    max-width: 100%;
    letter-spacing: 0 !important;
  }
  .review-card {
    overflow: hidden;
  }
  .review-card::before {
    display: none;
  }
}

a.review-card,
a.review-card--link {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

.reviews-page .review-card::before {
  display: none;
}

.reviews-page .reviews-pagination {
  position: relative;
  z-index: 2;
}

.reviews-page .pagination-item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* ===== Header nav: one row, no label wrap ===== */
.header-inner {
  flex-wrap: nowrap;
}

.header-end {
  flex-wrap: nowrap;
  min-width: 0;
}

.header .logo {
  flex-shrink: 0;
}

.header .nav {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 2px;
  min-width: 0;
}

.header-actions {
  flex-shrink: 0;
  margin-left: 6px;
}

.header .nav > a,
.header .nav > .nav-item {
  flex: 0 0 auto;
}

.header .nav > a,
.header .nav .nav-item > a,
.header .nav .nav-dropdown-toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  line-height: 1.2;
  font-family: 'Manrope', system-ui, sans-serif;
  padding: 8px 10px;
}

.header .nav > a:last-child {
  padding-right: 10px;
  margin-right: 2px;
}

.header .nav .nav-caret {
  flex-shrink: 0;
  line-height: 1;
}

@media (min-width: 1101px) and (max-width: 1400px) {
  .header-inner {
    padding-left: 20px !important;
    padding-right: 20px !important;
    gap: 12px;
  }
  .header-end {
    gap: 8px 18px;
  }
  .header .nav {
    gap: 0;
  }
  .header .nav > a,
  .header .nav .nav-item > a,
  .header .nav .nav-dropdown-toggle {
    font-size: 12px;
    padding: 6px 6px;
    letter-spacing: 0;
  }
  .header-actions {
    margin-left: 8px;
  }
  .header-actions .header-phone,
  .header-actions .h-cta {
    min-width: 0;
    width: auto;
    padding: 0 14px;
  }
}

@media (max-width: 1100px) {
  .header .nav {
    display: none !important;
  }
  .header .burger {
    display: flex !important;
  }
  .header-actions .header-phone,
  .header-actions .h-cta {
    min-width: 0;
    width: auto;
    padding: 0 12px;
  }

  .header .nav.active {
    display: flex !important;
    flex-direction: column;
    flex-wrap: nowrap;
    position: fixed !important;
    top: 64px;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--surface, #F5F1EA);
    box-shadow: 0 16px 32px rgba(52, 58, 64, 0.12);
    padding: 10px 14px 28px;
    gap: 6px;
    height: calc(100vh - 64px) !important;
    max-height: calc(100vh - 64px) !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    overscroll-behavior: contain;
    touch-action: pan-y;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    z-index: 401;
  }

  .header .nav.active > a,
  .header .nav.active .nav-item > a,
  .header .nav.active .nav-item > .nav-dropdown-toggle,
  .header .nav.active .nav-dropdown > .nav-dropdown-toggle {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    padding: 14px 10px;
    font-size: 18px;
    line-height: 1.2;
    font-weight: 700;
    color: var(--dark);
    border-bottom: 1px solid rgba(166, 169, 170, 0.22);
    border-radius: 0;
    background: none;
    white-space: nowrap;
  }

  .header .nav.active .nav-dropdown-panel {
    display: none !important;
    padding: 0 !important;
    margin: 0 !important;
    border-left: none !important;
    max-height: none !important;
    overflow: hidden !important;
  }

  .header .nav.active .nav-dropdown.is-open > .nav-dropdown-panel {
    display: block !important;
    padding: 8px 0 10px 14px !important;
    border-left: 2px solid rgba(169, 202, 214, 0.7) !important;
    overflow: visible !important;
  }

  .header .nav.active .nav-dropdown.is-open > .nav-dropdown-panel--categories {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    padding: 4px 0 8px 8px !important;
    overflow: visible !important;
  }

  .header .nav.active .nav-dropdown-panel a,
  .header .nav.active .nav-cat-items a {
    display: block;
    padding: 9px 0;
    font-size: 16px;
    line-height: 1.35;
    color: var(--dark-soft, #676458);
    white-space: normal !important;
  }

  .header .nav.active .nav-dropdown > a::after,
  .header .nav.active .nav-dropdown > .nav-dropdown-toggle::after {
    content: "+";
    flex-shrink: 0;
    font-size: 22px;
    line-height: 1;
    font-weight: 500;
    color: var(--teal);
  }

  .header .nav.active .nav-dropdown.is-open > a::after,
  .header .nav.active .nav-dropdown.is-open > .nav-dropdown-toggle::after {
    content: "-";
  }

  .header .nav.active .nav-caret {
    display: none;
  }

  .header .nav.active .nav-dropdown,
  .header .nav.active .nav-cat {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }

  .header .nav.active .nav-cat-title {
    font-size: 14px !important;
    letter-spacing: 0.04em;
  }

  .header .nav.active .nav-cat-items {
    display: none !important;
  }

  .header .nav.active .nav-cat.is-open .nav-cat-items {
    display: flex !important;
  }
}

/* Contacts page: no global section overflow/gradient; stacked heads; stacked socials */
.contacts-page-layout section,
.contacts-page-layout .bg-plain {
  overflow: visible !important;
  background: none !important;
  position: static;
  padding: 0;
}

.contacts-section-head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.contact-cards-section {
  display: block;
}

.contact-cards-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.contacts-photo-block picture {
  max-width: none;
  margin: 0;
  border-radius: 0;
  box-shadow: none;
  overflow: visible;
}

.contacts-sidebar .social-links {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
}

.contacts-sidebar .social-links a.social-link {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  width: 100%;
  height: auto;
  min-height: 48px;
  padding: 10px 16px;
  border-radius: 12px;
  box-sizing: border-box;
  overflow: visible;
  white-space: nowrap;
}

.contacts-sidebar .social-links a.social-link span {
  font-family: 'Manrope', system-ui, sans-serif;
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
}

.contacts-sidebar .social-links a.social-link svg {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

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

/* Staff portraits: face in frame, not a 50% circle cropped to the forehead */
.staff-card-editorial__photo {
  aspect-ratio: 4 / 5;
  max-height: 360px;
  overflow: hidden;
}

.staff-card-editorial__photo img,
.staff-card-editorial__photo img.doctor-photo {
  width: 100% !important;
  height: 100% !important;
  margin: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  object-fit: cover;
  object-position: center 28%;
}

.staff-featured__photo img {
  object-fit: cover;
  object-position: center 28%;
}

.doctor-photo-circle img,
.doctor-photo-img {
  object-fit: cover;
  object-position: center 28%;
}

/* Long-form service/article: lead + section cards instead of one document slab */
.article-content,
.service-content {
  background: transparent;
  box-shadow: none;
  padding: 0;
  max-width: 800px;
}

.article-content .ed-prose__lead,
.service-content .ed-prose__lead {
  font-size: 1.12rem;
  line-height: 1.55;
  padding: 24px 28px;
  margin: 0 0 20px;
  border-radius: 18px;
  border: 1px solid rgba(169, 202, 214, 0.38);
  background:
    radial-gradient(90% 80% at 0% 0%, rgba(197, 221, 230, 0.55) 0%, transparent 58%),
    linear-gradient(165deg, #F5F1EA 0%, #e8f2f5 100%);
  color: var(--dark);
}

.article-content .ed-prose__lead > p:last-child,
.service-content .ed-prose__lead > p:last-child {
  margin-bottom: 0;
}

.article-content,
.service-content {
  counter-reset: prose-card;
}

.article-content .ed-prose__card,
.service-content .ed-prose__card {
  counter-increment: prose-card;
  background: #fff;
  border: 1px solid rgba(169, 202, 214, 0.28);
  border-radius: 16px;
  padding: 22px 26px 18px;
  margin: 0 0 16px;
  box-shadow: 0 8px 22px rgba(169, 202, 214, 0.12);
}

.article-content .ed-prose__card h2,
.service-content .ed-prose__card h2 {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-top: 0;
  margin-bottom: 12px;
  font-size: clamp(20px, 2.2vw, 24px);
}

.article-content .ed-prose__card h2::before,
.service-content .ed-prose__card h2::before {
  content: counter(prose-card, decimal-leading-zero);
  flex-shrink: 0;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--primary-ink, #343A40);
  background: var(--primary, #A9CAD6);
  border-radius: 8px;
  padding: 4px 8px;
  line-height: 1;
}

.article-content .ed-prose__body > *:last-child,
.service-content .ed-prose__body > *:last-child {
  margin-bottom: 0;
}

@media (max-width: 640px) {
  .article-content .ed-prose__lead,
  .service-content .ed-prose__lead,
  .article-content .ed-prose__card,
  .service-content .ed-prose__card {
    padding: 18px 16px;
  }
}

/* About: interior + wayfinding, not a lone photo */
.about-space {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(260px, 0.8fr);
  gap: 28px;
  align-items: start;
}

.about-space-gallery {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 10px;
}

.about-space-shot {
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(103, 100, 88, 0.14);
  background: #fff;
}

.about-space-shot--wide {
  grid-column: 1 / -1;
}

.about-space-shot picture,
.about-space-shot img {
  display: block;
  width: 100%;
  height: 100%;
}

.about-space-shot img {
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.about-space-shot--wide img {
  aspect-ratio: 21 / 9;
}

.about-space-shot figcaption {
  padding: 10px 12px 12px;
  font-size: 13px;
  line-height: 1.4;
  color: var(--text-secondary, #8A847A);
}

.about-space-nav {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid rgba(103, 100, 88, 0.18);
}

.about-space-nav li {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid rgba(103, 100, 88, 0.12);
}

.about-space-nav__n {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--primary-ink, #343A40);
}

.about-space-nav strong {
  display: block;
  margin-bottom: 4px;
  font-size: 16px;
  font-weight: 800;
  color: var(--dark);
}

.about-space-nav p {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-secondary, #8A847A);
}

@media (max-width: 900px) {
  .about-space {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .about-space-gallery {
    grid-template-columns: 1fr;
  }

  .about-space-shot--wide {
    grid-column: auto;
  }
}

/* Contacts: route modal must overlay, not appear in page flow */
.route-modal {
  position: fixed;
  inset: 0;
  z-index: var(--z-overlay, 400);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.route-modal[hidden] {
  display: none !important;
}

.route-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(52, 58, 64, 0.55);
  backdrop-filter: blur(3px);
}

.route-modal-content {
  position: relative;
  width: 100%;
  max-width: 720px;
  background: var(--surface, #F5F1EA);
  border-radius: 16px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.28);
  padding: 22px 22px 18px;
}

.route-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.route-modal-header h3 {
  margin: 0;
  font-size: 20px;
  font-weight: 800;
  color: var(--dark, #343A40);
}

.route-modal-close {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--dark, #343A40);
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.route-modal-address {
  margin: 0 0 12px;
  font-size: 14px;
  color: var(--text-secondary, #8A847A);
}

.route-modal-map {
  width: 100%;
  height: 360px;
  border-radius: 12px;
  overflow: hidden;
  background: #d7e6ed;
}

.route-modal-hint,
.route-fallback {
  margin: 12px 0 0;
  font-size: 13px;
  color: var(--text-secondary, #8A847A);
}

.route-fallback a {
  color: var(--dark, #343A40);
  font-weight: 700;
}

/* DM-fix 2026-09-08: narkomanii hero photo was cropped at bottom (object-position 18% showed only ceiling/walls) */
.service-hero--narkomanii .service-hero-bg img {
  object-position: center 62%;
}
