/* Блок тарифов: выравнивание цен и отступы описания/списка */

/* plan-circle: WebP (PNG остаётся в репо как fallback при сборке/редактировании). */
.plan__circle {
  background-image: url("../images/plan-circle.webp") !important;
}

/* Равная высота карточек и прижатие цены к одной линии */
.plan__list {
  align-items: stretch;
}
.plan__item-wrapper {
  display: flex;
  flex-direction: column;
}
.plan__item {
  display: flex;
  flex-direction: column;
  flex: 1;
  width: 100%;
  min-height: 0;
}
/* Цена и кнопка внизу - цены по одной линии */
.plan__price {
  margin-top: auto;
  padding-top: 0.5rem;
}
/* Отступ между описанием и списком (Безлимит, 7 устройств) */
.plan__descr {
  margin-bottom: 1.25rem;
  line-height: 1.5;
}
.plan__list-features {
  margin-top: 0.5rem;
  margin-bottom: 1rem;
}
.plan__list-features .plan__list-item {
  margin-bottom: 0.5rem;
}
.plan__list-features .plan__list-item:last-child {
  margin-bottom: 0;
}

/* Avoid overlap with bottom-right chat launcher */
.go-top {
  right: 20px;
  bottom: 140px;
}

@media (max-width: 768px) {
  .go-top {
    right: 14px;
    bottom: 130px;
  }
}

/* FAQ: маркированный список внутри ответа */
.faq__bullets {
  margin: 0.65rem 0 0;
  padding-left: 1.25rem;
  list-style: disc;
}
.faq__bullets li {
  list-style: disc;
  margin-bottom: 0.4rem;
  line-height: 1.5;
}
.faq__bullets li:last-child {
  margin-bottom: 0;
}

/*
 * Apps (Happ + INCY):
 * ≥769px — заголовок/текст слева, две карточки справа в одной горизонтали с ним.
 * ≤768px — две узкие карточки в один ряд по центру (как в исходном бандле).
 */
@media (min-width: 769px) {
  .apps .apps__wrap {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: flex-start !important;
    justify-content: space-between !important;
    gap: 28px 40px !important;
    width: 100%;
  }

  .apps .apps__inner {
    flex: 0 1 min(440px, 42%) !important;
    max-width: min(520px, 46%) !important;
    min-width: 240px !important;
    width: auto !important;
    margin: 0 !important;
    text-align: left !important;
  }

  .apps .apps__title {
    text-align: left !important;
  }

  .apps .apps__list {
    flex: 1 1 auto !important;
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    justify-content: center !important;
    align-items: stretch !important;
    align-content: stretch !important;
    gap: 14px 18px !important;
    max-width: none !important;
    width: auto !important;
    min-width: 0 !important;
    margin: 0 !important;
  }

  .apps .apps__list > .apps__item {
    flex: 1 1 0 !important;
    min-width: 0 !important;
    max-width: min(360px, 50%) !important;
    width: auto !important;
    box-sizing: border-box !important;
  }

  html[dir="rtl"] .apps .apps__inner,
  html[dir="rtl"] .apps .apps__title {
    text-align: right !important;
  }

  /* В RTL flex row: первый блок (текст) у inline-start — справа; карточки слева — ок */
  html[dir="rtl"] .apps .apps__list {
    flex-direction: row !important;
  }
}

@media (max-width: 768px) {
  .apps .apps__wrap {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 18px !important;
    width: 100%;
  }

  .apps .apps__inner {
    max-width: 100% !important;
    width: 100% !important;
    text-align: center !important;
  }

  .apps .apps__title {
    text-align: center !important;
  }

  .apps .apps__list {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    justify-content: center !important;
    align-items: stretch !important;
    gap: 8px 10px !important;
    width: 100% !important;
    max-width: min(360px, 100%) !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  .apps .apps__list > .apps__item {
    flex: 1 1 calc(50% - 6px) !important;
    min-width: 0 !important;
    max-width: calc(50% - 6px) !important;
    width: calc(50% - 6px) !important;
  }

  html[dir="rtl"] .apps .apps__list {
    flex-direction: row-reverse !important;
  }
}

/* Apps: better wrapping of platform buttons */
.apps__links {
  flex-wrap: wrap;
  justify-content: center;
  row-gap: 8px;
}

.apps__link--full {
  flex-basis: 100%;
  justify-content: center;
}

/* Apps: more even vertical rhythm inside cards */
.apps__item {
  padding-top: 22px;
  padding-bottom: 22px;
}

.apps__subtitle {
  margin-bottom: 6px;
}

.apps__descr {
  margin-bottom: 18px;
}

/* Apps: unify platform icon size (mobile & desktop) */
.apps__icon {
  width: 22px !important;
  height: 22px !important;
}

/* Windows glyph is optically smaller: compensate on mobile only */
@media (max-width: 768px) {
  .apps__link[href*="setup-Happ.x64.exe"] .apps__icon,
  .apps__link[href*="incy-windows-setup.exe"] .apps__icon {
    width: 24px !important;
    height: 24px !important;
    transform: translateY(0.5px);
  }
}

/* Apps: polish link alignment and CTA-like hover glow */
.apps__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 46px;
  transition: border-color 0.25s ease, box-shadow 0.25s ease,
    transform 0.2s ease, background-color 0.25s ease;
}

@media (hover: hover) and (pointer: fine) {
  .apps__link:hover {
    border-color: #3ddc84;
    background-color: rgba(61, 220, 132, 0.08);
    box-shadow: 0 0 0 1px rgba(61, 220, 132, 0.35),
      0 8px 24px rgba(61, 220, 132, 0.22);
    transform: translateY(-1px);
  }
}

.apps__link:focus-visible {
  border-color: #3ddc84;
  background-color: rgba(61, 220, 132, 0.08);
  box-shadow: 0 0 0 2px rgba(61, 220, 132, 0.45),
    0 8px 24px rgba(61, 220, 132, 0.22);
}

.apps__link:active {
  transform: translateY(0);
}

/* Footer layout polish */
@media (min-width: 1024px) {
  .footer__inner {
    display: grid;
    grid-template-columns: minmax(300px, 1fr) minmax(420px, auto);
    column-gap: 36px;
    align-items: start;
  }

  .footer__nav {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    width: 100%;
  }

  .footer__menu {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px 22px;
    margin-bottom: 12px;
  }

  .footer__menu .menu__link {
    font-size: 15px;
    font-weight: 500;
    line-height: 1.3;
    letter-spacing: 0.01em;
  }

  .footer__list-payments {
    justify-content: flex-end;
    margin-left: auto;
  }

  .footer__copyright {
    display: block;
    text-align: center;
    margin-top: 20px;
  }
}

@media (min-width: 769px) and (max-width: 1023px) {
  .footer__inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    row-gap: 14px;
  }

  .footer__nav {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .footer__menu {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px 18px;
    margin-bottom: 12px;
  }

  .footer__menu .menu__link {
    font-size: 15px;
    font-weight: 500;
    line-height: 1.3;
  }

  .footer__list-payments {
    justify-content: center;
    margin-left: auto;
    margin-right: auto;
  }
}

@media (max-width: 768px) {
  /* Воздух под «Техподдержка» / копирайтом: fixed-лаунчер чата не в потоке — резервируем полосу FAB+тизер + safe-area */
  .footer {
    padding-bottom: max(
      5.75rem,
      calc(3.5rem + env(safe-area-inset-bottom, 0px))
    );
  }

  .footer__inner {
    text-align: center;
  }

  .footer__nav {
    align-items: center;
  }

  .footer__menu {
    display: grid;
    grid-template-columns: 1fr;
    gap: 6px;
    justify-items: center;
    text-align: center;
    width: 100%;
    margin-top: 8px;
    margin-bottom: 10px;
  }

  .footer__menu .menu__item {
    width: 100%;
  }

  .footer__menu .menu__link {
    display: inline-block;
    max-width: 320px;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.25;
    letter-spacing: 0.01em;
  }

  .footer__list-payments {
    justify-content: center;
    margin-left: auto;
    margin-right: auto;
  }

  .footer__copyright {
    display: block;
    padding-top: 0.45rem;
    margin-top: 0.2rem;
    padding-bottom: 0.15rem;
    padding-inline: max(10px, env(safe-area-inset-left))
      max(10px, env(safe-area-inset-right));
  }
}

@media (max-width: 360px) {
  .footer__menu .menu__link {
    font-size: 15px;
    line-height: 1.2;
  }

  .footer__menu {
    gap: 5px;
  }
}

.footer__list-payments svg {
  opacity: 0.62;
  transition: opacity 0.2s ease;
}

@media (hover: hover) and (pointer: fine) {
  .footer__list-payments svg:hover {
    opacity: 0.78;
  }
}

/* Отзывы: <picture> + WebP — не ломаем раскладку .review-card__header */
.review-card__header picture {
  display: contents;
}

