/* 基本スタイル */
body {
  margin: 0;
  min-height: 100vh;
  background-image: url('img/foot.png'), url('img/sky_01.png');
  background-size: auto, cover;
  background-position: calc(50% - 10%), top;
  background-repeat: repeat-y, no-repeat;
  background-attachment: scroll, fixed; /* foot.pngはスクロールし、sky_01.pngは固定 */
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}
/* ベースのスタイル */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body {
  font-family: Arial, sans-serif;
}
header {
  position: relative;
}
.navbar {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 70px;
  background-color: rgba(40, 150, 240, 0.5); /* 青色で透過 */
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  font-family: YuGothic, "Yu Gothic medium", "Hiragino Sans", Meiryo, sans-serif;
}
.navbar .logo img {
  height: 30px;
  position: absolute;
  left: calc(50% - 400px); /* センターから左500px */
  top: 20px;
}
.nav-links {
  display: flex;
  gap: 30px;
  margin-left: 250px; /* センターから右500px */
}
.nav-links li {
  list-style: none;
}
.nav-links a {
  text-decoration: none;
  white-space: nowrap;
  color: white;
  font-size: 16px;
  padding: 10px;
  transition: background-color 0.3s;
  margin-right: -10px;
  font-family: YuGothic, "Yu Gothic medium", "Hiragino Sans", Meiryo, sans-serif;
}
.nav-links a:hover {
  color: rgba(255, 255, 255, 0.8);
}
.dropdown {
  position: relative;
}
.dropdown-content {
  display: none;
  position: absolute;
  top: 110%;
  left: 10%;
  background-color: rgba(40, 150, 240, 0.5);
  min-width: 200px;
  border-radius: 5px;
  box-shadow: 0 8px 16px rgba(49, 75, 87, 0.3);
}
.dropdown:hover .dropdown-content {
  display: block;
}
.dropdown-content a {
  padding: 12px;
  text-align: left;
  display: block;
}
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
}
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  position: relative; /* absolute ではなく relative を使用 */
  z-index: 10; /* 他の要素より前面に表示 */
}
.hamburger span {
  display: block;
  width: 35px; /* 幅を少し広げる */
  height: 5px; /* 高さを少し増やす */
  background-color: white;
  border-radius: 2.5px;
  transition: transform 0.3s ease, opacity 0.3s ease;
  transform-origin: center center; /* 回転の基準を中央に */
}
.hamburger.open span:nth-child(1) {
  transform: rotate(45deg) translateY(13.5px); /* 位置を少し調整 */
}
.hamburger.open span:nth-child(2) {
  opacity: 0;
}
.hamburger.open span:nth-child(3) {
  transform: rotate(-45deg) translateY(-13.5px); /* 位置を少し調整 */
}
h6   {
    font-size: large;
    font-weight: bold;
    font-family: YuGothic, "Yu Gothic medium", "Hiragino Sans", Meiryo, sans-serif;
    margin-bottom: 10px;
    line-height: 200%;
    text-shadow: 0px 0px;
}
@media screen and (max-width:600px){
  .navbar .logo img {
    position: absolute;
    left: 10px;
    top: 20px;
  }
  .nav-links {
    display: none;
    flex-direction: column;
    gap: 15px;
    position: absolute;
    top: 80px;
    right: 0;
    background-color: rgba(40, 150, 240, 0.5);
    width: 100%;
    padding: 20px;
    text-align: right;
  }
  .nav-links.active {
    display: flex;
  }
  .hamburger {
    display: flex;
    position: absolute;
    top: 20px;
    right: 20px; /* 画面右端に余裕を持たせる */
  }
  .dropdown-content {
    position: static;
    display: none;
    width: 100%;
    background-color: transparent;
    box-shadow: none;
  }
  .dropdown-content a {
    color: white;
    padding: 12px 20px;
    display: block;
    text-align: right;
  }
  .dropdown:hover .dropdown-content {
    display: block;
  }
}
/* 画像コンテナ */
.image-container {
  position: relative; /* 親要素にpositionを追加 */
  width: 100%;
  height: 700px; /* 画面全体の高さに合わせる */
  margin-bottom: 0PX;
}
.image-container-top {
  position: relative; /* 親要素にpositionを追加 */
  width: 100%;
  height: 600px; /* 画面全体の高さに合わせる */
  margin-bottom: 0PX;
}
/* 本のコンテナ */
.book-container {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 1000px;
  height: auto;
  margin-top: 80px;
}
/* 本の画像 */
.book {
  width: 100%;
  height: auto;
  display: block;
}
/* ロゴのスタイル */
.book-container header .logo {
  position: absolute; /* 中央揃え */
  z-index: -1;
  left: 30px;
  top: 20px;
  animation: scaleAnimation 2s ease-in-out infinite alternate;
}
/* 拡大アニメーション */
@keyframes scaleAnimation {
  from {
    transform: scale(1);
  }
  to {
    transform: scale(1.1);
  }
}
.howto, .goods, .voice , .topics{
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
}
.howto {
  left: 10%;
  top: 300px;
  animation: scaleAnimation 2s ease-in-out infinite alternate;
}
.goods {
  left: 30%; /* 中央に配置 */
  top: 400px;
  transform: translateX(-50%) translateY(-50%); /* 中央揃え */
  animation: scaleAnimation 2s ease-in-out infinite alternate;
}
.voice {
  right: 20%;
  top: 350px;
  animation: scaleAnimation 2s ease-in-out infinite alternate;
}
.topics {
    top: 250px;
    animation: scaleAnimation 2s ease-in-out infinite alternate;
    right: 10%;
}
/* イントロコンテンツのコンテナ */
.intro-container {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 20px;
    max-width: 800px;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    margin-top: 100px;
    margin-bottom: 50px;
}
.fade-in {
  opacity: 0;
  transform: translateY(20px); /* 下から浮き上がるような効果 */
  transition: opacity 1s ease-out, transform 1s ease-out;
}
.fade-in.show {
    opacity: 1;
    transform: translateY(0);
}
/* ページ内のコンテンツ配置 */
.main-container {
    display: flex;
    justify-content: flex-start;
    align-items: flex-end;
    gap: 40px;
    max-width: 800px;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 20px;
    margin-top: 100px;
}
/* 左側のコンテンツ（画像） */
.main-content-left {
  flex: 0 0 auto;
  filter: drop-shadow(4px 4px 6px rgba(49, 75, 87, 0.3));
}
/* 右側のコンテンツ（テキストとボタン） */
.main-content-right {
  flex: 1;
  text-align: left;
}

.main-container2 {
  display: flex;
  justify-content: flex-start;
  align-items: flex-end;
  gap: 40px;
  max-width: 800px;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 100px;
  margin-top: 100px;
}
/* 左側のコンテンツ（テキストとボタン） */
.main-content-left2 {
  flex: 1;
  text-align: left;
}
/* 右側のコンテンツ（画像） */
.main-content-right2 {
  flex: 0 0 auto;
  filter: drop-shadow(4px 4px 6px rgba(49, 75, 87, 0.3));
}
/* howto_illust.png、goods_illust.png、voice_illust.png にフェードイン + 浮遊アニメーションを適用 */
.main-content-right img[src*="howto_illust.png"], .main-content-left2 img[src*="goods_illust.png"], .main-content-right img[src*="voice_illust.png"] {
  opacity: 0;
  transform: translateY(50px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}
/* スクロール時に表示（フェードイン & 浮遊アニメーション開始） */
.main-content-right.show img[src*="howto_illust.png"], .main-content-left2.show img[src*="goods_illust.png"], .main-content-right.show img[src*="voice_illust.png"] {
  opacity: 1;
  transform: translateY(0);
  animation: floatAnimation 2s ease-in-out infinite;
}
/* 上下に揺れるアニメーション */
@keyframes floatAnimation {
  0% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
  100% {
    transform: translateY(0);
  }
}
/* 上下に揺れるアニメーション */
@keyframes bounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}
/* トップに戻るボタンのスタイル */
#back-to-top {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(400px);
  background: none; /* 背景を消す */
  border: none;
  display: none;
  cursor: pointer;
  z-index: 1000;
}
/* ボタン内の画像にアニメーションを適用 */
#back-to-top img {
  animation: bounce 1.5s infinite ease-in-out;
}
/* リンクボタン画像のスタイル */
.link-button-image {
  margin-top: 10px;
  transition: opacity 0.3s ease;
  filter: drop-shadow(4px 4px 6px rgba(49, 75, 87, 0.3));
}
/* 画像リンクのホバー時の効果 */
.link-button-image:hover {
  opacity: 0.7;
}
/* pタグの基本スタイル */
p {
  width: 100%;
  font-family: YuGothic, "Yu Gothic medium", "Hiragino Sans", Meiryo, sans-serif;
  font-size: large;
  font-weight: normal;
  text-align: justify;
  margin: 0;
  line-height: 200%;
}
/* モバイル対応 */
@media (max-width:600px){
  .book-container {
    height: 600px;
  }
  .book-container .book-picture .book {
    position: relative;
  }
  .book-container a .howto {
    position: absolute;
    top: 200px;
    left: 10%;
  }
  .book-container a .goods {
    position: absolute;
    top: 330px;
    right: 5%;
  }
  .book-container a .voice {
    top: 460px;
    position: absolute;
    left: 10%;
  }
  .intro-container {
    flex-direction: column;
    align-items: center;
  }
  p {
    padding-left: 50px;
    padding-right: 50px;
    text-align: justify;
    font-size: medium;
  }
  .main-container {
    flex-direction: column-reverse;
    align-items: center;
    gap: 30px;
    margin-top: 50px;
  }
  .main-content-left, .main-content-right {
    width: 100%;
    text-align: center;
    margin-top: 0;
    margin-right: 0;
    margin-left: 0;
    margin-bottom: 50px;
  }
.main-container .main-content-left .fade-in {
    width: 80vw;
    margin-top: 10px;
}
.main-container2 .main-content-right2 .fade-in {
    width: 80vw;
    margin-top: 10px;
}
  .main-container2 {
    flex-direction: column;
    align-items: center;
    gap: 30px;
    margin-top: -20px;
  }
  .main-content-left2, .main-content-right2 {
    width: 100%;
    text-align: center;
    margin-right: 30px;
    margin-left: 30px;
  }
	
  .footer-divider {
    display: none;
  }
  .footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    font-size: 12px;
    line-height: 01;
  }
  .footer-left {
    display: flex;
    flex-direction: column; /* 子要素を縦並びに */
    gap: 5px; /* リンクの間隔を調整 */
    text-align: center;
  }
  .footer-left a {
    margin: 0; /* リンクの間隔を調整 */
    padding: 5px 0; /* 上下のパディングを追加 */
  }
  .footer-right {
    order: 2; /* フッター右側を下に配置 */
    width: 100%;
    text-align: center;
    margin-top: 10px;
  }
  .image-container {
    height: 500px;
  }
  .hide-on-mobile {
    display: none;
  }
.main-container .main-content-left img {
    width: 80vw;
    margin-top: 20px;
}
.main-container2 .main-content-right2 img {
    width: 80vw;
    margin-top: 20px;
}
.intro-container div .fade-in {
    width: 80vw;
    margin-bottom: -30px;
    height: auto;
}
  #back-to-top {
    left: auto !important;
    right: 10px !important;
	bottom: 10px !important;
    transform: none !important;
  }
.book-container a .topics {
    top: 150px;
    right: 5%;
}
}
