.aitia-real-cases {
  min-height: 868px;
  background: #fff;
}

.aitia-real-cases__inner {
  display: flex;
  flex-direction: column;
  gap: 64px;
  height: 868px;
  padding-block: 80px;
}

.aitia-real-cases__heading {
  display: flex;
  flex: 0 0 168px;
  flex-direction: column;
  gap: 32px;
  height: 168px;
}

.aitia-real-cases__heading > .aitia-section-badge {
  align-self: flex-start;
  width: 109px;
}

.aitia-real-cases__title-row {
  display: flex;
  gap: 24px;
  align-items: flex-end;
  justify-content: space-between;
  width: 100%;
  height: 100px;
}

.aitia-real-cases__title-row h2 {
  width: 980px;
  height: 100px;
  font: var(--solution-typography-title-large-bold);
}

.aitia-carousel-controls {
  display: flex;
  gap: 12px;
}

.aitia-carousel-controls button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border: 1px solid var(--solution-color-border);
  border-radius: 50%;
  cursor: pointer;
  transition: background-color 160ms ease, border-color 160ms ease;
}

.aitia-carousel-controls button:hover {
  background: var(--solution-color-surface-subtle);
  border-color: var(--solution-color-navy-300);
}

.aitia-carousel-controls img {
  width: 20px;
  height: 20px;
}

.aitia-carousel-controls--mobile {
  display: none;
}

.aitia-case-carousel {
  width: 100%;
  height: 476px;
  overflow: hidden;
}

.aitia-case-carousel__track {
  display: flex;
  gap: 32px;
  height: 476px;
  transition: transform 180ms ease, opacity 180ms ease;
}

.aitia-case-card {
  position: relative;
  display: flex;
  flex: 0 0 calc((100% - 64px) / 3);
  flex-direction: column;
  width: 352px;
  min-width: 0;
  height: 476px;
  overflow: hidden;
  background: #fff;
  border: 0;
  border-radius: 16px;
}

/* Keep the full card outline above the photo without changing its layout. */
.aitia-case-card::after {
  position: absolute;
  z-index: 1;
  inset: 0;
  border: 1px solid var(--solution-color-border);
  border-radius: inherit;
  pointer-events: none;
  content: "";
}

.aitia-case-card__link::after {
  position: absolute;
  z-index: 1;
  inset: 0;
  border-radius: inherit;
  content: "";
}

.aitia-case-card:has(.aitia-case-card__link:focus-visible)::after {
  z-index: 2;
  border: 3px solid var(--solution-color-primary);
}

.aitia-case-card__media {
  position: relative;
  flex: 0 0 204px;
  height: 204px;
  overflow: hidden;
}

.aitia-case-card__media img {
  position: absolute;
  top: -4px;
  left: calc(50% + 0.33px);
  width: 370px;
  max-width: none;
  height: 212px;
  object-fit: cover;
  transform: translateX(-50%);
}

.aitia-case-card__body {
  display: flex;
  flex: 0 0 272px;
  flex-direction: column;
  justify-content: space-between;
  height: 272px;
  min-height: 0;
  padding: 28px 24px;
}

.aitia-case-card__body > div {
  display: flex;
  flex-direction: column;
  gap: 16px;
  height: 168px;
  min-height: 168px;
  word-break: break-word;
}

.aitia-case-card h3 {
  display: -webkit-box;
  flex: 0 0 56px;
  height: 56px;
  overflow: hidden;
  color: var(--solution-color-text);
  font: var(--solution-typography-heading-small-semibold);
  text-overflow: ellipsis;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.aitia-case-card__body > div > p {
  display: -webkit-box;
  flex: 0 0 96px;
  height: 96px;
  overflow: hidden;
  color: var(--solution-color-text-subtle);
  font: var(--solution-typography-body-medium-reading-regular);
  text-overflow: ellipsis;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
}

.aitia-case-card time {
  display: flex;
  gap: 6px;
  align-items: center;
  color: #929aa3;
  font: var(--solution-typography-body-medium-reading-regular);
}

.aitia-case-card time img {
  width: 16px;
  height: 16px;
}

.aitia-real-cases.is-moving-next .aitia-case-carousel__track {
  opacity: 0.58;
  transform: translateX(-24px);
}

.aitia-real-cases.is-moving-previous .aitia-case-carousel__track {
  opacity: 0.58;
  transform: translateX(24px);
}

.aitia-product-showcase {
  height: 580px;
  padding-bottom: 100px;
  background: #fff;
}

.aitia-product-showcase__inner {
  display: flex;
  gap: 24px;
  align-items: center;
  width: min(100%, 1240px);
  height: 480px;
  padding-left: 60px;
  margin-inline: auto;
}

.aitia-product-showcase__copy {
  flex: 0 0 516px;
  width: 516px;
  height: 172px;
}

.aitia-product-showcase__copy h2 {
  width: 100%;
  height: 100px;
  font: var(--solution-typography-title-large-bold);
}

.aitia-product-showcase__copy p {
  width: 100%;
  height: 48px;
  margin-top: 24px;
  color: var(--solution-color-text-muted);
  font: var(--solution-typography-body-medium-reading-regular);
}

.aitia-product-showcase__image {
  flex: 0 1 640px;
  width: 640px;
  min-width: 0;
  height: 480px;
  object-fit: contain;
}

@media (min-width: 768px) and (max-width: 1023px) {
  .aitia-real-cases {
    height: 876px;
    min-height: 876px;
  }

  .aitia-real-cases__inner {
    height: 876px;
  }

  .aitia-real-cases__title-row h2 {
    width: 100%;
  }

  .aitia-carousel-controls--desktop {
    display: none;
  }

  .aitia-case-carousel {
    width: 100vw;
    height: 400px;
    margin-inline: calc(50% - 50vw);
  }

  .aitia-case-carousel__track {
    width: max-content;
    height: 400px;
    gap: 20px;
    transform: translateX(calc(50vw - 980px));
  }

  .aitia-case-card {
    flex: 0 0 640px;
    width: 640px;
    height: 400px;
    transform: scale(0.85);
    transition: transform 180ms ease, opacity 180ms ease;
  }

  .aitia-case-card:first-child {
    transform-origin: right center;
  }

  .aitia-case-card:nth-child(n + 3) {
    transform-origin: left center;
  }

  .aitia-case-card.is-active {
    opacity: 1;
    transform: scale(1);
  }

  .aitia-case-card:not(.is-active) {
    opacity: 0.86;
  }

  .aitia-case-card__body {
    flex-basis: 196px;
    height: 196px;
  }

  .aitia-case-card__media img {
    top: 50%;
    left: 50%;
    width: 652px;
    height: 374px;
    transform: translate(-50%, -50%);
  }

  .aitia-case-card__body > div {
    height: 92px;
    min-height: 92px;
  }

  .aitia-case-card h3 {
    flex-basis: 28px;
    height: 28px;
    -webkit-line-clamp: 1;
  }

  .aitia-case-card__body > div > p {
    flex-basis: 48px;
    height: 48px;
    -webkit-line-clamp: 2;
  }

  .aitia-carousel-controls--mobile {
    display: flex;
    align-self: center;
    margin-top: -32px;
  }

  .aitia-real-cases.is-moving-next .aitia-case-carousel__track {
    transform: translateX(calc(50vw - 1004px));
  }

  .aitia-real-cases.is-moving-previous .aitia-case-carousel__track {
    transform: translateX(calc(50vw - 956px));
  }

  .aitia-product-showcase {
    height: 776px;
  }

  .aitia-product-showcase__inner {
    flex-direction: column;
    gap: 24px;
    width: 100%;
    height: 676px;
    padding-left: 0;
  }

  .aitia-product-showcase__copy {
    order: 2;
    flex: 0 0 172px;
    width: 100%;
    height: 172px;
    min-height: 0;
    text-align: center;
  }

  .aitia-product-showcase__image {
    order: 1;
    flex: 0 0 480px;
    width: 640px;
    height: 480px;
  }
}

@media (max-width: 767px) {
  .aitia-real-cases {
    height: 1020px;
    min-height: 1020px;
  }

  .aitia-real-cases__inner {
    gap: 64px;
    height: 1020px;
    padding-block: 80px;
  }

  .aitia-real-cases__heading {
    gap: 32px;
    height: 236px;
    min-height: 236px;
  }

  .aitia-real-cases__title-row {
    height: 168px;
  }

  .aitia-real-cases__title-row h2 {
    width: 100%;
    height: 168px;
    font-size: var(--solution-font-size-title-medium);
    line-height: 1.3;
  }

  .aitia-carousel-controls--desktop {
    display: none;
  }

  .aitia-case-carousel {
    --aitia-carousel-width: max(var(--aitia-min-width), 100vw);

    width: var(--aitia-carousel-width);
    height: 476px;
    margin-inline: calc(50% - var(--aitia-carousel-width) / 2);
  }

  .aitia-case-carousel__track {
    width: max-content;
    height: 476px;
    gap: 20px;
    transform: translateX(calc(var(--aitia-carousel-width) / 2 - 440px));
  }

  .aitia-case-card {
    flex: 0 0 280px;
    width: 280px;
    min-width: 280px;
    height: 476px;
    transform: scale(0.85);
    transition: transform 180ms ease, opacity 180ms ease;
  }

  .aitia-case-card:first-child {
    transform-origin: right center;
  }

  .aitia-case-card:nth-child(n + 3) {
    transform-origin: left center;
  }

  .aitia-case-card__body {
    flex-basis: 272px;
    height: 272px;
  }

  .aitia-case-card__body > div {
    height: 168px;
    min-height: 168px;
  }

  .aitia-case-card h3 {
    height: 56px;
    -webkit-line-clamp: 2;
  }

  .aitia-case-card.is-active {
    opacity: 1;
    transform: scale(1);
  }

  .aitia-case-card:not(.is-active) {
    opacity: 0.86;
  }

  .aitia-real-cases.is-moving-next .aitia-case-carousel__track {
    opacity: 0.58;
    transform: translateX(calc(var(--aitia-carousel-width) / 2 - 464px));
  }

  .aitia-real-cases.is-moving-previous .aitia-case-carousel__track {
    opacity: 0.58;
    transform: translateX(calc(var(--aitia-carousel-width) / 2 - 416px));
  }

  .aitia-carousel-controls--mobile {
    display: flex;
    align-self: center;
    margin-top: -32px;
  }

  .aitia-product-showcase {
    height: auto;
    padding-bottom: 100px;
  }

  .aitia-product-showcase__inner {
    flex-direction: column;
    gap: 24px;
    width: 100%;
    height: auto;
    padding-left: 0;
  }

  .aitia-product-showcase__copy {
    order: 2;
    flex: 0 0 auto;
    width: 100%;
    height: auto;
    text-align: center;
  }

  .aitia-product-showcase__copy h2 {
    height: auto;
    padding-inline: 20px;
    font-size: var(--solution-font-size-title-medium);
    line-height: 42px;
  }

  .aitia-product-showcase__phrase {
    display: inline-block;
  }

  .aitia-product-showcase__copy p {
    font: var(--solution-typography-body-medium-reading-regular);
  }

  .aitia-product-showcase__image {
    order: 1;
    flex: 0 0 auto;
    width: 100%;
    height: auto;
    min-height: 282px;
    aspect-ratio: 3213 / 2411;
  }
}

@media (prefers-reduced-motion: reduce) {
  .aitia-case-carousel__track,
  .aitia-case-card {
    transition: none;
  }
}
