/* Нижняя часть главной: преимущества, «О нас», карусели, запас под круглую «Запись онлайн».
   Кнопку .fab и скрим героя этот файл не двигает. */

@media (max-width: 500px) {
  .perks { grid-template-columns: minmax(0, 1fr); }
}

.home-block__head h2,
.home-about__copy h2 { margin: 0; font-size: 32px; line-height: 1.2; }
.home-block__head .more { font-size: 13px; white-space: nowrap; }

.home-about { padding: 28px 0 12px; border-bottom: 1px solid #f2f6f7; }
.home-about__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  gap: 12px 28px;
  align-items: end;
}
.home-about__copy p { margin: 12px 0 0; color: #333; }
.home-about__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 150px;
  height: 50px;
  margin-top: 16px;
  padding: 0 8px;
  border: 1px solid #ececec;
  border-radius: 8px;
  background: #fff;
  color: #333;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
}
.home-about__photo {
  display: block;
  width: min(100%, 460px);
  height: auto;
  margin-left: auto;
  object-fit: cover;
}

.home-seo { padding: 36px 0 12px; }
.home-seo h1 { font-size: 34px; margin: 0 0 16px; }
.home-results { padding: 36px 0 8px; }
.home-results > h2 {
  margin: 0 0 18px;
  font-size: 32px;
  line-height: 1.15;
  text-transform: uppercase;
}
.home-story { padding-top: 8px; }
.home-story h2 { font-size: 26px; margin: 22px 0 8px; }
.home-story__block > :first-child { margin-top: 0; }

.home-services { padding-bottom: 8px; }
.service-board__foot {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 22px;
  margin-top: 8px;
}
.service-board__more,
.service-board__all {
  background: none;
  border: 0;
  padding: 8px 4px;
  color: #999;
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
}
.service-board__more:hover,
.service-board__all:hover { color: var(--gold); }
.service-tile__more {
  display: inline-block;
  margin-top: 6px;
  color: #999;
  font-size: 13px;
}
.service-tile__more:hover { color: var(--gold); }
.service-board .service-tile.is-extra { display: none; }
.service-board.is-open .service-tile.is-extra { display: grid; }

.home-partners { padding: 28px 0 36px; }
.home-partners__list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.home-partners__list a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  min-height: 100%;
  padding: 18px 12px 14px;
  border: 1px solid #ecf2f4;
  background: #fff;
  color: #555;
  text-align: center;
  box-shadow: 0 1px 0 rgba(0, 0, 0, .03);
}
.home-partners__list img {
  width: 159px;
  max-width: 100%;
  height: 72px;
  object-fit: contain;
}
.home-partners__list span { font-size: 13px; line-height: 1.35; }

.is-home .cards--review .cards__track { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.is-home .cards--review .card,
.is-home .cards--license .card {
  border-radius: 2px;
  box-shadow: 0 1px 0 rgba(0, 0, 0, .04);
}
.is-home .cards--review .card:hover,
.is-home .cards--license .card:hover { transform: none; }
.is-home .cards--review .card__quote { display: none; }
.is-home .cards--review .card h3 { font-size: 16px; margin-top: 0; }
.is-home .cards--license .card__media img {
  aspect-ratio: 3 / 4;
  object-fit: contain;
  background: #fff;
}
.home-results .galerys-block .slides {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.home-results .galerys-block .slides > li {
  flex: 0 0 86%;
  scroll-snap-align: start;
  border: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
}
.home-results .galerys-block .slides img { height: auto; aspect-ratio: 4 / 3; border-radius: 0; object-fit: contain; object-position: center; background: #f4f1ee; }
@media (min-width: 700px) {
  .home-results .galerys-block .slides > li { flex-basis: calc((100% - 12px) / 2); }
}
@media (min-width: 1100px) {
  .home-results .galerys-block .slides > li { flex-basis: calc((100% - 36px) / 4); }
}

.reel { position: relative; min-width: 0; }
.reel__track {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  padding: 6px 0 10px;
  -webkit-overflow-scrolling: touch;
}
.reel__track::-webkit-scrollbar { height: 0; display: none; }
.reel__track > .card { scroll-snap-align: start; flex: 0 0 calc((100% - 36px) / 3); min-width: 0; }
.reel__nav {
  position: absolute;
  top: 42%;
  z-index: 2;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(233, 155, 5, .55);
  background: rgba(255, 255, 255, .94);
  color: var(--gold);
  box-shadow: 0 8px 20px rgba(0, 0, 0, .12);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.reel__nav::before {
  content: "";
  width: 9px;
  height: 9px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg);
  margin-left: -3px;
}
.reel__nav--prev { left: 0; }
.reel__nav--prev::before { transform: rotate(135deg); margin-left: 3px; }
.reel__nav--next { right: 0; }
.reel__nav:hover, .reel__nav:focus-visible { background: var(--gold); color: #fff; border-color: var(--gold); }

.reel--staff .card {
  border: 0;
  background: transparent;
  box-shadow: none;
  border-radius: 0;
  padding: 8px 12px 18px;
  text-align: center;
}
.reel--staff .card:hover { transform: none; box-shadow: none; }
.reel--staff .reel__nav { top: 112px; transform: translateY(-50%); }
.reel--staff .card__media {
  width: 200px;
  height: 200px;
  aspect-ratio: 1;
  margin: 8px auto 16px;
  border-radius: 50%;
  overflow: hidden;
}
.reel--staff .card__media img { width: 100%; height: 100%; object-fit: cover; object-position: top center; aspect-ratio: auto; }
.reel--staff .card h3,
.reel--staff .card h3 a,
.reel--staff .card .card__role,
.reel--staff .card p { margin-left: 0; margin-right: 0; text-align: center; }
.reel--staff .card h3 { font-size: 19px; font-weight: 700; line-height: 1.35; }
.reel--staff .card .card__role {
  color: #999;
  font-size: 14px;
  line-height: 1.4;
  margin-top: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.reel--staff .card .btn { margin: auto auto 0; }

.reel--news .card { border-radius: 14px; }
.reel--news .card__media { position: relative; aspect-ratio: 16 / 10; border-radius: 0; }
.reel--news .card > p {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.is-home .service-tile:not(:has(.service-tile__media)) {
  grid-template-columns: minmax(0, 1fr);
}

@media (min-width: 768px) {
  .is-home .home-block { padding: 48px 0 24px; }
  .is-home .home-block__head { margin-bottom: 22px; }
  .is-home .service-tile {
    grid-template-columns: 140px minmax(0, 1fr);
    gap: 8px 28px;
    padding: 28px 32px;
    border-radius: 3px;
    border-color: #ecf2f4;
    box-shadow: none;
  }
  .is-home .service-tile__media img:not(.media-fallback__logo) {
    width: 140px;
    height: 93px;
    border-radius: 2px;
    object-fit: cover;
  }
  .is-home .service-tile__media .media-fallback--brand {
    width: 140px;
    min-height: 93px;
    border-radius: 2px;
  }
  .is-home .service-tile h3 { font-size: 19px; line-height: 1.35; margin: 0 0 10px; }
  .is-home .service-tile ul { display: flex; flex-wrap: wrap; align-items: baseline; }
  .is-home .service-tile li { margin: 0; max-width: 100%; }
  .is-home .service-tile li a {
    color: #333;
    font-size: 14px;
    line-height: 1.57;
    white-space: nowrap;
  }
  .is-home .service-tile li a:hover { color: var(--gold); }
  .is-home .service-tile li:not(:last-child) a::after {
    content: " \2014";
    color: #e4edf0;
    padding-left: 6px;
  }
}

@media (max-width: 1100px) {
  .reel__track > .card { flex-basis: calc((100% - 18px) / 2); }
  .home-about__grid { grid-template-columns: minmax(0, 1fr); align-items: start; }
  .home-about__photo { width: 100%; max-height: 280px; margin: 8px 0 0; }
  .home-partners__list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 767px) {
  .home-block { padding: 26px 0 12px; }
  .home-block__head { margin-bottom: 12px; align-items: center; }
  .home-block__head h2, .home-about__copy h2, .home-seo h1, .home-results > h2 { font-size: 26px; }
  .home-story h2 { font-size: 22px; }
  .home-about { padding: 8px 0 4px; }
  .home-about__copy p { font-size: 15px; line-height: 1.5; }
  .home-about__photo { max-height: 220px; border-radius: 16px; }
  .home-partners__list { grid-template-columns: minmax(0, 1fr); }
  .perks { padding: 6px 0 4px; gap: 0; }
  .perk { padding: 12px 76px 12px 0; }
  .perk h2 { font-size: 16px; margin-bottom: 4px; }
  .perk p { font-size: 14px; line-height: 1.4; color: #777; }
  .reel__track { gap: 12px; padding: 4px 2px 14px; scroll-padding-inline: 2px; }
  .reel__track > .card { flex-basis: 84%; scroll-snap-align: center; }
  .reel__nav { display: none; }
  .reel--staff .card { padding: 4px 8px 16px; }
  .reel--staff .reel__nav { top: 42%; }
  .reel--staff .card__media { width: min(168px, 64%); height: auto; margin-bottom: 12px; }
  .reel--staff .card h3 { font-size: 17px; }
  .is-home .service-tile li a { color: #333; }
  .is-home .service-tile li a:hover { color: var(--gold); }
  .is-home .cards--review .cards__track {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    overflow: visible;
    padding: 4px 0 16px;
  }
  .is-home .cards--review .card {
    flex: unset;
    min-width: 0;
    scroll-snap-align: unset;
  }
  .is-home .cards--license .cards__track {
    display: flex;
    grid-template-columns: none;
    gap: 12px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: 2px;
    padding: 4px 2px 16px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .is-home .cards--license .cards__track::-webkit-scrollbar { display: none; }
  .is-home .cards--license .card {
    flex: 0 0 86%;
    scroll-snap-align: center;
    min-width: 0;
  }
  .is-home .cards--review .card__text { font-size: 15px; line-height: 1.45; }
  .home-callback { padding: 12px 0 28px; scroll-margin-bottom: 96px; }
}

@media (prefers-reduced-motion: reduce) {
  .reel__track { scroll-behavior: auto; }
}

/* Круглая «Запись онлайн» остаётся fixed. Подвал получает запас снизу,
   чтобы телефон, соцсети и ссылки не оставались под кнопкой в конце страницы.
   На 768–1360 резервируем полосу для кнопки до загрузки виджета чата.
   Шире 1500px кнопка сидит в поле справа от колонки 1240px. */
@media (max-width: 1500px) {
  .site-footer { padding-bottom: 112px; }
}
@media (min-width: 768px) and (max-width: 1360px) {
  body.spabio-chat-configured .site-main .wrap,
  body.spabio-chat-configured .site-footer .wrap {
    padding-right: 0;
    padding-left: max(0px, calc(72px - max(16px, (100vw - var(--max)) / 2)));
  }
  body.spabio-chat-configured .hero__slide > .wrap { padding-right: 0; padding-left: 0; }
}
/* Отзывы на главной: 3 / 2 / 1 карточка, точки, стрелки, равная высота. Без автопрокрутки. */
.reel--reviews .reel__track > .card { display: flex; flex-direction: column; height: auto; }
.reel--reviews .card__text { flex: 1 1 auto; }
.reel--reviews .card h3 a { text-decoration: none; color: var(--ink); }
.reel--reviews .card h3 a:hover { color: var(--gold); }
.reel__dots {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  min-height: 28px;
  margin: 4px 0 0;
}
.reel__dots button {
  width: 8px;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: #ddd;
  cursor: pointer;
}
.reel__dots button[aria-current="true"] { width: 18px; background: var(--gold); }
.reel__dots:empty { min-height: 28px; }
@media (max-width: 767px) {
  .reel--reviews .reel__track > .card { flex-basis: 100%; scroll-snap-align: start; }
  .reel--reviews .reel__nav { display: inline-flex; top: 38%; }
}

@media (max-width: 767px) {
  .site-footer { padding-bottom: 128px; }
  .site-footer .wrap { padding-right: 72px; }
  body.spabio-chat-configured .site-footer .wrap { padding-right: 0; padding-left: 72px; }
}
