/*
 * Site fixes for the Bitrix-exported landing markup.
 * Loaded by scripts/detox-bitrix.js (see scripts/) on every static page.
 */

/* ----- carousels (replacement for the removed slick/jQuery stack) ----- */
.js-carousel {
  position: relative;
}
.sva-carousel__viewport {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -ms-overflow-style: none;
  -webkit-overflow-scrolling: touch;
}
.sva-carousel__viewport::-webkit-scrollbar {
  display: none;
}
.sva-carousel .js-slide {
  flex: 0 0 calc(100% / var(--sva-show, 1)) !important;
  max-width: calc(100% / var(--sva-show, 1)) !important;
  scroll-snap-align: start;
  float: none !important;
}
.sva-carousel__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  width: 42px;
  height: 42px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: #3949a0;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.18);
  transition: background 0.2s ease, color 0.2s ease;
}
.sva-carousel__arrow:hover {
  background: #3949a0;
  color: #fff;
}
.sva-carousel__arrow--prev {
  left: -14px;
}
.sva-carousel__arrow--next {
  right: -14px;
}
@media (max-width: 575.98px) {
  .sva-carousel__arrow {
    display: none;
  }
}
.sva-carousel__dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 18px;
}
.sva-carousel__dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(57, 73, 160, 0.25);
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}
.sva-carousel__dot.is-active {
  background: #3949a0;
  transform: scale(1.25);
}
.g-theme-architecture-bg-blue-dark-v3 .sva-carousel__dot {
  background: rgba(255, 255, 255, 0.4);
}
.g-theme-architecture-bg-blue-dark-v3 .sva-carousel__dot.is-active {
  background: #fff;
}
/* fade mode (Благодарности): stacked slides */
.sva-carousel__viewport--fade {
  display: block;
  overflow: hidden;
  scroll-snap-type: none;
  position: relative;
  transition: height 0.3s ease;
}
.sva-carousel--fade .js-slide {
  position: absolute !important;
  top: 0;
  left: 0;
  width: 100% !important;
  max-width: 100% !important;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.45s ease, visibility 0.45s ease;
}
.sva-carousel--fade .js-slide.is-active {
  position: relative !important;
  opacity: 1;
  visibility: visible;
}

/* ----- uniform project card images ----- */
.landing-block-node-card .landing-block-node-card-img {
  height: 240px;
  object-fit: cover;
}
@media (max-width: 575.98px) {
  .landing-block-node-card .landing-block-node-card-img {
    height: 180px;
  }
}

/* ----- uniform gratitude-letter scans ----- */
.landing-block-card-person .landing-block-node-person-photo {
  height: 460px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  margin: 0 auto;
}
@media (max-width: 991.98px) {
  .landing-block-card-person .landing-block-node-person-photo {
    height: 340px;
  }
}
@media (max-width: 575.98px) {
  .landing-block-card-person .landing-block-node-person-photo {
    height: 280px;
  }
}

/* keep partner logos tidy inside slides */
.js-carousel .landing-block-node-carousel-img {
  margin: 0 auto;
}
