/* «Почему RIGHTHALL», 03.11: слайдер снимков отделов вместо общего кадра.
   Прокрутка — родная (scroll-snap): свайп на телефоне без своей физики,
   стрелки и точки только сдвигают ленту. Автопрокрутки нет. */

.why--team .why-slider {
  grid-column: 1 / -1;
  min-width: 0;
  position: relative;
}

.why-slider__track {
  display: flex;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  border: 1px solid rgb(255 255 255 / .1);
  background: #121212;
}

.why-slider__track::-webkit-scrollbar {
  display: none;
}

.why-slider__track:focus-visible {
  outline: 1px solid var(--color-teal-500);
  outline-offset: 4px;
}

.why-slider__slide {
  flex: 0 0 100%;
  margin: 0;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  aspect-ratio: 3 / 2;
}

.why-slider__slide picture,
.why-slider__slide img {
  display: block;
  width: 100%;
  height: 100%;
}

.why-slider__slide img {
  object-fit: cover;
}

.why-slider__controls {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 18px;
}

.why-slider__nav {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  padding: 0;
  border: 1px solid rgb(255 255 255 / .18);
  background: transparent;
  color: var(--color-white);
  cursor: pointer;
  transition: background-color .2s, border-color .2s, opacity .2s;
}

.why-slider__nav:hover {
  border-color: var(--color-teal-500);
}

.why-slider__nav--solid {
  border-color: var(--color-teal-600);
  background: var(--color-teal-600);
}

.why-slider__nav--solid:hover {
  background: var(--color-teal-500);
}

.why-slider__nav[disabled] {
  opacity: .35;
  cursor: default;
}

.why-slider__dots {
  display: flex;
  flex: 1 1 auto;
  gap: 6px;
}

/* Точка — тонкая черта; область нажатия выше самой черты. */
.why-slider__dot {
  position: relative;
  width: 32px;
  height: 24px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}

.why-slider__dot::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 11px;
  height: 2px;
  background: rgb(255 255 255 / .22);
  transition: background-color .25s;
}

.why-slider__dot[aria-current="true"]::before {
  background: var(--color-teal-500);
}

.why-slider__count {
  font-size: 13px;
  letter-spacing: .08em;
  color: var(--color-teal-muted);
  white-space: nowrap;
}

.why-slider__count b {
  font-weight: 400;
  color: var(--color-white);
}

@media (prefers-reduced-motion: reduce) {
  .why-slider__track {
    scroll-behavior: auto;
  }
}

@media (max-width: 760px) {
  .why--team .why-slider {
    margin-inline: -20px;
  }

  .why-slider__track {
    border-inline: 0;
  }

  .why-slider__slide {
    aspect-ratio: 4 / 3;
  }

  .why-slider__controls {
    gap: 10px;
    margin-top: 14px;
    padding-inline: 20px;
  }

  .why-slider__nav {
    width: 44px;
    height: 44px;
  }

  .why-slider__dot {
    width: 20px;
  }

  .why-slider__count {
    display: none;
  }
}
