/* Pressure injury prevention — solution page */

.spi-page {
  background: var(--color-surface);
}

/* Intro — full-bleed background */
.spi-intro {
  position: relative;
  padding: 3rem 1rem 3.5rem;
  background-color: var(--color-primary);
  background-image: url("../image/Introduction-bg.png");
  background-size: cover;
  background-position: center;
}

body[data-header-variant="solid"] .spi-page > .spi-intro:first-child {
  margin-top: calc(-1 * var(--header-height));
}

.spi-intro::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    rgba(15, 23, 42, 0.88) 0%,
    rgba(15, 23, 42, 0.65) 45%,
    rgba(15, 23, 42, 0.42) 100%
  );
}

.spi-intro__inner {
  position: relative;
  z-index: 1;
  max-width: 46rem;
  margin: 0 auto;
}

.spi-intro__title {
  margin: 0 0 0.75rem;
  font-size: clamp(1.65rem, 3.5vw, 2.1rem);
  font-weight: 700;
  line-height: 1.2;
  color: #fff;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.35);
}

.spi-intro__body p {
  margin: 0 0 1rem;
  font-size: 1.02rem;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.92);
}

.spi-intro__body p:last-child {
  margin-bottom: 0;
}

/* Split sections */
.spi-section {
  padding: 2.75rem 1rem;
}

.spi-section__inner {
  max-width: var(--container-max);
  margin: 0 auto;
}

.spi-split {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
  align-items: stretch;
  background: var(--color-white);
  border-radius: 0.5rem;
  border: 1px solid rgba(15, 23, 42, 0.06);
  box-shadow: 0 2px 14px rgba(15, 23, 42, 0.05);
  overflow: hidden;
}

.spi-split__body {
  padding: 1.5rem 1.25rem 1.65rem;
  min-width: 0;
}

.spi-split__title {
  margin: 0 0 0.85rem;
  font-size: clamp(1.25rem, 2.2vw, 1.45rem);
  font-weight: 700;
  color: var(--color-primary);
}

.spi-split__text {
  margin: 0 0 1rem;
  font-size: 0.9375rem;
  line-height: 1.7;
  color: rgba(32, 52, 68, 0.9);
}

.spi-split__text:last-child {
  margin-bottom: 0;
}

.spi-split__media {
  background: rgba(15, 23, 42, 0.06);
  min-height: 14rem;
}

.spi-split__media img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 14rem;
  object-fit: cover;
}

.spi-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 1.15rem;
  min-height: 2.75rem;
  padding: 0 1.35rem;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--color-white);
  /* --nav-accent is white (header); use primary for visible contrast on white cards */
  background: var(--color-primary);
  border-radius: var(--radius-sm);
  border: 2px solid transparent;
  transition:
    background 0.2s ease,
    color 0.2s ease,
    box-shadow 0.2s ease;
}

.spi-cta:hover,
.spi-cta:focus-visible {
  background: var(--color-primary-hover);
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.15);
}

.spi-cta:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

@media (min-width: 768px) {
  .spi-split {
    flex-direction: row;
    align-items: stretch;
  }

  .spi-split__body {
    flex: 1 1 0;
    padding: 2rem 2rem 2.25rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .spi-split__media {
    flex: 0 0 44%;
    max-width: 28rem;
    min-height: auto;
    align-self: stretch;
  }

  .spi-split__media img {
    min-height: 100%;
  }

  .spi-split--reverse {
    flex-direction: row-reverse;
  }
}

.spi-section--alt {
  background: rgba(255, 255, 255, 0.65);
}

/* Related products — compact cards, white section */
.spi-products {
  padding: 2.75rem 1rem 3.25rem;
  background: var(--color-white);
  border-top: 1px solid rgba(15, 23, 42, 0.06);
}

.spi-products__inner {
  max-width: var(--container-max);
  margin: 0 auto;
}

.spi-products__title {
  margin: 0 0 1.75rem;
  text-align: center;
  font-size: clamp(1.2rem, 2.2vw, 1.45rem);
  font-weight: 700;
  color: var(--color-text);
}

.spi-product-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  align-items: stretch;
  max-width: 52rem;
  margin: 0 auto;
}

.spi-product-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0;
  padding: 1.1rem 1rem 1.25rem;
  background: var(--color-white);
  border-radius: 1rem;
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.08);
  border: 0;
  min-height: 0;
  width: 100%;
  max-width: 22rem;
  margin-inline: auto;
}

@media (min-width: 600px) {
  .spi-product-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.35rem;
  }

  .spi-product-card {
    max-width: none;
  }
}

.spi-product-card__media {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 9.5rem;
  max-height: 12rem;
  margin-bottom: 0.85rem;
}

.spi-product-card__media img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}

.spi-product-card__name {
  margin: 0;
  width: 100%;
  text-align: center;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.35;
  color: rgba(32, 52, 68, 0.78);
}

/* References */
.spi-refs {
  padding: 2.5rem 1rem 3.5rem;
}

.spi-refs__inner {
  max-width: 52rem;
  margin: 0 auto;
}

.spi-refs__title {
  margin: 0 0 1.25rem;
  font-size: clamp(1.15rem, 2vw, 1.3rem);
  font-weight: 700;
  color: var(--color-primary);
}

.spi-refs__list {
  margin: 0;
  padding-left: 1.35rem;
  font-size: 0.8125rem;
  line-height: 1.55;
  color: rgba(32, 52, 68, 0.88);
}

.spi-refs__list li + li {
  margin-top: 0.85rem;
}

.spi-refs__list a {
  color: var(--color-primary);
  word-break: break-word;
}

/* OSA — related products carousel (solution-osa.html) */
.spi-product-carousel {
  position: relative;
  width: 100%;
  max-width: 28rem;
  margin: 0 auto;
}

.spi-product-carousel__counter {
  position: absolute;
  top: 0.65rem;
  right: 0.65rem;
  z-index: 5;
  font-size: 0.8125rem;
  font-weight: 600;
  color: rgba(32, 52, 68, 0.55);
  background: rgba(255, 255, 255, 0.92);
  padding: 0.3rem 0.55rem;
  border-radius: 0.25rem;
  border: 1px solid rgba(15, 23, 42, 0.06);
}

.spi-product-carousel__viewport {
  position: relative;
  min-height: min(52vw, 22rem);
  max-height: 26rem;
  border-radius: 1rem;
  overflow: hidden;
  background: linear-gradient(180deg, #f8fbfc 0%, #eef4f6 100%);
  border: 1px solid rgba(15, 23, 42, 0.08);
}

.spi-product-carousel__track {
  position: relative;
  min-height: min(52vw, 22rem);
  max-height: 26rem;
}

.spi-product-carousel__slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.75rem 1.25rem 2.5rem;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.45s ease,
    visibility 0.45s ease;
  z-index: 0;
}

.spi-product-carousel__slide.is-active {
  opacity: 1;
  visibility: visible;
  z-index: 1;
}

.spi-product-carousel__slide .spi-product-card {
  width: 100%;
  max-width: 22rem;
  margin: 0;
  box-shadow: 0 10px 32px rgba(15, 23, 42, 0.1);
}

.spi-product-carousel__btn {
  position: absolute;
  top: 44%;
  transform: translateY(-50%);
  z-index: 5;
  width: 2.75rem;
  height: 2.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(35, 78, 112, 0.25);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.96);
  color: var(--color-primary);
  cursor: pointer;
  transition: background 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
}

.spi-product-carousel__btn:hover,
.spi-product-carousel__btn:focus-visible {
  background: var(--color-white);
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.12);
}

.spi-product-carousel__btn--prev {
  left: 0.45rem;
}

.spi-product-carousel__btn--next {
  right: 0.45rem;
}

.spi-product-carousel__btn svg {
  width: 1.1rem;
  height: 1.1rem;
}

.spi-product-carousel__dots {
  position: absolute;
  bottom: 0.75rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem;
  max-width: calc(100% - 2rem);
}

.spi-product-carousel__dot {
  width: 0.45rem;
  height: 0.45rem;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(var(--color-primary-rgb), 0.28);
  cursor: pointer;
  transition:
    background 0.2s ease,
    transform 0.2s ease;
}

.spi-product-carousel__dot[aria-current="true"] {
  background: var(--color-primary);
  transform: scale(1.15);
}

.spi-product-carousel__dot:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

@media (max-width: 767.98px) {
  .spi-product-carousel__btn {
    display: none;
  }
}
