.portfolio-project__content .natural-history-case h2 {
  font-size: var(--font-size-title);
}

.portfolio-project__content .natural-history-case h3 {
  font-size: var(--font-size-subheading);
}

.portfolio-project-page:has(.natural-history-case) .portfolio-project__media img {
  max-height: none;
  object-fit: contain;
}

.natural-history-case .natural-history-case__illustrated,
.natural-history-case .natural-history-case__demo {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  column-gap: clamp(28px, 4vw, 56px);
}

.natural-history-case .natural-history-case__illustrated {
  padding-top: 26px;
  border-top: 1px solid rgba(255, 255, 255, 0.28);
}

.portfolio-project__content .natural-history-case__illustrated > h2[data-portfolio-heading-icon] {
  display: block;
  padding-top: 0;
  border-top: 0;
}

.portfolio-project__content .natural-history-case__illustrated > h2[data-portfolio-heading-icon]::before {
  content: none;
}

.portfolio-project__content .natural-history-case__illustrated > h2[data-portfolio-heading-icon] + p {
  padding-left: 0;
}

.natural-history-case__illustrated > :is(h2, p),
.natural-history-case__demo > :is(h2, p) {
  grid-column: 1;
}

.natural-history-case__illustrated > .portfolio-article-grid {
  grid-column: 1 / -1;
}

.natural-history-case__illustrated::after {
  content: '';
  grid-column: 2;
  grid-row: 1 / span 3;
  align-self: center;
  justify-self: center;
  width: 80px;
  height: 80px;
  background-position: center;
  background-size: contain;
  background-repeat: no-repeat;
}

.natural-history-case__role::after {
  background-image: url('/assets/portfolio/bitrix-umc-20261003/role-icon.svg?v=1');
}

.natural-history-case__concept::after {
  background-image: url('/assets/portfolio/bitrix-umc-20261003/exchange-icon.svg?v=1');
}

.natural-history-case__demo-link {
  display: inline-flex;
  grid-column: 2;
  grid-row: 1 / span 3;
  align-self: center;
  justify-self: center;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  margin: 0;
  padding-block: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.35);
  color: #d8d8d4;
  font: 400 15px/1.4 Inter, Arial, sans-serif;
  text-decoration: none;
  transition: color 180ms ease, border-color 180ms ease;
}

.natural-history-case__demo-link:hover,
.natural-history-case__demo-link:focus-visible {
  color: #fff;
  border-color: #fff;
}

.natural-history-case__demo-link svg {
  width: 18px;
  height: 18px;
  flex: none;
}

@media (max-width: 600px) {
  .natural-history-case .natural-history-case__illustrated {
    grid-template-columns: minmax(0, 1fr) 64px;
    column-gap: 20px;
  }

  .natural-history-case__illustrated::after {
    grid-row: 1;
    align-self: start;
    width: 64px;
    height: 64px;
  }

  .natural-history-case .natural-history-case__illustrated > p {
    grid-column: 1 / -1;
  }

  .natural-history-case .natural-history-case__demo {
    grid-template-columns: minmax(0, 1fr);
  }

  .natural-history-case__demo-link {
    grid-column: 1;
    grid-row: auto;
    justify-self: end;
    margin-top: 12px;
  }

  .portfolio-project__content .natural-history-case h2 {
    font-size: var(--font-size-title);
  }

  .portfolio-project__content .natural-history-case h3 {
    font-size: var(--font-size-subheading);
  }
}

@media (max-width: 380px) {
  .natural-history-case .natural-history-case__illustrated {
    grid-template-columns: minmax(0, 1fr);
  }

  .natural-history-case__illustrated::after {
    grid-column: 1;
    grid-row: 1;
    justify-self: start;
    width: 48px;
    height: 48px;
    margin-bottom: 16px;
  }
}
