/* ----------------------------------------
  ホーム・スライド関連
---------------------------------------- */
.kv-main {
  position: relative;
  width: 100%;
}
.slideshow-container {
  position: relative;
  width: 90%;
  height: 80vh;
  margin: auto;
  border-radius: 20px;
  object-fit: cover;
  overflow: hidden;
}
.slide {
  position: absolute;
  width: 100%;
  opacity: 0;
  transition: opacity 1s ease-in-out;
}
.slide img {
  width: 100%;
  height: auto;
}
.active {
  opacity: 1;
}
.text-overlay {
  position: absolute;
  bottom: 30%;
  right: 0;
  background-color: #f9fbef;
  padding: 10px 20px;
  border-radius: 15px 0 0 15px;
  font-size: 2vw;
  color: #4ba810;
}
.main-button-container {
  position: absolute;
  bottom: 0;
  right: 100px;
  display: flex;
  gap: 20px;
  transform: translateY(50%);
}
.main-button-container img {
  width: 300px;
  height: auto;
  border-radius: 10px;
  box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.2);
}
.horizontal-button-container {
  display: flex;
  align-items: center;
  max-width: 100%;
  margin: auto;
  padding: 30px;
  gap: 40px;
}

.content-section {
  display: flex;
  align-items: center;
  max-width: 100%;
  padding: 50px 0;
  gap: 50px;
}
.content-section .image-container {
  flex: 1;
  overflow: hidden;
  border-radius: 15px;
}
.content-section .image-container img {
  width: 100%;
  object-fit: cover;
}
.content-section .text-container {
  flex: 1;
  margin-right: 120px;
}

.content-section-vertical {
  display: grid;
  justify-items: center;
  align-content: center;
  text-align: center;
  width: 100%;
  max-width: 90vw;
  margin: 100px auto;
  overflow-wrap: break-word;
}

.content-section-vertical img,
.content-section-vertical p,
.content-section-vertical h2 {
  max-width: 100%; /* 画面幅を超えないように */
  width: auto;
}

.text-container h2,
.content-section-vertical h2 {
  padding: 20px;
}

.button-about {
  display: inline-block;
  padding: 15px 20px;
  background: white;
  border-radius: 10px;
  border: 2px solid #4ba810;
  text-decoration: none;
  color: #333;
  margin: 0 auto;
  margin-top: 20px;
  width: 250px;
  text-align: center;
}

.services-container {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  width: 70%;
}
.service-card {
  flex: 1;
  padding: 20px;
  display: flex;
  flex-direction: column;
}
.service-title {
  height: 80px;
  border-top: 1px solid #4ba810;
  border-bottom: 1px solid #4ba810;
  font-size: 18px;
  margin-bottom: 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
}
.service-description {
  font-size: 14px;
  line-height: 1.6;
  flex-grow: 1;
  text-align: left;
  margin: 0 auto;
  width: 90%;
}

.obj-center-horizontal {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
}

.obj-center-vertical {
  display: block;
}

/* PC */
@media screen and (min-width: 769px) {
  .main-image-left {
    flex: 1;
    overflow: hidden;
    border-radius: 0 40px 40px 0;
    left: -35vw;
    top: -15px;
    object-position: 60% center; /* 画像を少し右寄りに */
  }

  .main-image-left img {
    width: 60vw;
  }
}

.address-container {
  position: relative;
  width: 100%;
  height: 540px;
  display: flex;
}

.background-image {
  position: absolute;
  right: 0;
  width: 50vw;
  height: 540px;
  object-fit: cover;
  object-position: right top;
  z-index: -1;
}

.info-box {
  position: absolute;
  top: 10%;
  left: 5%;
  background: rgba(255, 255, 230, 0.9);
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
  width: 60%;
  gap: 30px;
}

.map-container {
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  overflow: hidden;
}

.map-container iframe {
  width: 100%;
  height: 300px;
  border: 0;
}

.button-company-info {
  display: inline-block;
  padding: 15px 20px;
  background: white;
  border-radius: 10px;
  border: 2px solid #4ba810;
  text-decoration: none;
  color: #333;
  margin-top: 20px;
  width: 180px;
  text-align: center;
}

.dot-line {
  border: none;
  border-top: 2px dotted gray;
  margin: 10px 0;
}

.business-hours {
  text-align: center;
}

.business-hours table {
  width: 100%;
  border-collapse: collapse;
  text-align: center;
}

.business-hours th {
  padding: 8px;
  border-bottom: 1px solid #4ba810;
}

.business-hours td {
  padding: 8px;
  color: #4ba810;
  font-weight: bold;
}

/* モバイル */
@media screen and (max-width: 768px) {
  h2 {
    font-size: clamp(3vw, 4.4vw, 5vw);
    white-space: nowrap;
  }
  .slideshow-container {
    position: relative;
    width: 90%;
    height: 350px;
    margin: auto;
    border-radius: 20px;
  }
  .text-overlay {
    position: absolute;
    top: 30%;
    bottom: auto;
    right: 0;
    background-color: #f9fbef;
    border-radius: 15px 0 0 15px;
    font-size: clamp(14px, 2.5vw, 24px);
    color: #4ba810;
    display: inline-block;
    line-height: 1.2;
    white-space: nowrap;
    max-width: 50%;
  }

  /* メインボタン中央配置の修正 */
  .main-button-container {
    width: 90%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin: 0px auto;
    left: 0;
    right: 0;
  }
  .main-button-container img {
    width: 100%;
    /* height: auto; */
    border-radius: 10px;
    /* box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.2); */
  }

  /* セクションのコンテンツ配置を調整 */
  .content-section {
    display: block;
    align-items: center;
    width: 90%;
    margin: auto;
  }

  /* テキストコンテナの幅を調整 */
  .text-container {
    display: flex;
    width: 100%;
    text-align: start;
    padding: 30px;
    flex-direction: column;
    align-items: center;
    margin-top: 20px;
  }

  /* 説明文の幅調整 */
  .service-description {
    width: 100%;
    text-align: center;
  }

  /* 📸 画像を中央配置 */
  .main-image-left {
    margin-bottom: -40px;
    z-index: -1;
  }

  .main-image-left img {
    width: 100%;
  }

  .horizontal-button-container {
    display: grid;
    justify-items: center;
    align-content: start;
    padding: 20px;
    gap: 0;
  }

  /* サービスコンテナの幅を調整 */
  .services-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 90%;
    margin: auto;
  }

  .service-card {
    width: 100%;
    max-width: 90%;
    text-align: center;
  }

  .address-container {
    flex-direction: column;
    margin: 0 auto;
    align-items: center;
    width: 90%;
    height: auto;
  }

  .background-image {
    position: static;
    width: 100%;
    height: auto;
    object-position: 70% center;
    max-height: 300px;
  }

  .info-box {
    position: static;
    width: 100%;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
    margin: 10px auto;
  }

  .obj-center-horizontal {
    display: block;
    gap: 20px;
  }

  .map-container {
    width: 100%;
    max-width: none;
    margin-bottom: 10px;
  }

  .map-container iframe {
    height: 250px; /* モバイルでは高さを調整 */
  }

  .button-company-info {
    display: flex;
    justify-content: center;
    background: white;
    border-radius: 10px;
    border: 2px solid #4ba810;
    color: #333;
    margin-bottom: 20px;
    width: 120px;
    text-align: center;
  }
}
