/**
 * Social Vision — горизонтальные карусели (соцсеть), не для лендинга
 */

:root {
  --nf-vp-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --nf-vp-duration: 0.38s;
  --nf-vp-tap: 0.2s;
  --nf-vp-glass: rgba(255, 255, 255, 0.05);
  --nf-vp-blur: 20px;
  --nf-vp-grad: linear-gradient(90deg, #00f0ff, #ff00f5, #ffd600);
  --nf-vp-glow: 0 0 20px rgba(0, 255, 255, 0.2);
  --nf-vp-r: clamp(20px, 4vw, 28px);
  --nf-vp-peek: min(78vw, 300px);
  --nf-vp-peek-sm: min(68vw, 260px);
}

@media (prefers-reduced-motion: reduce) {
  :root {
    --nf-vp-duration: 0.01ms;
    --nf-vp-tap: 0.01ms;
  }
}

.nf-vp-carousel {
  position: relative;
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  box-sizing: border-box;
  --nf-parallax-x: 0px;
}

.nf-vp-carousel__parallax {
  position: absolute;
  inset: -24px -20px -20px;
  border-radius: 999px;
  pointer-events: none;
  overflow: visible;
  z-index: 0;
  transform: translate3d(calc(var(--nf-parallax-x) * -0.12), 0, 0);
  transition: transform 0.1s linear;
  filter: blur(28px);
  opacity: 0.55;
}

.nf-vp-carousel__particles {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 14% 28%, rgba(0, 240, 255, 0.07) 0%, transparent 42%),
    radial-gradient(circle at 86% 22%, rgba(255, 0, 245, 0.06) 0%, transparent 40%),
    radial-gradient(circle at 52% 86%, rgba(255, 214, 0, 0.05) 0%, transparent 45%);
  animation: nf-vp-float 12s ease-in-out infinite alternate;
}

@keyframes nf-vp-float {
  from {
    opacity: 0.85;
  }
  to {
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .nf-vp-carousel__particles {
    animation: none;
  }
}

.nf-vp-carousel__viewport {
  position: relative;
  z-index: 2;
  overflow: visible;
}

/* Кружки: без отдельного «окна» — мягкое затухание краёв только на треке */
.nf-vp-carousel--circles {
  overflow: visible;
}

.nf-vp-carousel--circles .nf-vp-carousel__viewport {
  overflow: visible;
}

.nf-vp-carousel__fade {
  position: absolute;
  top: -4px;
  bottom: -4px;
  width: min(72px, 20vw);
  z-index: 4;
  pointer-events: none;
  opacity: 1;
}

.nf-vp-carousel__fade--left {
  left: 0;
  background: linear-gradient(90deg, rgba(8, 8, 8, 0.97) 0%, rgba(8, 8, 8, 0.45) 50%, transparent 100%);
}

.nf-vp-carousel__fade--right {
  right: 0;
  background: linear-gradient(270deg, rgba(8, 8, 8, 0.97) 0%, rgba(8, 8, 8, 0.45) 50%, transparent 100%);
}

.nf-vp-carousel__track {
  display: flex;
  flex-wrap: nowrap;
  gap: 12px;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: max(11vw, 32px);
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 8px 2px 12px;
  position: relative;
  z-index: 1;
}

.nf-vp-carousel__track::-webkit-scrollbar {
  display: none;
}

@media (max-width: 900px) {
  .nf-vp-carousel__slide {
    flex: 0 0 var(--nf-vp-peek);
    scroll-snap-align: center;
    transform: scale(0.9);
    filter: blur(3px) brightness(0.7);
    transition: transform var(--nf-vp-duration) var(--nf-vp-ease),
      filter var(--nf-vp-duration) var(--nf-vp-ease),
      box-shadow var(--nf-vp-duration) var(--nf-vp-ease);
    will-change: transform, filter;
  }

  .nf-vp-carousel__slide.is-active {
    transform: scale(1);
    filter: blur(0) brightness(1.1);
    z-index: 3;
    box-shadow: var(--nf-vp-glow), 0 14px 40px rgba(0, 0, 0, 0.32);
  }

  .nf-vp-carousel--circles .nf-vp-carousel__track {
    -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 6%, #000 94%, transparent 100%);
    mask-image: linear-gradient(90deg, transparent 0%, #000 6%, #000 94%, transparent 100%);
    -webkit-mask-size: 100% 100%;
    mask-size: 100% 100%;
    padding-top: 6px;
    padding-bottom: 10px;
  }

  .nf-vp-carousel--circles .nf-vp-carousel__slide.cp-circle-item {
    flex: 0 0 min(46vw, 200px);
    flex-direction: column;
    align-items: center;
    padding: 12px 10px 14px;
    box-sizing: border-box;
    border-radius: var(--nf-vp-r);
    background: var(--nf-vp-glass);
    -webkit-backdrop-filter: blur(16px) saturate(1.12);
    backdrop-filter: blur(16px) saturate(1.12);
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    text-decoration: none;
    color: inherit;
  }

  .nf-vp-carousel--circles .cp-circle-item {
    transform: none !important;
  }

  .nf-vp-carousel--circles .cp-circle-avatar {
    width: 100%;
    max-width: 118px;
    height: 62px;
    border-radius: 16px;
  }

  .nf-vp-carousel--circles .cp-circle-name {
    max-width: 100%;
    text-align: center;
    font-size: 11px;
    margin-top: 6px;
  }

  .nf-vp-carousel--circles .nf-vp-carousel__slide.is-active {
    border-color: rgba(0, 240, 255, 0.38);
  }

  .nf-vp-carousel--circles .nf-vp-carousel__slide.is-active::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1.5px;
    background: var(--nf-vp-grad);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    opacity: 0.72;
  }

  .nf-vp-carousel--folders .nf-vp-carousel__slide.ig-feed-folder-pill {
    flex: 0 0 var(--nf-vp-peek-sm);
    scroll-snap-align: center;
  }

  .nf-vp-carousel--tabs .nf-vp-carousel__slide.tab {
    flex: 0 0 min(42vw, 200px);
    scroll-snap-align: center;
  }
}

@media (min-width: 901px) {
  .nf-vp-carousel__slide {
    flex: 0 0 auto;
    scroll-snap-align: start;
    transform: none;
    filter: none;
  }

  .nf-vp-carousel__dots,
  .nf-vp-carousel__arrow {
    display: none !important;
  }

  .nf-vp-carousel__fade {
    opacity: 0.1;
  }
}

.nf-vp-carousel__dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 2px 0 6px;
  position: relative;
  z-index: 3;
}

.nf-vp-carousel__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.22);
  cursor: pointer;
  padding: 0;
  transition: transform var(--nf-vp-tap) var(--nf-vp-ease), box-shadow var(--nf-vp-tap) var(--nf-vp-ease);
}

.nf-vp-carousel__dot.is-active {
  transform: scale(1.4);
  background: rgba(0, 240, 255, 0.95);
  box-shadow: 0 0 14px rgba(0, 240, 255, 0.6), 0 0 24px rgba(255, 0, 245, 0.2);
}

.nf-vp-carousel__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(8, 10, 14, 0.42);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--nf-vp-tap) var(--nf-vp-ease);
  padding: 0;
}

.nf-vp-carousel:hover .nf-vp-carousel__arrow,
.nf-vp-carousel.nf-vp-touch .nf-vp-carousel__arrow,
.nf-vp-carousel:focus-within .nf-vp-carousel__arrow {
  opacity: 0.3;
}

.nf-vp-carousel__arrow:hover {
  opacity: 0.5 !important;
}

.nf-vp-carousel__arrow--prev {
  left: 0;
}

.nf-vp-carousel__arrow--next {
  right: 0;
}

@media (max-width: 768px) {
  .ig-feed-shell.cp-feed--stories-mode {
    grid-template-columns: 1fr !important;
    max-width: min(100%, 420px);
    margin-left: auto;
    margin-right: auto;
  }

  .ig-feed-shell.cp-feed--stories-mode .ig-post-img {
    aspect-ratio: 9 / 16;
    max-height: min(70vh, 560px);
  }
}

/* ── Hero: свайп «Обо мне» / крипто / соцсети ── */
.nf-vp-carousel--hero {
  margin: 0 auto;
  max-width: min(100%, 920px);
}

.nf-vp-carousel--hero .nf-vp-carousel__track {
  /* Не тянуть все слайды по высоте самого высокого — иначе блоки выглядят «квадратными» */
  align-items: flex-start;
}

@media (max-width: 900px) {
  .nf-vp-carousel--hero .nf-vp-carousel__track {
    -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 5%, #000 95%, transparent 100%);
    mask-image: linear-gradient(90deg, transparent 0%, #000 5%, #000 95%, transparent 100%);
    padding-top: 4px;
    padding-bottom: 8px;
  }

  /* Широкая горизонтальная карточка, как основной hero — без scale/blur от режима «кружков» */
  .nf-vp-carousel--hero .nf-vp-carousel__slide {
    flex: 0 0 min(calc(100vw - 28px), 920px);
    width: min(calc(100vw - 28px), 920px);
    max-width: 100%;
    scroll-snap-align: center;
    transform: none;
    filter: none;
    box-shadow: none;
  }

  .nf-vp-carousel--hero .nf-vp-carousel__slide.is-active {
    transform: none;
    filter: none;
    box-shadow: none;
  }
}

@media (min-width: 901px) {
  .nf-vp-carousel--hero .nf-vp-carousel__slide {
    flex: 0 0 min(100%, 900px);
    max-width: 900px;
    scroll-snap-align: start;
  }
}

.nf-vp-carousel--hero .cp-hero-bar {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  margin: 0;
  align-self: flex-start;
}

.cp-hero-slide {
  box-sizing: border-box;
  width: 100%;
  align-self: flex-start;
}

.cp-hero-slide-inner {
  min-height: 0;
  padding: 18px 20px 20px;
  border-radius: var(--nf-vp-r);
  background: rgba(255, 255, 255, 0.06);
  -webkit-backdrop-filter: blur(20px) saturate(1.15);
  backdrop-filter: blur(20px) saturate(1.15);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 0 0 1px rgba(0, 240, 255, 0.07) inset, 0 14px 50px rgba(0, 0, 0, 0.35);
  position: relative;
}

.cp-hero-slide-inner::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1.5px;
  background: var(--nf-vp-grad);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  opacity: 0.5;
}

.cp-hero-slide-title {
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(200, 210, 220, 0.75);
  font-weight: 700;
  margin-bottom: 14px;
  position: relative;
  z-index: 1;
}

.cp-crypto-rows {
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
  z-index: 1;
}

.cp-crypto-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.cp-hero-slide-inner--crypto .cp-crypto-row {
  justify-content: space-between;
  align-items: center;
}

.cp-hero-slide-inner--crypto .cp-crypto-val {
  font-size: clamp(16px, 4vw, 20px);
}

.cp-crypto-lbl {
  font-size: 12px;
  font-weight: 800;
  color: #9ad8de;
  letter-spacing: 0.06em;
}

.cp-crypto-val {
  font-size: 15px;
  font-weight: 800;
  color: #f4f8ff;
  font-variant-numeric: tabular-nums;
}

.cp-crypto-val--shev {
  color: #ff9cd6;
  text-shadow: 0 0 18px rgba(255, 102, 208, 0.25);
}

.cp-hero-slide-hint {
  font-size: 11px;
  color: #8b92a4;
  line-height: 1.45;
  margin: 12px 0 0;
  position: relative;
  z-index: 1;
}

.cp-social-slide-inner {
  position: relative;
  z-index: 0;
}

.cp-social-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px;
  position: relative;
  z-index: 1;
}

.cp-social-pill {
  position: relative;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  min-height: 0;
  padding: 12px 14px;
  border-radius: 18px;
  text-decoration: none;
  color: #f4f6fb;
  background: rgba(22, 24, 34, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.14);
  overflow: hidden;
  transition: transform 0.2s var(--nf-vp-ease);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}

.cp-social-pill:active {
  transform: scale(1.05);
}

.cp-social-pill-glow {
  position: absolute;
  inset: -35%;
  opacity: 0.5;
  filter: blur(30px);
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
}

.cp-social-pill--tg .cp-social-pill-glow {
  background: radial-gradient(circle, rgba(0, 210, 255, 0.95), transparent 62%);
}

.cp-social-pill--yt .cp-social-pill-glow {
  background: radial-gradient(circle, rgba(255, 50, 50, 0.95), transparent 60%);
}

.cp-social-pill--ig .cp-social-pill-glow {
  background: radial-gradient(circle, rgba(255, 90, 200, 0.88), transparent 58%);
}

.cp-social-pill--vk .cp-social-pill-glow {
  background: radial-gradient(circle, rgba(0, 120, 255, 0.92), transparent 58%);
}

.cp-social-pill--tt .cp-social-pill-glow {
  background: radial-gradient(circle, rgba(0, 245, 240, 0.8), transparent 58%);
}

.cp-social-pill--web .cp-social-pill-glow {
  background: radial-gradient(circle, rgba(110, 180, 255, 0.88), transparent 58%);
}

.cp-social-pill-ico {
  position: relative;
  z-index: 1;
  font-size: 22px;
  font-weight: 800;
  line-height: 1;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.5);
}

.cp-social-pill--vk .cp-social-pill-ico {
  font-size: 16px;
  letter-spacing: 0.04em;
  text-transform: lowercase;
}

.cp-social-pill-txt {
  position: relative;
  z-index: 1;
  flex: 1;
  min-width: 0;
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  opacity: 0.92;
}
