#zigyou1 {
    width: 100%;
    min-height: 830px; 
    height: auto;
    overflow: hidden;
    background-image: url(../img/service.png);
    background-size: 100% auto;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    background-color: #f5f5f5;
  }


.service-title {
    padding-top: 40px;
    position: relative;
    text-align: center;
    margin-bottom: 20px;
}

/* 会社概要のスタイル */
.service-title h2 {
    font-size: 32px;
    font-weight: bold;
    color: #333;
    display: inline-block;
    padding-bottom: 10px;
    position: relative;
}

.service-title h2::after {
    content: "";
    display: block;
    width: 100%; /* h2の幅に合わせる */
    height: 3px; /* 線の太さ */
    background-color: black; /* 黒色の線 */
    position: absolute;
    bottom: 0;
    left: 0;
}

#scroll_circle1 {
    width:200px;
    height: 200px;
    margin-left: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
}

#scroll_circle1 img {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
}

#scroll_circle2 {
    width:200px;
    height: 200px;
    margin-left: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
}

#scroll_circle2 img {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
}

#scroll_circle3 {
    width:200px;
    height: 200px;
    margin-left: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
}

#scroll_circle3 img {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
}

#scroll_circle4 {
    width:200px;
    height: 200px;
    margin-left: 150px;
    display: flex;
    justify-content: center;
    align-items: center;
}

#scroll_circle4 img {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
}

#scroll_circle5 {
    width:200px;
    height: 200px;
    margin-left: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
}

#scroll_circle5 img {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
}



.flex-container1,
.flex-container2 {
  display: flex;
  justify-content: left;
  gap: 0px;
  margin-top: 20px;
}

.anim-box {
    padding: 10px;  /* 拡大時の余白を確保 */
  }
.anim-box img {
  width: 100px;         /* 適切なサイズに調整 */
  height: 100px;
  border-radius: 50%;   /* 丸く表示 */
  object-fit: cover;
  transition: transform 0.3s ease;
  cursor: pointer;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.anim-box img:hover {
  transform: scale(1.1);
}


.service_left {
    display: flex;
    justify-content: space-between; /* 左右に分ける */
    align-items: center;            /* 縦中央揃え */
    padding: 30px;
    flex-wrap: wrap;
}

.image-group {
    display: flex;
    flex-direction: column;
}

.flex-container1,
.flex-container2 {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.textarea {
    background-color: rgb(255, 255, 255,0.9);/*テキストエリアの背景*/
    border-radius: 100px; /* 値を調整して丸みの度合いを変えられます */
}


.text-container {
    position: relative;
    max-width: 500px;
    width: 400px;
    color: #333;
    background-color: rgba(255, 255, 255, 0.9);
    padding: 10px 15px;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    margin-top: 100px;
    margin-right: 50px; /* 右端の余白 */
}

.text1 {
    display:block;
    margin: 5px 0;
    font-size: 16px;
    line-height: 1.5;
}

.text2{
    display: none;
    margin: 5px 0;
    font-size: 16px;
    line-height: 1.5;
}
.text3 {
    display: none;
    margin: 5px 0;
    font-size: 16px;
    line-height: 1.5;
}
.text4 {
    display: none;
    margin: 5px 0;
    font-size: 16px;
    line-height: 1.5;
}

.text5 {
    display: none;
    margin: 5px 0;
    font-size: 16px;
    line-height: 1.5;
}

#title_word1 {
    display: block; /* 初期状態で非表示 */
    position: absolute;
    left: 0%;
    top: -30%;
    transform: translateY(-50%);
    width: 400px;
    color: #333;
    padding: 15px;
    border-radius: 5px;
    font-size: 40px;
    text-align: center;
}

#title_word2 {
    display: none; /* 初期状態で非表示 */
    position: absolute;
    left: 0%;
    top: -30%;
    transform: translateY(-50%);
    width: 400px;
    color: #333;
    padding: 15px;
    border-radius: 5px;
    font-size: 40px;
    text-align: center;
}
#title_word3 {
    display: none; /* 初期状態で非表示 */
    position: absolute;
    left: 0%;
    top: -30%;
    transform: translateY(-50%);
    width: 400px;
    color: #333;
    padding: 15px;
    border-radius: 5px;
    font-size: 40px;
    text-align: center;
}
#title_word4 {
    display: none; /* 初期状態で非表示 */
    position: absolute;
    left: 0%;
    top: -30%;
    transform: translateY(-50%);
    width: 400px;
    color: #333;
    padding: 15px;
    border-radius: 5px;
    font-size: 40px;
    text-align: center;
}
#title_word5 {
    display: none; /* 初期状態で非表示 */
    position: absolute;
    left: 0%;
    top: -30%;
    transform: translateY(-50%);
    width: 400px;
    color: #333;
    padding: 15px;
    border-radius: 5px;
    font-size: 40px;
    text-align: center;
}




@media screen and (max-width: 1300px) {
  #zigyou1 {
    min-height: 1500px;
    background-size: cover;
    padding: 0 0 30px 0;
  }
  .service_left {
    flex-direction: column;
    align-items: flex-start;
    padding: 20px 10px;
  }
  .image-group {
    flex-direction: row;
    flex-wrap: wrap;
    width: 100%;
    justify-content: center;
    align-items: center;
  }
  .text-container {
    max-width: 800px;
    width: 90vw;
    margin: 30px auto 0 auto;
    padding: 10px 5px;
    font-size: 15px;
    position: static;
  }
  #title_word1,
  #title_word2,
  #title_word3,
  #title_word4,
  #title_word5 {
    width: 90vw;
    max-width: 700px;
    font-size: 28px;
    left: 0;
    top: -20%;
    padding: 10px 0;
    position: static;
    transform: none;
    text-align: center;
  }
}




/* ...既存のコード... */

@media screen and (max-width: 855px) {
   #zigyou1 {
    min-width: 0;
    width: 98vw;      /* 横幅を画面より少し小さく */
    max-width: 98vw;  /* はみ出し防止 */
    min-height: 500px;
    background-size: cover;
    padding: 0 0 30px 0;
    margin: 0 auto;   /* 中央寄せ */
    box-sizing: border-box;
  }
  .service_left {
    flex-direction: column;
    align-items: flex-start;
    padding: 10px;
  }
  .image-group {
    flex-direction: row;
    flex-wrap: wrap;
    width: 100%;
    justify-content: center;
    align-items: center;
  }
  .flex-container1,
  .flex-container2 {
    flex-direction: row;
    gap: 5px;
    margin-top: 10px;
    margin-bottom: 0;
    justify-content: center;
  }
  #scroll_circle1,
  #scroll_circle2,
  #scroll_circle3,
  #scroll_circle4,
  #scroll_circle5 {
    width: 90px;
    height: 90px;
    margin-left: 5px;
    margin-right: 5px;
  }
  #scroll_circle1 img,
  #scroll_circle2 img,
  #scroll_circle3 img,
  #scroll_circle4 img,
  #scroll_circle5 img,
  .anim-box img {
    width: 90px;
    height: 90px;
  }
  .text-container {
    max-width: 100%;
    width: 95vw;
    margin: 30px auto 0 auto;
    padding: 10px 5px;
    font-size: 14px;
  }
  #title_word1,
  #title_word2,
  #title_word3,
  #title_word4,
  #title_word5 {
    width: 95vw;
    font-size: 22px;
    left: 0;
    top: -20%;
    padding: 10px 0;
  }
}