/* 全体の基本スタイル */
body {
    font-family: 'Helvetica Neue', Arial, 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', Meiryo, sans-serif;
    line-height: 1.8;
    color: #333;
    margin: 0;
    padding: 0;
    background-color: #f9f9f9;
    
    /* ▼ ここから変更・追加 ▼ */
    font-size: 17px; /* ベースフォントサイズを少し大きく */
    /* ===================== */
}
/* ヘッダー */
header {
    background-color: #003366;
    color: white;
    padding: 1rem 2rem; /* 横の余白を少し広げます */
    
    /* ▼ 1行表示にするための設定 ▼ */
    display: flex;
    justify-content: space-between;
    align-items: center;
    /* ========== ここから変更・追記 ========== */
    position: sticky; /* スクロールに追従する */
    top: 0;           /* 画面の一番上に配置 */
    width: 100%;
    z-index: 1000;    /* 他の要素より手前に表示 */
    box-sizing: border-box; /* paddingを含めて幅を100%にする */
    /* ======================================= */    
}

/* h1のデフォルトマージンをリセット */
header h1 {
    margin: 0;
    font-size: 1.5rem; /* サイズを少し調整 */
}

/* h1内のリンクのスタイル調整 */
header h1 a {
    color: white;
    text-decoration: none;

}
/* header h1 a のスタイルの下に追加 */

header nav ul {
    display: flex; /* li要素を横並びにする */
    list-style: none; /*箇条書きの黒点を消す */
    margin: 0;
    padding: 0;
}

header nav li {
    margin-left: 25px; /* 各項目間のスペース */
}

/* header nav li のスタイルの下に追加 */

header nav a {
    color: white;
    text-decoration: none; /* 下線を削除 */
    font-weight: bold;
    transition: opacity 0.3s; /* ホバー時のアニメーション */
}

/* リンクにマウスカーソルを乗せた時に少し薄くする */
header nav a:hover {
    opacity: 0.8;
}
/* (既存のハンバーガーメニューのスタイル...) */
/* メインコンテンツ */
main {
    max-width: 800px;
    margin: 0 auto; /* 上下のマージンを削除 */
    padding: 2rem 1rem;
}

section {
    background-color: white;
    padding: 2rem;
    margin-bottom: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

h2, h3 {
    color: #003366;
    border-bottom: 2px solid #ddd;
    padding-bottom: 0.5rem;
}

/* ========== ここから追加 (Swiper.jsのスタイル) ========== */

main {
    /* mainの上下の余白を調整 */
    margin-top: 0;
    padding-top: 0;
}

.swiper {
    width: 100%;
    height: 450px; /* スライドショーの高さ */
}

.swiper-slide {
    text-align: center;
    font-size: 18px;
    background: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.swiper-slide img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.swiper-slide .caption {
    position: absolute;
    bottom: 20px;
    left: 20px;
    right: 20px;
    color: white;
    background-color: rgba(0, 0, 0, 0.6); /* 背景を少し濃く */
    padding: 15px 20px;
    border-radius: 8px;
    text-align: left;
}

.swiper-slide .caption h3 {
    color: white;
    margin: 0 0 5px 0;
    border-bottom: none;
    padding-bottom: 0;
}

.swiper-slide .caption p {
    margin: 0;
    font-size: 0.9em;
}

/* 左右の矢印とドットの色をサイトのテーマに合わせる */
:root {
    --swiper-theme-color: #ffffff; /* 矢印と現在地のドットの色 */
    --swiper-navigation-size: 30px; /* 矢印のサイズ */
}

.swiper-pagination-bullet {
    background-color: rgba(255, 255, 255, 0.5); /* 通常のドットの色 */
}

/* ========== ここまで追加 ========== */

.slide {
    width: 100%;
    flex-shrink: 0;
    position: relative;
    text-align: center;
    overflow: hidden;
}

.slide img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    display: block;
}

.caption {
    position: absolute;
    bottom: 20px;
    left: 0;
    right: 0;
    color: white;
    background-color: rgba(0, 0, 0, 0.5);
    padding: 10px 20px;
    margin: 0 20px;
    border-radius: 5px;
}

.caption h3 {
    color: white;
    margin: 0 0 5px 0;
    border-bottom: none;
    padding-bottom: 0;
}

.caption p {
    margin: 0;
    font-size: 0.9em;
}

.navigation {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 5;
}

.navigation .bar {
    width: 12px;
    height: 12px;
    background-color: #bbb;
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.3s;
}

/* ラジオボタンが選択されたときにスライドを移動させる
  (手動での操作も残しておきます)
*/
#s1:checked ~ .slides { margin-left: 0; }
#s2:checked ~ .slides { margin-left: -100%; }
#s3:checked ~ .slides { margin-left: -200%; }


/* ========== ここから変更 ========== */
/* 手動で操作したときにアニメーションを一時停止する */
#carousel:has(#s1:checked) .slides,
#carousel:has(#s2:checked) .slides,
#carousel:has(#s3:checked) .slides {
  animation: none; /* アニメーションを停止 */
}
/* ========== ここまで変更 ========== */


/* 選択されたラジオボタンに対応するドットの色を変える */
#s1:checked ~ .navigation .bar:nth-child(1),
#s2:checked ~ .navigation .bar:nth-child(2),
#s3:checked ~ .navigation .bar:nth-child(3) {
    background-color: #003366;
}

/* フッター */
footer {
    text-align: center;
    padding: 1.5rem;
    background-color: #333;
    color: white;
}
/* (これまでのCSS...footerの下など、分かりやすい場所に追加してください) */

/* ========== ここから追加 (ローディング画面のスタイル) ========== */

/* ローディング画面全体 */
#loader-wrapper {
    position: fixed; /* 画面に固定 */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #f9f9f9; /* 背景色 */
    display: flex;
    flex-direction: column; /* 要素を縦に並べる */
    justify-content: center;
    align-items: center;
    z-index: 9999; /* 最前面に表示 */
    transition: opacity 0.8s ease-out; /* フェードアウトのアニメーション */
}

/* 読み込み完了後に適用されるクラス */
#loader-wrapper.loaded {
    opacity: 0;
    visibility: hidden; /* 画面から消す */
}

/* 本のアニメーション */
.book {
    width: 100px;
    height: 70px;
    position: relative;
    perspective: 1500px; /* 3Dの奥行き */
}

.book .page {
    width: 50%; /* 本の半分の幅 */
    height: 100%;
    position: absolute;
    top: 0;
    right: 0;
    background: #003366; /* ページの色 */
    border-top-right-radius: 5px;
    border-bottom-right-radius: 5px;
    transform-origin: left center; /* 左端を軸に回転 */
    animation: page-flip 1.2s infinite;
}

/* ページをずらしてパラパラ感を出す */
.book .page:nth-child(1) {
    animation-delay: -0.4s;
}
.book .page:nth-child(2) {
    animation-delay: -0.8s;
}
.book .page:nth-child(3) {
    animation-delay: 0s;
}

/* "Loading..." のテキスト */
.loading-text {
    margin-top: 20px;
    color: #003366;
    font-weight: bold;
    letter-spacing: 2px;
}


/* ページめくりのアニメーション定義 */
@keyframes page-flip {
    30% {
        transform: rotateY(0deg);
    }
    100% {
        transform: rotateY(-180deg);
    }
}

/* ========== ここまで追加 ========== */
/* (これまでのCSS...ローディング画面のスタイルの下などに追加) */

/* ========== ここから追加 ========== */

/* ナビゲーションのアクティブ表示 */
header nav a.active-nav {
    color: #ffc107; /* 目立つ色（例: 黄色） */
    text-decoration: underline;
}

/* メンバー紹介カード */
.member-card {
    background-color: #f9f9f9;
    border-left: 5px solid #003366;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border-radius: 5px;
}

.member-card h4 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    color: #003366;
    border-bottom: none;
}

.member-card p {
    margin-bottom: 0.5rem;
}
.member-card p:last-child {
    margin-bottom: 0;
}
/* ========== ここまで追加 ========== */
/* ========== ここから追加 (スマホ向けスタイル) ========== */

@media (max-width: 600px) {

    .swiper {
        /*
         * 画像の縦横比 (800x400 = 1:2) に合わせる
         * 高さを画面横幅(vw)の50%に設定
        */
        height: 50vw; 
    }

    .swiper-slide img {
        /* 画像全体が表示されるように contain を指定 */
        object-fit: contain;
    }

    .swiper-slide .caption {
        /* キャプションの文字サイズと余白を少し小さくする */
        font-size: 0.8em;
        padding: 10px;
        bottom: 10px;
        left: 10px;
        right: 10px;
    }

    /* 左右の矢印を少し小さくする */
    :root {
        --swiper-navigation-size: 24px;
    }
}

/* ========== ここまで追加 ========== */
/* ========== ここから追加 (ハンバーガーメニュー) ========== */

/* ハンバーガーメニューのアイコン (スマホでのみ表示) */
.hamburger-menu {
    display: none; /* PCでは非表示 */
    cursor: pointer;
    width: 30px;
    height: 21px;
    position: relative;
    z-index: 101; /* メニューコンテナより手前に */
}

.hamburger-menu span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: white;
    position: absolute;
    transition: transform 0.3s, opacity 0.3s;
}

.hamburger-menu span:nth-child(1) { top: 0; }
.hamburger-menu span:nth-child(2) { top: 9px; }
.hamburger-menu span:nth-child(3) { top: 18px; }

/* メニューが開いた時のアイコン (×印に変形) */
.hamburger-menu.active span:nth-child(1) {
    top: 9px;
    transform: rotate(45deg);
}
.hamburger-menu.active span:nth-child(2) {
    opacity: 0;
}
.hamburger-menu.active span:nth-child(3) {
    top: 9px;
    transform: rotate(-45deg);
}


/* スマホ表示のスタイル (画面幅が768px以下の場合) */
@media (max-width: 768px) {
    header {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    .hamburger-menu {
        display: block; /* スマホでは表示 */
    }

    /* ナビゲーションメニューのコンテナ */
    .nav-links-container {
        position: fixed;
        top: 0;
        left: 100%; /* 初期状態では画面の右側に隠す */
        width: 100%;
        height: 100vh; /* 画面全体の高さ */
        background-color: rgba(0, 51, 102, 0.95); /* 少し透明な背景 */
        display: flex;
        justify-content: center;
        align-items: center;
        transition: left 0.5s;
        z-index: 100;
    }

    /* メニューが開いた時のコンテナ */
    .nav-links-container.active {
        left: 0; /* 画面内にスライドイン */
    }

   .nav-links-container ul {
        /* ▼ 縦並びにするための設定（確認）▼ */
        display: flex; /* これを追加または確認 */
        flex-direction: column;
        padding: 0; /* ulのデフォルトpaddingをリセット */
        list-style: none; /* liの黒点を消す */
    }

    .nav-links-container li {
        margin: 20px 0;
    }

    .nav-links-container a {
        font-size: 1.5rem; /* 文字を大きく */
        color: white !important; /* 色を白で上書き固定 */
        text-decoration: none;   /* 下線を削除 */
    }
}

/* ========== ここまで追加 ========== */
/* ========== ここから追加 (イベントページ用) ========== */

#event-details h2 {
    font-size: 1.5rem;
    text-align: center;
    margin-top: 0.5rem;
    color: #003366;
    border-bottom: none;
}

/* イベントポスター画像 */
.event-poster {
    width: 100%;
    max-width: 600px; /* ポスターの最大幅 */
    margin: 1.5rem auto;
    display: block;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

/* イベント情報ボックス */
.event-info-box {
    background-color: #f9f9f9;
    border-left: 5px solid #003366;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border-radius: 0 5px 5px 0;
}

.event-info-box h4 {
    margin-top: 0;
    margin-bottom: 1rem;
    color: #003366;
    border-bottom: 2px solid #ddd;
    padding-bottom: 0.5rem;
}

.event-info-box p {
    margin-bottom: 0.5rem;
}
.event-info-box p:last-child {
    margin-bottom: 0;
}
.event-info-box ul {
    margin: 0;
    padding-left: 20px;
}

/* Google Map */
.event-map {
    width: 100%;
    height: 350px;
    border: 0;
    margin-top: 1rem;
    border-radius: 8px;
}

/* ========== ここまで追加 ========== */
/* ========== ここから追加 (イベントページのスライドショーの調整) ========== */

.swiper.eventSwiper { /* eventSwiperクラスに特化したスタイル */
    max-width: 800px; /* mainのmax-widthに合わせる */
    margin: 2rem auto; /* 中央寄せと上下の余白 */
    height: 400px; /* デフォルトの高さ (PC版) */
    border-radius: 8px; /* 角を丸く */
    box-shadow: 0 4px 10px rgba(0,0,0,0.1); /* 影をつける */
}

/* スライドの矢印とドットの色を通常の色に戻す (メインビジュアルと区別) */
.swiper.eventSwiper .swiper-button-next,
.swiper.eventSwiper .swiper-button-prev {
    color: #003366; /* 濃い青色に */
}

.swiper.eventSwiper .swiper-pagination-bullet-active {
    background-color: #003366; /* アクティブなドットの色 */
}

/* イベントスライドのキャプションは、画像がポスターの縦横比に近い可能性を考慮して調整 */
.swiper.eventSwiper .swiper-slide .caption {
    background-color: rgba(0, 0, 0, 0.7); /* 背景を少し濃く */
}


@media (max-width: 600px) {
    .swiper.eventSwiper {
        /*
         * スマホ版での高さを調整
         * PC版の画像 (800x600 = 4:3) のアスペクト比に合わせる
         * 画面横幅(vw)の75% (3/4) に設定
        */
        height: 75vw; 
    }
    .swiper.eventSwiper .swiper-slide img {
        object-fit: contain; /* スマホでは全体表示 */
    }
}


/* ========== ここまで追加 ========== */
/* ========== ここから追加 (タイムスケジュール画像用) ========== */

.timeline-image {
    width: 100%;
    height: auto; /* 縦横比を維持 */
    margin-top: 1rem;
    margin-bottom: 1.5rem; /* 画像とテキストの間の余白 */
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* ========== ここまで追加 ========== */