/* Local hotfixes for cloned landing behavior */

/*
 * Шапка: горизонтальный logo-garant-header.* (560×280 logical); футер и блок орбиты — квадратный logo-garant.*.
 * Раньше при width:100% от узкого слота темы квадратный знак давал огромную высоту — считаем высоту явно (max-height).
 */
.header__logo {
  width: auto;
  max-width: min(22em, 58vw);
  display: flex;
  align-items: center;
  align-self: stretch;
  padding-top: 2px;
  padding-bottom: 2px;
  line-height: 0;
}

.header__logo picture {
  display: block;
  width: auto;
  max-width: 100%;
}

.header__logo img {
  display: block;
  width: auto;
  height: clamp(4.05rem, 6.2em, 5.15rem);
  max-height: calc(100% - 4px);
  object-fit: contain;
}

/* Увеличение верхней навигации: лого, меню и телефоны без перекоса шапки. */
.header .header__inner {
  min-height: 92px;
}

.header .nav a {
  font-size: 16px;
  line-height: 1.25;
}

.header .header-user__phones {
  gap: 4px;
  padding: 10px 12px;
}

.header .header-user__phone-number {
  font-size: 16px;
  line-height: 1.2;
}

.footer__logo {
  width: auto;
  max-width: min(52em, min(92vw, 44rem));
  line-height: 0;
  transform: translateY(-0.85rem);
}

.footer__logo picture {
  display: block;
  width: auto;
  max-width: 100%;
}

.footer__logo img {
  display: block;
  width: auto;
  height: clamp(7.7rem, 12em, 10.5rem);
  max-height: 200px;
  object-fit: contain;
}

.footer-contacts__phones {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.25em;
}

.footer-contacts__phones .footer-contacts__phone {
  display: block;
}

/* Центральный блок футера: три колонки с равномерными отступами (тема — два столбца с margin-right). */
@media screen and (min-width: 577px) {
  .footer .footer-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-start;
    gap: clamp(1.75rem, 4.5vw, 3.75rem);
    row-gap: 1.25em;
  }

  .footer .footer-nav__list {
    margin-right: 0;
    flex: 0 1 auto;
  }

  .footer .footer-nav__list:last-child {
    margin-right: 0;
  }
}

@media screen and (max-width: 992px) {
  .header .header__inner {
    min-height: 80px;
  }

  .header__logo img {
    height: clamp(3.2rem, 6.1em, 4.1rem);
    max-height: calc(100% - 4px);
  }

  .header .nav a {
    font-size: 14px;
  }
}

/*
 * Safari не воспроизводит CSS-анимации во внешнем SVG, если он подключён через <img>.
 * <object> подгружает SVG как документ — анимации (машина, шлагбаум) работают как в Firefox.
 */
.main__img object.main-parking-svg {
  width: 100%;
  display: block;
  border: 0;
  aspect-ratio: 1217 / 566;
  height: auto;
}

.demo__inner object.demo__img {
  pointer-events: none;
}

/* Тарифы: две строки только по <br>; без пробелов после <br>. Узкий max-width убираем — иначе первая строка ломалась на три ряда. */
.tariffs .tariffs__title.h2 {
  text-align: center;
  line-height: 1.18;
  margin-inline: auto;
  padding-inline: clamp(0.25rem, 2vw, 1rem);
  box-sizing: border-box;
}

/* Герой: градиент вместо фото из темы (url(../img/main-bg.jpg)); cover для JPEG тут не нужен. */
.main.m-section._first .main__wrap {
  background-color: #eaf1fb;
  background-image: linear-gradient(180deg, #f6f9fd 0%, #e8f1fb 52%, #e3ecf8 100%);
  background-size: 100% 100%;
  background-repeat: no-repeat;
  background-position: center center;
}

/* Блок «О нас»: единый цвет заголовка (в теме .create__title span был #fff). */
#about.create .create__title {
  color: #0d2750;
}

/* «О нас»: в макете Integram заголовок ~5.8em — для нашей строки занимает полколонки; ужимаем на десктопе. */
@media screen and (min-width: 993px) {
  #about.create .create__title {
    font-size: clamp(2.55rem, 3.45vw, 3.55rem);
    line-height: 1.13;
  }
}

@media screen and (min-width: 993px) and (max-width: 1200px) {
  #about.create .create__title {
    font-size: clamp(2.3rem, 3.15vw, 3.15rem);
  }
}

/* Swiper defaults inject icon font via ::after; hide it because custom SVG arrows are already inside buttons. */
.swiper-button-prev::after,
.swiper-button-next::after {
  content: none !important;
}

/* Keep navigation controls centered and consistent. */
.swiper-nav .swiper-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.swiper-nav .swiper-button img {
  display: block;
}

/* Team slider arrows are vertical in the original layout. */
.team-slider .swiper-nav {
  display: flex !important;
  flex-direction: column !important;
  align-items: center;
  gap: 10px;
}

.team--partners .partner-card {
  border-radius: 20px;
  background: #fff;
  border: 1px solid rgba(13, 39, 80, 0.08);
  box-shadow: 0 8px 24px rgba(13, 39, 80, 0.08);
}

.team--partners .partner-card__img {
  height: 250px;
  padding: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.team--partners .partner-card__img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.team--partners .team-slider .swiper-nav {
  position: static !important;
  margin-top: 14px;
  display: flex !important;
  flex-direction: row !important;
  justify-content: center;
  gap: 10px;
}

/* In solution section there should be no slider arrows. */
.solution .solution-slider .swiper-nav {
  display: none !important;
}

.ui-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #2c7be5;
  line-height: 1;
  flex-shrink: 0;
}

.ui-icon-main {
  font-size: 40px;
}

.ui-icon-card {
  font-size: 40px;
}

.ui-icon-solution {
  font-size: 38px;
  margin-right: 18px;
}

.main-item .ui-icon-main {
  margin-right: 12px;
  margin-bottom: 0;
}

.alternative-card .ui-icon-card {
  margin-right: 10px;
}

#alternative .alternative-card .ui-icon-card {
  font-size: 96px !important;
}

#alternative .alternative-card._big .ui-icon-card {
  font-size: 104px !important;
}

.main-item,
.alternative-card__text,
.solution-item__btn {
  line-height: 1.3;
}

.alternative-card__img {
  display: flex;
  align-items: center;
  justify-content: center;
}

.header-user__phones {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px;
  border-radius: 999px;
  background: linear-gradient(180deg, #f8f9fb 0%, #f2f4f7 100%);
  border: 1px solid rgba(13, 39, 80, 0.08);
  box-shadow: 0 4px 14px rgba(13, 39, 80, 0.07), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.header-user__phone {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 5px 10px;
  border-radius: 999px;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.header-user__phone + .header-user__phone {
  margin-top: 0;
  padding-top: 5px;
  border-top: 1px solid rgba(13, 39, 80, 0.12);
}

.header-user__phone-number {
  font-size: 14px;
  line-height: 1.2;
  color: #0d2750;
  font-weight: 600;
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
}

.header-user__phone:hover .header-user__phone-number {
  color: #285ead;
}

.header-user__phone:hover {
  background-color: rgba(44, 123, 229, 0.08);
  transform: translateX(-1px);
}

@media (max-width: 992px) {
  .header-user__phones {
    width: auto;
    align-items: stretch;
    border-radius: 14px;
    padding: 8px;
  }

  .header-user__phone-number {
    font-size: 13px;
  }

  .ui-icon-main {
    font-size: 32px;
  }

  .ui-icon-card,
  .ui-icon-solution {
    font-size: 33px;
  }

  #alternative .alternative-card .ui-icon-card {
    font-size: 72px !important;
  }

  #alternative .alternative-card._big .ui-icon-card {
    font-size: 78px !important;
  }
}

/* «Для кого»: Bootstrap Icons (~крупнее штатных 2.5em-картинок темы). */
.effective-item > .bi {
  line-height: 1;
  margin-right: 1.25em;
  flex-shrink: 0;
  color: #307fe2;
}

/* Орбита рисуется абсолютами в em; clip-path карточки обрезает вылеты за грань многоугольника. */
#for-who.effective .effective__wrap {
  -webkit-clip-path: none !important;
  clip-path: none !important;
  overflow: visible;
  border-radius: 1.25em;
}

@media screen and (min-width: 993px) {
  /*
   * Орбита из темы — фиксированные em-к координаты. Чтобы явно подтянуть всё к марке без ломания круга:
   * обёртка .effective__items на весь блок + transform: scale(...) от центра (логотип — сосед, не масштабируется).
   */
  #for-who .effective-item > .bi {
    font-size: 3.2em;
  }

  .effective__content {
    width: 100%;
    box-sizing: border-box;
    padding-left: clamp(1rem, 5vw, 4rem);
    padding-right: clamp(1rem, 5vw, 4rem);
    overflow: visible;
    position: relative;
  }

  #for-who .effective__items {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    min-height: 31.75em;
    transform: scale(0.74);
    transform-origin: center center;
    pointer-events: none;
  }

  .effective__content > .effective__logo {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    margin: 0;
    width: clamp(9rem, 16vw, 15rem);
    height: auto;
    max-width: 28%;
    z-index: 1;
    pointer-events: none;
    line-height: 0;
  }

  .effective__content > .effective__logo img {
    width: 100%;
    height: auto;
    display: block;
  }

  .effective-item {
    z-index: 2;
  }

  #for-who .effective-item {
    font-size: clamp(15px, 1.18vw, 18px);
    padding: 0.48em 1em;
    min-height: 4.35em;
    pointer-events: auto;
  }

  #for-who .effective-item > .bi {
    margin-right: 1.05em;
  }

  /* После scale всё равно крайний левый слот темы даёт отрицательный left */
  #for-who .effective-item:nth-child(8) {
    left: 0;
  }
}

@media screen and (min-width: 993px) and (max-width: 1200px) {
  #for-who .effective__items {
    transform: scale(0.68);
  }

  .effective__content > .effective__logo {
    width: clamp(7.75rem, 15vw, 13rem);
    max-width: 26%;
  }

  #for-who .effective-item {
    font-size: clamp(14px, 1.22vw, 16.5px);
    min-height: 4.05em;
  }

  #for-who .effective-item > .bi {
    font-size: 3em;
  }
}

@media screen and (max-width: 992px) {
  #for-who .effective__items {
    position: static;
    inset: auto;
    width: auto;
    height: auto;
    min-height: unset;
    transform: none;
    pointer-events: unset;
  }

  .effective-item > .bi {
    font-size: 2.35em;
  }

  #for-who .effective-item {
    padding: 0.55em 0.85em;
    font-size: clamp(14px, 3.8vw, 16px);
    min-height: unset;
  }

  #for-who .effective-item > .bi {
    font-size: 2.85em;
    margin-right: 0.75em;
  }
}
