/* sub0401 - インプラント前のチェックリスト（既往症カードスライダー） */

.p0401-risk {
  width: 100%;
  background-color: #ffffff;
  padding: 56px 0 72px;
  overflow: hidden;
}

/* .swiper 는 overflow:hidden 이므로, 패딩이 없으면 카드의 그림자가 잘린다.
   패딩 박스까지 클리핑되므로 상하 패딩으로 그림자 영역을 확보한다. */
.p0401-risk__swiper {
  padding: 24px 0 56px;
}

.p0401-risk__swiper .swiper-slide {
  width: 300px;
  height: auto;
  display: flex;
}

/* 확대된 활성 카드가 이웃 카드 위에 오도록 한다 */
.p0401-risk__swiper .swiper-slide-active {
  z-index: 2;
}

/* 카드 */
.p0401-card {
  display: flex;
  flex-direction: column;
  width: 100%;
  box-sizing: border-box;
  background-color: #ffffff;
  border: 1px solid #e8f1fb;
  border-radius: 20px;
  box-shadow: 0 10px 34px rgba(56, 132, 208, 0.08);
  padding: 34px 26px 38px;
  color: #858585;
  transform: scale(0.82);
  transition: transform 0.45s ease, color 0.45s ease, border-color 0.45s ease,
    box-shadow 0.45s ease;
}

.p0401-risk__swiper .swiper-slide-active .p0401-card {
  transform: scale(1);
  color: #333333;
  border-color: #cfe4f9;
  box-shadow: 0 16px 46px rgba(56, 132, 208, 0.18);
}

/* 아이콘 : SVG를 마스크로 사용해 활성/비활성 색을 전환한다 */
.p0401-card__icon {
  align-self: flex-end;
  flex-shrink: 0;
  width: 88px;
  height: 88px;
  background-color: #b6d1ee;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: contain;
  mask-size: contain;
  transition: background-color 0.45s ease;
}

.p0401-risk__swiper .swiper-slide-active .p0401-card__icon {
  background-color: #3884d0;
}

.p0401-card__title {
  margin: 28px 0 0;
  font-family: "Noto Sans JP", sans-serif;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: -0.01em;
  color: inherit;
}

.p0401-card__text {
  margin: 16px 0 0;
  font-family: "Noto Sans JP", sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 2;
  color: inherit;
}

.p0401-card__text strong {
  font-weight: 700;
  color: inherit;
}

/* 모바일에서는 강제 줄바꿈을 해제하고 자연스럽게 흐르도록 한다 */
.p0401-card__text br {
  display: none;
}

@media (min-width: 768px) {
  .p0401-risk {
    padding: 72px 0 96px;
  }

  .p0401-risk__swiper .swiper-slide {
    width: 400px;
  }

  .p0401-card {
    border-radius: 24px;
    padding: 46px 36px 52px;
  }

  .p0401-card__icon {
    width: 124px;
    height: 124px;
  }

  .p0401-card__title {
    margin-top: 36px;
    font-size: 32px;
  }

  .p0401-card__text {
    margin-top: 20px;
    font-size: 16px;
  }

  .p0401-card__text br {
    display: inline;
  }
}

@media (min-width: 1280px) {
  .p0401-risk {
    padding: 90px 0 120px;
  }

  .p0401-risk__swiper .swiper-slide {
    width: 513px;
  }

  /* 세로 여백을 위아래 17px 씩 추가해 카드 높이를 5% 높인다 (675px → 709px) */
  .p0401-card {
    border-radius: 28px;
    padding: 75px 52px 91px 68px;
    transform: scale(0.75);
  }

  .p0401-risk__swiper {
    padding: 30px 0 76px;
  }

  .p0401-card__icon {
    width: 167px;
    height: 167px;
  }

  .p0401-card__title {
    margin-top: 43px;
    font-size: 42px;
  }

  .p0401-card__text {
    margin-top: 24px;
    font-size: 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .p0401-card,
  .p0401-card__icon {
    transition: none;
  }
}
