/* Cases carousel (templates/homepage_new/section-cases.php). Every selector starts with .section-cases.
   Desktop follows Figma 9203:33266 proportions inside the theme container (1184 px content at 1440, like the
   neighbouring blocks); at 1023.9 px and below the photo goes on top and the tiles form a 2×2 grid under it. */

.section-cases {
  padding: 80px 0;
}

.section-cases .section-cases-head {
  row-gap: 16px;
}

/* Figma's title box is 846 px wide: «…world’s leading / enterprises» */
.section-cases .section-cases-head .section-head-title-wrapper {
  max-width: 846px;
}

.section-cases .section-cases-nav {
  display: flex;
  gap: 8px;
  margin-left: auto;
}

.section-cases .section-cases-prev,
.section-cases .section-cases-next {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 8px;
  border: 0;
  border-radius: 8px;
  background: #494c5b;
  cursor: pointer;
  transition: background-color 0.2s;
}

.section-cases .section-cases-prev[hidden],
.section-cases .section-cases-next[hidden] {
  display: none;
}

.section-cases .section-cases-next img {
  transform: rotate(180deg); /* caret.svg points left */
}

.section-cases .section-cases-prev:disabled,
.section-cases .section-cases-next:disabled {
  background: #e6e6e7;
  cursor: default;
}

.section-cases .section-cases-prev:focus-visible,
.section-cases .section-cases-next:focus-visible {
  outline: 2px solid #252730;
  outline-offset: 2px;
}

/* the CTA sits on the dark tile: a light ring */
.section-cases .section-cases-cta-link:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 2px;
}

.section-cases .section-cases-track {
  position: relative;
  display: flex;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
}

.section-cases .section-cases-track::-webkit-scrollbar {
  display: none;
}

.section-cases .section-cases-slide {
  box-sizing: border-box;
  flex: 0 0 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 8px;
  border-radius: 24px;
  background: #ededed;
  scroll-snap-align: start;
}

/* style.css spaces every `article > * + *` by 1em; the slide is a grid with its own gap */
.section-cases .section-cases-slide > * {
  margin-top: 0;
}

.section-cases .section-cases-media {
  position: relative;
  min-height: 0;
  overflow: hidden;
  border-radius: 16px;
  background: #2a2a33;
}

.section-cases .section-cases-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* the product card (OCParts) and the phone (TheFinerTable) sit at the art's right edge: crop from the left */
  object-position: 100% 50%;
}

.section-cases .section-cases-overlay {
  position: relative;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  height: 100%;
  padding: 24px;
  color: #ffffff; /* no extra shade: the exported art already carries the mockup's tone */
}

.section-cases .section-cases-logo {
  display: block;
  width: auto; /* each logo at its own size: the width/height attributes (OCParts 175×32, TheFinerTable 167×40) */
  height: auto;
}

.section-cases .section-cases-text {
  max-width: 520px;
  margin: 28px 0 0;
  font-family: 'Google Sans Flex';
  font-weight: 400;
  font-size: 16px;
  line-height: 1.4;
  color: #ffffff;
}

.section-cases .section-cases-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: auto 0 0;
  padding: 16px 0 0;
  list-style: none;
}

.section-cases .section-cases-tags li {
  height: 29px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.2);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  font-family: 'Geist Mono';
  font-size: 11px;
  line-height: 27px;
  color: #ffffff;
  white-space: nowrap;
}

.section-cases .section-cases-blocks {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-auto-rows: minmax(231px, auto);
  gap: 8px;
}

.section-cases .section-cases-stats {
  display: contents;
  margin: 0;
  padding: 0;
  list-style: none;
}

.section-cases .section-cases-card,
.section-cases .section-cases-cta {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 24px;
  border-radius: 16px;
}

.section-cases .section-cases-card {
  background: #ffffff;
}

.section-cases .section-cases-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background: #f3f3f4;
}

.section-cases .section-cases-icon img {
  width: 32px;
  height: 32px;
}

.section-cases .section-cases-stat {
  margin-top: auto;
  padding-top: 16px;
  font-family: 'Google Sans Flex';
  font-weight: 400;
  font-size: 48px;
  line-height: 56px;
  color: #000000;
}

.section-cases .section-cases-desc {
  margin-top: 6px;
  font-family: 'Google Sans Flex';
  font-weight: 400;
  font-size: 16px;
  line-height: 24px;
  color: #252730;
}

/* Hover as the Industries tiles (homepage_new.css .section-industries-item:hover; Kseniia 2026-11-25): dark gradient,
   white number and caption, light icon box and icon; number and caption rise 8 px (style.css animates all for 0.3 s).
   Pointer devices only: on a phone a tap would leave the tile dark. */
@media (hover: hover) {
  .section-cases .section-cases-card:hover {
    background: linear-gradient(180deg, #595060 0%, #3e3d4f 100%);
  }

  .section-cases .section-cases-card:hover .section-cases-icon {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.08) 0%, rgba(194, 197, 208, 0.08) 100%);
    box-shadow: inset 0 0 2px rgba(255, 255, 255, 0.15);
  }

  .section-cases .section-cases-card:hover .section-cases-icon img {
    filter: brightness(0.5) invert(1);
  }

  .section-cases .section-cases-card:hover .section-cases-stat,
  .section-cases .section-cases-card:hover .section-cases-desc {
    color: #ffffff;
    transform: translateY(-8px);
  }
}

.section-cases .section-cases-cta {
  justify-content: space-between;
  background: linear-gradient(170deg, #4d4a57 0%, #383641 45%, #26262f 100%);
}

.section-cases .section-cases-cta-title {
  max-width: 240px;
  margin: 0;
  font-family: 'Google Sans Flex';
  font-weight: 400;
  font-size: 32px;
  line-height: 40px;
  color: #ffffff;
}

.section-cases .section-cases-cta-link {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  max-width: 270px;
  height: 48px;
  margin-top: 16px;
  padding: 4px 4px 4px 24px;
  border-radius: 8px;
  background: #ffffff;
  font-family: 'Geist Mono';
  font-size: 14px;
  line-height: 24px;
  color: #252730;
  text-decoration: none;
}

.section-cases .section-cases-cta-arrow {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 6px;
  background: #ededed;
}

/* 1024–1300 px: a ~240-px tile; Geist Mono 14 px + the arrow box would wrap the label */
@media screen and (min-width: 1024px) and (max-width: 1300px) {
  .section-cases .section-cases-cta {
    padding: 20px;
  }

  .section-cases .section-cases-cta-link {
    gap: 8px;
    padding-left: 12px;
    font-size: 12px;
    white-space: nowrap;
  }
}

@media screen and (max-width: 1023.9px) {
  .section-cases .section-cases-slide {
    grid-template-columns: 1fr;
  }

  .section-cases .section-cases-media {
    aspect-ratio: 644 / 470;
  }

  .section-cases .section-cases-blocks {
    grid-auto-rows: minmax(200px, auto);
  }
}

@media screen and (max-width: 767.8px) {
  .section-cases {
    padding: 64px 0;
  }

  /* a 344-px photo cannot carry four lines of text and three tags: on phones they go under it, on a dark panel */
  .section-cases .section-cases-media {
    aspect-ratio: auto;
    display: flex;
    flex-direction: column;
    background: #26262f;
  }

  .section-cases .section-cases-photo {
    position: static;
    display: block;
    height: auto;
    aspect-ratio: 644 / 470;
  }

  .section-cases .section-cases-overlay {
    height: auto;
    padding: 16px;
  }

  .section-cases .section-cases-logo {
    max-height: 28px;
  }

  .section-cases .section-cases-text {
    margin-top: 12px;
    font-size: 13px;
  }

  .section-cases .section-cases-tags li {
    height: 25px;
    padding: 0 8px;
    font-size: 10px;
    line-height: 23px;
  }

  .section-cases .section-cases-blocks {
    grid-auto-rows: minmax(168px, auto);
  }

  .section-cases .section-cases-card,
  .section-cases .section-cases-cta {
    padding: 16px;
  }

  .section-cases .section-cases-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
  }

  .section-cases .section-cases-icon img {
    width: 24px;
    height: 24px;
  }

  /* numbers top-aligned under the icon: a two-line caption must not lift its number above the neighbour's */
  .section-cases .section-cases-stat {
    margin-top: 0;
    padding-top: 24px;
    font-size: 32px;
    line-height: 40px;
  }

  .section-cases .section-cases-desc {
    font-size: 14px;
    line-height: 20px;
  }

  .section-cases .section-cases-cta-title {
    font-size: 22px;
    line-height: 28px;
  }

  /* a half-width tile has no room for the arrow box: centred label, two lines on the narrowest phones */
  .section-cases .section-cases-cta-link {
    justify-content: center;
    height: auto;
    min-height: 40px;
    padding: 4px 8px;
    font-size: 11px;
    line-height: 16px;
    text-align: center;
  }

  .section-cases .section-cases-cta-arrow {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .section-cases .section-cases-track {
    scroll-behavior: auto;
  }

  .section-cases .section-cases-prev,
  .section-cases .section-cases-next {
    transition: none;
  }

  .section-cases .section-cases-card:hover .section-cases-stat,
  .section-cases .section-cases-card:hover .section-cases-desc {
    transform: none;
  }
}
