/* X-TECH bottom block — uses site look (Aspro/X-TECH palette & original class names) */

.xtb-site {
  color: #333;
  font-family: inherit;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
.xtb-site *,
.xtb-site *::before,
.xtb-site *::after { box-sizing: border-box; }

.xtb-site .wrapper {
  width: 100%;
  max-width: 1560px; /* как .maxwidth-theme / .wrapper_inner на сайте */
  margin: 0 auto;
  padding: 0 30px;
}
@media (max-width: 767px) {
  .xtb-site .wrapper { padding: 0 15px; }
}
.xtb-site .section { padding: 60px 0; background: #fff; }
.xtb-site .section-p-top { padding-top: 60px; }
.xtb-site .section-soft { background: #f7f7f7; }
.xtb-site .section-clients { background: #333; color: #fff; }

.xtb-site .y-row {
  display: flex;
  flex-wrap: wrap;
  margin: 0 -10px;
}
.xtb-site .y-col {
  padding: 0 10px 20px;
}
.xtb-site .y-col-4 { width: 33.333%; }
.xtb-site .y-col-8 { width: 66.666%; }
@media (max-width: 991px) {
  .xtb-site .y-col-4,
  .xtb-site .y-col-8 { width: 50%; }
}
@media (max-width: 767px) {
  .xtb-site .y-col-4,
  .xtb-site .y-col-8 { width: 100%; }
}

.xtb-site .title {
  font-weight: 600;
  font-size: 40px;
  line-height: 46px;
  color: #333;
  margin: 0 0 28px;
}
.xtb-site .title span { color: #e00034; }
.xtb-site .section-about .title span,
.xtb-site .section-about .title .font-20 {
  color: #444;
  font-weight: 400;
}
.xtb-site .section-clients .title { color: #fff; }
.xtb-site .section-clients .title span {
  color: rgba(255,255,255,.9);
  font-weight: 400;
  font-size: .72em;
}
.xtb-site .title-box { margin-bottom: 10px; }
.xtb-site .title-text {
  font-size: 17px;
  line-height: 26px;
  color: #333;
  margin: 0 0 30px;
  max-width: 820px;
}
.xtb-site .section-clients .title-text { color: rgba(255,255,255,.88); }
.xtb-site .font-16 { font-size: 16px; line-height: 1.45; }
.xtb-site .font-20 {
  font-size: 18px;
  font-weight: 400;
  line-height: 1.55;
  color: #444;
  display: block;
  margin-top: 12px;
}

/* Services — adaptive grid, site-like cards */
.xtb-site .complex-basic-list { margin-top: 8px; }
.xtb-site .xtb-services-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  align-items: stretch;
}
.xtb-site .complex-basic-list-item {
  background: #fff;
  box-shadow: 0 8px 18px rgba(68, 68, 68, .12);
  border-radius: 8px;
  min-height: 280px;
  padding: 36px 32px 56px;
  position: relative;
  display: flex;
  flex-direction: column;
  color: #333;
  transition: box-shadow .3s ease, transform .3s ease;
}
.xtb-site .complex-basic-list-item:hover {
  box-shadow: 0 14px 28px rgba(68, 68, 68, .16);
  transform: translateY(-3px);
}
.xtb-site .complex-basic-list-item__top {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 16px;
}
.xtb-site .complex-basic-list-item__image {
  width: 60px;
  height: 60px;
  object-fit: contain;
  flex: 0 0 60px;
  margin: 0;
  align-self: flex-start;
}
.xtb-site .complex-basic-list-item__title {
  font-size: 22px;
  font-weight: 600;
  line-height: 1.25;
  color: #222;
  flex: 1 1 auto;
  min-width: 0;
}
.xtb-site .complex-basic-list-item__text {
  color: #555;
  font-size: 16px;
  line-height: 1.5;
  flex: 1 1 auto;
}
.xtb-site .complex-basic-list-item__link {
  position: absolute;
  left: 32px;
  bottom: 28px;
  color: #e00034;
  opacity: 0;
  transform: translateX(0);
  transition: opacity .3s ease, transform .3s ease;
  pointer-events: none;
}
.xtb-site .complex-basic-list-item:hover .complex-basic-list-item__link {
  opacity: 1;
  transform: translateX(12px);
}
.xtb-site .complex-basic-list-item__link svg {
  display: block;
  fill: currentColor;
  width: 46px;
  height: 9px;
}

@media (max-width: 1199px) {
  .xtb-site .xtb-services-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
  .xtb-site .complex-basic-list-item {
    min-height: 250px;
    padding: 28px 24px 52px;
  }
  .xtb-site .complex-basic-list-item__title { font-size: 20px; }
  .xtb-site .complex-basic-list-item__link { left: 24px; bottom: 24px; }
}

@media (max-width: 991px) {
  .xtb-site .complex-basic-list-item {
    min-height: 0;
    padding: 22px 20px 28px;
  }
  .xtb-site .complex-basic-list-item__image {
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
  }
  .xtb-site .complex-basic-list-item__title { font-size: 18px; line-height: 1.3; }
  .xtb-site .complex-basic-list-item__text { font-size: 15px; line-height: 1.45; }
  .xtb-site .complex-basic-list-item__top {
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 12px;
  }
  .xtb-site .complex-basic-list-item__link { display: none; }
}

@media (max-width: 767px) {
  .xtb-site .xtb-services-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .xtb-site .complex-basic-list-item {
    padding: 16px 14px;
    min-height: 0;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(68, 68, 68, .1);
  }
  .xtb-site .complex-basic-list-item:hover { transform: none; box-shadow: 0 4px 12px rgba(68, 68, 68, .1); }
  .xtb-site .complex-basic-list-item__top {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 8px;
  }
  .xtb-site .complex-basic-list-item__image {
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    align-self: flex-start;
    object-fit: contain;
  }
  .xtb-site .complex-basic-list-item__title {
    font-size: 16px;
    font-weight: 600;
    line-height: 1.35;
    padding-top: 2px;
  }
  /* текст снова показываем, аккуратно под заголовком */
  .xtb-site .complex-basic-list-item__text {
    display: block;
    font-size: 14px;
    line-height: 1.45;
    color: #666;
    margin: 0;
    padding-left: 56px; /* выравнивание под текст справа от иконки */
  }
  .xtb-site .complex-basic-list-item__link { display: none; }
  .xtb-site .title { font-size: 26px; line-height: 1.25; margin-bottom: 18px; }
}

@media (max-width: 575px) {
  .xtb-site .xtb-services-grid { gap: 10px; }
  .xtb-site .complex-basic-list-item { padding: 14px 12px; }
  .xtb-site .complex-basic-list-item__image {
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
  }
  .xtb-site .complex-basic-list-item__title { font-size: 15px; line-height: 1.35; }
  .xtb-site .complex-basic-list-item__text {
    font-size: 13px;
    line-height: 1.4;
    padding-left: 52px;
  }
}

/* Cases */
.xtb-site .cases-item {
  display: block;
  text-decoration: none;
  color: inherit;
}
.xtb-site .cases-item__bg {
  position: relative;
  height: 360px;
  background: no-repeat center center / cover;
  border-radius: 3px;
  overflow: hidden;
}
.xtb-site .y-col-8 .cases-item__bg { height: 420px; }
.xtb-site .cases-item__bg img,
.xtb-site .cases-item__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
/* Aspro may add .lazy — keep images visible */
.xtb-site img.lazy,
.xtb-site .lazy img,
.xtb-site .lazy {
  opacity: 1 !important;
}
.xtb-site .cases-item__link {
  position: absolute;
  right: 18px;
  bottom: 18px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 12px rgba(0,0,0,.18);
}
.xtb-site .cases-item__link svg {
  width: 28px;
  fill: #111;
  transition: fill .25s ease;
}
.xtb-site .cases-item:hover .cases-item__link svg { fill: #e00034; }
.xtb-site .cases-item__title {
  margin: 14px 0 8px;
  font-size: 20px;
  font-weight: 650;
  line-height: 1.3;
  color: #222;
}
.xtb-site .cases-item__tag { color: #777; font-size: 14px; }
.xtb-site .cases-all-link {
  display: inline-block;
  margin-top: 10px;
  color: #e00034;
  font-weight: 600;
  text-decoration: none;
}
.xtb-site .cases-all-link:hover { text-decoration: underline; }

/* Letters carousel — show full letter (no crop) */
.xtb-site .carousel-gallery { position: relative; }
.xtb-site .xtb-letters__viewport { overflow: hidden; padding: 8px 0 16px; }
.xtb-site .xtb-letters__track {
  display: flex;
  gap: 18px;
  align-items: stretch;
  transition: transform .4s ease;
  will-change: transform;
}
.xtb-site .xtb-letter-slide { flex: 0 0 calc(33.333% - 12px); }
@media (max-width: 1023px) {
  .xtb-site .xtb-letter-slide { flex: 0 0 calc(50% - 9px); }
}
@media (max-width: 639px) {
  .xtb-site .xtb-letter-slide { flex: 0 0 100%; }
}
.xtb-site .carousel-gallery a.xtb-letter-link {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 210 / 297; /* A4 portrait */
  max-height: 560px;
  border-radius: 6px;
  overflow: hidden;
  position: relative;
  box-shadow: 3px 2px 20px rgba(0,0,0,.18);
  text-decoration: none;
  background: #f3f3f3;
}
@media (max-width: 767px) {
  .xtb-site .carousel-gallery a.xtb-letter-link { max-height: 420px; }
}
.xtb-site .carousel-gallery .image {
  width: 100%;
  height: 100%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f3f3f3;
}
.xtb-site .carousel-gallery .xtb-letter-img {
  width: 100%;
  height: 100%;
  object-fit: contain; /* целиком, без обрезки */
  object-position: center top;
  display: block;
  background: #fff;
}
.xtb-site .carousel-gallery .overlay {
  position: absolute;
  inset: 0;
  background: rgba(20,20,20,.72);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity .2s linear;
  color: #fff;
  font-size: 26px;
}
.xtb-site .carousel-gallery a:hover .overlay { opacity: 1; }
.xtb-site .xtb-letters__nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
}
.xtb-site .xtb-nav-btn {
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
  font-size: 1.25rem;
  box-shadow: 0 3px 12px rgba(145,193,238,.35);
}
.xtb-site .xtb-nav-btn:hover { color: #e00034; }
.xtb-site .xtb-letters__dots { display: flex; gap: 8px; }
.xtb-site .xtb-dot {
  width: 8px;
  height: 8px;
  border: 0;
  border-radius: 50%;
  background: #ccc;
  padding: 0;
  cursor: pointer;
}
.xtb-site .xtb-dot.is-active { background: #e00034; }

/* Clients */
.xtb-site .analytics-logo {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
}
@media (max-width: 991px) {
  .xtb-site .analytics-logo { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 575px) {
  .xtb-site .analytics-logo { grid-template-columns: repeat(2, 1fr); }
}
.xtb-site .analytics-logo__item {
  min-height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border-radius: 6px;
  box-shadow: 0 8px 12px rgba(132,132,132,.2);
  padding: 8px;
}
.xtb-site .analytics-logo__item img {
  max-width: 90%;
  max-height: 70px;
  object-fit: contain;
}

/* About */
.xtb-site .block-strategy-when__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 40px;
}
.xtb-site .block-strategy-when__left { flex: 1 1 320px; }
.xtb-site .block-strategy-when__right { flex: 1 1 360px; }
.xtb-site .block-strategy-when__right img {
  width: 100%;
  height: auto;
  border-radius: 3px;
  display: block;
}

/* Lightbox */
.xtb-lightbox {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: none;
  place-items: center;
  padding: 24px;
  background: rgba(0,0,0,.85);
}
.xtb-lightbox.is-open { display: grid; }
.xtb-lightbox__img {
  max-width: min(920px, 100%);
  max-height: 90vh;
  object-fit: contain;
}
.xtb-lightbox__close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: #fff;
  font-size: 1.4rem;
  cursor: pointer;
}

@media (max-width: 767px) {
  .xtb-site .title { font-size: 28px; line-height: 1.2; }
  .xtb-site .cases-item__bg,
  .xtb-site .y-col-8 .cases-item__bg { height: 240px; }
  .xtb-site .section { padding: 48px 0; }
}
