@charset "UTF-8";
/* CSS Document */
.title {
  width: 80%;
  margin: 0 auto;
}
/*h1アニメーション*/
/* 見出し全体 */
.heading {
  position: relative;
  overflow: hidden;
  text-align: center;
  z-index: 1;
  padding: 20px 0;
  font-size: 1.5rem;
  margin: 50px auto;
  max-width: 800px;
}
/* 見出しテキスト（白→オレンジ） */
.heading span {
  position: relative;
  z-index: 2;
  display: inline-block;
  color: white;
  transition: color 0.2s ease;
}
/* アニメーションで白→オレンジに */
.heading.active span {
  color: #f18b00;
}
/* オレンジ背景アニメーション本体 */
.heading::before {
  content: "";
  position: absolute;
  top: 0;
  height: 100%;
  width: 0;
  background-color: #f18b00;
  z-index: 1;
  transition: none;
}
/* 左からアニメーション */
.heading.left-slide::before {
  left: 0;
}
.heading.left-slide.active::before {
  animation: slideAndShrinkLeft 1s forwards;
}
/* 右からアニメーション */
.heading.right-slide::before {
  right: 0;
  left: auto;
}
.heading.right-slide.active::before {
  animation: slideAndShrinkRight 1s forwards;
}
/* 左からスライド → 停止 → ライン化 */
@keyframes slideAndShrinkLeft {
  0% {
    left: 0;
    width: 0;
    height: 100%;
    top: 0;
  }
  50% {
    width: 100%;
    height: 100%;
    top: 0;
  }
  80% {
    width: 100%;
    height: 100%;
    top: 0;
  }
  100% {
    width: 100%;
    height: 3px;
    top: calc(100% - 3px);
  }
}
/* 右からスライド → 停止 → ライン化 */
@keyframes slideAndShrinkRight {
  0% {
    right: 0;
    width: 0;
    height: 100%;
    top: 0;
  }
  50% {
    width: 100%;
    height: 100%;
    top: 0;
  }
  80% {
    width: 100%;
    height: 100%;
    top: 0;
  }
  100% {
    width: 100%;
    height: 3px;
    top: calc(100% - 3px);
  }
}
/*h1動きここまで*/
/* メインビジュアル */
.top-img {
  margin-top: 5%;
  height: 50vh;
  background-image: url("../img/ippan-img/ippan-top.jpg");
  background-size: cover;
  background-repeat: no-repeat;
  background-position: bottom center;
  position: relative;
}
.top-img h1 {
  font-size: 4rem;
  font-weight: 500;
  position: absolute;
  bottom: 20px;
  right: 5%;
  color: #fff;
  font-family: YuMincho, "Yu Mincho", "Hiragino Mincho ProN", "serif";
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7); /* 黒い影を追加 */
}
.top-img h1 {
  font-size: 4rem;
  font-weight: 500;
  position: absolute;
  bottom: 20px;
  right: 5%;
  color: #fff;
  font-family: YuMincho, "Yu Mincho", "Hiragino Mincho ProN", "serif";
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7); /* 黒い影を追加 */
}
.top-img span {
  font-size: 2rem;
}
@media screen and (max-width: 700px) {
  .top-img h1 {
    font-size: 3rem;
    line-height: 2rem;
  }
  .top-img span {
    font-size: 1.5rem;
  }
}
.section-01 {
  margin: 0px auto;
  background-image: url("../img/alexander-wende-Hzkp3JPUxVY-unsplash.jpg");
  background-size: cover;
  background-position: center;
  position: relative;
  padding: 50px;
  overflow: hidden; /* 擬似要素はみ出し防止 */
}
/* 白いフィルター */
.section-01::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.7); /* 70%白フィルター */
  z-index: 0;
}
/* フィルターの上にコンテンツを出す */
.section-01 > * {
  position: relative;
  z-index: 1;
}
.section-01text img {
  height: 80px;
  display: block;
  margin: 0 auto 20px; /* 横中央＋下に余白 */
}
.section-01text {
  max-width: 800px;
  justify-content: center;
  margin: 20px auto;
}
.section-01text h1 {
  text-align: center;
  color: #C1B29F;
  font-family: YuMincho, "Yu Mincho", "Hiragino Mincho ProN", "serif";
}
.section-01text span {
  font-size: 1rem;
}
.section-02, .section-03 {
  width: 80%;
  margin: 0 auto;
}
.section-02-toptext {
  text-align: center;
  line-height: 2rem;
  margin-bottom: 50px;
}
.section-02 h1, .section-04 h1 {
  margin-top: 80px;
  font-size: 1.5rem;
}
/*治療内容円枠内*/
.section-02-type {
  width: 100%;
  margin: 0 auto;
  padding: 20px 0;
  box-sizing: border-box;
}
.grid-container {
  display: grid;
  grid-template-columns: repeat(3, 150px); /* 広い時は3列 */
  gap: 20px;
  justify-content: center;
}
.grid-item {
  background-color: #FFAF52;
  border-radius: 50%; /* 初期は円形 */
  width: 150px;
  height: 150px;
  padding: 15px;
  color: #fff;
  font-weight: 700;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  box-sizing: border-box;
  transition: border-radius 0.3s ease;
}
/* 狭い画面の時は2列で縦に並ぶ */
@media screen and (max-width: 600px) {
  .grid-container {
    grid-template-columns: repeat(2, 1fr); /* 2列で縦に並ぶ */
  }
  .grid-item {
    border-radius: 15px; /* 角丸四角に切り替え */
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1; /* 正方形を維持 */
  }
}
/* アニメーション初期設定 */
.grid-item {
  opacity: 0;
  transform: translateY(30px); /* 下から */
  transition: opacity 0.6s ease, transform 0.6s ease, border-radius 0.3s ease;
}
/* 表示時にふわっと表示 */
.grid-item.active {
  opacity: 1;
  transform: translateY(0);
}
/* 順番にずらして出る */
.grid-item:nth-child(1) {
  transition-delay: 0s;
}
.grid-item:nth-child(2) {
  transition-delay: 0.1s;
}
.grid-item:nth-child(3) {
  transition-delay: 0.2s;
}
.grid-item:nth-child(4) {
  transition-delay: 0.3s;
}
.grid-item:nth-child(5) {
  transition-delay: 0.4s;
}
/*治療内容円枠内ここまで*/
/*初期状態 */
.fade-up {
  opacity: 0;
  transform: translateY(50px);
  transition: opacity 1s ease, transform 1s ease;
}
/* 表示状態 */
.fade-up.show {
  opacity: 1;
  transform: translateY(0);
}
/*歯周病の症状・口腔スキャナー*/
.section-03, .section-04 {
  max-width: 1200px;
  display: flex;
  margin: 50px auto 100px;
  justify-content: center;
}
.section-03 h2 {
  color: #f18b00;
  margin-bottom: 15px;
  font-size: 1.4rem;
}
.section-03 img {
  width: 30%;
  border-radius: 20px;
  object-fit: cover;
}
.section-03-text, .section-04-text {
  text-align: left;
  margin: 30px;
  max-width: 500px;
  line-height: 2rem;
}
.section-04-text span{
	font-size: 1rem;
	color:  #F18B00;
}
@media screen and (max-width: 950px) {
  .section-03, .section-04 {
    display: block;
    text-align: center;
  }
  .section-03 img {
    width: 100%;
    max-height: 300px;
    object-fit: cover;
    margin: 0 auto;
  }
  .section-03-text {
    width: 100%;
    margin: 30px auto;
    text-align: left;
    max-width: 500px;
	}
}

.section-04 {
  display: flex;               /* 横並び */
  flex-direction: row-reverse; /* 写真を右側に配置 */
  align-items: flex-start;     /* 上揃え */
  gap: 20px;                   /* 写真とテキストの間の余白 */
}

.section-04-imgs {
  display: flex;
  flex-direction: column;      /* 縦並び */
  gap: 20px;
}

.section-04-imgs img {
  width: 250px;                /* 写真のサイズ例 */
  border-radius: 15px;
  object-fit: cover;
}

.section-04-text {
  flex: 1;                     /* テキストが残りの幅を占める */
  text-align: left;
  max-width: 500px;
}

@media screen and (max-width: 950px) {
  .section-04 {
    flex-direction: column;    /* 縦並びにする */
  }

  .section-04-text {
    width: 80%;
    margin: 30px auto;
    max-width: 500px;
    text-align: left;
  }

  .section-04-imgs img {
    width: 80%;
    margin: 0 auto;
  }
}