/* Homepage case-studies scroll — high specificity to beat Bootstrap */

.tm-case-scroll {
  background: #f0f0f0 !important;
  /* Only clip sideways overflow so pin + card shadows aren't cut off vertically */
  overflow-x: clip;
  overflow-y: visible;
  padding-block: clamp(1.5rem, 3vw, 2.5rem);
}

.tm-case-scroll .tm-case-inner {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0.5rem 2.5rem 2rem;
  box-sizing: border-box;
}

@media (max-width: 768px) {
  .tm-case-scroll .tm-case-inner {
    padding: 0.5rem 1rem 1.5rem;
  }
}

.tm-case-scroll .case-track {
  display: flex !important;
  flex-wrap: nowrap !important;
  align-items: stretch;
  gap: 1.25rem;
  width: 100%;
  margin: 0;
  padding: 0.25rem 0 1rem;
  list-style: none;
}

.tm-case-scroll .case-card {
  display: flex !important;
  flex: 0 0 auto !important;
  flex-direction: column;
  align-self: stretch;
  width: 85% !important;
  max-width: 380px !important;
  margin: 0 !important;
  min-width: 0;
  height: auto;
  box-sizing: border-box;
}

@media (min-width: 768px) {
  .tm-case-scroll .case-card {
    width: calc((100% - 1.25rem) / 2) !important;
    max-width: none !important;
  }
}

@media (min-width: 1100px) {
  .tm-case-scroll .case-card {
    width: calc((100% - 2.5rem) / 3) !important;
  }
}

/* Stretch shell through the .group wrapper so every card matches the tallest */
.tm-case-scroll .case-card > .group {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 100%;
  height: 100%;
}

.tm-case-scroll .case-card .card-shell {
  position: relative;
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 1rem;
  background: #ffffff;
  box-shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.28);
}

.tm-case-scroll .case-card-link {
  position: absolute;
  inset: 0;
  z-index: 2;
}

.tm-case-scroll .case-media {
  position: relative;
  width: 100%;
  aspect-ratio: 2 / 1;
  height: auto;
  min-height: 160px;
  overflow: hidden;
  background: #070606;
  flex-shrink: 0;
}

.tm-case-scroll .case-media img {
  position: absolute !important;
  inset: 0 !important;
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  /* Logo thumbs are designed for brand-color frames; contain keeps marks intact */
  object-fit: contain !important;
  object-position: center !important;
}

.tm-case-scroll .case-body {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
  padding: 1.15rem 1.25rem 1.35rem;
  background: #fff;
}

.tm-case-scroll .case-body .case-btn {
  margin-top: auto;
}

.tm-case-scroll .case-title {
  margin: 0;
  font-family: Poppins, Outfit, sans-serif;
  font-weight: 700;
  font-size: clamp(14px, 1.3vw, 18px);
  line-height: 1.2;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  text-align: center;
  color: #020202;
}

.tm-case-scroll .case-list {
  display: grid;
  gap: 0.75rem;
  margin: 0.9rem 0 1.1rem;
  padding: 0;
}

.tm-case-scroll .case-list > div {
  margin: 0;
}

.tm-case-scroll .case-label {
  margin: 0;
  font-family: Poppins, Outfit, sans-serif;
  font-weight: 700;
  font-size: clamp(13px, 0.95vw, 16px);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgb(136, 136, 136);
  ;
}

.tm-case-scroll .case-text {
  margin: 0.35rem 0 0;
  font-family: Poppins, Outfit, sans-serif;
  font-weight: 500;
  font-size: 12px;
  line-height: 1.5;
  color: rgba(0, 0, 0, 0.9)
}

.tm-case-scroll .case-btn {
  position: relative;
  z-index: 3;
  isolation: isolate;
  overflow: hidden;
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  width: 100%;
  margin-top: auto;
  padding: 6px 6px 6px 18px;
  border: 0;
  border-radius: 999px;
  background: #EF4680;
  color: #fff !important;
  text-decoration: none !important;
  font-family: Poppins, Outfit, sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: background-color 0.25s ease, color 0.25s ease;
}

.tm-case-scroll .case-btn:hover,
.tm-case-scroll .case-card:hover .case-btn {
  background: #C9245E;
  color: #fff !important;
}

.tm-case-scroll .case-btn-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #fff;
  color: #EF4680;
  flex-shrink: 0;
  transition: background-color 0.25s ease, color 0.25s ease, transform 0.4s ease;
}

.tm-case-scroll .case-btn:hover .case-btn-icon,
.tm-case-scroll .case-card:hover .case-btn-icon {
  background: #fff;
  color: #C9245E;
  transform: rotate(-45deg);
}

.tm-case-scroll .case-btn-icon svg {
  width: 18px;
  height: 18px;
}

.tm-case-scroll .case-more {
  display: none !important;
}

@media (min-width: 768px) {
  .tm-case-scroll .case-more {
    display: flex !important;
  }
}

.tm-case-scroll .case-more > a {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100%;
  height: 100%;
  padding: 1.5rem;
  text-align: center;
  text-decoration: none;
  color: #070606;
  background: transparent;
  border-radius: 1rem;
  box-shadow: none;
}

.tm-case-scroll .case-more-ring {
  display: grid;
  place-items: center;
  width: 168px;
  height: 168px;
  border-radius: 50%;
  border: 3px solid transparent;
  background:
    radial-gradient(circle at 50% 35%, #fff, #F6F4F1) padding-box,
    linear-gradient(135deg, #12B5E5, #7A4FE8 55%, #EF4680) border-box;
  box-shadow: 0 18px 36px -16px rgba(239, 70, 128, 0.45);
}

.tm-case-scroll .case-more-count {
  font-family: Poppins, Outfit, sans-serif;
  font-weight: 700;
  font-size: 72px;
  line-height: 1;
  background: linear-gradient(90deg, #12B5E5, #7A4FE8 55%, #EF4680);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.tm-case-scroll .case-more-label {
  margin-top: 1.15rem;
  font-family: Poppins, Outfit, sans-serif;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #3a3532;
}

.tm-case-scroll .case-more-copy {
  margin: 0.75rem 0 0;
  max-width: 18rem;
  font-family: Poppins, Outfit, sans-serif;
  font-size: 1.05rem;
  font-weight: 500;
  line-height: 1.5;
  color: rgba(7, 6, 6, 0.72);
}

.tm-case-scroll .case-more .case-btn {
  margin-top: 1.65rem;
  max-width: 17rem;
  background: #EF4680;
  color: #fff !important;
}

.tm-case-scroll .case-more .case-btn-icon {
  background: #fff;
  color: #EF4680;
}

.tm-case-scroll .case-more > a:hover .case-btn,
.tm-case-scroll .case-more > a:focus-visible .case-btn {
  background: #d93a6f;
  color: #fff !important;
}

.tm-case-scroll .case-more > a:hover .case-btn-icon,
.tm-case-scroll .case-more > a:focus-visible .case-btn-icon {
  background: #fff;
  color: #EF4680;
  transform: rotate(-45deg);
}

.tm-case-scroll .case-mobile-more {
  display: flex;
  justify-content: center;
  margin-top: 0.75rem;
}

@media (min-width: 768px) {
  .tm-case-scroll .case-mobile-more {
    display: none !important;
  }
}

.tm-case-scroll .case-track.is-carousel {
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
  overscroll-behavior-x: contain;
}

.tm-case-scroll .case-track.is-carousel .case-card {
  scroll-snap-align: start;
}
