:root {
  --bg: #f3f3f3;
  --white: #ffffff;
  --text: #1f1f1f;
  --muted: #5e5e5e;
  --line: #d8d8d8;
  --accent: #151515;
  --accent-dark: #000000;
  --radius: 20px;
  --shadow: 0 18px 45px rgba(22, 19, 14, 0.09);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-family: "Montserrat", Arial, sans-serif;
  line-height: 1.55;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.25s ease;
}

img {
  max-width: 100%;
  display: block;
}

.container {
  width: min(1240px, calc(100% - 48px));
  margin: 0 auto;
}

.section {
  padding: 96px 0;
}

.section-title {
  margin: 0 0 14px;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(34px, 5vw, 62px);
  line-height: 1.05;
}

.section-subtitle {
  margin: 0 0 36px;
  max-width: 760px;
  color: var(--muted);
}

.btn {
  border: 0;
  border-radius: 999px;
  padding: 13px 26px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.22s ease, box-shadow 0.28s ease, background 0.25s ease, color 0.25s ease;
}

.btn-accent {
  background: var(--accent);
  color: #fff;
}

.btn-accent:hover {
  background: var(--accent-dark);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.28);
}

.btn-outline {
  border: 1px solid var(--line);
  background: #fff;
}

.btn-outline:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.12);
}

.btn-label-short {
  display: none;
}

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 30;
  backdrop-filter: blur(8px);
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid #efe7da;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.07);
  transition: background 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.site-header::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, #111, transparent);
  transform: translateX(-50%);
  transition: width 0.35s ease;
}

.site-header:hover::after {
  width: min(1100px, 92vw);
}

.site-header.scrolled {
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.1);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid #c8c8c8;
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.nav-toggle:hover {
  background: #f5f5f5;
  border-color: #b0b0b0;
}

.nav-toggle-icon {
  position: relative;
  display: block;
  width: 20px;
  height: 2px;
  background: #111;
  border-radius: 1px;
  transition: background 0.2s ease;
}

.nav-toggle-icon::before,
.nav-toggle-icon::after {
  content: "";
  position: absolute;
  left: 0;
  width: 20px;
  height: 2px;
  background: #111;
  border-radius: 1px;
  transition: transform 0.25s ease, top 0.25s ease;
}

.nav-toggle-icon::before {
  top: -7px;
}

.nav-toggle-icon::after {
  top: 7px;
}

.site-header.nav-open .nav-toggle-icon {
  background: transparent;
}

.site-header.nav-open .nav-toggle-icon::before {
  top: 0;
  transform: rotate(45deg);
}

.site-header.nav-open .nav-toggle-icon::after {
  top: 0;
  transform: rotate(-45deg);
}

.header-inner {
  min-height: 76px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  position: relative;
}

.header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 12px;
  flex-shrink: 0;
}

.main-nav {
  min-width: 0;
}

.brand {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 30px;
  font-weight: 700;
  line-height: 0.92;
  transition: transform 0.25s ease, letter-spacing 0.25s ease;
}

.site-header:hover .brand {
  transform: translateY(-1px);
  letter-spacing: 0.01em;
}

.brand span {
  display: block;
  margin-top: 2px;
  font-size: 10px;
  font-family: "Montserrat", Arial, sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.18em;
}

.main-nav ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

.main-nav a {
  font-family: "Montserrat", Arial, sans-serif;
  font-size: 14px;
  font-weight: 500;
  position: relative;
  padding: 4px 0;
  -webkit-tap-highlight-color: transparent;
}

.main-nav a:focus,
.main-nav a:focus-visible,
.main-nav a:active {
  font-size: 14px;
  font-weight: 500;
  outline: none;
}

.main-nav a:focus-visible {
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px #111;
  border-radius: 4px;
}

.main-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 1.5px;
  background: #111;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

.main-nav a:hover {
  color: #000;
}

.main-nav a:hover::after {
  transform: scaleX(1);
}

.main-nav a[aria-current="page"] {
  font-weight: 500;
  color: #000;
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 1.5px;
}

.phone {
  text-align: right;
}

.phone strong {
  font-size: 19px;
  line-height: 1.1;
}

.phone strong a {
  white-space: nowrap;
}

.phone small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.header-actions .btn {
  padding: 12px 22px;
  font-size: 15px;
  line-height: 1;
  white-space: nowrap;
}

.hero {
  min-height: 100vh;
  color: #fff;
  background: linear-gradient(120deg, rgba(0, 0, 0, 0.75), rgba(0, 0, 0, 0.35));
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: min(480px, 60vh);
  background:
    linear-gradient(
      to bottom,
      rgba(243, 243, 243, 0) 0%,
      rgba(243, 243, 243, 0.08) 20%,
      rgba(243, 243, 243, 0.35) 45%,
      rgba(243, 243, 243, 0.75) 68%,
      rgba(243, 243, 243, 0.95) 85%,
      var(--bg) 100%
    );
  pointer-events: none;
}

#about {
  position: relative;
}

#about::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -112px;
  height: 164px;
  background: linear-gradient(
    180deg,
    rgba(243, 243, 243, 0) 0%,
    rgba(247, 247, 247, 0.5) 34%,
    rgba(243, 243, 243, 0.92) 76%,
    var(--bg) 100%
  );
  pointer-events: none;
}

#about > .container {
  position: relative;
  z-index: 1;
}

.hero-content {
  max-width: 780px;
  padding-top: 84px;
  position: relative;
  z-index: 1;
}

.hero h1 {
  margin: 0 0 14px;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(40px, 6vw, 74px);
  line-height: 1.03;
}

.hero p {
  margin: 0 0 24px;
  color: #f0f0f0;
  font-size: 18px;
}

.glass-form {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 10px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 16px;
  padding: 10px;
  backdrop-filter: blur(6px);
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 13px 14px;
  font: inherit;
}

input.input-error,
select.input-error,
textarea.input-error {
  border-color: #c82121;
  box-shadow: 0 0 0 3px rgba(200, 33, 33, 0.12);
}

.chips {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.chip {
  border-radius: 999px;
  padding: 8px 14px;
  background: rgba(0, 0, 0, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.45);
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
  font-size: 13px;
  transition: transform 0.22s ease, background 0.25s ease, border-color 0.25s ease;
}

.chip:hover {
  transform: translateY(-2px);
  background: rgba(0, 0, 0, 0.62);
  border-color: rgba(255, 255, 255, 0.72);
}

.chip.chip-warranty {
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.38);
  font-weight: 600;
  font-size: 13px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
  transition: transform 0.22s ease, background 0.3s ease, border-color 0.3s ease, box-shadow 0.28s ease;
}

.chip.chip-warranty:hover {
  background: rgba(0, 0, 0, 0.68);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.55);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.22);
}

.hero .chip.chip-warranty {
  color: #fff;
}

.cards-2-center {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 380px));
  gap: 18px;
  justify-content: center;
}

.cards-3,
.cards-4 {
  display: grid;
  gap: 18px;
}

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

.cards-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
  padding: 24px;
  transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 48px rgba(15, 15, 15, 0.14);
  border-color: #c8c8c8;
}

.metric strong {
  display: block;
  margin-bottom: 6px;
  font-size: 32px;
}

.metric--yandex {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.yandex-badge-svg {
  width: 120px;
  height: auto;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,0.12));
}

.ybadge {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: 100%;
}

.ybadge__pin svg {
  width: 36px;
  height: auto;
  filter: drop-shadow(0 3px 8px rgba(0,0,0,0.25));
}

.ybadge__sub {
  margin: 0;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.ybadge__title {
  margin: 0;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.1;
  text-align: center;
  color: var(--text);
}

.ybadge__laurels {
  display: none;
}

.ybadge__laurels svg {
  display: none;
}

.doctor-card {
  overflow: hidden;
  padding: 0;
}

.doctor-photo-wrap {
  position: relative;
  overflow: hidden;
}

.doctor-photo-wrap img {
  width: 100%;
  aspect-ratio: 4/5;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}

.doctor-card:hover .doctor-photo-wrap img {
  transform: scale(1.045);
}

.doctor-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.28s ease;
}

.doctor-photo-wrap:hover .doctor-overlay {
  opacity: 1;
}

.doctor-body {
  padding: 18px;
}

.before-after {
  margin-bottom: 14px;
}

.before-after .frame {
  position: relative;
  aspect-ratio: 16/10;
  border-radius: 14px;
  overflow: hidden;
}

.before-after img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.after-image {
  clip-path: inset(0 100% 0 0);
}

.before-after .compare-slider {
  display: block;
  width: 100%;
  margin: 10px 0 0;
  height: 10px;
  border-radius: 999px;
  appearance: none;
  background: transparent;
  cursor: pointer;
}

.before-after .compare-slider::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, #d5d5d5, #e8e8e8);
}

.before-after .compare-slider::-webkit-slider-thumb {
  appearance: none;
  width: 18px;
  height: 18px;
  margin-top: -6px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.before-after .compare-slider::-moz-range-track {
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, #d5d5d5, #e8e8e8);
}

.before-after .compare-slider::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.offer {
  color: #fff;
  text-align: center;
  background: #1a1a1a;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.map {
  border: 0;
  border-radius: var(--radius);
  min-height: 420px;
  width: 100%;
}

.footer {
  background: linear-gradient(180deg, #181818 0%, #101010 100%);
  color: #ddd;
  padding: 64px 0 24px;
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) repeat(2, minmax(0, 0.9fr));
  gap: 24px;
  align-items: start;
}

.footer-bottom {
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 14px;
  color: #a8a8a8;
}

.popup {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.45);
  padding: 16px;
}

.popup.open {
  display: flex;
}

.popup-box {
  width: min(560px, 100%);
  border-radius: 16px;
  background: #fff;
  padding: 24px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.24);
  max-height: calc(100vh - 32px);
  overflow-y: auto;
}

.popup-top {
  display: flex;
  justify-content: space-between;
  align-items: start;
  margin-bottom: 14px;
}

.close {
  border: 0;
  background: transparent;
  font-size: 24px;
  cursor: pointer;
}

.form-grid {
  display: grid;
  gap: 10px;
}

.page-top {
  padding-top: 118px;
}

.service-page .service-intro {
  padding: 56px 0 0;
}

.service-page .service-summary {
  padding: 56px 0 72px;
}

.service-page .section-subtitle {
  margin-bottom: 0;
}

.price-table-wrap {
  overflow-x: auto;
  margin-top: 8px;
}

.price-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}

.price-table th,
.price-table td {
  border-bottom: 1px solid var(--line);
  padding: 14px 12px;
  text-align: left;
  vertical-align: top;
}

.price-table th:last-child,
.price-table td:last-child {
  text-align: right;
  white-space: nowrap;
}

.price-table tbody tr:hover {
  background: #fafafa;
}

.price-note {
  font-size: 14px;
  color: var(--muted);
  margin: 18px 0 0;
  max-width: 720px;
}

.footer-socials {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.footer-copy {
  margin: 16px 0 0;
  max-width: 360px;
  color: #a8a8a8;
  font-size: 14px;
}

.footer h4 {
  margin: 0 0 14px;
  color: #fff;
  font-size: 16px;
}

.footer p {
  margin: 0 0 10px;
  color: #cfcfcf;
}

.footer a:hover {
  color: #fff;
}

.footer-policy {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  transition: transform 0.22s ease, background 0.25s ease, border-color 0.25s ease;
}

.footer-policy:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.24);
}

.footer-policy svg {
  width: 16px;
  height: 16px;
}

.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.social-link {
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: linear-gradient(180deg, #2d2d2d 0%, #0f0f0f 100%);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.2);
  transition: transform 0.22s ease, box-shadow 0.28s ease, background 0.25s ease;
}

.social-link:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.24);
  background: linear-gradient(180deg, #3a3a3a 0%, #151515 100%);
}

.social-link svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.social-links--footer .social-link {
  box-shadow: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.03) 100%);
}

.social-links--footer .social-link:hover {
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.16);
}

.social-links--floating {
  position: fixed;
  right: 18px;
  bottom: max(18px, calc(env(safe-area-inset-bottom) + 12px));
  z-index: 40;
  padding: 0;
  border-radius: 0;
  background: transparent;
  backdrop-filter: none;
  box-shadow: none;
  gap: 0;
}

.social-links--floating .social-link {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  box-shadow: 0 18px 32px rgba(0, 0, 0, 0.28);
}

.policy-page {
  background:
    radial-gradient(circle at top left, rgba(215, 215, 215, 0.65), transparent 38%),
    linear-gradient(180deg, #f3f3f3 0%, #ffffff 20%, #f7f7f7 100%);
}

.policy-sheet {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(31, 31, 31, 0.08);
  border-radius: 28px;
  box-shadow: 0 28px 64px rgba(18, 18, 18, 0.08);
  padding: clamp(24px, 4vw, 42px);
}

.policy-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(21, 21, 21, 0.08);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.policy-badge::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #111;
}

.policy-lead {
  margin: 14px 0 0;
  max-width: 760px;
  color: var(--muted);
}

.policy-content {
  margin-top: 28px;
  display: grid;
  gap: 28px;
}

.policy-section {
  display: grid;
  gap: 12px;
}

.policy-section h2 {
  margin: 0;
  font-size: 24px;
  line-height: 1.2;
  font-family: "Cormorant Garamond", Georgia, serif;
}

.policy-section p,
.policy-section li {
  margin: 0;
  color: #333;
}

.policy-list {
  margin: 0;
  padding-left: 20px;
  display: grid;
  gap: 10px;
}

.policy-data {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.policy-data-item {
  padding: 16px 18px;
  border-radius: 20px;
  background: #f8f8f8;
  border: 1px solid rgba(31, 31, 31, 0.08);
}

.policy-data-item strong {
  display: block;
  margin-bottom: 6px;
}

.toast-stack {
  position: fixed;
  top: 96px;
  right: 18px;
  z-index: 80;
  display: grid;
  gap: 12px;
  pointer-events: none;
}

.toast {
  min-width: min(360px, calc(100vw - 36px));
  max-width: 420px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: start;
  gap: 12px;
  padding: 16px 18px;
  border-radius: 22px;
  background: rgba(17, 17, 17, 0.96);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 24px 44px rgba(0, 0, 0, 0.28);
  opacity: 0;
  transform: translateY(-10px);
  transition: transform 0.24s ease, opacity 0.24s ease;
  pointer-events: auto;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.toast__icon {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.12);
}

.toast__icon svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.toast__title {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 600;
}

.toast__message {
  margin: 0;
  color: #d7d7d7;
  font-size: 14px;
  line-height: 1.45;
}

.toast__close {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  cursor: pointer;
}

.toast__close:hover {
  background: rgba(255, 255, 255, 0.16);
}

body.popup-open .social-links--floating {
  opacity: 0;
  pointer-events: none;
}

@media (max-width: 1050px) {
  .cards-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-grid > :first-child {
    grid-column: 1 / -1;
  }
}

@media (min-width: 961px) {
  .nav-toggle {
    display: none;
  }
}

@media (max-width: 780px) {
  .container {
    width: min(1240px, calc(100% - 24px));
  }

  .section {
    padding: 64px 0;
  }

  .glass-form,
  .cards-3,
  .cards-4,
  .cards-2-center,
  .contact-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .hero-content {
    padding-top: 64px;
  }

  .hero h1 {
    font-size: clamp(28px, 9vw, 74px);
  }

  .hero p {
    font-size: 16px;
  }

  .page-top {
    padding-top: 88px;
  }

  .service-page .service-intro {
    padding-top: 40px;
  }

  .service-page .service-summary {
    padding: 36px 0 56px;
  }

  body {
    padding-bottom: 72px;
  }

  .hero {
    min-height: auto;
    padding-bottom: 32px;
  }

  .social-links--floating {
    left: auto;
    right: 12px;
    bottom: max(14px, calc(env(safe-area-inset-bottom) + 10px));
    transform: none;
  }

  .social-links--floating .social-link {
    width: 50px;
    height: 50px;
  }

  .toast-stack {
    top: auto;
    right: 12px;
    bottom: 86px;
    left: 12px;
  }

  .toast {
    min-width: 0;
    max-width: none;
    width: 100%;
  }

  .policy-data {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 960px) {
  .header-inner {
    grid-template-columns: minmax(0, 1fr) auto auto;
    grid-template-rows: auto;
    gap: 8px;
    padding: 8px 0 10px;
    min-height: 0;
    align-items: center;
  }

  .site-header:hover .brand {
    transform: none;
    letter-spacing: normal;
  }

  .brand {
    grid-column: 1;
    grid-row: 1;
    min-width: 0;
    font-size: 27px;
    line-height: 0.92;
  }

  .nav-toggle {
    display: inline-flex;
    grid-column: 2;
    grid-row: 1;
    width: 42px;
    height: 42px;
    border-radius: 14px;
  }

  .header-actions {
    grid-column: 3;
    grid-row: 1;
    flex-wrap: nowrap;
    width: auto;
    justify-content: flex-end;
    gap: 0;
  }

  .header-actions .btn {
    width: auto;
    padding: 11px 16px;
    font-size: 14px;
    white-space: nowrap;
  }

  .phone {
    display: none;
  }

  .main-nav {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-12px);
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 22px;
    box-shadow: 0 18px 36px rgba(0, 0, 0, 0.12);
    transition:
      max-height 0.38s ease,
      opacity 0.28s ease,
      padding 0.28s ease,
      transform 0.28s ease;
    padding: 0 14px;
    border-top: 0;
    z-index: 35;
  }

  .main-nav::before {
    display: none;
  }

  .main-nav ul {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 12px 0;
  }

  .main-nav li {
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  }

  .main-nav li:last-child {
    border-bottom: 0;
  }

  .main-nav a {
    display: block;
    padding: 12px 4px;
    font-size: 15px;
    font-weight: 500;
  }

  .main-nav a::after {
    display: none;
  }

  .site-header.nav-open .main-nav {
    max-height: 430px;
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
    padding: 12px 14px;
  }

  .page-top {
    padding-top: 86px;
  }

  .hero-content {
    padding-top: 86px;
  }
}

@media (max-width: 420px) {
  .container {
    width: calc(100% - 20px);
  }

  .brand {
    font-size: 24px;
  }

  .header-actions .btn {
    padding: 10px 13px;
    font-size: 13px;
  }

  .btn-estimate .btn-label-full {
    display: none;
  }

  .btn-estimate .btn-label-short {
    display: inline;
  }
}

.doctor-body {
  padding: 18px;
}

.popup-box--doctor {
  width: min(640px, 100%);
}

.doc-popup-body {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 20px;
  align-items: start;
  margin-top: 8px;
}

.doc-popup-body img {
  width: 160px;
  aspect-ratio: 4/5;
  object-fit: cover;
  border-radius: 14px;
}

.doc-popup-body p {
  color: var(--muted);
  line-height: 1.7;
}

@media (max-width: 480px) {
  .doc-popup-body {
    grid-template-columns: 1fr;
  }
  .doc-popup-body img {
    width: 100%;
  }
}

.compare-placeholder {
  aspect-ratio: 16/10;
  background: #f0f0f0;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: space-around;
  color: #aaa;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border: 2px dashed #ddd;
}

/* ===== МОБИЛЬНЫЕ ФИКСЫ ===== */

/* Страницы врачей — двухколоночные сетки в одну на мобиле */
@media (max-width: 780px) {
  /* Сетка образование/что значит на страницах врачей */
  [style*="grid-template-columns:1fr 1fr"] {
    grid-template-columns: 1fr !important;
  }

  /* doc-approach-grid */
  .doc-approach-grid {
    grid-template-columns: 1fr !important;
  }

  /* hero врача */
  .doc-hero-inner {
    grid-template-columns: 1fr !important;
  }

  .doc-hero-photo {
    width: 100% !important;
    max-width: 260px !important;
    margin: 0 auto !important;
  }

  /* CTA врача */
  .doc-cta {
    padding: 28px 20px !important;
    margin-top: 40px !important;
  }

  /* Цитата */
  .doc-quote {
    padding: 28px 20px !important;
  }

  /* Прайс — таблица скроллится горизонтально */
  .price-table {
    font-size: 13px;
  }

  .price-table th,
  .price-table td {
    padding: 10px 8px;
  }

  /* glass-form на hero — в одну колонку */
  .glass-form {
    grid-template-columns: 1fr !important;
  }

  /* Карточки врачей — оверлей по тапу на мобиле */
  .doctor-photo-wrap:focus-within .doctor-overlay,
  .doctor-photo-wrap:active .doctor-overlay {
    opacity: 1;
  }

  /* footer-bottom — переносим кнопки */
  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
}

@media (max-width: 480px) {
  .doc-stats {
    flex-direction: column;
    gap: 10px;
  }

  .doc-stat {
    width: 100%;
  }

  .doc-chips {
    gap: 8px;
  }

  .doc-chip {
    font-size: 12px;
    padding: 6px 12px;
  }

  .popup {
    padding: 10px;
  }

  .popup-box {
    width: min(560px, 100%);
    padding: 18px;
    max-height: calc(100vh - 20px);
  }

  .popup-box input,
  .popup-box select,
  .popup-box textarea {
    padding: 11px 12px;
    font-size: 15px;
    line-height: 1.2;
  }

  .popup-box input[type="date"] {
    padding-inline: 10px;
  }
}

/* Оверлей на touch-устройствах — кнопка всегда видна */
@media (hover: none) {
  .doctor-overlay {
    opacity: 1;
    background: linear-gradient(to top, rgba(0,0,0,0.65) 0%, rgba(0,0,0,0) 60%);
    align-items: flex-end;
    padding-bottom: 16px;
  }

  .doctor-overlay .btn {
    font-size: 13px;
    padding: 10px 20px;
  }

  /* фото не масштабируется на touch */
  .doctor-card:hover .doctor-photo-wrap img {
    transform: none;
  }
}
