.goyaku-wrapper {
  display: grid;
  gap: 24px;
  /* margin: 0 auto; */
  /* max-width: 100%; */
  /* デフォルトは3列に */
  width: auto;
  grid-template-columns: repeat(3, 1fr);
}

/* 画面幅が800px以下になったら2列に */
/* @media (max-width: 800px) {
  .goyaku-wrapper {
    grid-template-columns: repeat(2, 1fr);
  }
} */

/* タブレット向け */
@media screen and (max-width: 800px) {
  .goyaku-wrapper {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
}
@media screen and (max-width: 767px) {
  .goyaku-wrapper {
    grid-template-columns: repeat(1, 1fr);
    gap: 20px;
  }

  .goyaku-back img {
    /* 縦横比でサイズが変わりまくる(特にスマホ)なので、無効化する */
    display: none;
  }
}
@media screen and (max-width: 480px) {
  .goyaku-wrapper {
    grid-template-columns: repeat(1, 1fr);
    gap: 10px;
  }

  .goyaku-back img {
    /* 縦横比でサイズが変わりまくる(特にスマホ)なので、無効化する */
    display: none;
  }

  .goyaku-item {
    max-width: 100%;
    width: 100%;
  }
}

.goyaku-item {
  width: 100%;
  height: auto;
  border-radius: 15px;
  padding: 30px;
  box-sizing: border-box;
  border: 1.5px solid var(--color-border-dark);
  background-color: #fffdfa;
  position: relative;
}

.goyaku-icon {
  display: flex;
  justify-content: center; /* Horizontal center */
  align-items: center; /* Vertical center */
  height: 100%; /* Ensure parent has a defined height */
}

.goyaku-icon img {
  /* position: relative; */
  /* width: 100%; */
  max-width: 100%; /* 親要素に合わせるため制限を解除 */
  height: auto; /* アスペクト比を保つ */
  display: block;
  margin: 0 auto;
  object-fit: contain; /* 画像が親に合わせてトリミングされる（img要素の場合） */
}

.goyaku-item span {
  position: relative;
  /* padding: 1.5rem 2rem; */
  padding-bottom: 5px;
  margin-bottom: 20px;
  border: 3px solid;
  border-color: transparent transparent #d8d8d8 transparent;
  /* border-radius: 10px; */
  /* background: #f9f9f9; */
  font-size: 1.8rem;
  display: block;
}

.goyaku-item span:before {
  position: absolute;
  bottom: -14px;
  left: 1em;
  width: 0;
  height: 0;
  content: "";
  border-width: 14px 12px 0 12px;
  border-style: solid;
  border-color: #d8d8d8 transparent transparent transparent;
}

.goyaku-item span:after {
  position: absolute;
  bottom: -10px;
  left: 1em;
  width: 0;
  height: 0;
  content: "";
  border-width: 14px 12px 0 12px;
  border-style: solid;
  border-color: #f9f9f9 transparent transparent transparent;
}

.goyaku-back img {
  position: absolute;
  /* 縦横比でサイズが変わりまくる(特にスマホ)なので、無効化する */
  /* display: none; */
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  margin: auto;
  width: 80%;
  height: 80%;
  object-fit: contain; /* 画像全体を表示(余白可能) */
  z-index: 0;
  opacity: 0.6;
}

.goyaku-txt {
  position: relative;
  font-size: 1.1rem;
  line-height: 1.7;
  z-index: 1;
}
