:root {
  --exchange-container-max-width: 1341px;
  --exchange-card-color: #0f0f0f;
  /* в чистом css нельзя подставить переменные в медиа запросы, но пусть будут тут для инфо */
  --exchange-breakpoint-xl: 1399px;
  --exchange-breakpoint-md: 768px;
}

/* common */
html {
  scroll-behavior: smooth;
}

.exchange-body {
  background: #000;
}
.exchange-container {
  max-width: var(--exchange-container-max-width);
  margin: 0 auto;
  padding: 0 12px;
  overflow: hidden;
}
.exchange-mt-110 {
  margin-top: 110px;
  @media screen and (max-width: 1399px) {
    margin-top: 90px;
  }
}
.exchange-mt-180 {
  margin-top: 180px;
  @media screen and (max-width: 1399px) {
    margin-top: 90px;
  }
}
.exchange-section-title {
  font-weight: 700;
  font-size: 48px;
  color: #fff;


  @media screen and (max-width: 768px) {
    font-size: 19px;
  }
}
.exchange-gradient-title {
  font-weight: 600;
  font-size: 64px;
  background: linear-gradient(180deg, #396bf3 0%, #fff 74.48%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;

  @media screen and (max-width: 768px) {
    font-size: 32px;
  }
}

/* primary buttons */
.exchange-primary-btn {
  border-radius: 60px;
  padding: 18px 24px;
  font-weight: 600;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 199px;
  color: #fff !important;
}
.exchange-primary-btn:hover {
  color: #fff !important;
}
.exchange-primary-btn_blue {
  box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.25);
  background: #396bf3;
}
.exchange-primary-btn_pink {
  background: rgba(181, 0, 143, 0.98);
}

/* secondary buttons */
.exchange-secondary-btn {
  border-radius: 60px;
  padding: 21px 35px 23px;
  font-weight: 600;
  font-size: 16px;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
}
.exchange-secondary-btn_white {
  background: #fff;
  color: #232323;
}
.exchange-secondary-btn_white:hover {
  color: #232323 !important;
}
.exchange-secondary-btn_transparent {
  border: 2px solid #fff;
  background: rgba(152, 189, 255, 0.04);
  color: #fff;
}
.exchange-secondary-btn_transparent:hover {
  color: #fff !important;
}

/* hero section */
.exchange-hero-wrapper {
  background-image: url(../img/hero-bg.webp);
  background-repeat: no-repeat;
  background-position: center 105px;
  background-size: contain;
}

.exchange-hero-block {
  display: flex;

  @media screen and (max-width: 1399px) {
    flex-direction: column;
  }
}
.exchange-hero-block__col {
  width: 50%;

  @media screen and (max-width: 1399px) {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
  }
}
.vertical-line {
  @media screen and (max-width: 1399px) {
    display: none;
  }
}
.exchange-h1 {
  margin-top: 217px;
  text-transform: uppercase;
  text-wrap: balance;
  font-weight: 800;
  font-size: 60px;

  @media screen and (max-width: 1399px) {
    margin-top: 90px;
    text-align: center;
  }

  @media screen and (max-width: 768px) {
    font-size: 48px;
  }
}
.exchange-hero-block__buttons {
  margin-top: 74px;
  display: flex;
  column-gap: 36px;
  row-gap: 20px;

  @media screen and (max-width: 768px) {
    flex-direction: column;
  }
}

/* hero-cards */
.exchange-hero-cards {
  display: flex;
  flex-direction: row-reverse; /* чтобы смещались влево */
  column-gap: 61px;

  @media screen and (max-width: 1399px) {
    justify-content: center;
  }

  @media screen and (max-width: 768px) {
    flex-direction: column-reverse;
    row-gap: 32px;
    align-items: center;
    width: 100%;
  }
}
.exchange-hero-cards__item {
  border-radius: 20px;
  padding: 37px 25px 29px 26px;
  width: 121px;
  height: 407px;
  background-color: #000;
  overflow: hidden;
  cursor: pointer;

  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  row-gap: 93px;
  flex-shrink: 0;

  background-size: cover;
  transition: all 0.4s ease;
  position: relative;

  &:nth-child(1) {
    background-image: url(../img/hero-card-3.webp);
  }
  &:nth-child(2) {
    background-image: url(../img/hero-card-2.webp);
  }
  &:nth-child(3) {
    background-image: url(../img/hero-card-1.webp);
  }
}
.exchange-hero-cards__item__icon {
  flex-shrink: 0;
}
 /* вертикальный текст (по умолчанию видимый) */
.exchange-hero-cards__item__text--vertical {
  font-weight: 700;
  font-size: 24px;
  line-height: 189%;
  color: #fff;
  text-wrap: nowrap;
  writing-mode: vertical-rl;
  transform: rotate(-180deg);
  transition: all 0.7s ease;

  opacity: 1;
  position: absolute;
  bottom: 10px;
  left: 13px;
}
/* горизонтальный текст (по умолчанию скрыт) */
.exchange-hero-cards__item__text--horizontal {
  font-weight: 700;
  font-size: 24px;
  line-height: 189%;
  color: #fff;
  text-wrap: nowrap;
  opacity: 0;
  transform: translateX(20px);
  transition: all 0.5s ease;
}
/* по умолчанию первая развернута */
.exchange-hero-cards__item:last-child {
  width: 366px;
}
.exchange-hero-cards__item:last-child .exchange-hero-cards__item__text--vertical {
  opacity: 0;
  transform: rotate(-180deg) translateX(100px);
}
.exchange-hero-cards__item:last-child .exchange-hero-cards__item__text--horizontal {
  opacity: 1;
  transform: translateX(0);
}
/* при ховере любая карточка раскрывается */
.exchange-hero-cards__item:hover {
  width: 366px;
}
.exchange-hero-cards__item:hover .exchange-hero-cards__item__text--vertical {
  opacity: 0;
  transform: rotate(-180deg) translateX(100px);
}
.exchange-hero-cards__item:hover .exchange-hero-cards__item__text--horizontal {
  opacity: 1;
  transform: translateX(0);
}
/* остальные сжимаются */
/* когда хотя бы одна карточка в ховере */
.exchange-hero-cards:has(.exchange-hero-cards__item:hover) 
  .exchange-hero-cards__item:not(:hover) {
  width: 121px;
}
.exchange-hero-cards:has(.exchange-hero-cards__item:hover) 
  .exchange-hero-cards__item:not(:hover) .exchange-hero-cards__item__text--vertical {
  opacity: 1;
  transform: rotate(-180deg);
}
.exchange-hero-cards:has(.exchange-hero-cards__item:hover) 
  .exchange-hero-cards__item:not(:hover) .exchange-hero-cards__item__text--horizontal {
  opacity: 0;
  transform: translateX(20px);
}
/* все развернуто на мобилках */
@media screen and (max-width: 768px) {
  .exchange-hero-cards__item {
    width: 100% !important;

    flex-direction: row;
    column-gap: 20px;
    height: auto;
    padding: 20px;
  }
  .exchange-hero-cards__item .exchange-hero-cards__item__text--vertical {
    opacity: 0 !important;
  }
  .exchange-hero-cards__item .exchange-hero-cards__item__text--horizontal {
    opacity: 1 !important;
    transform: translateX(0) !important;
    text-wrap: balance;
  }

  .exchange-hero-cards__item__text--horizontal br {
    display: none;
  }
}

/* features section */
.exchange-features {
  display: flex;
  flex-direction: column;
  row-gap: 50px;
}
.exchange-features__title {
  text-align: center;
  text-wrap: balance;
}
.exchange-features__cards {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 25px;
}
.exchange-features__card {
  width: 310px;
  margin: 0;
}
.exchange-features__card__img {}
.exchange-features__card__text {
  font-weight: 600;
  font-size: 28px;
  text-align: center;
  color: #fff;
}

/* management section */
.exchange-management {
  margin-top: 253px;
  display: flex;
  gap: 25px;

  @media screen and (max-width: 1399px) {
    flex-direction: column;
  }
}
.exchange-management__column-group {
  display: flex;
  flex-direction: column;
  gap: 25px;
  flex: 1;
}
.exchange-management__card {
  flex: 1;
  padding: 63px;
  background: var(--exchange-card-color);
  border-radius: 25px;

  @media screen and (max-width: 768px) {
    padding: 40px;
  }
}
.exchange-management__card_top {
  display: flex;
  column-gap: 32px;
  justify-content: space-between;
}
.exchange-management__card_title {
  line-height: 140%;
}
.exchange-management__card_icon {
  flex-shrink: 0;
}
.exchange-management__card_description {
  margin-top: 40px;
  font-weight: 500;
  font-size: 24px;
  line-height: 154%;
  color: #efefef;

  @media screen and (max-width: 768px) {
    font-size: 16px;
    margin-top: 20px;
  }

}

/* tools section */
.exchange-tools {
  position: relative;
  
  margin-top: 253px;
  background-image: url(../img/tools-bg.webp);
  background-repeat: no-repeat;
  background-position: 200px 50px;
  background-size: contain;

  display: flex;
  align-items: center;
  justify-content: space-between;

  @media screen and (max-width: 1399px) {
    flex-direction: column;
    row-gap: 50px;
  }
}
.exchange-tools__title {
  max-width: 590px;
  line-height: normal;
  text-transform: math-auto;
  @media screen and (max-width: 1399px) {
    text-align: center;
  }
}
.exchange-tools__slider {
  padding: 0 56px;
  height: 525px;
  overflow-y: auto;

  scroll-snap-type: y mandatory;
  scroll-behavior: smooth;
  pointer-events: none;
  
  /* Firefox */
  scrollbar-width: thin;
  scrollbar-color: #3c83ff transparent;

  @media screen and (max-width: 768px) {
    width: 100%;
    padding: 0 20px;
    height: 527px;
  }


}
/* WebKit */
.exchange-tools__slider::-webkit-scrollbar {
  width: 6px;
}

.exchange-tools__slider::-webkit-scrollbar-track {
  background: transparent;
  border: 1px solid #32528b;
  border-radius: 20px;
}

.exchange-tools__slider::-webkit-scrollbar-thumb {
  background-color: #3c83ff;
  border-radius: 20px;
  border: 1px solid #32528b;
}
.exchange-tools__slider::-webkit-scrollbar-button {
  display: none;
  width: 0;
  height: 0;
}
.exchange-tools__card {
  width: 536px;
  min-height: 525px;
  padding: 52px 23px;
  border-radius: 20px;
  background: var(--exchange-card-color);
  scroll-snap-align: start;
  margin-bottom: 20px;
  croll-snap-align: start;
  scroll-snap-stop: always;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;


  @media screen and (max-width: 768px) {
    width: 100%;
    height: 430px;
  }
}
.exchange-tools__card:last-child {
  margin-bottom: 0;
}
.exchange-tools__card__icon {
  margin-bottom: 50px;
  @media screen and (max-width: 768px) {
    width: 53%;
    height: auto;
    margin-bottom: 30px;
  }

}
.exchange-tools__card__title {
  font-weight: 600;
  font-size: 32px;
  text-align: center;
  color: #fff;
  margin-bottom: 25px;

  @media screen and (max-width: 768px) {
    font-size: 25px;
  }

}
.exchange-tools__card__description {
  font-weight: 400;
  font-size: 22px;
  text-align: center;
  color: #fff;
  @media screen and (max-width: 768px) {
    font-size: 18px;
  }
}

/* operations section */
.exchange-operations {
  margin-top: 330px;

  display: flex;
  flex-direction: column;
  row-gap: 25px;
}
.exchange-operations__card {
  border-radius: 20px;
  background: var(--exchange-card-color);
  padding: 79px 63px;
  min-height: 525px;

  flex: 1;
  
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;

  @media screen and (max-width: 768px) {
    flex-direction: column;
    padding: 40px;
    min-height: auto;
  }
}
.exchange-operations__card__col {
  width: 100%;
  display: flex;
  flex-direction: column;

  text-align: center;
}
.exchange-operations__card__suptitle {
  font-weight: 500;
  font-size: 22px;
  text-align: center;
  color: #396bf3;
  margin-bottom: 11px;
}
.exchange-operations__card__title {
  font-weight: 600;
  text-align: center;
  margin-bottom: 33px;
  text-transform: math-auto;
}
.exchange-operations__card__description {
  font-weight: 400;
  font-size: 20px;
  text-align: center;
  color: #fff;
}
.exchange-operations__card__image {
  border: 1px solid #000;
  border-radius: 5px;
  overflow: hidden;

  max-width: 638px;
  width: 100%;
  height: auto;
}
.exchange-operations__row {
  display: flex;
  gap: 25px;

  @media screen and (max-width: 768px) {
    flex-direction: column;
  }
}

/* highlight section */
.exchange-highlight {
  position: relative;
  height: 100vh;

  @media screen and (max-width: 768px) {
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex-wrap: nowrap;
  }

}
.exchange-highlight__wrapper {
  position: sticky;
  top: 50%;
  transform: translateY(-50%);
  margin: 0 auto;

  @media screen and (max-width: 768px) {
    position: relative;
    top: 0;
    transform: none;
  }

}
.exchange-highlight__text {
  line-height: 150%;
  color: #272727;
  transition: color 0.3s linear;

  @media screen and (max-width: 768px) {
    font-size: 27px !important;
  }


}
.exchange-highlight__text span.active {
  color: #fff;
}
.exchange-highlight__text .space {
  //white-space: pre;
}





/* assist section */
.exchange-assist {
  position: relative;
  
  display: flex;
  align-items: center;
  gap: 25px;

  @media screen and (max-width: 768px) {
    flex-direction: column;
  }
}
.exchange-assist__title {
  line-height: 150%;
  text-transform: math-auto;
  @media screen and (max-width: 768px) {
    text-align: center;
  }
}
.exchange-assist__image {
  display: flex;
  max-width: 364px;
  width: 100%;
  height: auto;

  @media screen and (max-width: 768px) {
    position: absolute;
    top: 50%;
    left: 75%;
    transform: translate(-50%, -50%);
    max-width: 280px;
  }
}

/* cta section */
.exchange-cta {
  border-radius: 20px;
  background-color: #396bf3;
  padding: 55px 77px;

  background-image: url(../img/cta-bg.webp);
  background-repeat: no-repeat;
  background-position: right bottom;
  background-size: 301px 370px;

  @media screen and (max-width: 768px) {
    padding: 40px 20px;
    background-size: 150px 185px;
  }
}
.exchange-cta__title {
  font-weight: 800;
  font-size: 40px;
  color: #fff;
  margin-right: 15%;
  margin-bottom: 27px;

  @media screen and (max-width: 768px) {
    font-size: 29px;
    margin-right: 0;
  }
}
.exchange-cta__description {
  font-weight: 500;
  font-size: 20px;
  color: #fff;
  margin-right: 35%;
  margin-bottom: 76px;

  @media screen and (max-width: 768px) {
    margin-right: 0;
    margin-bottom: 57px;
    font-size: 17px;
  }
}
.exchange-cta__buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 38px;

  @media screen and (max-width: 768px) {
    gap: 27px;
  }
}
