.sp-portfolio {
  padding: 40px 24px 0px;
  background: #f4f6f8;
}
.sp-container {
    max-width: var(--trl-container);
    margin: 0 auto;
    padding: 0 32px;

}
.sp-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 30px;
}
.sp-eyebrow {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #23975f;
  display: block;
  margin-bottom: 14px;
}
.sp-heading h2 {
  font-weight: 800;
  font-size: clamp(30px, 3.5vw, 52px);
  line-height: 1.06;
  letter-spacing: -0.045em;
  margin: 0;
}
.sp-heading p {
  font-size: 15px;
  line-height: 1.6;
  max-width: 350px;
  color: #627185;
  margin: 0 0 3px;
}
.sp-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 17px;
}
.sp-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid #e5e9ed;
  border-radius: 17px;
  background: #fff;
  box-shadow: 0 12px 32px rgba(19, 35, 54, 0.055);
  transition: transform 0.25s, box-shadow 0.25s;
}
.sp-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 18px 38px rgba(19, 35, 54, 0.11);
}
.sp-gallery {
  position: relative;
  height: clamp(185px, 17.5vw, 258px);
  overflow: hidden;
  background: linear-gradient(120deg, #bac7d1, #607b94);
}
.sp-track {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform 0.38s cubic-bezier(0.2, 0.75, 0.2, 1);
  will-change: transform;
}
.sp-slide {
  position: relative;
  width: 100%;
  min-width: 100%;
  height: 100%;
}
.sp-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.sp-slide::after {
  content: "";
  position: absolute;
  inset: 45% 0 0;
  background: linear-gradient(to bottom, transparent, rgba(4, 15, 25, 0.35));
  pointer-events: none;
}
.sp-counter {
  position: absolute;
  top: 13px;
  right: 13px;
  z-index: 1;
  color: #fff;
  background: rgba(9, 26, 43, 0.63);
  backdrop-filter: blur(6px);
  border-radius: 30px;
  padding: 7px 10px;
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
}
.sp-arrow {
  position: absolute;
  top: 50%;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 33px;
  height: 33px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  color: #152336;
  border: 0;
  cursor: pointer;
  transform: translateY(-50%);
  opacity: 0.98;
  transition: background 0.2s;
}
.sp-arrow:hover {
  background: #fff;
}
.sp-arrow:focus-visible,
.sp-dot:focus-visible,
.sp-card__link:focus-visible {
  outline: 3px solid #ff9b53;
  outline-offset: 2px;
}
.sp-arrow--prev {
  left: 9px;
}
.sp-arrow--next {
  right: 9px;
}
.sp-arrow svg {
  width: 15px;
  height: 15px;
  stroke-width: 2.5;
}
.sp-dots {
  position: absolute;
  z-index: 2;
  bottom: 13px;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.sp-dot {
  width: 6px;
  height: 6px;
  border: 0;
  padding: 0;
  border-radius: 30px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.57);
  transition: background 0.2s, width 0.2s;
}
.sp-dot[aria-current="true"] {
  width: 19px;
  background: #fff;
}
.sp-card__body {
  padding: 22px 20px 21px;
}
.sp-type {
  color: #165a3a;
  font-size: 12px;
  letter-spacing: 0.12em;
  font-weight: 800;
}
.sp-card h3 {
  font-size: clamp(16px, 1.43vw, 20px);
  font-weight: 750;
  line-height: 1.32;
  letter-spacing: -0.025em;
  min-height: 78px;
  margin: 9px 0 17px;
}
.sp-specs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 15px 9px;
  border-top: 1px solid #e9edf0;
  padding-top: 18px;
}
.sp-specs span {
  display: block;
  font-size: 11px;
  color: #8190a0;
  margin-bottom: 5px;
}
.sp-specs strong {
  font-size: 13px;
  font-weight: 750;
  display: block;
  overflow-wrap: anywhere;
}
.sp-card__link {
  border: 1px solid #dfe5ea;
  border-radius: 9px;
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 20px;
  padding: 12px 13px;
  color: #213044;
  text-decoration: none;
  font-size: 12px;
  font-weight: 750;
  transition: border-color 0.2s, background 0.2s;
}
.sp-card__link:hover {
  border-color: #3fc785;
  background: #fff8f2;
}
.sp-card__link span:last-child {
  color: #249860;
  font-size: 20px;
  line-height: 0.8;
}
.sp-footnote {
  color: #82909d;
  font-size: 11px;
  line-height: 1.6;
  margin: 17px 0 0;
}
@media (max-width: 1140px) {
  .sp-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .sp-gallery {
    height: clamp(220px, 29vw, 310px);
  }
  .sp-card h3 {
    min-height: 0;
  }
}
@media (max-width: 680px) {
  .sp-portfolio {
    padding: 46px 16px;
  }
  .sp-heading {
    display: block;
    margin-bottom: 24px;
  }
  .sp-heading p {
    margin-top: 12px;
  }
  .sp-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .sp-gallery {
    height: clamp(230px, 60vw, 330px);
  }
  .sp-card__body {
    padding: 20px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .sp-card,
  .sp-track,
  .sp-dot {
    transition: none !important;
  }
  html {
    scroll-behavior: auto;
  }
}
