/* ═══════════════════════════════════════════
   Education — case page
   ═══════════════════════════════════════════ */

/* ── Hero (под хедером): кнопка «вернуться» ── */
.case-hero {
  padding: 30px 60px 30px;
  display: flex;
  align-items: center;
}

.case-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 16px 0;
  background: transparent;
  border: 0;
  border-radius: 56px;
  color: #121313;
  font-family: 'Unbounded', sans-serif;
  font-weight: 500;
  font-size: 12px;
  line-height: 1.45;
  letter-spacing: 0.12px;
  text-transform: uppercase;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.case-back svg {
  width: 26px;
  height: 26px;
  flex: none;
}

.case-back:hover {
  opacity: 0.6;
}


/* ── Body: белая обёртка (intro + gallery) на всю ширину, контент по padding ── */
.case-body {
  margin: 0;
  padding: 60px 60px 50px;
  background: var(--color-cocane, #fff);
  border-radius: 60px;
  display: flex;
  flex-direction: column;
  gap: 60px;
}


/* ── Intro: H1 + Задачи/Результат ── */
.case-intro {
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 60px;
}

.case-intro__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.case-intro__title {
  margin: 0;
  font-family: 'Unbounded', sans-serif;
  font-weight: 500;
  font-size: 42px;
  line-height: 1.1;
  text-transform: uppercase;
  color: #121313;
}

.case-intro__url {
  font-family: 'Unbounded', sans-serif;
  font-weight: 500;
  font-size: 14px;
  line-height: 1.2;
  color: #121313;
  white-space: nowrap;
}

.case-intro__brief {
  display: flex;
  align-items: flex-start;
  gap: 200px;
}

.case-intro__col {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
  font-family: 'Onest', sans-serif;
  font-weight: 400;
  font-size: 14px;
}

.case-intro__label {
  color: #8f8f9c;
  line-height: 1.2;
}

.case-intro__text {
  margin: 0;
  color: #121313;
  line-height: 1.3;
}

.case-intro__list {
  margin: 0;
  padding-left: 21px;
  list-style: disc;
  color: #121313;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.case-intro__list li {
  line-height: 1.3;
}


/* ── Gallery: ряды мокапов + полноширинные картинки + CTA ── */
.case-gallery {
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 60px;
}

/* ── CTA wrapper (внутри .case-body) ── */
.case-cta-wrap {
  display: flex;
  justify-content: center;
}

.case-gallery__row {
  display: flex;
  gap: 20px;
}

.case-gallery__row--67-39 .case-gallery__cell:nth-child(1) { flex: 0 0 670px; }
.case-gallery__row--67-39 .case-gallery__cell:nth-child(2) { flex: 1 1 0; }

.case-gallery__row--39-67 .case-gallery__cell:nth-child(1) { flex: 0 0 390px; }
.case-gallery__row--39-67 .case-gallery__cell:nth-child(2) { flex: 1 1 0; }

.case-gallery__cell {
  border-radius: 24px;
  overflow: hidden;
  height: 500px;
}

.case-gallery__cell--full {
  height: auto;
}

.case-gallery__cell--violet {
  background: #d7d6ff;
}

.case-gallery__cell--lime {
  background: #ccff7a;
}

.case-gallery__cell--neutral {
  background: #fdfdf5;
}

.case-gallery__cell--pink {
  background: #febee7;
}

.case-gallery__cell--orange {
  background: #f9cd67;
}

/* Row с двумя колонками (внутри каждой — по 2 cell) */
.case-gallery__row--2col {
  align-items: flex-start;
}

.case-gallery__col {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
}

.case-gallery__col--left { flex: 0 0 390px; }
.case-gallery__col--right { flex: 1 1 0; }

.case-gallery__cell--h500 { height: 500px; }
.case-gallery__cell--h632 { height: 632px; }
.case-gallery__cell--h1008 { height: 1008px; }
.case-gallery__cell--h1140 { height: 1140px; }

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

.case-gallery__cell--full img {
  height: auto;
}

.case-gallery__cta {
  align-self: center;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 20px 0 24px;
  background: transparent;
  border: 1px solid #121313;
  border-radius: 56px;
  color: #121313;
  font-family: 'Unbounded', sans-serif;
  font-weight: 500;
  font-size: 10px;
  line-height: 1.45;
  letter-spacing: 0.1px;
  text-transform: uppercase;
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.case-gallery__cta svg {
  width: 26px;
  height: 26px;
  flex: none;
}

.case-gallery__cta:hover {
  opacity: 0.7;
}


/* ── Telegram CTA — top-отступ от белой обёртки ── */
.telegram-cta {
  padding-top: 100px;
}


/* ── Mobile-only: laptop image at top ── */
.case-laptop-top {
  display: none;
}

/* ── Mobile-only / desktop-only ячейки галереи ── */
.case-gallery__cell--mobile-only {
  display: none;
}


/* ═══════════════════════════════════════════
   Mobile / tablet — единый брейкпоинт 320–1199
   ═══════════════════════════════════════════ */
@media (max-width: 1199px) {

  .case-hero {
    padding: 20px 16px;
  }

  .case-laptop-top {
    display: block;
    margin: 0 16px;
    border-radius: 24px;
    overflow: hidden;
  }

  .case-laptop-top img {
    display: block;
    width: 100%;
    height: 200px;
    object-fit: cover;
  }

  .case-body {
    margin: 0;
    padding: 20px 16px;
    border-radius: 30px;
    gap: 30px;
  }

  .case-intro {
    padding: 0;
    gap: 30px;
  }

  .case-cta-wrap {
    padding: 0;
  }

  .telegram-cta {
    padding-top: 60px;
  }

  .case-intro__head {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .case-intro__title {
    font-size: 26px;
  }

  .case-intro__url {
    font-size: 12px;
  }

  .case-intro__brief {
    flex-direction: column;
    gap: 24px;
  }

  .case-intro__col {
    font-size: 12px;
    gap: 12px;
  }

  .case-intro__list {
    padding-left: 18px;
    gap: 6px;
  }

  .case-gallery {
    padding: 0;
    gap: 12px;
  }

  .case-gallery__row {
    flex-direction: column;
    gap: 12px;
  }

  /* Row 2 на моб: neutral (правая) выше pink (левая) — Figma-порядок обратный */
  .case-gallery__row--39-67 {
    flex-direction: column-reverse;
  }

  .case-gallery__row--67-39 .case-gallery__cell:nth-child(1),
  .case-gallery__row--67-39 .case-gallery__cell:nth-child(2),
  .case-gallery__row--39-67 .case-gallery__cell:nth-child(1),
  .case-gallery__row--39-67 .case-gallery__cell:nth-child(2) {
    flex: 1 1 auto;
    width: 100%;
  }

  /* Моб-высоты Figma 20005351:161853 (контент 288 шир) */
  .case-gallery__cell--mob-h340 { height: 340px; }
  .case-gallery__cell--mob-h200 { height: 200px; }

  .case-gallery__col,
  .case-gallery__col--left,
  .case-gallery__col--right {
    flex: 1 1 auto;
    width: 100%;
    gap: 12px;
  }

  .case-gallery__cell picture {
    display: block;
    width: 100%;
    height: 100%;
  }

  .case-gallery__cell img,
  .case-gallery__cell--full img {
    height: 100%;
    object-fit: cover;
  }

  .case-gallery__cell--desktop-only {
    display: none;
  }

  .case-gallery__cell--mobile-only {
    display: block;
  }

  .case-gallery__cta {
    margin-top: 0;
  }

}
