/* =========================
   Solution Hero (Section 1)
   ========================= */
.sol-hero{
  background: #ffffff;              /* было #f6f8fc */
  padding: 0 0 30px;               /* картинка доходит до верха блока */
  overflow-x: clip;
}

.sol-hero__inner{
  max-width: 1200px;
  margin-right: auto;
  margin-left: auto;
  padding: 0 24px;

  display: grid;
  grid-template-columns: 0.95fr 1.05fr; /* чуть больше места под картинку */
  align-items: center;
  gap: 44px;
}

.sol-hero__title{
  margin: 0;
  color: #0b1a37;
}

.sol-hero__and{
  display: inline;
}

.sol-hero__text{
  margin: 18px 0 0;
  max-width: 560px;
}

.sol-hero__actions{
  margin-top: 26px;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

/* Media */

/* Desktop-only: image flush to right edge, hide right outer frame */
@media (min-width: 980px){
  .sol-hero{
    overflow-x: clip;
  }
}

/* Responsive */
@media (max-width: 980px){
  .sol-hero{
    padding: 64px 0 54px;
  }

  .sol-hero__inner{
    grid-template-columns: 1fr;
    gap: 22px;
    padding: 0 18px;
  }

  .sol-hero__content{
    order: 1;
  }


  .sol-hero__actions{
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    margin-top: 22px;
  }

}

@media (max-width: 520px){
  /* как в моб макете: перенос "& AI" отдельной строкой */
  .sol-hero__and{
    display: block;
  }
}

/* =========================
   Solution Section 3: Problem
   ========================= */
.sol-problem{
  background:#ffffff;
  padding: 96px 0 110px;
}

.sol-problem__inner{
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}


.sol-problem__subtitle{
  margin: 14px auto 0;
  text-align: center;
  max-width: 560px;
  font-size: 18px;
  line-height: 1.55;
}

.sol-problem__grid{
  margin-top: 56px;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 22px;
  align-items: stretch;
}

.problem-card{
  border-radius: 18px;
  background: #ffffff;
  padding: 26px 22px 24px;
  min-height: 310px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.problem-card__icon{
  width: 112px;
  height: 112px;
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.problem-card__icon img{
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.problem-card__title{
  margin: 0 0 12px;
  color: #0b1a37;
  letter-spacing: -0.01em;
}

.problem-card__text{
  margin: 0;
  font-size: 14px;
  line-height: 1.65;
}

/* Hover (desktop) */
@media (hover:hover){
  .problem-card{
  }
  .problem-card:hover{
    border-color: rgba(37,99,235,0.25);
  }
}

/* Responsive */
@media (max-width: 1100px){
  .sol-problem__grid{
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 820px){
  .sol-problem{
    padding: 70px 0 74px;
  }
  .sol-problem__grid{
    grid-template-columns: 1fr;
    gap: 14px;
    margin-top: 26px;
  }
  .problem-card{
    min-height: auto;
    padding: 22px 18px 22px;
  }
}

/* =========================
   Solution Section 4: Approach
   ========================= */
.sol-approach{
  background:#ffffff;
  padding: 40px 0 50px;
}

.sol-approach__inner{
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}


.sol-approach__subtitle{
  margin: 14px auto 0;
  text-align: center;
  max-width: 720px;
  font-size: 18px;
  line-height: 1.6;
}

.sol-approach__list{
  margin-top: 64px;
  display: grid;
  gap: 76px; /* большие расстояния как в макете */
}

/* step layout */
.approach-step{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}

.approach-step__content{
  max-width: 520px;
}

.approach-step__text{
  margin: 10px 0 0;
  font-size: 14px;
  line-height: 1.7;
  max-width: 560px;
}

/* media */
.approach-step__media{
  margin: 0;
  justify-self: end;
  width: 100%;
  max-width: 560px;
}

.approach-step__img{
  width: 464px;
  height: 309px;
  display: block;
  border-radius: 16px;
  border: 1px solid rgba(11,26,55,0.10);
}

/* alternating rows (desktop) */
.approach-step--reverse .approach-step__content{
  order: 2;
}
.approach-step--reverse .approach-step__media{
  order: 1;
  justify-self: start;
}

/* Responsive (mobile: stacked, text then image) */
@media (max-width: 980px){
  .sol-approach{
    padding: 70px 0 80px;
  }

  .sol-approach__list{
    margin-top: 26px;
    gap: 34px;
  }

  .approach-step{
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .approach-step__content{
    max-width: none;
  }

  .approach-step__media{
    justify-self: stretch;
    max-width: none;
  }

   .approach-step__img{
    width: 100%;
    height: auto;           /* убираем сжатие по фиксированной высоте */
    max-width: none;
    aspect-ratio: 464 / 309; /* сохраняем пропорции макета */
    object-fit: cover;
  }

  /* на мобилке всегда: заголовок/текст сверху, картинка снизу */
  .approach-step--reverse .approach-step__content,
  .approach-step--reverse .approach-step__media{
    order: initial;
  }
}

/* =========================
   Solution Section 5: Deliverables
   ========================= */
.sol-deliverables{
  background:var(--surface-soft);
  padding: 40px 0 50px;
}

.sol-deliverables__inner{
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}


.sol-deliverables__subtitle{
  margin: 14px auto 0;
  text-align: center;
  max-width: 760px;
  font-size: 18px;
  line-height: 1.6;
}

/* grid layout (desktop like mockup) */
.deliverables-grid{
  margin-top: 56px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
  grid-template-areas:
    "c1 c2 c2"
    "c3 c4 c5"
    "c6 c6 c7";
}

.deliverable-card{
  background:#ffffff;
  border: 1px solid rgba(11,26,55,0.12);
  border-radius: 18px;
  padding: 22px 22px 20px;
  display: flex;
  flex-direction: column;
  min-height: 320px;
}

.deliverable-card--center{
  text-align: center;
}

.deliverable-card--wide{
  min-height: 340px;
}

.deliverable-card__media{
  width: 100%;
  background: rgba(11,26,55,0.03);
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(11,26,55,0.08);
  display: grid;
  place-items: center;
}

.deliverable-card__media img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.deliverable-card__title {
  margin-top: 18px;
}

/* sizes */
.deliverable-card__media--sm{ aspect-ratio: 16/11; }
.deliverable-card__media--md{ aspect-ratio: 16/11; }
.deliverable-card__media--lg{ aspect-ratio: 16/8; }

.deliverable-card__text{
  margin: 0;
  font-size: 14px;
  line-height: 1.65;
}

/* assign areas */
.deliverable-card--c1{ grid-area: c1; }
.deliverable-card--c2{ grid-area: c2; }
.deliverable-card--c3{ grid-area: c3; }
.deliverable-card--c4{ grid-area: c4; }
.deliverable-card--c5{ grid-area: c5; }
.deliverable-card--c6{ grid-area: c6; }
.deliverable-card--c7{ grid-area: c7; }
/* subtle hover */
@media (hover:hover){
  .deliverable-card{
  }
  .deliverable-card:hover{
    border-color: rgba(37,99,235,0.22);
  }
}

/* Deliverables: equal media heights inside each desktop row (as in mockup) */
@media (min-width: 981px){
  .deliverable-card__media{
    aspect-ratio: auto;
  }

  /* Row 1 */
  .deliverable-card--c1 .deliverable-card__media,
  .deliverable-card--c2 .deliverable-card__media{
    height: 250px;
  }

  /* Row 2 */
  .deliverable-card--c3 .deliverable-card__media,
  .deliverable-card--c4 .deliverable-card__media,
  .deliverable-card--c5 .deliverable-card__media{
    height: 210px;
  }

  /* Row 3 */
  .deliverable-card--c6 .deliverable-card__media,
  .deliverable-card--c7 .deliverable-card__media{
    height: 250px;
  }
}

/* responsive: mobile = stack all */
@media (max-width: 980px){
  .sol-deliverables{
    padding: 70px 0 80px;
  }

  .deliverables-grid{
    margin-top: 26px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;

    /* критично: убираем areas, чтобы пошло строго 1 колонкой */
    grid-template-areas: none;
  }

  /* критично: сбрасываем grid-area у карточек (c1..c7), иначе ломает раскладку */
  .deliverables-grid .deliverable-card{
    grid-area: auto !important;
    grid-column: auto !important;
    grid-row: auto !important;

    min-height: auto;
    padding: 18px 18px 18px;
  }

  .deliverable-card--wide{
    min-height: 279px;
  }

  .deliverable-card__media--lg{
    aspect-ratio: 16/10;
  }
}

/* Deliverables: align media with text (left for normal cards, center for centered cards) */
.deliverable-card__media{
  /* было: place-items: center; */
  justify-items: start;
  align-items: start;
}

.deliverable-card--center .deliverable-card__media{
  justify-items: center;
  align-items: center;
}

/* FIX: <figure> has default margins -> shifts media container */
.deliverable-card__media{
  margin: 0;              /* <-- главное */
}

/* =============== SECTION 6: When necessary =============== */
.sol-when{
  padding: 40px 0 50px;
  background: #fff;
}

.sol-when__head{
  text-align: center;
  max-width: 780px;
  margin: 0 auto;
}


.sol-when__subtitle{
  margin: 14px auto 0;
  font-size: 18px;
  line-height: 1.55;
}

/* desktop grid */
.when-grid{
  margin-top: 56px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  align-items: stretch;
}

.when-card{
  background: #ffffff;
  border: 1px solid rgba(12,22,48,0.14);
  border-radius: 18px;
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 360px;
}

.when-card__media{
  margin: 0;                /* IMPORTANT: reset figure default margin */
  background: rgba(12,22,48,0.04);
  border-bottom: 1px solid rgba(12,22,48,0.10);
  height: 190px;
  overflow: hidden;
  display: block;
}

.when-card__media img{
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
}

.when-card__title{
  margin: 18px 18px 18px;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.when-card__text{
  margin: 10px 18px 18px;
  font-size: 15px;
  line-height: 1.6;
}

/* mobile swiper default hidden on desktop */
.when-swiper{
  display: none;
  margin-top: 28px;
}

.when-swiper .swiper-slide{
  height: auto;
}

.when-swiper__pagination{
  margin-top: 14px;
  position: static;
}

/* responsive */
@media (max-width: 980px){
  .sol-when{
    padding: 78px 0 88px;
  }


  .sol-when__subtitle{
    font-size: 16px;
  }

  .when-grid{
    display: none;   /* hide grid on mobile */
  }

  .when-swiper{
    display: block;  /* show swiper on mobile */
  }

  .when-card{
    min-height: 0;
  }

  .when-card__media{
    height: 180px;
  }
}

/* ===== Solution / sol-when mobile fixes ===== */
@media (max-width: 980px){
  /* чтобы карусель не наезжала на контент карточки */
  /*!* pagination должна быть под слайдером, а не поверх картинки *!*/
  .sol-when .when-swiper .swiper-pagination,
  .sol-when .when-swiper__pagination{
    position: static !important;
    inset: auto !important;
    margin-top: 14px;
    transform: none !important;
    pointer-events: auto;
  }
}

/* =========================================================
   Section 6 slider: ONLY mobile. Desktop = grid, no scroll
   ========================================================= */
@media (min-width: 901px){
  /* контейнер не обрезает и не скроллит */
  .solution-usecases .swiper{
    overflow: visible !important;
  }

  /* на десктопе превращаем wrapper в grid (на случай, если Swiper оставил inline) */
  .solution-usecases .swiper-wrapper{
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;

    /* убираем любые трансформации/анимации свайпера */
    transform: none !important;
    transition: none !important;

    width: 100% !important;
  }

  /* слайды должны вести себя как обычные карточки в сетке */
  .solution-usecases .swiper-slide{
    width: auto !important;
    height: auto !important;
  }

  /* точки пагинации на десктопе не нужны */
  .solution-usecases .swiper-pagination{
    display: none !important;
  }
}

/* ===== SECTION 6: show swiper ONLY on mobile ===== */
.sol-when .when-swiper{
  display: none !important; /* жестко скрываем на desktop */
}

@media (max-width: 980px){
  .sol-when .when-grid{
    display: none !important;
  }
  .sol-when .when-swiper{
    display: block !important;
  }
}

@media (min-width: 981px){
  .sol-when .when-grid{
    display: grid !important;
  }
}

/* FIX: align card text by normalizing title height (mobile only) */
@media (max-width: 980px){
  .when-card__title{
    margin: 18px 18px 0;
    line-height: 1.25em;          /* важно: em, чтобы корректно считать высоту */
    letter-spacing: -0.01em;

    /* делаем одинаковую высоту заголовка (2 строки) */
    min-height: calc(1.25em * 2);

    /* аккуратно ограничиваем до 2 строк (без "прыжков" высоты) */
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
  }
}

/* =============== COMPANY / SECTION 2: Why companies struggle =============== */
.company-why{
  padding: 40px 0 50px;
  background: #fff;
}

.company-why__head{
  text-align: center;
  max-width: 980px;
  margin: 0 auto;
}


.company-why__subtitle{
  margin: 14px auto 0;
  max-width: 760px;
  font-size: 18px;
  line-height: 1.6;
}

.company-tabs{
  margin: 34px auto 0;
  display: flex;
  justify-content: center;
  gap: 26px;
  max-width: 420px;
  border-bottom: 1px solid rgba(11,26,55,0.18);
}

.company-tab{
  appearance: none;
  background: transparent;
  border: 0;
  padding: 12px 6px;
  margin: 0 0 -1px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  color: rgba(11,26,55,0.62);
  border-bottom: 2px solid transparent;
  transition: color .18s ease, border-color .18s ease;
}

.company-tab.is-active{
  color: #0b1a37;
  border-bottom-color: #1A83D4;
}

.company-why__content{
  margin-top: 46px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr);
  gap: 56px;
  align-items: center;
}

.company-panels{
  position: relative;
  transition: height .28s ease;
}

.company-panel{
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity .28s ease, transform .28s ease;
}

.company-panel.is-active{
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.company-panel__title{
  margin: 0 0 14px;
  line-height: 1.22;
}

.company-panel__text{
  margin: 0;
  font-size: 16px;
  line-height: 1.75;
}

.company-panel__text + .company-panel__text{
  margin-top: 12px;
}

.company-why__btn{
  margin-top: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 18px;
  border-radius: 12px;
  background: #1A83D4;
  color: #fff;
  text-decoration: none;
  font-weight: 500;
  font-size: 14px;
  border: 1px solid rgba(37,99,235,0.12);
}

.company-why__btn:active{
  transform: translateY(1px);
}

.company-why__media{
  margin: 0;
  position: relative;
  width: 100%;
  border-radius: 22px;
  overflow: hidden;
  background: rgba(11,26,55,0.04);
  border: 1px solid rgba(11,26,55,0.10);
  aspect-ratio: 16/10;
}

.company-why__img{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity .30s ease, transform .30s ease;
}

.company-why__img.is-active{
  opacity: 1;
  transform: none;
}

@media (max-width: 980px){
  .company-why{
    padding: 78px 0 88px;
  }

  .company-tabs{
    max-width: 340px;
    gap: 18px;
  }

  .company-why__content{
    margin-top: 26px;
    display: flex;
    flex-direction: column;
    gap: 22px;
    align-items: stretch;
  }

  .company-why__media{
    aspect-ratio: 16/11;
  }
}

/* =========================
   SOLUTION final CTA:
   legacy mobile bridge styles (bridge is hidden by shared mobile rules in main.css)
========================= */

/* по умолчанию (desktop) mobile bridge скрыт */
.subscribe-bridge--mobile-only{
  display: none !important;
}

/* стили mobile bridge (scoped only, чтобы не ломать company) */
.subscribe-bridge--mobile-only {
  padding: 52px 0 70px;
}

.subscribe-bridge--mobile-only .subscribe-bridge__card {
  position: relative;
  background: #1A83D4;
  border-radius: 22px;
  text-align: center;
  padding: 34px 28px 92px;
  overflow: visible;
}

.subscribe-bridge--mobile-only .subscribe-bridge__card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 32%;
  pointer-events: none;
  z-index: 0;
  background: url("../images/subscribe/frame-13.png") no-repeat left center / contain;
  transform-origin: left center;
}

.subscribe-bridge--mobile-only .subscribe-bridge__card::after {
  content: "";
  position: absolute;
  inset: 0 0 0 auto;
  width: 34%;
  pointer-events: none;
  z-index: 0;
  background: url("../images/subscribe/subR.png") no-repeat right center / contain;
  transform-origin: right center;
}

.subscribe-bridge--mobile-only .subscribe-bridge__badge,
.subscribe-bridge--mobile-only .subscribe-bridge__copy,
.subscribe-bridge--mobile-only .subscribe-bridge__form {
  position: relative;
  z-index: 1;
}

.subscribe-bridge--mobile-only .subscribe-bridge__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 12px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 8px;
  font-size: 12px;
  line-height: 1;
  color: #fff;
  margin: 0 auto 18px;
}

.subscribe-bridge--mobile-only .subscribe-bridge__text {
  margin: 0 auto;
  font-size: 12px;
  line-height: 1.6;
  color: #fff;
  opacity: 0.95;
  max-width: 720px;
}

.subscribe-bridge--mobile-only .subscribe-bridge__copy--mobile {
  display: none;
}

.subscribe-bridge--mobile-only .subscribe-bridge__form {
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translate(-50%, 50%);
  width: min(360px, calc(100% - 64px));
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
  background: #fff;
  border-radius: 12px;
  padding: 8px;
  border: 2px solid #1a83d4;
}

.subscribe-bridge--mobile-only .subscribe-bridge__input {
  width: 100%;
  height: 34px;
  border: 1px solid #d8e0ea;
  border-radius: 10px;
  padding: 0 12px;
  font-size: 12px;
  outline: none;
  box-sizing: border-box;
}

.subscribe-bridge--mobile-only .subscribe-bridge__btn {
  height: 34px;
  border: 0;
  border-radius: 10px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: #1a83d4;
  color: #fff;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
}

.subscribe-bridge--mobile-only .subscribe-bridge__status {
  grid-column: 1 / -1;
  font-size: 11px;
  text-align: center;
  margin-top: 6px;
  color: #5b6b7c;
}

.subscribe-bridge--mobile-only .subscribe-bridge__status:empty {
  display: none;
}


