/*
 * MIRA / local concept
 * Light medical system based on the supplied palette.
 * Mint Cream and white carry the interface; the remaining colors are accents.
 */

:root {
  --brick: #32de8a;
  --blue-900: #292f36;
  --blue-700: #292f36;
  --blue-600: #32de8a;
  --blue-400: #4ecdc4;
  --blue-200: #4ecdc4;
  --blue-100: #e9f9f7;
  --blue-50: #f7fff7;
  --ink: #292f36;
  --ink-2: #58636b;
  --line: rgba(41, 47, 54, .14);
  --white: #ffffff;
  --ok: #4ecdc4;
  --paper: #f7fff7;
  --aqua: #4ecdc4;
  --steel: #4ecdc4;
  --slate: #58636b;
  --forest: #292f36;
  --emerald: #32de8a;
  --action-hover: #24c97a;
  --action-pressed: #1cad68;
  --gold: #ffe66d;
  --radius: 24px;
  --radius-sm: 13px;
  --surface-cyan: #e9f9f7;
  --surface-coral: #fff1f1;
  --surface-gold: #fff9d8;
  --shadow: 0 20px 50px rgba(41, 47, 54, .1);
  --shadow-soft: 0 0 0 1px rgba(41, 47, 54, .08), 0 12px 32px rgba(41, 47, 54, .07);
  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --ease-ui: cubic-bezier(.2, .8, .2, 1);
  --wrap: 1240px;
  --font: 'Montserrat', sans-serif;
  --display: 'Montserrat', sans-serif;
}

html { color-scheme: light; background: var(--paper); }

body {
  min-width: 320px;
  font-family: var(--font);
  font-weight: 500;
  font-size: 16px;
  line-height: 1.7;
  color: var(--forest);
  background: var(--paper);
}

::selection { color: var(--forest); background: var(--gold); }
* { scrollbar-color: var(--aqua) var(--paper); }

h1,
h2 {
  font-family: var(--display);
  font-weight: 750;
  letter-spacing: -.035em;
  text-wrap: balance;
}

h1 {
  max-width: 100%;
  font-size: clamp(2.3rem, 4.4vw, 3.5rem);
  line-height: 1.06;
  overflow-wrap: break-word;
  hyphens: none;
}
h2 { font-size: clamp(2rem, 7vw, 3.85rem); line-height: 1.08; }
h3,
h4 { color: var(--forest); font-weight: 750; letter-spacing: -.025em; text-wrap: balance; }
p { text-wrap: pretty; }
a { color: var(--forest); }

.wrap {
  width: min(100%, var(--wrap));
  padding-inline: 20px;
}

:focus-visible { outline: 3px solid var(--emerald); outline-offset: 3px; }

/* Controls */
.btn {
  min-height: 50px;
  padding: 13px 22px;
  border-radius: 999px;
  font-weight: 800;
  letter-spacing: -.01em;
  transition: transform .18s var(--ease-ui), background-color .22s var(--ease-ui), border-color .22s var(--ease-ui), box-shadow .22s var(--ease-ui);
}

.btn:active { transform: scale(.98); }

.btn-primary {
  color: var(--forest);
  background: var(--emerald);
  box-shadow: 0 10px 28px rgba(50, 222, 138, .24);
}

.btn-primary:hover {
  color: var(--forest);
  background: var(--action-hover);
  box-shadow: 0 14px 34px rgba(50, 222, 138, .3);
  transform: translateY(-2px);
}

.btn-primary:active { background: var(--action-pressed); }

.btn-ghost {
  color: var(--forest);
  background: transparent;
  border-color: var(--slate);
}

.btn-ghost:hover { background: var(--blue-100); border-color: var(--forest); }

/* Header */
.header {
  top: 0;
  background: rgba(247, 255, 247, .94);
  border-color: var(--line);
  backdrop-filter: blur(18px) saturate(140%);
}

.header-in { min-height: 76px; }
.logo { gap: 12px; color: var(--forest); }
.logo-mark { width: 46px; height: 46px; }
.logo-text b { font-family: var(--display); font-size: 20px; font-weight: 750; letter-spacing: .04em; }
.logo-text span {
  display: block;
  max-width: min(290px, calc(100vw - 150px));
  color: var(--slate);
  font-size: 10.5px;
  font-weight: 700;
  line-height: 1.25;
}
.header-phone { color: var(--forest); font-size: 17px; }
.header-phone small { color: var(--slate); }
.nav-toggle { border-radius: 50%; border-color: var(--line); background: var(--white); }

.nav { display: none; background: var(--white); border-block: 1px solid var(--line); }
.nav.is-open {
  display: block;
  top: 72px;
  background: var(--white);
  box-shadow: 0 24px 50px rgba(41, 47, 54, .14);
}
.nav-list > li > a,
.nav-list > li > .nav-parent {
  color: var(--forest);
  border-color: var(--line);
  font-weight: 650;
}
.nav-list > li > a:hover,
.nav-list > li.is-active > a,
.nav-list > li.is-active > .nav-parent { color: var(--forest); background: var(--blue-100); }
.nav-list > li > .nav-parent:hover { color: var(--forest); background: var(--blue-100); }
.submenu { background: var(--white); border: 0; box-shadow: var(--shadow); }
.nav-list > li.has-sub:nth-last-child(-n + 2) .submenu { right: 0; left: auto; }
.submenu a { color: var(--forest); }
.submenu a:hover { color: var(--forest); background: var(--blue-100); }
.nav-contact { color: var(--slate); border-color: var(--line); }
.nav-contact a { color: var(--forest); font-size: 15px; white-space: nowrap; }
.mobile-nav-list { display: none; }

main > section { scroll-margin-top: 88px; }

/* Hero */
.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 46px 0 34px;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.hero::before {
  position: absolute;
  z-index: -1;
  width: 420px;
  height: 420px;
  right: -180px;
  top: -210px;
  background: var(--surface-cyan);
  border: 0;
  border-radius: 50%;
  content: '';
}

.hero::after {
  position: absolute;
  z-index: -1;
  width: 84px;
  height: 84px;
  right: 5vw;
  bottom: 30px;
  background: var(--gold);
  border-radius: 50%;
  content: '';
}

.hero-grid,
.page-head-grid { display: grid; grid-template-columns: 1fr; gap: 30px; align-items: center; }
.hero-grid > *,
.page-head-grid > * { min-width: 0; }
.hero h1 { max-width: 15ch; color: var(--forest); }
.hero p.lead { max-width: 57ch; margin: 22px 0 28px; color: var(--forest); font-size: 17px; }
.hero-note { color: var(--slate); font-size: 13px; }
.hero-actions .btn-primary { color: var(--forest); background: var(--emerald); box-shadow: 0 12px 28px rgba(50, 222, 138, .22); }
.hero-actions .btn-primary:hover { color: var(--forest); background: var(--action-hover); }

.hero-media { position: relative; }
.hero-media::before {
  position: absolute;
  inset: -12px 12px 12px -12px;
  z-index: -1;
  background: var(--aqua);
  border: 0;
  border-radius: 28px;
  content: '';
}
.hero-media img {
  width: 100%;
  min-height: 280px;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border: 0;
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.hero .facts,
.service-facts-section.is-attached .facts {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 16px 44px rgba(41, 47, 54, .07);
  overflow: hidden;
}
.hero .facts { margin-top: 30px; }
.service-facts-section.is-attached {
  position: relative;
  z-index: 2;
  margin-top: -1px;
  padding: 0 0 38px;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.service-facts-section.is-attached .facts { margin-top: -18px; }
.fact {
  min-height: 126px;
  padding: 18px;
  background: var(--white);
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
.fact:nth-child(odd) { border-right: 1px solid var(--line); }
.fact:nth-child(-n + 2) { border-bottom: 1px solid var(--line); }
.fact b { color: var(--forest); font-family: var(--display); font-size: clamp(24px, 7vw, 38px); font-weight: 800; }
.fact span { display: block; max-width: 19ch; color: var(--forest); font-size: 12px; line-height: 1.45; }

/* Page title */
.page-head {
  position: relative;
  overflow: hidden;
  padding: 30px 0 46px;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.page-head::after {
  position: absolute;
  right: -110px;
  bottom: -170px;
  width: 340px;
  height: 340px;
  background: var(--surface-cyan);
  border: 0;
  border-radius: 50%;
  content: '';
}
.page-head .wrap { position: relative; z-index: 1; }
.page-head h1 { max-width: 16ch; }
.page-head .lead,
.page-head .intro { max-width: 62ch; color: var(--slate); font-size: 17px; }
.crumbs { margin-bottom: 24px; color: var(--slate); font-size: 12px; font-weight: 700; letter-spacing: .025em; }
.crumbs a { color: var(--forest); }
.hero-benefits { display: grid; gap: 9px; margin: 20px 0 24px; padding: 0; list-style: none; }
.hero-benefits li { position: relative; margin: 0; padding-left: 28px; color: var(--forest); font-weight: 650; }
.hero-benefits li::before { position: absolute; left: 0; top: .08em; color: #167c58; font-weight: 800; content: '✓'; }
.service-code { margin: -7px 0 18px; color: var(--slate); font-size: 13px; line-height: 1.45; }
.service-code b { margin-right: 5px; color: var(--forest); }

/* Section rhythm */
.section { padding: 64px 0; }
.section.alt { background: var(--surface-cyan); border: 0; }
.home-services { background: var(--white); }
.section-head { max-width: 720px; margin-bottom: 34px; }
.section-head p { max-width: 58ch; color: var(--slate); font-size: 16px; }

.cards,
.cards-2,
.trust-grid,
.metrics-grid,
.team-grid,
.service-packages,
.relief-price-grid { grid-template-columns: 1fr; gap: 14px; }

.card,
.service-package,
.relief-price-card {
  position: relative;
  overflow: hidden;
  padding: 24px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: none;
}
.card::before,
.service-package::before,
.relief-price-card::before {
  position: absolute;
  width: 42px;
  height: 4px;
  top: 0;
  left: 24px;
  background: var(--emerald);
  content: '';
}
.card:hover { border-color: var(--aqua); box-shadow: var(--shadow); transform: translateY(-3px); }
.card h3 { font-size: 19px; }
.card p { color: var(--slate); }
.card .more { display: inline-block; color: var(--forest); font-weight: 800; transition: transform .18s var(--ease-ui); }
.card:hover .more { transform: translateX(3px); }

.checklist { gap: 10px; }
.checklist li { padding-left: 30px; }
.checklist li::before {
  width: 18px;
  height: 18px;
  top: .35em;
  border: 0;
  border-radius: 50%;
  background: var(--aqua);
  box-shadow: inset 0 0 0 5px var(--paper);
}

.layout { grid-template-columns: 1fr; gap: 34px; padding-block: 42px 64px; }
.content h2 { margin: 50px 0 18px; }
.content > p { color: var(--slate); }

/* Trust */
.trust-section { background: var(--surface-cyan); color: var(--forest); }
.trust-section .section-head h2 { color: var(--forest); }
.trust-section .section-head p { color: var(--slate); }
.trust-item {
  min-height: 230px;
  padding: 24px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 16px;
}
.trust-item > span {
  display: inline-flex;
  width: 48px;
  height: 48px;
  align-items: center;
  justify-content: center;
  color: var(--forest);
  background: var(--gold);
  border-radius: 50%;
  font-family: var(--display);
  font-size: 15px;
  font-weight: 800;
  margin-bottom: 22px;
}
.trust-item h3 { margin: 0 0 10px; color: var(--forest); }
.trust-item p { color: var(--slate); }

/* Work timeline */
.work-section { background: var(--paper) !important; }
.work-grid {
  grid-template-columns: none;
  grid-auto-flow: column;
  grid-auto-columns: minmax(270px, 82vw);
  gap: 14px;
  overflow-x: auto;
  padding: 4px 2px 16px;
  scroll-snap-type: x mandatory;
}
.work-step {
  min-height: 300px;
  padding: 24px;
  scroll-snap-align: start;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 16px;
}
.work-step-label {
  display: inline-flex;
  width: 70px;
  height: 70px;
  align-items: center;
  justify-content: center;
  color: var(--forest);
  background: var(--aqua);
  border-radius: 50%;
  font-family: var(--display);
  font-size: 28px;
  font-weight: 800;
  line-height: 1;
}
.work-step h3 { margin-top: 30px; }
.work-step p { color: var(--slate); }

/* Metrics */
.metrics-section { background: var(--white); }
.metrics-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; overflow: visible; background: transparent; border: 0; }
.metric {
  position: relative;
  min-height: 212px;
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  grid-template-rows: auto 1fr;
  align-content: start;
  column-gap: 14px;
  padding: 23px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow-soft);
}
.metric-icon { grid-row: 1 / span 2; width: 48px; height: 48px; display: grid; place-items: center; color: #167c58; background: var(--surface-cyan); border-radius: 14px; }
.metric-icon svg { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.metric strong {
  align-self: end;
  color: var(--forest);
  font-family: var(--display);
  font-size: clamp(42px, 4.5vw, 64px);
  font-weight: 800;
  letter-spacing: -.035em;
  line-height: 1;
  white-space: normal;
}
.metric p { grid-column: 2; align-self: start; margin: 8px 0 0; color: var(--slate); font-size: 14px; line-height: 1.5; }
.metric:nth-child(4n + 1) { border-top: 4px solid var(--aqua); }
.metric:nth-child(4n + 2) { border-top: 4px solid var(--emerald); }
.metric:nth-child(4n + 3) { border-top: 4px solid var(--gold); }
.metric:nth-child(4n) { border-top: 4px solid var(--surface-coral); }

@keyframes metric-icon-arrive {
  0% { opacity: 0; transform: translateY(8px) scale(.88); }
  70% { opacity: 1; transform: translateY(-2px) scale(1.04); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

/* Forms */
.lead-block,
.section .lead-block { padding: 22px; background: var(--white); border: 1px solid var(--line); border-radius: 4px 30px 4px 30px; }
.lead-form input {
  min-height: 52px;
  color: var(--forest);
  background: var(--paper);
  border-color: var(--line);
  border-radius: 10px;
}
.lead-form .consent-check { display: flex; align-items: flex-start; gap: 10px; margin: 4px 0 12px; color: var(--slate); font-size: 12.5px; line-height: 1.45; }
.lead-form .consent-check input { flex: 0 0 18px; width: 18px; height: 18px; min-height: 18px; margin: 1px 0 0; padding: 0; accent-color: var(--forest); }
.lead-form .consent-check a { color: var(--forest); font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }
.lead-form input::placeholder { color: var(--slate); opacity: .85; }
.lead-note { color: var(--slate); }

.urgent-help { padding-top: 0; background: var(--paper); }
.urgent-help-panel {
  grid-template-columns: 1fr;
  gap: 28px;
  padding: 28px 22px;
  background: var(--white);
  border: 0;
  border-radius: 20px;
  box-shadow: var(--shadow);
}
.urgent-help-copy h2 { color: var(--forest); }
.urgent-help-copy > p,
.urgent-help .urgent-lead-form .lead-note { color: var(--slate); }
.urgent-benefits { grid-template-columns: 1fr; }
.urgent-benefits li { color: var(--forest); }
.urgent-benefits li::before { color: #a42f38; }
.urgent-help .urgent-lead-form { background: var(--surface-cyan); border-color: transparent; }
.urgent-help .urgent-lead-form h4,
.urgent-help .urgent-lead-form label { color: var(--forest); }

/* Reviews and team */
.patient-review {
  aspect-ratio: auto;
  min-height: 0;
  background: var(--white);
  border-color: var(--line);
  border-radius: 16px;
}
.review-stars { color: var(--gold); }
.review-avatar { color: var(--forest); background: var(--gold); }
.review-source { color: var(--slate); }
.review-arrow { color: var(--forest); background: var(--paper); }
.patient-review-track { scrollbar-color: var(--emerald) var(--blue-100); overflow-y: hidden; }

.team-section { background: var(--white); border-block: 1px solid var(--line); }
.team-card {
  background: var(--white);
  border: 0;
  border-radius: 18px;
  box-shadow: 0 14px 40px rgba(41, 47, 54, .1);
}
.team-card img { aspect-ratio: 4 / 4.4; }
.team-card-body { padding: 24px; }
.team-role { color: var(--forest); }
.team-more {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 7px;
  padding: 8px 0;
  border: 0;
  color: var(--forest);
  background: transparent;
  font: inherit;
  font-weight: 750;
  cursor: pointer;
  transition: color .2s var(--ease-ui), transform .2s var(--ease-ui);
}
.team-more:hover { color: var(--action-pressed); transform: translateY(-1px); }
.team-more:active { color: var(--forest); transform: scale(.98); }
.team-more span { transition: transform .2s var(--ease-ui); }
.team-more:hover span { transform: translateX(4px); }

.staff-modal-dialog {
  width: min(100%, 880px);
  border-radius: 18px;
  overscroll-behavior: contain;
}
.staff-modal-head {
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr);
  gap: 22px;
  align-items: center;
  padding: 28px 64px 28px 28px;
  background: var(--surface-cyan);
}
.staff-modal-head > img {
  width: 118px;
  height: 142px;
  object-fit: cover;
  object-position: top center;
  border-radius: 14px;
}
.staff-modal-head h2 { margin-bottom: 8px; font-size: clamp(25px, 4vw, 36px); }
.staff-modal-role { margin: 0 0 3px; color: var(--forest); font-weight: 700; }
.staff-modal-exp { margin: 0; color: var(--slate); }
.staff-modal-body { padding: 28px; }
.staff-modal-about { max-width: 68ch; margin-bottom: 28px; color: var(--forest); font-size: 17px; }
.staff-modal-body h3 { margin: 28px 0 12px; font-size: 19px; }
.staff-modal-directions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px 24px;
  margin: 0;
  padding-left: 20px;
}
.staff-modal-directions li { margin: 0; }
.staff-credentials { margin: 0; padding: 0; list-style: none; }
.staff-credentials > li { padding: 15px 0; border-top: 1px solid var(--line); }
.staff-credentials > li:last-child { border-bottom: 1px solid var(--line); }
.staff-credentials strong,
.staff-credentials span { display: block; }
.staff-credentials span { margin-top: 3px; color: var(--slate); font-size: 14px; }
.staff-doc-images {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 136px;
  justify-content: start;
  gap: 10px;
  overflow-x: auto;
  margin-top: 12px;
  padding-bottom: 5px;
  scroll-snap-type: x proximity;
}
.staff-doc-images a { scroll-snap-align: start; }
.staff-doc-images img {
  width: 136px;
  height: 188px;
  object-fit: contain;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
}
.staff-license {
  display: grid;
  gap: 4px;
  margin: 24px 0 0;
  padding: 18px;
  background: var(--surface-cyan);
  border-radius: 14px;
}
.staff-license strong,
.staff-license span { display: block; }
.staff-license span { color: var(--slate); font-size: 14px; }

/* FAQ + quiz */
.faq { grid-template-columns: 1fr; gap: 10px; }
.faq details { padding: 0 20px; background: transparent; border: 0; border-top: 1px solid var(--line); border-radius: 0; }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq details[open] { background: var(--white); border-color: transparent; border-radius: 14px; }
.faq summary { padding: 20px 0; }
.faq summary::after { border-color: var(--emerald); }

.faq-home-section { background: var(--surface-coral) !important; }
.help-test-section { background: var(--paper); border-bottom: 1px solid var(--line); }
.help-test-layout { grid-template-columns: 1fr; gap: 30px; }
.help-test-intro { position: static; }
.help-test-intro h2 { color: var(--forest); }
.help-test-intro > p { color: var(--slate); }
.help-quiz { min-height: 0; padding: 22px; background: var(--white); border: 0; border-radius: 18px; box-shadow: var(--shadow-soft); }
.quiz-option span { min-height: 76px; border-radius: 12px; }
.quiz-option input:checked + span { background: var(--surface-coral); border-color: var(--emerald); }
.quiz-option input:checked + span::before { border-color: var(--emerald); }
.quiz-progress progress::-webkit-progress-value { background: var(--emerald); }
.quiz-progress progress::-moz-progress-bar { background: var(--emerald); }

/* Licences */
.license-section { background: var(--white); border: 0; }
.license-track {
  grid-template-columns: none;
  grid-auto-flow: column;
  grid-auto-columns: minmax(235px, 78vw);
  gap: 16px;
  overflow-x: auto;
  padding: 8px 2px 18px;
  scroll-snap-type: x mandatory;
}
.license-card { padding: 12px; scroll-snap-align: start; background: var(--white); border: 1px solid var(--line); border-radius: 16px; box-shadow: none; }

/* Tables + sidebar */
.price-table { overflow: hidden; background: var(--white); border-radius: 16px; }
.price-table caption { color: var(--forest); font-family: var(--display); font-size: 24px; font-weight: 750; }
.price-table th,
.price-table td { border-color: var(--line); }
.price-table td,
.price-table-detailed .price-value { color: var(--forest); }
.price-table tbody tr:hover { background: var(--blue-100); }
.price-details { color: var(--forest); }

.sidebar { position: static; }
.side-card { background: var(--white); border-color: var(--line); border-radius: 16px; }
.side-card.accent { color: var(--white); background: var(--forest); border: 0; }
.side-card.accent p { color: var(--aqua); }
.side-card.accent .btn { color: var(--forest); background: var(--emerald); }
.side-card.accent .btn:hover { color: var(--forest); background: var(--action-hover); }
.side-nav .is-current a { color: var(--forest); }

.relief-prices { border: 0; background: var(--surface-cyan); }
.relief-price-top strong,
.relief-price-label,
.service-package > strong,
.service-package-label { color: var(--forest); }
.related { grid-template-columns: 1fr; }
.related a { background: var(--white); border-color: var(--line); border-radius: 14px; }
.related b { color: var(--forest); }

/* Footer */
.footer {
  margin-top: 0;
  padding: 64px 0 28px;
  color: var(--aqua);
  background: var(--forest);
  border-top: 6px solid var(--aqua);
}
.footer-grid { grid-template-columns: 1fr; gap: 36px; }
.footer h4 { color: var(--gold); font-size: 12px; letter-spacing: .13em; text-transform: uppercase; }
.footer a { color: var(--white); }
.footer .brand-line { font-family: var(--display); font-size: 24px; font-weight: 700; }
.footer-note { color: rgba(78, 205, 196, .76); border-color: rgba(78, 205, 196, .22); }
.footer-socials a,
.footer-social { border-color: rgba(78, 205, 196, .3); background: rgba(78, 205, 196, .1); border-radius: 50%; }

.floating-consult-desktop,
.floating-consult-mobile { color: var(--forest); background: var(--emerald); border: 2px solid var(--white); }
.floating-consult-mobile { box-shadow: 0 12px 30px rgba(41, 47, 54, .3); }
.floating-consult-desktop:hover {
  color: var(--forest);
  background: var(--action-hover);
  box-shadow: 0 14px 34px rgba(50, 222, 138, .3);
}
.lead-form input[aria-invalid='true'] { border-color: var(--brick); }
.lead-modal-dialog { border-radius: 18px; }
.lead-modal-backdrop { background: rgba(41, 47, 54, .82); }
.lead-modal-close,
.lead-modal-close:hover,
.lead-modal-close:active { color: var(--forest); background: transparent; }

/* Purposeful motion: one hero reveal and one sequential process reveal. */
.motion-ready .hero .hero-media {
  opacity: .82;
  filter: blur(4px);
  clip-path: inset(0 0 8% 0 round 28px);
  transform: translateY(10px);
  transition: opacity .46s var(--ease-out), filter .46s var(--ease-out), clip-path .54s var(--ease-out), transform .46s var(--ease-out);
}

.motion-ready .hero .hero-media.is-revealed {
  opacity: 1;
  filter: blur(0);
  clip-path: inset(0 0 0 0 round 28px);
  transform: translateY(0);
}

.motion-ready .work-step {
  opacity: .8;
  filter: blur(2px);
  transform: translateY(8px);
  transition: opacity .36s var(--ease-out), filter .36s var(--ease-out), transform .36s var(--ease-out);
  transition-delay: calc(var(--reveal-index, 0) * 55ms);
}

.motion-ready .work-grid.is-revealed .work-step {
  opacity: 1;
  filter: blur(0);
  transform: translateY(0);
}

@media (max-width: 559px) {
  .trust-item { min-height: 0; }
  .trust-item > span { margin-bottom: 20px; }
  .metrics-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .metric { min-height: 168px; grid-template-columns: 38px minmax(0, 1fr); column-gap: 9px; padding: 16px 12px; }
  .metric-icon { width: 36px; height: 36px; border-radius: 11px; }
  .metric-icon svg { width: 22px; height: 22px; }
  .metric strong { font-size: clamp(25px, 7.2vw, 34px); letter-spacing: -.04em; }
  .metric p { font-size: 12px; line-height: 1.4; }
  .logo { gap: 9px; }
  .logo-mark { width: 42px; height: 42px; }
  .staff-modal-head { grid-template-columns: 82px minmax(0, 1fr); gap: 15px; padding: 22px 54px 22px 20px; }
  .staff-modal-head > img { width: 82px; height: 104px; border-radius: 12px; }
  .staff-modal-head h2 { font-size: 22px; }
  .staff-modal-role,
  .staff-modal-exp { font-size: 13px; line-height: 1.45; }
  .staff-modal-body { padding: 22px 20px; }
  .staff-modal-about { font-size: 15px; }
  .staff-modal-directions { grid-template-columns: 1fr; }
}

@media (max-width: 360px) {
  .metrics-grid { grid-template-columns: 1fr; }
  .metric { min-height: 142px; grid-template-columns: 44px minmax(0, 1fr); padding: 18px; }
  .metric-icon { width: 40px; height: 40px; }
  .metric-icon svg { width: 24px; height: 24px; }
  .metric strong { font-size: clamp(30px, 9vw, 38px); }
}

@media (max-width: 860px) {
  body { font-weight: 500; }
  .nav.is-open { left: 0; right: 0; width: 100%; background: var(--white); }
  .nav-in { max-width: none; padding-inline: 20px; }
  .nav-list { display: none; }
  .mobile-nav-list { display: grid; gap: 0; margin: 0; padding: 9px 0 12px; list-style: none; }
  .mobile-nav-list li { margin: 0; border-bottom: 1px solid var(--line); }
  .mobile-nav-list a { display: block; padding: 14px 2px; color: var(--forest); font-size: 16px; font-weight: 650; }
  .mobile-nav-list li.is-active a { color: #167c58; }
  .nav-contact { padding: 15px 0 18px; }
  .nav-contact a { width: fit-content; color: var(--forest); font-size: 17px; font-weight: 750; }
}

@media (prefers-reduced-motion: no-preference) {
  .motion-ready .metrics-grid.is-revealed .metric-icon {
    animation: metric-icon-arrive .52s var(--ease-out) both;
    animation-delay: calc(var(--metric-index, 0) * 90ms);
  }
}

@media (prefers-reduced-motion: reduce) {
  .metric-icon { animation: none !important; transition: none !important; }
}

/* Responsive refinements for the home and service-page content blocks. */
.hero .facts { gap: 12px; }
.hero .fact {
  min-width: 0;
  min-height: 136px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 20px;
  border: 1px solid var(--line) !important;
  border-radius: 16px;
  background: var(--white);
  box-shadow: 0 8px 24px rgba(32, 52, 45, .06);
}
.hero .fact b {
  max-width: 100%;
  color: var(--forest);
  font-size: clamp(21px, 2.05vw, 29px);
  line-height: 1.12;
  letter-spacing: -.025em;
  text-wrap: balance;
}
.hero .fact span { max-width: 25ch; color: var(--slate); font-size: 13px; line-height: 1.45; }

.metrics-grid { align-items: stretch; }
.metric {
  min-width: 0;
  min-height: 210px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  padding: 26px 24px;
}
.metric-icon { flex: none; width: 44px; height: 44px; }
.metric-icon svg { width: 25px; height: 25px; }
.metric strong {
  max-width: 100%;
  align-self: flex-start;
  margin: 0;
  font-size: clamp(32px, 3.1vw, 48px);
  line-height: 1.08;
  letter-spacing: -.03em;
  overflow-wrap: normal;
  text-wrap: balance;
}
.metric:nth-child(4) strong { font-size: clamp(26px, 2.4vw, 36px); white-space: nowrap; }
.metric p { max-width: 27ch; margin: auto 0 0; font-size: 14px; line-height: 1.5; }

.patient-review blockquote {
  display: flex;
  flex: 1;
  align-items: center;
  max-width: 36ch;
  margin: 20px 0;
  font-size: clamp(15px, 1.15vw, 17px);
  line-height: 1.6;
}

.faq { grid-template-columns: 1fr; gap: 10px; }
.faq details,
.faq details:last-child {
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, .58);
}
.faq details[open] { border-color: var(--line); border-radius: 14px; background: var(--white); }
.faq summary { padding: 17px 30px 17px 0; font-size: 17px; line-height: 1.45; }
.content > h2:has(+ .faq),
.faq-home-head .section-head h2 {
  max-width: 22ch;
  font-size: clamp(32px, 4vw, 48px);
  line-height: 1.08;
  letter-spacing: -.025em;
  text-wrap: balance;
}

@media (min-width: 560px) {
  .faq:has(> details:nth-child(4)) { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 16px; }
  .faq:has(> details:nth-child(4)) > details:last-child:nth-child(odd) { grid-column: 1 / -1; }
}

@media (min-width: 1280px) {
  .patient-review-track { grid-auto-columns: calc((100% - 48px) / 4); }
}

@media (max-width: 860px) {
  .hero .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .hero .fact { min-height: 124px; padding: 16px; }
  .hero .fact b { font-size: clamp(20px, 4.8vw, 25px); }
  .hero .fact span { font-size: 12px; }
  .metric { min-height: 176px; padding: 18px 16px; gap: 12px; }
  .metric strong { font-size: clamp(24px, 6.7vw, 31px); }
  .metric:nth-child(4) strong { font-size: clamp(21px, 5.1vw, 26px); }
  .metric p { font-size: 12px; line-height: 1.45; }
  .faq-home-head .section-head h2,
  .content > h2:has(+ .faq) { font-size: clamp(30px, 6vw, 42px); }
}

@media (max-width: 380px) {
  .hero .facts { grid-template-columns: 1fr; }
  .hero .fact { min-height: 112px; }
  .metrics-grid { grid-template-columns: 1fr; }
  .metric { min-height: 142px; }
  .metric strong { font-size: clamp(30px, 9vw, 38px); }
}

@media (min-width: 560px) {
  .wrap { padding-inline: 28px; }
  .cards,
  .cards-2,
  .trust-grid,
  .metrics-grid,
  .team-grid,
  .service-packages,
  .relief-price-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .faq { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .urgent-benefits { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .quiz-options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .related { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 861px) {
  .header { top: 0; }
  .header-in { min-height: 82px; }
  .nav { display: block; }
  .nav-in { min-height: 54px; }
  .nav-list { justify-content: center; }
  .nav-list > li > a,
  .nav-list > li > .nav-parent { padding: 15px 17px; font-size: 14px; }
  .nav-list > li.is-active::after {
    position: absolute;
    right: 17px;
    bottom: 8px;
    left: 17px;
    height: 2px;
    background: var(--aqua);
    content: '';
  }
  .submenu { border-radius: 4px 24px 4px 24px; }
  .hero { padding: 76px 0 42px; }
  .hero-grid { grid-template-columns: minmax(0, 1fr) minmax(400px, 1fr); gap: 56px; }
  .hero-media img { min-height: 430px; }
  .hero .facts,
  .service-facts-section.is-attached .facts { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .hero .facts { margin-top: 38px; }
  .fact { min-height: 142px; padding: 24px; border-right: 1px solid var(--line) !important; border-bottom: 0 !important; }
  .fact:last-child { border-right: 0 !important; }
  .section { padding: 96px 0; }
  .page-head { padding: 40px 0 64px; }
  .page-head-grid { grid-template-columns: minmax(0, 1.05fr) minmax(360px, .95fr); gap: 56px; }
  .page-head .hero-media img { min-height: 360px; }
  .layout { grid-template-columns: minmax(0, 1fr) 300px; gap: 64px; padding-block: 70px 96px; }
  .sidebar { position: sticky; top: 104px; }
  .cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .home-services .cards { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .home-services .card { grid-column: span 2; }
  .home-services .card:nth-last-child(2) { grid-column: 2 / span 2; }
  .home-services .card:last-child { grid-column: 4 / span 2; }
  .trust-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .trust-item:nth-child(even) { transform: none; }
  .metrics-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .metric { min-height: 230px; padding: 36px 30px; }
  .urgent-help-panel { grid-template-columns: 1.05fr .95fr; gap: 64px; padding: 60px; }
  .help-test-layout { grid-template-columns: .82fr 1.18fr; gap: 74px; }
  .help-test-intro { position: sticky; top: 110px; }
  .help-quiz { padding: 34px; }
  .team-grid { grid-template-columns: 1.16fr .92fr .92fr; }
  .license-track { grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-flow: initial; overflow: visible; }
  .footer-grid { grid-template-columns: 1.35fr repeat(3, 1fr); }
  .lead-horizontal .lead-form { grid-template-columns: 1fr 1fr auto; }
  .relief-price-grid,
  .service-packages { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 1120px) {
  .wrap { padding-inline: 32px; }
  .hero-grid { grid-template-columns: minmax(0, 1fr) minmax(480px, 1fr); }
  .hero-media img { min-height: 500px; }
  .work-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); grid-auto-flow: initial; overflow: visible; }
  .work-step:nth-child(even) { margin-top: 0; }
  .cards { gap: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .motion-ready .hero .hero-media,
  .motion-ready .work-step {
    opacity: 1 !important;
    filter: none !important;
    clip-path: none !important;
    transform: none !important;
  }
}

/* Partner marks: a single, scan-friendly line that stays swipeable on narrow screens. */
.partner-section {
  padding-block: 32px;
  background: var(--surface-cyan);
}
.partner-section h2 {
  margin: 0 0 16px;
  color: var(--forest);
  font-size: clamp(20px, 2.4vw, 26px);
  line-height: 1.2;
}
.partner-strip {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(166px, 1fr);
  gap: 12px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  scrollbar-color: var(--emerald) transparent;
  padding: 2px 2px 9px;
}
.partner-strip:focus-visible { outline: 3px solid var(--emerald); outline-offset: 3px; }
.partner-item {
  min-width: 0;
  min-height: 104px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 12px 14px;
  border: 1px solid rgba(41, 47, 54, .06);
  border-radius: 16px;
  background: var(--white);
  scroll-snap-align: start;
  text-align: center;
}
.partner-item img {
  display: block;
  width: auto;
  max-width: min(100%, 176px);
  height: 46px;
  object-fit: contain;
}
.partner-name {
  color: var(--slate);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.25;
}
.partner-sber {
  display: grid;
  min-height: 46px;
  place-items: center;
  color: #21a038;
  font-size: 25px;
  font-weight: 700;
  letter-spacing: -.045em;
}

@media (min-width: 1080px) {
  .partner-strip {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    grid-auto-flow: initial;
    grid-auto-columns: auto;
    overflow: visible;
    scrollbar-width: none;
    padding-bottom: 2px;
  }
}
@media (max-width: 559px) {
  .partner-section { padding-block: 26px; }
  .partner-strip { grid-auto-columns: minmax(166px, 72vw); gap: 10px; }
  .partner-item { min-height: 98px; }
}

/* Official review platform icons */
.review-source-links a { display: inline-flex; align-items: center; gap: 8px; }
.review-source-icon { display: block; width: 24px; height: 24px; flex: 0 0 24px; object-fit: contain; }

/* Open consultation form before the footer */
.bottom-consult { background: var(--surface-cyan); }
.bottom-consult-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: center; }
.bottom-consult-copy { min-width: 0; }
.bottom-consult-copy h2 { margin: 0; font-size: clamp(28px, 3vw, 38px); line-height: 1.2; text-wrap: balance; }
.bottom-consult-condition { margin: 12px 0 28px; color: var(--ink-2); font-size: 15px; }
.bottom-consult-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.bottom-consult-fact { min-width: 0; padding: 0; border: 0; background: transparent; }
.bottom-consult-fact b { font-weight: 800; display: block; margin-bottom: 6px; font-size: 21px; color: var(--ink); }
.bottom-consult-fact span { display: block; font-size: 14px; line-height: 1.55; color: var(--ink-2); }
.bottom-consult-benefits { margin: 0; padding-left: 22px; color: var(--ink); }
.bottom-consult-benefits li + li { margin-top: 14px; }
.bottom-consult-benefits li::marker { color: var(--emerald); }
.section .bottom-consult-form { min-width: 0; padding: 32px; border: 0; border-radius: 16px; background: var(--white); }
.bottom-consult-form .field { margin-bottom: 18px; }
.bottom-consult-form .lead-note { margin-bottom: 0; }
@media (max-width: 860px) {
  .bottom-consult-layout { grid-template-columns: minmax(0, 1fr); gap: 28px; }
}
@media (max-width: 560px) {
  .bottom-consult-copy h2 { font-size: 28px; }
  .bottom-consult-facts { gap: 20px 16px; }
  .bottom-consult-fact b { font-size: 19px; }
  .section .bottom-consult-form { padding: 24px 20px; }
}
