/* Customer Reference Cases: reuse the existing blog colour, spacing and typography system. */

.hebt-customer-case-page {
  color: var(--hebt-text);
  background: var(--hebt-surface);
  max-width: 100% !important;
}

.hebt-customer-case-page *,
.hebt-customer-case-page *::before,
.hebt-customer-case-page *::after {
  box-sizing: border-box;
}

.hebt-case-archive-content {
  width: min(100% - 40px, 1200px);
  margin-inline: auto;
  padding-top: 42px;
  padding-bottom: 90px;
}

.hebt-case-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
}

.hebt-case-card {
  display: flex;
  min-width: 0;
  min-height: 100%;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid var(--hebt-border);
  border-radius: 18px;
  box-shadow: 0 5px 24px rgba(33, 0, 41, 0.035);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.hebt-case-card:hover,
.hebt-case-card:focus-within {
  transform: translateY(-4px);
  box-shadow: 0 14px 34px rgba(33, 0, 41, 0.09);
}

.hebt-case-card-link {
  display: flex;
  width: 100%;
  min-width: 0;
  flex-direction: column;
  color: inherit;
  text-decoration: none;
}

.hebt-case-card-link:focus-visible {
  outline: 3px solid var(--hebt-accent);
  outline-offset: -3px;
}

.hebt-case-card-media {
  display: flex;
  min-height: 170px;
  aspect-ratio: 3 / 2;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 24px;
  background: var(--hebt-soft);
}

.hebt-case-card-media img {
  display: block;
  width: 100%;
  height: 100%;
  max-height: 155px;
  object-fit: contain;
  transition: transform 260ms ease;
}

.hebt-case-card:hover .hebt-case-card-media img {
  transform: scale(1.035);
}

.hebt-case-card-placeholder {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 122px;
  background-image: repeating-linear-gradient(
    135deg,
    rgba(33, 0, 41, 0.035) 0,
    rgba(33, 0, 41, 0.035) 5px,
    transparent 5px,
    transparent 13px
  );
}

.hebt-case-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: flex-start;
  padding: 25px 22px 22px;
}

.hebt-case-card-title {
  margin: 0 0 13px;
  color: var(--hebt-text);
  font-size: clamp(18px, 1.55vw, 21px);
  font-weight: 760;
  line-height: 1.2;
  letter-spacing: -0.025em;
}

.hebt-case-card-link:hover .hebt-case-card-title,
.hebt-case-card-link:focus-visible .hebt-case-card-title {
  color: var(--hebt-accent);
}

.hebt-case-card-excerpt {
  margin: 0 0 22px;
  color: var(--hebt-muted);
  font-size: 14px;
  line-height: 1.65;
}

.hebt-case-card-cta {
  display: inline-flex;
  gap: 5px;
  align-items: center;
  margin-top: auto;
  color: #1765bd;
  font-size: 12px;
  font-weight: 750;
  text-decoration: none;
}

.hebt-case-card-cta span {
  font-size: 17px;
  line-height: 1;
  transition: transform 150ms ease;
}

.hebt-case-card-link:hover .hebt-case-card-cta,
.hebt-case-card-link:focus-visible .hebt-case-card-cta {
  color: var(--hebt-accent);
}

.hebt-case-card-link:hover .hebt-case-card-cta span,
.hebt-case-card-link:focus-visible .hebt-case-card-cta span {
  transform: translateX(3px);
}

.hebt-case-no-results {
  padding: 64px 24px;
  text-align: center;
  background: var(--hebt-soft);
  border-radius: 18px;
}

.hebt-case-no-results p {
  margin: 0;
  color: var(--hebt-muted);
}

.hebt-case-archive-content .navigation.pagination {
  margin-top: 50px;
}

.hebt-case-archive-content .nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.hebt-case-archive-content .page-numbers {
  display: inline-flex;
  min-width: 42px;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  color: var(--hebt-text);
  background: #ffffff;
  border: 1px solid var(--hebt-border);
  border-radius: 10px;
  font-size: 14px;
  font-weight: 650;
  text-decoration: none;
}

.hebt-case-archive-content .page-numbers.current,
.hebt-case-archive-content a.page-numbers:hover,
.hebt-case-archive-content a.page-numbers:focus {
  color: #ffffff;
  background: var(--hebt-primary);
  border-color: var(--hebt-primary);
}

/* Single case: the featured image is a logo, so it must remain fully visible. */
.hebt-case-single-shell {
  padding-top: clamp(38px, 5vw, 64px);
}

.hebt-case-featured-logo {
  display: flex;
  width: min(100%, 560px);
  min-height: 150px;
  align-items: center;
  justify-content: center;
  margin: 0 auto clamp(38px, 5vw, 64px);
  padding: clamp(24px, 4vw, 42px);
  background: var(--hebt-soft);
  border: 1px solid var(--hebt-border);
  border-radius: 18px;
}

.hebt-case-featured-logo img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  max-height: 220px;
  object-fit: contain;
  border-radius: 0;
}

.hebt-case-content {
  margin-bottom: 0;
}

.hebt-case-content .hebt-back-link {
  margin-top: 42px;
}

@media (max-width: 1024px) {
  .hebt-case-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 767px) {
  .hebt-case-archive-content {
    width: min(100% - 30px, 1200px);
    padding-top: 32px;
    padding-bottom: 64px;
  }

  .hebt-case-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
  }

  .hebt-case-card-media {
    min-height: 135px;
    padding: 18px;
  }

  .hebt-case-card-body {
    padding: 21px 18px 19px;
  }

  .hebt-case-single-shell {
    padding-bottom: 64px;
  }
}

@media (max-width: 520px) {
  .hebt-case-grid {
    grid-template-columns: 1fr;
  }

  .hebt-case-card-media {
    min-height: 165px;
  }

  .hebt-case-card-title {
    font-size: 21px;
  }
}
