/* 全体のエリア */
.service-section {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 24px;
}

/* Grid：3 欄 */
.service-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3px;
  /* 卡片間距 */
}

/* カードリンク */
.card-link {
  text-decoration: none;
  color: inherit;
  display: block;
  transition: transform 0.3s ease;
}

.card-link:hover {
  transform: translateY(-2px);
}

/* 卡片本体 */
.card {
  position: relative;
  display: flex;
  min-height: 200px;
  border: 2px solid #cdebea;
  border-radius: 8px;
  overflow: hidden;
  background: linear-gradient(135deg, #ffffff 0%, #f8fffe 100%);
  margin-bottom: 45px;
  transition: box-shadow 0.3s ease, background 0.3s ease;
}

.card-link:hover .card {
  box-shadow: 0 4px 12px rgba(95, 196, 197, 0.3);
  background: linear-gradient(135deg, #f0fffe 0%, #e8fffd 100%);
}

/* 左側の文字エリア */
.text-area {
  position: relative;
  z-index: 1;
  /* カードの上に表示 */
  flex: 1;
  padding: 12px 14px;
  padding-right: 32%;
  /*右側の余白 */
}

.card-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
}

.card-text {
  font-size: 14px;
  line-height: 1.6;
  font-weight: 600;
}

/* 右側写真 placeholder：灰色 + 斜の線 */
.image-area {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 40%;
  /* 灰色側*/
  background-color: #d9d9d9;
  clip-path: polygon(55% 0, 100% 0, 100% 100%, 0 100%);
  /*      　　　　　　  ↑ 線の角 */
}

/* 斜切遮罩 */
.image-area::before {
  content: "";
  position: absolute;
  inset: 0;
  background-color: #d9d9d9;
  clip-path: polygon(30% 0, 100% 0, 100% 100%, 0 100%);
}

/* サービスの写真 */

.image-house::before {
  background-image: url("../img/image-house.png");
  background-size: cover;
  background-position: center;
}

.image-office::before {
  background-image: url("../img/image-office.png");
  background-size: cover;
  background-position: 70%;
}

.image-mansion::before {
  background-image: url("../img/image-mansion.png");
  background-size: cover;
  background-position: center;
}

.image-pest::before {
  background-image: url("../img/image-pest.png");
  background-size: cover;
  background-position: center;
}

.image-hospital::before {
  background-image: url("../img/image-hospital.png");
  background-size: cover;
  background-position: center;
}

.image-support::before {
  background-image: url("../img/image-support.png");
  background-size: cover;
  background-position: center;
}

.image-ihin::before {
  background-image: url("../img/image-ihin.png");
  background-size: cover;
  background-position: center;
}

.image-gomi::before {
  background-image: url("../img/image-gomi.png");
  background-size: cover;
  background-position: center;
}

.image-grease::before {
  background-image: url("../img/image-grease.png");
  background-size: cover;
  background-position: center;
}

/*ボタン*/
.form-btn-container {
  position: relative;
  /* 這句很重要！ */
  width: 100%;
  /* 看你的區塊寬度 */
  padding-bottom: 150px;
  position: relative;
  background-color: #ffffff;
}

.to-form-btn {
  padding-top: 50px;
  border: none;
  background: none;
  cursor: pointer;
  position: absolute;
  right: 0;
}

/* ボタン内のSVGにホバー効果を追加 */
.to-form-btn svg {
  transition: all 0.3s ease;
}

.to-form-btn:hover svg {
  transform: translateY(-2px);
  filter: drop-shadow(0 4px 12px rgba(95, 196, 197, 0.3));
}

/* ホバー時に背景色を変更 */
.to-form-btn:hover svg rect {
  fill: #f0fffe;
  transition: fill 0.3s ease;
}

/* 矢印が左から右へ移動するアニメーション */
@keyframes arrowSlideIn {
  0% {
    opacity: 1;
    transform: translateX(-30px);
  }

  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

/* ホバー時に矢印を消して左から再び現れる */
.to-form-btn:hover svg path[fill="#73E0E1"] {
  animation: arrowSlideIn 0.6s ease-out;
}

/* 平板：2 欄 */
@media (max-width: 1024px) {
  .service-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* 手機：1 欄，しゃ */
@media (max-width: 1300px) {
  .service-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 460px) {
  .service-section {
    margin: 0 auto;
  }

  .service-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .card {
    height: 100%;
  }
}