#page-main {
  opacity: 0;
  transition: opacity 1.5s ease;
}
#page-main.show {
  opacity: 1;
}


/* ===== ヘッダー ===== */

.site-header {
  background: #007acc;
  padding: 15px 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.site-header h1 {
margin: 0;
font-size: 20px;
color:#fff;
}
.site-nav a {
  color: #fff; margin-left: 15px;
  text-decoration: none; font-weight: bold;
}
.site-nav a:hover { text-decoration: underline; }



/* ===== フッター ===== */
.site-footer {
  background: #007acc;
  text-align: center;
  padding: 15px;
  margin-top: auto;
  color:#fff;
}

#scrollTopBtn {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  border: none;
  border-radius: 50%;
  background-color: #0A62A9;
  color: white;
  font-size: 22px;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.2s ease;
  z-index: 1000;
}

#scrollTopBtn:hover {
  transform: scale(1.1);
  background-color: #0d7adf;
}


@media (max-width: 800px) {
  .site-header {
    flex-direction: column; /* ← 横並び → 縦並び */
    align-items: center;
    padding: 20px 15px;
  }

  .site-header h1 {
    font-size: 24px;
    margin-bottom: 10px; /* タイトルとナビの間に余白 */
  }

  .site-nav {
    display: flex;
    flex-wrap: wrap;  /* 折り返しを許可 */
    justify-content: center;
    gap: 12px;        /* 各リンク間の間隔 */
  }

  .site-nav a {
    font-size: 18px;
    margin: 0;             /* 左余白リセット */
    padding: 6px 10px;     /* タップしやすく */
  }
}



#loadingA {
  position: fixed;
  inset: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  z-index: 9999;
  transition: opacity 0.8s ease;
}
#loadingA.fade-out {
  opacity: 0;
  pointer-events: none;
}

/* === ローディングB（テキスト） === */
#loadingB {
  position: fixed;
  inset: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  z-index: 9999;
  opacity: 0;
  transition: opacity 1s ease;
}
#loadingB.show {
  opacity: 1;
}
#loadingB.fade-out {
  opacity: 0;
  pointer-events: none;
}


/* ===== 矢印を画像に変更 ===== */
.arrow {
  position: absolute;
  bottom: 50%;
  left: 50%;
  width: 160px;
  height: 160px;
  background: url("/material/school/index_left.jpg") center/contain no-repeat;
  transform: translate(0px, 0px);
  opacity: 0;
  animation: arrowIn 0.8s ease-out forwards;
}

/* ===== 図形共通 ===== */
.intro_shape {
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  background: #0A62A9;
  opacity: 0;
  animation: intro_fall 1.5s ease-out forwards;
  transform: translate(calc(-50% + var(--x)), calc(-50% + var(--y))) rotate(var(--r, 0deg));
  position: absolute;

}

.intro_shapeA {
  top: 50%;
  left: 50%;
  width: 12px;
  height: 12px;
  background: #0A62A9;
  opacity: 0;
  animation: intro_fall 1.5s ease-out forwards;
  transform: translate(calc(-50% + var(--x)), calc(-50% + var(--y))) rotate(var(--r, 0deg));
  position: absolute;

}

.intro_shapeB {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 10px;
  height: 10px;
  background: #0A62A9;
  opacity: 0;
  animation: intro_fall 1.5s ease-out forwards;
  transform: translate(calc(-50% + var(--x)), calc(-50% + var(--y))) rotate(var(--r, 0deg));
}

/* 各形状 */
.intro_circle { border-radius: 50%; }
.intro_square { 
  transform: rotate(45deg);
}
.intro_triangle {
  width: 0; height: 0;
  border-left: 7px solid transparent;
  border-right: 7px solid transparent;
  border-bottom: 14px solid #0A62A9;
  background: none;
}
.intro_star {
  clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%,
                     79% 91%, 50% 70%, 21% 91%, 32% 57%,
                     2% 35%, 39% 35%);
}
.intro_pentagon {
  clip-path: polygon(50% 0%, 100% 38%, 82% 100%, 18% 100%, 0% 38%);
}

/* === アニメーション === */
@keyframes arrowIn {
  0% { transform: translate(-300px, 80px) ; opacity: 0; }
  100% { transform: translate(-90px, 90px) ; opacity: 1; }
}

@keyframes intro_fall {
  0% {
    transform: translate(calc(-50% + var(--x)), calc(-50% + var(--y) - 100px))
               rotate(var(--r, 0deg));
    opacity: 0;
  }
  60% { opacity: 1; }
  100% {
    transform: translate(calc(-50% + var(--x)), calc(-50% + var(--y) + 50px))
               rotate(calc(var(--r, 0deg) + 30deg));
    opacity: 1;
  }
}

/* === 本文 === */
main {
  opacity: 0;
  text-align: center;
  margin-top: 150px;
  transition: opacity 1.2s ease;
}
main.show {
  opacity: 1;
}