.u-section-1 {
  background: #232344;
  overflow: hidden;
}

body.u-overlap.u-overlap-transparent .u-header#menu {
  background-color: transparent !important;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  z-index: 1200 !important;
  transition: background-color 0.25s ease, backdrop-filter 0.25s ease, -webkit-backdrop-filter 0.25s ease;
}

body.u-overlap.u-sticky-fixed .u-header#menu,
body.u-overlap .u-header#menu.u-sticky.u-sticky-fixed {
  background-color: rgba(16, 17, 41, 0.96) !important;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

body.u-overlap .u-header#menu.u-sticky,
body.u-overlap .u-header#menu.u-sticky.u-sticky-fixed {
  z-index: 1200 !important;
}

.inst-page {
  position: relative;
}

.inst-wrap {
  width: min(1140px, calc(100% - 48px));
  margin: 0 auto;
}

/* inst-content чуть уже для визуального отступа карточек */
.inst-content {
  width: min(1140px, 100%);
  min-width: 0;
}

.inst-hero {
  position: relative;
  padding: 138px 0 60px;
  background:
    radial-gradient(66% 120% at 50% 12%, rgba(43, 53, 153, 0.34) 0%, rgba(15, 16, 42, 0) 72%),
    #101129;
}

.inst-hero > .inst-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
}

h1.inst-title {
  margin: 0;
  color: #f4f6ff;
  text-align: center;
  font-size: 40px;
  font-weight: 600;
  line-height: 1.2;
}

.inst-title span {
  color: #5966ff;
}

p.inst-subtitle {
  margin: 12px 0 0;
  color: rgba(229, 234, 255, 0.62);
  text-align: center;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.35;
}

.inst-cable {
  display: block;
  width: min(516px, 100%);
  height: auto;
  margin: 30px auto -98px; /* картинка вылазит за низ hero */
  position: relative;
  z-index: 2;
}

.inst-main {
  position: relative;
  padding: 89px 0 108px;
  background: #232344;
}

.inst-main::before,
.inst-main::after {
  content: "";
  position: absolute;
  width: 560px;
  height: 560px;
  pointer-events: none;
  background: radial-gradient(circle, rgba(45, 54, 176, 0.28) 0%, rgba(45, 54, 176, 0) 72%);
}

.inst-main::before {
  left: -320px;
  top: 300px;
}

.inst-main::after {
  right: -320px;
  top: 960px;
}

.inst-content {
  position: relative;
  z-index: 1;
  width: min(900px, 100%);
  min-width: 0;
}

.inst-step {
  margin-bottom: 38px;
}

h2.inst-step-title {
  margin: 0 0 16px;
  color: #f4f6ff;
  font-size: 32px;
  font-weight: 500;
  line-height: 1.2;
}

.inst-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

button.inst-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 44px;
  padding: 10px 22px;
  border: 2px solid #4051ff;
  border-radius: 999px;
  background: transparent;
  color: #f4f6ff;
  font-family: inherit;
  font-size: 16px;
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, opacity 0.18s ease;
}

button.inst-pill:hover:not(.is-active) {
  background: rgba(64, 81, 255, 0.15);
}

.inst-pill.is-active {
  background: linear-gradient(90deg, #3b42fa 0%, #4f67f7 100%);
  border-color: transparent;
  border-radius: 999px;
  background-clip: padding-box;
}

.inst-pill img {
  width: 14px;
  height: 14px;
  object-fit: contain;
}

button.inst-pill.inst-pill-wide-icon {
  min-height: 46px;
  padding: 11px 24px;
}

button.inst-pill.inst-pill-wide-icon img {
  width: 18px;
  height: 14px;
}

button.inst-pill.inst-pill-android img {
  width: 19px;
}

button.inst-pill.inst-pill-smart-tv img {
  transform: translateY(1px);
}

.inst-card {
  --inst-text-offset: 71px;
  position: relative;
  overflow: hidden;
  margin-top: 18px;
  padding: 20px 28px 24px;
  border-radius: 22px;
  background: #3b3b55;
}

.inst-card-head {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.inst-card-head > div {
  flex: 1 1 auto;
  min-width: 0;
  box-sizing: border-box;
  padding-right: 80px;
}

.inst-card:not(:has(.inst-card-app-logo)) .inst-card-head > div {
  padding-right: 0;
}

.inst-card-icon {
  flex: 0 0 55px;
  width: 55px;
  height: 55px;
  border-radius: 50%;
  border: 2px solid #4b61ff;
  background-color: rgba(75, 97, 255, 0.4);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.inst-card-icon img {
  width: 22px;
  height: 22px;
  object-fit: contain;
}

.inst-pill img,
.inst-card-icon img {
  filter: brightness(0) saturate(100%) invert(100%) contrast(125%);
}

.inst-card-app-logo {
  position: absolute;
  top: 50%;
  right: -4%;
  transform: translateY(-50%);
  width: auto;
  height: 130%;
  aspect-ratio: 1;
  border-radius: 0;
  object-fit: contain;
  -webkit-mask-image: linear-gradient(to right,
    rgba(0,0,0,0)    0%,
    rgba(0,0,0,0.05) 10%,
    rgba(0,0,0,0.15) 20%,
    rgba(0,0,0,0.30) 30%,
    rgba(0,0,0,0.50) 40%,
    rgba(0,0,0,0.70) 50%,
    rgba(0,0,0,0.88) 60%,
    rgba(0,0,0,1)    70%
  );
  mask-image: linear-gradient(to right,
    rgba(0,0,0,0)    0%,
    rgba(0,0,0,0.05) 10%,
    rgba(0,0,0,0.15) 20%,
    rgba(0,0,0,0.30) 30%,
    rgba(0,0,0,0.50) 40%,
    rgba(0,0,0,0.70) 50%,
    rgba(0,0,0,0.88) 60%,
    rgba(0,0,0,1)    70%
  );
}

h3.inst-card-title {
  margin: 0;
  color: #f8f9ff;
  font-size: 24px;
  font-weight: 600;
  line-height: 1.2;
}

p.inst-card-subtitle {
  margin: 6px 0 15px;
  color: #c9a84c;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.4;
}

p.inst-card-subtitle::before {
  content: '⚠ ';
}

p.inst-card-text {
  margin: 8px 0 0;
  color: rgba(239, 242, 255, 0.74);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.45;
  overflow-wrap: anywhere;
  word-break: normal;
  white-space: normal !important;
}

.inst-download-btn {
  margin-top: 20px;
  min-height: 44px;
  border: 0;
  border-radius: 999px;
  padding: 10px 28px;
  background: #474c94;
  color: #9aafff;
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
}

ol.inst-list {
  margin: 25px 0 0 var(--inst-text-offset);
  padding-left: 1.15em;
  width: calc(100% - (var(--inst-text-offset) * 2));
  max-width: calc(100% - (var(--inst-text-offset) * 2));
  color: rgba(242, 245, 255, 0.72);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.45;
  box-sizing: border-box;
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: normal;
  white-space: normal !important;
}

.inst-card-head + ol.inst-list {
  margin-top: 0;
}

/* Первый список внутри headText — выравнивается с заголовком */
.inst-card-head > div > ol.inst-list {
  margin-top: 15px;
  margin-left: 0;
  width: 100%;
  max-width: 100%;
}

ol.inst-list li {
  overflow-wrap: anywhere;
  word-break: normal;
  white-space: normal !important;
  min-width: 0;
}

/* Универсальный класс для текст-ссылок внутри контента инструкций */
.inst-link {
  color: #8ea1ff;
  text-decoration: none;
  border-bottom: 1px solid rgba(142, 161, 255, 0.35);
  transition: color 0.15s ease, border-color 0.15s ease;
}

.inst-link:hover {
  color: #aab8ff;
  border-bottom-color: rgba(170, 184, 255, 0.65);
}

/* Ссылки внутри списков используют тот же класс */
.inst-list a {
  color: #8ea1ff;
  font-size: 16px;
  text-decoration: none;
  border-bottom: 1px solid rgba(142, 161, 255, 0.35);
  transition: color 0.15s ease, border-color 0.15s ease;
}

.inst-list a:hover {
  color: #aab8ff;
  border-bottom-color: rgba(170, 184, 255, 0.65);
}

/* Обёртка вокруг картинки карточки */
.inst-image-wrap {
  position: relative;
  display: block;
  width: calc(100% - (var(--inst-text-offset) * 2));
  max-width: calc(100% - (var(--inst-text-offset) * 2));
  margin-left: var(--inst-text-offset);
  margin-top: 25px;
}

.inst-image {
  width: 100%;
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0;
  border-radius: 22px;
}

/* Кнопка-лупа — видна только на мобильных */
.inst-zoom-btn {
  display: none;
  position: absolute;
  top: 10px;
  right: 10px;
  width: 34px;
  height: 34px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.52);
  color: #fff;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  transition: background 0.15s ease;
  z-index: 3;
}

.inst-zoom-btn:hover {
  background: rgba(0, 0, 0, 0.75);
}

/* Лайтбокс */
#inst-lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.88);
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

#inst-lightbox.is-open {
  display: flex;
}

#inst-lightbox-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 12px;
  user-select: none;
  -webkit-user-select: none;
}

#inst-lightbox-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  transition: background 0.15s ease;
}

#inst-lightbox-close:hover {
  background: rgba(255, 255, 255, 0.28);
}

/* Показываем лупу только на мобильных */
@media (max-width: 767px) {
  .inst-zoom-btn {
    display: flex;
  }

  .inst-image-wrap {
    cursor: zoom-in;
  }
}

.inst-image-phone {
  width: calc((100% - (var(--inst-text-offset) * 2)) * 0.7);
  max-width: calc((100% - (var(--inst-text-offset) * 2)) * 0.7);
}

p.inst-note {
  margin: 16px 0 0 var(--inst-text-offset);
  width: calc(100% - (var(--inst-text-offset) * 2));
  max-width: calc(100% - (var(--inst-text-offset) * 2));
  color: rgba(242, 245, 255, 0.74);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.45;
  box-sizing: border-box;
  overflow-wrap: anywhere;
  word-break: normal;
  white-space: normal !important;
  min-width: 0;
  max-width: 100%;
}

ol.inst-list.inst-list-block {
  margin: 25px 0 0 var(--inst-text-offset);
  width: calc(100% - (var(--inst-text-offset) * 2));
  max-width: calc(100% - (var(--inst-text-offset) * 2));
  box-sizing: border-box;
  min-width: 0;
}

ol.inst-list.inst-list-block li {
  max-width: 100%;
}

.inst-card:last-of-type {
  padding-bottom: var(--inst-text-offset);
}

@media (max-width: 1199px) {
  .inst-wrap {
    width: min(1140px, calc(100% - 48px));
  }

  .inst-content {
    width: 100%;
  }

  .inst-main {
    padding-top: 79px;
  }
}

@media (max-width: 991px) {
  .inst-wrap {
    width: min(721px, calc(100% - 48px));
  }

  .inst-hero {
    padding-top: 126px;
  }

  h1.inst-title {
    font-size: 40px;
  }

  p.inst-subtitle {
    font-size: 15px;
  }

  .inst-main {
    padding: 70px 0 84px;
  }

  .inst-main::before,
  .inst-main::after {
    width: 440px;
    height: 440px;
  }

  .inst-main::before {
    left: -250px;
    top: 420px;
  }

  .inst-main::after {
    right: -250px;
    top: 1220px;
  }

  .inst-step {
    margin-bottom: 30px;
  }

  h2.inst-step-title {
    font-size: 28px;
  }

  .inst-card-app-logo {
    right: -6%;
  }

  .inst-card-head > div {
    padding-right: 60px;
  }
}

@media (max-width: 767px) {
  .inst-wrap {
    width: min(480px, calc(100% - 48px));
  }

  h1.inst-title {
    font-size: 34px;
  }

  p.inst-subtitle {
    margin-top: 10px;
    font-size: 14px;
  }

  .inst-cable {
    width: min(432px, 100%);
    margin-bottom: -85px;
  }

  .inst-main {
    padding: 37px 0 72px;
  }

  .inst-main::before,
  .inst-main::after {
    display: none;
  }

  h2.inst-step-title {
    font-size: 24px;
    margin-bottom: 12px;
  }

  button.inst-pill {
    gap: 10px;
    min-height: 40px;
    padding: 9px 16px;
    font-size: 14px;
  }

  .inst-pill img {
    width: 13px;
    height: 13px;
  }

  button.inst-pill.inst-pill-wide-icon {
    min-height: 42px;
    padding: 10px 18px;
  }

  button.inst-pill.inst-pill-wide-icon img {
    width: 16px;
    height: 13px;
  }

  button.inst-pill.inst-pill-android img {
    width: 17px;
  }

  .inst-card {
    --inst-text-offset: 58px;
    margin-top: 14px;
    padding: 16px 16px 21px;
    border-radius: 16px;
  }

  .inst-card-head {
    gap: 12px;
  }

  .inst-card-icon {
    width: 46px;
    height: 46px;
    flex-basis: 46px;
  }

  .inst-card-icon img {
    width: 20px;
    height: 20px;
  }

  h3.inst-card-title {
    font-size: 20px;
  }

  p.inst-card-text,
  ol.inst-list,
  p.inst-note {
    font-size: 14px;
    line-height: 1.45;
  }

  .inst-download-btn {
    margin-top: 25px;
    min-height: 40px;
    padding: 9px 20px;
    font-size: 14px;
  }

  .inst-image-wrap {
    margin-top: 14px;
    width: calc(100% - var(--inst-text-offset));
    max-width: calc(100% - var(--inst-text-offset));
  }

  ol.inst-list {
    margin-top: 14px;
    margin-left: var(--inst-text-offset);
    width: calc(100% - var(--inst-text-offset));
    max-width: calc(100% - var(--inst-text-offset));
  }

  .inst-card-head + ol.inst-list {
    margin-top: 0;
  }

  .inst-image {
    border-radius: 16px;
  }

  .inst-card-app-logo {
    right: -20%;
    height: 100%;
    -webkit-mask-image: linear-gradient(to right,
                          rgba(0,0,0,0)    0%,
                          rgba(0,0,0,0.05) 10%,
                          rgba(0,0,0,0.15) 20%,
                          rgba(0,0,0,0.30) 30%,
                          rgba(0,0,0,0.50) 40%,
                          rgba(0,0,0,0.70) 50%,
                          rgba(0,0,0,0.88) 60%,
                          rgba(0,0,0,1)    70%
                        ),
                        linear-gradient(to bottom, transparent 0%, black 20%, black 80%, transparent 100%);
    -webkit-mask-composite: source-in;
    mask-image: linear-gradient(to right,
                  rgba(0,0,0,0)    0%,
                  rgba(0,0,0,0.05) 10%,
                  rgba(0,0,0,0.15) 20%,
                  rgba(0,0,0,0.30) 30%,
                  rgba(0,0,0,0.50) 40%,
                  rgba(0,0,0,0.70) 50%,
                  rgba(0,0,0,0.88) 60%,
                  rgba(0,0,0,1)    70%
                ),
                linear-gradient(to bottom, transparent 0%, black 20%, black 80%, transparent 100%);
    mask-composite: intersect;
  }

  .inst-card-head > div {
    padding-right: 30%;
  }
}

@media (max-width: 575px) {
  .inst-wrap {
    width: min(360px, calc(100% - 30px));
  }
}

@media (max-width: 767px) and (orientation: landscape) {
  .inst-cable {
    margin-bottom: -90px;
  }

  h2.inst-step-title {
    font-size: 24px;
  }

  .inst-card-app-logo {
    right: -6%;
    height: 110%;
    -webkit-mask-image: linear-gradient(to right,
      rgba(0,0,0,0)    0%,
      rgba(0,0,0,0.05) 10%,
      rgba(0,0,0,0.15) 20%,
      rgba(0,0,0,0.30) 30%,
      rgba(0,0,0,0.50) 40%,
      rgba(0,0,0,0.70) 50%,
      rgba(0,0,0,0.88) 60%,
      rgba(0,0,0,1)    70%
    );
    mask-image: linear-gradient(to right,
      rgba(0,0,0,0)    0%,
      rgba(0,0,0,0.05) 10%,
      rgba(0,0,0,0.15) 20%,
      rgba(0,0,0,0.30) 30%,
      rgba(0,0,0,0.50) 40%,
      rgba(0,0,0,0.70) 50%,
      rgba(0,0,0,0.88) 60%,
      rgba(0,0,0,1)    70%
    );
  }
}

/* ─────────────────────────────────────────────
   Анимация появления карточек
───────────────────────────────────────────── */
@keyframes inst-card-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.inst-card {
  animation: inst-card-in 0.22s ease both;
}

/* ─────────────────────────────────────────────
   Состояние «инструкция в разработке»
───────────────────────────────────────────── */
.inst-empty {
  margin-top: 18px;
  padding: 48px 28px;
  border-radius: 22px;
  background: #3b3b55;
  text-align: center;
  animation: inst-card-in 0.22s ease both;
}

.inst-empty-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}

.inst-empty-icon img {
  width: 40px;
  height: 40px;
  opacity: 0.55;
  filter: invert(1) brightness(2);
}

h3.inst-empty-title {
  margin: 0;
  color: #f8f9ff;
  font-size: 22px;
  font-weight: 600;
  line-height: 1.3;
}

p.inst-empty-text {
  margin: 10px auto 0;
  max-width: 480px;
  color: rgba(239, 242, 255, 0.60);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.5;
}

/* ─────────────────────────────────────────────
   Плавная смена контента
───────────────────────────────────────────── */
#inst-cards-mount {
  transition: opacity 0.12s ease;
}

/* ===== SHEET WIDTH SYNC ===== */
/* .inst-wrap подстраивается под nicepage .u-sheet широты на каждом брейкпоинте */

/* ===== HEADER STICKY FIX ===== */
/* Убираем анимацию fadeIn с nav-пунктов — она скрывает меню при загрузке/скролле */
.u-header .u-nav-1,
.u-header .u-nav-1 > .u-nav-item,
.u-header .u-nav-1 > .u-nav-item > a {
  opacity: 1 !important;
  visibility: visible !important;
  animation: none !important;
  transition: color 0.2s ease !important;
}
