/* Feature Block Component */
.feature-block {
  width: 100%; /* 幅は親要素に任せる */
  height: 100%; /* 高さは親要素に任せる */
  overflow: hidden;
  display: flex;
  flex-direction: row;
  background-color: var(--color-white);
  box-shadow: 0 var(--size-4) var(--size-16) rgba(0, 0, 0, 0.1);
  transition: box-shadow 0.3s ease;
}

/* 画像右レイアウト */
.feature-block--image-right {
  flex-direction: row-reverse;
}

.feature-block:hover {
  box-shadow: 0 var(--size-8) var(--size-24) rgba(0, 0, 0, 0.15);
}

.feature-block__image {
  width: 50%;
  position: relative;
  overflow: hidden;
}

.feature-block__image img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.feature-block:hover .feature-block__image img {
  transform: scale(1.05);
}

.feature-block__content {
  width: 50%;
  padding: var(--size-40);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.feature-block__content-wrapper {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.feature-block__label {
  font-size: var(--size-14);
  color: var(--color-main-blue);
  margin-bottom: var(--size-8);
  font-weight: bold;
}

.feature-block__title {
  font-size: var(--size-24);
  font-weight: bold;
  margin: 0 0 var(--size-16) 0;
  color: var(--color-text-black);
}

.feature-block__link {
  position: relative;
  text-decoration: unset;
  display: inline-flex;
  align-items: center;
  width: var(--size-240);
  padding: var(--size-12) var(--size-20);
  border: 1px solid var(--color-text-black);
  margin-top: auto;
}

.feature-block__link:visited,
.feature-block__link:link {
  color: currentColor;
}

.feature-block__link-icon {
  position: absolute;
  right: var(--size-20);
  width: var(--size-16);
  height: var(--size-18);
  transition: transform 0.2s ease-out;
}

.feature-block__link:hover .feature-block__link-icon {
  transform: translateX(var(--size-4));
}

/* 代表挨拶用のメッセージスタイル */
.card__message {
  font-size: var(--size-14);
  line-height: 1.6;
  color: var(--color-text-gray);
  margin-bottom: var(--size-16);
}

@media screen and (max-width: 768px) {
  .feature-block {
    flex-direction: column;
    height: auto; /* モバイルでは固定高さを解除 */
  }

  /* image-rightレイアウトも標準レイアウトと同じにする */
  .feature-block--image-right {
    flex-direction: column; /* 通常の縦並びレイアウトに強制変更 */
  }

  .feature-block__image,
  .feature-block__content {
    width: 100%;
  }

  .feature-block__image {
    height: 0;
    padding-bottom: 56.25%; /* 16:9 アスペクト比 */
  }

  .feature-block__content {
    padding: var(--size-16);
  }

  .feature-block__title {
    font-size: var(--size-20);
  }

  .feature-block__link {
    width: 100%;
  }
}
