/*****************************************************************
全てに適用
*****************************************************************/
html,
body {
  height: 100%;
  overflow: hidden;
}
.container {
  display: flex;
  min-height: 100vh;
}
section {
  position: relative;
}
svg.icon {
  stroke: currentColor;
  fill: none;
}
svg.icon-blue {
  color: #0087ce;
}
/* スキップリンク：通常は画面外に退避 */
.skip-link {
  position: absolute;
  left: -999px;          /* 画面外に */
  top: 0;
  z-index: 1000;
  padding: 0.5em 1em;
  background: #0087ce;   /* ブランドカラーに合わせて調整 */
  color: #fff;
  text-decoration: none;
  border-radius: 4px;
  font-weight: 600;
  font-size: 0.9rem;
}

/* フォーカス時にだけ画面内に表示 */
.skip-link:focus,
.skip-link:focus-visible {
  left: 10px;            /* 画面の左上あたりに表示 */
  top: 10px;
  outline: 3px solid #fff;
  outline-offset: 2px;
}

.relative {
  position: relative;
}
.chara {
  position: absolute;
  top: -10px;
  right: 10px;
  width: auto;
  height: 80px;
  transform-origin: bottom center;
  animation-delay: 0s;
}
.chara.down {
  top: 10px;
}
.chara.swing {
  animation: swing 2s ease-in-out infinite alternate;
}
.chara.floating {
  animation: floating 1.2s ease-in-out infinite alternate;
}
.voice .chara {
  top: auto;
  bottom: 20px;
  z-index: 10;
}

/* アニメーション */
@keyframes swing {
    0%,100% {
        transform: rotate(3deg)
    }

    50% {
        transform: rotate(-3deg)
    }
}
@keyframes floating {
    0% {
        transform: translateY(-3%);
    }

    100% {
        transform: translateY(3%);
    }  
}
@keyframes revealLogo {
    0% {
      clip-path: inset(0 100% 0 0);
    }

    /* 50%時点でまだ少ししか開かない */
    50% {
      clip-path: inset(0 90% 0 0);
    }

    /* 後半で一気に開く */
    100% {
      clip-path: inset(0 0 0 0);
    }
  }
@keyframes flashing {
    0% {
      opacity: 0;
    }

    20% {
      opacity: 1;
    }

    70% {
      opacity: 0;
    }

    100% {
      opacity: 1;
    }
  }


/* main */
main {
  order: 2;
  flex: 0 0 500px; 
  max-width: 500px;      /* PC での最大幅 */
  min-width: 375px;      /* PC での最小幅 */
  width: 100%;
  height: 100vh;  
  margin: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
  box-shadow: rgba(149, 157, 165, 0.2) 0px 8px 24px;
}
main > header {
  position: sticky;
  top: 0;
  z-index: 20;  
  background-color: #fff;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  height: 4rem !important;
  flex: 0 0 4rem; 
}
main header h1 {
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: calc(100% - 5.5rem);
  margin-left: 0.5rem;
  margin-bottom: 0;
}
main nav .nav-contents {
  display: none;
  position: absolute;
  top: 4rem;
  left: 0;
  right: 0;
  width: 100%;
  height: calc(100vh - 4rem);
  background-color: #d0ebf9;
  z-index: 9999;
  overflow-y: auto;  
}
body.drawer-opened main nav.type1 .nav-contents {
  display: block;
}
body.drawer-opened main {
  overflow: hidden;              /* ← mainのスクロールを止める */
}
body.drawer-opened nav.type1 .nav-contents > ul {
  color: #333;
}
body.drawer-opened nav.type1 .nav-2 a {
  border: none;
}
body.drawer-opened nav.type1 .nav-2 .home {
  margin-top: 50px;
}
body.drawer-opened nav.type1 .nav-2 .home a {
  width: max-content;
  padding: 10px 20px;
  display: block;
  margin-inline: auto;
}
body.drawer-opened nav.type1 .nav-2 .sns {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 10px;
}
body.drawer-opened nav.type1 .nav-2 .sns a {
  font-size: 32px;
  width: max-content;
}
main nav #nav_icon {
  display: block;
  top: 0;
  right: 0;
  height: 4rem;
  width: 4rem;
  background-color: #d0ebf9;
  border: none;
}
main nav #nav_icon .menu-ic {
  top: 2em;
  left: 1em;
  background-color: #0087ce;
}
main nav .nav-contents ul li a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
/* main .site-content */
main .site-content {
  flex: 1 1 auto;
  overflow-y: auto; 
  -webkit-overflow-scrolling: touch; 
}
main .site-content h2 {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 1.5rem;
  font-weight: bold;
}
main .site-content .hero {
  display: none;
}
/* 制服紹介 */
main .site-content .uniform .uniform-wrap {
  padding-inline: 20px;
}
main .site-content .uniform .m-top-30 {
  margin-top: 30px;
}
main .site-content .uniform .m-top-50 {
  margin-top: 50px;
}
main .site-content .uniform .m-bottom-50 {
  margin-bottom: 50px;
}
main .site-content .uniform img {
  margin-bottom: 20px;
}
main .site-content .uniform h3 {
  font-size: 1.25rem;
  font-weight: bold;
  color: #0087ce;
  text-align: center;
  padding: 5px;
  margin: 10px auto;
  border: 1px solid #0087ce;
  border-radius: 10px;
}
main .site-content .uniform .swiper-slide {
  opacity: 0.3;
}
main .site-content .uniform .swiper-slide-active {
  opacity: 1;
}
main .site-content .uniform .swiper-button-prev,
main .site-content .uniform .swiper-button-next {
  width: 48px;
  height: 48px;
}
/* 丸（●）を作る */
main .site-content .uniform .swiper-button-prev::before,
main .site-content .uniform .swiper-button-next::before {
  content: "";
  position: absolute;
  inset: 0;
  background: #0087ce; /* ●の色（調整可） */
  border-radius: 50%;
  z-index: 1;
}
/* 標準の矢印（Swiperが持っているもの） */
main .site-content .uniform .swiper-button-prev::after,
main .site-content .uniform .swiper-button-next::after {
  font-size: 18px;        /* 矢印サイズ */
  color: #fff;            /* 矢印色 */
  position: relative;
  z-index: 2;             /* ●より前面 */
}

/* 長崎精道小・中学校の1日 */
main .site-content .oneday {
  padding: 40px 20px;
  background-color: #e1f0f8;
}
main .site-content .oneday h3 {
  font-size: 1.25rem;
  font-weight: bold;
  color: #0087ce;
  padding-bottom: 10px;
  margin-top: 30px;
  margin-bottom: 20px;
  border-bottom: 1px solid #0087ce;
}
main .site-content .oneday h3 span {
  font-size: 1rem;
  color: #333;
  margin-left: 10px;
}
main .site-content .oneday h4 {
  font-size: 1rem;
  font-weight: bold;
  color: #0087ce;
  margin-top: 1rem;
}
main .site-content .oneday h4 span{
  font-weight: normal;
  color: #333;
}
main .site-content .oneday p {
  margin-top: 10px;
}
main .site-content .oneday hr {
  margin-top: 30px;
  border-style: dashed;
}
main .site-content .oneday .afterschool h3 {
  color: #333;
  border-bottom: none;
  padding-bottom: 0;
}
main .site-content .oneday .afterschool h3 span {
  background-color: #0087ce;
  color: #fff;
  border-radius: 10px;
  padding: 5px 10px;
  margin-left: 0;
  margin-right: 10px;
}
/* 年間行事 */
main .site-content .events {
  padding: 40px 20px;
}
main .site-content .events article div {
  position: relative;
  margin: 60px 20px 10px 20px;
}
main .site-content .events article:first-of-type div {
  margin: 30px 20px 10px 20px;
}
main .site-content .events div h3 {
  position: absolute;
  top: -20px;
  left: -20px;
  z-index: 1;
}
main .site-content .events ul {
  padding-left: 3rem;
}
main .site-content .events p.small {
  font-size: 80%;
  margin-inline: 30px;
  margin-top: 10px;
}
/* Q&A */
main .site-content .qa {
  padding: 50px 20px;
  background-color: #fbf065;
}
main .site-content .qa details {
  padding: 16px;
  margin: 16px 0;
  background-color: #fff;
  box-sizing: border-box;
}
main .site-content .qa details summary {
  display: block;
  position: relative;
  padding-right: 1em;
  cursor: pointer;
  font-weight: bold;
}
main .site-content .qa details summary::marker {
  display: none;
}
main .site-content .qa details summary::-webkit-details-marker {
  display: none;
}
main .site-content .qa details summary::after {
  content: "+";
  position: absolute;
  right: 0;
  top: 0;
  line-height: 1;
  font-size: 1.4em;
  font-weight: normal;
}
main .site-content .qa details[open] summary::after {
  content: "−";
}
main .site-content .qa details p {
  margin-top: 16px;
}
/* 高校進学情報 */
main .site-content .path {
  padding: 40px 20px;
}
main .site-content .path h2 {
  margin-bottom: 20px;
}
/* 卒業生の声 */
main .site-content .voice {
  padding: 40px 0;
  background: url(../../img/examinee/voice-bg.jpg) no-repeat center/cover;
}
main .site-content .voice h2 {
  padding-inline: 20px;
}
main .site-content .voice .swiper {
  margin-top: 30px;
}
main .site-content .voice .swiper .swiper-slide {
  height: auto; 
}
main .site-content .voice .swiper .swiper-wrapper {
  align-items: stretch;
}
main .site-content .voice .swiper .swiper-slide .slider-innner {
  height: 100%;
  padding: 20px;
  background-color: #fff;
  box-sizing: border-box;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
}
main .site-content .voice .swiper .swiper-slide .profile {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
main .site-content .voice .swiper .swiper-slide .profile .photo {
  width: 40%;
}
main .site-content .voice .swiper .swiper-slide .profile .name {
  width: 55%;
}
main .site-content .voice .swiper .swiper-slide .profile .name p {
  font-size: 0.8rem;
}
main .site-content .voice .swiper .swiper-slide .profile .name p span {
  font-size: 1rem;
  display: block;
}
main .site-content .voice .swiper .swiper-slide h3 {
  font-size: 1rem;
  font-weight: bold;
  color: #0087ce;
}
/* modal-video.js用サムネイル関連のスタイル */
.yt-card {
  display:block;
  width:100%;
  border:0;
  padding:0;
  background:transparent;
  position:relative;
  cursor:pointer;
}
.yt-thumb{
  width:100%;
  height:auto;
  display:block;
  aspect-ratio:16/9;
  object-fit:cover
}
.yt-play{
  position:absolute;
  inset:0;
  display:grid;
  place-items:center;
  font-size:48px;
  color: red;}
/* modal-video.js の実クラスに合わせる（__ ではなく - 版） */
.modal-video-body {
  padding: 0 !important; /* 必要なら0にしておく */
}
/* “見た目の余白”は movie-wrap（動画枠）に margin を付けるのが効きやすい */
.modal-video-movie-wrap {
  margin: 16px auto !important;                 /* ← ここが見える余白 */
  width: min(960px, 92vw) !important;
  max-height: calc(100dvh - 32px) !important;   /* 上下16px×2を引く */
}
/* iframeは枠にフィット */
.modal-video-movie-wrap iframe {
  width: 100% !important;
  height: 100% !important;
}

/* 横向きスマホだけ余白を少し増やす例 */
@media (orientation: landscape) and (max-height: 500px) {
  .modal-video-movie-wrap {
    margin: 24px auto !important;
    max-height: calc(100dvh - 48px) !important;
  }
}
/* footer */
main footer a {
  display: block;
}
main footer a.schedule {
  padding: 20px;
  font-weight: bold;
  background-color: #0087ce;
  color: #fff;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
}
main footer a.schedule span {
  font-size: 1.2rem;
}
main footer a.schedule i {
  font-size: 30px;
  padding-right: 10px;
}
main footer a.home {
  padding: 10px;
  margin-inline: 20px;
  margin-top : 20px;
  margin-bottom: 70px;
  border-bottom: 1px solid #999;
}
main footer a.home i {
  padding-left: 10px;
}

/* left-wrap */
.left-wrap {
  position: relative;
  order: 1;
  flex: 1 1 auto;        /* 余ったスペースをすべて取る */
  min-width: 0;          /* はみ出し防止の保険 */
  padding: 30px;
  background-image: url(../../img/examinee/bg.png);
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
}
.left-wrap .logo img {
  margin-left: 0;
  width: 500px;
}
.left-wrap .banner {
  display: block;
  width: 300px;
  filter: drop-shadow(3px 3px 5px rgba(0, 0, 0, 0.1));
  position: absolute;
  left: 50px;
  bottom: 70px;
}

/* right-wrap */
.right-wrap {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  order: 3;
  flex: 0 0 200px;  /* フレックスアイテムとして幅200px固定 */
  width: 200px;     /* 念のため幅指定もしておく */
  max-width: 200px; /* 保険で最大幅も固定 */
  background-color: #f6fbfe;
}
.right-wrap nav ul {
  flex-wrap: wrap;
  gap: 10px;
}
.right-wrap nav ul li a {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 80%;
  background-color: #fff;
  padding: 8px 12px;
  border-radius: 10px;
  box-sizing: border-box;
  margin-inline: auto;
  filter: drop-shadow(1px 1px 3px rgba(0, 0, 0, 0.1));
  font-size: 80%;
  font-weight: bold;
}
.right-wrap nav > a {
  display: block;
  width: 80%;
  margin-inline: auto;
  margin-top: 15px;
  box-sizing: border-box;
  padding: 10px;
  border: 1px solid;
  font-size: 80%;
  font-weight: bold;
}
.right-wrap nav .sns-container {
  margin-top: 15px;
  margin-bottom: 100px;
  justify-content: center;
  gap: 10px;
}
.right-wrap nav .sns-container i::before {
  font-size: 32px;
}

@media (max-width: 1200px) {
  .left-wrap {
    background: url('../../img/examinee/bg-flower.png') left center/cover no-repeat;
    background-color: #f6fbfe;
  }
  .left-wrap .logo {
    display: none;
  }
  .left-wrap .banner {
    display: none;
  }
  main .site-content .hero {
    display: block;
    width: 100%;
    aspect-ratio: 500 / 600; /* 元画像の比率をそのまま記述 */
    background: url('../../img/examinee/bg-sp.jpg') center/cover no-repeat;
    position: relative;
    overflow: hidden;
  }
  main .site-content .hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: url("../../img/examinee/lady.png") center 15px / 300px no-repeat;
    /* 最初は全て隠す */
    clip-path: inset(0 100% 0 0);

    animation: revealLogo 0.8s forwards;
    animation-timing-function: linear;
  }
  main .site-content .hero .clover {
    position: absolute;
    inset: 0; /* ヒーローと完全一致 */
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;

    pointer-events: none;

    opacity: 0;
    animation-name: cloverGroupBlink;
    animation-duration: 4s;          /* 全体をゆっくり */
    animation-timing-function: ease-in-out;
    animation-iteration-count: infinite;
  }
  .c1 {
    background-image: url('../../img/examinee/clover1.png');
  }
  .c2 {
    background-image: url('../../img/examinee/clover2.png');
  }
  .c3 {
    background-image: url('../../img/examinee/clover3.png');
  }
  .c4 {
    background-image: url('../../img/examinee/clover4.png');
  }
  .c5 {
    background-image: url('../../img/examinee/clover5.png');
  }
  .c6 {
    background-image: url('../../img/examinee/clover6.png');
  }
  /* グループA：1 & 5 */
  .c1,
  .c5 {
    animation-delay: 0s;
  }

  /* グループB：2 & 6 */
  .c2,
  .c6 {
    animation-delay: 2s;
  }

  /* グループC：3 & 4 */
  .c3,
  .c4 {
    animation-delay: 4s;
  }


  @keyframes cloverGroupBlink {
    0% {
      opacity: 0;
    }

    /* ふわっと現れる */
    15% {
      opacity: 1;
    }

    /* しばらく表示 */
    50% {
      opacity: 1;
    }

    /* ゆっくり消える */
    70% {
      opacity: 0;
    }

    100% {
      opacity: 0;
    }
  }

  
}


@media (max-width: 767px) {
  html, body {
    font-size: 14.5px;
  }

  /* スマホではasideを消して、mainを画面いっぱいに */
  .left-wrap,
  .right-wrap {
    display: none;
  }

  .container {
    min-height: 100vh;
  }

  main {
    flex: 1 1 auto; 
    max-width: 100%;   /* 制限を外して画面いっぱい */
    min-width: auto;   /* 375px の指定を打ち消す */
    width: 100%;
  }
}
