/* 初期状態で非表示 */
body {
  margin: 0;
  padding: 0;
  overflow: hidden; /* ローディング中はスクロールを無効化 */
  transition: opacity 0.5s ease-in-out;
}

/* ロード完了後に表示 */
body.loaded {
  opacity: 1;
  overflow-y: auto; /* 縦方向のスクロールを有効化 */
  overflow-x: hidden; /* 横方向のスクロールを防止 */
}

/* 各セクションのアニメーション */
.circle-bg {
  animation: fadeIn 1s ease-in-out 1s; /* 遅延を1秒に変更 */
  animation-fill-mode: both;
}

.news-box {
  animation: fadeIn 1s ease-in-out 1.5s; /* 遅延を1.5秒に変更 */
  animation-fill-mode: both;
}

.ad-wrapper {
  animation: fadeIn 1s ease-in-out 2s; /* 遅延を2秒に変更 */
  animation-fill-mode: both;
}

/* フェードインアニメーション */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px); /* 少し下からスライドイン */
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ヘッダーの高さを固定 */
.header-desktop,
.header-mobile {
  position: fixed;
  top: 0; /* 初期位置を画面上部に固定 */
  left: 0;
  width: 100%;
  z-index: 1000;
  height: 80px; /* ヘッダーの高さを固定 */
  transition: transform 0.3s ease; /* スクロール時のアニメーション */
  transform: translateY(-100%); /* 初期状態で画面外に隠す */
}

.header-desktop.show,
.header-mobile.show {
  transform: translateY(0); /* スクロール時に表示 */
}

/* ローディング画面のスタイル */
#loading-screen {
  position: fixed; /* ページ全体を覆う */
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgb(0, 0, 0); /* 背景色を黒に設定 */
  color: white; /* テキスト色を白に設定 */
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 9999; /* 最前面に表示 */
  font-family: "Kaisei Opti", Arial, sans-serif; /* 他のスタイルと統一 */
  pointer-events: all; /* クリックイベントをブロック */
}

.loading-spinner {
  width: 50px;
  height: 50px;
  border: 5px solid rgba(255, 255, 255, 0.3); /* 半透明の白 */
  border-top: 5px solid white; /* スピナーのトップ部分を白に設定 */
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 1rem; /* テキストとの間隔を調整 */
}

#loading-screen p {
  font-size: 1.2rem; /* 読みやすいサイズに調整 */
  margin: 0;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* メインの円形背景と中央コンテンツ */
.main-wrapper {
  padding-top: 40px; /* ヘッダーの高さ分だけ余白を追加 */

  width: 100%;
  max-width: 100%;
  height: 100vh; /* ビューポート高さいっぱいに広げる */
  background-color: #f4c542; /* 背景色を設定 */
  margin: 0; /* 余白をなくす */
  transition: all 0.3s ease; /* スクロール時のアニメーション */
}
@media (min-width: 768px){
  .main-wrapper{
    padding-bottom: 5rem;
  }
  
}
@media (max-width: 768px){
  .main-wrapper{
    padding-top: 0;
  }
  
}

.main-content {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%; /* 親要素に合わせる */
  height: 100%; /* 親要素に合わせる */
  margin-bottom: 5rem;
}

.circle-bg {
  background: #fef6f0;
  border-radius: 50%;
  width: 80vw;
  max-width: 600px;
  height: 80vw;
  max-height: 600px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.05);
  position: relative;
  border: #f8d4cd 50px solid; /* デフォルトのボーダー幅 */
}


.emblem {
  width: 75%;
  height: auto;
  object-fit: contain; /* 画像の比率を保ちながらサイズ調整 */
}

h1 {
  font-size: 3.5rem;
  color: #555;
  text-align: center; /* 中央揃え */
  margin: 1.5rem 0; /* 上下の余白を追加 */
}

/* スマホ表示の改善（最大767px） */
@media (max-width: 767px) {
  h1 {
    font-size: 1.8rem; /* スマホではフォントサイズを小さく */
    margin: 0.3rem 0; /* 余白も調整 */
  }

  .date {
    font-size: 1rem; /* 日付のフォントサイズも調整 */
  }

  .emblem {
    width: 55%; /* エンブレムの幅を少し小さく */
  }

  .circle-bg {
    width: 85vw; /* 円の幅を少し大きく */
    height: 85vw; /* 円の高さも同じく */
    border: #f8d4cd 30px solid; /* ボーダー幅を狭くする */
    padding: 10px; /* 内側の余白を追加 */
  }

  /* スクロール矢印の位置調整 */
  .scroll-indicator-custom {
    bottom: -80px; /* スマホでは上に移動 */
  }

  #countdown {
    font-size: 1rem;
  }
  #countdown p {
    margin: 0.5em 0;
  }

  .link-box {
    padding: 15px;
    gap: 15px;
  }

  .link-list li {
    flex: 1 1 calc(100% - 30px);
    max-width: 100%;
  }

  .link-list li a {
    padding: 12px 20px;
  }

  .ad-image-large,
  .ad-image-small {
    width: 83.3vw;
    height: auto;
  }
}

/* 幅1100px以下共通 */
@media (max-width: 1100px) {
  .flex {
    display: block;
  }

  .flex > img {
    width: 80vw;
  }
}

/* 日付と時間の基本スタイル (PC向け) */
#countdown {
  font-size: 2rem;
  white-space: nowrap; /* 日付と時間を一行で表示 */
  color: #000;
}
#countdown p {
  margin: 0;        /* マージンをリセット */
  margin-bottom: 1rem;
  text-align: center; /* 中央揃え */
}
.date {
  font-size: 2rem;
  color: #666;
  text-align: center;
  white-space: nowrap;
  margin: 0;
  margin-bottom: 0.5rem;
}
.time {
  font-size: 1.5rem;
  color: #666;
  text-align: center;
  white-space: nowrap;
}

/* タブレット向け (幅 768px ～ 991px) */
@media (max-width: 991px) and (min-width: 768px) {
  #countdown {
    font-size: 1.5rem;
  }
  #countdown p {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
  }
  .date {
    font-size: 1.5rem;
  }
  .time {
    font-size: 1.4rem;
  }
}


/* タブレット向け (幅992px以下) */
@media (max-width: 991px) {
  .date {
    font-size: 1.4rem;
  }
  .time {
    font-size: 1.0rem;
  }
}

/* スマホ向け (幅 767px 以下) */
@media (max-width: 767px) {
  #countdown {
    font-size: 1.0rem;
  }
  #countdown p {
    margin: 0.5em　0;
  }
  .date {
    font-size: 1.2rem;
  }
  .time {
    font-size: 1.0rem;
  }
}

/* スクロールを促す矢印 */
.scroll-indicator-custom {
  position: absolute;
  bottom: -120px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  z-index: 10; /* 他の要素より前面に表示 */
}

.scroll-indicator-custom .arrow-custom {
  width: 20px;
  height: 20px;
  border-right: 2px solid #555;
  border-bottom: 2px solid #555;
  transform: rotate(45deg);
  animation: scroll-custom 1.5s infinite;
  opacity: 0;
}

.scroll-indicator-custom .arrow-custom:nth-child(1) {
  animation-delay: 0s;
}

.scroll-indicator-custom .arrow-custom:nth-child(2) {
  animation-delay: 0.3s;
}

.scroll-indicator-custom .arrow-custom:nth-child(3) {
  animation-delay: 0.6s;
}

@keyframes scroll-custom {
  0% {
    opacity: 0;
    transform: translateY(0) rotate(45deg);
  }
  50% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translateY(20px) rotate(45deg);
  }
}

/* スマホでのスクロール矢印の追加スタイル */
@media (max-width: 767px) {
  .scroll-indicator-custom {
    bottom: -80px; /* 位置を上に調整 */
  }

  .scroll-indicator-custom .arrow-custom {
    width: 15px; /* サイズを小さく */
    height: 15px;
    border-right: 1.5px solid #555; /* 線を細く */
    border-bottom: 1.5px solid #555;
  }
}
/* 各種ページリンクのスタイル */
.link-box {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;        /* アイテム間のスペース */
  padding: 20px;    /* パディングを追加 */
  background-color: #fef6f0;
}

.link-list {
  list-style: none; /* リストのデフォルトスタイルを削除 */
  padding: 0;
  margin: 0;
  display: flex;    /* フレックスボックスで配置 */
  flex-wrap: wrap;  /* アイテムを折り返す */
  justify-content: center;
  width: 100%;
  gap: 20px;
}

.link-list li {
  flex: 1 1 calc(33.333% - 40px);
  max-width: 300px;
  margin: 0;
}

.link-list li a {
  display: block;
  text-decoration: none;
  color: #333;
  background-color: #f8d4cd;
  padding: 15px 30px;
  border-radius: 5px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  text-align: center;
  transition: background-color 0.3s ease, transform 0.3s ease;
}

.link-list li a:hover {
  background-color: #f5a998;
  transform: translateY(-2px);
}

/* 中〜小画面: 2 カラム */
@media (max-width: 991px) {
  .link-list li {
    flex: 1 1 calc(50% - 40px);
  }
}

/* スマホ画面: 1 カラム */
@media (max-width: 767px) {
  .link-box {
    padding: 15px;
    gap: 15px;
  }

  .link-list li {
    flex: 1 1 calc(100% - 30px);
    max-width: 100%;
  }

  .link-list li a {
    padding: 12px 20px;
  }
}



/* お知らせのスタイル */
.news-box {
  margin: auto;
  border-top: 1px solid #fbd6c6;
  padding-top: 10px;
  padding-bottom: 10px;
  background-color: #fef6f0;
  padding-left: 5%;
}

.topic-header {
  display: flex;
  align-items: center;
  font-size: 50px;
  font-weight: bold;
  color: #fde9df;
  margin-bottom: 10px;
  text-decoration: underline;
  text-decoration-color: #f5a998; /* アンダーラインの色を指定 */
  text-decoration-thickness: 2px; /* アンダーラインの太さを指定 */
  text-underline-offset: 4px; /* アンダーラインとテキストの間隔を指定 */
  position: relative;
  overflow: hidden; /* はみ出した部分を隠す */
}

.topic-header .icon {
  font-size: 36px;
  margin-right: 10px;
}

.topic-header .highlight {
  color: #fd957e;
  margin-left: 10px;
  font-size: 30px;
  position: absolute;
}

.news-list {
  list-style: none;
  padding-left: 0;
}

.news-item {
  display: flex;
  align-items: center;
  margin-bottom: 10px;
}

.news-item::before {
  content: "●";
  color: #555;
  font-size: 20px;
  margin-right: 10px;
}

.news-date {
  width: 100px;
  font-weight: bold;
  color: #333;
}

.news-text {
  color: #444;
}

/* ピックアップのスタイル */
.news-slider {
  margin: auto;
  border-top: 1px solid #fbd6c6;
  padding: 10px 5%;
  background-color: #fef6f0;
  box-sizing: border-box;
}

.news-slider h2 {
  margin: 0.5rem 0 1rem;
  font-size: 2rem;
  color: #fd957e;
  text-align: center;
}

.news-slider .event-title {
  display: block;
  font-size: 1.8rem;
  color: #444;
  text-align: center;
  margin: 0.5rem 0 1rem;
}

h2 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.slider {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.arrow {
  background: none;
  border: none;
  font-size: 3rem;
  cursor: pointer;
  padding: 0 1rem;
  color: #000;
}

/* slide-containerのレスポンシブ対応 */
.slide-container {
  width: 50%; /* デフォルトは幅100% */
  height: auto; /* 高さは自動調整 */
  display: flex;
  overflow: hidden;
  position: relative;
}

.slide {
  flex: 0 0 100%;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.slide.active {
  display: flex; /* アクティブなスライドのみ表示 */
  animation: fadeIn 0.7s ease-in-out;
  animation-fill-mode: both;
}

/* スライド内の画像 */
.slide.active img {
  display: flex;
  width: 100%; /* デフォルトで幅を100%に設定 */
  display: block;
  width: 100%; /* デフォルトで幅を100%に設定 */
  height: 15rem; /* 固定の高さをrem指定 */
  object-fit: cover; /* 枠いっぱいにフィットしつつ切り抜き */
  object-position: top; /* 上部から切り抜く */
}

.dots {
  margin-top: 1rem;
}

.dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border: 1px solid black;
  border-radius: 50%;
  margin: 0 5px;
  background-color: white;
  cursor: pointer;
}

.dot.active {
  background-color: black;
}

/* 総長&委員長挨拶のスタイル */
.gre-box {
  margin: auto;
  /* border-top: 1px solid #fbd6c6; */
  padding: 10px 5%;
}

.president {
  background-color: #ef987d;
}

.chairman {
  background-color: #f7bb7b;
}

.president > .topic-header {
  color: #fd957e;
}

.chairman > .topic-header {
  color: #dd4e2285;
  text-decoration-color: #dd4e2285;
}

.gre-box > .topic-header > .highlight {
  color: whitesmoke;
}

.flex {
  display: flex;
  align-items: center;
}

.flex > img {
  width: 30vw;
  height: auto;
  /* border-radius: 5%; */
}

.flex > p {
  color: #ffffff;
  text-align: left;
  margin-left: 5vw;
  margin-right: 5vw;
}

.sign {
  text-align: right;
}

.sign > p {
  color: #fff;
  font-size: 32px;
}

@media (max-width: 1100px) {
  .flex {
    display: block;
  }
}

@media (max-width: 1100px) {
  .flex > img {
    width: 80vw;
  }
}

/* 広告画像のスタイル */
.ad-box {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 1rem;
  padding: 0.5rem;
  background-color: #ffffff; /* 背景色を設定 */
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); /* 軽い影をつける */
}

.news-box {
  margin: auto;
  border-top: 1px solid #fbd6c6;
  /* padding-top: 10px; */
  /* padding-bottom: 10px; */
  background-color: #fef6f0;
  /* padding-left: 5%; */
  padding: 10px 5%;
}

.ad-wrapper a {
  display: contents;
}

.justify-content-center {
  justify-content: center;
}

.ad-image-large {
  width: 300px;
  height: 250px;
}

.ad-image-small {
  width: 300px;
  height: 100px;
}

/* レスポンシブ対応 */
@media (max-width: 767px) {
  .ad-image-large,
  .ad-image-small {
    width: 83.3vw;
    height: auto;
  }
}

@media (min-width: 768px) and (max-width: 991px) {
  .ad-image-large,
  .ad-image-small {
    width: 41.6vw;
    height: auto;
  }
}

@media (min-width: 992px) and (max-width: 1119px) {
  .ad-image-large,
  .ad-image-small {
    width: 33.3vw;
    height: auto;
  }
}

@media (min-width: 1120px) {
  .ad-image-large,
  .ad-image-small {
    width: 25vw;
    height: auto;
  }
}
/* 広告画像のラッパースタイル */
.ad-wrapper {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 1rem;
}

.ad-wrapper img {
  margin: 1rem;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.4);
    }
    .modal-content {
    background-color: #fefefe;  /* モーダルウィンドウの背景色 */
    margin: 15% auto;
    padding: 20px;
    border: 1px solid #888888;
    width: 40%;  /* モーダルウィンドウの横幅 */
    }
    .modal-title {
    color: #800000; /* モーダルウィンドウの文字の色 */
    font-size: 18px; /* モーダルウィンドウの文字の大きさ */
    font-weight: bold;
    line-height: 200%;
    text-align: center;
    }
    .modal p{
    text-align: left
    }
    .close-button {
    color: #aaaaaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    }
    .close-button:hover,
    .close-button:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
    }