/* NB Dashboard ambient / celebrate FX */
.nb-dash-celebrate {
  position: fixed;
  inset: 0;
  z-index: 100050;
  pointer-events: none;
  display: grid;
  place-items: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity .25s ease, visibility .25s ease;
}
.nb-dash-celebrate.is-on {
  opacity: 1;
  visibility: visible;
}
.nb-dash-celebrate__video {
  width: min(72vw, 520px);
  height: min(72vw, 520px);
  object-fit: cover;
  mix-blend-mode: screen;
  filter: saturate(1.05);
}
.nb-dash-fx-banner {
  position: absolute;
  inset: 0 0 auto;
  height: 140px;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
  opacity: .34;
  -webkit-mask-image: linear-gradient(180deg, #000 10%, transparent 92%);
  mask-image: linear-gradient(180deg, #000 10%, transparent 92%);
  mix-blend-mode: screen;
}
.nb-dash-fx-banner video,
.nb-dash-fx-banner img {
  width: 112%;
  height: 112%;
  margin: -6%;
  object-fit: cover;
  display: block;
}
.nb-dash-fx-banner video {
  opacity: 0;
  transition: opacity .5s ease;
}
.nb-dash-fx-banner.is-playing video {
  opacity: 1;
}

/* === Витрина услуг: карточка строится вокруг ролика ===
   Слева текст, справа чёрная сцена с роликом. Цвета берём из переменных темы кабинета (--nb-sk-*). */
#nb-dashboard-wrapper .nb-services-market .nb-services-rail.nb-services-rail--list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

#nb-dashboard-wrapper .nb-services-market .nb-service-card--showcase {
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(300px, 40%, 480px);
  min-height: 360px;
  height: auto;
  padding: 0;
  transition: border-color .2s ease;
}
#nb-dashboard-wrapper .nb-services-market .nb-service-card--showcase:hover {
  transform: none;
  border-color: var(--nb-sk-gold, #d4b06a) !important;
}
/* Подписка — главный товар витрины: золотая кромка всегда. */
#nb-dashboard-wrapper .nb-services-market .nb-service-card--showcase.nb-service-card--subscription {
  border-color: rgba(212, 176, 106, .5) !important;
  border-color: color-mix(in srgb, var(--nb-sk-gold, #d4b06a) 55%, transparent) !important;
}
#nb-dashboard-wrapper .nb-services-market .nb-service-card--showcase.nb-service-card--subscription:hover {
  border-color: var(--nb-sk-gold, #d4b06a) !important;
}

/* Сцена */
#nb-dashboard-wrapper .nb-services-market .nb-service-card--showcase .nb-service-card__media {
  position: relative;
  grid-column: 2;
  grid-row: 1;
  overflow: hidden;
  background: #000;
  /* со стороны текста сцена растворяется в фоне карточки */
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 26%);
  mask-image: linear-gradient(90deg, transparent 0%, #000 26%);
}
#nb-dashboard-wrapper .nb-services-market .nb-service-card__media .nb-fx-stage--svc {
  position: absolute;
  inset: 0;
  overflow: hidden;
}
#nb-dashboard-wrapper .nb-services-market .nb-fx-stage--svc .nb-fx-video,
#nb-dashboard-wrapper .nb-services-market .nb-fx-stage--svc .nb-fx-poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform .9s cubic-bezier(.22, 1, .36, 1), opacity .55s ease;
}
#nb-dashboard-wrapper .nb-services-market .nb-fx-stage--svc .nb-fx-video {
  z-index: 0;
}
#nb-dashboard-wrapper .nb-services-market .nb-fx-stage--svc .nb-fx-poster {
  z-index: 1;
  pointer-events: none;
}
#nb-dashboard-wrapper .nb-services-market .nb-fx-stage--svc.is-playing .nb-fx-poster,
#nb-dashboard-wrapper .nb-services-market .nb-fx-stage--svc.is-playing .nb-fx-poster {
  opacity: 0;
  visibility: hidden;
}
#nb-dashboard-wrapper .nb-services-market .nb-service-card--showcase:hover .nb-fx-video,
#nb-dashboard-wrapper .nb-services-market .nb-service-card--showcase:hover .nb-fx-poster {
  transform: scale(1.05);
}
/* Услуга без ролика: на сцене крупная иконка. */
#nb-dashboard-wrapper .nb-services-market .nb-service-card__media-glyph {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 104px;
  color: #d4b06a;
  opacity: .9;
}

/* Текст */
#nb-dashboard-wrapper .nb-services-market .nb-service-card--showcase .nb-card-content {
  grid-column: 1;
  grid-row: 1;
  justify-content: center;
  gap: 16px;
  min-width: 0;
  padding: 30px 14px 30px 34px;
}
#nb-dashboard-wrapper .nb-services-market .nb-service-card--showcase .nb-service-card__top {
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
}
#nb-dashboard-wrapper .nb-services-market .nb-service-card--showcase .nb-service-card__cat {
  font-size: 11px;
  letter-spacing: .14em;
  color: var(--nb-sk-gold, #d4b06a);
}
#nb-dashboard-wrapper .nb-services-market .nb-service-card--showcase .nb-service-card__body {
  flex: 0 1 auto;
  gap: 12px;
}
#nb-dashboard-wrapper .nb-services-market .nb-service-card--showcase .nb-prod-title {
  display: block;
  min-height: 0;
  overflow: visible;
  font-size: clamp(22px, 2.1vw, 30px);
  line-height: 1.12;
  letter-spacing: -.01em;
  color: var(--nb-sk-text, #f4f0e8);
}
#nb-dashboard-wrapper .nb-services-market .nb-service-card--showcase .nb-service-card__desc {
  margin: 0;
  max-width: 64ch;
  font-size: 14px;
  line-height: 1.55;
  color: var(--nb-sk-nav, #ddd6c8);
}
#nb-dashboard-wrapper .nb-services-market .nb-service-card--showcase .nb-service-perks--card {
  margin: 4px 0 0;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px 24px;
}
#nb-dashboard-wrapper .nb-services-market .nb-service-card--showcase .nb-service-perks--card li {
  gap: 8px;
  font-size: 13px;
  line-height: 1.4;
  color: var(--nb-sk-text, #f4f0e8);
}
#nb-dashboard-wrapper .nb-services-market .nb-service-card--showcase .nb-service-perks--card .material-symbols-outlined {
  font-size: 17px;
  color: var(--nb-sk-gold, #d4b06a);
}

/* Цена и кнопка */
#nb-dashboard-wrapper .nb-services-market .nb-service-card--showcase .nb-service-card__foot {
  margin-top: 4px;
  padding-top: 18px;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px 24px;
  border-top: 1px solid var(--nb-sk-line, #2c2c2c);
}
#nb-dashboard-wrapper .nb-services-market .nb-service-card--showcase .nb-service-card__price {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
#nb-dashboard-wrapper .nb-services-market .nb-service-card--showcase .nb-prod-price {
  font-size: 24px;
  color: var(--nb-sk-gold-2, #f0d7a2);
}
#nb-dashboard-wrapper .nb-services-market .nb-service-card--showcase .nb-service-card__price-note {
  font-size: 12px;
  line-height: 1.35;
  color: var(--nb-sk-mute, #8d877c);
}
#nb-dashboard-wrapper .nb-services-market .nb-service-card--showcase .nb-service-more-btn {
  width: auto;
  min-width: 200px;
  min-height: 46px;
  padding: 10px 28px;
  border-radius: 12px;
  border-color: var(--nb-sk-gold, #d4b06a);
  background: var(--nb-sk-gold, #d4b06a);
  color: #141414;
  font-size: 14px;
}
#nb-dashboard-wrapper .nb-services-market .nb-service-card--showcase .nb-service-more-btn:hover {
  border-color: var(--nb-sk-gold, #d4b06a);
  background: var(--nb-sk-gold, #d4b06a);
  color: #141414;
  box-shadow: none;
  filter: brightness(1.08);
}

/* Светлая тема: чёрная сцена не растворяется в светлой карточке, а стоит в ней окном. */
html[data-theme="light"] #nb-dashboard-wrapper .nb-services-market .nb-service-card--showcase .nb-service-card__media {
  margin: 14px 14px 14px 0;
  border-radius: 12px;
  -webkit-mask-image: none;
  mask-image: none;
}

/* Узкая колонка текста — плюсы в один столбец. */
@media (max-width: 1320px) {
  #nb-dashboard-wrapper .nb-services-market .nb-service-card--showcase .nb-service-perks--card {
    grid-template-columns: 1fr;
  }
}

/* Телефон и узкий планшет: сцена сверху, текст под ней. */
@media (max-width: 860px) {
  #nb-dashboard-wrapper .nb-services-market .nb-service-card--showcase {
    grid-template-columns: minmax(0, 1fr);
    min-height: 0;
  }
  #nb-dashboard-wrapper .nb-services-market .nb-service-card--showcase .nb-service-card__media {
    grid-column: 1;
    grid-row: 1;
    aspect-ratio: 16 / 11;
    -webkit-mask-image: linear-gradient(180deg, #000 62%, transparent 100%);
    mask-image: linear-gradient(180deg, #000 62%, transparent 100%);
  }
  #nb-dashboard-wrapper .nb-services-market .nb-service-card--showcase .nb-card-content {
    grid-column: 1;
    grid-row: 2;
    padding: 6px 20px 22px;
  }
  #nb-dashboard-wrapper .nb-services-market .nb-service-card--showcase .nb-service-perks--card {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  #nb-dashboard-wrapper .nb-services-market .nb-service-card--showcase .nb-service-more-btn {
    flex: 1 1 200px;
  }
  html[data-theme="light"] #nb-dashboard-wrapper .nb-services-market .nb-service-card--showcase .nb-service-card__media {
    margin: 14px 14px 8px;
  }
}
@media (max-width: 560px) {
  #nb-dashboard-wrapper .nb-services-market .nb-service-card--showcase .nb-service-perks--card {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .nb-dash-celebrate,
  .nb-dash-fx-banner video,
  #nb-dashboard-wrapper .nb-services-market .nb-fx-stage--svc .nb-fx-video {
    display: none !important;
  }
  #nb-dashboard-wrapper .nb-services-market .nb-fx-stage--svc .nb-fx-poster {
    opacity: 1 !important;
    transition: none;
  }
  #nb-dashboard-wrapper .nb-services-market .nb-service-card--showcase:hover .nb-fx-poster {
    transform: none;
  }
}
