/* SPM Services — Case Studies listing page */

body.spm-cases-page {
  background: #fff;
  padding-top: 0 !important;
}

/* GeneratePress lays .site-content out as a row. Keep the banner and grid stacked. */
body.spm-cases-page .site-content {
  display: block !important;
}

body.spm-cases-page .spm-cases-main {
  display: block;
  width: 100%;
  flex: 1 0 100%;
}

body.spm-cases-page .cs-hero,
body.spm-cases-page .cs-list {
  display: block;
  width: 100%;
  max-width: none;
}

.spm-header {
  background: rgb(20 26 24 / 43%);
}

body.spm-cases-page .spm-header.is-sticky {
  position: fixed;
  background: #0b141c;
  box-shadow: none;
}

/* Banner */
.cs-hero {
  position: relative;
  min-height: 272px;
  padding: calc(var(--spm-header-h) + 18px) 0 52px;
  background-color: #0b141c;
  background-image: url("../images/frame-1.png");
  background-position: center right;
  background-size: cover;
  background-repeat: no-repeat;
  color: #fff;
  overflow: hidden;
}

.cs-hero .spm-wrap {
  position: relative;
  z-index: 1;
  padding-top: 20px;
}

.cs-hero .spm-wrap a {
  text-decoration: none;
}

.cs-crumb {
  margin: 0 0 10px;
  font-size: 18px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.72);
}

.cs-crumb a {
  color: rgba(255, 255, 255, 0.72);
}

.cs-crumb a:hover {
  color: #fff;
}

.cs-crumb span {
  color: #86c881;
}

.cs-hero h1 {
  margin: 0;
  font-family: var(--font-head);
  font-size: clamp(40px, 5vw, 46px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: #fff;
}

/* Grid */
.cs-list {
  padding: 48px 0 88px;
  background: #fff;
}

.cs-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 44px;
}

.cs-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid #e6e6eb;
  border-radius: 14px;
  overflow: hidden;
  padding-bottom: 40px;
}

.cs-card h2,
.cs-card p,
.cs-link {
  padding: 0 20px;
}

.cs-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 280px;
  margin-bottom: 26px;
  background-color: #fafafc;
  padding: 20px;
}

.cs-visual a {
  display: flex;
  width: 100%;
  justify-content: center;
}

.spm-cases-page .cs-visual img {
  width: 100%;
  max-width: 100%;
  height: 268px;
  object-fit: contain;
  object-position: center;
}

.cs-card h2 {
  margin: 0 0 10px;
  font-family: var(--font-head);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.25;
  color: #16141f;
}

.cs-card p {
  margin: 0 0 22px;
  max-width: 460px;
  color: #8b8b9a;
  font-size: 18px;
  line-height: 1.6;
}

.spm-cases-page a.cs-link {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  width: fit-content;
  margin-top: auto;
  color: #16141f;
  font-family: var(--font-head);
  font-size: 20px;
  font-weight: 500;
  line-height: 1;
  text-decoration: none;
}

.spm-cases-page a.cs-link span {
  font-size: 18px;
  font-weight: 500;
}

.spm-cases-page a.cs-link:hover {
  color: #86c881;
}

@media (max-width: 767px) {
  .cs-hero {
    min-height: 170px;
    padding: calc(var(--spm-header-h) + 10px) 0 32px;
  }

  .cs-grid {
    grid-template-columns: 1fr;
  }

  .cs-list {
    padding: 32px 0 56px;
  }

  .cs-visual {
    min-height: 200px;
  }

  .spm-cases-page .cs-visual img {
    height: 200px;
  }
  .stori-stages {
    position: relative;
    z-index: 2;
    margin-top: -45px !important;
  }
}
