/* ============ ШАПКА ============ */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 110;
  height: var(--header-h);
  background: var(--c-white);
  transition: box-shadow 0.25s var(--ease);
}

.header.is-scrolled {
  box-shadow: 0 2px 14px rgba(31, 42, 46, 0.1);
}

/* Шапка шире основного контейнера: правая группа ближе к краю экрана (правка клиента) */
.header .container {
  max-width: calc(1488px + var(--gutter) * 2);
}

.header__inner {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 100%;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--c-main);
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
  line-height: 16px;
  letter-spacing: -0.01em;
}

.logo__mark {
  width: 28px;
  height: 28px;
  flex: none;
}

.logo__text {
  max-width: 152px;
}

.header__rating {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 9px;
  border-radius: var(--r-pill);
  background: var(--c-light);
  color: var(--c-text);
  font-size: 14px;
  line-height: 16px;
  white-space: nowrap;
}

.header__rating .ico {
  width: 16px;
  height: 16px;
  color: var(--c-accent);
  fill: var(--c-accent);
}

.header__rating small {
  display: none;
  margin-left: 3px;
  font-size: 12px;
  color: var(--c-muted);
}

@media (min-width: 1024px) {
  .header__inner {
    gap: 20px;
  }
  .logo {
    font-size: 18px;
    line-height: 22px;
  }
  .logo__mark {
    width: 32px;
    height: 32px;
  }
  .logo__text {
    max-width: none;
  }
  .header__rating small {
    display: inline;
  }
}

.header__schedule {
  display: none;
  align-items: center;
  gap: 8px;
  color: var(--c-muted);
  font-size: 15px;
  font-weight: 700;
}

.header__schedule .ico {
  color: var(--c-main);
  width: 20px;
  height: 20px;
}

.header__phone {
  display: none;
  color: var(--c-text);
  font-weight: 700;
  font-size: 18px;
  text-decoration: none;
  white-space: nowrap;
}

.header__phone:hover {
  color: var(--c-main);
}

.header__cta {
  display: none;
  min-height: 48px;
  padding: 0 22px;
  font-size: 15px;
}

.header__phone-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-left: auto;
  border-radius: 50%;
  background: var(--c-light);
  color: var(--c-main);
  flex: none;
}

@media (min-width: 1024px) {
  .header__schedule,
  .header__phone,
  .header__cta {
    display: inline-flex;
  }
  .header__phone-icon {
    display: none;
  }
  .header__schedule {
    margin-left: auto;
  }
}

/* ============ ПЕРВЫЙ ЭКРАН ============ */
.hero {
  position: relative;
  overflow: hidden;
  background: var(--c-light);
  min-height: 640px;
}

@media (min-width: 1024px) {
  .hero {
    min-height: max(640px, calc(100vh - var(--header-h)));
  }
}

.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  padding-top: 12px;
  padding-bottom: 28px;
}

.hero__grid > * {
  min-width: 0;
}

/* Мобильный: одна колонка, порядок элементов по ТЗ */
.hero__content {
  display: contents;
}

.hero__badge {
  order: 1;
  align-self: flex-start;
  justify-self: start;
  display: inline-flex;
  max-width: 100%;
  padding: 6px 12px;
  border-radius: var(--r-pill);
  background: var(--c-white);
  color: var(--c-main);
  font-size: 11px;
  line-height: 15px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 10px;
}

.hero__title {
  order: 2;
  margin-bottom: 12px;
}

.hero__accent {
  color: var(--c-accent);
  white-space: nowrap;
}

.price-card {
  order: 3;
}

.hero__actions {
  order: 4;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 20px;
  margin-top: 12px;
}

.hero__cta {
  width: 100%;
}

.hero__phone-hint {
  display: none;
  color: var(--c-muted);
  font-size: 15px;
}

.hero__phone-hint a {
  color: var(--c-text);
  font-weight: 700;
  text-decoration: none;
}

.hero__phone-hint a:hover {
  color: var(--c-main);
}

.hero__visual {
  order: 5;
  position: relative;
  height: 300px;
  margin: 12px calc(var(--gutter) * -1) 0;
}

.hero__bullets {
  order: 6;
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.hero__bullets li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  line-height: 22px;
  font-weight: 700;
}

.hero__subtitle {
  order: 7;
  margin-top: 16px;
  color: var(--c-muted);
  font-size: 17px;
  line-height: 26px;
}

.hero__footnote {
  order: 8;
  margin-top: 16px;
  font-size: 12px;
  line-height: 16px;
  color: var(--c-strike);
}

.hero__circle {
  position: absolute;
  left: 50%;
  top: 52%;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: var(--c-main-15);
  transform: translate(-50%, -50%);
}

.hero__photo {
  position: absolute;
  left: 50%;
  bottom: 0;
  height: 260px;
  width: auto;
  max-width: 100%;
  transform: translateX(-50%);
  object-fit: contain;
  object-position: bottom center;
}

.hero__caption {
  position: absolute;
  left: var(--gutter);
  bottom: 12px;
  display: grid;
  gap: 2px;
  max-width: 230px;
  padding: 10px 14px;
  background: var(--c-white);
  border-radius: 12px;
  box-shadow: var(--shadow-card);
  font-size: 13px;
  line-height: 18px;
}

.hero__caption strong {
  font-size: 14px;
}

.hero__caption span {
  color: var(--c-muted);
}

@media (min-width: 560px) {
  .hero__cta {
    width: auto;
    min-width: 300px;
  }
}

/* Десктоп: 7/12 + 5/12, фото прижато к низу */
@media (min-width: 1024px) {
  .hero__grid {
    grid-template-columns: 7fr 5fr;
    gap: 32px;
    min-height: max(640px, calc(100vh - var(--header-h)));
    padding-top: 0;
    padding-bottom: 0;
  }

  .hero__content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    padding: 48px 0 40px;
  }

  .hero__badge {
    font-size: 14px;
    line-height: 18px;
    margin-bottom: 16px;
  }

  .hero__title {
    max-width: 680px;
    margin-bottom: 16px;
  }

  /* Порядок по ТЗ (десктоп): бейдж → H1 → подзаголовок → плашка → пункты → кнопка → сноска */
  .hero__badge { order: 1; }
  .hero__title { order: 2; }
  .hero__subtitle { order: 3; }
  .price-card { order: 4; }
  .hero__bullets { order: 5; }
  .hero__actions { order: 6; }
  .hero__footnote { order: 7; }

  .hero__subtitle {
    max-width: 560px;
    margin: 0 0 24px;
    font-size: 20px;
    line-height: 30px;
  }

  /* Преимущества столбиком, чтобы каждое читалось (правка клиента) */
  .hero__bullets {
    grid-template-columns: 1fr;
    gap: 10px;
    margin-top: 20px;
  }

  .hero__bullets li {
    font-size: 17px;
    line-height: 24px;
  }

  .hero__actions {
    margin-top: 24px;
  }

  .hero__cta {
    width: 360px;
    min-width: 0;
  }

  .hero__phone-hint {
    display: inline;
  }

  .hero__footnote {
    margin-top: 18px;
    max-width: 620px;
  }

  .hero__visual {
    height: auto;
    margin: 0;
    align-self: stretch;
  }

  .hero__circle {
    width: min(560px, 44vw);
    height: min(560px, 44vw);
    top: 50%;
  }

  .hero__photo {
    height: 90%;
    max-height: 100%;
  }

  .hero__caption {
    left: 0;
    bottom: 40px;
    max-width: 280px;
    padding: 14px 18px;
    font-size: 14px;
    line-height: 20px;
  }

  .hero__caption strong {
    font-size: 16px;
  }
}

/* ============ КВИЗ-СЕКЦИЯ ============ */
.quiz-section {
  padding-top: 48px;
}

@media (min-width: 1024px) {
  .quiz-section {
    padding-top: 72px;
  }
}

/* ============ КОМПАКТНАЯ ПОЛОСА КВИЗА ============ */
.quiz-band {
  padding: 44px 0;
  background: var(--c-main);
  color: var(--c-white);
}

.quiz-band__inner {
  display: grid;
  gap: 24px;
}

@media (min-width: 1024px) {
  .quiz-band {
    padding: 56px 0;
  }
  .quiz-band__inner {
    grid-template-columns: 1fr 1.1fr;
    gap: 48px;
    align-items: center;
  }
}

.quiz-band__text h2 {
  color: var(--c-white);
}

.quiz-band__text p {
  margin-top: 10px;
  color: rgba(255, 255, 255, 0.82);
}

/* Отдельный квиз внутри цветной полосы: белые элементы на основном цвете (правка клиента) */
.quiz-host--band {
  min-height: 0;
}

.quiz--band {
  grid-template-columns: minmax(0, 1fr);
  padding: 0;
  background: transparent;
  box-shadow: none;
  color: var(--c-white);
}

.quiz--band .quiz__progress {
  color: rgba(255, 255, 255, 0.8);
}

.quiz--band .quiz__bar {
  background: rgba(255, 255, 255, 0.25);
}

.quiz--band .quiz__bar i {
  background: var(--c-white);
}

.quiz--band .quiz__question {
  margin: 12px 0 14px;
  font-size: 20px;
  line-height: 26px;
  color: var(--c-white);
}

.quiz--band .quiz__option {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.6);
  color: var(--c-white);
}

.quiz--band .quiz__option::before {
  border-color: rgba(255, 255, 255, 0.6);
  background: transparent;
}

.quiz--band .quiz__option:hover,
.quiz--band .quiz__option.is-selected {
  background: var(--c-white);
  border-color: var(--c-white);
  color: var(--c-main);
}

.quiz--band .quiz__option.is-selected::before {
  border-color: var(--c-main);
  background: radial-gradient(var(--c-main) 45%, var(--c-white) 50%);
}

.quiz--band .quiz__back {
  color: rgba(255, 255, 255, 0.85);
}

.quiz--band .quiz__back:hover {
  color: var(--c-white);
}

.quiz--band .quiz__hint {
  color: rgba(255, 255, 255, 0.6);
}

.quiz--band .quiz__final-title,
.quiz--band .quiz__final-text,
.quiz--band .quiz__final-doctor,
.quiz--band .field__label {
  color: var(--c-white);
}

.quiz--band .quiz__final-text,
.quiz--band .quiz__final-doctor,
.quiz--band .field__label {
  opacity: 0.85;
}

.quiz--band .form__consent {
  color: rgba(255, 255, 255, 0.75);
}

.quiz--band .form__consent a {
  color: var(--c-white);
}

.quiz--band .input {
  border-color: transparent;
}

.quiz--band .form__error {
  color: #ffd6d1;
}

@media (min-width: 1024px) {
  .quiz--band {
    grid-template-columns: minmax(0, 1fr);
    padding: 0;
  }
}

/* ============ ВРАЧ ============ */
.doctor {
  display: grid;
  gap: 28px;
}

@media (min-width: 1024px) {
  .doctor {
    grid-template-columns: 400px 1fr;
    gap: 56px;
    align-items: start;
  }
}

.doctor__visual {
  position: relative;
  border-radius: var(--r-card);
  background: radial-gradient(circle at 50% 100%, var(--c-main-15), transparent 70%), var(--c-white);
  overflow: hidden;
  aspect-ratio: 4 / 5;
}

/* Фото с воздухом сверху, не упирается в бейдж (правка клиента) */
.doctor__photo {
  position: absolute;
  left: 50%;
  bottom: 0;
  height: 82%;
  width: auto;
  max-width: 100%;
  transform: translateX(-50%);
  object-fit: contain;
  object-position: bottom;
}

.doctor__visual .badge--award {
  position: absolute;
  left: 16px;
  top: 16px;
  max-width: calc(100% - 32px);
}

.doctor__name {
  margin-top: 8px;
}

.doctor__position {
  margin-top: 6px;
  font-size: 18px;
  color: var(--c-muted);
}

.doctor__facts {
  display: grid;
  gap: 10px;
  margin: 20px 0;
}

.doctor__facts li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.doctor__facts .ico {
  color: var(--c-main);
  margin-top: 2px;
}

.doctor__about {
  margin-bottom: 24px;
  color: var(--c-muted);
}

.docs {
  margin-bottom: 28px;
}

.ratings {
  margin-top: 48px;
}

.ratings__title,
.reviews__title {
  text-align: center;
  margin-bottom: 20px;
}

.ratings__grid {
  display: grid;
  gap: 12px;
}

@media (min-width: 640px) {
  .ratings__grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
  }
}

.reviews {
  margin-top: 48px;
}

.reviews__subtitle {
  margin: -10px 0 20px;
  text-align: center;
  color: var(--c-muted);
}

/* ============ КОНТАКТЫ ============ */
.contacts {
  display: grid;
  gap: 28px;
}

@media (min-width: 1024px) {
  .contacts {
    grid-template-columns: 1.15fr 1fr;
    gap: 48px;
    align-items: start;
  }
}

.contacts__map {
  height: 320px;
  border-radius: var(--r-card);
  background: var(--c-light);
  overflow: hidden;
}

@media (min-width: 1024px) {
  .contacts__map {
    height: 520px;
  }
}

.contacts__map iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.contacts__info {
  display: grid;
  gap: 18px;
  justify-items: start;
}

.contacts__phone {
  font-size: 26px;
  line-height: 32px;
  font-weight: 700;
  color: var(--c-text);
  text-decoration: none;
}

.contacts__phone:hover {
  color: var(--c-main);
}

.contacts__hours {
  margin-top: -8px;
  color: var(--c-muted);
}

.form--contacts {
  width: 100%;
  margin-top: 8px;
  padding: 20px;
  background: var(--c-light);
  border-radius: var(--r-card);
}

/* ============ ПОДВАЛ ============ */
.footer {
  padding: 40px 0 32px;
  background: var(--c-text);
  color: rgba(255, 255, 255, 0.78);
  font-size: 13px;
  line-height: 20px;
}

.footer a {
  color: var(--c-white);
}

.footer__top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 28px;
  margin-bottom: 24px;
}

.logo--footer {
  color: var(--c-white);
}

.footer__phone {
  font-size: 18px;
  font-weight: 700;
  text-decoration: none;
}

.footer__legal {
  display: grid;
  gap: 8px;
  padding: 20px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.footer__legal b {
  color: var(--c-white);
}

.footer__links,
.footer-links {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin: 20px 0 16px;
}

.footer__links a {
  display: block;
  overflow-wrap: anywhere;
}

.legal-document-link {
  white-space: normal;
  overflow-wrap: anywhere;
}

.footer__note {
  margin-bottom: 14px;
}

.footer__contra {
  font-size: 14px;
  line-height: 20px;
  font-weight: 700;
  color: var(--c-white);
  letter-spacing: 0.02em;
  margin-bottom: 20px;
  text-align: center;
}

.footer__copy {
  color: rgba(255, 255, 255, 0.55);
}

.footer--compact {
  padding: 28px 0;
}

.footer--compact .company-details {
  margin-bottom: 16px;
}

.footer--compact .footer__links {
  margin: 0;
}

/* ============ СТРАНИЦЫ «СПАСИБО» И 404 ============ */
.page-center {
  min-height: calc(100vh - var(--header-h));
  display: grid;
  place-items: center;
  padding: 40px 0;
  background: var(--c-light);
}

.thanks-card {
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  padding: 32px 20px;
  background: var(--c-white);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-card);
  text-align: center;
}

@media (min-width: 640px) {
  .thanks-card {
    padding: 44px 40px;
  }
}

.thanks-card__icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 20px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--c-light);
  color: var(--c-main);
}

.thanks-card__icon .ico {
  width: 36px;
  height: 36px;
  stroke-width: 2.5;
}

.thanks-card__text {
  margin: 12px 0 24px;
  color: var(--c-muted);
}

.thanks-card__doctor {
  display: flex;
  align-items: center;
  gap: 14px;
  justify-content: center;
  margin-bottom: 28px;
  text-align: left;
}

.thanks-card__doctor img {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  object-position: top;
  background: var(--c-light);
}

.thanks-card__doctor b {
  display: block;
}

.thanks-card__doctor span {
  font-size: 14px;
  color: var(--c-muted);
}

.notfound__code {
  font-size: 96px;
  line-height: 1;
  font-weight: 700;
  color: var(--c-main);
  margin-bottom: 12px;
}
