/* リセットCSS (基本的なブラウザのスタイルを整える) */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Hiragino Mincho ProN", "Yu Mincho", "MS Mincho", serif;
    line-height: 1.6;
    background-color: #f4f4f4;
    color: #333;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow: hidden; /* スクロールバーが表示されないように */
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 10px 0;
}

/* ヘッダー */
.header {
    background-color: rgba(30, 80, 70, 0.8);
    color: white;
    padding: 10px 0;
    text-align: center;
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 9999; /* 最前面に表示！ここが重要 */
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.header h1 {
    margin-bottom: 5px;
    font-size: 1.8em;
    font-family: "Hiragino Mincho ProN", "Yu Mincho", "MS Mincho", serif;
}

.header nav ul {
    list-style: none;
    padding: 0;
}

.header nav ul li {
    display: inline;
    margin: 0 12px;
}

.header nav ul li a {
    color: white;
    text-decoration: none;
    font-weight: bold;
    padding: 5px 0;
    position: relative;
    font-family: "Hiragino Mincho ProN", "Yu Mincho", "MS Mincho", serif;
}

.header nav ul li a.active,
.header nav ul li a:hover {
    text-decoration: none;
}

.header nav ul li a.active::after,
.header nav ul li a:hover::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 2px;
    background-color: white;
    transform: scaleX(1);
    transition: transform 0.3s ease;
}
.header nav ul li a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 2px;
    background-color: white;
    transform: scaleX(0);
    transition: transform 0.3s ease;
}


/* メインコンテンツのラッパー */
.main-content-wrapper {
    flex-grow: 1;
    position: relative;
    width: 100%;
    height: calc(100vh - 70px); /* ヘッダーの高さ分を引く (ヘッダー高さ約70px想定) */
    margin-top: 70px; /* ヘッダーの高さ分、下げる */
    background-color: #f4f4f4;
}

/* 各コンテンツセクションの共通スタイル */
.page-section {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.page-section.active {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: #ffffff;
}

/* 全画面コンテンツのラッパー */
.full-screen-content {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
}

/* 画像と映像の全画面表示 */
.full-screen-media {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
}

/* Mainセクションのスタイル */
#main .main-background {
    width: 100%;
    height: 100%;
    background-image: url('images/main_background.jpg');
    background-size: cover;
    background-position: center;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

#main .main-text {
    font-size: 5em;
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
    z-index: 2;
    font-family: "Hiragino Mincho ProN", "Yu Mincho", "MS Mincho", serif;
}

/* Profileセクションのスタイル */
.profile-content-wrapper {
    background-color: rgba(255, 255, 255, 0.9);
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    max-width: 800px;
    width: 90%;
    height: auto;
    z-index: 2;
    text-align: center;
}

.profile-detail {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    margin-top: 20px;
}

.profile-image {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #f8b400;
}

.profile-text {
    max-width: 600px;
    text-align: center;
    font-family: "Hiragino Mincho ProN", "Yu Mincho", "MS Mincho", serif;
}
.profile-text p {
    margin-bottom: 1em;
}


/* 画像/動画スライダーのスタイル (全画面対応 & 縦方向) */
.slider-container {
    /* full-screen-content が適用されるので、個別の高さ指定は不要 */
}

.slider {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.slides {
    display: flex;
    flex-direction: column; /* ここを縦方向 (column) に変更！ */
    width: 100%;
    height: 100%;
}

/* 各スライド（画像も動画も） */
.slide {
    min-width: 100%; /* 横幅は100%のまま */
    min-height: 100%; /* 縦幅も100%に */
    display: block;
    object-fit: cover;
    position: absolute; /* 重ねて配置 */
    top: 0;
    left: 0;
    opacity: 0;
    transition: opacity 0.5s ease-in-out; /* フェードイン/アウト */
}

.slide.active {
    opacity: 1;
    position: relative; /* アクティブなスライドだけが空間を占めるように */
}

/* スライダーボタンの位置を縦方向に変更 */
.prev-btn, .next-btn {
    position: absolute;
    left: 50%; /* 中央に配置 */
    transform: translateX(-50%); /* 中央揃えのため */
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    padding: 10px 15px;
    cursor: pointer;
    font-size: 1.8em;
    border-radius: 5px;
    z-index: 10;
    font-family: "Hiragino Mincho ProN", "Yu Mincho", "MS Mincho", serif;
}

.prev-btn.top-btn { /* prev-btnは上 */
    top: 15px; /* 上からの距離 */
}

.next-btn.bottom-btn { /* next-btnは下 */
    bottom: 15px; /* 下からの距離 */
}

/* 横ボタンのスタイルは削除または上書きされる */
.prev-btn { left: 50%; transform: translateX(-50%); } /* 左側指定を中央に上書き */
.next-btn { right: auto; left: 50%; transform: translateX(-50%); } /* 右側指定を中央に上書き */


.prev-btn:hover, .next-btn:hover {
    background-color: rgba(0, 0, 0, 0.7);
}


/* フッター */
.footer {
    background-color: rgba(30, 80, 70, 0.8);
    color: white;
    text-align: center;
    padding: 10px 0;
    margin-top: auto;
    width: 100%;
    z-index: 999;
    font-family: "Hiragino Mincho ProN", "Yu Mincho", "MS Mincho", serif;
}

/* レスポンシブ対応 */
@media (min-width: 768px) {
    .header h1 {
        font-size: 2.2em;
    }
    .header nav ul li {
        margin: 0 20px;
    }
    .main-text {
        font-size: 7em;
    }
    .profile-detail {
        flex-direction: row;
        text-align: left;
    }
    .profile-image {
        margin-right: 30px;
    }
}

@media (max-width: 767px) {
    .container {
        width: 95%;
    }
    .header nav ul li {
        margin: 0 8px;
        font-size: 0.85em;
    }
    .header h1 {
        font-size: 1.5em;
    }
    .main-text {
        font-size: 3em;
    }
    .profile-detail {
        flex-direction: column;
        text-align: center;
    }
    .profile-image {
        margin-bottom: 20px;
    }
}